From 350b3e35109171f0edd6fe9d697b91d5e76561f9 Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Sun, 6 Feb 2022 03:01:17 +0000 Subject: CTAN sync 202202060301 --- graphics/asymptote/LspCpp/CMakeDoxyfile.in | 285 + .../asymptote/LspCpp/CMakeDoxygenDefaults.cmake | 688 + .../LspCpp/CMakeFiles/3.20.5/CMakeCCompiler.cmake | 78 + .../CMakeFiles/3.20.5/CMakeCXXCompiler.cmake | 91 + .../3.20.5/CMakeDetermineCompilerABI_C.bin | Bin 0 -> 24312 bytes .../3.20.5/CMakeDetermineCompilerABI_CXX.bin | Bin 0 -> 24328 bytes .../LspCpp/CMakeFiles/3.20.5/CMakeSystem.cmake | 15 + .../3.20.5/CompilerIdC/CMakeCCompilerId.c | 752 + .../LspCpp/CMakeFiles/3.20.5/CompilerIdC/a.out | Bin 0 -> 24368 bytes .../3.20.5/CompilerIdCXX/CMakeCXXCompilerId.cpp | 743 + .../LspCpp/CMakeFiles/3.20.5/CompilerIdCXX/a.out | Bin 0 -> 24376 bytes .../CMakeFiles/CMakeDirectoryInformation.cmake | 16 + .../asymptote/LspCpp/CMakeFiles/CMakeError.log | 64 + .../asymptote/LspCpp/CMakeFiles/CMakeOutput.log | 474 + .../LspCpp/CMakeFiles/CMakeRuleHashes.txt | 2 + .../asymptote/LspCpp/CMakeFiles/Makefile.cmake | 68 + graphics/asymptote/LspCpp/CMakeFiles/Makefile2 | 197 + .../LspCpp/CMakeFiles/TargetDirectories.txt | 21 + .../asymptote/LspCpp/CMakeFiles/cmake.check_cache | 1 + .../LspCpp/CMakeFiles/lspcpp.dir/DependInfo.cmake | 39 + .../LspCpp/CMakeFiles/lspcpp.dir/build.make | 415 + .../LspCpp/CMakeFiles/lspcpp.dir/cmake_clean.cmake | 49 + .../CMakeFiles/lspcpp.dir/cmake_clean_target.cmake | 3 + .../CMakeFiles/lspcpp.dir/compiler_depend.internal | 14125 +++++++++++++ .../CMakeFiles/lspcpp.dir/compiler_depend.make | 20463 +++++++++++++++++++ .../CMakeFiles/lspcpp.dir/compiler_depend.ts | 2 + .../LspCpp/CMakeFiles/lspcpp.dir/depend.make | 2 + .../LspCpp/CMakeFiles/lspcpp.dir/flags.make | 10 + .../LspCpp/CMakeFiles/lspcpp.dir/link.txt | 2 + .../LspCpp/CMakeFiles/lspcpp.dir/progress.make | 22 + .../asymptote/LspCpp/CMakeFiles/progress.marks | 1 + graphics/asymptote/LspCpp/CMakeLists.txt | 336 + graphics/asymptote/LspCpp/LICENSE | 42 +- .../asymptote/LspCpp/LibLsp/JsonRpc/Cancellation.h | 23 - .../asymptote/LspCpp/LibLsp/JsonRpc/Condition.h | 48 - .../asymptote/LspCpp/LibLsp/JsonRpc/Context.cpp | 35 - graphics/asymptote/LspCpp/LibLsp/JsonRpc/Context.h | 216 - .../asymptote/LspCpp/LibLsp/JsonRpc/Endpoint.cpp | 46 - .../asymptote/LspCpp/LibLsp/JsonRpc/Endpoint.h | 53 - .../LspCpp/LibLsp/JsonRpc/GCThreadContext.cpp | 17 - .../LspCpp/LibLsp/JsonRpc/GCThreadContext.h | 19 - .../asymptote/LspCpp/LibLsp/JsonRpc/MessageIssue.h | 182 - .../LspCpp/LibLsp/JsonRpc/MessageJsonHandler.cpp | 57 - .../LspCpp/LibLsp/JsonRpc/MessageJsonHandler.h | 61 - .../LspCpp/LibLsp/JsonRpc/MessageProducer.h | 13 - .../LspCpp/LibLsp/JsonRpc/NotificationInMessage.h | 62 - .../LspCpp/LibLsp/JsonRpc/RemoteEndPoint.cpp | 612 - .../LspCpp/LibLsp/JsonRpc/RemoteEndPoint.h | 340 - .../LspCpp/LibLsp/JsonRpc/RequestInMessage.h | 70 - .../asymptote/LspCpp/LibLsp/JsonRpc/ScopeExit.h | 59 - .../LibLsp/JsonRpc/StreamMessageProducer.cpp | 191 - .../LspCpp/LibLsp/JsonRpc/StreamMessageProducer.h | 48 - .../asymptote/LspCpp/LibLsp/JsonRpc/TcpServer.cpp | 299 - .../asymptote/LspCpp/LibLsp/JsonRpc/TcpServer.h | 40 - .../LspCpp/LibLsp/JsonRpc/WebSocketServer.cpp | 341 - .../LspCpp/LibLsp/JsonRpc/WebSocketServer.h | 87 - graphics/asymptote/LspCpp/LibLsp/JsonRpc/json.h | 81 - .../asymptote/LspCpp/LibLsp/JsonRpc/lsRequestId.h | 51 - .../LspCpp/LibLsp/JsonRpc/lsResponseMessage.h | 71 - .../asymptote/LspCpp/LibLsp/JsonRpc/message.cpp | 88 - graphics/asymptote/LspCpp/LibLsp/JsonRpc/message.h | 34 - .../asymptote/LspCpp/LibLsp/JsonRpc/optional.hpp | 1846 -- .../asymptote/LspCpp/LibLsp/JsonRpc/serializer.cpp | 214 - .../asymptote/LspCpp/LibLsp/JsonRpc/serializer.h | 378 - graphics/asymptote/LspCpp/LibLsp/JsonRpc/stream.h | 196 - .../LspCpp/LibLsp/JsonRpc/threaded_queue.cpp | 20 - .../LspCpp/LibLsp/JsonRpc/threaded_queue.h | 249 - graphics/asymptote/LspCpp/LibLsp/JsonRpc/traits.h | 158 - .../asymptote/LspCpp/LibLsp/lsp/AbsolutePath.h | 27 - .../LspCpp/LibLsp/lsp/ClientPreferences.h | 306 - .../asymptote/LspCpp/LibLsp/lsp/CodeActionParams.h | 114 - graphics/asymptote/LspCpp/LibLsp/lsp/Directory.h | 13 - .../LspCpp/LibLsp/lsp/ExecuteCommandParams.h | 20 - .../asymptote/LspCpp/LibLsp/lsp/IProgressMonitor.h | 145 - .../asymptote/LspCpp/LibLsp/lsp/Markup/Markup.cpp | 942 - .../asymptote/LspCpp/LibLsp/lsp/Markup/Markup.h | 119 - .../LspCpp/LibLsp/lsp/Markup/string_ref.h | 1059 - .../LspCpp/LibLsp/lsp/ParentProcessWatcher.cpp | 106 - .../LspCpp/LibLsp/lsp/ParentProcessWatcher.h | 17 - .../asymptote/LspCpp/LibLsp/lsp/ProcessIoService.h | 48 - .../LspCpp/LibLsp/lsp/ProtocolJsonHandler.cpp | 716 - .../LspCpp/LibLsp/lsp/ProtocolJsonHandler.h | 11 - .../LspCpp/LibLsp/lsp/ResourceOperation.h | 121 - graphics/asymptote/LspCpp/LibLsp/lsp/SimpleTimer.h | 49 - .../LspCpp/LibLsp/lsp/client/registerCapability.h | 49 - .../LibLsp/lsp/client/unregisterCapability.h | 41 - .../LspCpp/LibLsp/lsp/extention/jdtls/Move.h | 14 - .../LibLsp/lsp/extention/jdtls/OverridableMethod.h | 34 - .../lsp/extention/jdtls/WorkspaceSymbolParams.h | 13 - .../lsp/extention/jdtls/addOverridableMethods.h | 19 - .../LibLsp/lsp/extention/jdtls/buildWorkspace.h | 17 - .../lsp/extention/jdtls/checkConstructorsStatus.h | 29 - .../extention/jdtls/checkDelegateMethodsStatus.h | 29 - .../extention/jdtls/checkHashCodeEqualsStatus.h | 36 - .../lsp/extention/jdtls/checkToStringStatus.h | 24 - .../LibLsp/lsp/extention/jdtls/classFileContents.h | 10 - .../LibLsp/lsp/extention/jdtls/codeActionResult.h | 22 - .../LibLsp/lsp/extention/jdtls/executeCommand.h | 29 - .../LspCpp/LibLsp/lsp/extention/jdtls/findLinks.h | 22 - .../LibLsp/lsp/extention/jdtls/generateAccessors.h | 19 - .../lsp/extention/jdtls/generateConstructors.h | 19 - .../lsp/extention/jdtls/generateDelegateMethods.h | 25 - .../lsp/extention/jdtls/generateHashCodeEquals.h | 25 - .../LibLsp/lsp/extention/jdtls/generateToString.h | 18 - .../lsp/extention/jdtls/getMoveDestinations.h | 65 - .../LibLsp/lsp/extention/jdtls/getRefactorEdit.h | 77 - .../lsp/extention/jdtls/listOverridableMethods.h | 17 - .../LibLsp/lsp/extention/jdtls/organizeImports.h | 12 - .../extention/jdtls/projectConfigurationUpdate.h | 13 - .../jdtls/resolveUnimplementedAccessors.h | 24 - .../LibLsp/lsp/extention/jdtls/searchSymbols.h | 27 - .../LspCpp/LibLsp/lsp/extention/sct/SCTConfig.h | 37 - .../LspCpp/LibLsp/lsp/extention/sct/protocol.h | 222 - .../LspCpp/LibLsp/lsp/extention/sct/sct.cpp | 743 - .../LspCpp/LibLsp/lsp/extention/sct/sct.h | 103 - .../LibLsp/lsp/extention/sonarlint/protocol.h | 176 - .../LspCpp/LibLsp/lsp/general/InitializeParams.h | 128 - .../asymptote/LspCpp/LibLsp/lsp/general/exit.h | 7 - .../LspCpp/LibLsp/lsp/general/initialize.cpp | 45 - .../LspCpp/LibLsp/lsp/general/initialize.h | 39 - .../LspCpp/LibLsp/lsp/general/initialized.h | 13 - .../LibLsp/lsp/general/lsClientCapabilities.h | 48 - .../LibLsp/lsp/general/lsServerCapabilities.h | 589 - .../lsp/general/lsTextDocumentClientCapabilities.h | 713 - .../lsp/general/lsWorkspaceClientCapabilites.h | 256 - .../asymptote/LspCpp/LibLsp/lsp/general/progress.h | 16 - .../asymptote/LspCpp/LibLsp/lsp/general/shutdown.h | 15 - .../LspCpp/LibLsp/lsp/language/language.h | 170 - .../asymptote/LspCpp/LibLsp/lsp/location_type.h | 63 - graphics/asymptote/LspCpp/LibLsp/lsp/lru_cache.h | 151 - graphics/asymptote/LspCpp/LibLsp/lsp/lsAny.h | 159 - .../asymptote/LspCpp/LibLsp/lsp/lsCodeAction.h | 58 - graphics/asymptote/LspCpp/LibLsp/lsp/lsCommand.h | 44 - .../asymptote/LspCpp/LibLsp/lsp/lsDocumentUri.h | 26 - .../LspCpp/LibLsp/lsp/lsFormattingOptions.h | 43 - .../asymptote/LspCpp/LibLsp/lsp/lsMarkedString.h | 45 - graphics/asymptote/LspCpp/LibLsp/lsp/lsPosition.h | 40 - graphics/asymptote/LspCpp/LibLsp/lsp/lsRange.h | 32 - .../asymptote/LspCpp/LibLsp/lsp/lsResponseError.h | 117 - .../LspCpp/LibLsp/lsp/lsTextDocumentEdit.h | 24 - .../LspCpp/LibLsp/lsp/lsTextDocumentIdentifier.h | 14 - .../LspCpp/LibLsp/lsp/lsTextDocumentItem.h | 26 - .../LibLsp/lsp/lsTextDocumentPositionParams.h | 26 - graphics/asymptote/LspCpp/LibLsp/lsp/lsTextEdit.h | 87 - .../LibLsp/lsp/lsVersionedTextDocumentIdentifier.h | 32 - .../asymptote/LspCpp/LibLsp/lsp/lsWorkspaceEdit.h | 57 - graphics/asymptote/LspCpp/LibLsp/lsp/lsp.cpp | 1087 - .../asymptote/LspCpp/LibLsp/lsp/lsp_code_action.h | 64 - .../asymptote/LspCpp/LibLsp/lsp/lsp_completion.h | 224 - .../asymptote/LspCpp/LibLsp/lsp/lsp_diagnostic.cpp | 74 - .../asymptote/LspCpp/LibLsp/lsp/lsp_diagnostic.h | 151 - graphics/asymptote/LspCpp/LibLsp/lsp/method_type.h | 7 - graphics/asymptote/LspCpp/LibLsp/lsp/out_list.h | 22 - graphics/asymptote/LspCpp/LibLsp/lsp/symbol.h | 164 - .../LibLsp/lsp/textDocument/SemanticTokens.h | 267 - .../LspCpp/LibLsp/lsp/textDocument/callHierarchy.h | 121 - .../LspCpp/LibLsp/lsp/textDocument/code_action.h | 37 - .../LspCpp/LibLsp/lsp/textDocument/code_lens.h | 42 - .../LibLsp/lsp/textDocument/colorPresentation.h | 63 - .../LspCpp/LibLsp/lsp/textDocument/completion.h | 82 - .../lsp/textDocument/declaration_definition.h | 29 - .../LibLsp/lsp/textDocument/didRenameFiles.h | 44 - .../LspCpp/LibLsp/lsp/textDocument/did_change.h | 51 - .../LspCpp/LibLsp/lsp/textDocument/did_close.h | 33 - .../LspCpp/LibLsp/lsp/textDocument/did_open.h | 39 - .../LspCpp/LibLsp/lsp/textDocument/did_save.h | 31 - .../LspCpp/LibLsp/lsp/textDocument/documentColor.h | 73 - .../LspCpp/LibLsp/lsp/textDocument/document_link.h | 44 - .../LibLsp/lsp/textDocument/document_symbol.h | 55 - .../LspCpp/LibLsp/lsp/textDocument/foldingRange.h | 62 - .../LspCpp/LibLsp/lsp/textDocument/formatting.h | 32 - .../LspCpp/LibLsp/lsp/textDocument/highlight.h | 18 - .../LspCpp/LibLsp/lsp/textDocument/hover.h | 55 - .../LibLsp/lsp/textDocument/implementation.h | 16 - .../LibLsp/lsp/textDocument/linkedEditingRange.h | 51 - .../LibLsp/lsp/textDocument/onTypeFormatting.h | 44 - .../LspCpp/LibLsp/lsp/textDocument/prepareRename.h | 40 - .../LibLsp/lsp/textDocument/publishDiagnostics.h | 28 - .../LibLsp/lsp/textDocument/range_formatting.h | 35 - .../LspCpp/LibLsp/lsp/textDocument/references.h | 48 - .../LspCpp/LibLsp/lsp/textDocument/rename.h | 41 - .../LibLsp/lsp/textDocument/resolveCodeLens.h | 10 - .../lsp/textDocument/resolveCompletionItem.h | 21 - .../LibLsp/lsp/textDocument/resolveTypeHierarchy.h | 31 - .../LibLsp/lsp/textDocument/selectionRange.h | 52 - .../LibLsp/lsp/textDocument/semanticHighlighting.h | 66 - .../LibLsp/lsp/textDocument/signature_help.h | 92 - .../LibLsp/lsp/textDocument/textDocument.cpp | 349 - .../LspCpp/LibLsp/lsp/textDocument/typeHierarchy.h | 133 - .../LibLsp/lsp/textDocument/type_definition.h | 16 - .../LspCpp/LibLsp/lsp/textDocument/willSave.h | 71 - graphics/asymptote/LspCpp/LibLsp/lsp/utils.cpp | 602 - graphics/asymptote/LspCpp/LibLsp/lsp/utils.h | 141 - .../LspCpp/LibLsp/lsp/windows/MessageNotify.h | 83 - .../asymptote/LspCpp/LibLsp/lsp/working_files.cpp | 186 - .../asymptote/LspCpp/LibLsp/lsp/working_files.h | 72 - .../LspCpp/LibLsp/lsp/workspace/applyEdit.h | 42 - .../LspCpp/LibLsp/lsp/workspace/configuration.h | 37 - .../lsp/workspace/didChangeWorkspaceFolders.h | 48 - .../lsp/workspace/did_change_configuration.h | 25 - .../lsp/workspace/did_change_watched_files.h | 46 - .../LspCpp/LibLsp/lsp/workspace/execute_command.h | 24 - .../asymptote/LspCpp/LibLsp/lsp/workspace/symbol.h | 16 - .../LspCpp/LibLsp/lsp/workspace/workspaceFolders.h | 34 - graphics/asymptote/LspCpp/LspCpp.filters | 465 - graphics/asymptote/LspCpp/LspCpp.user | 4 - graphics/asymptote/LspCpp/LspCpp.vcxproj | 668 - graphics/asymptote/LspCpp/LspCpp.vcxproj.filters | 669 - graphics/asymptote/LspCpp/LspCpp.vcxproj.user | 4 - graphics/asymptote/LspCpp/Makefile | 789 +- graphics/asymptote/LspCpp/README.md | 111 +- graphics/asymptote/LspCpp/cmake_install.cmake | 60 + .../LspCpp/example/StdIOClientExample.cpp | 221 - .../LspCpp/example/StdIOServerExample.cpp | 162 - .../asymptote/LspCpp/example/TcpServerExample.cpp | 200 - .../asymptote/LspCpp/example/WebsocketExample.cpp | 297 - .../LspCpp/examples/StdIOClientExample.cpp | 218 + .../LspCpp/examples/StdIOServerExample.cpp | 159 + .../asymptote/LspCpp/examples/TcpServerExample.cpp | 199 + .../asymptote/LspCpp/examples/WebsocketExample.cpp | 296 + .../LspCpp/include/LibLsp/JsonRpc/Cancellation.h | 23 + .../LspCpp/include/LibLsp/JsonRpc/Condition.h | 48 + .../LspCpp/include/LibLsp/JsonRpc/Context.h | 216 + .../LspCpp/include/LibLsp/JsonRpc/Endpoint.h | 53 + .../include/LibLsp/JsonRpc/GCThreadContext.h | 19 + .../LspCpp/include/LibLsp/JsonRpc/MessageIssue.h | 182 + .../include/LibLsp/JsonRpc/MessageJsonHandler.h | 61 + .../include/LibLsp/JsonRpc/MessageProducer.h | 13 + .../include/LibLsp/JsonRpc/NotificationInMessage.h | 62 + .../LspCpp/include/LibLsp/JsonRpc/RemoteEndPoint.h | 340 + .../include/LibLsp/JsonRpc/RequestInMessage.h | 70 + .../LspCpp/include/LibLsp/JsonRpc/ScopeExit.h | 59 + .../include/LibLsp/JsonRpc/StreamMessageProducer.h | 48 + .../LspCpp/include/LibLsp/JsonRpc/TcpServer.h | 40 + .../include/LibLsp/JsonRpc/WebSocketServer.h | 87 + .../asymptote/LspCpp/include/LibLsp/JsonRpc/json.h | 81 + .../LspCpp/include/LibLsp/JsonRpc/lsRequestId.h | 51 + .../include/LibLsp/JsonRpc/lsResponseMessage.h | 71 + .../LspCpp/include/LibLsp/JsonRpc/macro_map.h | 134 + .../LspCpp/include/LibLsp/JsonRpc/message.h | 34 + .../LspCpp/include/LibLsp/JsonRpc/serializer.h | 378 + .../LspCpp/include/LibLsp/JsonRpc/stream.h | 196 + .../LspCpp/include/LibLsp/JsonRpc/threaded_queue.h | 249 + .../LspCpp/include/LibLsp/JsonRpc/traits.h | 158 + .../LspCpp/include/LibLsp/lsp/AbsolutePath.h | 27 + .../LspCpp/include/LibLsp/lsp/ClientPreferences.h | 306 + .../LspCpp/include/LibLsp/lsp/CodeActionParams.h | 114 + .../LspCpp/include/LibLsp/lsp/Directory.h | 13 + .../include/LibLsp/lsp/ExecuteCommandParams.h | 20 + .../LspCpp/include/LibLsp/lsp/IProgressMonitor.h | 145 + .../LspCpp/include/LibLsp/lsp/Markup/Markup.h | 119 + .../LspCpp/include/LibLsp/lsp/Markup/string_ref.h | 1061 + .../include/LibLsp/lsp/ParentProcessWatcher.h | 17 + .../LspCpp/include/LibLsp/lsp/ProcessIoService.h | 48 + .../include/LibLsp/lsp/ProtocolJsonHandler.h | 11 + .../LspCpp/include/LibLsp/lsp/ResourceOperation.h | 121 + .../LspCpp/include/LibLsp/lsp/SimpleTimer.h | 49 + .../include/LibLsp/lsp/client/registerCapability.h | 49 + .../LibLsp/lsp/client/unregisterCapability.h | 41 + .../include/LibLsp/lsp/extention/jdtls/Move.h | 14 + .../LibLsp/lsp/extention/jdtls/OverridableMethod.h | 34 + .../lsp/extention/jdtls/WorkspaceSymbolParams.h | 13 + .../lsp/extention/jdtls/addOverridableMethods.h | 19 + .../LibLsp/lsp/extention/jdtls/buildWorkspace.h | 17 + .../lsp/extention/jdtls/checkConstructorsStatus.h | 29 + .../extention/jdtls/checkDelegateMethodsStatus.h | 29 + .../extention/jdtls/checkHashCodeEqualsStatus.h | 36 + .../lsp/extention/jdtls/checkToStringStatus.h | 24 + .../LibLsp/lsp/extention/jdtls/classFileContents.h | 10 + .../LibLsp/lsp/extention/jdtls/codeActionResult.h | 22 + .../LibLsp/lsp/extention/jdtls/executeCommand.h | 29 + .../include/LibLsp/lsp/extention/jdtls/findLinks.h | 22 + .../LibLsp/lsp/extention/jdtls/generateAccessors.h | 19 + .../lsp/extention/jdtls/generateConstructors.h | 19 + .../lsp/extention/jdtls/generateDelegateMethods.h | 25 + .../lsp/extention/jdtls/generateHashCodeEquals.h | 25 + .../LibLsp/lsp/extention/jdtls/generateToString.h | 18 + .../lsp/extention/jdtls/getMoveDestinations.h | 65 + .../LibLsp/lsp/extention/jdtls/getRefactorEdit.h | 77 + .../lsp/extention/jdtls/listOverridableMethods.h | 17 + .../LibLsp/lsp/extention/jdtls/organizeImports.h | 12 + .../extention/jdtls/projectConfigurationUpdate.h | 13 + .../jdtls/resolveUnimplementedAccessors.h | 24 + .../LibLsp/lsp/extention/jdtls/searchSymbols.h | 27 + .../LibLsp/lsp/extention/sonarlint/protocol.h | 176 + .../include/LibLsp/lsp/general/InitializeParams.h | 128 + .../LspCpp/include/LibLsp/lsp/general/exit.h | 7 + .../LspCpp/include/LibLsp/lsp/general/initialize.h | 39 + .../include/LibLsp/lsp/general/initialized.h | 13 + .../LibLsp/lsp/general/lsClientCapabilities.h | 48 + .../LibLsp/lsp/general/lsServerCapabilities.h | 589 + .../lsp/general/lsTextDocumentClientCapabilities.h | 713 + .../lsp/general/lsWorkspaceClientCapabilites.h | 256 + .../LspCpp/include/LibLsp/lsp/general/progress.h | 16 + .../LspCpp/include/LibLsp/lsp/general/shutdown.h | 15 + .../LspCpp/include/LibLsp/lsp/language/language.h | 170 + .../LspCpp/include/LibLsp/lsp/location_type.h | 63 + .../LspCpp/include/LibLsp/lsp/lru_cache.h | 151 + .../asymptote/LspCpp/include/LibLsp/lsp/lsAny.h | 159 + .../LspCpp/include/LibLsp/lsp/lsCodeAction.h | 58 + .../LspCpp/include/LibLsp/lsp/lsCommand.h | 44 + .../LspCpp/include/LibLsp/lsp/lsDocumentUri.h | 26 + .../include/LibLsp/lsp/lsFormattingOptions.h | 43 + .../LspCpp/include/LibLsp/lsp/lsMarkedString.h | 45 + .../LspCpp/include/LibLsp/lsp/lsPosition.h | 40 + .../asymptote/LspCpp/include/LibLsp/lsp/lsRange.h | 32 + .../LspCpp/include/LibLsp/lsp/lsResponseError.h | 117 + .../LspCpp/include/LibLsp/lsp/lsTextDocumentEdit.h | 24 + .../include/LibLsp/lsp/lsTextDocumentIdentifier.h | 14 + .../LspCpp/include/LibLsp/lsp/lsTextDocumentItem.h | 26 + .../LibLsp/lsp/lsTextDocumentPositionParams.h | 26 + .../LspCpp/include/LibLsp/lsp/lsTextEdit.h | 87 + .../LibLsp/lsp/lsVersionedTextDocumentIdentifier.h | 32 + .../LspCpp/include/LibLsp/lsp/lsWorkspaceEdit.h | 57 + .../LspCpp/include/LibLsp/lsp/lsp_code_action.h | 64 + .../LspCpp/include/LibLsp/lsp/lsp_completion.h | 224 + .../LspCpp/include/LibLsp/lsp/lsp_diagnostic.h | 151 + .../LspCpp/include/LibLsp/lsp/method_type.h | 7 + .../asymptote/LspCpp/include/LibLsp/lsp/out_list.h | 22 + .../asymptote/LspCpp/include/LibLsp/lsp/symbol.h | 164 + .../LibLsp/lsp/textDocument/SemanticTokens.h | 267 + .../LibLsp/lsp/textDocument/callHierarchy.h | 121 + .../include/LibLsp/lsp/textDocument/code_action.h | 37 + .../include/LibLsp/lsp/textDocument/code_lens.h | 42 + .../LibLsp/lsp/textDocument/colorPresentation.h | 63 + .../include/LibLsp/lsp/textDocument/completion.h | 82 + .../lsp/textDocument/declaration_definition.h | 29 + .../LibLsp/lsp/textDocument/didRenameFiles.h | 44 + .../include/LibLsp/lsp/textDocument/did_change.h | 51 + .../include/LibLsp/lsp/textDocument/did_close.h | 33 + .../include/LibLsp/lsp/textDocument/did_open.h | 39 + .../include/LibLsp/lsp/textDocument/did_save.h | 31 + .../LibLsp/lsp/textDocument/documentColor.h | 73 + .../LibLsp/lsp/textDocument/document_link.h | 44 + .../LibLsp/lsp/textDocument/document_symbol.h | 55 + .../include/LibLsp/lsp/textDocument/foldingRange.h | 62 + .../include/LibLsp/lsp/textDocument/formatting.h | 32 + .../include/LibLsp/lsp/textDocument/highlight.h | 18 + .../LspCpp/include/LibLsp/lsp/textDocument/hover.h | 55 + .../LibLsp/lsp/textDocument/implementation.h | 16 + .../LibLsp/lsp/textDocument/linkedEditingRange.h | 51 + .../LibLsp/lsp/textDocument/onTypeFormatting.h | 44 + .../LibLsp/lsp/textDocument/prepareRename.h | 40 + .../LibLsp/lsp/textDocument/publishDiagnostics.h | 28 + .../LibLsp/lsp/textDocument/range_formatting.h | 35 + .../include/LibLsp/lsp/textDocument/references.h | 48 + .../include/LibLsp/lsp/textDocument/rename.h | 41 + .../LibLsp/lsp/textDocument/resolveCodeLens.h | 10 + .../lsp/textDocument/resolveCompletionItem.h | 21 + .../LibLsp/lsp/textDocument/resolveTypeHierarchy.h | 31 + .../LibLsp/lsp/textDocument/selectionRange.h | 52 + .../LibLsp/lsp/textDocument/semanticHighlighting.h | 66 + .../LibLsp/lsp/textDocument/signature_help.h | 92 + .../LibLsp/lsp/textDocument/typeHierarchy.h | 133 + .../LibLsp/lsp/textDocument/type_definition.h | 16 + .../include/LibLsp/lsp/textDocument/willSave.h | 71 + .../asymptote/LspCpp/include/LibLsp/lsp/utils.h | 141 + .../include/LibLsp/lsp/windows/MessageNotify.h | 83 + .../LspCpp/include/LibLsp/lsp/working_files.h | 72 + .../include/LibLsp/lsp/workspace/applyEdit.h | 42 + .../include/LibLsp/lsp/workspace/configuration.h | 37 + .../lsp/workspace/didChangeWorkspaceFolders.h | 48 + .../lsp/workspace/did_change_configuration.h | 25 + .../lsp/workspace/did_change_watched_files.h | 46 + .../include/LibLsp/lsp/workspace/execute_command.h | 24 + .../LspCpp/include/LibLsp/lsp/workspace/symbol.h | 16 + .../LibLsp/lsp/workspace/workspaceFolders.h | 34 + graphics/asymptote/LspCpp/include/optional.hpp | 1846 ++ graphics/asymptote/LspCpp/macro_map.h | 134 - graphics/asymptote/LspCpp/network/optional.hpp | 711 - graphics/asymptote/LspCpp/network/string_view.hpp | 273 - graphics/asymptote/LspCpp/network/uri.hpp | 38 - graphics/asymptote/LspCpp/network/uri/config.hpp | 20 - .../LspCpp/network/uri/detail/algorithm.hpp | 73 - .../asymptote/LspCpp/network/uri/detail/decode.hpp | 78 - .../asymptote/LspCpp/network/uri/detail/encode.hpp | 169 - .../LspCpp/network/uri/detail/grammar.hpp | 130 - .../LspCpp/network/uri/detail/translate.hpp | 89 - .../network/uri/detail/uri_advance_parts.cpp | 76 - .../network/uri/detail/uri_advance_parts.hpp | 21 - .../LspCpp/network/uri/detail/uri_normalize.cpp | 87 - .../LspCpp/network/uri/detail/uri_normalize.hpp | 20 - .../LspCpp/network/uri/detail/uri_parse.cpp | 424 - .../LspCpp/network/uri/detail/uri_parse.hpp | 19 - .../network/uri/detail/uri_parse_authority.cpp | 130 - .../network/uri/detail/uri_parse_authority.hpp | 21 - .../LspCpp/network/uri/detail/uri_parts.hpp | 88 - .../network/uri/detail/uri_percent_encode.hpp | 80 - .../LspCpp/network/uri/detail/uri_resolve.cpp | 91 - .../LspCpp/network/uri/detail/uri_resolve.hpp | 22 - graphics/asymptote/LspCpp/network/uri/uri.cpp | 701 - graphics/asymptote/LspCpp/network/uri/uri.hpp | 758 - .../asymptote/LspCpp/network/uri/uri_builder.cpp | 152 - .../asymptote/LspCpp/network/uri/uri_builder.hpp | 277 - .../asymptote/LspCpp/network/uri/uri_errors.cpp | 72 - .../asymptote/LspCpp/network/uri/uri_errors.hpp | 122 - graphics/asymptote/LspCpp/network/uri/uri_io.hpp | 62 - graphics/asymptote/LspCpp/packages.config | 14 - graphics/asymptote/LspCpp/src/jsonrpc/Context.cpp | 35 + graphics/asymptote/LspCpp/src/jsonrpc/Endpoint.cpp | 46 + .../LspCpp/src/jsonrpc/GCThreadContext.cpp | 17 + .../LspCpp/src/jsonrpc/MessageJsonHandler.cpp | 57 + .../LspCpp/src/jsonrpc/RemoteEndPoint.cpp | 612 + .../LspCpp/src/jsonrpc/StreamMessageProducer.cpp | 191 + .../asymptote/LspCpp/src/jsonrpc/TcpServer.cpp | 296 + .../LspCpp/src/jsonrpc/WebSocketServer.cpp | 337 + graphics/asymptote/LspCpp/src/jsonrpc/message.cpp | 88 + graphics/asymptote/LspCpp/src/jsonrpc/optional.hpp | 1846 ++ .../asymptote/LspCpp/src/jsonrpc/serializer.cpp | 214 + .../LspCpp/src/jsonrpc/threaded_queue.cpp | 20 + graphics/asymptote/LspCpp/src/lsp/Markup.cpp | 942 + .../LspCpp/src/lsp/ParentProcessWatcher.cpp | 106 + .../LspCpp/src/lsp/ProtocolJsonHandler.cpp | 716 + graphics/asymptote/LspCpp/src/lsp/initialize.cpp | 45 + graphics/asymptote/LspCpp/src/lsp/lsp.cpp | 1089 + .../asymptote/LspCpp/src/lsp/lsp_diagnostic.cpp | 75 + graphics/asymptote/LspCpp/src/lsp/textDocument.cpp | 349 + graphics/asymptote/LspCpp/src/lsp/utils.cpp | 611 + .../asymptote/LspCpp/src/lsp/working_files.cpp | 186 + .../LspCpp/third_party/rapidjson/CHANGELOG.md | 158 + .../LspCpp/third_party/rapidjson/CMakeLists.txt | 250 + .../rapidjson/CMakeModules/FindGTestSrc.cmake | 30 + .../LspCpp/third_party/rapidjson/RapidJSON.pc.in | 7 + .../third_party/rapidjson/RapidJSONConfig.cmake.in | 25 + .../rapidjson/RapidJSONConfigVersion.cmake.in | 10 + .../LspCpp/third_party/rapidjson/appveyor.yml | 102 + .../third_party/rapidjson/bin/data/abcde.txt | 1 + .../third_party/rapidjson/bin/data/glossary.json | 22 + .../third_party/rapidjson/bin/data/menu.json | 27 + .../third_party/rapidjson/bin/data/readme.txt | 1 + .../third_party/rapidjson/bin/data/sample.json | 3315 +++ .../third_party/rapidjson/bin/data/webapp.json | 88 + .../third_party/rapidjson/bin/data/widget.json | 26 + .../third_party/rapidjson/bin/draft-04/schema | 150 + .../rapidjson/bin/encodings/utf16be.json | Bin 0 -> 368 bytes .../rapidjson/bin/encodings/utf16bebom.json | Bin 0 -> 370 bytes .../rapidjson/bin/encodings/utf16le.json | Bin 0 -> 368 bytes .../rapidjson/bin/encodings/utf16lebom.json | Bin 0 -> 370 bytes .../rapidjson/bin/encodings/utf32be.json | Bin 0 -> 736 bytes .../rapidjson/bin/encodings/utf32bebom.json | Bin 0 -> 740 bytes .../rapidjson/bin/encodings/utf32le.json | Bin 0 -> 736 bytes .../rapidjson/bin/encodings/utf32lebom.json | Bin 0 -> 740 bytes .../third_party/rapidjson/bin/encodings/utf8.json | 7 + .../rapidjson/bin/encodings/utf8bom.json | 7 + .../rapidjson/bin/jsonchecker/fail1.json | 1 + .../rapidjson/bin/jsonchecker/fail10.json | 1 + .../rapidjson/bin/jsonchecker/fail11.json | 1 + .../rapidjson/bin/jsonchecker/fail12.json | 1 + .../rapidjson/bin/jsonchecker/fail13.json | 1 + .../rapidjson/bin/jsonchecker/fail14.json | 1 + .../rapidjson/bin/jsonchecker/fail15.json | 1 + .../rapidjson/bin/jsonchecker/fail16.json | 1 + .../rapidjson/bin/jsonchecker/fail17.json | 1 + .../rapidjson/bin/jsonchecker/fail18.json | 1 + .../rapidjson/bin/jsonchecker/fail19.json | 1 + .../rapidjson/bin/jsonchecker/fail2.json | 1 + .../rapidjson/bin/jsonchecker/fail20.json | 1 + .../rapidjson/bin/jsonchecker/fail21.json | 1 + .../rapidjson/bin/jsonchecker/fail22.json | 1 + .../rapidjson/bin/jsonchecker/fail23.json | 1 + .../rapidjson/bin/jsonchecker/fail24.json | 1 + .../rapidjson/bin/jsonchecker/fail25.json | 1 + .../rapidjson/bin/jsonchecker/fail26.json | 1 + .../rapidjson/bin/jsonchecker/fail27.json | 2 + .../rapidjson/bin/jsonchecker/fail28.json | 2 + .../rapidjson/bin/jsonchecker/fail29.json | 1 + .../rapidjson/bin/jsonchecker/fail3.json | 1 + .../rapidjson/bin/jsonchecker/fail30.json | 1 + .../rapidjson/bin/jsonchecker/fail31.json | 1 + .../rapidjson/bin/jsonchecker/fail32.json | 1 + .../rapidjson/bin/jsonchecker/fail33.json | 1 + .../rapidjson/bin/jsonchecker/fail4.json | 1 + .../rapidjson/bin/jsonchecker/fail5.json | 1 + .../rapidjson/bin/jsonchecker/fail6.json | 1 + .../rapidjson/bin/jsonchecker/fail7.json | 1 + .../rapidjson/bin/jsonchecker/fail8.json | 1 + .../rapidjson/bin/jsonchecker/fail9.json | 1 + .../rapidjson/bin/jsonchecker/pass1.json | 58 + .../rapidjson/bin/jsonchecker/pass2.json | 1 + .../rapidjson/bin/jsonchecker/pass3.json | 6 + .../rapidjson/bin/jsonchecker/readme.txt | 3 + .../third_party/rapidjson/bin/jsonschema/LICENSE | 19 + .../third_party/rapidjson/bin/jsonschema/README.md | 148 + .../rapidjson/bin/jsonschema/bin/jsonschema_suite | 283 + .../jsonschema/remotes/folder/folderInteger.json | 3 + .../rapidjson/bin/jsonschema/remotes/integer.json | 3 + .../bin/jsonschema/remotes/subSchemas.json | 8 + .../jsonschema/tests/draft3/additionalItems.json | 82 + .../tests/draft3/additionalProperties.json | 88 + .../bin/jsonschema/tests/draft3/default.json | 49 + .../bin/jsonschema/tests/draft3/dependencies.json | 108 + .../bin/jsonschema/tests/draft3/disallow.json | 80 + .../bin/jsonschema/tests/draft3/divisibleBy.json | 60 + .../bin/jsonschema/tests/draft3/enum.json | 71 + .../bin/jsonschema/tests/draft3/extends.json | 94 + .../bin/jsonschema/tests/draft3/items.json | 46 + .../bin/jsonschema/tests/draft3/maxItems.json | 28 + .../bin/jsonschema/tests/draft3/maxLength.json | 33 + .../bin/jsonschema/tests/draft3/maximum.json | 42 + .../bin/jsonschema/tests/draft3/minItems.json | 28 + .../bin/jsonschema/tests/draft3/minLength.json | 33 + .../bin/jsonschema/tests/draft3/minimum.json | 42 + .../jsonschema/tests/draft3/optional/bignum.json | 107 + .../jsonschema/tests/draft3/optional/format.json | 222 + .../jsonschema/tests/draft3/optional/jsregex.json | 18 + .../draft3/optional/zeroTerminatedFloats.json | 15 + .../bin/jsonschema/tests/draft3/pattern.json | 34 + .../jsonschema/tests/draft3/patternProperties.json | 110 + .../bin/jsonschema/tests/draft3/properties.json | 92 + .../rapidjson/bin/jsonschema/tests/draft3/ref.json | 159 + .../bin/jsonschema/tests/draft3/refRemote.json | 74 + .../bin/jsonschema/tests/draft3/required.json | 53 + .../bin/jsonschema/tests/draft3/type.json | 474 + .../bin/jsonschema/tests/draft3/uniqueItems.json | 79 + .../jsonschema/tests/draft4/additionalItems.json | 82 + .../tests/draft4/additionalProperties.json | 88 + .../bin/jsonschema/tests/draft4/allOf.json | 112 + .../bin/jsonschema/tests/draft4/anyOf.json | 68 + .../bin/jsonschema/tests/draft4/default.json | 49 + .../bin/jsonschema/tests/draft4/definitions.json | 32 + .../bin/jsonschema/tests/draft4/dependencies.json | 113 + .../bin/jsonschema/tests/draft4/enum.json | 72 + .../bin/jsonschema/tests/draft4/items.json | 46 + .../bin/jsonschema/tests/draft4/maxItems.json | 28 + .../bin/jsonschema/tests/draft4/maxLength.json | 33 + .../bin/jsonschema/tests/draft4/maxProperties.json | 28 + .../bin/jsonschema/tests/draft4/maximum.json | 42 + .../bin/jsonschema/tests/draft4/minItems.json | 28 + .../bin/jsonschema/tests/draft4/minLength.json | 33 + .../bin/jsonschema/tests/draft4/minProperties.json | 28 + .../bin/jsonschema/tests/draft4/minimum.json | 42 + .../bin/jsonschema/tests/draft4/multipleOf.json | 60 + .../rapidjson/bin/jsonschema/tests/draft4/not.json | 96 + .../bin/jsonschema/tests/draft4/oneOf.json | 68 + .../jsonschema/tests/draft4/optional/bignum.json | 107 + .../jsonschema/tests/draft4/optional/format.json | 148 + .../draft4/optional/zeroTerminatedFloats.json | 15 + .../bin/jsonschema/tests/draft4/pattern.json | 34 + .../jsonschema/tests/draft4/patternProperties.json | 110 + .../bin/jsonschema/tests/draft4/properties.json | 92 + .../rapidjson/bin/jsonschema/tests/draft4/ref.json | 159 + .../bin/jsonschema/tests/draft4/refRemote.json | 74 + .../bin/jsonschema/tests/draft4/required.json | 39 + .../bin/jsonschema/tests/draft4/type.json | 330 + .../bin/jsonschema/tests/draft4/uniqueItems.json | 79 + .../third_party/rapidjson/bin/jsonschema/tox.ini | 8 + .../rapidjson/bin/types/alotofkeys.json | 502 + .../third_party/rapidjson/bin/types/booleans.json | 102 + .../third_party/rapidjson/bin/types/floats.json | 102 + .../third_party/rapidjson/bin/types/guids.json | 102 + .../third_party/rapidjson/bin/types/integers.json | 102 + .../third_party/rapidjson/bin/types/mixed.json | 592 + .../third_party/rapidjson/bin/types/nulls.json | 102 + .../rapidjson/bin/types/paragraphs.json | 102 + .../third_party/rapidjson/bin/types/readme.txt | 1 + .../rapidjson/bin/unittestschema/address.json | 139 + .../bin/unittestschema/allOf_address.json | 7 + .../bin/unittestschema/anyOf_address.json | 7 + .../rapidjson/bin/unittestschema/idandref.json | 69 + .../bin/unittestschema/oneOf_address.json | 7 + .../third_party/rapidjson/contrib/natvis/LICENSE | 45 + .../third_party/rapidjson/contrib/natvis/README.md | 7 + .../rapidjson/contrib/natvis/rapidjson.natvis | 38 + .../third_party/rapidjson/doc/CMakeLists.txt | 27 + .../LspCpp/third_party/rapidjson/doc/Doxyfile.in | 2369 +++ .../third_party/rapidjson/doc/Doxyfile.zh-cn.in | 2369 +++ .../rapidjson/doc/diagram/architecture.dot | 50 + .../rapidjson/doc/diagram/architecture.png | Bin 0 -> 16569 bytes .../rapidjson/doc/diagram/insituparsing.dot | 65 + .../rapidjson/doc/diagram/insituparsing.png | Bin 0 -> 37281 bytes .../diagram/iterative-parser-states-diagram.dot | 62 + .../diagram/iterative-parser-states-diagram.png | Bin 0 -> 92378 bytes .../third_party/rapidjson/doc/diagram/makefile | 8 + .../third_party/rapidjson/doc/diagram/move1.dot | 47 + .../third_party/rapidjson/doc/diagram/move1.png | Bin 0 -> 16081 bytes .../third_party/rapidjson/doc/diagram/move2.dot | 62 + .../third_party/rapidjson/doc/diagram/move2.png | Bin 0 -> 41517 bytes .../third_party/rapidjson/doc/diagram/move3.dot | 60 + .../third_party/rapidjson/doc/diagram/move3.png | Bin 0 -> 36371 bytes .../rapidjson/doc/diagram/normalparsing.dot | 56 + .../rapidjson/doc/diagram/normalparsing.png | Bin 0 -> 32887 bytes .../rapidjson/doc/diagram/simpledom.dot | 54 + .../rapidjson/doc/diagram/simpledom.png | Bin 0 -> 43670 bytes .../third_party/rapidjson/doc/diagram/tutorial.dot | 58 + .../third_party/rapidjson/doc/diagram/tutorial.png | Bin 0 -> 44634 bytes .../rapidjson/doc/diagram/utilityclass.dot | 73 + .../rapidjson/doc/diagram/utilityclass.png | Bin 0 -> 99993 bytes .../LspCpp/third_party/rapidjson/doc/dom.md | 281 + .../LspCpp/third_party/rapidjson/doc/dom.zh-cn.md | 285 + .../LspCpp/third_party/rapidjson/doc/encoding.md | 146 + .../third_party/rapidjson/doc/encoding.zh-cn.md | 152 + .../LspCpp/third_party/rapidjson/doc/faq.md | 289 + .../LspCpp/third_party/rapidjson/doc/faq.zh-cn.md | 290 + .../LspCpp/third_party/rapidjson/doc/features.md | 104 + .../third_party/rapidjson/doc/features.zh-cn.md | 103 + .../LspCpp/third_party/rapidjson/doc/internals.md | 368 + .../third_party/rapidjson/doc/internals.zh-cn.md | 363 + .../third_party/rapidjson/doc/logo/rapidjson.png | Bin 0 -> 5259 bytes .../third_party/rapidjson/doc/logo/rapidjson.svg | 119 + .../rapidjson/doc/misc/DoxygenLayout.xml | 194 + .../rapidjson/doc/misc/doxygenextra.css | 274 + .../third_party/rapidjson/doc/misc/footer.html | 11 + .../third_party/rapidjson/doc/misc/header.html | 24 + .../LspCpp/third_party/rapidjson/doc/npm.md | 31 + .../third_party/rapidjson/doc/performance.md | 26 + .../third_party/rapidjson/doc/performance.zh-cn.md | 26 + .../LspCpp/third_party/rapidjson/doc/pointer.md | 234 + .../third_party/rapidjson/doc/pointer.zh-cn.md | 234 + .../LspCpp/third_party/rapidjson/doc/sax.md | 509 + .../LspCpp/third_party/rapidjson/doc/sax.zh-cn.md | 487 + .../LspCpp/third_party/rapidjson/doc/schema.md | 505 + .../third_party/rapidjson/doc/schema.zh-cn.md | 237 + .../LspCpp/third_party/rapidjson/doc/stream.md | 429 + .../third_party/rapidjson/doc/stream.zh-cn.md | 429 + .../LspCpp/third_party/rapidjson/doc/tutorial.md | 536 + .../third_party/rapidjson/doc/tutorial.zh-cn.md | 535 + .../third_party/rapidjson/docker/debian/Dockerfile | 8 + .../third_party/rapidjson/example/CMakeLists.txt | 46 + .../rapidjson/example/archiver/archiver.cpp | 292 + .../rapidjson/example/archiver/archiver.h | 145 + .../rapidjson/example/archiver/archivertest.cpp | 287 + .../rapidjson/example/capitalize/capitalize.cpp | 67 + .../rapidjson/example/condense/condense.cpp | 32 + .../rapidjson/example/filterkey/filterkey.cpp | 135 + .../example/filterkeydom/filterkeydom.cpp | 170 + .../third_party/rapidjson/example/jsonx/jsonx.cpp | 207 + .../example/lookaheadparser/lookaheadparser.cpp | 350 + .../example/messagereader/messagereader.cpp | 105 + .../example/parsebyparts/parsebyparts.cpp | 176 + .../rapidjson/example/pretty/pretty.cpp | 30 + .../rapidjson/example/prettyauto/prettyauto.cpp | 56 + .../example/schemavalidator/schemavalidator.cpp | 198 + .../rapidjson/example/serialize/serialize.cpp | 173 + .../rapidjson/example/simpledom/simpledom.cpp | 29 + .../example/simplepullreader/simplepullreader.cpp | 53 + .../example/simplereader/simplereader.cpp | 42 + .../example/simplewriter/simplewriter.cpp | 36 + .../rapidjson/example/sortkeys/sortkeys.cpp | 62 + .../rapidjson/example/traverseaspointer.cpp | 39 + .../rapidjson/example/tutorial/tutorial.cpp | 151 + .../rapidjson/include/rapidjson/allocators.h | 692 + .../include/rapidjson/cursorstreamwrapper.h | 78 + .../rapidjson/include/rapidjson/document.h | 3027 +++ .../rapidjson/include/rapidjson/encodedstream.h | 299 + .../rapidjson/include/rapidjson/encodings.h | 716 + .../rapidjson/include/rapidjson/error/en.h | 122 + .../rapidjson/include/rapidjson/error/error.h | 216 + .../rapidjson/include/rapidjson/filereadstream.h | 99 + .../rapidjson/include/rapidjson/filewritestream.h | 104 + .../third_party/rapidjson/include/rapidjson/fwd.h | 151 + .../include/rapidjson/internal/biginteger.h | 297 + .../rapidjson/include/rapidjson/internal/clzll.h | 71 + .../rapidjson/include/rapidjson/internal/diyfp.h | 261 + .../rapidjson/include/rapidjson/internal/dtoa.h | 249 + .../rapidjson/include/rapidjson/internal/ieee754.h | 78 + .../rapidjson/include/rapidjson/internal/itoa.h | 308 + .../rapidjson/include/rapidjson/internal/meta.h | 186 + .../rapidjson/include/rapidjson/internal/pow10.h | 55 + .../rapidjson/include/rapidjson/internal/regex.h | 739 + .../rapidjson/include/rapidjson/internal/stack.h | 232 + .../rapidjson/include/rapidjson/internal/strfunc.h | 83 + .../rapidjson/include/rapidjson/internal/strtod.h | 293 + .../rapidjson/include/rapidjson/internal/swap.h | 46 + .../rapidjson/include/rapidjson/istreamwrapper.h | 128 + .../rapidjson/include/rapidjson/memorybuffer.h | 70 + .../rapidjson/include/rapidjson/memorystream.h | 71 + .../include/rapidjson/msinttypes/inttypes.h | 316 + .../include/rapidjson/msinttypes/stdint.h | 300 + .../rapidjson/include/rapidjson/ostreamwrapper.h | 81 + .../rapidjson/include/rapidjson/pointer.h | 1482 ++ .../rapidjson/include/rapidjson/prettywriter.h | 277 + .../rapidjson/include/rapidjson/rapidjson.h | 741 + .../rapidjson/include/rapidjson/reader.h | 2246 ++ .../rapidjson/include/rapidjson/schema.h | 2795 +++ .../rapidjson/include/rapidjson/stream.h | 223 + .../rapidjson/include/rapidjson/stringbuffer.h | 121 + .../third_party/rapidjson/include/rapidjson/uri.h | 481 + .../rapidjson/include/rapidjson/writer.h | 710 + .../LspCpp/third_party/rapidjson/include_dirs.js | 2 + .../LspCpp/third_party/rapidjson/library.json | 15 + .../LspCpp/third_party/rapidjson/license.txt | 57 + .../LspCpp/third_party/rapidjson/package.json | 24 + .../LspCpp/third_party/rapidjson/rapidjson.autopkg | 77 + .../LspCpp/third_party/rapidjson/readme.md | 210 + .../LspCpp/third_party/rapidjson/readme.zh-cn.md | 152 + .../third_party/rapidjson/test/CMakeLists.txt | 20 + .../rapidjson/test/perftest/CMakeLists.txt | 28 + .../rapidjson/test/perftest/misctest.cpp | 974 + .../rapidjson/test/perftest/perftest.cpp | 24 + .../third_party/rapidjson/test/perftest/perftest.h | 186 + .../rapidjson/test/perftest/platformtest.cpp | 166 + .../rapidjson/test/perftest/rapidjsontest.cpp | 564 + .../rapidjson/test/perftest/schematest.cpp | 223 + .../rapidjson/test/unittest/CMakeLists.txt | 95 + .../rapidjson/test/unittest/allocatorstest.cpp | 292 + .../rapidjson/test/unittest/bigintegertest.cpp | 138 + .../rapidjson/test/unittest/clzlltest.cpp | 34 + .../test/unittest/cursorstreamwrappertest.cpp | 115 + .../rapidjson/test/unittest/documenttest.cpp | 674 + .../rapidjson/test/unittest/dtoatest.cpp | 99 + .../rapidjson/test/unittest/encodedstreamtest.cpp | 313 + .../rapidjson/test/unittest/encodingstest.cpp | 451 + .../rapidjson/test/unittest/filestreamtest.cpp | 155 + .../rapidjson/test/unittest/fwdtest.cpp | 230 + .../rapidjson/test/unittest/istreamwrappertest.cpp | 181 + .../rapidjson/test/unittest/itoatest.cpp | 160 + .../rapidjson/test/unittest/jsoncheckertest.cpp | 143 + .../rapidjson/test/unittest/namespacetest.cpp | 70 + .../rapidjson/test/unittest/ostreamwrappertest.cpp | 92 + .../rapidjson/test/unittest/platformtest.cpp | 40 + .../rapidjson/test/unittest/pointertest.cpp | 1730 ++ .../rapidjson/test/unittest/prettywritertest.cpp | 373 + .../rapidjson/test/unittest/readertest.cpp | 2370 +++ .../rapidjson/test/unittest/regextest.cpp | 639 + .../rapidjson/test/unittest/schematest.cpp | 2952 +++ .../rapidjson/test/unittest/simdtest.cpp | 219 + .../rapidjson/test/unittest/strfunctest.cpp | 30 + .../rapidjson/test/unittest/stringbuffertest.cpp | 192 + .../rapidjson/test/unittest/strtodtest.cpp | 132 + .../rapidjson/test/unittest/unittest.cpp | 51 + .../third_party/rapidjson/test/unittest/unittest.h | 143 + .../rapidjson/test/unittest/uritest.cpp | 718 + .../rapidjson/test/unittest/valuetest.cpp | 1861 ++ .../rapidjson/test/unittest/writertest.cpp | 598 + .../third_party/rapidjson/test/valgrind.supp | 17 + .../LspCpp/third_party/rapidjson/travis-doxygen.sh | 128 + .../asymptote/LspCpp/third_party/uri/CHANGELOG.md | 42 + .../uri/CMakeFiles/CMakeDirectoryInformation.cmake | 16 + .../uri/CMakeFiles/doc.dir/DependInfo.cmake | 18 + .../third_party/uri/CMakeFiles/doc.dir/build.make | 91 + .../uri/CMakeFiles/doc.dir/cmake_clean.cmake | 8 + .../uri/CMakeFiles/doc.dir/compiler_depend.make | 2 + .../uri/CMakeFiles/doc.dir/compiler_depend.ts | 2 + .../uri/CMakeFiles/doc.dir/progress.make | 2 + .../third_party/uri/CMakeFiles/progress.marks | 1 + .../LspCpp/third_party/uri/CMakeLists.txt | 105 + graphics/asymptote/LspCpp/third_party/uri/Doxyfile | 1742 ++ .../asymptote/LspCpp/third_party/uri/Doxyfile.in | 1742 ++ .../LspCpp/third_party/uri/LICENSE_1_0.txt | 23 + graphics/asymptote/LspCpp/third_party/uri/Makefile | 207 + .../asymptote/LspCpp/third_party/uri/README.rst | 82 + .../LspCpp/third_party/uri/cmake_install.cmake | 54 + .../LspCpp/third_party/uri/deps/BUILD.bazel | 207 + .../LspCpp/third_party/uri/deps/CMakeLists.txt | 30 + .../LspCpp/third_party/uri/deps/CONTRIBUTING.md | 131 + .../LspCpp/third_party/uri/deps/CONTRIBUTORS | 64 + .../asymptote/LspCpp/third_party/uri/deps/LICENSE | 28 + .../LspCpp/third_party/uri/deps/README.md | 140 + .../LspCpp/third_party/uri/deps/WORKSPACE | 17 + .../third_party/uri/deps/ci/linux-presubmit.sh | 126 + .../third_party/uri/deps/ci/macos-presubmit.sh | 73 + .../LspCpp/third_party/uri/deps/docs/_config.yml | 1 + .../third_party/uri/deps/docs/_data/navigation.yml | 43 + .../uri/deps/docs/_layouts/default.html | 58 + .../third_party/uri/deps/docs/_sass/main.scss | 200 + .../LspCpp/third_party/uri/deps/docs/advanced.md | 2379 +++ .../deps/docs/community_created_documentation.md | 7 + .../LspCpp/third_party/uri/deps/docs/faq.md | 692 + .../third_party/uri/deps/docs/gmock_cheat_sheet.md | 241 + .../third_party/uri/deps/docs/gmock_cook_book.md | 4299 ++++ .../LspCpp/third_party/uri/deps/docs/gmock_faq.md | 390 + .../third_party/uri/deps/docs/gmock_for_dummies.md | 700 + .../LspCpp/third_party/uri/deps/docs/index.md | 22 + .../LspCpp/third_party/uri/deps/docs/pkgconfig.md | 148 + .../LspCpp/third_party/uri/deps/docs/platforms.md | 35 + .../LspCpp/third_party/uri/deps/docs/primer.md | 482 + .../third_party/uri/deps/docs/quickstart-bazel.md | 147 + .../third_party/uri/deps/docs/quickstart-cmake.md | 156 + .../third_party/uri/deps/docs/reference/actions.md | 115 + .../uri/deps/docs/reference/assertions.md | 633 + .../uri/deps/docs/reference/matchers.md | 285 + .../third_party/uri/deps/docs/reference/mocking.md | 587 + .../third_party/uri/deps/docs/reference/testing.md | 1431 ++ .../LspCpp/third_party/uri/deps/docs/samples.md | 22 + .../third_party/uri/deps/googlemock/CMakeLists.txt | 214 + .../third_party/uri/deps/googlemock/README.md | 40 + .../uri/deps/googlemock/cmake/gmock.pc.in | 10 + .../uri/deps/googlemock/cmake/gmock_main.pc.in | 10 + .../third_party/uri/deps/googlemock/docs/README.md | 4 + .../deps/googlemock/include/gmock/gmock-actions.h | 1687 ++ .../googlemock/include/gmock/gmock-cardinalities.h | 157 + .../include/gmock/gmock-function-mocker.h | 514 + .../deps/googlemock/include/gmock/gmock-matchers.h | 5572 +++++ .../googlemock/include/gmock/gmock-more-actions.h | 573 + .../googlemock/include/gmock/gmock-more-matchers.h | 92 + .../googlemock/include/gmock/gmock-nice-strict.h | 261 + .../googlemock/include/gmock/gmock-spec-builders.h | 2038 ++ .../uri/deps/googlemock/include/gmock/gmock.h | 96 + .../include/gmock/internal/custom/README.md | 18 + .../internal/custom/gmock-generated-actions.h | 7 + .../include/gmock/internal/custom/gmock-matchers.h | 37 + .../include/gmock/internal/custom/gmock-port.h | 40 + .../include/gmock/internal/gmock-internal-utils.h | 472 + .../googlemock/include/gmock/internal/gmock-port.h | 105 + .../googlemock/include/gmock/internal/gmock-pp.h | 279 + .../uri/deps/googlemock/src/gmock-all.cc | 46 + .../uri/deps/googlemock/src/gmock-cardinalities.cc | 155 + .../deps/googlemock/src/gmock-internal-utils.cc | 256 + .../uri/deps/googlemock/src/gmock-matchers.cc | 463 + .../uri/deps/googlemock/src/gmock-spec-builders.cc | 908 + .../third_party/uri/deps/googlemock/src/gmock.cc | 223 + .../uri/deps/googlemock/src/gmock_main.cc | 72 + .../uri/deps/googlemock/test/BUILD.bazel | 118 + .../uri/deps/googlemock/test/gmock-actions_test.cc | 1583 ++ .../googlemock/test/gmock-cardinalities_test.cc | 429 + .../googlemock/test/gmock-function-mocker_test.cc | 986 + .../googlemock/test/gmock-internal-utils_test.cc | 766 + .../deps/googlemock/test/gmock-matchers_test.cc | 8692 ++++++++ .../googlemock/test/gmock-more-actions_test.cc | 1547 ++ .../deps/googlemock/test/gmock-nice-strict_test.cc | 538 + .../uri/deps/googlemock/test/gmock-port_test.cc | 42 + .../deps/googlemock/test/gmock-pp-string_test.cc | 206 + .../uri/deps/googlemock/test/gmock-pp_test.cc | 83 + .../googlemock/test/gmock-spec-builders_test.cc | 2774 +++ .../uri/deps/googlemock/test/gmock_all_test.cc | 46 + .../uri/deps/googlemock/test/gmock_ex_test.cc | 80 + .../uri/deps/googlemock/test/gmock_leak_test.py | 104 + .../uri/deps/googlemock/test/gmock_leak_test_.cc | 99 + .../uri/deps/googlemock/test/gmock_link2_test.cc | 39 + .../uri/deps/googlemock/test/gmock_link_test.cc | 39 + .../uri/deps/googlemock/test/gmock_link_test.h | 690 + .../uri/deps/googlemock/test/gmock_output_test.py | 183 + .../uri/deps/googlemock/test/gmock_output_test_.cc | 309 + .../googlemock/test/gmock_output_test_golden.txt | 317 + .../uri/deps/googlemock/test/gmock_stress_test.cc | 240 + .../uri/deps/googlemock/test/gmock_test.cc | 179 + .../uri/deps/googlemock/test/gmock_test_utils.py | 96 + .../third_party/uri/deps/googletest/CMakeLists.txt | 321 + .../third_party/uri/deps/googletest/README.md | 217 + .../uri/deps/googletest/cmake/Config.cmake.in | 9 + .../uri/deps/googletest/cmake/gtest.pc.in | 9 + .../uri/deps/googletest/cmake/gtest_main.pc.in | 10 + .../uri/deps/googletest/cmake/internal_utils.cmake | 346 + .../uri/deps/googletest/cmake/libgtest.la.in | 21 + .../third_party/uri/deps/googletest/docs/README.md | 4 + .../include/gtest/gtest-assertion-result.h | 232 + .../googletest/include/gtest/gtest-death-test.h | 346 + .../deps/googletest/include/gtest/gtest-matchers.h | 934 + .../deps/googletest/include/gtest/gtest-message.h | 220 + .../googletest/include/gtest/gtest-param-test.h | 510 + .../deps/googletest/include/gtest/gtest-printers.h | 1050 + .../uri/deps/googletest/include/gtest/gtest-spi.h | 235 + .../googletest/include/gtest/gtest-test-part.h | 186 + .../googletest/include/gtest/gtest-typed-test.h | 331 + .../uri/deps/googletest/include/gtest/gtest.h | 2316 +++ .../googletest/include/gtest/gtest_pred_impl.h | 364 + .../uri/deps/googletest/include/gtest/gtest_prod.h | 60 + .../include/gtest/internal/custom/README.md | 58 + .../include/gtest/internal/custom/gtest-port.h | 37 + .../include/gtest/internal/custom/gtest-printers.h | 42 + .../include/gtest/internal/custom/gtest.h | 37 + .../gtest/internal/gtest-death-test-internal.h | 305 + .../include/gtest/internal/gtest-filepath.h | 213 + .../include/gtest/internal/gtest-internal.h | 1562 ++ .../include/gtest/internal/gtest-param-util.h | 948 + .../include/gtest/internal/gtest-port-arch.h | 116 + .../googletest/include/gtest/internal/gtest-port.h | 2367 +++ .../include/gtest/internal/gtest-string.h | 177 + .../include/gtest/internal/gtest-type-util.h | 185 + .../uri/deps/googletest/samples/prime_tables.h | 126 + .../uri/deps/googletest/samples/sample1.cc | 66 + .../uri/deps/googletest/samples/sample1.h | 41 + .../deps/googletest/samples/sample10_unittest.cc | 139 + .../deps/googletest/samples/sample1_unittest.cc | 151 + .../uri/deps/googletest/samples/sample2.cc | 54 + .../uri/deps/googletest/samples/sample2.h | 80 + .../deps/googletest/samples/sample2_unittest.cc | 107 + .../uri/deps/googletest/samples/sample3-inl.h | 172 + .../deps/googletest/samples/sample3_unittest.cc | 149 + .../uri/deps/googletest/samples/sample4.cc | 54 + .../uri/deps/googletest/samples/sample4.h | 53 + .../deps/googletest/samples/sample4_unittest.cc | 53 + .../deps/googletest/samples/sample5_unittest.cc | 196 + .../deps/googletest/samples/sample6_unittest.cc | 217 + .../deps/googletest/samples/sample7_unittest.cc | 117 + .../deps/googletest/samples/sample8_unittest.cc | 154 + .../deps/googletest/samples/sample9_unittest.cc | 156 + .../uri/deps/googletest/src/gtest-all.cc | 49 + .../deps/googletest/src/gtest-assertion-result.cc | 81 + .../uri/deps/googletest/src/gtest-death-test.cc | 1647 ++ .../uri/deps/googletest/src/gtest-filepath.cc | 369 + .../uri/deps/googletest/src/gtest-internal-inl.h | 1204 ++ .../uri/deps/googletest/src/gtest-matchers.cc | 97 + .../uri/deps/googletest/src/gtest-port.cc | 1413 ++ .../uri/deps/googletest/src/gtest-printers.cc | 578 + .../uri/deps/googletest/src/gtest-test-part.cc | 108 + .../uri/deps/googletest/src/gtest-typed-test.cc | 107 + .../third_party/uri/deps/googletest/src/gtest.cc | 6824 +++++++ .../uri/deps/googletest/src/gtest_main.cc | 54 + .../uri/deps/googletest/test/BUILD.bazel | 590 + .../test/googletest-break-on-failure-unittest.py | 208 + .../test/googletest-break-on-failure-unittest_.cc | 86 + .../test/googletest-catch-exceptions-test.py | 236 + .../test/googletest-catch-exceptions-test_.cc | 293 + .../deps/googletest/test/googletest-color-test.py | 127 + .../deps/googletest/test/googletest-color-test_.cc | 62 + .../googletest/test/googletest-death-test-test.cc | 1528 ++ .../test/googletest-death-test_ex_test.cc | 92 + .../googletest/test/googletest-env-var-test.py | 120 + .../googletest/test/googletest-env-var-test_.cc | 132 + .../test/googletest-failfast-unittest.py | 410 + .../test/googletest-failfast-unittest_.cc | 167 + .../googletest/test/googletest-filepath-test.cc | 649 + .../googletest/test/googletest-filter-unittest.py | 639 + .../googletest/test/googletest-filter-unittest_.cc | 137 + .../test/googletest-global-environment-unittest.py | 128 + .../googletest-global-environment-unittest_.cc | 58 + .../test/googletest-json-outfiles-test.py | 191 + .../test/googletest-json-output-unittest.py | 848 + .../test/googletest-list-tests-unittest.py | 205 + .../test/googletest-list-tests-unittest_.cc | 156 + .../googletest/test/googletest-listener-test.cc | 518 + .../googletest/test/googletest-message-test.cc | 158 + .../googletest/test/googletest-options-test.cc | 219 + .../test/googletest-output-test-golden-lin.txt | 1196 ++ .../deps/googletest/test/googletest-output-test.py | 346 + .../googletest/test/googletest-output-test_.cc | 1116 + .../googletest-param-test-invalid-name1-test.py | 63 + .../googletest-param-test-invalid-name1-test_.cc | 50 + .../googletest-param-test-invalid-name2-test.py | 62 + .../googletest-param-test-invalid-name2-test_.cc | 55 + .../googletest/test/googletest-param-test-test.cc | 1119 + .../googletest/test/googletest-param-test-test.h | 51 + .../googletest/test/googletest-param-test2-test.cc | 61 + .../deps/googletest/test/googletest-port-test.cc | 1305 ++ .../googletest/test/googletest-printers-test.cc | 1991 ++ .../test/googletest-setuptestsuite-test.py | 54 + .../test/googletest-setuptestsuite-test_.cc | 49 + .../googletest/test/googletest-shuffle-test.py | 323 + .../googletest/test/googletest-shuffle-test_.cc | 101 + .../googletest/test/googletest-test-part-test.cc | 230 + .../test/googletest-throw-on-failure-test.py | 168 + .../test/googletest-throw-on-failure-test_.cc | 71 + .../test/googletest-uninitialized-test.py | 67 + .../test/googletest-uninitialized-test_.cc | 42 + .../deps/googletest/test/gtest-typed-test2_test.cc | 40 + .../deps/googletest/test/gtest-typed-test_test.cc | 437 + .../deps/googletest/test/gtest-typed-test_test.h | 60 + .../googletest/test/gtest-unittest-api_test.cc | 328 + .../uri/deps/googletest/test/gtest_all_test.cc | 46 + .../test/gtest_assert_by_exception_test.cc | 116 + .../deps/googletest/test/gtest_environment_test.cc | 184 + .../uri/deps/googletest/test/gtest_help_test.py | 173 + .../uri/deps/googletest/test/gtest_help_test_.cc | 45 + .../deps/googletest/test/gtest_json_test_utils.py | 60 + .../googletest/test/gtest_list_output_unittest.py | 286 + .../googletest/test/gtest_list_output_unittest_.cc | 77 + .../deps/googletest/test/gtest_main_unittest.cc | 44 + .../deps/googletest/test/gtest_no_test_unittest.cc | 54 + .../googletest/test/gtest_pred_impl_unittest.cc | 2422 +++ .../googletest/test/gtest_premature_exit_test.cc | 126 + .../uri/deps/googletest/test/gtest_prod_test.cc | 56 + .../uri/deps/googletest/test/gtest_repeat_test.cc | 221 + .../test/gtest_skip_check_output_test.py | 59 + .../gtest_skip_environment_check_output_test.py | 54 + .../test/gtest_skip_in_environment_setup_test.cc | 49 + .../uri/deps/googletest/test/gtest_skip_test.cc | 55 + .../deps/googletest/test/gtest_sole_header_test.cc | 56 + .../uri/deps/googletest/test/gtest_stress_test.cc | 248 + .../test/gtest_test_macro_stack_footprint_test.cc | 89 + .../uri/deps/googletest/test/gtest_test_utils.py | 255 + .../deps/googletest/test/gtest_testbridge_test.py | 63 + .../deps/googletest/test/gtest_testbridge_test_.cc | 43 + .../test/gtest_throw_on_failure_ex_test.cc | 90 + .../uri/deps/googletest/test/gtest_unittest.cc | 7833 +++++++ .../googletest/test/gtest_xml_outfile1_test_.cc | 43 + .../googletest/test/gtest_xml_outfile2_test_.cc | 43 + .../googletest/test/gtest_xml_outfiles_test.py | 135 + .../googletest/test/gtest_xml_output_unittest.py | 415 + .../googletest/test/gtest_xml_output_unittest_.cc | 193 + .../deps/googletest/test/gtest_xml_test_utils.py | 197 + .../uri/deps/googletest/test/production.cc | 35 + .../uri/deps/googletest/test/production.h | 54 + .../third_party/uri/include/network/optional.hpp | 703 + .../uri/include/network/string_view.hpp | 272 + .../LspCpp/third_party/uri/include/network/uri.hpp | 38 + .../third_party/uri/include/network/uri/config.hpp | 21 + .../uri/include/network/uri/detail/decode.hpp | 78 + .../uri/include/network/uri/detail/encode.hpp | 171 + .../uri/include/network/uri/detail/translate.hpp | 89 + .../uri/include/network/uri/detail/uri_parts.hpp | 88 + .../third_party/uri/include/network/uri/uri.hpp | 757 + .../uri/include/network/uri/uri_builder.hpp | 277 + .../uri/include/network/uri/uri_errors.hpp | 113 + .../third_party/uri/include/network/uri/uri_io.hpp | 62 + .../src/CMakeFiles/CMakeDirectoryInformation.cmake | 16 + .../CMakeFiles/network-uri.dir/DependInfo.cmake | 26 + .../uri/src/CMakeFiles/network-uri.dir/build.make | 226 + .../CMakeFiles/network-uri.dir/cmake_clean.cmake | 25 + .../network-uri.dir/cmake_clean_target.cmake | 3 + .../network-uri.dir/compiler_depend.internal | 1714 ++ .../network-uri.dir/compiler_depend.make | 2200 ++ .../CMakeFiles/network-uri.dir/compiler_depend.ts | 2 + .../uri/src/CMakeFiles/network-uri.dir/depend.make | 2 + .../uri/src/CMakeFiles/network-uri.dir/flags.make | 10 + .../uri/src/CMakeFiles/network-uri.dir/link.txt | 2 + .../src/CMakeFiles/network-uri.dir/progress.make | 10 + .../third_party/uri/src/CMakeFiles/progress.marks | 1 + .../LspCpp/third_party/uri/src/CMakeLists.txt | 32 + .../asymptote/LspCpp/third_party/uri/src/Makefile | 423 + .../LspCpp/third_party/uri/src/cmake_install.cmake | 48 + .../third_party/uri/src/detail/algorithm.hpp | 70 + .../third_party/uri/src/detail/algorithm_find.hpp | 79 + .../third_party/uri/src/detail/algorithm_split.hpp | 75 + .../LspCpp/third_party/uri/src/detail/grammar.hpp | 124 + .../uri/src/detail/uri_advance_parts.cpp | 78 + .../uri/src/detail/uri_advance_parts.hpp | 20 + .../third_party/uri/src/detail/uri_normalize.cpp | 74 + .../third_party/uri/src/detail/uri_normalize.hpp | 20 + .../third_party/uri/src/detail/uri_parse.cpp | 384 + .../third_party/uri/src/detail/uri_parse.hpp | 20 + .../uri/src/detail/uri_parse_authority.cpp | 116 + .../uri/src/detail/uri_parse_authority.hpp | 20 + .../uri/src/detail/uri_percent_encode.hpp | 80 + .../third_party/uri/src/detail/uri_resolve.cpp | 88 + .../third_party/uri/src/detail/uri_resolve.hpp | 22 + .../asymptote/LspCpp/third_party/uri/src/uri.cpp | 695 + .../LspCpp/third_party/uri/src/uri_builder.cpp | 151 + .../LspCpp/third_party/uri/src/uri_errors.cpp | 69 + .../LspCpp/third_party/uri/test/CMakeLists.txt | 39 + .../LspCpp/third_party/uri/test/invalid_urls.txt | 39 + .../LspCpp/third_party/uri/test/optional_test.cpp | 168 + .../LspCpp/third_party/uri/test/string_utility.hpp | 17 + .../LspCpp/third_party/uri/test/test_uri.hpp | 99 + .../third_party/uri/test/uri_builder_test.cpp | 855 + .../third_party/uri/test/uri_comparison_test.cpp | 88 + .../third_party/uri/test/uri_encoding_test.cpp | 147 + .../uri/test/uri_normalization_test.cpp | 212 + .../third_party/uri/test/uri_parse_path_test.cpp | 121 + .../third_party/uri/test/uri_parse_scheme_test.cpp | 79 + .../LspCpp/third_party/uri/test/uri_parse_test.cpp | 565 + .../third_party/uri/test/uri_reference_test.cpp | 68 + .../third_party/uri/test/uri_resolve_test.cpp | 307 + .../third_party/uri/test/uri_stream_test.cpp | 48 + .../LspCpp/third_party/uri/test/uri_test.cpp | 1071 + .../LspCpp/third_party/uri/test/valid_urls.txt | 36 + 1036 files changed, 251616 insertions(+), 28422 deletions(-) create mode 100644 graphics/asymptote/LspCpp/CMakeDoxyfile.in create mode 100644 graphics/asymptote/LspCpp/CMakeDoxygenDefaults.cmake create mode 100644 graphics/asymptote/LspCpp/CMakeFiles/3.20.5/CMakeCCompiler.cmake create mode 100644 graphics/asymptote/LspCpp/CMakeFiles/3.20.5/CMakeCXXCompiler.cmake create mode 100755 graphics/asymptote/LspCpp/CMakeFiles/3.20.5/CMakeDetermineCompilerABI_C.bin create mode 100755 graphics/asymptote/LspCpp/CMakeFiles/3.20.5/CMakeDetermineCompilerABI_CXX.bin create mode 100644 graphics/asymptote/LspCpp/CMakeFiles/3.20.5/CMakeSystem.cmake create mode 100644 graphics/asymptote/LspCpp/CMakeFiles/3.20.5/CompilerIdC/CMakeCCompilerId.c create mode 100755 graphics/asymptote/LspCpp/CMakeFiles/3.20.5/CompilerIdC/a.out create mode 100644 graphics/asymptote/LspCpp/CMakeFiles/3.20.5/CompilerIdCXX/CMakeCXXCompilerId.cpp create mode 100755 graphics/asymptote/LspCpp/CMakeFiles/3.20.5/CompilerIdCXX/a.out create mode 100644 graphics/asymptote/LspCpp/CMakeFiles/CMakeDirectoryInformation.cmake create mode 100644 graphics/asymptote/LspCpp/CMakeFiles/CMakeError.log create mode 100644 graphics/asymptote/LspCpp/CMakeFiles/CMakeOutput.log create mode 100644 graphics/asymptote/LspCpp/CMakeFiles/CMakeRuleHashes.txt create mode 100644 graphics/asymptote/LspCpp/CMakeFiles/Makefile.cmake create mode 100644 graphics/asymptote/LspCpp/CMakeFiles/Makefile2 create mode 100644 graphics/asymptote/LspCpp/CMakeFiles/TargetDirectories.txt create mode 100644 graphics/asymptote/LspCpp/CMakeFiles/cmake.check_cache create mode 100644 graphics/asymptote/LspCpp/CMakeFiles/lspcpp.dir/DependInfo.cmake create mode 100644 graphics/asymptote/LspCpp/CMakeFiles/lspcpp.dir/build.make create mode 100644 graphics/asymptote/LspCpp/CMakeFiles/lspcpp.dir/cmake_clean.cmake create mode 100644 graphics/asymptote/LspCpp/CMakeFiles/lspcpp.dir/cmake_clean_target.cmake create mode 100644 graphics/asymptote/LspCpp/CMakeFiles/lspcpp.dir/compiler_depend.internal create mode 100644 graphics/asymptote/LspCpp/CMakeFiles/lspcpp.dir/compiler_depend.make create mode 100644 graphics/asymptote/LspCpp/CMakeFiles/lspcpp.dir/compiler_depend.ts create mode 100644 graphics/asymptote/LspCpp/CMakeFiles/lspcpp.dir/depend.make create mode 100644 graphics/asymptote/LspCpp/CMakeFiles/lspcpp.dir/flags.make create mode 100644 graphics/asymptote/LspCpp/CMakeFiles/lspcpp.dir/link.txt create mode 100644 graphics/asymptote/LspCpp/CMakeFiles/lspcpp.dir/progress.make create mode 100644 graphics/asymptote/LspCpp/CMakeFiles/progress.marks create mode 100644 graphics/asymptote/LspCpp/CMakeLists.txt mode change 100644 => 100755 graphics/asymptote/LspCpp/LICENSE delete mode 100644 graphics/asymptote/LspCpp/LibLsp/JsonRpc/Cancellation.h delete mode 100644 graphics/asymptote/LspCpp/LibLsp/JsonRpc/Condition.h delete mode 100644 graphics/asymptote/LspCpp/LibLsp/JsonRpc/Context.cpp delete mode 100644 graphics/asymptote/LspCpp/LibLsp/JsonRpc/Context.h delete mode 100644 graphics/asymptote/LspCpp/LibLsp/JsonRpc/Endpoint.cpp delete mode 100644 graphics/asymptote/LspCpp/LibLsp/JsonRpc/Endpoint.h delete mode 100644 graphics/asymptote/LspCpp/LibLsp/JsonRpc/GCThreadContext.cpp delete mode 100644 graphics/asymptote/LspCpp/LibLsp/JsonRpc/GCThreadContext.h delete mode 100644 graphics/asymptote/LspCpp/LibLsp/JsonRpc/MessageIssue.h delete mode 100644 graphics/asymptote/LspCpp/LibLsp/JsonRpc/MessageJsonHandler.cpp delete mode 100644 graphics/asymptote/LspCpp/LibLsp/JsonRpc/MessageJsonHandler.h delete mode 100644 graphics/asymptote/LspCpp/LibLsp/JsonRpc/MessageProducer.h delete mode 100644 graphics/asymptote/LspCpp/LibLsp/JsonRpc/NotificationInMessage.h delete mode 100644 graphics/asymptote/LspCpp/LibLsp/JsonRpc/RemoteEndPoint.cpp delete mode 100644 graphics/asymptote/LspCpp/LibLsp/JsonRpc/RemoteEndPoint.h delete mode 100644 graphics/asymptote/LspCpp/LibLsp/JsonRpc/RequestInMessage.h delete mode 100644 graphics/asymptote/LspCpp/LibLsp/JsonRpc/ScopeExit.h delete mode 100644 graphics/asymptote/LspCpp/LibLsp/JsonRpc/StreamMessageProducer.cpp delete mode 100644 graphics/asymptote/LspCpp/LibLsp/JsonRpc/StreamMessageProducer.h delete mode 100644 graphics/asymptote/LspCpp/LibLsp/JsonRpc/TcpServer.cpp delete mode 100644 graphics/asymptote/LspCpp/LibLsp/JsonRpc/TcpServer.h delete mode 100644 graphics/asymptote/LspCpp/LibLsp/JsonRpc/WebSocketServer.cpp delete mode 100644 graphics/asymptote/LspCpp/LibLsp/JsonRpc/WebSocketServer.h delete mode 100644 graphics/asymptote/LspCpp/LibLsp/JsonRpc/json.h delete mode 100644 graphics/asymptote/LspCpp/LibLsp/JsonRpc/lsRequestId.h delete mode 100644 graphics/asymptote/LspCpp/LibLsp/JsonRpc/lsResponseMessage.h delete mode 100644 graphics/asymptote/LspCpp/LibLsp/JsonRpc/message.cpp delete mode 100644 graphics/asymptote/LspCpp/LibLsp/JsonRpc/message.h delete mode 100644 graphics/asymptote/LspCpp/LibLsp/JsonRpc/optional.hpp delete mode 100644 graphics/asymptote/LspCpp/LibLsp/JsonRpc/serializer.cpp delete mode 100644 graphics/asymptote/LspCpp/LibLsp/JsonRpc/serializer.h delete mode 100644 graphics/asymptote/LspCpp/LibLsp/JsonRpc/stream.h delete mode 100644 graphics/asymptote/LspCpp/LibLsp/JsonRpc/threaded_queue.cpp delete mode 100644 graphics/asymptote/LspCpp/LibLsp/JsonRpc/threaded_queue.h delete mode 100644 graphics/asymptote/LspCpp/LibLsp/JsonRpc/traits.h delete mode 100644 graphics/asymptote/LspCpp/LibLsp/lsp/AbsolutePath.h delete mode 100644 graphics/asymptote/LspCpp/LibLsp/lsp/ClientPreferences.h delete mode 100644 graphics/asymptote/LspCpp/LibLsp/lsp/CodeActionParams.h delete mode 100644 graphics/asymptote/LspCpp/LibLsp/lsp/Directory.h delete mode 100644 graphics/asymptote/LspCpp/LibLsp/lsp/ExecuteCommandParams.h delete mode 100644 graphics/asymptote/LspCpp/LibLsp/lsp/IProgressMonitor.h delete mode 100644 graphics/asymptote/LspCpp/LibLsp/lsp/Markup/Markup.cpp delete mode 100644 graphics/asymptote/LspCpp/LibLsp/lsp/Markup/Markup.h delete mode 100644 graphics/asymptote/LspCpp/LibLsp/lsp/Markup/string_ref.h delete mode 100644 graphics/asymptote/LspCpp/LibLsp/lsp/ParentProcessWatcher.cpp delete mode 100644 graphics/asymptote/LspCpp/LibLsp/lsp/ParentProcessWatcher.h delete mode 100644 graphics/asymptote/LspCpp/LibLsp/lsp/ProcessIoService.h delete mode 100644 graphics/asymptote/LspCpp/LibLsp/lsp/ProtocolJsonHandler.cpp delete mode 100644 graphics/asymptote/LspCpp/LibLsp/lsp/ProtocolJsonHandler.h delete mode 100644 graphics/asymptote/LspCpp/LibLsp/lsp/ResourceOperation.h delete mode 100644 graphics/asymptote/LspCpp/LibLsp/lsp/SimpleTimer.h delete mode 100644 graphics/asymptote/LspCpp/LibLsp/lsp/client/registerCapability.h delete mode 100644 graphics/asymptote/LspCpp/LibLsp/lsp/client/unregisterCapability.h delete mode 100644 graphics/asymptote/LspCpp/LibLsp/lsp/extention/jdtls/Move.h delete mode 100644 graphics/asymptote/LspCpp/LibLsp/lsp/extention/jdtls/OverridableMethod.h delete mode 100644 graphics/asymptote/LspCpp/LibLsp/lsp/extention/jdtls/WorkspaceSymbolParams.h delete mode 100644 graphics/asymptote/LspCpp/LibLsp/lsp/extention/jdtls/addOverridableMethods.h delete mode 100644 graphics/asymptote/LspCpp/LibLsp/lsp/extention/jdtls/buildWorkspace.h delete mode 100644 graphics/asymptote/LspCpp/LibLsp/lsp/extention/jdtls/checkConstructorsStatus.h delete mode 100644 graphics/asymptote/LspCpp/LibLsp/lsp/extention/jdtls/checkDelegateMethodsStatus.h delete mode 100644 graphics/asymptote/LspCpp/LibLsp/lsp/extention/jdtls/checkHashCodeEqualsStatus.h delete mode 100644 graphics/asymptote/LspCpp/LibLsp/lsp/extention/jdtls/checkToStringStatus.h delete mode 100644 graphics/asymptote/LspCpp/LibLsp/lsp/extention/jdtls/classFileContents.h delete mode 100644 graphics/asymptote/LspCpp/LibLsp/lsp/extention/jdtls/codeActionResult.h delete mode 100644 graphics/asymptote/LspCpp/LibLsp/lsp/extention/jdtls/executeCommand.h delete mode 100644 graphics/asymptote/LspCpp/LibLsp/lsp/extention/jdtls/findLinks.h delete mode 100644 graphics/asymptote/LspCpp/LibLsp/lsp/extention/jdtls/generateAccessors.h delete mode 100644 graphics/asymptote/LspCpp/LibLsp/lsp/extention/jdtls/generateConstructors.h delete mode 100644 graphics/asymptote/LspCpp/LibLsp/lsp/extention/jdtls/generateDelegateMethods.h delete mode 100644 graphics/asymptote/LspCpp/LibLsp/lsp/extention/jdtls/generateHashCodeEquals.h delete mode 100644 graphics/asymptote/LspCpp/LibLsp/lsp/extention/jdtls/generateToString.h delete mode 100644 graphics/asymptote/LspCpp/LibLsp/lsp/extention/jdtls/getMoveDestinations.h delete mode 100644 graphics/asymptote/LspCpp/LibLsp/lsp/extention/jdtls/getRefactorEdit.h delete mode 100644 graphics/asymptote/LspCpp/LibLsp/lsp/extention/jdtls/listOverridableMethods.h delete mode 100644 graphics/asymptote/LspCpp/LibLsp/lsp/extention/jdtls/organizeImports.h delete mode 100644 graphics/asymptote/LspCpp/LibLsp/lsp/extention/jdtls/projectConfigurationUpdate.h delete mode 100644 graphics/asymptote/LspCpp/LibLsp/lsp/extention/jdtls/resolveUnimplementedAccessors.h delete mode 100644 graphics/asymptote/LspCpp/LibLsp/lsp/extention/jdtls/searchSymbols.h delete mode 100644 graphics/asymptote/LspCpp/LibLsp/lsp/extention/sct/SCTConfig.h delete mode 100644 graphics/asymptote/LspCpp/LibLsp/lsp/extention/sct/protocol.h delete mode 100644 graphics/asymptote/LspCpp/LibLsp/lsp/extention/sct/sct.cpp delete mode 100644 graphics/asymptote/LspCpp/LibLsp/lsp/extention/sct/sct.h delete mode 100644 graphics/asymptote/LspCpp/LibLsp/lsp/extention/sonarlint/protocol.h delete mode 100644 graphics/asymptote/LspCpp/LibLsp/lsp/general/InitializeParams.h delete mode 100644 graphics/asymptote/LspCpp/LibLsp/lsp/general/exit.h delete mode 100644 graphics/asymptote/LspCpp/LibLsp/lsp/general/initialize.cpp delete mode 100644 graphics/asymptote/LspCpp/LibLsp/lsp/general/initialize.h delete mode 100644 graphics/asymptote/LspCpp/LibLsp/lsp/general/initialized.h delete mode 100644 graphics/asymptote/LspCpp/LibLsp/lsp/general/lsClientCapabilities.h delete mode 100644 graphics/asymptote/LspCpp/LibLsp/lsp/general/lsServerCapabilities.h delete mode 100644 graphics/asymptote/LspCpp/LibLsp/lsp/general/lsTextDocumentClientCapabilities.h delete mode 100644 graphics/asymptote/LspCpp/LibLsp/lsp/general/lsWorkspaceClientCapabilites.h delete mode 100644 graphics/asymptote/LspCpp/LibLsp/lsp/general/progress.h delete mode 100644 graphics/asymptote/LspCpp/LibLsp/lsp/general/shutdown.h delete mode 100644 graphics/asymptote/LspCpp/LibLsp/lsp/language/language.h delete mode 100644 graphics/asymptote/LspCpp/LibLsp/lsp/location_type.h delete mode 100644 graphics/asymptote/LspCpp/LibLsp/lsp/lru_cache.h delete mode 100644 graphics/asymptote/LspCpp/LibLsp/lsp/lsAny.h delete mode 100644 graphics/asymptote/LspCpp/LibLsp/lsp/lsCodeAction.h delete mode 100644 graphics/asymptote/LspCpp/LibLsp/lsp/lsCommand.h delete mode 100644 graphics/asymptote/LspCpp/LibLsp/lsp/lsDocumentUri.h delete mode 100644 graphics/asymptote/LspCpp/LibLsp/lsp/lsFormattingOptions.h delete mode 100644 graphics/asymptote/LspCpp/LibLsp/lsp/lsMarkedString.h delete mode 100644 graphics/asymptote/LspCpp/LibLsp/lsp/lsPosition.h delete mode 100644 graphics/asymptote/LspCpp/LibLsp/lsp/lsRange.h delete mode 100644 graphics/asymptote/LspCpp/LibLsp/lsp/lsResponseError.h delete mode 100644 graphics/asymptote/LspCpp/LibLsp/lsp/lsTextDocumentEdit.h delete mode 100644 graphics/asymptote/LspCpp/LibLsp/lsp/lsTextDocumentIdentifier.h delete mode 100644 graphics/asymptote/LspCpp/LibLsp/lsp/lsTextDocumentItem.h delete mode 100644 graphics/asymptote/LspCpp/LibLsp/lsp/lsTextDocumentPositionParams.h delete mode 100644 graphics/asymptote/LspCpp/LibLsp/lsp/lsTextEdit.h delete mode 100644 graphics/asymptote/LspCpp/LibLsp/lsp/lsVersionedTextDocumentIdentifier.h delete mode 100644 graphics/asymptote/LspCpp/LibLsp/lsp/lsWorkspaceEdit.h delete mode 100644 graphics/asymptote/LspCpp/LibLsp/lsp/lsp.cpp delete mode 100644 graphics/asymptote/LspCpp/LibLsp/lsp/lsp_code_action.h delete mode 100644 graphics/asymptote/LspCpp/LibLsp/lsp/lsp_completion.h delete mode 100644 graphics/asymptote/LspCpp/LibLsp/lsp/lsp_diagnostic.cpp delete mode 100644 graphics/asymptote/LspCpp/LibLsp/lsp/lsp_diagnostic.h delete mode 100644 graphics/asymptote/LspCpp/LibLsp/lsp/method_type.h delete mode 100644 graphics/asymptote/LspCpp/LibLsp/lsp/out_list.h delete mode 100644 graphics/asymptote/LspCpp/LibLsp/lsp/symbol.h delete mode 100644 graphics/asymptote/LspCpp/LibLsp/lsp/textDocument/SemanticTokens.h delete mode 100644 graphics/asymptote/LspCpp/LibLsp/lsp/textDocument/callHierarchy.h delete mode 100644 graphics/asymptote/LspCpp/LibLsp/lsp/textDocument/code_action.h delete mode 100644 graphics/asymptote/LspCpp/LibLsp/lsp/textDocument/code_lens.h delete mode 100644 graphics/asymptote/LspCpp/LibLsp/lsp/textDocument/colorPresentation.h delete mode 100644 graphics/asymptote/LspCpp/LibLsp/lsp/textDocument/completion.h delete mode 100644 graphics/asymptote/LspCpp/LibLsp/lsp/textDocument/declaration_definition.h delete mode 100644 graphics/asymptote/LspCpp/LibLsp/lsp/textDocument/didRenameFiles.h delete mode 100644 graphics/asymptote/LspCpp/LibLsp/lsp/textDocument/did_change.h delete mode 100644 graphics/asymptote/LspCpp/LibLsp/lsp/textDocument/did_close.h delete mode 100644 graphics/asymptote/LspCpp/LibLsp/lsp/textDocument/did_open.h delete mode 100644 graphics/asymptote/LspCpp/LibLsp/lsp/textDocument/did_save.h delete mode 100644 graphics/asymptote/LspCpp/LibLsp/lsp/textDocument/documentColor.h delete mode 100644 graphics/asymptote/LspCpp/LibLsp/lsp/textDocument/document_link.h delete mode 100644 graphics/asymptote/LspCpp/LibLsp/lsp/textDocument/document_symbol.h delete mode 100644 graphics/asymptote/LspCpp/LibLsp/lsp/textDocument/foldingRange.h delete mode 100644 graphics/asymptote/LspCpp/LibLsp/lsp/textDocument/formatting.h delete mode 100644 graphics/asymptote/LspCpp/LibLsp/lsp/textDocument/highlight.h delete mode 100644 graphics/asymptote/LspCpp/LibLsp/lsp/textDocument/hover.h delete mode 100644 graphics/asymptote/LspCpp/LibLsp/lsp/textDocument/implementation.h delete mode 100644 graphics/asymptote/LspCpp/LibLsp/lsp/textDocument/linkedEditingRange.h delete mode 100644 graphics/asymptote/LspCpp/LibLsp/lsp/textDocument/onTypeFormatting.h delete mode 100644 graphics/asymptote/LspCpp/LibLsp/lsp/textDocument/prepareRename.h delete mode 100644 graphics/asymptote/LspCpp/LibLsp/lsp/textDocument/publishDiagnostics.h delete mode 100644 graphics/asymptote/LspCpp/LibLsp/lsp/textDocument/range_formatting.h delete mode 100644 graphics/asymptote/LspCpp/LibLsp/lsp/textDocument/references.h delete mode 100644 graphics/asymptote/LspCpp/LibLsp/lsp/textDocument/rename.h delete mode 100644 graphics/asymptote/LspCpp/LibLsp/lsp/textDocument/resolveCodeLens.h delete mode 100644 graphics/asymptote/LspCpp/LibLsp/lsp/textDocument/resolveCompletionItem.h delete mode 100644 graphics/asymptote/LspCpp/LibLsp/lsp/textDocument/resolveTypeHierarchy.h delete mode 100644 graphics/asymptote/LspCpp/LibLsp/lsp/textDocument/selectionRange.h delete mode 100644 graphics/asymptote/LspCpp/LibLsp/lsp/textDocument/semanticHighlighting.h delete mode 100644 graphics/asymptote/LspCpp/LibLsp/lsp/textDocument/signature_help.h delete mode 100644 graphics/asymptote/LspCpp/LibLsp/lsp/textDocument/textDocument.cpp delete mode 100644 graphics/asymptote/LspCpp/LibLsp/lsp/textDocument/typeHierarchy.h delete mode 100644 graphics/asymptote/LspCpp/LibLsp/lsp/textDocument/type_definition.h delete mode 100644 graphics/asymptote/LspCpp/LibLsp/lsp/textDocument/willSave.h delete mode 100644 graphics/asymptote/LspCpp/LibLsp/lsp/utils.cpp delete mode 100644 graphics/asymptote/LspCpp/LibLsp/lsp/utils.h delete mode 100644 graphics/asymptote/LspCpp/LibLsp/lsp/windows/MessageNotify.h delete mode 100644 graphics/asymptote/LspCpp/LibLsp/lsp/working_files.cpp delete mode 100644 graphics/asymptote/LspCpp/LibLsp/lsp/working_files.h delete mode 100644 graphics/asymptote/LspCpp/LibLsp/lsp/workspace/applyEdit.h delete mode 100644 graphics/asymptote/LspCpp/LibLsp/lsp/workspace/configuration.h delete mode 100644 graphics/asymptote/LspCpp/LibLsp/lsp/workspace/didChangeWorkspaceFolders.h delete mode 100644 graphics/asymptote/LspCpp/LibLsp/lsp/workspace/did_change_configuration.h delete mode 100644 graphics/asymptote/LspCpp/LibLsp/lsp/workspace/did_change_watched_files.h delete mode 100644 graphics/asymptote/LspCpp/LibLsp/lsp/workspace/execute_command.h delete mode 100644 graphics/asymptote/LspCpp/LibLsp/lsp/workspace/symbol.h delete mode 100644 graphics/asymptote/LspCpp/LibLsp/lsp/workspace/workspaceFolders.h delete mode 100644 graphics/asymptote/LspCpp/LspCpp.filters delete mode 100644 graphics/asymptote/LspCpp/LspCpp.user delete mode 100644 graphics/asymptote/LspCpp/LspCpp.vcxproj delete mode 100644 graphics/asymptote/LspCpp/LspCpp.vcxproj.filters delete mode 100644 graphics/asymptote/LspCpp/LspCpp.vcxproj.user mode change 100644 => 100755 graphics/asymptote/LspCpp/README.md create mode 100644 graphics/asymptote/LspCpp/cmake_install.cmake delete mode 100644 graphics/asymptote/LspCpp/example/StdIOClientExample.cpp delete mode 100644 graphics/asymptote/LspCpp/example/StdIOServerExample.cpp delete mode 100644 graphics/asymptote/LspCpp/example/TcpServerExample.cpp delete mode 100644 graphics/asymptote/LspCpp/example/WebsocketExample.cpp create mode 100755 graphics/asymptote/LspCpp/examples/StdIOClientExample.cpp create mode 100755 graphics/asymptote/LspCpp/examples/StdIOServerExample.cpp create mode 100755 graphics/asymptote/LspCpp/examples/TcpServerExample.cpp create mode 100755 graphics/asymptote/LspCpp/examples/WebsocketExample.cpp create mode 100644 graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/Cancellation.h create mode 100644 graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/Condition.h create mode 100644 graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/Context.h create mode 100644 graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/Endpoint.h create mode 100644 graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/GCThreadContext.h create mode 100644 graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/MessageIssue.h create mode 100644 graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/MessageJsonHandler.h create mode 100644 graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/MessageProducer.h create mode 100644 graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/NotificationInMessage.h create mode 100644 graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/RemoteEndPoint.h create mode 100644 graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/RequestInMessage.h create mode 100644 graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/ScopeExit.h create mode 100644 graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/StreamMessageProducer.h create mode 100644 graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/TcpServer.h create mode 100644 graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/WebSocketServer.h create mode 100644 graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/json.h create mode 100644 graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/lsRequestId.h create mode 100644 graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/lsResponseMessage.h create mode 100644 graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/macro_map.h create mode 100644 graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/message.h create mode 100644 graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/serializer.h create mode 100644 graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/stream.h create mode 100644 graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/threaded_queue.h create mode 100644 graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/traits.h create mode 100644 graphics/asymptote/LspCpp/include/LibLsp/lsp/AbsolutePath.h create mode 100644 graphics/asymptote/LspCpp/include/LibLsp/lsp/ClientPreferences.h create mode 100644 graphics/asymptote/LspCpp/include/LibLsp/lsp/CodeActionParams.h create mode 100644 graphics/asymptote/LspCpp/include/LibLsp/lsp/Directory.h create mode 100644 graphics/asymptote/LspCpp/include/LibLsp/lsp/ExecuteCommandParams.h create mode 100644 graphics/asymptote/LspCpp/include/LibLsp/lsp/IProgressMonitor.h create mode 100644 graphics/asymptote/LspCpp/include/LibLsp/lsp/Markup/Markup.h create mode 100644 graphics/asymptote/LspCpp/include/LibLsp/lsp/Markup/string_ref.h create mode 100644 graphics/asymptote/LspCpp/include/LibLsp/lsp/ParentProcessWatcher.h create mode 100644 graphics/asymptote/LspCpp/include/LibLsp/lsp/ProcessIoService.h create mode 100644 graphics/asymptote/LspCpp/include/LibLsp/lsp/ProtocolJsonHandler.h create mode 100644 graphics/asymptote/LspCpp/include/LibLsp/lsp/ResourceOperation.h create mode 100644 graphics/asymptote/LspCpp/include/LibLsp/lsp/SimpleTimer.h create mode 100644 graphics/asymptote/LspCpp/include/LibLsp/lsp/client/registerCapability.h create mode 100644 graphics/asymptote/LspCpp/include/LibLsp/lsp/client/unregisterCapability.h create mode 100644 graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/Move.h create mode 100644 graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/OverridableMethod.h create mode 100644 graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/WorkspaceSymbolParams.h create mode 100644 graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/addOverridableMethods.h create mode 100644 graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/buildWorkspace.h create mode 100644 graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/checkConstructorsStatus.h create mode 100644 graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/checkDelegateMethodsStatus.h create mode 100644 graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/checkHashCodeEqualsStatus.h create mode 100644 graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/checkToStringStatus.h create mode 100644 graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/classFileContents.h create mode 100644 graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/codeActionResult.h create mode 100644 graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/executeCommand.h create mode 100644 graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/findLinks.h create mode 100644 graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/generateAccessors.h create mode 100644 graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/generateConstructors.h create mode 100644 graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/generateDelegateMethods.h create mode 100644 graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/generateHashCodeEquals.h create mode 100644 graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/generateToString.h create mode 100644 graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/getMoveDestinations.h create mode 100644 graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/getRefactorEdit.h create mode 100644 graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/listOverridableMethods.h create mode 100644 graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/organizeImports.h create mode 100644 graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/projectConfigurationUpdate.h create mode 100644 graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/resolveUnimplementedAccessors.h create mode 100644 graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/searchSymbols.h create mode 100644 graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/sonarlint/protocol.h create mode 100644 graphics/asymptote/LspCpp/include/LibLsp/lsp/general/InitializeParams.h create mode 100644 graphics/asymptote/LspCpp/include/LibLsp/lsp/general/exit.h create mode 100644 graphics/asymptote/LspCpp/include/LibLsp/lsp/general/initialize.h create mode 100644 graphics/asymptote/LspCpp/include/LibLsp/lsp/general/initialized.h create mode 100644 graphics/asymptote/LspCpp/include/LibLsp/lsp/general/lsClientCapabilities.h create mode 100644 graphics/asymptote/LspCpp/include/LibLsp/lsp/general/lsServerCapabilities.h create mode 100644 graphics/asymptote/LspCpp/include/LibLsp/lsp/general/lsTextDocumentClientCapabilities.h create mode 100644 graphics/asymptote/LspCpp/include/LibLsp/lsp/general/lsWorkspaceClientCapabilites.h create mode 100644 graphics/asymptote/LspCpp/include/LibLsp/lsp/general/progress.h create mode 100644 graphics/asymptote/LspCpp/include/LibLsp/lsp/general/shutdown.h create mode 100644 graphics/asymptote/LspCpp/include/LibLsp/lsp/language/language.h create mode 100644 graphics/asymptote/LspCpp/include/LibLsp/lsp/location_type.h create mode 100644 graphics/asymptote/LspCpp/include/LibLsp/lsp/lru_cache.h create mode 100644 graphics/asymptote/LspCpp/include/LibLsp/lsp/lsAny.h create mode 100644 graphics/asymptote/LspCpp/include/LibLsp/lsp/lsCodeAction.h create mode 100644 graphics/asymptote/LspCpp/include/LibLsp/lsp/lsCommand.h create mode 100644 graphics/asymptote/LspCpp/include/LibLsp/lsp/lsDocumentUri.h create mode 100644 graphics/asymptote/LspCpp/include/LibLsp/lsp/lsFormattingOptions.h create mode 100644 graphics/asymptote/LspCpp/include/LibLsp/lsp/lsMarkedString.h create mode 100644 graphics/asymptote/LspCpp/include/LibLsp/lsp/lsPosition.h create mode 100644 graphics/asymptote/LspCpp/include/LibLsp/lsp/lsRange.h create mode 100644 graphics/asymptote/LspCpp/include/LibLsp/lsp/lsResponseError.h create mode 100644 graphics/asymptote/LspCpp/include/LibLsp/lsp/lsTextDocumentEdit.h create mode 100644 graphics/asymptote/LspCpp/include/LibLsp/lsp/lsTextDocumentIdentifier.h create mode 100644 graphics/asymptote/LspCpp/include/LibLsp/lsp/lsTextDocumentItem.h create mode 100644 graphics/asymptote/LspCpp/include/LibLsp/lsp/lsTextDocumentPositionParams.h create mode 100644 graphics/asymptote/LspCpp/include/LibLsp/lsp/lsTextEdit.h create mode 100644 graphics/asymptote/LspCpp/include/LibLsp/lsp/lsVersionedTextDocumentIdentifier.h create mode 100644 graphics/asymptote/LspCpp/include/LibLsp/lsp/lsWorkspaceEdit.h create mode 100644 graphics/asymptote/LspCpp/include/LibLsp/lsp/lsp_code_action.h create mode 100644 graphics/asymptote/LspCpp/include/LibLsp/lsp/lsp_completion.h create mode 100644 graphics/asymptote/LspCpp/include/LibLsp/lsp/lsp_diagnostic.h create mode 100644 graphics/asymptote/LspCpp/include/LibLsp/lsp/method_type.h create mode 100644 graphics/asymptote/LspCpp/include/LibLsp/lsp/out_list.h create mode 100644 graphics/asymptote/LspCpp/include/LibLsp/lsp/symbol.h create mode 100644 graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/SemanticTokens.h create mode 100644 graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/callHierarchy.h create mode 100644 graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/code_action.h create mode 100644 graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/code_lens.h create mode 100644 graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/colorPresentation.h create mode 100644 graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/completion.h create mode 100644 graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/declaration_definition.h create mode 100644 graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/didRenameFiles.h create mode 100644 graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/did_change.h create mode 100644 graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/did_close.h create mode 100644 graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/did_open.h create mode 100644 graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/did_save.h create mode 100644 graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/documentColor.h create mode 100644 graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/document_link.h create mode 100644 graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/document_symbol.h create mode 100644 graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/foldingRange.h create mode 100644 graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/formatting.h create mode 100644 graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/highlight.h create mode 100644 graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/hover.h create mode 100644 graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/implementation.h create mode 100644 graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/linkedEditingRange.h create mode 100644 graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/onTypeFormatting.h create mode 100644 graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/prepareRename.h create mode 100644 graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/publishDiagnostics.h create mode 100644 graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/range_formatting.h create mode 100644 graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/references.h create mode 100644 graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/rename.h create mode 100644 graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/resolveCodeLens.h create mode 100644 graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/resolveCompletionItem.h create mode 100644 graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/resolveTypeHierarchy.h create mode 100644 graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/selectionRange.h create mode 100644 graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/semanticHighlighting.h create mode 100644 graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/signature_help.h create mode 100644 graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/typeHierarchy.h create mode 100644 graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/type_definition.h create mode 100644 graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/willSave.h create mode 100644 graphics/asymptote/LspCpp/include/LibLsp/lsp/utils.h create mode 100644 graphics/asymptote/LspCpp/include/LibLsp/lsp/windows/MessageNotify.h create mode 100644 graphics/asymptote/LspCpp/include/LibLsp/lsp/working_files.h create mode 100644 graphics/asymptote/LspCpp/include/LibLsp/lsp/workspace/applyEdit.h create mode 100644 graphics/asymptote/LspCpp/include/LibLsp/lsp/workspace/configuration.h create mode 100644 graphics/asymptote/LspCpp/include/LibLsp/lsp/workspace/didChangeWorkspaceFolders.h create mode 100644 graphics/asymptote/LspCpp/include/LibLsp/lsp/workspace/did_change_configuration.h create mode 100644 graphics/asymptote/LspCpp/include/LibLsp/lsp/workspace/did_change_watched_files.h create mode 100644 graphics/asymptote/LspCpp/include/LibLsp/lsp/workspace/execute_command.h create mode 100644 graphics/asymptote/LspCpp/include/LibLsp/lsp/workspace/symbol.h create mode 100644 graphics/asymptote/LspCpp/include/LibLsp/lsp/workspace/workspaceFolders.h create mode 100644 graphics/asymptote/LspCpp/include/optional.hpp delete mode 100644 graphics/asymptote/LspCpp/macro_map.h delete mode 100644 graphics/asymptote/LspCpp/network/optional.hpp delete mode 100644 graphics/asymptote/LspCpp/network/string_view.hpp delete mode 100644 graphics/asymptote/LspCpp/network/uri.hpp delete mode 100644 graphics/asymptote/LspCpp/network/uri/config.hpp delete mode 100644 graphics/asymptote/LspCpp/network/uri/detail/algorithm.hpp delete mode 100644 graphics/asymptote/LspCpp/network/uri/detail/decode.hpp delete mode 100644 graphics/asymptote/LspCpp/network/uri/detail/encode.hpp delete mode 100644 graphics/asymptote/LspCpp/network/uri/detail/grammar.hpp delete mode 100644 graphics/asymptote/LspCpp/network/uri/detail/translate.hpp delete mode 100644 graphics/asymptote/LspCpp/network/uri/detail/uri_advance_parts.cpp delete mode 100644 graphics/asymptote/LspCpp/network/uri/detail/uri_advance_parts.hpp delete mode 100644 graphics/asymptote/LspCpp/network/uri/detail/uri_normalize.cpp delete mode 100644 graphics/asymptote/LspCpp/network/uri/detail/uri_normalize.hpp delete mode 100644 graphics/asymptote/LspCpp/network/uri/detail/uri_parse.cpp delete mode 100644 graphics/asymptote/LspCpp/network/uri/detail/uri_parse.hpp delete mode 100644 graphics/asymptote/LspCpp/network/uri/detail/uri_parse_authority.cpp delete mode 100644 graphics/asymptote/LspCpp/network/uri/detail/uri_parse_authority.hpp delete mode 100644 graphics/asymptote/LspCpp/network/uri/detail/uri_parts.hpp delete mode 100644 graphics/asymptote/LspCpp/network/uri/detail/uri_percent_encode.hpp delete mode 100644 graphics/asymptote/LspCpp/network/uri/detail/uri_resolve.cpp delete mode 100644 graphics/asymptote/LspCpp/network/uri/detail/uri_resolve.hpp delete mode 100644 graphics/asymptote/LspCpp/network/uri/uri.cpp delete mode 100644 graphics/asymptote/LspCpp/network/uri/uri.hpp delete mode 100644 graphics/asymptote/LspCpp/network/uri/uri_builder.cpp delete mode 100644 graphics/asymptote/LspCpp/network/uri/uri_builder.hpp delete mode 100644 graphics/asymptote/LspCpp/network/uri/uri_errors.cpp delete mode 100644 graphics/asymptote/LspCpp/network/uri/uri_errors.hpp delete mode 100644 graphics/asymptote/LspCpp/network/uri/uri_io.hpp delete mode 100644 graphics/asymptote/LspCpp/packages.config create mode 100755 graphics/asymptote/LspCpp/src/jsonrpc/Context.cpp create mode 100755 graphics/asymptote/LspCpp/src/jsonrpc/Endpoint.cpp create mode 100755 graphics/asymptote/LspCpp/src/jsonrpc/GCThreadContext.cpp create mode 100755 graphics/asymptote/LspCpp/src/jsonrpc/MessageJsonHandler.cpp create mode 100755 graphics/asymptote/LspCpp/src/jsonrpc/RemoteEndPoint.cpp create mode 100755 graphics/asymptote/LspCpp/src/jsonrpc/StreamMessageProducer.cpp create mode 100755 graphics/asymptote/LspCpp/src/jsonrpc/TcpServer.cpp create mode 100755 graphics/asymptote/LspCpp/src/jsonrpc/WebSocketServer.cpp create mode 100755 graphics/asymptote/LspCpp/src/jsonrpc/message.cpp create mode 100644 graphics/asymptote/LspCpp/src/jsonrpc/optional.hpp create mode 100755 graphics/asymptote/LspCpp/src/jsonrpc/serializer.cpp create mode 100755 graphics/asymptote/LspCpp/src/jsonrpc/threaded_queue.cpp create mode 100755 graphics/asymptote/LspCpp/src/lsp/Markup.cpp create mode 100755 graphics/asymptote/LspCpp/src/lsp/ParentProcessWatcher.cpp create mode 100755 graphics/asymptote/LspCpp/src/lsp/ProtocolJsonHandler.cpp create mode 100755 graphics/asymptote/LspCpp/src/lsp/initialize.cpp create mode 100755 graphics/asymptote/LspCpp/src/lsp/lsp.cpp create mode 100755 graphics/asymptote/LspCpp/src/lsp/lsp_diagnostic.cpp create mode 100755 graphics/asymptote/LspCpp/src/lsp/textDocument.cpp create mode 100755 graphics/asymptote/LspCpp/src/lsp/utils.cpp create mode 100755 graphics/asymptote/LspCpp/src/lsp/working_files.cpp create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/CHANGELOG.md create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/CMakeLists.txt create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/CMakeModules/FindGTestSrc.cmake create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/RapidJSON.pc.in create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/RapidJSONConfig.cmake.in create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/RapidJSONConfigVersion.cmake.in create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/appveyor.yml create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/bin/data/abcde.txt create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/bin/data/glossary.json create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/bin/data/menu.json create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/bin/data/readme.txt create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/bin/data/sample.json create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/bin/data/webapp.json create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/bin/data/widget.json create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/bin/draft-04/schema create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/bin/encodings/utf16be.json create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/bin/encodings/utf16bebom.json create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/bin/encodings/utf16le.json create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/bin/encodings/utf16lebom.json create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/bin/encodings/utf32be.json create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/bin/encodings/utf32bebom.json create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/bin/encodings/utf32le.json create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/bin/encodings/utf32lebom.json create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/bin/encodings/utf8.json create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/bin/encodings/utf8bom.json create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonchecker/fail1.json create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonchecker/fail10.json create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonchecker/fail11.json create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonchecker/fail12.json create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonchecker/fail13.json create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonchecker/fail14.json create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonchecker/fail15.json create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonchecker/fail16.json create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonchecker/fail17.json create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonchecker/fail18.json create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonchecker/fail19.json create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonchecker/fail2.json create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonchecker/fail20.json create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonchecker/fail21.json create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonchecker/fail22.json create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonchecker/fail23.json create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonchecker/fail24.json create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonchecker/fail25.json create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonchecker/fail26.json create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonchecker/fail27.json create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonchecker/fail28.json create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonchecker/fail29.json create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonchecker/fail3.json create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonchecker/fail30.json create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonchecker/fail31.json create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonchecker/fail32.json create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonchecker/fail33.json create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonchecker/fail4.json create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonchecker/fail5.json create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonchecker/fail6.json create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonchecker/fail7.json create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonchecker/fail8.json create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonchecker/fail9.json create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonchecker/pass1.json create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonchecker/pass2.json create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonchecker/pass3.json create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonchecker/readme.txt create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/LICENSE create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/README.md create mode 100755 graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/bin/jsonschema_suite create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/remotes/folder/folderInteger.json create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/remotes/integer.json create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/remotes/subSchemas.json create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft3/additionalItems.json create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft3/additionalProperties.json create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft3/default.json create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft3/dependencies.json create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft3/disallow.json create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft3/divisibleBy.json create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft3/enum.json create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft3/extends.json create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft3/items.json create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft3/maxItems.json create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft3/maxLength.json create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft3/maximum.json create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft3/minItems.json create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft3/minLength.json create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft3/minimum.json create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft3/optional/bignum.json create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft3/optional/format.json create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft3/optional/jsregex.json create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft3/optional/zeroTerminatedFloats.json create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft3/pattern.json create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft3/patternProperties.json create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft3/properties.json create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft3/ref.json create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft3/refRemote.json create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft3/required.json create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft3/type.json create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft3/uniqueItems.json create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft4/additionalItems.json create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft4/additionalProperties.json create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft4/allOf.json create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft4/anyOf.json create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft4/default.json create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft4/definitions.json create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft4/dependencies.json create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft4/enum.json create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft4/items.json create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft4/maxItems.json create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft4/maxLength.json create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft4/maxProperties.json create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft4/maximum.json create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft4/minItems.json create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft4/minLength.json create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft4/minProperties.json create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft4/minimum.json create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft4/multipleOf.json create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft4/not.json create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft4/oneOf.json create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft4/optional/bignum.json create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft4/optional/format.json create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft4/optional/zeroTerminatedFloats.json create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft4/pattern.json create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft4/patternProperties.json create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft4/properties.json create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft4/ref.json create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft4/refRemote.json create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft4/required.json create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft4/type.json create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft4/uniqueItems.json create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tox.ini create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/bin/types/alotofkeys.json create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/bin/types/booleans.json create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/bin/types/floats.json create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/bin/types/guids.json create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/bin/types/integers.json create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/bin/types/mixed.json create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/bin/types/nulls.json create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/bin/types/paragraphs.json create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/bin/types/readme.txt create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/bin/unittestschema/address.json create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/bin/unittestschema/allOf_address.json create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/bin/unittestschema/anyOf_address.json create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/bin/unittestschema/idandref.json create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/bin/unittestschema/oneOf_address.json create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/contrib/natvis/LICENSE create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/contrib/natvis/README.md create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/contrib/natvis/rapidjson.natvis create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/doc/CMakeLists.txt create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/doc/Doxyfile.in create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/doc/Doxyfile.zh-cn.in create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/doc/diagram/architecture.dot create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/doc/diagram/architecture.png create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/doc/diagram/insituparsing.dot create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/doc/diagram/insituparsing.png create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/doc/diagram/iterative-parser-states-diagram.dot create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/doc/diagram/iterative-parser-states-diagram.png create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/doc/diagram/makefile create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/doc/diagram/move1.dot create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/doc/diagram/move1.png create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/doc/diagram/move2.dot create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/doc/diagram/move2.png create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/doc/diagram/move3.dot create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/doc/diagram/move3.png create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/doc/diagram/normalparsing.dot create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/doc/diagram/normalparsing.png create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/doc/diagram/simpledom.dot create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/doc/diagram/simpledom.png create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/doc/diagram/tutorial.dot create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/doc/diagram/tutorial.png create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/doc/diagram/utilityclass.dot create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/doc/diagram/utilityclass.png create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/doc/dom.md create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/doc/dom.zh-cn.md create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/doc/encoding.md create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/doc/encoding.zh-cn.md create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/doc/faq.md create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/doc/faq.zh-cn.md create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/doc/features.md create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/doc/features.zh-cn.md create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/doc/internals.md create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/doc/internals.zh-cn.md create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/doc/logo/rapidjson.png create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/doc/logo/rapidjson.svg create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/doc/misc/DoxygenLayout.xml create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/doc/misc/doxygenextra.css create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/doc/misc/footer.html create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/doc/misc/header.html create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/doc/npm.md create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/doc/performance.md create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/doc/performance.zh-cn.md create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/doc/pointer.md create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/doc/pointer.zh-cn.md create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/doc/sax.md create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/doc/sax.zh-cn.md create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/doc/schema.md create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/doc/schema.zh-cn.md create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/doc/stream.md create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/doc/stream.zh-cn.md create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/doc/tutorial.md create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/doc/tutorial.zh-cn.md create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/docker/debian/Dockerfile create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/example/CMakeLists.txt create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/example/archiver/archiver.cpp create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/example/archiver/archiver.h create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/example/archiver/archivertest.cpp create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/example/capitalize/capitalize.cpp create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/example/condense/condense.cpp create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/example/filterkey/filterkey.cpp create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/example/filterkeydom/filterkeydom.cpp create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/example/jsonx/jsonx.cpp create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/example/lookaheadparser/lookaheadparser.cpp create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/example/messagereader/messagereader.cpp create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/example/parsebyparts/parsebyparts.cpp create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/example/pretty/pretty.cpp create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/example/prettyauto/prettyauto.cpp create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/example/schemavalidator/schemavalidator.cpp create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/example/serialize/serialize.cpp create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/example/simpledom/simpledom.cpp create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/example/simplepullreader/simplepullreader.cpp create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/example/simplereader/simplereader.cpp create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/example/simplewriter/simplewriter.cpp create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/example/sortkeys/sortkeys.cpp create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/example/traverseaspointer.cpp create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/example/tutorial/tutorial.cpp create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/allocators.h create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/cursorstreamwrapper.h create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/document.h create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/encodedstream.h create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/encodings.h create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/error/en.h create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/error/error.h create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/filereadstream.h create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/filewritestream.h create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/fwd.h create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/internal/biginteger.h create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/internal/clzll.h create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/internal/diyfp.h create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/internal/dtoa.h create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/internal/ieee754.h create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/internal/itoa.h create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/internal/meta.h create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/internal/pow10.h create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/internal/regex.h create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/internal/stack.h create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/internal/strfunc.h create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/internal/strtod.h create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/internal/swap.h create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/istreamwrapper.h create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/memorybuffer.h create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/memorystream.h create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/msinttypes/inttypes.h create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/msinttypes/stdint.h create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/ostreamwrapper.h create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/pointer.h create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/prettywriter.h create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/rapidjson.h create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/reader.h create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/schema.h create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/stream.h create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/stringbuffer.h create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/uri.h create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/writer.h create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/include_dirs.js create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/library.json create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/license.txt create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/package.json create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/rapidjson.autopkg create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/readme.md create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/readme.zh-cn.md create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/test/CMakeLists.txt create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/test/perftest/CMakeLists.txt create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/test/perftest/misctest.cpp create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/test/perftest/perftest.cpp create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/test/perftest/perftest.h create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/test/perftest/platformtest.cpp create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/test/perftest/rapidjsontest.cpp create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/test/perftest/schematest.cpp create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/CMakeLists.txt create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/allocatorstest.cpp create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/bigintegertest.cpp create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/clzlltest.cpp create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/cursorstreamwrappertest.cpp create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/documenttest.cpp create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/dtoatest.cpp create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/encodedstreamtest.cpp create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/encodingstest.cpp create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/filestreamtest.cpp create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/fwdtest.cpp create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/istreamwrappertest.cpp create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/itoatest.cpp create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/jsoncheckertest.cpp create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/namespacetest.cpp create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/ostreamwrappertest.cpp create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/platformtest.cpp create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/pointertest.cpp create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/prettywritertest.cpp create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/readertest.cpp create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/regextest.cpp create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/schematest.cpp create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/simdtest.cpp create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/strfunctest.cpp create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/stringbuffertest.cpp create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/strtodtest.cpp create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/unittest.cpp create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/unittest.h create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/uritest.cpp create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/valuetest.cpp create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/writertest.cpp create mode 100644 graphics/asymptote/LspCpp/third_party/rapidjson/test/valgrind.supp create mode 100755 graphics/asymptote/LspCpp/third_party/rapidjson/travis-doxygen.sh create mode 100644 graphics/asymptote/LspCpp/third_party/uri/CHANGELOG.md create mode 100644 graphics/asymptote/LspCpp/third_party/uri/CMakeFiles/CMakeDirectoryInformation.cmake create mode 100644 graphics/asymptote/LspCpp/third_party/uri/CMakeFiles/doc.dir/DependInfo.cmake create mode 100644 graphics/asymptote/LspCpp/third_party/uri/CMakeFiles/doc.dir/build.make create mode 100644 graphics/asymptote/LspCpp/third_party/uri/CMakeFiles/doc.dir/cmake_clean.cmake create mode 100644 graphics/asymptote/LspCpp/third_party/uri/CMakeFiles/doc.dir/compiler_depend.make create mode 100644 graphics/asymptote/LspCpp/third_party/uri/CMakeFiles/doc.dir/compiler_depend.ts create mode 100644 graphics/asymptote/LspCpp/third_party/uri/CMakeFiles/doc.dir/progress.make create mode 100644 graphics/asymptote/LspCpp/third_party/uri/CMakeFiles/progress.marks create mode 100644 graphics/asymptote/LspCpp/third_party/uri/CMakeLists.txt create mode 100644 graphics/asymptote/LspCpp/third_party/uri/Doxyfile create mode 100644 graphics/asymptote/LspCpp/third_party/uri/Doxyfile.in create mode 100644 graphics/asymptote/LspCpp/third_party/uri/LICENSE_1_0.txt create mode 100644 graphics/asymptote/LspCpp/third_party/uri/Makefile create mode 100644 graphics/asymptote/LspCpp/third_party/uri/README.rst create mode 100644 graphics/asymptote/LspCpp/third_party/uri/cmake_install.cmake create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/BUILD.bazel create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/CMakeLists.txt create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/CONTRIBUTING.md create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/CONTRIBUTORS create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/LICENSE create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/README.md create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/WORKSPACE create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/ci/linux-presubmit.sh create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/ci/macos-presubmit.sh create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/docs/_config.yml create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/docs/_data/navigation.yml create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/docs/_layouts/default.html create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/docs/_sass/main.scss create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/docs/advanced.md create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/docs/community_created_documentation.md create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/docs/faq.md create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/docs/gmock_cheat_sheet.md create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/docs/gmock_cook_book.md create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/docs/gmock_faq.md create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/docs/gmock_for_dummies.md create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/docs/index.md create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/docs/pkgconfig.md create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/docs/platforms.md create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/docs/primer.md create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/docs/quickstart-bazel.md create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/docs/quickstart-cmake.md create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/docs/reference/actions.md create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/docs/reference/assertions.md create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/docs/reference/matchers.md create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/docs/reference/mocking.md create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/docs/reference/testing.md create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/docs/samples.md create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googlemock/CMakeLists.txt create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googlemock/README.md create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googlemock/cmake/gmock.pc.in create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googlemock/cmake/gmock_main.pc.in create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googlemock/docs/README.md create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googlemock/include/gmock/gmock-actions.h create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googlemock/include/gmock/gmock-cardinalities.h create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googlemock/include/gmock/gmock-function-mocker.h create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googlemock/include/gmock/gmock-matchers.h create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googlemock/include/gmock/gmock-more-actions.h create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googlemock/include/gmock/gmock-more-matchers.h create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googlemock/include/gmock/gmock-nice-strict.h create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googlemock/include/gmock/gmock-spec-builders.h create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googlemock/include/gmock/gmock.h create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googlemock/include/gmock/internal/custom/README.md create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googlemock/include/gmock/internal/custom/gmock-generated-actions.h create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googlemock/include/gmock/internal/custom/gmock-matchers.h create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googlemock/include/gmock/internal/custom/gmock-port.h create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googlemock/include/gmock/internal/gmock-internal-utils.h create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googlemock/include/gmock/internal/gmock-port.h create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googlemock/include/gmock/internal/gmock-pp.h create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googlemock/src/gmock-all.cc create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googlemock/src/gmock-cardinalities.cc create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googlemock/src/gmock-internal-utils.cc create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googlemock/src/gmock-matchers.cc create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googlemock/src/gmock-spec-builders.cc create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googlemock/src/gmock.cc create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googlemock/src/gmock_main.cc create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googlemock/test/BUILD.bazel create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googlemock/test/gmock-actions_test.cc create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googlemock/test/gmock-cardinalities_test.cc create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googlemock/test/gmock-function-mocker_test.cc create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googlemock/test/gmock-internal-utils_test.cc create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googlemock/test/gmock-matchers_test.cc create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googlemock/test/gmock-more-actions_test.cc create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googlemock/test/gmock-nice-strict_test.cc create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googlemock/test/gmock-port_test.cc create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googlemock/test/gmock-pp-string_test.cc create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googlemock/test/gmock-pp_test.cc create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googlemock/test/gmock-spec-builders_test.cc create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googlemock/test/gmock_all_test.cc create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googlemock/test/gmock_ex_test.cc create mode 100755 graphics/asymptote/LspCpp/third_party/uri/deps/googlemock/test/gmock_leak_test.py create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googlemock/test/gmock_leak_test_.cc create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googlemock/test/gmock_link2_test.cc create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googlemock/test/gmock_link_test.cc create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googlemock/test/gmock_link_test.h create mode 100755 graphics/asymptote/LspCpp/third_party/uri/deps/googlemock/test/gmock_output_test.py create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googlemock/test/gmock_output_test_.cc create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googlemock/test/gmock_output_test_golden.txt create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googlemock/test/gmock_stress_test.cc create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googlemock/test/gmock_test.cc create mode 100755 graphics/asymptote/LspCpp/third_party/uri/deps/googlemock/test/gmock_test_utils.py create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googletest/CMakeLists.txt create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googletest/README.md create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googletest/cmake/Config.cmake.in create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googletest/cmake/gtest.pc.in create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googletest/cmake/gtest_main.pc.in create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googletest/cmake/internal_utils.cmake create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googletest/cmake/libgtest.la.in create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googletest/docs/README.md create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googletest/include/gtest/gtest-assertion-result.h create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googletest/include/gtest/gtest-death-test.h create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googletest/include/gtest/gtest-matchers.h create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googletest/include/gtest/gtest-message.h create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googletest/include/gtest/gtest-param-test.h create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googletest/include/gtest/gtest-printers.h create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googletest/include/gtest/gtest-spi.h create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googletest/include/gtest/gtest-test-part.h create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googletest/include/gtest/gtest-typed-test.h create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googletest/include/gtest/gtest.h create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googletest/include/gtest/gtest_pred_impl.h create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googletest/include/gtest/gtest_prod.h create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googletest/include/gtest/internal/custom/README.md create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googletest/include/gtest/internal/custom/gtest-port.h create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googletest/include/gtest/internal/custom/gtest-printers.h create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googletest/include/gtest/internal/custom/gtest.h create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googletest/include/gtest/internal/gtest-death-test-internal.h create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googletest/include/gtest/internal/gtest-filepath.h create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googletest/include/gtest/internal/gtest-internal.h create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googletest/include/gtest/internal/gtest-param-util.h create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googletest/include/gtest/internal/gtest-port-arch.h create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googletest/include/gtest/internal/gtest-port.h create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googletest/include/gtest/internal/gtest-string.h create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googletest/include/gtest/internal/gtest-type-util.h create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googletest/samples/prime_tables.h create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googletest/samples/sample1.cc create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googletest/samples/sample1.h create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googletest/samples/sample10_unittest.cc create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googletest/samples/sample1_unittest.cc create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googletest/samples/sample2.cc create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googletest/samples/sample2.h create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googletest/samples/sample2_unittest.cc create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googletest/samples/sample3-inl.h create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googletest/samples/sample3_unittest.cc create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googletest/samples/sample4.cc create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googletest/samples/sample4.h create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googletest/samples/sample4_unittest.cc create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googletest/samples/sample5_unittest.cc create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googletest/samples/sample6_unittest.cc create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googletest/samples/sample7_unittest.cc create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googletest/samples/sample8_unittest.cc create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googletest/samples/sample9_unittest.cc create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googletest/src/gtest-all.cc create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googletest/src/gtest-assertion-result.cc create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googletest/src/gtest-death-test.cc create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googletest/src/gtest-filepath.cc create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googletest/src/gtest-internal-inl.h create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googletest/src/gtest-matchers.cc create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googletest/src/gtest-port.cc create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googletest/src/gtest-printers.cc create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googletest/src/gtest-test-part.cc create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googletest/src/gtest-typed-test.cc create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googletest/src/gtest.cc create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googletest/src/gtest_main.cc create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googletest/test/BUILD.bazel create mode 100755 graphics/asymptote/LspCpp/third_party/uri/deps/googletest/test/googletest-break-on-failure-unittest.py create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googletest/test/googletest-break-on-failure-unittest_.cc create mode 100755 graphics/asymptote/LspCpp/third_party/uri/deps/googletest/test/googletest-catch-exceptions-test.py create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googletest/test/googletest-catch-exceptions-test_.cc create mode 100755 graphics/asymptote/LspCpp/third_party/uri/deps/googletest/test/googletest-color-test.py create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googletest/test/googletest-color-test_.cc create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googletest/test/googletest-death-test-test.cc create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googletest/test/googletest-death-test_ex_test.cc create mode 100755 graphics/asymptote/LspCpp/third_party/uri/deps/googletest/test/googletest-env-var-test.py create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googletest/test/googletest-env-var-test_.cc create mode 100755 graphics/asymptote/LspCpp/third_party/uri/deps/googletest/test/googletest-failfast-unittest.py create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googletest/test/googletest-failfast-unittest_.cc create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googletest/test/googletest-filepath-test.cc create mode 100755 graphics/asymptote/LspCpp/third_party/uri/deps/googletest/test/googletest-filter-unittest.py create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googletest/test/googletest-filter-unittest_.cc create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googletest/test/googletest-global-environment-unittest.py create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googletest/test/googletest-global-environment-unittest_.cc create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googletest/test/googletest-json-outfiles-test.py create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googletest/test/googletest-json-output-unittest.py create mode 100755 graphics/asymptote/LspCpp/third_party/uri/deps/googletest/test/googletest-list-tests-unittest.py create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googletest/test/googletest-list-tests-unittest_.cc create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googletest/test/googletest-listener-test.cc create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googletest/test/googletest-message-test.cc create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googletest/test/googletest-options-test.cc create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googletest/test/googletest-output-test-golden-lin.txt create mode 100755 graphics/asymptote/LspCpp/third_party/uri/deps/googletest/test/googletest-output-test.py create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googletest/test/googletest-output-test_.cc create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googletest/test/googletest-param-test-invalid-name1-test.py create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googletest/test/googletest-param-test-invalid-name1-test_.cc create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googletest/test/googletest-param-test-invalid-name2-test.py create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googletest/test/googletest-param-test-invalid-name2-test_.cc create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googletest/test/googletest-param-test-test.cc create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googletest/test/googletest-param-test-test.h create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googletest/test/googletest-param-test2-test.cc create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googletest/test/googletest-port-test.cc create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googletest/test/googletest-printers-test.cc create mode 100755 graphics/asymptote/LspCpp/third_party/uri/deps/googletest/test/googletest-setuptestsuite-test.py create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googletest/test/googletest-setuptestsuite-test_.cc create mode 100755 graphics/asymptote/LspCpp/third_party/uri/deps/googletest/test/googletest-shuffle-test.py create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googletest/test/googletest-shuffle-test_.cc create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googletest/test/googletest-test-part-test.cc create mode 100755 graphics/asymptote/LspCpp/third_party/uri/deps/googletest/test/googletest-throw-on-failure-test.py create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googletest/test/googletest-throw-on-failure-test_.cc create mode 100755 graphics/asymptote/LspCpp/third_party/uri/deps/googletest/test/googletest-uninitialized-test.py create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googletest/test/googletest-uninitialized-test_.cc create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googletest/test/gtest-typed-test2_test.cc create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googletest/test/gtest-typed-test_test.cc create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googletest/test/gtest-typed-test_test.h create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googletest/test/gtest-unittest-api_test.cc create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googletest/test/gtest_all_test.cc create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googletest/test/gtest_assert_by_exception_test.cc create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googletest/test/gtest_environment_test.cc create mode 100755 graphics/asymptote/LspCpp/third_party/uri/deps/googletest/test/gtest_help_test.py create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googletest/test/gtest_help_test_.cc create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googletest/test/gtest_json_test_utils.py create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googletest/test/gtest_list_output_unittest.py create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googletest/test/gtest_list_output_unittest_.cc create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googletest/test/gtest_main_unittest.cc create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googletest/test/gtest_no_test_unittest.cc create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googletest/test/gtest_pred_impl_unittest.cc create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googletest/test/gtest_premature_exit_test.cc create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googletest/test/gtest_prod_test.cc create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googletest/test/gtest_repeat_test.cc create mode 100755 graphics/asymptote/LspCpp/third_party/uri/deps/googletest/test/gtest_skip_check_output_test.py create mode 100755 graphics/asymptote/LspCpp/third_party/uri/deps/googletest/test/gtest_skip_environment_check_output_test.py create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googletest/test/gtest_skip_in_environment_setup_test.cc create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googletest/test/gtest_skip_test.cc create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googletest/test/gtest_sole_header_test.cc create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googletest/test/gtest_stress_test.cc create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googletest/test/gtest_test_macro_stack_footprint_test.cc create mode 100755 graphics/asymptote/LspCpp/third_party/uri/deps/googletest/test/gtest_test_utils.py create mode 100755 graphics/asymptote/LspCpp/third_party/uri/deps/googletest/test/gtest_testbridge_test.py create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googletest/test/gtest_testbridge_test_.cc create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googletest/test/gtest_throw_on_failure_ex_test.cc create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googletest/test/gtest_unittest.cc create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googletest/test/gtest_xml_outfile1_test_.cc create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googletest/test/gtest_xml_outfile2_test_.cc create mode 100755 graphics/asymptote/LspCpp/third_party/uri/deps/googletest/test/gtest_xml_outfiles_test.py create mode 100755 graphics/asymptote/LspCpp/third_party/uri/deps/googletest/test/gtest_xml_output_unittest.py create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googletest/test/gtest_xml_output_unittest_.cc create mode 100755 graphics/asymptote/LspCpp/third_party/uri/deps/googletest/test/gtest_xml_test_utils.py create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googletest/test/production.cc create mode 100644 graphics/asymptote/LspCpp/third_party/uri/deps/googletest/test/production.h create mode 100644 graphics/asymptote/LspCpp/third_party/uri/include/network/optional.hpp create mode 100644 graphics/asymptote/LspCpp/third_party/uri/include/network/string_view.hpp create mode 100644 graphics/asymptote/LspCpp/third_party/uri/include/network/uri.hpp create mode 100644 graphics/asymptote/LspCpp/third_party/uri/include/network/uri/config.hpp create mode 100644 graphics/asymptote/LspCpp/third_party/uri/include/network/uri/detail/decode.hpp create mode 100644 graphics/asymptote/LspCpp/third_party/uri/include/network/uri/detail/encode.hpp create mode 100644 graphics/asymptote/LspCpp/third_party/uri/include/network/uri/detail/translate.hpp create mode 100644 graphics/asymptote/LspCpp/third_party/uri/include/network/uri/detail/uri_parts.hpp create mode 100644 graphics/asymptote/LspCpp/third_party/uri/include/network/uri/uri.hpp create mode 100644 graphics/asymptote/LspCpp/third_party/uri/include/network/uri/uri_builder.hpp create mode 100644 graphics/asymptote/LspCpp/third_party/uri/include/network/uri/uri_errors.hpp create mode 100644 graphics/asymptote/LspCpp/third_party/uri/include/network/uri/uri_io.hpp create mode 100644 graphics/asymptote/LspCpp/third_party/uri/src/CMakeFiles/CMakeDirectoryInformation.cmake create mode 100644 graphics/asymptote/LspCpp/third_party/uri/src/CMakeFiles/network-uri.dir/DependInfo.cmake create mode 100644 graphics/asymptote/LspCpp/third_party/uri/src/CMakeFiles/network-uri.dir/build.make create mode 100644 graphics/asymptote/LspCpp/third_party/uri/src/CMakeFiles/network-uri.dir/cmake_clean.cmake create mode 100644 graphics/asymptote/LspCpp/third_party/uri/src/CMakeFiles/network-uri.dir/cmake_clean_target.cmake create mode 100644 graphics/asymptote/LspCpp/third_party/uri/src/CMakeFiles/network-uri.dir/compiler_depend.internal create mode 100644 graphics/asymptote/LspCpp/third_party/uri/src/CMakeFiles/network-uri.dir/compiler_depend.make create mode 100644 graphics/asymptote/LspCpp/third_party/uri/src/CMakeFiles/network-uri.dir/compiler_depend.ts create mode 100644 graphics/asymptote/LspCpp/third_party/uri/src/CMakeFiles/network-uri.dir/depend.make create mode 100644 graphics/asymptote/LspCpp/third_party/uri/src/CMakeFiles/network-uri.dir/flags.make create mode 100644 graphics/asymptote/LspCpp/third_party/uri/src/CMakeFiles/network-uri.dir/link.txt create mode 100644 graphics/asymptote/LspCpp/third_party/uri/src/CMakeFiles/network-uri.dir/progress.make create mode 100644 graphics/asymptote/LspCpp/third_party/uri/src/CMakeFiles/progress.marks create mode 100644 graphics/asymptote/LspCpp/third_party/uri/src/CMakeLists.txt create mode 100644 graphics/asymptote/LspCpp/third_party/uri/src/Makefile create mode 100644 graphics/asymptote/LspCpp/third_party/uri/src/cmake_install.cmake create mode 100644 graphics/asymptote/LspCpp/third_party/uri/src/detail/algorithm.hpp create mode 100644 graphics/asymptote/LspCpp/third_party/uri/src/detail/algorithm_find.hpp create mode 100644 graphics/asymptote/LspCpp/third_party/uri/src/detail/algorithm_split.hpp create mode 100644 graphics/asymptote/LspCpp/third_party/uri/src/detail/grammar.hpp create mode 100644 graphics/asymptote/LspCpp/third_party/uri/src/detail/uri_advance_parts.cpp create mode 100644 graphics/asymptote/LspCpp/third_party/uri/src/detail/uri_advance_parts.hpp create mode 100644 graphics/asymptote/LspCpp/third_party/uri/src/detail/uri_normalize.cpp create mode 100644 graphics/asymptote/LspCpp/third_party/uri/src/detail/uri_normalize.hpp create mode 100644 graphics/asymptote/LspCpp/third_party/uri/src/detail/uri_parse.cpp create mode 100644 graphics/asymptote/LspCpp/third_party/uri/src/detail/uri_parse.hpp create mode 100644 graphics/asymptote/LspCpp/third_party/uri/src/detail/uri_parse_authority.cpp create mode 100644 graphics/asymptote/LspCpp/third_party/uri/src/detail/uri_parse_authority.hpp create mode 100644 graphics/asymptote/LspCpp/third_party/uri/src/detail/uri_percent_encode.hpp create mode 100644 graphics/asymptote/LspCpp/third_party/uri/src/detail/uri_resolve.cpp create mode 100644 graphics/asymptote/LspCpp/third_party/uri/src/detail/uri_resolve.hpp create mode 100644 graphics/asymptote/LspCpp/third_party/uri/src/uri.cpp create mode 100644 graphics/asymptote/LspCpp/third_party/uri/src/uri_builder.cpp create mode 100644 graphics/asymptote/LspCpp/third_party/uri/src/uri_errors.cpp create mode 100644 graphics/asymptote/LspCpp/third_party/uri/test/CMakeLists.txt create mode 100644 graphics/asymptote/LspCpp/third_party/uri/test/invalid_urls.txt create mode 100644 graphics/asymptote/LspCpp/third_party/uri/test/optional_test.cpp create mode 100644 graphics/asymptote/LspCpp/third_party/uri/test/string_utility.hpp create mode 100644 graphics/asymptote/LspCpp/third_party/uri/test/test_uri.hpp create mode 100644 graphics/asymptote/LspCpp/third_party/uri/test/uri_builder_test.cpp create mode 100644 graphics/asymptote/LspCpp/third_party/uri/test/uri_comparison_test.cpp create mode 100644 graphics/asymptote/LspCpp/third_party/uri/test/uri_encoding_test.cpp create mode 100644 graphics/asymptote/LspCpp/third_party/uri/test/uri_normalization_test.cpp create mode 100644 graphics/asymptote/LspCpp/third_party/uri/test/uri_parse_path_test.cpp create mode 100644 graphics/asymptote/LspCpp/third_party/uri/test/uri_parse_scheme_test.cpp create mode 100644 graphics/asymptote/LspCpp/third_party/uri/test/uri_parse_test.cpp create mode 100644 graphics/asymptote/LspCpp/third_party/uri/test/uri_reference_test.cpp create mode 100644 graphics/asymptote/LspCpp/third_party/uri/test/uri_resolve_test.cpp create mode 100644 graphics/asymptote/LspCpp/third_party/uri/test/uri_stream_test.cpp create mode 100644 graphics/asymptote/LspCpp/third_party/uri/test/uri_test.cpp create mode 100644 graphics/asymptote/LspCpp/third_party/uri/test/valid_urls.txt (limited to 'graphics/asymptote/LspCpp') diff --git a/graphics/asymptote/LspCpp/CMakeDoxyfile.in b/graphics/asymptote/LspCpp/CMakeDoxyfile.in new file mode 100644 index 0000000000..4b60987251 --- /dev/null +++ b/graphics/asymptote/LspCpp/CMakeDoxyfile.in @@ -0,0 +1,285 @@ +# +# DO NOT EDIT! THIS FILE WAS GENERATED BY CMAKE! +# + +DOXYFILE_ENCODING = @DOXYGEN_DOXYFILE_ENCODING@ +PROJECT_NAME = @DOXYGEN_PROJECT_NAME@ +PROJECT_NUMBER = @DOXYGEN_PROJECT_NUMBER@ +PROJECT_BRIEF = @DOXYGEN_PROJECT_BRIEF@ +PROJECT_LOGO = @DOXYGEN_PROJECT_LOGO@ +OUTPUT_DIRECTORY = @DOXYGEN_OUTPUT_DIRECTORY@ +CREATE_SUBDIRS = @DOXYGEN_CREATE_SUBDIRS@ +ALLOW_UNICODE_NAMES = @DOXYGEN_ALLOW_UNICODE_NAMES@ +OUTPUT_LANGUAGE = @DOXYGEN_OUTPUT_LANGUAGE@ +OUTPUT_TEXT_DIRECTION = @DOXYGEN_OUTPUT_TEXT_DIRECTION@ +BRIEF_MEMBER_DESC = @DOXYGEN_BRIEF_MEMBER_DESC@ +REPEAT_BRIEF = @DOXYGEN_REPEAT_BRIEF@ +ABBREVIATE_BRIEF = @DOXYGEN_ABBREVIATE_BRIEF@ +ALWAYS_DETAILED_SEC = @DOXYGEN_ALWAYS_DETAILED_SEC@ +INLINE_INHERITED_MEMB = @DOXYGEN_INLINE_INHERITED_MEMB@ +FULL_PATH_NAMES = @DOXYGEN_FULL_PATH_NAMES@ +STRIP_FROM_PATH = @DOXYGEN_STRIP_FROM_PATH@ +STRIP_FROM_INC_PATH = @DOXYGEN_STRIP_FROM_INC_PATH@ +SHORT_NAMES = @DOXYGEN_SHORT_NAMES@ +JAVADOC_AUTOBRIEF = @DOXYGEN_JAVADOC_AUTOBRIEF@ +JAVADOC_BANNER = @DOXYGEN_JAVADOC_BANNER@ +QT_AUTOBRIEF = @DOXYGEN_QT_AUTOBRIEF@ +MULTILINE_CPP_IS_BRIEF = @DOXYGEN_MULTILINE_CPP_IS_BRIEF@ +PYTHON_DOCSTRING = @DOXYGEN_PYTHON_DOCSTRING@ +INHERIT_DOCS = @DOXYGEN_INHERIT_DOCS@ +SEPARATE_MEMBER_PAGES = @DOXYGEN_SEPARATE_MEMBER_PAGES@ +TAB_SIZE = @DOXYGEN_TAB_SIZE@ +ALIASES = @DOXYGEN_ALIASES@ +OPTIMIZE_OUTPUT_FOR_C = @DOXYGEN_OPTIMIZE_OUTPUT_FOR_C@ +OPTIMIZE_OUTPUT_JAVA = @DOXYGEN_OPTIMIZE_OUTPUT_JAVA@ +OPTIMIZE_FOR_FORTRAN = @DOXYGEN_OPTIMIZE_FOR_FORTRAN@ +OPTIMIZE_OUTPUT_VHDL = @DOXYGEN_OPTIMIZE_OUTPUT_VHDL@ +OPTIMIZE_OUTPUT_SLICE = @DOXYGEN_OPTIMIZE_OUTPUT_SLICE@ +EXTENSION_MAPPING = @DOXYGEN_EXTENSION_MAPPING@ +MARKDOWN_SUPPORT = @DOXYGEN_MARKDOWN_SUPPORT@ +TOC_INCLUDE_HEADINGS = @DOXYGEN_TOC_INCLUDE_HEADINGS@ +AUTOLINK_SUPPORT = @DOXYGEN_AUTOLINK_SUPPORT@ +BUILTIN_STL_SUPPORT = @DOXYGEN_BUILTIN_STL_SUPPORT@ +CPP_CLI_SUPPORT = @DOXYGEN_CPP_CLI_SUPPORT@ +SIP_SUPPORT = @DOXYGEN_SIP_SUPPORT@ +IDL_PROPERTY_SUPPORT = @DOXYGEN_IDL_PROPERTY_SUPPORT@ +DISTRIBUTE_GROUP_DOC = @DOXYGEN_DISTRIBUTE_GROUP_DOC@ +GROUP_NESTED_COMPOUNDS = @DOXYGEN_GROUP_NESTED_COMPOUNDS@ +SUBGROUPING = @DOXYGEN_SUBGROUPING@ +INLINE_GROUPED_CLASSES = @DOXYGEN_INLINE_GROUPED_CLASSES@ +INLINE_SIMPLE_STRUCTS = @DOXYGEN_INLINE_SIMPLE_STRUCTS@ +TYPEDEF_HIDES_STRUCT = @DOXYGEN_TYPEDEF_HIDES_STRUCT@ +LOOKUP_CACHE_SIZE = @DOXYGEN_LOOKUP_CACHE_SIZE@ +NUM_PROC_THREADS = @DOXYGEN_NUM_PROC_THREADS@ +EXTRACT_ALL = @DOXYGEN_EXTRACT_ALL@ +EXTRACT_PRIVATE = @DOXYGEN_EXTRACT_PRIVATE@ +EXTRACT_PRIV_VIRTUAL = @DOXYGEN_EXTRACT_PRIV_VIRTUAL@ +EXTRACT_PACKAGE = @DOXYGEN_EXTRACT_PACKAGE@ +EXTRACT_STATIC = @DOXYGEN_EXTRACT_STATIC@ +EXTRACT_LOCAL_CLASSES = @DOXYGEN_EXTRACT_LOCAL_CLASSES@ +EXTRACT_LOCAL_METHODS = @DOXYGEN_EXTRACT_LOCAL_METHODS@ +EXTRACT_ANON_NSPACES = @DOXYGEN_EXTRACT_ANON_NSPACES@ +RESOLVE_UNNAMED_PARAMS = @DOXYGEN_RESOLVE_UNNAMED_PARAMS@ +HIDE_UNDOC_MEMBERS = @DOXYGEN_HIDE_UNDOC_MEMBERS@ +HIDE_UNDOC_CLASSES = @DOXYGEN_HIDE_UNDOC_CLASSES@ +HIDE_FRIEND_COMPOUNDS = @DOXYGEN_HIDE_FRIEND_COMPOUNDS@ +HIDE_IN_BODY_DOCS = @DOXYGEN_HIDE_IN_BODY_DOCS@ +INTERNAL_DOCS = @DOXYGEN_INTERNAL_DOCS@ +CASE_SENSE_NAMES = @DOXYGEN_CASE_SENSE_NAMES@ +HIDE_SCOPE_NAMES = @DOXYGEN_HIDE_SCOPE_NAMES@ +HIDE_COMPOUND_REFERENCE= @DOXYGEN_HIDE_COMPOUND_REFERENCE@ +SHOW_INCLUDE_FILES = @DOXYGEN_SHOW_INCLUDE_FILES@ +SHOW_GROUPED_MEMB_INC = @DOXYGEN_SHOW_GROUPED_MEMB_INC@ +FORCE_LOCAL_INCLUDES = @DOXYGEN_FORCE_LOCAL_INCLUDES@ +INLINE_INFO = @DOXYGEN_INLINE_INFO@ +SORT_MEMBER_DOCS = @DOXYGEN_SORT_MEMBER_DOCS@ +SORT_BRIEF_DOCS = @DOXYGEN_SORT_BRIEF_DOCS@ +SORT_MEMBERS_CTORS_1ST = @DOXYGEN_SORT_MEMBERS_CTORS_1ST@ +SORT_GROUP_NAMES = @DOXYGEN_SORT_GROUP_NAMES@ +SORT_BY_SCOPE_NAME = @DOXYGEN_SORT_BY_SCOPE_NAME@ +STRICT_PROTO_MATCHING = @DOXYGEN_STRICT_PROTO_MATCHING@ +GENERATE_TODOLIST = @DOXYGEN_GENERATE_TODOLIST@ +GENERATE_TESTLIST = @DOXYGEN_GENERATE_TESTLIST@ +GENERATE_BUGLIST = @DOXYGEN_GENERATE_BUGLIST@ +GENERATE_DEPRECATEDLIST= @DOXYGEN_GENERATE_DEPRECATEDLIST@ +ENABLED_SECTIONS = @DOXYGEN_ENABLED_SECTIONS@ +MAX_INITIALIZER_LINES = @DOXYGEN_MAX_INITIALIZER_LINES@ +SHOW_USED_FILES = @DOXYGEN_SHOW_USED_FILES@ +SHOW_FILES = @DOXYGEN_SHOW_FILES@ +SHOW_NAMESPACES = @DOXYGEN_SHOW_NAMESPACES@ +FILE_VERSION_FILTER = @DOXYGEN_FILE_VERSION_FILTER@ +LAYOUT_FILE = @DOXYGEN_LAYOUT_FILE@ +CITE_BIB_FILES = @DOXYGEN_CITE_BIB_FILES@ +QUIET = @DOXYGEN_QUIET@ +WARNINGS = @DOXYGEN_WARNINGS@ +WARN_IF_UNDOCUMENTED = @DOXYGEN_WARN_IF_UNDOCUMENTED@ +WARN_IF_DOC_ERROR = @DOXYGEN_WARN_IF_DOC_ERROR@ +WARN_NO_PARAMDOC = @DOXYGEN_WARN_NO_PARAMDOC@ +WARN_AS_ERROR = @DOXYGEN_WARN_AS_ERROR@ +WARN_FORMAT = @DOXYGEN_WARN_FORMAT@ +WARN_LOGFILE = @DOXYGEN_WARN_LOGFILE@ +INPUT = @DOXYGEN_INPUT@ +INPUT_ENCODING = @DOXYGEN_INPUT_ENCODING@ +FILE_PATTERNS = @DOXYGEN_FILE_PATTERNS@ +RECURSIVE = @DOXYGEN_RECURSIVE@ +EXCLUDE = @DOXYGEN_EXCLUDE@ +EXCLUDE_SYMLINKS = @DOXYGEN_EXCLUDE_SYMLINKS@ +EXCLUDE_PATTERNS = @DOXYGEN_EXCLUDE_PATTERNS@ +EXCLUDE_SYMBOLS = @DOXYGEN_EXCLUDE_SYMBOLS@ +EXAMPLE_PATH = @DOXYGEN_EXAMPLE_PATH@ +EXAMPLE_PATTERNS = @DOXYGEN_EXAMPLE_PATTERNS@ +EXAMPLE_RECURSIVE = @DOXYGEN_EXAMPLE_RECURSIVE@ +IMAGE_PATH = @DOXYGEN_IMAGE_PATH@ +INPUT_FILTER = @DOXYGEN_INPUT_FILTER@ +FILTER_PATTERNS = @DOXYGEN_FILTER_PATTERNS@ +FILTER_SOURCE_FILES = @DOXYGEN_FILTER_SOURCE_FILES@ +FILTER_SOURCE_PATTERNS = @DOXYGEN_FILTER_SOURCE_PATTERNS@ +USE_MDFILE_AS_MAINPAGE = @DOXYGEN_USE_MDFILE_AS_MAINPAGE@ +SOURCE_BROWSER = @DOXYGEN_SOURCE_BROWSER@ +INLINE_SOURCES = @DOXYGEN_INLINE_SOURCES@ +STRIP_CODE_COMMENTS = @DOXYGEN_STRIP_CODE_COMMENTS@ +REFERENCED_BY_RELATION = @DOXYGEN_REFERENCED_BY_RELATION@ +REFERENCES_RELATION = @DOXYGEN_REFERENCES_RELATION@ +REFERENCES_LINK_SOURCE = @DOXYGEN_REFERENCES_LINK_SOURCE@ +SOURCE_TOOLTIPS = @DOXYGEN_SOURCE_TOOLTIPS@ +USE_HTAGS = @DOXYGEN_USE_HTAGS@ +VERBATIM_HEADERS = @DOXYGEN_VERBATIM_HEADERS@ +CLANG_ASSISTED_PARSING = @DOXYGEN_CLANG_ASSISTED_PARSING@ +CLANG_ADD_INC_PATHS = @DOXYGEN_CLANG_ADD_INC_PATHS@ +CLANG_OPTIONS = @DOXYGEN_CLANG_OPTIONS@ +CLANG_DATABASE_PATH = @DOXYGEN_CLANG_DATABASE_PATH@ +ALPHABETICAL_INDEX = @DOXYGEN_ALPHABETICAL_INDEX@ +IGNORE_PREFIX = @DOXYGEN_IGNORE_PREFIX@ +GENERATE_HTML = @DOXYGEN_GENERATE_HTML@ +HTML_OUTPUT = @DOXYGEN_HTML_OUTPUT@ +HTML_FILE_EXTENSION = @DOXYGEN_HTML_FILE_EXTENSION@ +HTML_HEADER = @DOXYGEN_HTML_HEADER@ +HTML_FOOTER = @DOXYGEN_HTML_FOOTER@ +HTML_STYLESHEET = @DOXYGEN_HTML_STYLESHEET@ +HTML_EXTRA_STYLESHEET = @DOXYGEN_HTML_EXTRA_STYLESHEET@ +HTML_EXTRA_FILES = @DOXYGEN_HTML_EXTRA_FILES@ +HTML_COLORSTYLE_HUE = @DOXYGEN_HTML_COLORSTYLE_HUE@ +HTML_COLORSTYLE_SAT = @DOXYGEN_HTML_COLORSTYLE_SAT@ +HTML_COLORSTYLE_GAMMA = @DOXYGEN_HTML_COLORSTYLE_GAMMA@ +HTML_TIMESTAMP = @DOXYGEN_HTML_TIMESTAMP@ +HTML_DYNAMIC_MENUS = @DOXYGEN_HTML_DYNAMIC_MENUS@ +HTML_DYNAMIC_SECTIONS = @DOXYGEN_HTML_DYNAMIC_SECTIONS@ +HTML_INDEX_NUM_ENTRIES = @DOXYGEN_HTML_INDEX_NUM_ENTRIES@ +GENERATE_DOCSET = @DOXYGEN_GENERATE_DOCSET@ +DOCSET_FEEDNAME = @DOXYGEN_DOCSET_FEEDNAME@ +DOCSET_BUNDLE_ID = @DOXYGEN_DOCSET_BUNDLE_ID@ +DOCSET_PUBLISHER_ID = @DOXYGEN_DOCSET_PUBLISHER_ID@ +DOCSET_PUBLISHER_NAME = @DOXYGEN_DOCSET_PUBLISHER_NAME@ +GENERATE_HTMLHELP = @DOXYGEN_GENERATE_HTMLHELP@ +CHM_FILE = @DOXYGEN_CHM_FILE@ +HHC_LOCATION = @DOXYGEN_HHC_LOCATION@ +GENERATE_CHI = @DOXYGEN_GENERATE_CHI@ +CHM_INDEX_ENCODING = @DOXYGEN_CHM_INDEX_ENCODING@ +BINARY_TOC = @DOXYGEN_BINARY_TOC@ +TOC_EXPAND = @DOXYGEN_TOC_EXPAND@ +GENERATE_QHP = @DOXYGEN_GENERATE_QHP@ +QCH_FILE = @DOXYGEN_QCH_FILE@ +QHP_NAMESPACE = @DOXYGEN_QHP_NAMESPACE@ +QHP_VIRTUAL_FOLDER = @DOXYGEN_QHP_VIRTUAL_FOLDER@ +QHP_CUST_FILTER_NAME = @DOXYGEN_QHP_CUST_FILTER_NAME@ +QHP_CUST_FILTER_ATTRS = @DOXYGEN_QHP_CUST_FILTER_ATTRS@ +QHP_SECT_FILTER_ATTRS = @DOXYGEN_QHP_SECT_FILTER_ATTRS@ +QHG_LOCATION = @DOXYGEN_QHG_LOCATION@ +GENERATE_ECLIPSEHELP = @DOXYGEN_GENERATE_ECLIPSEHELP@ +ECLIPSE_DOC_ID = @DOXYGEN_ECLIPSE_DOC_ID@ +DISABLE_INDEX = @DOXYGEN_DISABLE_INDEX@ +GENERATE_TREEVIEW = @DOXYGEN_GENERATE_TREEVIEW@ +ENUM_VALUES_PER_LINE = @DOXYGEN_ENUM_VALUES_PER_LINE@ +TREEVIEW_WIDTH = @DOXYGEN_TREEVIEW_WIDTH@ +EXT_LINKS_IN_WINDOW = @DOXYGEN_EXT_LINKS_IN_WINDOW@ +HTML_FORMULA_FORMAT = @DOXYGEN_HTML_FORMULA_FORMAT@ +FORMULA_FONTSIZE = @DOXYGEN_FORMULA_FONTSIZE@ +FORMULA_TRANSPARENT = @DOXYGEN_FORMULA_TRANSPARENT@ +FORMULA_MACROFILE = @DOXYGEN_FORMULA_MACROFILE@ +USE_MATHJAX = @DOXYGEN_USE_MATHJAX@ +MATHJAX_FORMAT = @DOXYGEN_MATHJAX_FORMAT@ +MATHJAX_RELPATH = @DOXYGEN_MATHJAX_RELPATH@ +MATHJAX_EXTENSIONS = @DOXYGEN_MATHJAX_EXTENSIONS@ +MATHJAX_CODEFILE = @DOXYGEN_MATHJAX_CODEFILE@ +SEARCHENGINE = @DOXYGEN_SEARCHENGINE@ +SERVER_BASED_SEARCH = @DOXYGEN_SERVER_BASED_SEARCH@ +EXTERNAL_SEARCH = @DOXYGEN_EXTERNAL_SEARCH@ +SEARCHENGINE_URL = @DOXYGEN_SEARCHENGINE_URL@ +SEARCHDATA_FILE = @DOXYGEN_SEARCHDATA_FILE@ +EXTERNAL_SEARCH_ID = @DOXYGEN_EXTERNAL_SEARCH_ID@ +EXTRA_SEARCH_MAPPINGS = @DOXYGEN_EXTRA_SEARCH_MAPPINGS@ +GENERATE_LATEX = @DOXYGEN_GENERATE_LATEX@ +LATEX_OUTPUT = @DOXYGEN_LATEX_OUTPUT@ +LATEX_CMD_NAME = @DOXYGEN_LATEX_CMD_NAME@ +MAKEINDEX_CMD_NAME = @DOXYGEN_MAKEINDEX_CMD_NAME@ +LATEX_MAKEINDEX_CMD = @DOXYGEN_LATEX_MAKEINDEX_CMD@ +COMPACT_LATEX = @DOXYGEN_COMPACT_LATEX@ +PAPER_TYPE = @DOXYGEN_PAPER_TYPE@ +EXTRA_PACKAGES = @DOXYGEN_EXTRA_PACKAGES@ +LATEX_HEADER = @DOXYGEN_LATEX_HEADER@ +LATEX_FOOTER = @DOXYGEN_LATEX_FOOTER@ +LATEX_EXTRA_STYLESHEET = @DOXYGEN_LATEX_EXTRA_STYLESHEET@ +LATEX_EXTRA_FILES = @DOXYGEN_LATEX_EXTRA_FILES@ +PDF_HYPERLINKS = @DOXYGEN_PDF_HYPERLINKS@ +USE_PDFLATEX = @DOXYGEN_USE_PDFLATEX@ +LATEX_BATCHMODE = @DOXYGEN_LATEX_BATCHMODE@ +LATEX_HIDE_INDICES = @DOXYGEN_LATEX_HIDE_INDICES@ +LATEX_SOURCE_CODE = @DOXYGEN_LATEX_SOURCE_CODE@ +LATEX_BIB_STYLE = @DOXYGEN_LATEX_BIB_STYLE@ +LATEX_TIMESTAMP = @DOXYGEN_LATEX_TIMESTAMP@ +LATEX_EMOJI_DIRECTORY = @DOXYGEN_LATEX_EMOJI_DIRECTORY@ +GENERATE_RTF = @DOXYGEN_GENERATE_RTF@ +RTF_OUTPUT = @DOXYGEN_RTF_OUTPUT@ +COMPACT_RTF = @DOXYGEN_COMPACT_RTF@ +RTF_HYPERLINKS = @DOXYGEN_RTF_HYPERLINKS@ +RTF_STYLESHEET_FILE = @DOXYGEN_RTF_STYLESHEET_FILE@ +RTF_EXTENSIONS_FILE = @DOXYGEN_RTF_EXTENSIONS_FILE@ +RTF_SOURCE_CODE = @DOXYGEN_RTF_SOURCE_CODE@ +GENERATE_MAN = @DOXYGEN_GENERATE_MAN@ +MAN_OUTPUT = @DOXYGEN_MAN_OUTPUT@ +MAN_EXTENSION = @DOXYGEN_MAN_EXTENSION@ +MAN_SUBDIR = @DOXYGEN_MAN_SUBDIR@ +MAN_LINKS = @DOXYGEN_MAN_LINKS@ +GENERATE_XML = @DOXYGEN_GENERATE_XML@ +XML_OUTPUT = @DOXYGEN_XML_OUTPUT@ +XML_PROGRAMLISTING = @DOXYGEN_XML_PROGRAMLISTING@ +XML_NS_MEMB_FILE_SCOPE = @DOXYGEN_XML_NS_MEMB_FILE_SCOPE@ +GENERATE_DOCBOOK = @DOXYGEN_GENERATE_DOCBOOK@ +DOCBOOK_OUTPUT = @DOXYGEN_DOCBOOK_OUTPUT@ +DOCBOOK_PROGRAMLISTING = @DOXYGEN_DOCBOOK_PROGRAMLISTING@ +GENERATE_AUTOGEN_DEF = @DOXYGEN_GENERATE_AUTOGEN_DEF@ +GENERATE_PERLMOD = @DOXYGEN_GENERATE_PERLMOD@ +PERLMOD_LATEX = @DOXYGEN_PERLMOD_LATEX@ +PERLMOD_PRETTY = @DOXYGEN_PERLMOD_PRETTY@ +PERLMOD_MAKEVAR_PREFIX = @DOXYGEN_PERLMOD_MAKEVAR_PREFIX@ +ENABLE_PREPROCESSING = @DOXYGEN_ENABLE_PREPROCESSING@ +MACRO_EXPANSION = @DOXYGEN_MACRO_EXPANSION@ +EXPAND_ONLY_PREDEF = @DOXYGEN_EXPAND_ONLY_PREDEF@ +SEARCH_INCLUDES = @DOXYGEN_SEARCH_INCLUDES@ +INCLUDE_PATH = @DOXYGEN_INCLUDE_PATH@ +INCLUDE_FILE_PATTERNS = @DOXYGEN_INCLUDE_FILE_PATTERNS@ +PREDEFINED = @DOXYGEN_PREDEFINED@ +EXPAND_AS_DEFINED = @DOXYGEN_EXPAND_AS_DEFINED@ +SKIP_FUNCTION_MACROS = @DOXYGEN_SKIP_FUNCTION_MACROS@ +TAGFILES = @DOXYGEN_TAGFILES@ +GENERATE_TAGFILE = @DOXYGEN_GENERATE_TAGFILE@ +ALLEXTERNALS = @DOXYGEN_ALLEXTERNALS@ +EXTERNAL_GROUPS = @DOXYGEN_EXTERNAL_GROUPS@ +EXTERNAL_PAGES = @DOXYGEN_EXTERNAL_PAGES@ +CLASS_DIAGRAMS = @DOXYGEN_CLASS_DIAGRAMS@ +DIA_PATH = @DOXYGEN_DIA_PATH@ +HIDE_UNDOC_RELATIONS = @DOXYGEN_HIDE_UNDOC_RELATIONS@ +HAVE_DOT = @DOXYGEN_HAVE_DOT@ +DOT_NUM_THREADS = @DOXYGEN_DOT_NUM_THREADS@ +DOT_FONTNAME = @DOXYGEN_DOT_FONTNAME@ +DOT_FONTSIZE = @DOXYGEN_DOT_FONTSIZE@ +DOT_FONTPATH = @DOXYGEN_DOT_FONTPATH@ +CLASS_GRAPH = @DOXYGEN_CLASS_GRAPH@ +COLLABORATION_GRAPH = @DOXYGEN_COLLABORATION_GRAPH@ +GROUP_GRAPHS = @DOXYGEN_GROUP_GRAPHS@ +UML_LOOK = @DOXYGEN_UML_LOOK@ +UML_LIMIT_NUM_FIELDS = @DOXYGEN_UML_LIMIT_NUM_FIELDS@ +DOT_UML_DETAILS = @DOXYGEN_DOT_UML_DETAILS@ +DOT_WRAP_THRESHOLD = @DOXYGEN_DOT_WRAP_THRESHOLD@ +TEMPLATE_RELATIONS = @DOXYGEN_TEMPLATE_RELATIONS@ +INCLUDE_GRAPH = @DOXYGEN_INCLUDE_GRAPH@ +INCLUDED_BY_GRAPH = @DOXYGEN_INCLUDED_BY_GRAPH@ +CALL_GRAPH = @DOXYGEN_CALL_GRAPH@ +CALLER_GRAPH = @DOXYGEN_CALLER_GRAPH@ +GRAPHICAL_HIERARCHY = @DOXYGEN_GRAPHICAL_HIERARCHY@ +DIRECTORY_GRAPH = @DOXYGEN_DIRECTORY_GRAPH@ +DOT_IMAGE_FORMAT = @DOXYGEN_DOT_IMAGE_FORMAT@ +INTERACTIVE_SVG = @DOXYGEN_INTERACTIVE_SVG@ +DOT_PATH = @DOXYGEN_DOT_PATH@ +DOTFILE_DIRS = @DOXYGEN_DOTFILE_DIRS@ +MSCFILE_DIRS = @DOXYGEN_MSCFILE_DIRS@ +DIAFILE_DIRS = @DOXYGEN_DIAFILE_DIRS@ +PLANTUML_JAR_PATH = @DOXYGEN_PLANTUML_JAR_PATH@ +PLANTUML_CFG_FILE = @DOXYGEN_PLANTUML_CFG_FILE@ +PLANTUML_INCLUDE_PATH = @DOXYGEN_PLANTUML_INCLUDE_PATH@ +DOT_GRAPH_MAX_NODES = @DOXYGEN_DOT_GRAPH_MAX_NODES@ +MAX_DOT_GRAPH_DEPTH = @DOXYGEN_MAX_DOT_GRAPH_DEPTH@ +DOT_TRANSPARENT = @DOXYGEN_DOT_TRANSPARENT@ +DOT_MULTI_TARGETS = @DOXYGEN_DOT_MULTI_TARGETS@ +GENERATE_LEGEND = @DOXYGEN_GENERATE_LEGEND@ +DOT_CLEANUP = @DOXYGEN_DOT_CLEANUP@ diff --git a/graphics/asymptote/LspCpp/CMakeDoxygenDefaults.cmake b/graphics/asymptote/LspCpp/CMakeDoxygenDefaults.cmake new file mode 100644 index 0000000000..920e5c71d7 --- /dev/null +++ b/graphics/asymptote/LspCpp/CMakeDoxygenDefaults.cmake @@ -0,0 +1,688 @@ +# +# DO NOT EDIT! THIS FILE WAS GENERATED BY CMAKE! +# + +if(NOT DEFINED DOXYGEN_DOXYFILE_ENCODING) + set(DOXYGEN_DOXYFILE_ENCODING UTF-8) +endif() +if(NOT DEFINED DOXYGEN_PROJECT_NAME) + set(DOXYGEN_PROJECT_NAME "My Project") +endif() +if(NOT DEFINED DOXYGEN_CREATE_SUBDIRS) + set(DOXYGEN_CREATE_SUBDIRS NO) +endif() +if(NOT DEFINED DOXYGEN_ALLOW_UNICODE_NAMES) + set(DOXYGEN_ALLOW_UNICODE_NAMES NO) +endif() +if(NOT DEFINED DOXYGEN_OUTPUT_LANGUAGE) + set(DOXYGEN_OUTPUT_LANGUAGE English) +endif() +if(NOT DEFINED DOXYGEN_OUTPUT_TEXT_DIRECTION) + set(DOXYGEN_OUTPUT_TEXT_DIRECTION None) +endif() +if(NOT DEFINED DOXYGEN_BRIEF_MEMBER_DESC) + set(DOXYGEN_BRIEF_MEMBER_DESC YES) +endif() +if(NOT DEFINED DOXYGEN_REPEAT_BRIEF) + set(DOXYGEN_REPEAT_BRIEF YES) +endif() +if(NOT DEFINED DOXYGEN_ABBREVIATE_BRIEF) + set(DOXYGEN_ABBREVIATE_BRIEF "The $name class" + "The $name widget" + "The $name file" + is + provides + specifies + contains + represents + a + an + the) +endif() +if(NOT DEFINED DOXYGEN_ALWAYS_DETAILED_SEC) + set(DOXYGEN_ALWAYS_DETAILED_SEC NO) +endif() +if(NOT DEFINED DOXYGEN_INLINE_INHERITED_MEMB) + set(DOXYGEN_INLINE_INHERITED_MEMB NO) +endif() +if(NOT DEFINED DOXYGEN_FULL_PATH_NAMES) + set(DOXYGEN_FULL_PATH_NAMES YES) +endif() +if(NOT DEFINED DOXYGEN_SHORT_NAMES) + set(DOXYGEN_SHORT_NAMES NO) +endif() +if(NOT DEFINED DOXYGEN_JAVADOC_AUTOBRIEF) + set(DOXYGEN_JAVADOC_AUTOBRIEF NO) +endif() +if(NOT DEFINED DOXYGEN_JAVADOC_BANNER) + set(DOXYGEN_JAVADOC_BANNER NO) +endif() +if(NOT DEFINED DOXYGEN_QT_AUTOBRIEF) + set(DOXYGEN_QT_AUTOBRIEF NO) +endif() +if(NOT DEFINED DOXYGEN_MULTILINE_CPP_IS_BRIEF) + set(DOXYGEN_MULTILINE_CPP_IS_BRIEF NO) +endif() +if(NOT DEFINED DOXYGEN_PYTHON_DOCSTRING) + set(DOXYGEN_PYTHON_DOCSTRING YES) +endif() +if(NOT DEFINED DOXYGEN_INHERIT_DOCS) + set(DOXYGEN_INHERIT_DOCS YES) +endif() +if(NOT DEFINED DOXYGEN_SEPARATE_MEMBER_PAGES) + set(DOXYGEN_SEPARATE_MEMBER_PAGES NO) +endif() +if(NOT DEFINED DOXYGEN_TAB_SIZE) + set(DOXYGEN_TAB_SIZE 4) +endif() +if(NOT DEFINED DOXYGEN_OPTIMIZE_OUTPUT_FOR_C) + set(DOXYGEN_OPTIMIZE_OUTPUT_FOR_C NO) +endif() +if(NOT DEFINED DOXYGEN_OPTIMIZE_OUTPUT_JAVA) + set(DOXYGEN_OPTIMIZE_OUTPUT_JAVA NO) +endif() +if(NOT DEFINED DOXYGEN_OPTIMIZE_FOR_FORTRAN) + set(DOXYGEN_OPTIMIZE_FOR_FORTRAN NO) +endif() +if(NOT DEFINED DOXYGEN_OPTIMIZE_OUTPUT_VHDL) + set(DOXYGEN_OPTIMIZE_OUTPUT_VHDL NO) +endif() +if(NOT DEFINED DOXYGEN_OPTIMIZE_OUTPUT_SLICE) + set(DOXYGEN_OPTIMIZE_OUTPUT_SLICE NO) +endif() +if(NOT DEFINED DOXYGEN_MARKDOWN_SUPPORT) + set(DOXYGEN_MARKDOWN_SUPPORT YES) +endif() +if(NOT DEFINED DOXYGEN_TOC_INCLUDE_HEADINGS) + set(DOXYGEN_TOC_INCLUDE_HEADINGS 5) +endif() +if(NOT DEFINED DOXYGEN_AUTOLINK_SUPPORT) + set(DOXYGEN_AUTOLINK_SUPPORT YES) +endif() +if(NOT DEFINED DOXYGEN_BUILTIN_STL_SUPPORT) + set(DOXYGEN_BUILTIN_STL_SUPPORT NO) +endif() +if(NOT DEFINED DOXYGEN_CPP_CLI_SUPPORT) + set(DOXYGEN_CPP_CLI_SUPPORT NO) +endif() +if(NOT DEFINED DOXYGEN_SIP_SUPPORT) + set(DOXYGEN_SIP_SUPPORT NO) +endif() +if(NOT DEFINED DOXYGEN_IDL_PROPERTY_SUPPORT) + set(DOXYGEN_IDL_PROPERTY_SUPPORT YES) +endif() +if(NOT DEFINED DOXYGEN_DISTRIBUTE_GROUP_DOC) + set(DOXYGEN_DISTRIBUTE_GROUP_DOC NO) +endif() +if(NOT DEFINED DOXYGEN_GROUP_NESTED_COMPOUNDS) + set(DOXYGEN_GROUP_NESTED_COMPOUNDS NO) +endif() +if(NOT DEFINED DOXYGEN_SUBGROUPING) + set(DOXYGEN_SUBGROUPING YES) +endif() +if(NOT DEFINED DOXYGEN_INLINE_GROUPED_CLASSES) + set(DOXYGEN_INLINE_GROUPED_CLASSES NO) +endif() +if(NOT DEFINED DOXYGEN_INLINE_SIMPLE_STRUCTS) + set(DOXYGEN_INLINE_SIMPLE_STRUCTS NO) +endif() +if(NOT DEFINED DOXYGEN_TYPEDEF_HIDES_STRUCT) + set(DOXYGEN_TYPEDEF_HIDES_STRUCT NO) +endif() +if(NOT DEFINED DOXYGEN_LOOKUP_CACHE_SIZE) + set(DOXYGEN_LOOKUP_CACHE_SIZE 0) +endif() +if(NOT DEFINED DOXYGEN_NUM_PROC_THREADS) + set(DOXYGEN_NUM_PROC_THREADS 1) +endif() +if(NOT DEFINED DOXYGEN_EXTRACT_ALL) + set(DOXYGEN_EXTRACT_ALL NO) +endif() +if(NOT DEFINED DOXYGEN_EXTRACT_PRIVATE) + set(DOXYGEN_EXTRACT_PRIVATE NO) +endif() +if(NOT DEFINED DOXYGEN_EXTRACT_PRIV_VIRTUAL) + set(DOXYGEN_EXTRACT_PRIV_VIRTUAL NO) +endif() +if(NOT DEFINED DOXYGEN_EXTRACT_PACKAGE) + set(DOXYGEN_EXTRACT_PACKAGE NO) +endif() +if(NOT DEFINED DOXYGEN_EXTRACT_STATIC) + set(DOXYGEN_EXTRACT_STATIC NO) +endif() +if(NOT DEFINED DOXYGEN_EXTRACT_LOCAL_CLASSES) + set(DOXYGEN_EXTRACT_LOCAL_CLASSES YES) +endif() +if(NOT DEFINED DOXYGEN_EXTRACT_LOCAL_METHODS) + set(DOXYGEN_EXTRACT_LOCAL_METHODS NO) +endif() +if(NOT DEFINED DOXYGEN_EXTRACT_ANON_NSPACES) + set(DOXYGEN_EXTRACT_ANON_NSPACES NO) +endif() +if(NOT DEFINED DOXYGEN_RESOLVE_UNNAMED_PARAMS) + set(DOXYGEN_RESOLVE_UNNAMED_PARAMS YES) +endif() +if(NOT DEFINED DOXYGEN_HIDE_UNDOC_MEMBERS) + set(DOXYGEN_HIDE_UNDOC_MEMBERS NO) +endif() +if(NOT DEFINED DOXYGEN_HIDE_UNDOC_CLASSES) + set(DOXYGEN_HIDE_UNDOC_CLASSES NO) +endif() +if(NOT DEFINED DOXYGEN_HIDE_FRIEND_COMPOUNDS) + set(DOXYGEN_HIDE_FRIEND_COMPOUNDS NO) +endif() +if(NOT DEFINED DOXYGEN_HIDE_IN_BODY_DOCS) + set(DOXYGEN_HIDE_IN_BODY_DOCS NO) +endif() +if(NOT DEFINED DOXYGEN_INTERNAL_DOCS) + set(DOXYGEN_INTERNAL_DOCS NO) +endif() +if(NOT DEFINED DOXYGEN_CASE_SENSE_NAMES) + set(DOXYGEN_CASE_SENSE_NAMES YES) +endif() +if(NOT DEFINED DOXYGEN_HIDE_SCOPE_NAMES) + set(DOXYGEN_HIDE_SCOPE_NAMES NO) +endif() +if(NOT DEFINED DOXYGEN_HIDE_COMPOUND_REFERENCE) + set(DOXYGEN_HIDE_COMPOUND_REFERENCE NO) +endif() +if(NOT DEFINED DOXYGEN_SHOW_INCLUDE_FILES) + set(DOXYGEN_SHOW_INCLUDE_FILES YES) +endif() +if(NOT DEFINED DOXYGEN_SHOW_GROUPED_MEMB_INC) + set(DOXYGEN_SHOW_GROUPED_MEMB_INC NO) +endif() +if(NOT DEFINED DOXYGEN_FORCE_LOCAL_INCLUDES) + set(DOXYGEN_FORCE_LOCAL_INCLUDES NO) +endif() +if(NOT DEFINED DOXYGEN_INLINE_INFO) + set(DOXYGEN_INLINE_INFO YES) +endif() +if(NOT DEFINED DOXYGEN_SORT_MEMBER_DOCS) + set(DOXYGEN_SORT_MEMBER_DOCS YES) +endif() +if(NOT DEFINED DOXYGEN_SORT_BRIEF_DOCS) + set(DOXYGEN_SORT_BRIEF_DOCS NO) +endif() +if(NOT DEFINED DOXYGEN_SORT_MEMBERS_CTORS_1ST) + set(DOXYGEN_SORT_MEMBERS_CTORS_1ST NO) +endif() +if(NOT DEFINED DOXYGEN_SORT_GROUP_NAMES) + set(DOXYGEN_SORT_GROUP_NAMES NO) +endif() +if(NOT DEFINED DOXYGEN_SORT_BY_SCOPE_NAME) + set(DOXYGEN_SORT_BY_SCOPE_NAME NO) +endif() +if(NOT DEFINED DOXYGEN_STRICT_PROTO_MATCHING) + set(DOXYGEN_STRICT_PROTO_MATCHING NO) +endif() +if(NOT DEFINED DOXYGEN_GENERATE_TODOLIST) + set(DOXYGEN_GENERATE_TODOLIST YES) +endif() +if(NOT DEFINED DOXYGEN_GENERATE_TESTLIST) + set(DOXYGEN_GENERATE_TESTLIST YES) +endif() +if(NOT DEFINED DOXYGEN_GENERATE_BUGLIST) + set(DOXYGEN_GENERATE_BUGLIST YES) +endif() +if(NOT DEFINED DOXYGEN_GENERATE_DEPRECATEDLIST) + set(DOXYGEN_GENERATE_DEPRECATEDLIST YES) +endif() +if(NOT DEFINED DOXYGEN_MAX_INITIALIZER_LINES) + set(DOXYGEN_MAX_INITIALIZER_LINES 30) +endif() +if(NOT DEFINED DOXYGEN_SHOW_USED_FILES) + set(DOXYGEN_SHOW_USED_FILES YES) +endif() +if(NOT DEFINED DOXYGEN_SHOW_FILES) + set(DOXYGEN_SHOW_FILES YES) +endif() +if(NOT DEFINED DOXYGEN_SHOW_NAMESPACES) + set(DOXYGEN_SHOW_NAMESPACES YES) +endif() +if(NOT DEFINED DOXYGEN_QUIET) + set(DOXYGEN_QUIET NO) +endif() +if(NOT DEFINED DOXYGEN_WARNINGS) + set(DOXYGEN_WARNINGS YES) +endif() +if(NOT DEFINED DOXYGEN_WARN_IF_UNDOCUMENTED) + set(DOXYGEN_WARN_IF_UNDOCUMENTED YES) +endif() +if(NOT DEFINED DOXYGEN_WARN_IF_DOC_ERROR) + set(DOXYGEN_WARN_IF_DOC_ERROR YES) +endif() +if(NOT DEFINED DOXYGEN_WARN_NO_PARAMDOC) + set(DOXYGEN_WARN_NO_PARAMDOC NO) +endif() +if(NOT DEFINED DOXYGEN_WARN_AS_ERROR) + set(DOXYGEN_WARN_AS_ERROR NO) +endif() +if(NOT DEFINED DOXYGEN_WARN_FORMAT) + set(DOXYGEN_WARN_FORMAT "$file:$line: $text") +endif() +if(NOT DEFINED DOXYGEN_INPUT_ENCODING) + set(DOXYGEN_INPUT_ENCODING UTF-8) +endif() +if(NOT DEFINED DOXYGEN_FILE_PATTERNS) + set(DOXYGEN_FILE_PATTERNS *.c + *.cc + *.cxx + *.cpp + *.c++ + *.java + *.ii + *.ixx + *.ipp + *.i++ + *.inl + *.idl + *.ddl + *.odl + *.h + *.hh + *.hxx + *.hpp + *.h++ + *.cs + *.d + *.php + *.php4 + *.php5 + *.phtml + *.inc + *.m + *.markdown + *.md + *.mm + *.dox + *.py + *.pyw + *.f90 + *.f95 + *.f03 + *.f08 + *.f18 + *.f + *.for + *.vhd + *.vhdl + *.ucf + *.qsf + *.ice) +endif() +if(NOT DEFINED DOXYGEN_RECURSIVE) + set(DOXYGEN_RECURSIVE NO) +endif() +if(NOT DEFINED DOXYGEN_EXCLUDE_SYMLINKS) + set(DOXYGEN_EXCLUDE_SYMLINKS NO) +endif() +if(NOT DEFINED DOXYGEN_EXAMPLE_PATTERNS) + set(DOXYGEN_EXAMPLE_PATTERNS *) +endif() +if(NOT DEFINED DOXYGEN_EXAMPLE_RECURSIVE) + set(DOXYGEN_EXAMPLE_RECURSIVE NO) +endif() +if(NOT DEFINED DOXYGEN_FILTER_SOURCE_FILES) + set(DOXYGEN_FILTER_SOURCE_FILES NO) +endif() +if(NOT DEFINED DOXYGEN_SOURCE_BROWSER) + set(DOXYGEN_SOURCE_BROWSER NO) +endif() +if(NOT DEFINED DOXYGEN_INLINE_SOURCES) + set(DOXYGEN_INLINE_SOURCES NO) +endif() +if(NOT DEFINED DOXYGEN_STRIP_CODE_COMMENTS) + set(DOXYGEN_STRIP_CODE_COMMENTS YES) +endif() +if(NOT DEFINED DOXYGEN_REFERENCED_BY_RELATION) + set(DOXYGEN_REFERENCED_BY_RELATION NO) +endif() +if(NOT DEFINED DOXYGEN_REFERENCES_RELATION) + set(DOXYGEN_REFERENCES_RELATION NO) +endif() +if(NOT DEFINED DOXYGEN_REFERENCES_LINK_SOURCE) + set(DOXYGEN_REFERENCES_LINK_SOURCE YES) +endif() +if(NOT DEFINED DOXYGEN_SOURCE_TOOLTIPS) + set(DOXYGEN_SOURCE_TOOLTIPS YES) +endif() +if(NOT DEFINED DOXYGEN_USE_HTAGS) + set(DOXYGEN_USE_HTAGS NO) +endif() +if(NOT DEFINED DOXYGEN_VERBATIM_HEADERS) + set(DOXYGEN_VERBATIM_HEADERS YES) +endif() +if(NOT DEFINED DOXYGEN_CLANG_ASSISTED_PARSING) + set(DOXYGEN_CLANG_ASSISTED_PARSING NO) +endif() +if(NOT DEFINED DOXYGEN_CLANG_ADD_INC_PATHS) + set(DOXYGEN_CLANG_ADD_INC_PATHS YES) +endif() +if(NOT DEFINED DOXYGEN_ALPHABETICAL_INDEX) + set(DOXYGEN_ALPHABETICAL_INDEX YES) +endif() +if(NOT DEFINED DOXYGEN_GENERATE_HTML) + set(DOXYGEN_GENERATE_HTML YES) +endif() +if(NOT DEFINED DOXYGEN_HTML_OUTPUT) + set(DOXYGEN_HTML_OUTPUT html) +endif() +if(NOT DEFINED DOXYGEN_HTML_FILE_EXTENSION) + set(DOXYGEN_HTML_FILE_EXTENSION .html) +endif() +if(NOT DEFINED DOXYGEN_HTML_COLORSTYLE_HUE) + set(DOXYGEN_HTML_COLORSTYLE_HUE 220) +endif() +if(NOT DEFINED DOXYGEN_HTML_COLORSTYLE_SAT) + set(DOXYGEN_HTML_COLORSTYLE_SAT 100) +endif() +if(NOT DEFINED DOXYGEN_HTML_COLORSTYLE_GAMMA) + set(DOXYGEN_HTML_COLORSTYLE_GAMMA 80) +endif() +if(NOT DEFINED DOXYGEN_HTML_TIMESTAMP) + set(DOXYGEN_HTML_TIMESTAMP NO) +endif() +if(NOT DEFINED DOXYGEN_HTML_DYNAMIC_MENUS) + set(DOXYGEN_HTML_DYNAMIC_MENUS YES) +endif() +if(NOT DEFINED DOXYGEN_HTML_DYNAMIC_SECTIONS) + set(DOXYGEN_HTML_DYNAMIC_SECTIONS NO) +endif() +if(NOT DEFINED DOXYGEN_HTML_INDEX_NUM_ENTRIES) + set(DOXYGEN_HTML_INDEX_NUM_ENTRIES 100) +endif() +if(NOT DEFINED DOXYGEN_GENERATE_DOCSET) + set(DOXYGEN_GENERATE_DOCSET NO) +endif() +if(NOT DEFINED DOXYGEN_DOCSET_FEEDNAME) + set(DOXYGEN_DOCSET_FEEDNAME "Doxygen generated docs") +endif() +if(NOT DEFINED DOXYGEN_DOCSET_BUNDLE_ID) + set(DOXYGEN_DOCSET_BUNDLE_ID org.doxygen.Project) +endif() +if(NOT DEFINED DOXYGEN_DOCSET_PUBLISHER_ID) + set(DOXYGEN_DOCSET_PUBLISHER_ID org.doxygen.Publisher) +endif() +if(NOT DEFINED DOXYGEN_DOCSET_PUBLISHER_NAME) + set(DOXYGEN_DOCSET_PUBLISHER_NAME Publisher) +endif() +if(NOT DEFINED DOXYGEN_GENERATE_HTMLHELP) + set(DOXYGEN_GENERATE_HTMLHELP NO) +endif() +if(NOT DEFINED DOXYGEN_GENERATE_CHI) + set(DOXYGEN_GENERATE_CHI NO) +endif() +if(NOT DEFINED DOXYGEN_BINARY_TOC) + set(DOXYGEN_BINARY_TOC NO) +endif() +if(NOT DEFINED DOXYGEN_TOC_EXPAND) + set(DOXYGEN_TOC_EXPAND NO) +endif() +if(NOT DEFINED DOXYGEN_GENERATE_QHP) + set(DOXYGEN_GENERATE_QHP NO) +endif() +if(NOT DEFINED DOXYGEN_QHP_NAMESPACE) + set(DOXYGEN_QHP_NAMESPACE org.doxygen.Project) +endif() +if(NOT DEFINED DOXYGEN_QHP_VIRTUAL_FOLDER) + set(DOXYGEN_QHP_VIRTUAL_FOLDER doc) +endif() +if(NOT DEFINED DOXYGEN_GENERATE_ECLIPSEHELP) + set(DOXYGEN_GENERATE_ECLIPSEHELP NO) +endif() +if(NOT DEFINED DOXYGEN_ECLIPSE_DOC_ID) + set(DOXYGEN_ECLIPSE_DOC_ID org.doxygen.Project) +endif() +if(NOT DEFINED DOXYGEN_DISABLE_INDEX) + set(DOXYGEN_DISABLE_INDEX NO) +endif() +if(NOT DEFINED DOXYGEN_GENERATE_TREEVIEW) + set(DOXYGEN_GENERATE_TREEVIEW NO) +endif() +if(NOT DEFINED DOXYGEN_ENUM_VALUES_PER_LINE) + set(DOXYGEN_ENUM_VALUES_PER_LINE 4) +endif() +if(NOT DEFINED DOXYGEN_TREEVIEW_WIDTH) + set(DOXYGEN_TREEVIEW_WIDTH 250) +endif() +if(NOT DEFINED DOXYGEN_EXT_LINKS_IN_WINDOW) + set(DOXYGEN_EXT_LINKS_IN_WINDOW NO) +endif() +if(NOT DEFINED DOXYGEN_HTML_FORMULA_FORMAT) + set(DOXYGEN_HTML_FORMULA_FORMAT png) +endif() +if(NOT DEFINED DOXYGEN_FORMULA_FONTSIZE) + set(DOXYGEN_FORMULA_FONTSIZE 10) +endif() +if(NOT DEFINED DOXYGEN_FORMULA_TRANSPARENT) + set(DOXYGEN_FORMULA_TRANSPARENT YES) +endif() +if(NOT DEFINED DOXYGEN_USE_MATHJAX) + set(DOXYGEN_USE_MATHJAX NO) +endif() +if(NOT DEFINED DOXYGEN_MATHJAX_FORMAT) + set(DOXYGEN_MATHJAX_FORMAT HTML-CSS) +endif() +if(NOT DEFINED DOXYGEN_MATHJAX_RELPATH) + set(DOXYGEN_MATHJAX_RELPATH https://cdn.jsdelivr.net/npm/mathjax@2) +endif() +if(NOT DEFINED DOXYGEN_SEARCHENGINE) + set(DOXYGEN_SEARCHENGINE YES) +endif() +if(NOT DEFINED DOXYGEN_SERVER_BASED_SEARCH) + set(DOXYGEN_SERVER_BASED_SEARCH NO) +endif() +if(NOT DEFINED DOXYGEN_EXTERNAL_SEARCH) + set(DOXYGEN_EXTERNAL_SEARCH NO) +endif() +if(NOT DEFINED DOXYGEN_SEARCHDATA_FILE) + set(DOXYGEN_SEARCHDATA_FILE searchdata.xml) +endif() +if(NOT DEFINED DOXYGEN_GENERATE_LATEX) + set(DOXYGEN_GENERATE_LATEX YES) +endif() +if(NOT DEFINED DOXYGEN_LATEX_OUTPUT) + set(DOXYGEN_LATEX_OUTPUT latex) +endif() +if(NOT DEFINED DOXYGEN_MAKEINDEX_CMD_NAME) + set(DOXYGEN_MAKEINDEX_CMD_NAME makeindex) +endif() +if(NOT DEFINED DOXYGEN_LATEX_MAKEINDEX_CMD) + set(DOXYGEN_LATEX_MAKEINDEX_CMD makeindex) +endif() +if(NOT DEFINED DOXYGEN_COMPACT_LATEX) + set(DOXYGEN_COMPACT_LATEX NO) +endif() +if(NOT DEFINED DOXYGEN_PAPER_TYPE) + set(DOXYGEN_PAPER_TYPE a4) +endif() +if(NOT DEFINED DOXYGEN_PDF_HYPERLINKS) + set(DOXYGEN_PDF_HYPERLINKS YES) +endif() +if(NOT DEFINED DOXYGEN_USE_PDFLATEX) + set(DOXYGEN_USE_PDFLATEX YES) +endif() +if(NOT DEFINED DOXYGEN_LATEX_BATCHMODE) + set(DOXYGEN_LATEX_BATCHMODE NO) +endif() +if(NOT DEFINED DOXYGEN_LATEX_HIDE_INDICES) + set(DOXYGEN_LATEX_HIDE_INDICES NO) +endif() +if(NOT DEFINED DOXYGEN_LATEX_SOURCE_CODE) + set(DOXYGEN_LATEX_SOURCE_CODE NO) +endif() +if(NOT DEFINED DOXYGEN_LATEX_BIB_STYLE) + set(DOXYGEN_LATEX_BIB_STYLE plain) +endif() +if(NOT DEFINED DOXYGEN_LATEX_TIMESTAMP) + set(DOXYGEN_LATEX_TIMESTAMP NO) +endif() +if(NOT DEFINED DOXYGEN_GENERATE_RTF) + set(DOXYGEN_GENERATE_RTF NO) +endif() +if(NOT DEFINED DOXYGEN_RTF_OUTPUT) + set(DOXYGEN_RTF_OUTPUT rtf) +endif() +if(NOT DEFINED DOXYGEN_COMPACT_RTF) + set(DOXYGEN_COMPACT_RTF NO) +endif() +if(NOT DEFINED DOXYGEN_RTF_HYPERLINKS) + set(DOXYGEN_RTF_HYPERLINKS NO) +endif() +if(NOT DEFINED DOXYGEN_RTF_SOURCE_CODE) + set(DOXYGEN_RTF_SOURCE_CODE NO) +endif() +if(NOT DEFINED DOXYGEN_GENERATE_MAN) + set(DOXYGEN_GENERATE_MAN NO) +endif() +if(NOT DEFINED DOXYGEN_MAN_OUTPUT) + set(DOXYGEN_MAN_OUTPUT man) +endif() +if(NOT DEFINED DOXYGEN_MAN_EXTENSION) + set(DOXYGEN_MAN_EXTENSION .3) +endif() +if(NOT DEFINED DOXYGEN_MAN_LINKS) + set(DOXYGEN_MAN_LINKS NO) +endif() +if(NOT DEFINED DOXYGEN_GENERATE_XML) + set(DOXYGEN_GENERATE_XML NO) +endif() +if(NOT DEFINED DOXYGEN_XML_OUTPUT) + set(DOXYGEN_XML_OUTPUT xml) +endif() +if(NOT DEFINED DOXYGEN_XML_PROGRAMLISTING) + set(DOXYGEN_XML_PROGRAMLISTING YES) +endif() +if(NOT DEFINED DOXYGEN_XML_NS_MEMB_FILE_SCOPE) + set(DOXYGEN_XML_NS_MEMB_FILE_SCOPE NO) +endif() +if(NOT DEFINED DOXYGEN_GENERATE_DOCBOOK) + set(DOXYGEN_GENERATE_DOCBOOK NO) +endif() +if(NOT DEFINED DOXYGEN_DOCBOOK_OUTPUT) + set(DOXYGEN_DOCBOOK_OUTPUT docbook) +endif() +if(NOT DEFINED DOXYGEN_DOCBOOK_PROGRAMLISTING) + set(DOXYGEN_DOCBOOK_PROGRAMLISTING NO) +endif() +if(NOT DEFINED DOXYGEN_GENERATE_AUTOGEN_DEF) + set(DOXYGEN_GENERATE_AUTOGEN_DEF NO) +endif() +if(NOT DEFINED DOXYGEN_GENERATE_PERLMOD) + set(DOXYGEN_GENERATE_PERLMOD NO) +endif() +if(NOT DEFINED DOXYGEN_PERLMOD_LATEX) + set(DOXYGEN_PERLMOD_LATEX NO) +endif() +if(NOT DEFINED DOXYGEN_PERLMOD_PRETTY) + set(DOXYGEN_PERLMOD_PRETTY YES) +endif() +if(NOT DEFINED DOXYGEN_ENABLE_PREPROCESSING) + set(DOXYGEN_ENABLE_PREPROCESSING YES) +endif() +if(NOT DEFINED DOXYGEN_MACRO_EXPANSION) + set(DOXYGEN_MACRO_EXPANSION NO) +endif() +if(NOT DEFINED DOXYGEN_EXPAND_ONLY_PREDEF) + set(DOXYGEN_EXPAND_ONLY_PREDEF NO) +endif() +if(NOT DEFINED DOXYGEN_SEARCH_INCLUDES) + set(DOXYGEN_SEARCH_INCLUDES YES) +endif() +if(NOT DEFINED DOXYGEN_SKIP_FUNCTION_MACROS) + set(DOXYGEN_SKIP_FUNCTION_MACROS YES) +endif() +if(NOT DEFINED DOXYGEN_ALLEXTERNALS) + set(DOXYGEN_ALLEXTERNALS NO) +endif() +if(NOT DEFINED DOXYGEN_EXTERNAL_GROUPS) + set(DOXYGEN_EXTERNAL_GROUPS YES) +endif() +if(NOT DEFINED DOXYGEN_EXTERNAL_PAGES) + set(DOXYGEN_EXTERNAL_PAGES YES) +endif() +if(NOT DEFINED DOXYGEN_CLASS_DIAGRAMS) + set(DOXYGEN_CLASS_DIAGRAMS YES) +endif() +if(NOT DEFINED DOXYGEN_HIDE_UNDOC_RELATIONS) + set(DOXYGEN_HIDE_UNDOC_RELATIONS YES) +endif() +if(NOT DEFINED DOXYGEN_HAVE_DOT) + set(DOXYGEN_HAVE_DOT NO) +endif() +if(NOT DEFINED DOXYGEN_DOT_NUM_THREADS) + set(DOXYGEN_DOT_NUM_THREADS 0) +endif() +if(NOT DEFINED DOXYGEN_DOT_FONTNAME) + set(DOXYGEN_DOT_FONTNAME Helvetica) +endif() +if(NOT DEFINED DOXYGEN_DOT_FONTSIZE) + set(DOXYGEN_DOT_FONTSIZE 10) +endif() +if(NOT DEFINED DOXYGEN_CLASS_GRAPH) + set(DOXYGEN_CLASS_GRAPH YES) +endif() +if(NOT DEFINED DOXYGEN_COLLABORATION_GRAPH) + set(DOXYGEN_COLLABORATION_GRAPH YES) +endif() +if(NOT DEFINED DOXYGEN_GROUP_GRAPHS) + set(DOXYGEN_GROUP_GRAPHS YES) +endif() +if(NOT DEFINED DOXYGEN_UML_LOOK) + set(DOXYGEN_UML_LOOK NO) +endif() +if(NOT DEFINED DOXYGEN_UML_LIMIT_NUM_FIELDS) + set(DOXYGEN_UML_LIMIT_NUM_FIELDS 10) +endif() +if(NOT DEFINED DOXYGEN_DOT_UML_DETAILS) + set(DOXYGEN_DOT_UML_DETAILS NO) +endif() +if(NOT DEFINED DOXYGEN_DOT_WRAP_THRESHOLD) + set(DOXYGEN_DOT_WRAP_THRESHOLD 17) +endif() +if(NOT DEFINED DOXYGEN_TEMPLATE_RELATIONS) + set(DOXYGEN_TEMPLATE_RELATIONS NO) +endif() +if(NOT DEFINED DOXYGEN_INCLUDE_GRAPH) + set(DOXYGEN_INCLUDE_GRAPH YES) +endif() +if(NOT DEFINED DOXYGEN_INCLUDED_BY_GRAPH) + set(DOXYGEN_INCLUDED_BY_GRAPH YES) +endif() +if(NOT DEFINED DOXYGEN_CALL_GRAPH) + set(DOXYGEN_CALL_GRAPH NO) +endif() +if(NOT DEFINED DOXYGEN_CALLER_GRAPH) + set(DOXYGEN_CALLER_GRAPH NO) +endif() +if(NOT DEFINED DOXYGEN_GRAPHICAL_HIERARCHY) + set(DOXYGEN_GRAPHICAL_HIERARCHY YES) +endif() +if(NOT DEFINED DOXYGEN_DIRECTORY_GRAPH) + set(DOXYGEN_DIRECTORY_GRAPH YES) +endif() +if(NOT DEFINED DOXYGEN_DOT_IMAGE_FORMAT) + set(DOXYGEN_DOT_IMAGE_FORMAT png) +endif() +if(NOT DEFINED DOXYGEN_INTERACTIVE_SVG) + set(DOXYGEN_INTERACTIVE_SVG NO) +endif() +if(NOT DEFINED DOXYGEN_DOT_GRAPH_MAX_NODES) + set(DOXYGEN_DOT_GRAPH_MAX_NODES 50) +endif() +if(NOT DEFINED DOXYGEN_MAX_DOT_GRAPH_DEPTH) + set(DOXYGEN_MAX_DOT_GRAPH_DEPTH 0) +endif() +if(NOT DEFINED DOXYGEN_DOT_TRANSPARENT) + set(DOXYGEN_DOT_TRANSPARENT NO) +endif() +if(NOT DEFINED DOXYGEN_DOT_MULTI_TARGETS) + set(DOXYGEN_DOT_MULTI_TARGETS NO) +endif() +if(NOT DEFINED DOXYGEN_GENERATE_LEGEND) + set(DOXYGEN_GENERATE_LEGEND YES) +endif() +if(NOT DEFINED DOXYGEN_DOT_CLEANUP) + set(DOXYGEN_DOT_CLEANUP YES) +endif() diff --git a/graphics/asymptote/LspCpp/CMakeFiles/3.20.5/CMakeCCompiler.cmake b/graphics/asymptote/LspCpp/CMakeFiles/3.20.5/CMakeCCompiler.cmake new file mode 100644 index 0000000000..be3c97fb7c --- /dev/null +++ b/graphics/asymptote/LspCpp/CMakeFiles/3.20.5/CMakeCCompiler.cmake @@ -0,0 +1,78 @@ +set(CMAKE_C_COMPILER "/bin/cc") +set(CMAKE_C_COMPILER_ARG1 "") +set(CMAKE_C_COMPILER_ID "GNU") +set(CMAKE_C_COMPILER_VERSION "11.2.1") +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 "/bin/ar") +set(CMAKE_C_COMPILER_AR "/bin/gcc-ar") +set(CMAKE_RANLIB "/bin/ranlib") +set(CMAKE_C_COMPILER_RANLIB "/bin/gcc-ranlib") +set(CMAKE_LINKER "/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_BYTE_ORDER "LITTLE_ENDIAN") +set(CMAKE_C_LIBRARY_ARCHITECTURE "") + +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 "") +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-redhat-linux/11/include;/usr/local/include;/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-redhat-linux/11;/usr/lib64;/lib64;/usr/lib") +set(CMAKE_C_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES "") diff --git a/graphics/asymptote/LspCpp/CMakeFiles/3.20.5/CMakeCXXCompiler.cmake b/graphics/asymptote/LspCpp/CMakeFiles/3.20.5/CMakeCXXCompiler.cmake new file mode 100644 index 0000000000..70095ed29e --- /dev/null +++ b/graphics/asymptote/LspCpp/CMakeFiles/3.20.5/CMakeCXXCompiler.cmake @@ -0,0 +1,91 @@ +set(CMAKE_CXX_COMPILER "/bin/c++") +set(CMAKE_CXX_COMPILER_ARG1 "") +set(CMAKE_CXX_COMPILER_ID "GNU") +set(CMAKE_CXX_COMPILER_VERSION "11.2.1") +set(CMAKE_CXX_COMPILER_VERSION_INTERNAL "") +set(CMAKE_CXX_COMPILER_WRAPPER "") +set(CMAKE_CXX_STANDARD_COMPUTED_DEFAULT "17") +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;cxx_std_23") +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_CXX23_COMPILE_FEATURES "cxx_std_23") + +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 "/bin/ar") +set(CMAKE_CXX_COMPILER_AR "/bin/gcc-ar") +set(CMAKE_RANLIB "/bin/ranlib") +set(CMAKE_CXX_COMPILER_RANLIB "/bin/gcc-ranlib") +set(CMAKE_LINKER "/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;mpp;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_BYTE_ORDER "LITTLE_ENDIAN") +set(CMAKE_CXX_LIBRARY_ARCHITECTURE "") + +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 "") +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++/11;/usr/include/c++/11/x86_64-redhat-linux;/usr/include/c++/11/backward;/usr/lib/gcc/x86_64-redhat-linux/11/include;/usr/local/include;/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-redhat-linux/11;/usr/lib64;/lib64;/usr/lib") +set(CMAKE_CXX_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES "") diff --git a/graphics/asymptote/LspCpp/CMakeFiles/3.20.5/CMakeDetermineCompilerABI_C.bin b/graphics/asymptote/LspCpp/CMakeFiles/3.20.5/CMakeDetermineCompilerABI_C.bin new file mode 100755 index 0000000000..8eb9524b31 Binary files /dev/null and b/graphics/asymptote/LspCpp/CMakeFiles/3.20.5/CMakeDetermineCompilerABI_C.bin differ diff --git a/graphics/asymptote/LspCpp/CMakeFiles/3.20.5/CMakeDetermineCompilerABI_CXX.bin b/graphics/asymptote/LspCpp/CMakeFiles/3.20.5/CMakeDetermineCompilerABI_CXX.bin new file mode 100755 index 0000000000..126be7a068 Binary files /dev/null and b/graphics/asymptote/LspCpp/CMakeFiles/3.20.5/CMakeDetermineCompilerABI_CXX.bin differ diff --git a/graphics/asymptote/LspCpp/CMakeFiles/3.20.5/CMakeSystem.cmake b/graphics/asymptote/LspCpp/CMakeFiles/3.20.5/CMakeSystem.cmake new file mode 100644 index 0000000000..efa88eb2d5 --- /dev/null +++ b/graphics/asymptote/LspCpp/CMakeFiles/3.20.5/CMakeSystem.cmake @@ -0,0 +1,15 @@ +set(CMAKE_HOST_SYSTEM "Linux-5.15.10-100.fc34.x86_64") +set(CMAKE_HOST_SYSTEM_NAME "Linux") +set(CMAKE_HOST_SYSTEM_VERSION "5.15.10-100.fc34.x86_64") +set(CMAKE_HOST_SYSTEM_PROCESSOR "x86_64") + + + +set(CMAKE_SYSTEM "Linux-5.15.10-100.fc34.x86_64") +set(CMAKE_SYSTEM_NAME "Linux") +set(CMAKE_SYSTEM_VERSION "5.15.10-100.fc34.x86_64") +set(CMAKE_SYSTEM_PROCESSOR "x86_64") + +set(CMAKE_CROSSCOMPILING "FALSE") + +set(CMAKE_SYSTEM_LOADED 1) diff --git a/graphics/asymptote/LspCpp/CMakeFiles/3.20.5/CompilerIdC/CMakeCCompilerId.c b/graphics/asymptote/LspCpp/CMakeFiles/3.20.5/CompilerIdC/CMakeCCompilerId.c new file mode 100644 index 0000000000..7e3bd5309f --- /dev/null +++ b/graphics/asymptote/LspCpp/CMakeFiles/3.20.5/CompilerIdC/CMakeCCompilerId.c @@ -0,0 +1,752 @@ +#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 prior to 2021, and then VVVV for 2021 and later, + except that a few beta releases use the old format with V=2021. */ +# if __INTEL_COMPILER < 2021 || __INTEL_COMPILER == 202110 || __INTEL_COMPILER == 202111 +# 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 +# else +# define COMPILER_VERSION_MAJOR DEC(__INTEL_COMPILER) +# define COMPILER_VERSION_MINOR DEC(__INTEL_COMPILER_UPDATE) + /* The third version component from --version is an update index, + but no macro is provided for it. */ +# define COMPILER_VERSION_PATCH DEC(0) +# 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(__clang__) && defined(__INTEL_CLANG_COMPILER)) || defined(__INTEL_LLVM_COMPILER) +# define COMPILER_ID "IntelLLVM" +#if defined(_MSC_VER) +# define SIMULATE_ID "MSVC" +#endif +#if defined(__GNUC__) +# define SIMULATE_ID "GNU" +#endif +/* __INTEL_LLVM_COMPILER = VVVVRP prior to 2021.2.0, VVVVRRPP for 2021.2.0 and + * later. Look for 6 digit vs. 8 digit version number to decide encoding. + * VVVV is no smaller than the current year when a versio is released. + */ +#if __INTEL_LLVM_COMPILER < 1000000L +# define COMPILER_VERSION_MAJOR DEC(__INTEL_LLVM_COMPILER/100) +# define COMPILER_VERSION_MINOR DEC(__INTEL_LLVM_COMPILER/10 % 10) +# define COMPILER_VERSION_PATCH DEC(__INTEL_LLVM_COMPILER % 10) +#else +# define COMPILER_VERSION_MAJOR DEC(__INTEL_LLVM_COMPILER/10000) +# define COMPILER_VERSION_MINOR DEC(__INTEL_LLVM_COMPILER/100 % 100) +# define COMPILER_VERSION_PATCH DEC(__INTEL_LLVM_COMPILER % 100) +#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(__NVCOMPILER) +# define COMPILER_ID "NVHPC" +# define COMPILER_VERSION_MAJOR DEC(__NVCOMPILER_MAJOR__) +# define COMPILER_VERSION_MINOR DEC(__NVCOMPILER_MINOR__) +# if defined(__NVCOMPILER_PATCHLEVEL__) +# define COMPILER_VERSION_PATCH DEC(__NVCOMPILER_PATCHLEVEL__) +# endif + +#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__) || defined(__ICCSTM8__)) +# 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(__CRAYXT_COMPUTE_LINUX_TARGET) +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" + +# elif defined(__VXWORKS__) +# define PLATFORM_ID "VxWorks" + +# 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_ARM64EC) +# define ARCHITECTURE_ID "ARM64EC" + +# 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" + +# elif defined(__ICCSTM8__) +# define ARCHITECTURE_ID "STM8" + +# 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 + +#elif defined(__TI_COMPILER_VERSION__) +# if defined(__TI_ARM__) +# define ARCHITECTURE_ID "ARM" + +# elif defined(__MSP430__) +# define ARCHITECTURE_ID "MSP430" + +# elif defined(__TMS320C28XX__) +# define ARCHITECTURE_ID "TMS320C28x" + +# elif defined(__TMS320C6X__) || defined(_TMS320C6X) +# define ARCHITECTURE_ID "TMS320C6x" + +# 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(__CRAYXT_COMPUTE_LINUX_TARGET) + require += info_cray[argc]; +#endif + require += info_language_dialect_default[argc]; + (void)argv; + return require; +} +#endif diff --git a/graphics/asymptote/LspCpp/CMakeFiles/3.20.5/CompilerIdC/a.out b/graphics/asymptote/LspCpp/CMakeFiles/3.20.5/CompilerIdC/a.out new file mode 100755 index 0000000000..8ba253e0e2 Binary files /dev/null and b/graphics/asymptote/LspCpp/CMakeFiles/3.20.5/CompilerIdC/a.out differ diff --git a/graphics/asymptote/LspCpp/CMakeFiles/3.20.5/CompilerIdCXX/CMakeCXXCompilerId.cpp b/graphics/asymptote/LspCpp/CMakeFiles/3.20.5/CompilerIdCXX/CMakeCXXCompilerId.cpp new file mode 100644 index 0000000000..92e7655aeb --- /dev/null +++ b/graphics/asymptote/LspCpp/CMakeFiles/3.20.5/CompilerIdCXX/CMakeCXXCompilerId.cpp @@ -0,0 +1,743 @@ +/* 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 prior to 2021, and then VVVV for 2021 and later, + except that a few beta releases use the old format with V=2021. */ +# if __INTEL_COMPILER < 2021 || __INTEL_COMPILER == 202110 || __INTEL_COMPILER == 202111 +# 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 +# else +# define COMPILER_VERSION_MAJOR DEC(__INTEL_COMPILER) +# define COMPILER_VERSION_MINOR DEC(__INTEL_COMPILER_UPDATE) + /* The third version component from --version is an update index, + but no macro is provided for it. */ +# define COMPILER_VERSION_PATCH DEC(0) +# 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(__clang__) && defined(__INTEL_CLANG_COMPILER)) || defined(__INTEL_LLVM_COMPILER) +# define COMPILER_ID "IntelLLVM" +#if defined(_MSC_VER) +# define SIMULATE_ID "MSVC" +#endif +#if defined(__GNUC__) +# define SIMULATE_ID "GNU" +#endif +/* __INTEL_LLVM_COMPILER = VVVVRP prior to 2021.2.0, VVVVRRPP for 2021.2.0 and + * later. Look for 6 digit vs. 8 digit version number to decide encoding. + * VVVV is no smaller than the current year when a versio is released. + */ +#if __INTEL_LLVM_COMPILER < 1000000L +# define COMPILER_VERSION_MAJOR DEC(__INTEL_LLVM_COMPILER/100) +# define COMPILER_VERSION_MINOR DEC(__INTEL_LLVM_COMPILER/10 % 10) +# define COMPILER_VERSION_PATCH DEC(__INTEL_LLVM_COMPILER % 10) +#else +# define COMPILER_VERSION_MAJOR DEC(__INTEL_LLVM_COMPILER/10000) +# define COMPILER_VERSION_MINOR DEC(__INTEL_LLVM_COMPILER/100 % 100) +# define COMPILER_VERSION_PATCH DEC(__INTEL_LLVM_COMPILER % 100) +#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(__NVCOMPILER) +# define COMPILER_ID "NVHPC" +# define COMPILER_VERSION_MAJOR DEC(__NVCOMPILER_MAJOR__) +# define COMPILER_VERSION_MINOR DEC(__NVCOMPILER_MINOR__) +# if defined(__NVCOMPILER_PATCHLEVEL__) +# define COMPILER_VERSION_PATCH DEC(__NVCOMPILER_PATCHLEVEL__) +# endif + +#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__) || defined(__ICCSTM8__)) +# 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(__CRAYXT_COMPUTE_LINUX_TARGET) +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" + +# elif defined(__VXWORKS__) +# define PLATFORM_ID "VxWorks" + +# 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_ARM64EC) +# define ARCHITECTURE_ID "ARM64EC" + +# 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" + +# elif defined(__ICCSTM8__) +# define ARCHITECTURE_ID "STM8" + +# 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 + +#elif defined(__TI_COMPILER_VERSION__) +# if defined(__TI_ARM__) +# define ARCHITECTURE_ID "ARM" + +# elif defined(__MSP430__) +# define ARCHITECTURE_ID "MSP430" + +# elif defined(__TMS320C28XX__) +# define ARCHITECTURE_ID "TMS320C28x" + +# elif defined(__TMS320C6X__) || defined(_TMS320C6X) +# define ARCHITECTURE_ID "TMS320C6x" + +# 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 > 202002L + "23" +#elif 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(__CRAYXT_COMPUTE_LINUX_TARGET) + require += info_cray[argc]; +#endif + require += info_language_dialect_default[argc]; + (void)argv; + return require; +} diff --git a/graphics/asymptote/LspCpp/CMakeFiles/3.20.5/CompilerIdCXX/a.out b/graphics/asymptote/LspCpp/CMakeFiles/3.20.5/CompilerIdCXX/a.out new file mode 100755 index 0000000000..f2763735c6 Binary files /dev/null and b/graphics/asymptote/LspCpp/CMakeFiles/3.20.5/CompilerIdCXX/a.out differ diff --git a/graphics/asymptote/LspCpp/CMakeFiles/CMakeDirectoryInformation.cmake b/graphics/asymptote/LspCpp/CMakeFiles/CMakeDirectoryInformation.cmake new file mode 100644 index 0000000000..15412a42ec --- /dev/null +++ b/graphics/asymptote/LspCpp/CMakeFiles/CMakeDirectoryInformation.cmake @@ -0,0 +1,16 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 3.20 + +# Relative path conversion top directories. +set(CMAKE_RELATIVE_PATH_TOP_SOURCE "/usr/local/src/asymptote-2.78/LspCpp") +set(CMAKE_RELATIVE_PATH_TOP_BINARY "/usr/local/src/asymptote-2.78/LspCpp") + +# 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/graphics/asymptote/LspCpp/CMakeFiles/CMakeError.log b/graphics/asymptote/LspCpp/CMakeFiles/CMakeError.log new file mode 100644 index 0000000000..1a3df85864 --- /dev/null +++ b/graphics/asymptote/LspCpp/CMakeFiles/CMakeError.log @@ -0,0 +1,64 @@ +Performing C SOURCE FILE Test CMAKE_HAVE_LIBC_PTHREAD failed with the following output: +Change Dir: /usr/local/src/asymptote-2.78/LspCpp/CMakeFiles/CMakeTmp + +Run Build Command(s):/bin/gmake -f Makefile cmTC_07410/fast && gmake[1]: Entering directory '/u/src/asymptote-2.78/LspCpp/CMakeFiles/CMakeTmp' +make -f CMakeFiles/cmTC_07410.dir/build.make CMakeFiles/cmTC_07410.dir/build +make[2]: Entering directory '/u/src/asymptote-2.78/LspCpp/CMakeFiles/CMakeTmp' +Building C object CMakeFiles/cmTC_07410.dir/src.c.o +/bin/cc -DCMAKE_HAVE_LIBC_PTHREAD -o CMakeFiles/cmTC_07410.dir/src.c.o -c /usr/local/src/asymptote-2.78/LspCpp/CMakeFiles/CMakeTmp/src.c +Linking C executable cmTC_07410 +/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_07410.dir/link.txt --verbose=1 +/bin/cc CMakeFiles/cmTC_07410.dir/src.c.o -o cmTC_07410 +/bin/ld: CMakeFiles/cmTC_07410.dir/src.c.o: in function `main': +src.c:(.text+0x2d): undefined reference to `pthread_create' +/bin/ld: src.c:(.text+0x39): undefined reference to `pthread_detach' +/bin/ld: src.c:(.text+0x45): undefined reference to `pthread_cancel' +/bin/ld: src.c:(.text+0x56): undefined reference to `pthread_join' +collect2: error: ld returned 1 exit status +make[2]: *** [CMakeFiles/cmTC_07410.dir/build.make:99: cmTC_07410] Error 1 +make[2]: Leaving directory '/u/src/asymptote-2.78/LspCpp/CMakeFiles/CMakeTmp' +gmake[1]: *** [Makefile:127: cmTC_07410/fast] Error 2 +gmake[1]: Leaving directory '/u/src/asymptote-2.78/LspCpp/CMakeFiles/CMakeTmp' + + +Source file was: +#include + +static void* test_func(void* data) +{ + return data; +} + +int main(void) +{ + pthread_t thread; + pthread_create(&thread, NULL, test_func, NULL); + pthread_detach(thread); + pthread_cancel(thread); + pthread_join(thread, NULL); + pthread_atfork(NULL, NULL, NULL); + pthread_exit(NULL); + + return 0; +} + +Determining if the function pthread_create exists in the pthreads failed with the following output: +Change Dir: /usr/local/src/asymptote-2.78/LspCpp/CMakeFiles/CMakeTmp + +Run Build Command(s):/bin/gmake -f Makefile cmTC_eda34/fast && gmake[1]: Entering directory '/u/src/asymptote-2.78/LspCpp/CMakeFiles/CMakeTmp' +make -f CMakeFiles/cmTC_eda34.dir/build.make CMakeFiles/cmTC_eda34.dir/build +make[2]: Entering directory '/u/src/asymptote-2.78/LspCpp/CMakeFiles/CMakeTmp' +Building C object CMakeFiles/cmTC_eda34.dir/CheckFunctionExists.c.o +/bin/cc -DCHECK_FUNCTION_EXISTS=pthread_create -o CMakeFiles/cmTC_eda34.dir/CheckFunctionExists.c.o -c /usr/share/cmake/Modules/CheckFunctionExists.c +Linking C executable cmTC_eda34 +/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_eda34.dir/link.txt --verbose=1 +/bin/cc -DCHECK_FUNCTION_EXISTS=pthread_create CMakeFiles/cmTC_eda34.dir/CheckFunctionExists.c.o -o cmTC_eda34 -lpthreads +/bin/ld: cannot find -lpthreads +collect2: error: ld returned 1 exit status +make[2]: *** [CMakeFiles/cmTC_eda34.dir/build.make:99: cmTC_eda34] Error 1 +make[2]: Leaving directory '/u/src/asymptote-2.78/LspCpp/CMakeFiles/CMakeTmp' +gmake[1]: *** [Makefile:127: cmTC_eda34/fast] Error 2 +gmake[1]: Leaving directory '/u/src/asymptote-2.78/LspCpp/CMakeFiles/CMakeTmp' + + + diff --git a/graphics/asymptote/LspCpp/CMakeFiles/CMakeOutput.log b/graphics/asymptote/LspCpp/CMakeFiles/CMakeOutput.log new file mode 100644 index 0000000000..ba95ae61ce --- /dev/null +++ b/graphics/asymptote/LspCpp/CMakeFiles/CMakeOutput.log @@ -0,0 +1,474 @@ +The system is: Linux - 5.15.10-100.fc34.x86_64 - x86_64 +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" succeeded. +Compiler: /bin/c++ +Build flags: -fPIE;-D_FILE_OFFSET_BITS=64;-DUSEGC;;-I../gc-8.2.0/include +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 "/usr/local/src/asymptote-2.78/LspCpp/CMakeFiles/3.20.5/CompilerIdCXX/a.out" + +Compiling the C compiler identification source file "CMakeCCompilerId.c" succeeded. +Compiler: /bin/cc +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 "/usr/local/src/asymptote-2.78/LspCpp/CMakeFiles/3.20.5/CompilerIdC/a.out" + +Detecting CXX compiler ABI info compiled with the following output: +Change Dir: /usr/local/src/asymptote-2.78/LspCpp/CMakeFiles/CMakeTmp + +Run Build Command(s):/bin/gmake -f Makefile cmTC_e0028/fast && gmake[1]: Entering directory '/u/src/asymptote-2.78/LspCpp/CMakeFiles/CMakeTmp' +make -f CMakeFiles/cmTC_e0028.dir/build.make CMakeFiles/cmTC_e0028.dir/build +make[2]: Entering directory '/u/src/asymptote-2.78/LspCpp/CMakeFiles/CMakeTmp' +Building CXX object CMakeFiles/cmTC_e0028.dir/CMakeCXXCompilerABI.cpp.o +/bin/c++ -fPIE -D_FILE_OFFSET_BITS=64 -DUSEGC -I../gc-8.2.0/include -v -o CMakeFiles/cmTC_e0028.dir/CMakeCXXCompilerABI.cpp.o -c /usr/share/cmake/Modules/CMakeCXXCompilerABI.cpp +Using built-in specs. +COLLECT_GCC=/bin/c++ +OFFLOAD_TARGET_NAMES=nvptx-none +OFFLOAD_TARGET_DEFAULT=1 +Target: x86_64-redhat-linux +Configured with: ../configure --enable-bootstrap --enable-languages=c,c++,fortran,objc,obj-c++,ada,go,d,lto --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-shared --enable-threads=posix --enable-checking=release --enable-multilib --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-gcc-major-version-only --with-linker-hash-style=gnu --enable-plugin --enable-initfini-array --with-isl=/builddir/build/BUILD/gcc-11.2.1-20210728/obj-x86_64-redhat-linux/isl-install --enable-offload-targets=nvptx-none --without-cuda-driver --enable-gnu-indirect-function --enable-cet --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux +Thread model: posix +Supported LTO compression algorithms: zlib zstd +gcc version 11.2.1 20210728 (Red Hat 11.2.1-1) (GCC) +COLLECT_GCC_OPTIONS='-fPIE' '-D' '_FILE_OFFSET_BITS=64' '-D' 'USEGC' '-I' '../gc-8.2.0/include' '-v' '-o' 'CMakeFiles/cmTC_e0028.dir/CMakeCXXCompilerABI.cpp.o' '-c' '-shared-libgcc' '-mtune=generic' '-march=x86-64' '-dumpdir' 'CMakeFiles/cmTC_e0028.dir/' + /usr/libexec/gcc/x86_64-redhat-linux/11/cc1plus -quiet -v -I ../gc-8.2.0/include -D_GNU_SOURCE -D _FILE_OFFSET_BITS=64 -D USEGC /usr/share/cmake/Modules/CMakeCXXCompilerABI.cpp -quiet -dumpdir CMakeFiles/cmTC_e0028.dir/ -dumpbase CMakeCXXCompilerABI.cpp.cpp -dumpbase-ext .cpp -mtune=generic -march=x86-64 -version -fPIE -o /tmp/ccDJ2YCF.s +GNU C++17 (GCC) version 11.2.1 20210728 (Red Hat 11.2.1-1) (x86_64-redhat-linux) + compiled by GNU C version 11.2.1 20210728 (Red Hat 11.2.1-1), GMP version 6.2.0, MPFR version 4.1.0-p13, MPC version 1.2.1, isl version isl-0.18-GMP + +GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 +ignoring nonexistent directory "/usr/lib/gcc/x86_64-redhat-linux/11/include-fixed" +ignoring nonexistent directory "/usr/lib/gcc/x86_64-redhat-linux/11/../../../../x86_64-redhat-linux/include" +ignoring nonexistent directory "../gc-8.2.0/include" +#include "..." search starts here: +#include <...> search starts here: + /usr/lib/gcc/x86_64-redhat-linux/11/../../../../include/c++/11 + /usr/lib/gcc/x86_64-redhat-linux/11/../../../../include/c++/11/x86_64-redhat-linux + /usr/lib/gcc/x86_64-redhat-linux/11/../../../../include/c++/11/backward + /usr/lib/gcc/x86_64-redhat-linux/11/include + /usr/local/include + /usr/include +End of search list. +GNU C++17 (GCC) version 11.2.1 20210728 (Red Hat 11.2.1-1) (x86_64-redhat-linux) + compiled by GNU C version 11.2.1 20210728 (Red Hat 11.2.1-1), GMP version 6.2.0, MPFR version 4.1.0-p13, MPC version 1.2.1, isl version isl-0.18-GMP + +GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 +Compiler executable checksum: ee1a2f208dd48c6a5d24bdcd31126e66 +COLLECT_GCC_OPTIONS='-fPIE' '-D' '_FILE_OFFSET_BITS=64' '-D' 'USEGC' '-I' '../gc-8.2.0/include' '-v' '-o' 'CMakeFiles/cmTC_e0028.dir/CMakeCXXCompilerABI.cpp.o' '-c' '-shared-libgcc' '-mtune=generic' '-march=x86-64' '-dumpdir' 'CMakeFiles/cmTC_e0028.dir/' + as -v -I ../gc-8.2.0/include --64 -o CMakeFiles/cmTC_e0028.dir/CMakeCXXCompilerABI.cpp.o /tmp/ccDJ2YCF.s +GNU assembler version 2.35.2 (x86_64-redhat-linux) using BFD version version 2.35.2-6.fc34 +COMPILER_PATH=/usr/libexec/gcc/x86_64-redhat-linux/11/:/usr/libexec/gcc/x86_64-redhat-linux/11/:/usr/libexec/gcc/x86_64-redhat-linux/:/usr/lib/gcc/x86_64-redhat-linux/11/:/usr/lib/gcc/x86_64-redhat-linux/ +LIBRARY_PATH=/usr/lib/gcc/x86_64-redhat-linux/11/:/usr/lib/gcc/x86_64-redhat-linux/11/../../../../lib64/:/lib/../lib64/:/usr/lib/../lib64/:/usr/lib/gcc/x86_64-redhat-linux/11/../../../:/lib/:/usr/lib/ +COLLECT_GCC_OPTIONS='-fPIE' '-D' '_FILE_OFFSET_BITS=64' '-D' 'USEGC' '-I' '../gc-8.2.0/include' '-v' '-o' 'CMakeFiles/cmTC_e0028.dir/CMakeCXXCompilerABI.cpp.o' '-c' '-shared-libgcc' '-mtune=generic' '-march=x86-64' '-dumpdir' 'CMakeFiles/cmTC_e0028.dir/CMakeCXXCompilerABI.cpp.' +Linking CXX executable cmTC_e0028 +/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_e0028.dir/link.txt --verbose=1 +/bin/c++ -fPIE -D_FILE_OFFSET_BITS=64 -DUSEGC -I../gc-8.2.0/include -v CMakeFiles/cmTC_e0028.dir/CMakeCXXCompilerABI.cpp.o -o cmTC_e0028 +Using built-in specs. +COLLECT_GCC=/bin/c++ +COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/11/lto-wrapper +OFFLOAD_TARGET_NAMES=nvptx-none +OFFLOAD_TARGET_DEFAULT=1 +Target: x86_64-redhat-linux +Configured with: ../configure --enable-bootstrap --enable-languages=c,c++,fortran,objc,obj-c++,ada,go,d,lto --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-shared --enable-threads=posix --enable-checking=release --enable-multilib --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-gcc-major-version-only --with-linker-hash-style=gnu --enable-plugin --enable-initfini-array --with-isl=/builddir/build/BUILD/gcc-11.2.1-20210728/obj-x86_64-redhat-linux/isl-install --enable-offload-targets=nvptx-none --without-cuda-driver --enable-gnu-indirect-function --enable-cet --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux +Thread model: posix +Supported LTO compression algorithms: zlib zstd +gcc version 11.2.1 20210728 (Red Hat 11.2.1-1) (GCC) +COMPILER_PATH=/usr/libexec/gcc/x86_64-redhat-linux/11/:/usr/libexec/gcc/x86_64-redhat-linux/11/:/usr/libexec/gcc/x86_64-redhat-linux/:/usr/lib/gcc/x86_64-redhat-linux/11/:/usr/lib/gcc/x86_64-redhat-linux/ +LIBRARY_PATH=/usr/lib/gcc/x86_64-redhat-linux/11/:/usr/lib/gcc/x86_64-redhat-linux/11/../../../../lib64/:/lib/../lib64/:/usr/lib/../lib64/:/usr/lib/gcc/x86_64-redhat-linux/11/../../../:/lib/:/usr/lib/ +COLLECT_GCC_OPTIONS='-fPIE' '-D' '_FILE_OFFSET_BITS=64' '-D' 'USEGC' '-I' '../gc-8.2.0/include' '-v' '-o' 'cmTC_e0028' '-shared-libgcc' '-mtune=generic' '-march=x86-64' '-dumpdir' 'cmTC_e0028.' + /usr/libexec/gcc/x86_64-redhat-linux/11/collect2 -plugin /usr/libexec/gcc/x86_64-redhat-linux/11/liblto_plugin.so -plugin-opt=/usr/libexec/gcc/x86_64-redhat-linux/11/lto-wrapper -plugin-opt=-fresolution=/tmp/cc9ECHaS.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 --no-add-needed --eh-frame-hdr --hash-style=gnu -m elf_x86_64 -dynamic-linker /lib64/ld-linux-x86-64.so.2 -o cmTC_e0028 /usr/lib/gcc/x86_64-redhat-linux/11/../../../../lib64/crt1.o /usr/lib/gcc/x86_64-redhat-linux/11/../../../../lib64/crti.o /usr/lib/gcc/x86_64-redhat-linux/11/crtbegin.o -L/usr/lib/gcc/x86_64-redhat-linux/11 -L/usr/lib/gcc/x86_64-redhat-linux/11/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/usr/lib/gcc/x86_64-redhat-linux/11/../../.. CMakeFiles/cmTC_e0028.dir/CMakeCXXCompilerABI.cpp.o -lstdc++ -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc /usr/lib/gcc/x86_64-redhat-linux/11/crtend.o /usr/lib/gcc/x86_64-redhat-linux/11/../../../../lib64/crtn.o +COLLECT_GCC_OPTIONS='-fPIE' '-D' '_FILE_OFFSET_BITS=64' '-D' 'USEGC' '-I' '../gc-8.2.0/include' '-v' '-o' 'cmTC_e0028' '-shared-libgcc' '-mtune=generic' '-march=x86-64' '-dumpdir' 'cmTC_e0028.' +make[2]: Leaving directory '/u/src/asymptote-2.78/LspCpp/CMakeFiles/CMakeTmp' +gmake[1]: Leaving directory '/u/src/asymptote-2.78/LspCpp/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/lib/gcc/x86_64-redhat-linux/11/../../../../include/c++/11] + add: [/usr/lib/gcc/x86_64-redhat-linux/11/../../../../include/c++/11/x86_64-redhat-linux] + add: [/usr/lib/gcc/x86_64-redhat-linux/11/../../../../include/c++/11/backward] + add: [/usr/lib/gcc/x86_64-redhat-linux/11/include] + add: [/usr/local/include] + add: [/usr/include] + end of search list found + collapse include dir [/usr/lib/gcc/x86_64-redhat-linux/11/../../../../include/c++/11] ==> [/usr/include/c++/11] + collapse include dir [/usr/lib/gcc/x86_64-redhat-linux/11/../../../../include/c++/11/x86_64-redhat-linux] ==> [/usr/include/c++/11/x86_64-redhat-linux] + collapse include dir [/usr/lib/gcc/x86_64-redhat-linux/11/../../../../include/c++/11/backward] ==> [/usr/include/c++/11/backward] + collapse include dir [/usr/lib/gcc/x86_64-redhat-linux/11/include] ==> [/usr/lib/gcc/x86_64-redhat-linux/11/include] + collapse include dir [/usr/local/include] ==> [/usr/local/include] + collapse include dir [/usr/include] ==> [/usr/include] + implicit include dirs: [/usr/include/c++/11;/usr/include/c++/11/x86_64-redhat-linux;/usr/include/c++/11/backward;/usr/lib/gcc/x86_64-redhat-linux/11/include;/usr/local/include;/usr/include] + + +Parsed CXX implicit link information from above output: + link line regex: [^( *|.*[/\])(ld|CMAKE_LINK_STARTFILE-NOTFOUND|([^/\]+-)?ld|collect2)[^/\]*( |$)] + ignore line: [Change Dir: /usr/local/src/asymptote-2.78/LspCpp/CMakeFiles/CMakeTmp] + ignore line: [] + ignore line: [Run Build Command(s):/bin/gmake -f Makefile cmTC_e0028/fast && gmake[1]: Entering directory '/u/src/asymptote-2.78/LspCpp/CMakeFiles/CMakeTmp'] + ignore line: [make -f CMakeFiles/cmTC_e0028.dir/build.make CMakeFiles/cmTC_e0028.dir/build] + ignore line: [make[2]: Entering directory '/u/src/asymptote-2.78/LspCpp/CMakeFiles/CMakeTmp'] + ignore line: [Building CXX object CMakeFiles/cmTC_e0028.dir/CMakeCXXCompilerABI.cpp.o] + ignore line: [/bin/c++ -fPIE -D_FILE_OFFSET_BITS=64 -DUSEGC -I../gc-8.2.0/include -v -o CMakeFiles/cmTC_e0028.dir/CMakeCXXCompilerABI.cpp.o -c /usr/share/cmake/Modules/CMakeCXXCompilerABI.cpp] + ignore line: [Using built-in specs.] + ignore line: [COLLECT_GCC=/bin/c++] + ignore line: [OFFLOAD_TARGET_NAMES=nvptx-none] + ignore line: [OFFLOAD_TARGET_DEFAULT=1] + ignore line: [Target: x86_64-redhat-linux] + ignore line: [Configured with: ../configure --enable-bootstrap --enable-languages=c c++ fortran objc obj-c++ ada go d lto --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-shared --enable-threads=posix --enable-checking=release --enable-multilib --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-gcc-major-version-only --with-linker-hash-style=gnu --enable-plugin --enable-initfini-array --with-isl=/builddir/build/BUILD/gcc-11.2.1-20210728/obj-x86_64-redhat-linux/isl-install --enable-offload-targets=nvptx-none --without-cuda-driver --enable-gnu-indirect-function --enable-cet --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux] + ignore line: [Thread model: posix] + ignore line: [Supported LTO compression algorithms: zlib zstd] + ignore line: [gcc version 11.2.1 20210728 (Red Hat 11.2.1-1) (GCC) ] + ignore line: [COLLECT_GCC_OPTIONS='-fPIE' '-D' '_FILE_OFFSET_BITS=64' '-D' 'USEGC' '-I' '../gc-8.2.0/include' '-v' '-o' 'CMakeFiles/cmTC_e0028.dir/CMakeCXXCompilerABI.cpp.o' '-c' '-shared-libgcc' '-mtune=generic' '-march=x86-64' '-dumpdir' 'CMakeFiles/cmTC_e0028.dir/'] + ignore line: [ /usr/libexec/gcc/x86_64-redhat-linux/11/cc1plus -quiet -v -I ../gc-8.2.0/include -D_GNU_SOURCE -D _FILE_OFFSET_BITS=64 -D USEGC /usr/share/cmake/Modules/CMakeCXXCompilerABI.cpp -quiet -dumpdir CMakeFiles/cmTC_e0028.dir/ -dumpbase CMakeCXXCompilerABI.cpp.cpp -dumpbase-ext .cpp -mtune=generic -march=x86-64 -version -fPIE -o /tmp/ccDJ2YCF.s] + ignore line: [GNU C++17 (GCC) version 11.2.1 20210728 (Red Hat 11.2.1-1) (x86_64-redhat-linux)] + ignore line: [ compiled by GNU C version 11.2.1 20210728 (Red Hat 11.2.1-1) GMP version 6.2.0 MPFR version 4.1.0-p13 MPC version 1.2.1 isl version isl-0.18-GMP] + ignore line: [] + ignore line: [GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072] + ignore line: [ignoring nonexistent directory "/usr/lib/gcc/x86_64-redhat-linux/11/include-fixed"] + ignore line: [ignoring nonexistent directory "/usr/lib/gcc/x86_64-redhat-linux/11/../../../../x86_64-redhat-linux/include"] + ignore line: [ignoring nonexistent directory "../gc-8.2.0/include"] + ignore line: [#include "..." search starts here:] + ignore line: [#include <...> search starts here:] + ignore line: [ /usr/lib/gcc/x86_64-redhat-linux/11/../../../../include/c++/11] + ignore line: [ /usr/lib/gcc/x86_64-redhat-linux/11/../../../../include/c++/11/x86_64-redhat-linux] + ignore line: [ /usr/lib/gcc/x86_64-redhat-linux/11/../../../../include/c++/11/backward] + ignore line: [ /usr/lib/gcc/x86_64-redhat-linux/11/include] + ignore line: [ /usr/local/include] + ignore line: [ /usr/include] + ignore line: [End of search list.] + ignore line: [GNU C++17 (GCC) version 11.2.1 20210728 (Red Hat 11.2.1-1) (x86_64-redhat-linux)] + ignore line: [ compiled by GNU C version 11.2.1 20210728 (Red Hat 11.2.1-1) GMP version 6.2.0 MPFR version 4.1.0-p13 MPC version 1.2.1 isl version isl-0.18-GMP] + ignore line: [] + ignore line: [GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072] + ignore line: [Compiler executable checksum: ee1a2f208dd48c6a5d24bdcd31126e66] + ignore line: [COLLECT_GCC_OPTIONS='-fPIE' '-D' '_FILE_OFFSET_BITS=64' '-D' 'USEGC' '-I' '../gc-8.2.0/include' '-v' '-o' 'CMakeFiles/cmTC_e0028.dir/CMakeCXXCompilerABI.cpp.o' '-c' '-shared-libgcc' '-mtune=generic' '-march=x86-64' '-dumpdir' 'CMakeFiles/cmTC_e0028.dir/'] + ignore line: [ as -v -I ../gc-8.2.0/include --64 -o CMakeFiles/cmTC_e0028.dir/CMakeCXXCompilerABI.cpp.o /tmp/ccDJ2YCF.s] + ignore line: [GNU assembler version 2.35.2 (x86_64-redhat-linux) using BFD version version 2.35.2-6.fc34] + ignore line: [COMPILER_PATH=/usr/libexec/gcc/x86_64-redhat-linux/11/:/usr/libexec/gcc/x86_64-redhat-linux/11/:/usr/libexec/gcc/x86_64-redhat-linux/:/usr/lib/gcc/x86_64-redhat-linux/11/:/usr/lib/gcc/x86_64-redhat-linux/] + ignore line: [LIBRARY_PATH=/usr/lib/gcc/x86_64-redhat-linux/11/:/usr/lib/gcc/x86_64-redhat-linux/11/../../../../lib64/:/lib/../lib64/:/usr/lib/../lib64/:/usr/lib/gcc/x86_64-redhat-linux/11/../../../:/lib/:/usr/lib/] + ignore line: [COLLECT_GCC_OPTIONS='-fPIE' '-D' '_FILE_OFFSET_BITS=64' '-D' 'USEGC' '-I' '../gc-8.2.0/include' '-v' '-o' 'CMakeFiles/cmTC_e0028.dir/CMakeCXXCompilerABI.cpp.o' '-c' '-shared-libgcc' '-mtune=generic' '-march=x86-64' '-dumpdir' 'CMakeFiles/cmTC_e0028.dir/CMakeCXXCompilerABI.cpp.'] + ignore line: [Linking CXX executable cmTC_e0028] + ignore line: [/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_e0028.dir/link.txt --verbose=1] + ignore line: [/bin/c++ -fPIE -D_FILE_OFFSET_BITS=64 -DUSEGC -I../gc-8.2.0/include -v CMakeFiles/cmTC_e0028.dir/CMakeCXXCompilerABI.cpp.o -o cmTC_e0028 ] + ignore line: [Using built-in specs.] + ignore line: [COLLECT_GCC=/bin/c++] + ignore line: [COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/11/lto-wrapper] + ignore line: [OFFLOAD_TARGET_NAMES=nvptx-none] + ignore line: [OFFLOAD_TARGET_DEFAULT=1] + ignore line: [Target: x86_64-redhat-linux] + ignore line: [Configured with: ../configure --enable-bootstrap --enable-languages=c c++ fortran objc obj-c++ ada go d lto --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-shared --enable-threads=posix --enable-checking=release --enable-multilib --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-gcc-major-version-only --with-linker-hash-style=gnu --enable-plugin --enable-initfini-array --with-isl=/builddir/build/BUILD/gcc-11.2.1-20210728/obj-x86_64-redhat-linux/isl-install --enable-offload-targets=nvptx-none --without-cuda-driver --enable-gnu-indirect-function --enable-cet --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux] + ignore line: [Thread model: posix] + ignore line: [Supported LTO compression algorithms: zlib zstd] + ignore line: [gcc version 11.2.1 20210728 (Red Hat 11.2.1-1) (GCC) ] + ignore line: [COMPILER_PATH=/usr/libexec/gcc/x86_64-redhat-linux/11/:/usr/libexec/gcc/x86_64-redhat-linux/11/:/usr/libexec/gcc/x86_64-redhat-linux/:/usr/lib/gcc/x86_64-redhat-linux/11/:/usr/lib/gcc/x86_64-redhat-linux/] + ignore line: [LIBRARY_PATH=/usr/lib/gcc/x86_64-redhat-linux/11/:/usr/lib/gcc/x86_64-redhat-linux/11/../../../../lib64/:/lib/../lib64/:/usr/lib/../lib64/:/usr/lib/gcc/x86_64-redhat-linux/11/../../../:/lib/:/usr/lib/] + ignore line: [COLLECT_GCC_OPTIONS='-fPIE' '-D' '_FILE_OFFSET_BITS=64' '-D' 'USEGC' '-I' '../gc-8.2.0/include' '-v' '-o' 'cmTC_e0028' '-shared-libgcc' '-mtune=generic' '-march=x86-64' '-dumpdir' 'cmTC_e0028.'] + link line: [ /usr/libexec/gcc/x86_64-redhat-linux/11/collect2 -plugin /usr/libexec/gcc/x86_64-redhat-linux/11/liblto_plugin.so -plugin-opt=/usr/libexec/gcc/x86_64-redhat-linux/11/lto-wrapper -plugin-opt=-fresolution=/tmp/cc9ECHaS.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 --no-add-needed --eh-frame-hdr --hash-style=gnu -m elf_x86_64 -dynamic-linker /lib64/ld-linux-x86-64.so.2 -o cmTC_e0028 /usr/lib/gcc/x86_64-redhat-linux/11/../../../../lib64/crt1.o /usr/lib/gcc/x86_64-redhat-linux/11/../../../../lib64/crti.o /usr/lib/gcc/x86_64-redhat-linux/11/crtbegin.o -L/usr/lib/gcc/x86_64-redhat-linux/11 -L/usr/lib/gcc/x86_64-redhat-linux/11/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/usr/lib/gcc/x86_64-redhat-linux/11/../../.. CMakeFiles/cmTC_e0028.dir/CMakeCXXCompilerABI.cpp.o -lstdc++ -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc /usr/lib/gcc/x86_64-redhat-linux/11/crtend.o /usr/lib/gcc/x86_64-redhat-linux/11/../../../../lib64/crtn.o] + arg [/usr/libexec/gcc/x86_64-redhat-linux/11/collect2] ==> ignore + arg [-plugin] ==> ignore + arg [/usr/libexec/gcc/x86_64-redhat-linux/11/liblto_plugin.so] ==> ignore + arg [-plugin-opt=/usr/libexec/gcc/x86_64-redhat-linux/11/lto-wrapper] ==> ignore + arg [-plugin-opt=-fresolution=/tmp/cc9ECHaS.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 [--no-add-needed] ==> ignore + arg [--eh-frame-hdr] ==> ignore + arg [--hash-style=gnu] ==> ignore + arg [-m] ==> ignore + arg [elf_x86_64] ==> ignore + arg [-dynamic-linker] ==> ignore + arg [/lib64/ld-linux-x86-64.so.2] ==> ignore + arg [-o] ==> ignore + arg [cmTC_e0028] ==> ignore + arg [/usr/lib/gcc/x86_64-redhat-linux/11/../../../../lib64/crt1.o] ==> obj [/usr/lib/gcc/x86_64-redhat-linux/11/../../../../lib64/crt1.o] + arg [/usr/lib/gcc/x86_64-redhat-linux/11/../../../../lib64/crti.o] ==> obj [/usr/lib/gcc/x86_64-redhat-linux/11/../../../../lib64/crti.o] + arg [/usr/lib/gcc/x86_64-redhat-linux/11/crtbegin.o] ==> obj [/usr/lib/gcc/x86_64-redhat-linux/11/crtbegin.o] + arg [-L/usr/lib/gcc/x86_64-redhat-linux/11] ==> dir [/usr/lib/gcc/x86_64-redhat-linux/11] + arg [-L/usr/lib/gcc/x86_64-redhat-linux/11/../../../../lib64] ==> dir [/usr/lib/gcc/x86_64-redhat-linux/11/../../../../lib64] + arg [-L/lib/../lib64] ==> dir [/lib/../lib64] + arg [-L/usr/lib/../lib64] ==> dir [/usr/lib/../lib64] + arg [-L/usr/lib/gcc/x86_64-redhat-linux/11/../../..] ==> dir [/usr/lib/gcc/x86_64-redhat-linux/11/../../..] + arg [CMakeFiles/cmTC_e0028.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-redhat-linux/11/crtend.o] ==> obj [/usr/lib/gcc/x86_64-redhat-linux/11/crtend.o] + arg [/usr/lib/gcc/x86_64-redhat-linux/11/../../../../lib64/crtn.o] ==> obj [/usr/lib/gcc/x86_64-redhat-linux/11/../../../../lib64/crtn.o] + collapse obj [/usr/lib/gcc/x86_64-redhat-linux/11/../../../../lib64/crt1.o] ==> [/usr/lib64/crt1.o] + collapse obj [/usr/lib/gcc/x86_64-redhat-linux/11/../../../../lib64/crti.o] ==> [/usr/lib64/crti.o] + collapse obj [/usr/lib/gcc/x86_64-redhat-linux/11/../../../../lib64/crtn.o] ==> [/usr/lib64/crtn.o] + collapse library dir [/usr/lib/gcc/x86_64-redhat-linux/11] ==> [/usr/lib/gcc/x86_64-redhat-linux/11] + collapse library dir [/usr/lib/gcc/x86_64-redhat-linux/11/../../../../lib64] ==> [/usr/lib64] + collapse library dir [/lib/../lib64] ==> [/lib64] + collapse library dir [/usr/lib/../lib64] ==> [/usr/lib64] + collapse library dir [/usr/lib/gcc/x86_64-redhat-linux/11/../../..] ==> [/usr/lib] + implicit libs: [stdc++;m;gcc_s;gcc;c;gcc_s;gcc] + implicit objs: [/usr/lib64/crt1.o;/usr/lib64/crti.o;/usr/lib/gcc/x86_64-redhat-linux/11/crtbegin.o;/usr/lib/gcc/x86_64-redhat-linux/11/crtend.o;/usr/lib64/crtn.o] + implicit dirs: [/usr/lib/gcc/x86_64-redhat-linux/11;/usr/lib64;/lib64;/usr/lib] + implicit fwks: [] + + +Detecting C compiler ABI info compiled with the following output: +Change Dir: /usr/local/src/asymptote-2.78/LspCpp/CMakeFiles/CMakeTmp + +Run Build Command(s):/bin/gmake -f Makefile cmTC_20063/fast && gmake[1]: Entering directory '/u/src/asymptote-2.78/LspCpp/CMakeFiles/CMakeTmp' +make -f CMakeFiles/cmTC_20063.dir/build.make CMakeFiles/cmTC_20063.dir/build +make[2]: Entering directory '/u/src/asymptote-2.78/LspCpp/CMakeFiles/CMakeTmp' +Building C object CMakeFiles/cmTC_20063.dir/CMakeCCompilerABI.c.o +/bin/cc -v -o CMakeFiles/cmTC_20063.dir/CMakeCCompilerABI.c.o -c /usr/share/cmake/Modules/CMakeCCompilerABI.c +Using built-in specs. +COLLECT_GCC=/bin/cc +OFFLOAD_TARGET_NAMES=nvptx-none +OFFLOAD_TARGET_DEFAULT=1 +Target: x86_64-redhat-linux +Configured with: ../configure --enable-bootstrap --enable-languages=c,c++,fortran,objc,obj-c++,ada,go,d,lto --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-shared --enable-threads=posix --enable-checking=release --enable-multilib --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-gcc-major-version-only --with-linker-hash-style=gnu --enable-plugin --enable-initfini-array --with-isl=/builddir/build/BUILD/gcc-11.2.1-20210728/obj-x86_64-redhat-linux/isl-install --enable-offload-targets=nvptx-none --without-cuda-driver --enable-gnu-indirect-function --enable-cet --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux +Thread model: posix +Supported LTO compression algorithms: zlib zstd +gcc version 11.2.1 20210728 (Red Hat 11.2.1-1) (GCC) +COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_20063.dir/CMakeCCompilerABI.c.o' '-c' '-mtune=generic' '-march=x86-64' '-dumpdir' 'CMakeFiles/cmTC_20063.dir/' + /usr/libexec/gcc/x86_64-redhat-linux/11/cc1 -quiet -v /usr/share/cmake/Modules/CMakeCCompilerABI.c -quiet -dumpdir CMakeFiles/cmTC_20063.dir/ -dumpbase CMakeCCompilerABI.c.c -dumpbase-ext .c -mtune=generic -march=x86-64 -version -o /tmp/ccB6LTGR.s +GNU C17 (GCC) version 11.2.1 20210728 (Red Hat 11.2.1-1) (x86_64-redhat-linux) + compiled by GNU C version 11.2.1 20210728 (Red Hat 11.2.1-1), GMP version 6.2.0, MPFR version 4.1.0-p13, MPC version 1.2.1, isl version isl-0.18-GMP + +GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 +ignoring nonexistent directory "/usr/lib/gcc/x86_64-redhat-linux/11/include-fixed" +ignoring nonexistent directory "/usr/lib/gcc/x86_64-redhat-linux/11/../../../../x86_64-redhat-linux/include" +#include "..." search starts here: +#include <...> search starts here: + /usr/lib/gcc/x86_64-redhat-linux/11/include + /usr/local/include + /usr/include +End of search list. +GNU C17 (GCC) version 11.2.1 20210728 (Red Hat 11.2.1-1) (x86_64-redhat-linux) + compiled by GNU C version 11.2.1 20210728 (Red Hat 11.2.1-1), GMP version 6.2.0, MPFR version 4.1.0-p13, MPC version 1.2.1, isl version isl-0.18-GMP + +GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 +Compiler executable checksum: d9978e1d525f02eccc63983c4161253e +COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_20063.dir/CMakeCCompilerABI.c.o' '-c' '-mtune=generic' '-march=x86-64' '-dumpdir' 'CMakeFiles/cmTC_20063.dir/' + as -v --64 -o CMakeFiles/cmTC_20063.dir/CMakeCCompilerABI.c.o /tmp/ccB6LTGR.s +GNU assembler version 2.35.2 (x86_64-redhat-linux) using BFD version version 2.35.2-6.fc34 +COMPILER_PATH=/usr/libexec/gcc/x86_64-redhat-linux/11/:/usr/libexec/gcc/x86_64-redhat-linux/11/:/usr/libexec/gcc/x86_64-redhat-linux/:/usr/lib/gcc/x86_64-redhat-linux/11/:/usr/lib/gcc/x86_64-redhat-linux/ +LIBRARY_PATH=/usr/lib/gcc/x86_64-redhat-linux/11/:/usr/lib/gcc/x86_64-redhat-linux/11/../../../../lib64/:/lib/../lib64/:/usr/lib/../lib64/:/usr/lib/gcc/x86_64-redhat-linux/11/../../../:/lib/:/usr/lib/ +COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_20063.dir/CMakeCCompilerABI.c.o' '-c' '-mtune=generic' '-march=x86-64' '-dumpdir' 'CMakeFiles/cmTC_20063.dir/CMakeCCompilerABI.c.' +Linking C executable cmTC_20063 +/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_20063.dir/link.txt --verbose=1 +/bin/cc -v CMakeFiles/cmTC_20063.dir/CMakeCCompilerABI.c.o -o cmTC_20063 +Using built-in specs. +COLLECT_GCC=/bin/cc +COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/11/lto-wrapper +OFFLOAD_TARGET_NAMES=nvptx-none +OFFLOAD_TARGET_DEFAULT=1 +Target: x86_64-redhat-linux +Configured with: ../configure --enable-bootstrap --enable-languages=c,c++,fortran,objc,obj-c++,ada,go,d,lto --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-shared --enable-threads=posix --enable-checking=release --enable-multilib --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-gcc-major-version-only --with-linker-hash-style=gnu --enable-plugin --enable-initfini-array --with-isl=/builddir/build/BUILD/gcc-11.2.1-20210728/obj-x86_64-redhat-linux/isl-install --enable-offload-targets=nvptx-none --without-cuda-driver --enable-gnu-indirect-function --enable-cet --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux +Thread model: posix +Supported LTO compression algorithms: zlib zstd +gcc version 11.2.1 20210728 (Red Hat 11.2.1-1) (GCC) +COMPILER_PATH=/usr/libexec/gcc/x86_64-redhat-linux/11/:/usr/libexec/gcc/x86_64-redhat-linux/11/:/usr/libexec/gcc/x86_64-redhat-linux/:/usr/lib/gcc/x86_64-redhat-linux/11/:/usr/lib/gcc/x86_64-redhat-linux/ +LIBRARY_PATH=/usr/lib/gcc/x86_64-redhat-linux/11/:/usr/lib/gcc/x86_64-redhat-linux/11/../../../../lib64/:/lib/../lib64/:/usr/lib/../lib64/:/usr/lib/gcc/x86_64-redhat-linux/11/../../../:/lib/:/usr/lib/ +COLLECT_GCC_OPTIONS='-v' '-o' 'cmTC_20063' '-mtune=generic' '-march=x86-64' '-dumpdir' 'cmTC_20063.' + /usr/libexec/gcc/x86_64-redhat-linux/11/collect2 -plugin /usr/libexec/gcc/x86_64-redhat-linux/11/liblto_plugin.so -plugin-opt=/usr/libexec/gcc/x86_64-redhat-linux/11/lto-wrapper -plugin-opt=-fresolution=/tmp/cc5Fo8e0.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 --no-add-needed --eh-frame-hdr --hash-style=gnu -m elf_x86_64 -dynamic-linker /lib64/ld-linux-x86-64.so.2 -o cmTC_20063 /usr/lib/gcc/x86_64-redhat-linux/11/../../../../lib64/crt1.o /usr/lib/gcc/x86_64-redhat-linux/11/../../../../lib64/crti.o /usr/lib/gcc/x86_64-redhat-linux/11/crtbegin.o -L/usr/lib/gcc/x86_64-redhat-linux/11 -L/usr/lib/gcc/x86_64-redhat-linux/11/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/usr/lib/gcc/x86_64-redhat-linux/11/../../.. CMakeFiles/cmTC_20063.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-redhat-linux/11/crtend.o /usr/lib/gcc/x86_64-redhat-linux/11/../../../../lib64/crtn.o +COLLECT_GCC_OPTIONS='-v' '-o' 'cmTC_20063' '-mtune=generic' '-march=x86-64' '-dumpdir' 'cmTC_20063.' +make[2]: Leaving directory '/u/src/asymptote-2.78/LspCpp/CMakeFiles/CMakeTmp' +gmake[1]: Leaving directory '/u/src/asymptote-2.78/LspCpp/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-redhat-linux/11/include] + add: [/usr/local/include] + add: [/usr/include] + end of search list found + collapse include dir [/usr/lib/gcc/x86_64-redhat-linux/11/include] ==> [/usr/lib/gcc/x86_64-redhat-linux/11/include] + collapse include dir [/usr/local/include] ==> [/usr/local/include] + collapse include dir [/usr/include] ==> [/usr/include] + implicit include dirs: [/usr/lib/gcc/x86_64-redhat-linux/11/include;/usr/local/include;/usr/include] + + +Parsed C implicit link information from above output: + link line regex: [^( *|.*[/\])(ld|CMAKE_LINK_STARTFILE-NOTFOUND|([^/\]+-)?ld|collect2)[^/\]*( |$)] + ignore line: [Change Dir: /usr/local/src/asymptote-2.78/LspCpp/CMakeFiles/CMakeTmp] + ignore line: [] + ignore line: [Run Build Command(s):/bin/gmake -f Makefile cmTC_20063/fast && gmake[1]: Entering directory '/u/src/asymptote-2.78/LspCpp/CMakeFiles/CMakeTmp'] + ignore line: [make -f CMakeFiles/cmTC_20063.dir/build.make CMakeFiles/cmTC_20063.dir/build] + ignore line: [make[2]: Entering directory '/u/src/asymptote-2.78/LspCpp/CMakeFiles/CMakeTmp'] + ignore line: [Building C object CMakeFiles/cmTC_20063.dir/CMakeCCompilerABI.c.o] + ignore line: [/bin/cc -v -o CMakeFiles/cmTC_20063.dir/CMakeCCompilerABI.c.o -c /usr/share/cmake/Modules/CMakeCCompilerABI.c] + ignore line: [Using built-in specs.] + ignore line: [COLLECT_GCC=/bin/cc] + ignore line: [OFFLOAD_TARGET_NAMES=nvptx-none] + ignore line: [OFFLOAD_TARGET_DEFAULT=1] + ignore line: [Target: x86_64-redhat-linux] + ignore line: [Configured with: ../configure --enable-bootstrap --enable-languages=c c++ fortran objc obj-c++ ada go d lto --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-shared --enable-threads=posix --enable-checking=release --enable-multilib --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-gcc-major-version-only --with-linker-hash-style=gnu --enable-plugin --enable-initfini-array --with-isl=/builddir/build/BUILD/gcc-11.2.1-20210728/obj-x86_64-redhat-linux/isl-install --enable-offload-targets=nvptx-none --without-cuda-driver --enable-gnu-indirect-function --enable-cet --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux] + ignore line: [Thread model: posix] + ignore line: [Supported LTO compression algorithms: zlib zstd] + ignore line: [gcc version 11.2.1 20210728 (Red Hat 11.2.1-1) (GCC) ] + ignore line: [COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_20063.dir/CMakeCCompilerABI.c.o' '-c' '-mtune=generic' '-march=x86-64' '-dumpdir' 'CMakeFiles/cmTC_20063.dir/'] + ignore line: [ /usr/libexec/gcc/x86_64-redhat-linux/11/cc1 -quiet -v /usr/share/cmake/Modules/CMakeCCompilerABI.c -quiet -dumpdir CMakeFiles/cmTC_20063.dir/ -dumpbase CMakeCCompilerABI.c.c -dumpbase-ext .c -mtune=generic -march=x86-64 -version -o /tmp/ccB6LTGR.s] + ignore line: [GNU C17 (GCC) version 11.2.1 20210728 (Red Hat 11.2.1-1) (x86_64-redhat-linux)] + ignore line: [ compiled by GNU C version 11.2.1 20210728 (Red Hat 11.2.1-1) GMP version 6.2.0 MPFR version 4.1.0-p13 MPC version 1.2.1 isl version isl-0.18-GMP] + ignore line: [] + ignore line: [GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072] + ignore line: [ignoring nonexistent directory "/usr/lib/gcc/x86_64-redhat-linux/11/include-fixed"] + ignore line: [ignoring nonexistent directory "/usr/lib/gcc/x86_64-redhat-linux/11/../../../../x86_64-redhat-linux/include"] + ignore line: [#include "..." search starts here:] + ignore line: [#include <...> search starts here:] + ignore line: [ /usr/lib/gcc/x86_64-redhat-linux/11/include] + ignore line: [ /usr/local/include] + ignore line: [ /usr/include] + ignore line: [End of search list.] + ignore line: [GNU C17 (GCC) version 11.2.1 20210728 (Red Hat 11.2.1-1) (x86_64-redhat-linux)] + ignore line: [ compiled by GNU C version 11.2.1 20210728 (Red Hat 11.2.1-1) GMP version 6.2.0 MPFR version 4.1.0-p13 MPC version 1.2.1 isl version isl-0.18-GMP] + ignore line: [] + ignore line: [GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072] + ignore line: [Compiler executable checksum: d9978e1d525f02eccc63983c4161253e] + ignore line: [COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_20063.dir/CMakeCCompilerABI.c.o' '-c' '-mtune=generic' '-march=x86-64' '-dumpdir' 'CMakeFiles/cmTC_20063.dir/'] + ignore line: [ as -v --64 -o CMakeFiles/cmTC_20063.dir/CMakeCCompilerABI.c.o /tmp/ccB6LTGR.s] + ignore line: [GNU assembler version 2.35.2 (x86_64-redhat-linux) using BFD version version 2.35.2-6.fc34] + ignore line: [COMPILER_PATH=/usr/libexec/gcc/x86_64-redhat-linux/11/:/usr/libexec/gcc/x86_64-redhat-linux/11/:/usr/libexec/gcc/x86_64-redhat-linux/:/usr/lib/gcc/x86_64-redhat-linux/11/:/usr/lib/gcc/x86_64-redhat-linux/] + ignore line: [LIBRARY_PATH=/usr/lib/gcc/x86_64-redhat-linux/11/:/usr/lib/gcc/x86_64-redhat-linux/11/../../../../lib64/:/lib/../lib64/:/usr/lib/../lib64/:/usr/lib/gcc/x86_64-redhat-linux/11/../../../:/lib/:/usr/lib/] + ignore line: [COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_20063.dir/CMakeCCompilerABI.c.o' '-c' '-mtune=generic' '-march=x86-64' '-dumpdir' 'CMakeFiles/cmTC_20063.dir/CMakeCCompilerABI.c.'] + ignore line: [Linking C executable cmTC_20063] + ignore line: [/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_20063.dir/link.txt --verbose=1] + ignore line: [/bin/cc -v CMakeFiles/cmTC_20063.dir/CMakeCCompilerABI.c.o -o cmTC_20063 ] + ignore line: [Using built-in specs.] + ignore line: [COLLECT_GCC=/bin/cc] + ignore line: [COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/11/lto-wrapper] + ignore line: [OFFLOAD_TARGET_NAMES=nvptx-none] + ignore line: [OFFLOAD_TARGET_DEFAULT=1] + ignore line: [Target: x86_64-redhat-linux] + ignore line: [Configured with: ../configure --enable-bootstrap --enable-languages=c c++ fortran objc obj-c++ ada go d lto --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-shared --enable-threads=posix --enable-checking=release --enable-multilib --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-gcc-major-version-only --with-linker-hash-style=gnu --enable-plugin --enable-initfini-array --with-isl=/builddir/build/BUILD/gcc-11.2.1-20210728/obj-x86_64-redhat-linux/isl-install --enable-offload-targets=nvptx-none --without-cuda-driver --enable-gnu-indirect-function --enable-cet --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux] + ignore line: [Thread model: posix] + ignore line: [Supported LTO compression algorithms: zlib zstd] + ignore line: [gcc version 11.2.1 20210728 (Red Hat 11.2.1-1) (GCC) ] + ignore line: [COMPILER_PATH=/usr/libexec/gcc/x86_64-redhat-linux/11/:/usr/libexec/gcc/x86_64-redhat-linux/11/:/usr/libexec/gcc/x86_64-redhat-linux/:/usr/lib/gcc/x86_64-redhat-linux/11/:/usr/lib/gcc/x86_64-redhat-linux/] + ignore line: [LIBRARY_PATH=/usr/lib/gcc/x86_64-redhat-linux/11/:/usr/lib/gcc/x86_64-redhat-linux/11/../../../../lib64/:/lib/../lib64/:/usr/lib/../lib64/:/usr/lib/gcc/x86_64-redhat-linux/11/../../../:/lib/:/usr/lib/] + ignore line: [COLLECT_GCC_OPTIONS='-v' '-o' 'cmTC_20063' '-mtune=generic' '-march=x86-64' '-dumpdir' 'cmTC_20063.'] + link line: [ /usr/libexec/gcc/x86_64-redhat-linux/11/collect2 -plugin /usr/libexec/gcc/x86_64-redhat-linux/11/liblto_plugin.so -plugin-opt=/usr/libexec/gcc/x86_64-redhat-linux/11/lto-wrapper -plugin-opt=-fresolution=/tmp/cc5Fo8e0.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 --no-add-needed --eh-frame-hdr --hash-style=gnu -m elf_x86_64 -dynamic-linker /lib64/ld-linux-x86-64.so.2 -o cmTC_20063 /usr/lib/gcc/x86_64-redhat-linux/11/../../../../lib64/crt1.o /usr/lib/gcc/x86_64-redhat-linux/11/../../../../lib64/crti.o /usr/lib/gcc/x86_64-redhat-linux/11/crtbegin.o -L/usr/lib/gcc/x86_64-redhat-linux/11 -L/usr/lib/gcc/x86_64-redhat-linux/11/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/usr/lib/gcc/x86_64-redhat-linux/11/../../.. CMakeFiles/cmTC_20063.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-redhat-linux/11/crtend.o /usr/lib/gcc/x86_64-redhat-linux/11/../../../../lib64/crtn.o] + arg [/usr/libexec/gcc/x86_64-redhat-linux/11/collect2] ==> ignore + arg [-plugin] ==> ignore + arg [/usr/libexec/gcc/x86_64-redhat-linux/11/liblto_plugin.so] ==> ignore + arg [-plugin-opt=/usr/libexec/gcc/x86_64-redhat-linux/11/lto-wrapper] ==> ignore + arg [-plugin-opt=-fresolution=/tmp/cc5Fo8e0.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 [--no-add-needed] ==> ignore + arg [--eh-frame-hdr] ==> ignore + arg [--hash-style=gnu] ==> ignore + arg [-m] ==> ignore + arg [elf_x86_64] ==> ignore + arg [-dynamic-linker] ==> ignore + arg [/lib64/ld-linux-x86-64.so.2] ==> ignore + arg [-o] ==> ignore + arg [cmTC_20063] ==> ignore + arg [/usr/lib/gcc/x86_64-redhat-linux/11/../../../../lib64/crt1.o] ==> obj [/usr/lib/gcc/x86_64-redhat-linux/11/../../../../lib64/crt1.o] + arg [/usr/lib/gcc/x86_64-redhat-linux/11/../../../../lib64/crti.o] ==> obj [/usr/lib/gcc/x86_64-redhat-linux/11/../../../../lib64/crti.o] + arg [/usr/lib/gcc/x86_64-redhat-linux/11/crtbegin.o] ==> obj [/usr/lib/gcc/x86_64-redhat-linux/11/crtbegin.o] + arg [-L/usr/lib/gcc/x86_64-redhat-linux/11] ==> dir [/usr/lib/gcc/x86_64-redhat-linux/11] + arg [-L/usr/lib/gcc/x86_64-redhat-linux/11/../../../../lib64] ==> dir [/usr/lib/gcc/x86_64-redhat-linux/11/../../../../lib64] + arg [-L/lib/../lib64] ==> dir [/lib/../lib64] + arg [-L/usr/lib/../lib64] ==> dir [/usr/lib/../lib64] + arg [-L/usr/lib/gcc/x86_64-redhat-linux/11/../../..] ==> dir [/usr/lib/gcc/x86_64-redhat-linux/11/../../..] + arg [CMakeFiles/cmTC_20063.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-redhat-linux/11/crtend.o] ==> obj [/usr/lib/gcc/x86_64-redhat-linux/11/crtend.o] + arg [/usr/lib/gcc/x86_64-redhat-linux/11/../../../../lib64/crtn.o] ==> obj [/usr/lib/gcc/x86_64-redhat-linux/11/../../../../lib64/crtn.o] + collapse obj [/usr/lib/gcc/x86_64-redhat-linux/11/../../../../lib64/crt1.o] ==> [/usr/lib64/crt1.o] + collapse obj [/usr/lib/gcc/x86_64-redhat-linux/11/../../../../lib64/crti.o] ==> [/usr/lib64/crti.o] + collapse obj [/usr/lib/gcc/x86_64-redhat-linux/11/../../../../lib64/crtn.o] ==> [/usr/lib64/crtn.o] + collapse library dir [/usr/lib/gcc/x86_64-redhat-linux/11] ==> [/usr/lib/gcc/x86_64-redhat-linux/11] + collapse library dir [/usr/lib/gcc/x86_64-redhat-linux/11/../../../../lib64] ==> [/usr/lib64] + collapse library dir [/lib/../lib64] ==> [/lib64] + collapse library dir [/usr/lib/../lib64] ==> [/usr/lib64] + collapse library dir [/usr/lib/gcc/x86_64-redhat-linux/11/../../..] ==> [/usr/lib] + implicit libs: [gcc;gcc_s;c;gcc;gcc_s] + implicit objs: [/usr/lib64/crt1.o;/usr/lib64/crti.o;/usr/lib/gcc/x86_64-redhat-linux/11/crtbegin.o;/usr/lib/gcc/x86_64-redhat-linux/11/crtend.o;/usr/lib64/crtn.o] + implicit dirs: [/usr/lib/gcc/x86_64-redhat-linux/11;/usr/lib64;/lib64;/usr/lib] + implicit fwks: [] + + +Determining if the include file pthread.h exists passed with the following output: +Change Dir: /usr/local/src/asymptote-2.78/LspCpp/CMakeFiles/CMakeTmp + +Run Build Command(s):/bin/gmake -f Makefile cmTC_bc737/fast && gmake[1]: Entering directory '/u/src/asymptote-2.78/LspCpp/CMakeFiles/CMakeTmp' +make -f CMakeFiles/cmTC_bc737.dir/build.make CMakeFiles/cmTC_bc737.dir/build +make[2]: Entering directory '/u/src/asymptote-2.78/LspCpp/CMakeFiles/CMakeTmp' +Building C object CMakeFiles/cmTC_bc737.dir/CheckIncludeFile.c.o +/bin/cc -o CMakeFiles/cmTC_bc737.dir/CheckIncludeFile.c.o -c /usr/local/src/asymptote-2.78/LspCpp/CMakeFiles/CMakeTmp/CheckIncludeFile.c +Linking C executable cmTC_bc737 +/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_bc737.dir/link.txt --verbose=1 +/bin/cc CMakeFiles/cmTC_bc737.dir/CheckIncludeFile.c.o -o cmTC_bc737 +make[2]: Leaving directory '/u/src/asymptote-2.78/LspCpp/CMakeFiles/CMakeTmp' +gmake[1]: Leaving directory '/u/src/asymptote-2.78/LspCpp/CMakeFiles/CMakeTmp' + + + +Determining if the function pthread_create exists in the pthread passed with the following output: +Change Dir: /usr/local/src/asymptote-2.78/LspCpp/CMakeFiles/CMakeTmp + +Run Build Command(s):/bin/gmake -f Makefile cmTC_d5848/fast && gmake[1]: Entering directory '/u/src/asymptote-2.78/LspCpp/CMakeFiles/CMakeTmp' +make -f CMakeFiles/cmTC_d5848.dir/build.make CMakeFiles/cmTC_d5848.dir/build +make[2]: Entering directory '/u/src/asymptote-2.78/LspCpp/CMakeFiles/CMakeTmp' +Building C object CMakeFiles/cmTC_d5848.dir/CheckFunctionExists.c.o +/bin/cc -DCHECK_FUNCTION_EXISTS=pthread_create -o CMakeFiles/cmTC_d5848.dir/CheckFunctionExists.c.o -c /usr/share/cmake/Modules/CheckFunctionExists.c +Linking C executable cmTC_d5848 +/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_d5848.dir/link.txt --verbose=1 +/bin/cc -DCHECK_FUNCTION_EXISTS=pthread_create CMakeFiles/cmTC_d5848.dir/CheckFunctionExists.c.o -o cmTC_d5848 -lpthread +make[2]: Leaving directory '/u/src/asymptote-2.78/LspCpp/CMakeFiles/CMakeTmp' +gmake[1]: Leaving directory '/u/src/asymptote-2.78/LspCpp/CMakeFiles/CMakeTmp' + + + +Performing C++ SOURCE FILE Test HAVE_STD11 succeeded with the following output: +Change Dir: /usr/local/src/asymptote-2.78/LspCpp/CMakeFiles/CMakeTmp + +Run Build Command(s):/bin/gmake -f Makefile cmTC_8864a/fast && gmake[1]: Entering directory '/u/src/asymptote-2.78/LspCpp/CMakeFiles/CMakeTmp' +make -f CMakeFiles/cmTC_8864a.dir/build.make CMakeFiles/cmTC_8864a.dir/build +make[2]: Entering directory '/u/src/asymptote-2.78/LspCpp/CMakeFiles/CMakeTmp' +Building CXX object CMakeFiles/cmTC_8864a.dir/src.cxx.o +/bin/c++ -DHAVE_STD11 -fPIE -D_FILE_OFFSET_BITS=64 -DUSEGC -I../gc-8.2.0/include -std=c++11 -o CMakeFiles/cmTC_8864a.dir/src.cxx.o -c /usr/local/src/asymptote-2.78/LspCpp/CMakeFiles/CMakeTmp/src.cxx +Linking CXX executable cmTC_8864a +/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_8864a.dir/link.txt --verbose=1 +/bin/c++ -fPIE -D_FILE_OFFSET_BITS=64 -DUSEGC -I../gc-8.2.0/include CMakeFiles/cmTC_8864a.dir/src.cxx.o -o cmTC_8864a +make[2]: Leaving directory '/u/src/asymptote-2.78/LspCpp/CMakeFiles/CMakeTmp' +gmake[1]: Leaving directory '/u/src/asymptote-2.78/LspCpp/CMakeFiles/CMakeTmp' + + +Source file was: +int main() { return 0; } diff --git a/graphics/asymptote/LspCpp/CMakeFiles/CMakeRuleHashes.txt b/graphics/asymptote/LspCpp/CMakeFiles/CMakeRuleHashes.txt new file mode 100644 index 0000000000..82a1be3b90 --- /dev/null +++ b/graphics/asymptote/LspCpp/CMakeFiles/CMakeRuleHashes.txt @@ -0,0 +1,2 @@ +# Hashes of file build rules. +6a0b2e36874c1228f81ef4bf0271060f third_party/uri/CMakeFiles/doc diff --git a/graphics/asymptote/LspCpp/CMakeFiles/Makefile.cmake b/graphics/asymptote/LspCpp/CMakeFiles/Makefile.cmake new file mode 100644 index 0000000000..3fd0a4b4d7 --- /dev/null +++ b/graphics/asymptote/LspCpp/CMakeFiles/Makefile.cmake @@ -0,0 +1,68 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 3.20 + +# 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" + "CMakeFiles/3.20.5/CMakeCCompiler.cmake" + "CMakeFiles/3.20.5/CMakeCXXCompiler.cmake" + "CMakeFiles/3.20.5/CMakeSystem.cmake" + "CMakeLists.txt" + "third_party/uri/CMakeLists.txt" + "third_party/uri/Doxyfile.in" + "third_party/uri/src/CMakeLists.txt" + "/usr/share/cmake/Modules/CMakeCInformation.cmake" + "/usr/share/cmake/Modules/CMakeCXXInformation.cmake" + "/usr/share/cmake/Modules/CMakeCheckCompilerFlagCommonPatterns.cmake" + "/usr/share/cmake/Modules/CMakeCommonLanguageInclude.cmake" + "/usr/share/cmake/Modules/CMakeGenericSystem.cmake" + "/usr/share/cmake/Modules/CMakeInitializeConfigs.cmake" + "/usr/share/cmake/Modules/CMakeLanguageInformation.cmake" + "/usr/share/cmake/Modules/CMakeSystemSpecificInformation.cmake" + "/usr/share/cmake/Modules/CMakeSystemSpecificInitialize.cmake" + "/usr/share/cmake/Modules/CheckCSourceCompiles.cmake" + "/usr/share/cmake/Modules/CheckCXXCompilerFlag.cmake" + "/usr/share/cmake/Modules/CheckCXXSourceCompiles.cmake" + "/usr/share/cmake/Modules/CheckIncludeFile.cmake" + "/usr/share/cmake/Modules/CheckLibraryExists.cmake" + "/usr/share/cmake/Modules/Compiler/CMakeCommonCompilerMacros.cmake" + "/usr/share/cmake/Modules/Compiler/GNU-C.cmake" + "/usr/share/cmake/Modules/Compiler/GNU-CXX.cmake" + "/usr/share/cmake/Modules/Compiler/GNU.cmake" + "/usr/share/cmake/Modules/FindBoost.cmake" + "/usr/share/cmake/Modules/FindDoxygen.cmake" + "/usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake" + "/usr/share/cmake/Modules/FindPackageMessage.cmake" + "/usr/share/cmake/Modules/FindThreads.cmake" + "/usr/share/cmake/Modules/Internal/CheckCompilerFlag.cmake" + "/usr/share/cmake/Modules/Internal/CheckSourceCompiles.cmake" + "/usr/share/cmake/Modules/Platform/Linux-GNU-C.cmake" + "/usr/share/cmake/Modules/Platform/Linux-GNU-CXX.cmake" + "/usr/share/cmake/Modules/Platform/Linux-GNU.cmake" + "/usr/share/cmake/Modules/Platform/Linux.cmake" + "/usr/share/cmake/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" + "third_party/uri/Doxyfile" + "third_party/uri/CMakeFiles/CMakeDirectoryInformation.cmake" + "third_party/uri/src/CMakeFiles/CMakeDirectoryInformation.cmake" + ) + +# Dependency information for all targets: +set(CMAKE_DEPEND_INFO_FILES + "CMakeFiles/lspcpp.dir/DependInfo.cmake" + "third_party/uri/CMakeFiles/doc.dir/DependInfo.cmake" + "third_party/uri/src/CMakeFiles/network-uri.dir/DependInfo.cmake" + ) diff --git a/graphics/asymptote/LspCpp/CMakeFiles/Makefile2 b/graphics/asymptote/LspCpp/CMakeFiles/Makefile2 new file mode 100644 index 0000000000..3f96b72342 --- /dev/null +++ b/graphics/asymptote/LspCpp/CMakeFiles/Makefile2 @@ -0,0 +1,197 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 3.20 + +# 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: + +# Disable VCS-based implicit rules. +% : %,v + +# Disable VCS-based implicit rules. +% : RCS/% + +# Disable VCS-based implicit rules. +% : RCS/%,v + +# Disable VCS-based implicit rules. +% : SCCS/s.% + +# Disable VCS-based implicit rules. +% : s.% + +.SUFFIXES: .hpux_make_needs_suffix_list + +# Command-line flag to silence nested $(MAKE). +$(VERBOSE)MAKESILENT = -s + +#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 rm -f + +# Escaping for special characters. +EQUALS = = + +# The top-level source directory on which CMake was run. +CMAKE_SOURCE_DIR = /usr/local/src/asymptote-2.78/LspCpp + +# The top-level build directory on which CMake was run. +CMAKE_BINARY_DIR = /usr/local/src/asymptote-2.78/LspCpp + +#============================================================================= +# Directory level rules for the build root directory + +# The main recursive "all" target. +all: CMakeFiles/lspcpp.dir/all +all: third_party/uri/all +.PHONY : all + +# The main recursive "preinstall" target. +preinstall: third_party/uri/preinstall +.PHONY : preinstall + +# The main recursive "clean" target. +clean: CMakeFiles/lspcpp.dir/clean +clean: third_party/uri/clean +.PHONY : clean + +#============================================================================= +# Directory level rules for directory third_party/uri + +# Recursive "all" directory target. +third_party/uri/all: third_party/uri/src/all +.PHONY : third_party/uri/all + +# Recursive "preinstall" directory target. +third_party/uri/preinstall: third_party/uri/src/preinstall +.PHONY : third_party/uri/preinstall + +# Recursive "clean" directory target. +third_party/uri/clean: third_party/uri/CMakeFiles/doc.dir/clean +third_party/uri/clean: third_party/uri/src/clean +.PHONY : third_party/uri/clean + +#============================================================================= +# Directory level rules for directory third_party/uri/src + +# Recursive "all" directory target. +third_party/uri/src/all: third_party/uri/src/CMakeFiles/network-uri.dir/all +.PHONY : third_party/uri/src/all + +# Recursive "preinstall" directory target. +third_party/uri/src/preinstall: +.PHONY : third_party/uri/src/preinstall + +# Recursive "clean" directory target. +third_party/uri/src/clean: third_party/uri/src/CMakeFiles/network-uri.dir/clean +.PHONY : third_party/uri/src/clean + +#============================================================================= +# Target rules for target CMakeFiles/lspcpp.dir + +# All Build rule for target. +CMakeFiles/lspcpp.dir/all: third_party/uri/src/CMakeFiles/network-uri.dir/all + $(MAKE) $(MAKESILENT) -f CMakeFiles/lspcpp.dir/build.make CMakeFiles/lspcpp.dir/depend + $(MAKE) $(MAKESILENT) -f CMakeFiles/lspcpp.dir/build.make CMakeFiles/lspcpp.dir/build + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --progress-dir=/usr/local/src/asymptote-2.78/LspCpp/CMakeFiles --progress-num=2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22 "Built target lspcpp" +.PHONY : CMakeFiles/lspcpp.dir/all + +# Build rule for subdir invocation for target. +CMakeFiles/lspcpp.dir/rule: cmake_check_build_system + $(CMAKE_COMMAND) -E cmake_progress_start /usr/local/src/asymptote-2.78/LspCpp/CMakeFiles 30 + $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 CMakeFiles/lspcpp.dir/all + $(CMAKE_COMMAND) -E cmake_progress_start /usr/local/src/asymptote-2.78/LspCpp/CMakeFiles 0 +.PHONY : CMakeFiles/lspcpp.dir/rule + +# Convenience name for target. +lspcpp: CMakeFiles/lspcpp.dir/rule +.PHONY : lspcpp + +# clean rule for target. +CMakeFiles/lspcpp.dir/clean: + $(MAKE) $(MAKESILENT) -f CMakeFiles/lspcpp.dir/build.make CMakeFiles/lspcpp.dir/clean +.PHONY : CMakeFiles/lspcpp.dir/clean + +#============================================================================= +# Target rules for target third_party/uri/CMakeFiles/doc.dir + +# All Build rule for target. +third_party/uri/CMakeFiles/doc.dir/all: + $(MAKE) $(MAKESILENT) -f third_party/uri/CMakeFiles/doc.dir/build.make third_party/uri/CMakeFiles/doc.dir/depend + $(MAKE) $(MAKESILENT) -f third_party/uri/CMakeFiles/doc.dir/build.make third_party/uri/CMakeFiles/doc.dir/build + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --progress-dir=/usr/local/src/asymptote-2.78/LspCpp/CMakeFiles --progress-num=1 "Built target doc" +.PHONY : third_party/uri/CMakeFiles/doc.dir/all + +# Build rule for subdir invocation for target. +third_party/uri/CMakeFiles/doc.dir/rule: cmake_check_build_system + $(CMAKE_COMMAND) -E cmake_progress_start /usr/local/src/asymptote-2.78/LspCpp/CMakeFiles 1 + $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 third_party/uri/CMakeFiles/doc.dir/all + $(CMAKE_COMMAND) -E cmake_progress_start /usr/local/src/asymptote-2.78/LspCpp/CMakeFiles 0 +.PHONY : third_party/uri/CMakeFiles/doc.dir/rule + +# Convenience name for target. +doc: third_party/uri/CMakeFiles/doc.dir/rule +.PHONY : doc + +# clean rule for target. +third_party/uri/CMakeFiles/doc.dir/clean: + $(MAKE) $(MAKESILENT) -f third_party/uri/CMakeFiles/doc.dir/build.make third_party/uri/CMakeFiles/doc.dir/clean +.PHONY : third_party/uri/CMakeFiles/doc.dir/clean + +#============================================================================= +# Target rules for target third_party/uri/src/CMakeFiles/network-uri.dir + +# All Build rule for target. +third_party/uri/src/CMakeFiles/network-uri.dir/all: + $(MAKE) $(MAKESILENT) -f third_party/uri/src/CMakeFiles/network-uri.dir/build.make third_party/uri/src/CMakeFiles/network-uri.dir/depend + $(MAKE) $(MAKESILENT) -f third_party/uri/src/CMakeFiles/network-uri.dir/build.make third_party/uri/src/CMakeFiles/network-uri.dir/build + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --progress-dir=/usr/local/src/asymptote-2.78/LspCpp/CMakeFiles --progress-num=23,24,25,26,27,28,29,30,31 "Built target network-uri" +.PHONY : third_party/uri/src/CMakeFiles/network-uri.dir/all + +# Build rule for subdir invocation for target. +third_party/uri/src/CMakeFiles/network-uri.dir/rule: cmake_check_build_system + $(CMAKE_COMMAND) -E cmake_progress_start /usr/local/src/asymptote-2.78/LspCpp/CMakeFiles 9 + $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 third_party/uri/src/CMakeFiles/network-uri.dir/all + $(CMAKE_COMMAND) -E cmake_progress_start /usr/local/src/asymptote-2.78/LspCpp/CMakeFiles 0 +.PHONY : third_party/uri/src/CMakeFiles/network-uri.dir/rule + +# Convenience name for target. +network-uri: third_party/uri/src/CMakeFiles/network-uri.dir/rule +.PHONY : network-uri + +# clean rule for target. +third_party/uri/src/CMakeFiles/network-uri.dir/clean: + $(MAKE) $(MAKESILENT) -f third_party/uri/src/CMakeFiles/network-uri.dir/build.make third_party/uri/src/CMakeFiles/network-uri.dir/clean +.PHONY : third_party/uri/src/CMakeFiles/network-uri.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/graphics/asymptote/LspCpp/CMakeFiles/TargetDirectories.txt b/graphics/asymptote/LspCpp/CMakeFiles/TargetDirectories.txt new file mode 100644 index 0000000000..255bbf3ad9 --- /dev/null +++ b/graphics/asymptote/LspCpp/CMakeFiles/TargetDirectories.txt @@ -0,0 +1,21 @@ +/usr/local/src/asymptote-2.78/LspCpp/CMakeFiles/install/strip.dir +/usr/local/src/asymptote-2.78/LspCpp/CMakeFiles/install/local.dir +/usr/local/src/asymptote-2.78/LspCpp/CMakeFiles/install.dir +/usr/local/src/asymptote-2.78/LspCpp/CMakeFiles/list_install_components.dir +/usr/local/src/asymptote-2.78/LspCpp/CMakeFiles/rebuild_cache.dir +/usr/local/src/asymptote-2.78/LspCpp/CMakeFiles/edit_cache.dir +/usr/local/src/asymptote-2.78/LspCpp/CMakeFiles/lspcpp.dir +/usr/local/src/asymptote-2.78/LspCpp/third_party/uri/CMakeFiles/install/strip.dir +/usr/local/src/asymptote-2.78/LspCpp/third_party/uri/CMakeFiles/install/local.dir +/usr/local/src/asymptote-2.78/LspCpp/third_party/uri/CMakeFiles/install.dir +/usr/local/src/asymptote-2.78/LspCpp/third_party/uri/CMakeFiles/list_install_components.dir +/usr/local/src/asymptote-2.78/LspCpp/third_party/uri/CMakeFiles/rebuild_cache.dir +/usr/local/src/asymptote-2.78/LspCpp/third_party/uri/CMakeFiles/edit_cache.dir +/usr/local/src/asymptote-2.78/LspCpp/third_party/uri/CMakeFiles/doc.dir +/usr/local/src/asymptote-2.78/LspCpp/third_party/uri/src/CMakeFiles/install/local.dir +/usr/local/src/asymptote-2.78/LspCpp/third_party/uri/src/CMakeFiles/install.dir +/usr/local/src/asymptote-2.78/LspCpp/third_party/uri/src/CMakeFiles/list_install_components.dir +/usr/local/src/asymptote-2.78/LspCpp/third_party/uri/src/CMakeFiles/rebuild_cache.dir +/usr/local/src/asymptote-2.78/LspCpp/third_party/uri/src/CMakeFiles/edit_cache.dir +/usr/local/src/asymptote-2.78/LspCpp/third_party/uri/src/CMakeFiles/install/strip.dir +/usr/local/src/asymptote-2.78/LspCpp/third_party/uri/src/CMakeFiles/network-uri.dir diff --git a/graphics/asymptote/LspCpp/CMakeFiles/cmake.check_cache b/graphics/asymptote/LspCpp/CMakeFiles/cmake.check_cache new file mode 100644 index 0000000000..3dccd73172 --- /dev/null +++ b/graphics/asymptote/LspCpp/CMakeFiles/cmake.check_cache @@ -0,0 +1 @@ +# This file is generated by cmake for dependency checking of the CMakeCache.txt file diff --git a/graphics/asymptote/LspCpp/CMakeFiles/lspcpp.dir/DependInfo.cmake b/graphics/asymptote/LspCpp/CMakeFiles/lspcpp.dir/DependInfo.cmake new file mode 100644 index 0000000000..137fd791c0 --- /dev/null +++ b/graphics/asymptote/LspCpp/CMakeFiles/lspcpp.dir/DependInfo.cmake @@ -0,0 +1,39 @@ + +# Consider dependencies only in project. +set(CMAKE_DEPENDS_IN_PROJECT_ONLY OFF) + +# The set of languages for which implicit dependencies are needed: +set(CMAKE_DEPENDS_LANGUAGES + ) + +# The set of dependency files which are needed: +set(CMAKE_DEPENDS_DEPENDENCY_FILES + "/usr/local/src/asymptote-2.78/LspCpp/src/jsonrpc/Context.cpp" "CMakeFiles/lspcpp.dir/src/jsonrpc/Context.cpp.o" "gcc" "CMakeFiles/lspcpp.dir/src/jsonrpc/Context.cpp.o.d" + "/usr/local/src/asymptote-2.78/LspCpp/src/jsonrpc/Endpoint.cpp" "CMakeFiles/lspcpp.dir/src/jsonrpc/Endpoint.cpp.o" "gcc" "CMakeFiles/lspcpp.dir/src/jsonrpc/Endpoint.cpp.o.d" + "/usr/local/src/asymptote-2.78/LspCpp/src/jsonrpc/GCThreadContext.cpp" "CMakeFiles/lspcpp.dir/src/jsonrpc/GCThreadContext.cpp.o" "gcc" "CMakeFiles/lspcpp.dir/src/jsonrpc/GCThreadContext.cpp.o.d" + "/usr/local/src/asymptote-2.78/LspCpp/src/jsonrpc/MessageJsonHandler.cpp" "CMakeFiles/lspcpp.dir/src/jsonrpc/MessageJsonHandler.cpp.o" "gcc" "CMakeFiles/lspcpp.dir/src/jsonrpc/MessageJsonHandler.cpp.o.d" + "/usr/local/src/asymptote-2.78/LspCpp/src/jsonrpc/RemoteEndPoint.cpp" "CMakeFiles/lspcpp.dir/src/jsonrpc/RemoteEndPoint.cpp.o" "gcc" "CMakeFiles/lspcpp.dir/src/jsonrpc/RemoteEndPoint.cpp.o.d" + "/usr/local/src/asymptote-2.78/LspCpp/src/jsonrpc/StreamMessageProducer.cpp" "CMakeFiles/lspcpp.dir/src/jsonrpc/StreamMessageProducer.cpp.o" "gcc" "CMakeFiles/lspcpp.dir/src/jsonrpc/StreamMessageProducer.cpp.o.d" + "/usr/local/src/asymptote-2.78/LspCpp/src/jsonrpc/TcpServer.cpp" "CMakeFiles/lspcpp.dir/src/jsonrpc/TcpServer.cpp.o" "gcc" "CMakeFiles/lspcpp.dir/src/jsonrpc/TcpServer.cpp.o.d" + "/usr/local/src/asymptote-2.78/LspCpp/src/jsonrpc/WebSocketServer.cpp" "CMakeFiles/lspcpp.dir/src/jsonrpc/WebSocketServer.cpp.o" "gcc" "CMakeFiles/lspcpp.dir/src/jsonrpc/WebSocketServer.cpp.o.d" + "/usr/local/src/asymptote-2.78/LspCpp/src/jsonrpc/message.cpp" "CMakeFiles/lspcpp.dir/src/jsonrpc/message.cpp.o" "gcc" "CMakeFiles/lspcpp.dir/src/jsonrpc/message.cpp.o.d" + "/usr/local/src/asymptote-2.78/LspCpp/src/jsonrpc/serializer.cpp" "CMakeFiles/lspcpp.dir/src/jsonrpc/serializer.cpp.o" "gcc" "CMakeFiles/lspcpp.dir/src/jsonrpc/serializer.cpp.o.d" + "/usr/local/src/asymptote-2.78/LspCpp/src/jsonrpc/threaded_queue.cpp" "CMakeFiles/lspcpp.dir/src/jsonrpc/threaded_queue.cpp.o" "gcc" "CMakeFiles/lspcpp.dir/src/jsonrpc/threaded_queue.cpp.o.d" + "/usr/local/src/asymptote-2.78/LspCpp/src/lsp/Markup.cpp" "CMakeFiles/lspcpp.dir/src/lsp/Markup.cpp.o" "gcc" "CMakeFiles/lspcpp.dir/src/lsp/Markup.cpp.o.d" + "/usr/local/src/asymptote-2.78/LspCpp/src/lsp/ParentProcessWatcher.cpp" "CMakeFiles/lspcpp.dir/src/lsp/ParentProcessWatcher.cpp.o" "gcc" "CMakeFiles/lspcpp.dir/src/lsp/ParentProcessWatcher.cpp.o.d" + "/usr/local/src/asymptote-2.78/LspCpp/src/lsp/ProtocolJsonHandler.cpp" "CMakeFiles/lspcpp.dir/src/lsp/ProtocolJsonHandler.cpp.o" "gcc" "CMakeFiles/lspcpp.dir/src/lsp/ProtocolJsonHandler.cpp.o.d" + "/usr/local/src/asymptote-2.78/LspCpp/src/lsp/initialize.cpp" "CMakeFiles/lspcpp.dir/src/lsp/initialize.cpp.o" "gcc" "CMakeFiles/lspcpp.dir/src/lsp/initialize.cpp.o.d" + "/usr/local/src/asymptote-2.78/LspCpp/src/lsp/lsp.cpp" "CMakeFiles/lspcpp.dir/src/lsp/lsp.cpp.o" "gcc" "CMakeFiles/lspcpp.dir/src/lsp/lsp.cpp.o.d" + "/usr/local/src/asymptote-2.78/LspCpp/src/lsp/lsp_diagnostic.cpp" "CMakeFiles/lspcpp.dir/src/lsp/lsp_diagnostic.cpp.o" "gcc" "CMakeFiles/lspcpp.dir/src/lsp/lsp_diagnostic.cpp.o.d" + "/usr/local/src/asymptote-2.78/LspCpp/src/lsp/textDocument.cpp" "CMakeFiles/lspcpp.dir/src/lsp/textDocument.cpp.o" "gcc" "CMakeFiles/lspcpp.dir/src/lsp/textDocument.cpp.o.d" + "/usr/local/src/asymptote-2.78/LspCpp/src/lsp/utils.cpp" "CMakeFiles/lspcpp.dir/src/lsp/utils.cpp.o" "gcc" "CMakeFiles/lspcpp.dir/src/lsp/utils.cpp.o.d" + "/usr/local/src/asymptote-2.78/LspCpp/src/lsp/working_files.cpp" "CMakeFiles/lspcpp.dir/src/lsp/working_files.cpp.o" "gcc" "CMakeFiles/lspcpp.dir/src/lsp/working_files.cpp.o.d" + ) + +# Targets to which this target links. +set(CMAKE_TARGET_LINKED_INFO_FILES + "/usr/local/src/asymptote-2.78/LspCpp/third_party/uri/src/CMakeFiles/network-uri.dir/DependInfo.cmake" + ) + +# Fortran module output directory. +set(CMAKE_Fortran_TARGET_MODULE_DIR "") diff --git a/graphics/asymptote/LspCpp/CMakeFiles/lspcpp.dir/build.make b/graphics/asymptote/LspCpp/CMakeFiles/lspcpp.dir/build.make new file mode 100644 index 0000000000..e96ef8541b --- /dev/null +++ b/graphics/asymptote/LspCpp/CMakeFiles/lspcpp.dir/build.make @@ -0,0 +1,415 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 3.20 + +# Delete rule output on recipe failure. +.DELETE_ON_ERROR: + +#============================================================================= +# Special targets provided by cmake. + +# Disable implicit rules so canonical targets will work. +.SUFFIXES: + +# Disable VCS-based implicit rules. +% : %,v + +# Disable VCS-based implicit rules. +% : RCS/% + +# Disable VCS-based implicit rules. +% : RCS/%,v + +# Disable VCS-based implicit rules. +% : SCCS/s.% + +# Disable VCS-based implicit rules. +% : s.% + +.SUFFIXES: .hpux_make_needs_suffix_list + +# Command-line flag to silence nested $(MAKE). +$(VERBOSE)MAKESILENT = -s + +#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 rm -f + +# Escaping for special characters. +EQUALS = = + +# The top-level source directory on which CMake was run. +CMAKE_SOURCE_DIR = /usr/local/src/asymptote-2.78/LspCpp + +# The top-level build directory on which CMake was run. +CMAKE_BINARY_DIR = /usr/local/src/asymptote-2.78/LspCpp + +# Include any dependencies generated for this target. +include CMakeFiles/lspcpp.dir/depend.make +# Include any dependencies generated by the compiler for this target. +include CMakeFiles/lspcpp.dir/compiler_depend.make + +# Include the progress variables for this target. +include CMakeFiles/lspcpp.dir/progress.make + +# Include the compile flags for this target's objects. +include CMakeFiles/lspcpp.dir/flags.make + +CMakeFiles/lspcpp.dir/src/jsonrpc/Context.cpp.o: CMakeFiles/lspcpp.dir/flags.make +CMakeFiles/lspcpp.dir/src/jsonrpc/Context.cpp.o: src/jsonrpc/Context.cpp +CMakeFiles/lspcpp.dir/src/jsonrpc/Context.cpp.o: CMakeFiles/lspcpp.dir/compiler_depend.ts + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=/usr/local/src/asymptote-2.78/LspCpp/CMakeFiles --progress-num=$(CMAKE_PROGRESS_1) "Building CXX object CMakeFiles/lspcpp.dir/src/jsonrpc/Context.cpp.o" + /bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -MD -MT CMakeFiles/lspcpp.dir/src/jsonrpc/Context.cpp.o -MF CMakeFiles/lspcpp.dir/src/jsonrpc/Context.cpp.o.d -o CMakeFiles/lspcpp.dir/src/jsonrpc/Context.cpp.o -c /usr/local/src/asymptote-2.78/LspCpp/src/jsonrpc/Context.cpp + +CMakeFiles/lspcpp.dir/src/jsonrpc/Context.cpp.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing CXX source to CMakeFiles/lspcpp.dir/src/jsonrpc/Context.cpp.i" + /bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E /usr/local/src/asymptote-2.78/LspCpp/src/jsonrpc/Context.cpp > CMakeFiles/lspcpp.dir/src/jsonrpc/Context.cpp.i + +CMakeFiles/lspcpp.dir/src/jsonrpc/Context.cpp.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling CXX source to assembly CMakeFiles/lspcpp.dir/src/jsonrpc/Context.cpp.s" + /bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S /usr/local/src/asymptote-2.78/LspCpp/src/jsonrpc/Context.cpp -o CMakeFiles/lspcpp.dir/src/jsonrpc/Context.cpp.s + +CMakeFiles/lspcpp.dir/src/jsonrpc/Endpoint.cpp.o: CMakeFiles/lspcpp.dir/flags.make +CMakeFiles/lspcpp.dir/src/jsonrpc/Endpoint.cpp.o: src/jsonrpc/Endpoint.cpp +CMakeFiles/lspcpp.dir/src/jsonrpc/Endpoint.cpp.o: CMakeFiles/lspcpp.dir/compiler_depend.ts + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=/usr/local/src/asymptote-2.78/LspCpp/CMakeFiles --progress-num=$(CMAKE_PROGRESS_2) "Building CXX object CMakeFiles/lspcpp.dir/src/jsonrpc/Endpoint.cpp.o" + /bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -MD -MT CMakeFiles/lspcpp.dir/src/jsonrpc/Endpoint.cpp.o -MF CMakeFiles/lspcpp.dir/src/jsonrpc/Endpoint.cpp.o.d -o CMakeFiles/lspcpp.dir/src/jsonrpc/Endpoint.cpp.o -c /usr/local/src/asymptote-2.78/LspCpp/src/jsonrpc/Endpoint.cpp + +CMakeFiles/lspcpp.dir/src/jsonrpc/Endpoint.cpp.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing CXX source to CMakeFiles/lspcpp.dir/src/jsonrpc/Endpoint.cpp.i" + /bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E /usr/local/src/asymptote-2.78/LspCpp/src/jsonrpc/Endpoint.cpp > CMakeFiles/lspcpp.dir/src/jsonrpc/Endpoint.cpp.i + +CMakeFiles/lspcpp.dir/src/jsonrpc/Endpoint.cpp.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling CXX source to assembly CMakeFiles/lspcpp.dir/src/jsonrpc/Endpoint.cpp.s" + /bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S /usr/local/src/asymptote-2.78/LspCpp/src/jsonrpc/Endpoint.cpp -o CMakeFiles/lspcpp.dir/src/jsonrpc/Endpoint.cpp.s + +CMakeFiles/lspcpp.dir/src/jsonrpc/GCThreadContext.cpp.o: CMakeFiles/lspcpp.dir/flags.make +CMakeFiles/lspcpp.dir/src/jsonrpc/GCThreadContext.cpp.o: src/jsonrpc/GCThreadContext.cpp +CMakeFiles/lspcpp.dir/src/jsonrpc/GCThreadContext.cpp.o: CMakeFiles/lspcpp.dir/compiler_depend.ts + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=/usr/local/src/asymptote-2.78/LspCpp/CMakeFiles --progress-num=$(CMAKE_PROGRESS_3) "Building CXX object CMakeFiles/lspcpp.dir/src/jsonrpc/GCThreadContext.cpp.o" + /bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -MD -MT CMakeFiles/lspcpp.dir/src/jsonrpc/GCThreadContext.cpp.o -MF CMakeFiles/lspcpp.dir/src/jsonrpc/GCThreadContext.cpp.o.d -o CMakeFiles/lspcpp.dir/src/jsonrpc/GCThreadContext.cpp.o -c /usr/local/src/asymptote-2.78/LspCpp/src/jsonrpc/GCThreadContext.cpp + +CMakeFiles/lspcpp.dir/src/jsonrpc/GCThreadContext.cpp.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing CXX source to CMakeFiles/lspcpp.dir/src/jsonrpc/GCThreadContext.cpp.i" + /bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E /usr/local/src/asymptote-2.78/LspCpp/src/jsonrpc/GCThreadContext.cpp > CMakeFiles/lspcpp.dir/src/jsonrpc/GCThreadContext.cpp.i + +CMakeFiles/lspcpp.dir/src/jsonrpc/GCThreadContext.cpp.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling CXX source to assembly CMakeFiles/lspcpp.dir/src/jsonrpc/GCThreadContext.cpp.s" + /bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S /usr/local/src/asymptote-2.78/LspCpp/src/jsonrpc/GCThreadContext.cpp -o CMakeFiles/lspcpp.dir/src/jsonrpc/GCThreadContext.cpp.s + +CMakeFiles/lspcpp.dir/src/jsonrpc/message.cpp.o: CMakeFiles/lspcpp.dir/flags.make +CMakeFiles/lspcpp.dir/src/jsonrpc/message.cpp.o: src/jsonrpc/message.cpp +CMakeFiles/lspcpp.dir/src/jsonrpc/message.cpp.o: CMakeFiles/lspcpp.dir/compiler_depend.ts + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=/usr/local/src/asymptote-2.78/LspCpp/CMakeFiles --progress-num=$(CMAKE_PROGRESS_4) "Building CXX object CMakeFiles/lspcpp.dir/src/jsonrpc/message.cpp.o" + /bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -MD -MT CMakeFiles/lspcpp.dir/src/jsonrpc/message.cpp.o -MF CMakeFiles/lspcpp.dir/src/jsonrpc/message.cpp.o.d -o CMakeFiles/lspcpp.dir/src/jsonrpc/message.cpp.o -c /usr/local/src/asymptote-2.78/LspCpp/src/jsonrpc/message.cpp + +CMakeFiles/lspcpp.dir/src/jsonrpc/message.cpp.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing CXX source to CMakeFiles/lspcpp.dir/src/jsonrpc/message.cpp.i" + /bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E /usr/local/src/asymptote-2.78/LspCpp/src/jsonrpc/message.cpp > CMakeFiles/lspcpp.dir/src/jsonrpc/message.cpp.i + +CMakeFiles/lspcpp.dir/src/jsonrpc/message.cpp.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling CXX source to assembly CMakeFiles/lspcpp.dir/src/jsonrpc/message.cpp.s" + /bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S /usr/local/src/asymptote-2.78/LspCpp/src/jsonrpc/message.cpp -o CMakeFiles/lspcpp.dir/src/jsonrpc/message.cpp.s + +CMakeFiles/lspcpp.dir/src/jsonrpc/MessageJsonHandler.cpp.o: CMakeFiles/lspcpp.dir/flags.make +CMakeFiles/lspcpp.dir/src/jsonrpc/MessageJsonHandler.cpp.o: src/jsonrpc/MessageJsonHandler.cpp +CMakeFiles/lspcpp.dir/src/jsonrpc/MessageJsonHandler.cpp.o: CMakeFiles/lspcpp.dir/compiler_depend.ts + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=/usr/local/src/asymptote-2.78/LspCpp/CMakeFiles --progress-num=$(CMAKE_PROGRESS_5) "Building CXX object CMakeFiles/lspcpp.dir/src/jsonrpc/MessageJsonHandler.cpp.o" + /bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -MD -MT CMakeFiles/lspcpp.dir/src/jsonrpc/MessageJsonHandler.cpp.o -MF CMakeFiles/lspcpp.dir/src/jsonrpc/MessageJsonHandler.cpp.o.d -o CMakeFiles/lspcpp.dir/src/jsonrpc/MessageJsonHandler.cpp.o -c /usr/local/src/asymptote-2.78/LspCpp/src/jsonrpc/MessageJsonHandler.cpp + +CMakeFiles/lspcpp.dir/src/jsonrpc/MessageJsonHandler.cpp.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing CXX source to CMakeFiles/lspcpp.dir/src/jsonrpc/MessageJsonHandler.cpp.i" + /bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E /usr/local/src/asymptote-2.78/LspCpp/src/jsonrpc/MessageJsonHandler.cpp > CMakeFiles/lspcpp.dir/src/jsonrpc/MessageJsonHandler.cpp.i + +CMakeFiles/lspcpp.dir/src/jsonrpc/MessageJsonHandler.cpp.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling CXX source to assembly CMakeFiles/lspcpp.dir/src/jsonrpc/MessageJsonHandler.cpp.s" + /bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S /usr/local/src/asymptote-2.78/LspCpp/src/jsonrpc/MessageJsonHandler.cpp -o CMakeFiles/lspcpp.dir/src/jsonrpc/MessageJsonHandler.cpp.s + +CMakeFiles/lspcpp.dir/src/jsonrpc/RemoteEndPoint.cpp.o: CMakeFiles/lspcpp.dir/flags.make +CMakeFiles/lspcpp.dir/src/jsonrpc/RemoteEndPoint.cpp.o: src/jsonrpc/RemoteEndPoint.cpp +CMakeFiles/lspcpp.dir/src/jsonrpc/RemoteEndPoint.cpp.o: CMakeFiles/lspcpp.dir/compiler_depend.ts + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=/usr/local/src/asymptote-2.78/LspCpp/CMakeFiles --progress-num=$(CMAKE_PROGRESS_6) "Building CXX object CMakeFiles/lspcpp.dir/src/jsonrpc/RemoteEndPoint.cpp.o" + /bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -MD -MT CMakeFiles/lspcpp.dir/src/jsonrpc/RemoteEndPoint.cpp.o -MF CMakeFiles/lspcpp.dir/src/jsonrpc/RemoteEndPoint.cpp.o.d -o CMakeFiles/lspcpp.dir/src/jsonrpc/RemoteEndPoint.cpp.o -c /usr/local/src/asymptote-2.78/LspCpp/src/jsonrpc/RemoteEndPoint.cpp + +CMakeFiles/lspcpp.dir/src/jsonrpc/RemoteEndPoint.cpp.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing CXX source to CMakeFiles/lspcpp.dir/src/jsonrpc/RemoteEndPoint.cpp.i" + /bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E /usr/local/src/asymptote-2.78/LspCpp/src/jsonrpc/RemoteEndPoint.cpp > CMakeFiles/lspcpp.dir/src/jsonrpc/RemoteEndPoint.cpp.i + +CMakeFiles/lspcpp.dir/src/jsonrpc/RemoteEndPoint.cpp.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling CXX source to assembly CMakeFiles/lspcpp.dir/src/jsonrpc/RemoteEndPoint.cpp.s" + /bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S /usr/local/src/asymptote-2.78/LspCpp/src/jsonrpc/RemoteEndPoint.cpp -o CMakeFiles/lspcpp.dir/src/jsonrpc/RemoteEndPoint.cpp.s + +CMakeFiles/lspcpp.dir/src/jsonrpc/serializer.cpp.o: CMakeFiles/lspcpp.dir/flags.make +CMakeFiles/lspcpp.dir/src/jsonrpc/serializer.cpp.o: src/jsonrpc/serializer.cpp +CMakeFiles/lspcpp.dir/src/jsonrpc/serializer.cpp.o: CMakeFiles/lspcpp.dir/compiler_depend.ts + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=/usr/local/src/asymptote-2.78/LspCpp/CMakeFiles --progress-num=$(CMAKE_PROGRESS_7) "Building CXX object CMakeFiles/lspcpp.dir/src/jsonrpc/serializer.cpp.o" + /bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -MD -MT CMakeFiles/lspcpp.dir/src/jsonrpc/serializer.cpp.o -MF CMakeFiles/lspcpp.dir/src/jsonrpc/serializer.cpp.o.d -o CMakeFiles/lspcpp.dir/src/jsonrpc/serializer.cpp.o -c /usr/local/src/asymptote-2.78/LspCpp/src/jsonrpc/serializer.cpp + +CMakeFiles/lspcpp.dir/src/jsonrpc/serializer.cpp.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing CXX source to CMakeFiles/lspcpp.dir/src/jsonrpc/serializer.cpp.i" + /bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E /usr/local/src/asymptote-2.78/LspCpp/src/jsonrpc/serializer.cpp > CMakeFiles/lspcpp.dir/src/jsonrpc/serializer.cpp.i + +CMakeFiles/lspcpp.dir/src/jsonrpc/serializer.cpp.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling CXX source to assembly CMakeFiles/lspcpp.dir/src/jsonrpc/serializer.cpp.s" + /bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S /usr/local/src/asymptote-2.78/LspCpp/src/jsonrpc/serializer.cpp -o CMakeFiles/lspcpp.dir/src/jsonrpc/serializer.cpp.s + +CMakeFiles/lspcpp.dir/src/jsonrpc/StreamMessageProducer.cpp.o: CMakeFiles/lspcpp.dir/flags.make +CMakeFiles/lspcpp.dir/src/jsonrpc/StreamMessageProducer.cpp.o: src/jsonrpc/StreamMessageProducer.cpp +CMakeFiles/lspcpp.dir/src/jsonrpc/StreamMessageProducer.cpp.o: CMakeFiles/lspcpp.dir/compiler_depend.ts + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=/usr/local/src/asymptote-2.78/LspCpp/CMakeFiles --progress-num=$(CMAKE_PROGRESS_8) "Building CXX object CMakeFiles/lspcpp.dir/src/jsonrpc/StreamMessageProducer.cpp.o" + /bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -MD -MT CMakeFiles/lspcpp.dir/src/jsonrpc/StreamMessageProducer.cpp.o -MF CMakeFiles/lspcpp.dir/src/jsonrpc/StreamMessageProducer.cpp.o.d -o CMakeFiles/lspcpp.dir/src/jsonrpc/StreamMessageProducer.cpp.o -c /usr/local/src/asymptote-2.78/LspCpp/src/jsonrpc/StreamMessageProducer.cpp + +CMakeFiles/lspcpp.dir/src/jsonrpc/StreamMessageProducer.cpp.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing CXX source to CMakeFiles/lspcpp.dir/src/jsonrpc/StreamMessageProducer.cpp.i" + /bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E /usr/local/src/asymptote-2.78/LspCpp/src/jsonrpc/StreamMessageProducer.cpp > CMakeFiles/lspcpp.dir/src/jsonrpc/StreamMessageProducer.cpp.i + +CMakeFiles/lspcpp.dir/src/jsonrpc/StreamMessageProducer.cpp.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling CXX source to assembly CMakeFiles/lspcpp.dir/src/jsonrpc/StreamMessageProducer.cpp.s" + /bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S /usr/local/src/asymptote-2.78/LspCpp/src/jsonrpc/StreamMessageProducer.cpp -o CMakeFiles/lspcpp.dir/src/jsonrpc/StreamMessageProducer.cpp.s + +CMakeFiles/lspcpp.dir/src/jsonrpc/TcpServer.cpp.o: CMakeFiles/lspcpp.dir/flags.make +CMakeFiles/lspcpp.dir/src/jsonrpc/TcpServer.cpp.o: src/jsonrpc/TcpServer.cpp +CMakeFiles/lspcpp.dir/src/jsonrpc/TcpServer.cpp.o: CMakeFiles/lspcpp.dir/compiler_depend.ts + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=/usr/local/src/asymptote-2.78/LspCpp/CMakeFiles --progress-num=$(CMAKE_PROGRESS_9) "Building CXX object CMakeFiles/lspcpp.dir/src/jsonrpc/TcpServer.cpp.o" + /bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -MD -MT CMakeFiles/lspcpp.dir/src/jsonrpc/TcpServer.cpp.o -MF CMakeFiles/lspcpp.dir/src/jsonrpc/TcpServer.cpp.o.d -o CMakeFiles/lspcpp.dir/src/jsonrpc/TcpServer.cpp.o -c /usr/local/src/asymptote-2.78/LspCpp/src/jsonrpc/TcpServer.cpp + +CMakeFiles/lspcpp.dir/src/jsonrpc/TcpServer.cpp.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing CXX source to CMakeFiles/lspcpp.dir/src/jsonrpc/TcpServer.cpp.i" + /bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E /usr/local/src/asymptote-2.78/LspCpp/src/jsonrpc/TcpServer.cpp > CMakeFiles/lspcpp.dir/src/jsonrpc/TcpServer.cpp.i + +CMakeFiles/lspcpp.dir/src/jsonrpc/TcpServer.cpp.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling CXX source to assembly CMakeFiles/lspcpp.dir/src/jsonrpc/TcpServer.cpp.s" + /bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S /usr/local/src/asymptote-2.78/LspCpp/src/jsonrpc/TcpServer.cpp -o CMakeFiles/lspcpp.dir/src/jsonrpc/TcpServer.cpp.s + +CMakeFiles/lspcpp.dir/src/jsonrpc/threaded_queue.cpp.o: CMakeFiles/lspcpp.dir/flags.make +CMakeFiles/lspcpp.dir/src/jsonrpc/threaded_queue.cpp.o: src/jsonrpc/threaded_queue.cpp +CMakeFiles/lspcpp.dir/src/jsonrpc/threaded_queue.cpp.o: CMakeFiles/lspcpp.dir/compiler_depend.ts + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=/usr/local/src/asymptote-2.78/LspCpp/CMakeFiles --progress-num=$(CMAKE_PROGRESS_10) "Building CXX object CMakeFiles/lspcpp.dir/src/jsonrpc/threaded_queue.cpp.o" + /bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -MD -MT CMakeFiles/lspcpp.dir/src/jsonrpc/threaded_queue.cpp.o -MF CMakeFiles/lspcpp.dir/src/jsonrpc/threaded_queue.cpp.o.d -o CMakeFiles/lspcpp.dir/src/jsonrpc/threaded_queue.cpp.o -c /usr/local/src/asymptote-2.78/LspCpp/src/jsonrpc/threaded_queue.cpp + +CMakeFiles/lspcpp.dir/src/jsonrpc/threaded_queue.cpp.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing CXX source to CMakeFiles/lspcpp.dir/src/jsonrpc/threaded_queue.cpp.i" + /bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E /usr/local/src/asymptote-2.78/LspCpp/src/jsonrpc/threaded_queue.cpp > CMakeFiles/lspcpp.dir/src/jsonrpc/threaded_queue.cpp.i + +CMakeFiles/lspcpp.dir/src/jsonrpc/threaded_queue.cpp.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling CXX source to assembly CMakeFiles/lspcpp.dir/src/jsonrpc/threaded_queue.cpp.s" + /bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S /usr/local/src/asymptote-2.78/LspCpp/src/jsonrpc/threaded_queue.cpp -o CMakeFiles/lspcpp.dir/src/jsonrpc/threaded_queue.cpp.s + +CMakeFiles/lspcpp.dir/src/jsonrpc/WebSocketServer.cpp.o: CMakeFiles/lspcpp.dir/flags.make +CMakeFiles/lspcpp.dir/src/jsonrpc/WebSocketServer.cpp.o: src/jsonrpc/WebSocketServer.cpp +CMakeFiles/lspcpp.dir/src/jsonrpc/WebSocketServer.cpp.o: CMakeFiles/lspcpp.dir/compiler_depend.ts + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=/usr/local/src/asymptote-2.78/LspCpp/CMakeFiles --progress-num=$(CMAKE_PROGRESS_11) "Building CXX object CMakeFiles/lspcpp.dir/src/jsonrpc/WebSocketServer.cpp.o" + /bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -MD -MT CMakeFiles/lspcpp.dir/src/jsonrpc/WebSocketServer.cpp.o -MF CMakeFiles/lspcpp.dir/src/jsonrpc/WebSocketServer.cpp.o.d -o CMakeFiles/lspcpp.dir/src/jsonrpc/WebSocketServer.cpp.o -c /usr/local/src/asymptote-2.78/LspCpp/src/jsonrpc/WebSocketServer.cpp + +CMakeFiles/lspcpp.dir/src/jsonrpc/WebSocketServer.cpp.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing CXX source to CMakeFiles/lspcpp.dir/src/jsonrpc/WebSocketServer.cpp.i" + /bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E /usr/local/src/asymptote-2.78/LspCpp/src/jsonrpc/WebSocketServer.cpp > CMakeFiles/lspcpp.dir/src/jsonrpc/WebSocketServer.cpp.i + +CMakeFiles/lspcpp.dir/src/jsonrpc/WebSocketServer.cpp.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling CXX source to assembly CMakeFiles/lspcpp.dir/src/jsonrpc/WebSocketServer.cpp.s" + /bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S /usr/local/src/asymptote-2.78/LspCpp/src/jsonrpc/WebSocketServer.cpp -o CMakeFiles/lspcpp.dir/src/jsonrpc/WebSocketServer.cpp.s + +CMakeFiles/lspcpp.dir/src/lsp/initialize.cpp.o: CMakeFiles/lspcpp.dir/flags.make +CMakeFiles/lspcpp.dir/src/lsp/initialize.cpp.o: src/lsp/initialize.cpp +CMakeFiles/lspcpp.dir/src/lsp/initialize.cpp.o: CMakeFiles/lspcpp.dir/compiler_depend.ts + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=/usr/local/src/asymptote-2.78/LspCpp/CMakeFiles --progress-num=$(CMAKE_PROGRESS_12) "Building CXX object CMakeFiles/lspcpp.dir/src/lsp/initialize.cpp.o" + /bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -MD -MT CMakeFiles/lspcpp.dir/src/lsp/initialize.cpp.o -MF CMakeFiles/lspcpp.dir/src/lsp/initialize.cpp.o.d -o CMakeFiles/lspcpp.dir/src/lsp/initialize.cpp.o -c /usr/local/src/asymptote-2.78/LspCpp/src/lsp/initialize.cpp + +CMakeFiles/lspcpp.dir/src/lsp/initialize.cpp.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing CXX source to CMakeFiles/lspcpp.dir/src/lsp/initialize.cpp.i" + /bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E /usr/local/src/asymptote-2.78/LspCpp/src/lsp/initialize.cpp > CMakeFiles/lspcpp.dir/src/lsp/initialize.cpp.i + +CMakeFiles/lspcpp.dir/src/lsp/initialize.cpp.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling CXX source to assembly CMakeFiles/lspcpp.dir/src/lsp/initialize.cpp.s" + /bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S /usr/local/src/asymptote-2.78/LspCpp/src/lsp/initialize.cpp -o CMakeFiles/lspcpp.dir/src/lsp/initialize.cpp.s + +CMakeFiles/lspcpp.dir/src/lsp/lsp.cpp.o: CMakeFiles/lspcpp.dir/flags.make +CMakeFiles/lspcpp.dir/src/lsp/lsp.cpp.o: src/lsp/lsp.cpp +CMakeFiles/lspcpp.dir/src/lsp/lsp.cpp.o: CMakeFiles/lspcpp.dir/compiler_depend.ts + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=/usr/local/src/asymptote-2.78/LspCpp/CMakeFiles --progress-num=$(CMAKE_PROGRESS_13) "Building CXX object CMakeFiles/lspcpp.dir/src/lsp/lsp.cpp.o" + /bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -MD -MT CMakeFiles/lspcpp.dir/src/lsp/lsp.cpp.o -MF CMakeFiles/lspcpp.dir/src/lsp/lsp.cpp.o.d -o CMakeFiles/lspcpp.dir/src/lsp/lsp.cpp.o -c /usr/local/src/asymptote-2.78/LspCpp/src/lsp/lsp.cpp + +CMakeFiles/lspcpp.dir/src/lsp/lsp.cpp.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing CXX source to CMakeFiles/lspcpp.dir/src/lsp/lsp.cpp.i" + /bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E /usr/local/src/asymptote-2.78/LspCpp/src/lsp/lsp.cpp > CMakeFiles/lspcpp.dir/src/lsp/lsp.cpp.i + +CMakeFiles/lspcpp.dir/src/lsp/lsp.cpp.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling CXX source to assembly CMakeFiles/lspcpp.dir/src/lsp/lsp.cpp.s" + /bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S /usr/local/src/asymptote-2.78/LspCpp/src/lsp/lsp.cpp -o CMakeFiles/lspcpp.dir/src/lsp/lsp.cpp.s + +CMakeFiles/lspcpp.dir/src/lsp/lsp_diagnostic.cpp.o: CMakeFiles/lspcpp.dir/flags.make +CMakeFiles/lspcpp.dir/src/lsp/lsp_diagnostic.cpp.o: src/lsp/lsp_diagnostic.cpp +CMakeFiles/lspcpp.dir/src/lsp/lsp_diagnostic.cpp.o: CMakeFiles/lspcpp.dir/compiler_depend.ts + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=/usr/local/src/asymptote-2.78/LspCpp/CMakeFiles --progress-num=$(CMAKE_PROGRESS_14) "Building CXX object CMakeFiles/lspcpp.dir/src/lsp/lsp_diagnostic.cpp.o" + /bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -MD -MT CMakeFiles/lspcpp.dir/src/lsp/lsp_diagnostic.cpp.o -MF CMakeFiles/lspcpp.dir/src/lsp/lsp_diagnostic.cpp.o.d -o CMakeFiles/lspcpp.dir/src/lsp/lsp_diagnostic.cpp.o -c /usr/local/src/asymptote-2.78/LspCpp/src/lsp/lsp_diagnostic.cpp + +CMakeFiles/lspcpp.dir/src/lsp/lsp_diagnostic.cpp.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing CXX source to CMakeFiles/lspcpp.dir/src/lsp/lsp_diagnostic.cpp.i" + /bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E /usr/local/src/asymptote-2.78/LspCpp/src/lsp/lsp_diagnostic.cpp > CMakeFiles/lspcpp.dir/src/lsp/lsp_diagnostic.cpp.i + +CMakeFiles/lspcpp.dir/src/lsp/lsp_diagnostic.cpp.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling CXX source to assembly CMakeFiles/lspcpp.dir/src/lsp/lsp_diagnostic.cpp.s" + /bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S /usr/local/src/asymptote-2.78/LspCpp/src/lsp/lsp_diagnostic.cpp -o CMakeFiles/lspcpp.dir/src/lsp/lsp_diagnostic.cpp.s + +CMakeFiles/lspcpp.dir/src/lsp/Markup.cpp.o: CMakeFiles/lspcpp.dir/flags.make +CMakeFiles/lspcpp.dir/src/lsp/Markup.cpp.o: src/lsp/Markup.cpp +CMakeFiles/lspcpp.dir/src/lsp/Markup.cpp.o: CMakeFiles/lspcpp.dir/compiler_depend.ts + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=/usr/local/src/asymptote-2.78/LspCpp/CMakeFiles --progress-num=$(CMAKE_PROGRESS_15) "Building CXX object CMakeFiles/lspcpp.dir/src/lsp/Markup.cpp.o" + /bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -MD -MT CMakeFiles/lspcpp.dir/src/lsp/Markup.cpp.o -MF CMakeFiles/lspcpp.dir/src/lsp/Markup.cpp.o.d -o CMakeFiles/lspcpp.dir/src/lsp/Markup.cpp.o -c /usr/local/src/asymptote-2.78/LspCpp/src/lsp/Markup.cpp + +CMakeFiles/lspcpp.dir/src/lsp/Markup.cpp.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing CXX source to CMakeFiles/lspcpp.dir/src/lsp/Markup.cpp.i" + /bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E /usr/local/src/asymptote-2.78/LspCpp/src/lsp/Markup.cpp > CMakeFiles/lspcpp.dir/src/lsp/Markup.cpp.i + +CMakeFiles/lspcpp.dir/src/lsp/Markup.cpp.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling CXX source to assembly CMakeFiles/lspcpp.dir/src/lsp/Markup.cpp.s" + /bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S /usr/local/src/asymptote-2.78/LspCpp/src/lsp/Markup.cpp -o CMakeFiles/lspcpp.dir/src/lsp/Markup.cpp.s + +CMakeFiles/lspcpp.dir/src/lsp/ParentProcessWatcher.cpp.o: CMakeFiles/lspcpp.dir/flags.make +CMakeFiles/lspcpp.dir/src/lsp/ParentProcessWatcher.cpp.o: src/lsp/ParentProcessWatcher.cpp +CMakeFiles/lspcpp.dir/src/lsp/ParentProcessWatcher.cpp.o: CMakeFiles/lspcpp.dir/compiler_depend.ts + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=/usr/local/src/asymptote-2.78/LspCpp/CMakeFiles --progress-num=$(CMAKE_PROGRESS_16) "Building CXX object CMakeFiles/lspcpp.dir/src/lsp/ParentProcessWatcher.cpp.o" + /bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -MD -MT CMakeFiles/lspcpp.dir/src/lsp/ParentProcessWatcher.cpp.o -MF CMakeFiles/lspcpp.dir/src/lsp/ParentProcessWatcher.cpp.o.d -o CMakeFiles/lspcpp.dir/src/lsp/ParentProcessWatcher.cpp.o -c /usr/local/src/asymptote-2.78/LspCpp/src/lsp/ParentProcessWatcher.cpp + +CMakeFiles/lspcpp.dir/src/lsp/ParentProcessWatcher.cpp.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing CXX source to CMakeFiles/lspcpp.dir/src/lsp/ParentProcessWatcher.cpp.i" + /bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E /usr/local/src/asymptote-2.78/LspCpp/src/lsp/ParentProcessWatcher.cpp > CMakeFiles/lspcpp.dir/src/lsp/ParentProcessWatcher.cpp.i + +CMakeFiles/lspcpp.dir/src/lsp/ParentProcessWatcher.cpp.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling CXX source to assembly CMakeFiles/lspcpp.dir/src/lsp/ParentProcessWatcher.cpp.s" + /bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S /usr/local/src/asymptote-2.78/LspCpp/src/lsp/ParentProcessWatcher.cpp -o CMakeFiles/lspcpp.dir/src/lsp/ParentProcessWatcher.cpp.s + +CMakeFiles/lspcpp.dir/src/lsp/ProtocolJsonHandler.cpp.o: CMakeFiles/lspcpp.dir/flags.make +CMakeFiles/lspcpp.dir/src/lsp/ProtocolJsonHandler.cpp.o: src/lsp/ProtocolJsonHandler.cpp +CMakeFiles/lspcpp.dir/src/lsp/ProtocolJsonHandler.cpp.o: CMakeFiles/lspcpp.dir/compiler_depend.ts + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=/usr/local/src/asymptote-2.78/LspCpp/CMakeFiles --progress-num=$(CMAKE_PROGRESS_17) "Building CXX object CMakeFiles/lspcpp.dir/src/lsp/ProtocolJsonHandler.cpp.o" + /bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -MD -MT CMakeFiles/lspcpp.dir/src/lsp/ProtocolJsonHandler.cpp.o -MF CMakeFiles/lspcpp.dir/src/lsp/ProtocolJsonHandler.cpp.o.d -o CMakeFiles/lspcpp.dir/src/lsp/ProtocolJsonHandler.cpp.o -c /usr/local/src/asymptote-2.78/LspCpp/src/lsp/ProtocolJsonHandler.cpp + +CMakeFiles/lspcpp.dir/src/lsp/ProtocolJsonHandler.cpp.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing CXX source to CMakeFiles/lspcpp.dir/src/lsp/ProtocolJsonHandler.cpp.i" + /bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E /usr/local/src/asymptote-2.78/LspCpp/src/lsp/ProtocolJsonHandler.cpp > CMakeFiles/lspcpp.dir/src/lsp/ProtocolJsonHandler.cpp.i + +CMakeFiles/lspcpp.dir/src/lsp/ProtocolJsonHandler.cpp.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling CXX source to assembly CMakeFiles/lspcpp.dir/src/lsp/ProtocolJsonHandler.cpp.s" + /bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S /usr/local/src/asymptote-2.78/LspCpp/src/lsp/ProtocolJsonHandler.cpp -o CMakeFiles/lspcpp.dir/src/lsp/ProtocolJsonHandler.cpp.s + +CMakeFiles/lspcpp.dir/src/lsp/textDocument.cpp.o: CMakeFiles/lspcpp.dir/flags.make +CMakeFiles/lspcpp.dir/src/lsp/textDocument.cpp.o: src/lsp/textDocument.cpp +CMakeFiles/lspcpp.dir/src/lsp/textDocument.cpp.o: CMakeFiles/lspcpp.dir/compiler_depend.ts + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=/usr/local/src/asymptote-2.78/LspCpp/CMakeFiles --progress-num=$(CMAKE_PROGRESS_18) "Building CXX object CMakeFiles/lspcpp.dir/src/lsp/textDocument.cpp.o" + /bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -MD -MT CMakeFiles/lspcpp.dir/src/lsp/textDocument.cpp.o -MF CMakeFiles/lspcpp.dir/src/lsp/textDocument.cpp.o.d -o CMakeFiles/lspcpp.dir/src/lsp/textDocument.cpp.o -c /usr/local/src/asymptote-2.78/LspCpp/src/lsp/textDocument.cpp + +CMakeFiles/lspcpp.dir/src/lsp/textDocument.cpp.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing CXX source to CMakeFiles/lspcpp.dir/src/lsp/textDocument.cpp.i" + /bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E /usr/local/src/asymptote-2.78/LspCpp/src/lsp/textDocument.cpp > CMakeFiles/lspcpp.dir/src/lsp/textDocument.cpp.i + +CMakeFiles/lspcpp.dir/src/lsp/textDocument.cpp.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling CXX source to assembly CMakeFiles/lspcpp.dir/src/lsp/textDocument.cpp.s" + /bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S /usr/local/src/asymptote-2.78/LspCpp/src/lsp/textDocument.cpp -o CMakeFiles/lspcpp.dir/src/lsp/textDocument.cpp.s + +CMakeFiles/lspcpp.dir/src/lsp/utils.cpp.o: CMakeFiles/lspcpp.dir/flags.make +CMakeFiles/lspcpp.dir/src/lsp/utils.cpp.o: src/lsp/utils.cpp +CMakeFiles/lspcpp.dir/src/lsp/utils.cpp.o: CMakeFiles/lspcpp.dir/compiler_depend.ts + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=/usr/local/src/asymptote-2.78/LspCpp/CMakeFiles --progress-num=$(CMAKE_PROGRESS_19) "Building CXX object CMakeFiles/lspcpp.dir/src/lsp/utils.cpp.o" + /bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -MD -MT CMakeFiles/lspcpp.dir/src/lsp/utils.cpp.o -MF CMakeFiles/lspcpp.dir/src/lsp/utils.cpp.o.d -o CMakeFiles/lspcpp.dir/src/lsp/utils.cpp.o -c /usr/local/src/asymptote-2.78/LspCpp/src/lsp/utils.cpp + +CMakeFiles/lspcpp.dir/src/lsp/utils.cpp.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing CXX source to CMakeFiles/lspcpp.dir/src/lsp/utils.cpp.i" + /bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E /usr/local/src/asymptote-2.78/LspCpp/src/lsp/utils.cpp > CMakeFiles/lspcpp.dir/src/lsp/utils.cpp.i + +CMakeFiles/lspcpp.dir/src/lsp/utils.cpp.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling CXX source to assembly CMakeFiles/lspcpp.dir/src/lsp/utils.cpp.s" + /bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S /usr/local/src/asymptote-2.78/LspCpp/src/lsp/utils.cpp -o CMakeFiles/lspcpp.dir/src/lsp/utils.cpp.s + +CMakeFiles/lspcpp.dir/src/lsp/working_files.cpp.o: CMakeFiles/lspcpp.dir/flags.make +CMakeFiles/lspcpp.dir/src/lsp/working_files.cpp.o: src/lsp/working_files.cpp +CMakeFiles/lspcpp.dir/src/lsp/working_files.cpp.o: CMakeFiles/lspcpp.dir/compiler_depend.ts + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=/usr/local/src/asymptote-2.78/LspCpp/CMakeFiles --progress-num=$(CMAKE_PROGRESS_20) "Building CXX object CMakeFiles/lspcpp.dir/src/lsp/working_files.cpp.o" + /bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -MD -MT CMakeFiles/lspcpp.dir/src/lsp/working_files.cpp.o -MF CMakeFiles/lspcpp.dir/src/lsp/working_files.cpp.o.d -o CMakeFiles/lspcpp.dir/src/lsp/working_files.cpp.o -c /usr/local/src/asymptote-2.78/LspCpp/src/lsp/working_files.cpp + +CMakeFiles/lspcpp.dir/src/lsp/working_files.cpp.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing CXX source to CMakeFiles/lspcpp.dir/src/lsp/working_files.cpp.i" + /bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E /usr/local/src/asymptote-2.78/LspCpp/src/lsp/working_files.cpp > CMakeFiles/lspcpp.dir/src/lsp/working_files.cpp.i + +CMakeFiles/lspcpp.dir/src/lsp/working_files.cpp.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling CXX source to assembly CMakeFiles/lspcpp.dir/src/lsp/working_files.cpp.s" + /bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S /usr/local/src/asymptote-2.78/LspCpp/src/lsp/working_files.cpp -o CMakeFiles/lspcpp.dir/src/lsp/working_files.cpp.s + +# Object files for target lspcpp +lspcpp_OBJECTS = \ +"CMakeFiles/lspcpp.dir/src/jsonrpc/Context.cpp.o" \ +"CMakeFiles/lspcpp.dir/src/jsonrpc/Endpoint.cpp.o" \ +"CMakeFiles/lspcpp.dir/src/jsonrpc/GCThreadContext.cpp.o" \ +"CMakeFiles/lspcpp.dir/src/jsonrpc/message.cpp.o" \ +"CMakeFiles/lspcpp.dir/src/jsonrpc/MessageJsonHandler.cpp.o" \ +"CMakeFiles/lspcpp.dir/src/jsonrpc/RemoteEndPoint.cpp.o" \ +"CMakeFiles/lspcpp.dir/src/jsonrpc/serializer.cpp.o" \ +"CMakeFiles/lspcpp.dir/src/jsonrpc/StreamMessageProducer.cpp.o" \ +"CMakeFiles/lspcpp.dir/src/jsonrpc/TcpServer.cpp.o" \ +"CMakeFiles/lspcpp.dir/src/jsonrpc/threaded_queue.cpp.o" \ +"CMakeFiles/lspcpp.dir/src/jsonrpc/WebSocketServer.cpp.o" \ +"CMakeFiles/lspcpp.dir/src/lsp/initialize.cpp.o" \ +"CMakeFiles/lspcpp.dir/src/lsp/lsp.cpp.o" \ +"CMakeFiles/lspcpp.dir/src/lsp/lsp_diagnostic.cpp.o" \ +"CMakeFiles/lspcpp.dir/src/lsp/Markup.cpp.o" \ +"CMakeFiles/lspcpp.dir/src/lsp/ParentProcessWatcher.cpp.o" \ +"CMakeFiles/lspcpp.dir/src/lsp/ProtocolJsonHandler.cpp.o" \ +"CMakeFiles/lspcpp.dir/src/lsp/textDocument.cpp.o" \ +"CMakeFiles/lspcpp.dir/src/lsp/utils.cpp.o" \ +"CMakeFiles/lspcpp.dir/src/lsp/working_files.cpp.o" + +# External object files for target lspcpp +lspcpp_EXTERNAL_OBJECTS = + +liblspcpp.a: CMakeFiles/lspcpp.dir/src/jsonrpc/Context.cpp.o +liblspcpp.a: CMakeFiles/lspcpp.dir/src/jsonrpc/Endpoint.cpp.o +liblspcpp.a: CMakeFiles/lspcpp.dir/src/jsonrpc/GCThreadContext.cpp.o +liblspcpp.a: CMakeFiles/lspcpp.dir/src/jsonrpc/message.cpp.o +liblspcpp.a: CMakeFiles/lspcpp.dir/src/jsonrpc/MessageJsonHandler.cpp.o +liblspcpp.a: CMakeFiles/lspcpp.dir/src/jsonrpc/RemoteEndPoint.cpp.o +liblspcpp.a: CMakeFiles/lspcpp.dir/src/jsonrpc/serializer.cpp.o +liblspcpp.a: CMakeFiles/lspcpp.dir/src/jsonrpc/StreamMessageProducer.cpp.o +liblspcpp.a: CMakeFiles/lspcpp.dir/src/jsonrpc/TcpServer.cpp.o +liblspcpp.a: CMakeFiles/lspcpp.dir/src/jsonrpc/threaded_queue.cpp.o +liblspcpp.a: CMakeFiles/lspcpp.dir/src/jsonrpc/WebSocketServer.cpp.o +liblspcpp.a: CMakeFiles/lspcpp.dir/src/lsp/initialize.cpp.o +liblspcpp.a: CMakeFiles/lspcpp.dir/src/lsp/lsp.cpp.o +liblspcpp.a: CMakeFiles/lspcpp.dir/src/lsp/lsp_diagnostic.cpp.o +liblspcpp.a: CMakeFiles/lspcpp.dir/src/lsp/Markup.cpp.o +liblspcpp.a: CMakeFiles/lspcpp.dir/src/lsp/ParentProcessWatcher.cpp.o +liblspcpp.a: CMakeFiles/lspcpp.dir/src/lsp/ProtocolJsonHandler.cpp.o +liblspcpp.a: CMakeFiles/lspcpp.dir/src/lsp/textDocument.cpp.o +liblspcpp.a: CMakeFiles/lspcpp.dir/src/lsp/utils.cpp.o +liblspcpp.a: CMakeFiles/lspcpp.dir/src/lsp/working_files.cpp.o +liblspcpp.a: CMakeFiles/lspcpp.dir/build.make +liblspcpp.a: CMakeFiles/lspcpp.dir/link.txt + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --bold --progress-dir=/usr/local/src/asymptote-2.78/LspCpp/CMakeFiles --progress-num=$(CMAKE_PROGRESS_21) "Linking CXX static library liblspcpp.a" + $(CMAKE_COMMAND) -P CMakeFiles/lspcpp.dir/cmake_clean_target.cmake + $(CMAKE_COMMAND) -E cmake_link_script CMakeFiles/lspcpp.dir/link.txt --verbose=$(VERBOSE) + +# Rule to build all files generated by this target. +CMakeFiles/lspcpp.dir/build: liblspcpp.a +.PHONY : CMakeFiles/lspcpp.dir/build + +CMakeFiles/lspcpp.dir/clean: + $(CMAKE_COMMAND) -P CMakeFiles/lspcpp.dir/cmake_clean.cmake +.PHONY : CMakeFiles/lspcpp.dir/clean + +CMakeFiles/lspcpp.dir/depend: + cd /usr/local/src/asymptote-2.78/LspCpp && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" /usr/local/src/asymptote-2.78/LspCpp /usr/local/src/asymptote-2.78/LspCpp /usr/local/src/asymptote-2.78/LspCpp /usr/local/src/asymptote-2.78/LspCpp /usr/local/src/asymptote-2.78/LspCpp/CMakeFiles/lspcpp.dir/DependInfo.cmake --color=$(COLOR) +.PHONY : CMakeFiles/lspcpp.dir/depend + diff --git a/graphics/asymptote/LspCpp/CMakeFiles/lspcpp.dir/cmake_clean.cmake b/graphics/asymptote/LspCpp/CMakeFiles/lspcpp.dir/cmake_clean.cmake new file mode 100644 index 0000000000..57bf010c8a --- /dev/null +++ b/graphics/asymptote/LspCpp/CMakeFiles/lspcpp.dir/cmake_clean.cmake @@ -0,0 +1,49 @@ +file(REMOVE_RECURSE + "CMakeFiles/lspcpp.dir/src/jsonrpc/Context.cpp.o" + "CMakeFiles/lspcpp.dir/src/jsonrpc/Context.cpp.o.d" + "CMakeFiles/lspcpp.dir/src/jsonrpc/Endpoint.cpp.o" + "CMakeFiles/lspcpp.dir/src/jsonrpc/Endpoint.cpp.o.d" + "CMakeFiles/lspcpp.dir/src/jsonrpc/GCThreadContext.cpp.o" + "CMakeFiles/lspcpp.dir/src/jsonrpc/GCThreadContext.cpp.o.d" + "CMakeFiles/lspcpp.dir/src/jsonrpc/MessageJsonHandler.cpp.o" + "CMakeFiles/lspcpp.dir/src/jsonrpc/MessageJsonHandler.cpp.o.d" + "CMakeFiles/lspcpp.dir/src/jsonrpc/RemoteEndPoint.cpp.o" + "CMakeFiles/lspcpp.dir/src/jsonrpc/RemoteEndPoint.cpp.o.d" + "CMakeFiles/lspcpp.dir/src/jsonrpc/StreamMessageProducer.cpp.o" + "CMakeFiles/lspcpp.dir/src/jsonrpc/StreamMessageProducer.cpp.o.d" + "CMakeFiles/lspcpp.dir/src/jsonrpc/TcpServer.cpp.o" + "CMakeFiles/lspcpp.dir/src/jsonrpc/TcpServer.cpp.o.d" + "CMakeFiles/lspcpp.dir/src/jsonrpc/WebSocketServer.cpp.o" + "CMakeFiles/lspcpp.dir/src/jsonrpc/WebSocketServer.cpp.o.d" + "CMakeFiles/lspcpp.dir/src/jsonrpc/message.cpp.o" + "CMakeFiles/lspcpp.dir/src/jsonrpc/message.cpp.o.d" + "CMakeFiles/lspcpp.dir/src/jsonrpc/serializer.cpp.o" + "CMakeFiles/lspcpp.dir/src/jsonrpc/serializer.cpp.o.d" + "CMakeFiles/lspcpp.dir/src/jsonrpc/threaded_queue.cpp.o" + "CMakeFiles/lspcpp.dir/src/jsonrpc/threaded_queue.cpp.o.d" + "CMakeFiles/lspcpp.dir/src/lsp/Markup.cpp.o" + "CMakeFiles/lspcpp.dir/src/lsp/Markup.cpp.o.d" + "CMakeFiles/lspcpp.dir/src/lsp/ParentProcessWatcher.cpp.o" + "CMakeFiles/lspcpp.dir/src/lsp/ParentProcessWatcher.cpp.o.d" + "CMakeFiles/lspcpp.dir/src/lsp/ProtocolJsonHandler.cpp.o" + "CMakeFiles/lspcpp.dir/src/lsp/ProtocolJsonHandler.cpp.o.d" + "CMakeFiles/lspcpp.dir/src/lsp/initialize.cpp.o" + "CMakeFiles/lspcpp.dir/src/lsp/initialize.cpp.o.d" + "CMakeFiles/lspcpp.dir/src/lsp/lsp.cpp.o" + "CMakeFiles/lspcpp.dir/src/lsp/lsp.cpp.o.d" + "CMakeFiles/lspcpp.dir/src/lsp/lsp_diagnostic.cpp.o" + "CMakeFiles/lspcpp.dir/src/lsp/lsp_diagnostic.cpp.o.d" + "CMakeFiles/lspcpp.dir/src/lsp/textDocument.cpp.o" + "CMakeFiles/lspcpp.dir/src/lsp/textDocument.cpp.o.d" + "CMakeFiles/lspcpp.dir/src/lsp/utils.cpp.o" + "CMakeFiles/lspcpp.dir/src/lsp/utils.cpp.o.d" + "CMakeFiles/lspcpp.dir/src/lsp/working_files.cpp.o" + "CMakeFiles/lspcpp.dir/src/lsp/working_files.cpp.o.d" + "liblspcpp.a" + "liblspcpp.pdb" +) + +# Per-language clean rules from dependency scanning. +foreach(lang CXX) + include(CMakeFiles/lspcpp.dir/cmake_clean_${lang}.cmake OPTIONAL) +endforeach() diff --git a/graphics/asymptote/LspCpp/CMakeFiles/lspcpp.dir/cmake_clean_target.cmake b/graphics/asymptote/LspCpp/CMakeFiles/lspcpp.dir/cmake_clean_target.cmake new file mode 100644 index 0000000000..7b0a23d539 --- /dev/null +++ b/graphics/asymptote/LspCpp/CMakeFiles/lspcpp.dir/cmake_clean_target.cmake @@ -0,0 +1,3 @@ +file(REMOVE_RECURSE + "liblspcpp.a" +) diff --git a/graphics/asymptote/LspCpp/CMakeFiles/lspcpp.dir/compiler_depend.internal b/graphics/asymptote/LspCpp/CMakeFiles/lspcpp.dir/compiler_depend.internal new file mode 100644 index 0000000000..dedd4ee13b --- /dev/null +++ b/graphics/asymptote/LspCpp/CMakeFiles/lspcpp.dir/compiler_depend.internal @@ -0,0 +1,14125 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 3.20 + +CMakeFiles/lspcpp.dir/src/jsonrpc/Context.cpp.o + /usr/local/src/asymptote-2.78/LspCpp/src/jsonrpc/Context.cpp + /usr/include/stdc-predef.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/JsonRpc/Context.h + /usr/include/c++/11/memory + /usr/include/c++/11/bits/stl_algobase.h + /usr/include/c++/11/x86_64-redhat-linux/bits/c++config.h + /usr/include/bits/wordsize.h + /usr/include/c++/11/x86_64-redhat-linux/bits/os_defines.h + /usr/include/features.h + /usr/include/sys/cdefs.h + /usr/include/bits/long-double.h + /usr/include/gnu/stubs.h + /usr/include/gnu/stubs-64.h + /usr/include/c++/11/x86_64-redhat-linux/bits/cpu_defines.h + /usr/include/c++/11/bits/functexcept.h + /usr/include/c++/11/bits/exception_defines.h + /usr/include/c++/11/bits/cpp_type_traits.h + /usr/include/c++/11/ext/type_traits.h + /usr/include/c++/11/ext/numeric_traits.h + /usr/include/c++/11/bits/stl_pair.h + /usr/include/c++/11/bits/move.h + /usr/include/c++/11/type_traits + /usr/include/c++/11/bits/stl_iterator_base_types.h + /usr/include/c++/11/bits/stl_iterator_base_funcs.h + /usr/include/c++/11/bits/concept_check.h + /usr/include/c++/11/debug/assertions.h + /usr/include/c++/11/bits/stl_iterator.h + /usr/include/c++/11/bits/ptr_traits.h + /usr/include/c++/11/debug/debug.h + /usr/include/c++/11/bits/predefined_ops.h + /usr/include/c++/11/bits/allocator.h + /usr/include/c++/11/x86_64-redhat-linux/bits/c++allocator.h + /usr/include/c++/11/ext/new_allocator.h + /usr/include/c++/11/new + /usr/include/c++/11/bits/exception.h + /usr/include/c++/11/bits/memoryfwd.h + /usr/include/c++/11/bits/stl_construct.h + /usr/include/c++/11/bits/stl_uninitialized.h + /usr/include/c++/11/ext/alloc_traits.h + /usr/include/c++/11/bits/alloc_traits.h + /usr/include/c++/11/bits/stl_tempbuf.h + /usr/include/c++/11/bits/stl_raw_storage_iter.h + /usr/include/c++/11/bits/align.h + /usr/include/c++/11/bit + /usr/lib/gcc/x86_64-redhat-linux/11/include/stdint.h + /usr/include/stdint.h + /usr/include/bits/libc-header-start.h + /usr/include/bits/types.h + /usr/include/bits/timesize.h + /usr/include/bits/typesizes.h + /usr/include/bits/time64.h + /usr/include/bits/wchar.h + /usr/include/bits/stdint-intn.h + /usr/include/bits/stdint-uintn.h + /usr/include/c++/11/bits/uses_allocator.h + /usr/include/c++/11/bits/unique_ptr.h + /usr/include/c++/11/utility + /usr/include/c++/11/bits/stl_relops.h + /usr/include/c++/11/initializer_list + /usr/include/c++/11/tuple + /usr/include/c++/11/array + /usr/include/c++/11/bits/range_access.h + /usr/include/c++/11/bits/invoke.h + /usr/include/c++/11/bits/stl_function.h + /usr/include/c++/11/backward/binders.h + /usr/include/c++/11/bits/functional_hash.h + /usr/include/c++/11/bits/hash_bytes.h + /usr/include/c++/11/bits/shared_ptr.h + /usr/include/c++/11/iosfwd + /usr/include/c++/11/bits/stringfwd.h + /usr/include/c++/11/bits/postypes.h + /usr/include/c++/11/cwchar + /usr/include/wchar.h + /usr/include/bits/floatn.h + /usr/include/bits/floatn-common.h + /usr/lib/gcc/x86_64-redhat-linux/11/include/stddef.h + /usr/lib/gcc/x86_64-redhat-linux/11/include/stdarg.h + /usr/include/bits/types/wint_t.h + /usr/include/bits/types/mbstate_t.h + /usr/include/bits/types/__mbstate_t.h + /usr/include/bits/types/__FILE.h + /usr/include/bits/types/FILE.h + /usr/include/bits/types/locale_t.h + /usr/include/bits/types/__locale_t.h + /usr/include/c++/11/bits/shared_ptr_base.h + /usr/include/c++/11/typeinfo + /usr/include/c++/11/bits/allocated_ptr.h + /usr/include/c++/11/bits/refwrap.h + /usr/include/c++/11/ext/aligned_buffer.h + /usr/include/c++/11/ext/atomicity.h + /usr/include/c++/11/x86_64-redhat-linux/bits/gthr.h + /usr/include/c++/11/x86_64-redhat-linux/bits/gthr-default.h + /usr/include/pthread.h + /usr/include/sched.h + /usr/include/bits/types/time_t.h + /usr/include/bits/types/struct_timespec.h + /usr/include/bits/endian.h + /usr/include/bits/endianness.h + /usr/include/bits/sched.h + /usr/include/bits/types/struct_sched_param.h + /usr/include/bits/cpu-set.h + /usr/include/time.h + /usr/include/bits/time.h + /usr/include/bits/timex.h + /usr/include/bits/types/struct_timeval.h + /usr/include/bits/types/clock_t.h + /usr/include/bits/types/struct_tm.h + /usr/include/bits/types/clockid_t.h + /usr/include/bits/types/timer_t.h + /usr/include/bits/types/struct_itimerspec.h + /usr/include/bits/pthreadtypes.h + /usr/include/bits/thread-shared-types.h + /usr/include/bits/pthreadtypes-arch.h + /usr/include/bits/struct_mutex.h + /usr/include/bits/struct_rwlock.h + /usr/include/bits/setjmp.h + /usr/include/bits/types/__sigset_t.h + /usr/include/bits/types/struct___jmp_buf_tag.h + /usr/include/c++/11/x86_64-redhat-linux/bits/atomic_word.h + /usr/include/sys/single_threaded.h + /usr/include/c++/11/ext/concurrence.h + /usr/include/c++/11/exception + /usr/include/c++/11/bits/exception_ptr.h + /usr/include/c++/11/bits/cxxabi_init_exception.h + /usr/include/c++/11/bits/nested_exception.h + /usr/include/c++/11/bits/shared_ptr_atomic.h + /usr/include/c++/11/bits/atomic_base.h + /usr/include/c++/11/bits/atomic_lockfree_defines.h + /usr/include/c++/11/backward/auto_ptr.h + /usr/include/c++/11/cassert + /usr/include/assert.h + +CMakeFiles/lspcpp.dir/src/jsonrpc/Endpoint.cpp.o + /usr/local/src/asymptote-2.78/LspCpp/src/jsonrpc/Endpoint.cpp + /usr/include/stdc-predef.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/JsonRpc/Endpoint.h + /usr/include/c++/11/map + /usr/include/c++/11/bits/stl_tree.h + /usr/include/c++/11/bits/stl_algobase.h + /usr/include/c++/11/x86_64-redhat-linux/bits/c++config.h + /usr/include/bits/wordsize.h + /usr/include/c++/11/x86_64-redhat-linux/bits/os_defines.h + /usr/include/features.h + /usr/include/sys/cdefs.h + /usr/include/bits/long-double.h + /usr/include/gnu/stubs.h + /usr/include/gnu/stubs-64.h + /usr/include/c++/11/x86_64-redhat-linux/bits/cpu_defines.h + /usr/include/c++/11/bits/functexcept.h + /usr/include/c++/11/bits/exception_defines.h + /usr/include/c++/11/bits/cpp_type_traits.h + /usr/include/c++/11/ext/type_traits.h + /usr/include/c++/11/ext/numeric_traits.h + /usr/include/c++/11/bits/stl_pair.h + /usr/include/c++/11/bits/move.h + /usr/include/c++/11/type_traits + /usr/include/c++/11/bits/stl_iterator_base_types.h + /usr/include/c++/11/bits/stl_iterator_base_funcs.h + /usr/include/c++/11/bits/concept_check.h + /usr/include/c++/11/debug/assertions.h + /usr/include/c++/11/bits/stl_iterator.h + /usr/include/c++/11/bits/ptr_traits.h + /usr/include/c++/11/debug/debug.h + /usr/include/c++/11/bits/predefined_ops.h + /usr/include/c++/11/bits/allocator.h + /usr/include/c++/11/x86_64-redhat-linux/bits/c++allocator.h + /usr/include/c++/11/ext/new_allocator.h + /usr/include/c++/11/new + /usr/include/c++/11/bits/exception.h + /usr/include/c++/11/bits/memoryfwd.h + /usr/include/c++/11/bits/stl_function.h + /usr/include/c++/11/backward/binders.h + /usr/include/c++/11/ext/alloc_traits.h + /usr/include/c++/11/bits/alloc_traits.h + /usr/include/c++/11/bits/stl_construct.h + /usr/include/c++/11/ext/aligned_buffer.h + /usr/include/c++/11/bits/stl_map.h + /usr/include/c++/11/initializer_list + /usr/include/c++/11/tuple + /usr/include/c++/11/utility + /usr/include/c++/11/bits/stl_relops.h + /usr/include/c++/11/array + /usr/include/c++/11/bits/range_access.h + /usr/include/c++/11/bits/uses_allocator.h + /usr/include/c++/11/bits/invoke.h + /usr/include/c++/11/bits/stl_multimap.h + /usr/include/c++/11/bits/erase_if.h + /usr/include/c++/11/functional + /usr/include/c++/11/bits/functional_hash.h + /usr/include/c++/11/bits/hash_bytes.h + /usr/include/c++/11/bits/refwrap.h + /usr/include/c++/11/bits/std_function.h + /usr/include/c++/11/typeinfo + /usr/include/c++/11/memory + /usr/include/c++/11/bits/stl_uninitialized.h + /usr/include/c++/11/bits/stl_tempbuf.h + /usr/include/c++/11/bits/stl_raw_storage_iter.h + /usr/include/c++/11/bits/align.h + /usr/include/c++/11/bit + /usr/lib/gcc/x86_64-redhat-linux/11/include/stdint.h + /usr/include/stdint.h + /usr/include/bits/libc-header-start.h + /usr/include/bits/types.h + /usr/include/bits/timesize.h + /usr/include/bits/typesizes.h + /usr/include/bits/time64.h + /usr/include/bits/wchar.h + /usr/include/bits/stdint-intn.h + /usr/include/bits/stdint-uintn.h + /usr/include/c++/11/bits/unique_ptr.h + /usr/include/c++/11/bits/shared_ptr.h + /usr/include/c++/11/iosfwd + /usr/include/c++/11/bits/stringfwd.h + /usr/include/c++/11/bits/postypes.h + /usr/include/c++/11/cwchar + /usr/include/wchar.h + /usr/include/bits/floatn.h + /usr/include/bits/floatn-common.h + /usr/lib/gcc/x86_64-redhat-linux/11/include/stddef.h + /usr/lib/gcc/x86_64-redhat-linux/11/include/stdarg.h + /usr/include/bits/types/wint_t.h + /usr/include/bits/types/mbstate_t.h + /usr/include/bits/types/__mbstate_t.h + /usr/include/bits/types/__FILE.h + /usr/include/bits/types/FILE.h + /usr/include/bits/types/locale_t.h + /usr/include/bits/types/__locale_t.h + /usr/include/c++/11/bits/shared_ptr_base.h + /usr/include/c++/11/bits/allocated_ptr.h + /usr/include/c++/11/ext/atomicity.h + /usr/include/c++/11/x86_64-redhat-linux/bits/gthr.h + /usr/include/c++/11/x86_64-redhat-linux/bits/gthr-default.h + /usr/include/pthread.h + /usr/include/sched.h + /usr/include/bits/types/time_t.h + /usr/include/bits/types/struct_timespec.h + /usr/include/bits/endian.h + /usr/include/bits/endianness.h + /usr/include/bits/sched.h + /usr/include/bits/types/struct_sched_param.h + /usr/include/bits/cpu-set.h + /usr/include/time.h + /usr/include/bits/time.h + /usr/include/bits/timex.h + /usr/include/bits/types/struct_timeval.h + /usr/include/bits/types/clock_t.h + /usr/include/bits/types/struct_tm.h + /usr/include/bits/types/clockid_t.h + /usr/include/bits/types/timer_t.h + /usr/include/bits/types/struct_itimerspec.h + /usr/include/bits/pthreadtypes.h + /usr/include/bits/thread-shared-types.h + /usr/include/bits/pthreadtypes-arch.h + /usr/include/bits/struct_mutex.h + /usr/include/bits/struct_rwlock.h + /usr/include/bits/setjmp.h + /usr/include/bits/types/__sigset_t.h + /usr/include/bits/types/struct___jmp_buf_tag.h + /usr/include/c++/11/x86_64-redhat-linux/bits/atomic_word.h + /usr/include/sys/single_threaded.h + /usr/include/c++/11/ext/concurrence.h + /usr/include/c++/11/exception + /usr/include/c++/11/bits/exception_ptr.h + /usr/include/c++/11/bits/cxxabi_init_exception.h + /usr/include/c++/11/bits/nested_exception.h + /usr/include/c++/11/bits/shared_ptr_atomic.h + /usr/include/c++/11/bits/atomic_base.h + /usr/include/c++/11/bits/atomic_lockfree_defines.h + /usr/include/c++/11/backward/auto_ptr.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/JsonRpc/MessageIssue.h + /usr/include/c++/11/string + /usr/include/c++/11/bits/char_traits.h + /usr/include/c++/11/cstdint + /usr/include/c++/11/bits/localefwd.h + /usr/include/c++/11/x86_64-redhat-linux/bits/c++locale.h + /usr/include/c++/11/clocale + /usr/include/locale.h + /usr/include/bits/locale.h + /usr/include/c++/11/cctype + /usr/include/ctype.h + /usr/include/c++/11/bits/ostream_insert.h + /usr/include/c++/11/bits/cxxabi_forced.h + /usr/include/c++/11/bits/basic_string.h + /usr/include/c++/11/ext/string_conversions.h + /usr/include/c++/11/cstdlib + /usr/include/stdlib.h + /usr/include/bits/waitflags.h + /usr/include/bits/waitstatus.h + /usr/include/sys/types.h + /usr/include/endian.h + /usr/include/bits/byteswap.h + /usr/include/bits/uintn-identity.h + /usr/include/sys/select.h + /usr/include/bits/select.h + /usr/include/bits/types/sigset_t.h + /usr/include/alloca.h + /usr/include/bits/stdlib-bsearch.h + /usr/include/bits/stdlib-float.h + /usr/include/c++/11/bits/std_abs.h + /usr/include/c++/11/cstdio + /usr/include/stdio.h + /usr/include/bits/types/__fpos_t.h + /usr/include/bits/types/__fpos64_t.h + /usr/include/bits/types/struct_FILE.h + /usr/include/bits/types/cookie_io_functions_t.h + /usr/include/bits/stdio_lim.h + /usr/include/bits/stdio.h + /usr/include/c++/11/cerrno + /usr/include/errno.h + /usr/include/bits/errno.h + /usr/include/linux/errno.h + /usr/include/asm/errno.h + /usr/include/asm-generic/errno.h + /usr/include/asm-generic/errno-base.h + /usr/include/bits/types/error_t.h + /usr/include/c++/11/bits/charconv.h + /usr/include/c++/11/bits/basic_string.tcc + /usr/include/c++/11/vector + /usr/include/c++/11/bits/stl_vector.h + /usr/include/c++/11/bits/stl_bvector.h + /usr/include/c++/11/bits/vector.tcc + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/JsonRpc/message.h + /usr/include/c++/11/atomic + /usr/include/c++/11/iostream + /usr/include/c++/11/ostream + /usr/include/c++/11/ios + /usr/include/c++/11/bits/ios_base.h + /usr/include/c++/11/bits/locale_classes.h + /usr/include/c++/11/bits/locale_classes.tcc + /usr/include/c++/11/system_error + /usr/include/c++/11/x86_64-redhat-linux/bits/error_constants.h + /usr/include/c++/11/stdexcept + /usr/include/c++/11/streambuf + /usr/include/c++/11/bits/streambuf.tcc + /usr/include/c++/11/bits/basic_ios.h + /usr/include/c++/11/bits/locale_facets.h + /usr/include/c++/11/cwctype + /usr/include/wctype.h + /usr/include/bits/wctype-wchar.h + /usr/include/c++/11/x86_64-redhat-linux/bits/ctype_base.h + /usr/include/c++/11/bits/streambuf_iterator.h + /usr/include/c++/11/x86_64-redhat-linux/bits/ctype_inline.h + /usr/include/c++/11/bits/locale_facets.tcc + /usr/include/c++/11/bits/basic_ios.tcc + /usr/include/c++/11/bits/ostream.tcc + /usr/include/c++/11/istream + /usr/include/c++/11/bits/istream.tcc + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/JsonRpc/serializer.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/JsonRpc/macro_map.h + /usr/include/boost/optional.hpp + /usr/include/boost/optional/optional.hpp + /usr/include/boost/assert.hpp + /usr/include/assert.h + /usr/include/boost/core/addressof.hpp + /usr/include/boost/config.hpp + /usr/include/boost/config/user.hpp + /usr/include/boost/config/detail/select_compiler_config.hpp + /usr/include/boost/config/compiler/gcc.hpp + /usr/include/c++/11/cstddef + /usr/include/boost/config/detail/select_stdlib_config.hpp + /usr/include/c++/11/version + /usr/include/boost/config/stdlib/libstdcpp3.hpp + /usr/include/unistd.h + /usr/include/bits/posix_opt.h + /usr/include/bits/environments.h + /usr/include/bits/confname.h + /usr/include/bits/getopt_posix.h + /usr/include/bits/getopt_core.h + /usr/include/bits/unistd_ext.h + /usr/include/boost/config/detail/select_platform_config.hpp + /usr/include/boost/config/platform/linux.hpp + /usr/include/boost/config/detail/posix_features.hpp + /usr/include/boost/config/detail/suffix.hpp + /usr/include/boost/config/helper_macros.hpp + /usr/include/boost/core/enable_if.hpp + /usr/include/boost/core/explicit_operator_bool.hpp + /usr/include/boost/config/workaround.hpp + /usr/include/boost/core/swap.hpp + /usr/include/boost/optional/bad_optional_access.hpp + /usr/include/boost/static_assert.hpp + /usr/include/boost/detail/workaround.hpp + /usr/include/boost/throw_exception.hpp + /usr/include/boost/assert/source_location.hpp + /usr/include/boost/current_function.hpp + /usr/include/boost/cstdint.hpp + /usr/include/boost/exception/exception.hpp + /usr/include/boost/type.hpp + /usr/include/boost/type_traits/alignment_of.hpp + /usr/include/boost/type_traits/intrinsics.hpp + /usr/include/boost/type_traits/detail/config.hpp + /usr/include/boost/version.hpp + /usr/include/boost/type_traits/integral_constant.hpp + /usr/include/boost/type_traits/conditional.hpp + /usr/include/boost/type_traits/has_nothrow_constructor.hpp + /usr/include/boost/type_traits/is_default_constructible.hpp + /usr/include/boost/type_traits/is_complete.hpp + /usr/include/boost/type_traits/declval.hpp + /usr/include/boost/type_traits/add_rvalue_reference.hpp + /usr/include/boost/type_traits/is_void.hpp + /usr/include/boost/type_traits/is_reference.hpp + /usr/include/boost/type_traits/is_lvalue_reference.hpp + /usr/include/boost/type_traits/is_rvalue_reference.hpp + /usr/include/boost/type_traits/remove_reference.hpp + /usr/include/boost/type_traits/is_function.hpp + /usr/include/boost/type_traits/detail/is_function_cxx_11.hpp + /usr/include/boost/type_traits/detail/yes_no_type.hpp + /usr/include/boost/type_traits/type_with_alignment.hpp + /usr/include/boost/type_traits/is_pod.hpp + /usr/include/boost/type_traits/is_scalar.hpp + /usr/include/boost/type_traits/is_arithmetic.hpp + /usr/include/boost/type_traits/is_integral.hpp + /usr/include/boost/type_traits/is_floating_point.hpp + /usr/include/boost/type_traits/is_enum.hpp + /usr/include/boost/type_traits/is_pointer.hpp + /usr/include/boost/type_traits/is_member_pointer.hpp + /usr/include/boost/type_traits/is_member_function_pointer.hpp + /usr/include/boost/type_traits/detail/is_member_function_pointer_cxx_11.hpp + /usr/include/boost/type_traits/remove_const.hpp + /usr/include/boost/type_traits/decay.hpp + /usr/include/boost/type_traits/is_array.hpp + /usr/include/boost/type_traits/remove_bounds.hpp + /usr/include/boost/type_traits/remove_extent.hpp + /usr/include/boost/type_traits/add_pointer.hpp + /usr/include/boost/type_traits/remove_cv.hpp + /usr/include/boost/type_traits/is_base_of.hpp + /usr/include/boost/type_traits/is_base_and_derived.hpp + /usr/include/boost/type_traits/is_same.hpp + /usr/include/boost/type_traits/is_class.hpp + /usr/include/boost/type_traits/is_const.hpp + /usr/include/boost/type_traits/is_constructible.hpp + /usr/include/boost/type_traits/is_destructible.hpp + /usr/include/boost/type_traits/is_nothrow_move_assignable.hpp + /usr/include/boost/type_traits/has_trivial_move_assign.hpp + /usr/include/boost/type_traits/is_assignable.hpp + /usr/include/boost/type_traits/is_volatile.hpp + /usr/include/boost/type_traits/has_nothrow_assign.hpp + /usr/include/boost/type_traits/enable_if.hpp + /usr/include/boost/type_traits/is_nothrow_move_constructible.hpp + /usr/include/boost/move/utility.hpp + /usr/include/boost/move/detail/config_begin.hpp + /usr/include/boost/move/detail/workaround.hpp + /usr/include/boost/move/utility_core.hpp + /usr/include/boost/move/core.hpp + /usr/include/boost/move/detail/config_end.hpp + /usr/include/boost/move/detail/meta_utils.hpp + /usr/include/boost/move/detail/meta_utils_core.hpp + /usr/include/boost/move/traits.hpp + /usr/include/boost/move/detail/type_traits.hpp + /usr/include/boost/none.hpp + /usr/include/boost/none_t.hpp + /usr/include/boost/utility/compare_pointees.hpp + /usr/include/boost/utility/result_of.hpp + /usr/include/boost/preprocessor/cat.hpp + /usr/include/boost/preprocessor/config/config.hpp + /usr/include/boost/preprocessor/iteration/iterate.hpp + /usr/include/boost/preprocessor/arithmetic/dec.hpp + /usr/include/boost/preprocessor/config/limits.hpp + /usr/include/boost/preprocessor/arithmetic/limits/dec_256.hpp + /usr/include/boost/preprocessor/arithmetic/inc.hpp + /usr/include/boost/preprocessor/arithmetic/limits/inc_256.hpp + /usr/include/boost/preprocessor/array/elem.hpp + /usr/include/boost/preprocessor/array/data.hpp + /usr/include/boost/preprocessor/tuple/elem.hpp + /usr/include/boost/preprocessor/facilities/expand.hpp + /usr/include/boost/preprocessor/facilities/overload.hpp + /usr/include/boost/preprocessor/variadic/size.hpp + /usr/include/boost/preprocessor/control/iif.hpp + /usr/include/boost/preprocessor/facilities/check_empty.hpp + /usr/include/boost/preprocessor/variadic/has_opt.hpp + /usr/include/boost/preprocessor/variadic/limits/size_64.hpp + /usr/include/boost/preprocessor/tuple/rem.hpp + /usr/include/boost/preprocessor/tuple/detail/is_single_return.hpp + /usr/include/boost/preprocessor/variadic/elem.hpp + /usr/include/boost/preprocessor/variadic/limits/elem_64.hpp + /usr/include/boost/preprocessor/array/size.hpp + /usr/include/boost/preprocessor/slot/slot.hpp + /usr/include/boost/preprocessor/slot/detail/def.hpp + /usr/include/boost/preprocessor/repetition/enum_params.hpp + /usr/include/boost/preprocessor/punctuation/comma_if.hpp + /usr/include/boost/preprocessor/control/if.hpp + /usr/include/boost/preprocessor/logical/bool.hpp + /usr/include/boost/preprocessor/logical/limits/bool_256.hpp + /usr/include/boost/preprocessor/facilities/empty.hpp + /usr/include/boost/preprocessor/punctuation/comma.hpp + /usr/include/boost/preprocessor/repetition/repeat.hpp + /usr/include/boost/preprocessor/debug/error.hpp + /usr/include/boost/preprocessor/detail/auto_rec.hpp + /usr/include/boost/preprocessor/detail/limits/auto_rec_256.hpp + /usr/include/boost/preprocessor/tuple/eat.hpp + /usr/include/boost/preprocessor/repetition/limits/repeat_256.hpp + /usr/include/boost/preprocessor/repetition/enum_trailing_params.hpp + /usr/include/boost/preprocessor/repetition/enum_binary_params.hpp + /usr/include/boost/preprocessor/repetition/enum_shifted_params.hpp + /usr/include/boost/preprocessor/facilities/intercept.hpp + /usr/include/boost/preprocessor/facilities/limits/intercept_256.hpp + /usr/include/boost/type_traits/type_identity.hpp + /usr/include/boost/preprocessor/iteration/detail/iter/forward1.hpp + /usr/include/boost/preprocessor/iteration/detail/bounds/lower1.hpp + /usr/include/boost/preprocessor/slot/detail/shared.hpp + /usr/include/boost/preprocessor/iteration/detail/bounds/upper1.hpp + /usr/include/boost/preprocessor/iteration/detail/iter/limits/forward1_256.hpp + /usr/include/boost/utility/detail/result_of_iterate.hpp + /usr/include/boost/optional/optional_fwd.hpp + /usr/include/boost/optional/detail/optional_config.hpp + /usr/include/boost/optional/detail/optional_factory_support.hpp + /usr/include/boost/optional/detail/optional_aligned_storage.hpp + /usr/include/boost/optional/detail/optional_trivially_copyable_base.hpp + /usr/include/boost/optional/detail/optional_reference_spec.hpp + /usr/include/boost/optional/detail/optional_relops.hpp + /usr/include/boost/optional/detail/optional_swap.hpp + /usr/include/c++/11/cassert + /usr/include/c++/11/algorithm + /usr/include/c++/11/bits/stl_algo.h + /usr/include/c++/11/bits/algorithmfwd.h + /usr/include/c++/11/bits/stl_heap.h + /usr/include/c++/11/bits/uniform_int_dist.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/method_type.h + +CMakeFiles/lspcpp.dir/src/jsonrpc/GCThreadContext.cpp.o + /usr/local/src/asymptote-2.78/LspCpp/src/jsonrpc/GCThreadContext.cpp + /usr/include/stdc-predef.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/JsonRpc/GCThreadContext.h + ../gc-8.2.0/include/gc.h + ../gc-8.2.0/include/gc_version.h + ../gc-8.2.0/include/gc_config_macros.h + /usr/lib/gcc/x86_64-redhat-linux/11/include/stddef.h + /usr/include/features.h + /usr/include/sys/cdefs.h + /usr/include/bits/wordsize.h + /usr/include/bits/long-double.h + /usr/include/gnu/stubs.h + /usr/include/gnu/stubs-64.h + ../gc-8.2.0/include/gc_pthread_redirects.h + /usr/include/pthread.h + /usr/include/sched.h + /usr/include/bits/types.h + /usr/include/bits/timesize.h + /usr/include/bits/typesizes.h + /usr/include/bits/time64.h + /usr/include/bits/types/time_t.h + /usr/include/bits/types/struct_timespec.h + /usr/include/bits/endian.h + /usr/include/bits/endianness.h + /usr/include/bits/sched.h + /usr/include/bits/types/struct_sched_param.h + /usr/include/bits/cpu-set.h + /usr/include/time.h + /usr/include/bits/time.h + /usr/include/bits/timex.h + /usr/include/bits/types/struct_timeval.h + /usr/include/bits/types/clock_t.h + /usr/include/bits/types/struct_tm.h + /usr/include/bits/types/clockid_t.h + /usr/include/bits/types/timer_t.h + /usr/include/bits/types/struct_itimerspec.h + /usr/include/bits/types/locale_t.h + /usr/include/bits/types/__locale_t.h + /usr/include/bits/pthreadtypes.h + /usr/include/bits/thread-shared-types.h + /usr/include/bits/pthreadtypes-arch.h + /usr/include/bits/struct_mutex.h + /usr/include/bits/struct_rwlock.h + /usr/include/bits/setjmp.h + /usr/include/bits/types/__sigset_t.h + /usr/include/bits/types/struct___jmp_buf_tag.h + /usr/include/dlfcn.h + /usr/include/bits/dlfcn.h + /usr/include/signal.h + /usr/include/bits/signum-generic.h + /usr/include/bits/signum-arch.h + /usr/include/bits/types/sig_atomic_t.h + /usr/include/bits/types/sigset_t.h + /usr/include/bits/types/siginfo_t.h + /usr/include/bits/types/__sigval_t.h + /usr/include/bits/siginfo-arch.h + /usr/include/bits/siginfo-consts.h + /usr/include/bits/siginfo-consts-arch.h + /usr/include/bits/types/sigval_t.h + /usr/include/bits/types/sigevent_t.h + /usr/include/bits/sigevent-consts.h + /usr/include/bits/sigaction.h + /usr/include/bits/sigcontext.h + /usr/include/bits/types/stack_t.h + /usr/include/sys/ucontext.h + /usr/include/bits/sigstack.h + /usr/include/bits/ss_flags.h + /usr/include/bits/types/struct_sigstack.h + /usr/include/bits/sigthread.h + /usr/include/bits/signal_ext.h + /usr/include/c++/11/iostream + /usr/include/c++/11/x86_64-redhat-linux/bits/c++config.h + /usr/include/c++/11/x86_64-redhat-linux/bits/os_defines.h + /usr/include/c++/11/x86_64-redhat-linux/bits/cpu_defines.h + /usr/include/c++/11/ostream + /usr/include/c++/11/ios + /usr/include/c++/11/iosfwd + /usr/include/c++/11/bits/stringfwd.h + /usr/include/c++/11/bits/memoryfwd.h + /usr/include/c++/11/bits/postypes.h + /usr/include/c++/11/cwchar + /usr/include/wchar.h + /usr/include/bits/libc-header-start.h + /usr/include/bits/floatn.h + /usr/include/bits/floatn-common.h + /usr/lib/gcc/x86_64-redhat-linux/11/include/stdarg.h + /usr/include/bits/wchar.h + /usr/include/bits/types/wint_t.h + /usr/include/bits/types/mbstate_t.h + /usr/include/bits/types/__mbstate_t.h + /usr/include/bits/types/__FILE.h + /usr/include/bits/types/FILE.h + /usr/include/c++/11/exception + /usr/include/c++/11/bits/exception.h + /usr/include/c++/11/bits/exception_ptr.h + /usr/include/c++/11/bits/exception_defines.h + /usr/include/c++/11/bits/cxxabi_init_exception.h + /usr/include/c++/11/typeinfo + /usr/include/c++/11/bits/hash_bytes.h + /usr/include/c++/11/new + /usr/include/c++/11/bits/nested_exception.h + /usr/include/c++/11/bits/move.h + /usr/include/c++/11/type_traits + /usr/include/c++/11/bits/char_traits.h + /usr/include/c++/11/bits/stl_algobase.h + /usr/include/c++/11/bits/functexcept.h + /usr/include/c++/11/bits/cpp_type_traits.h + /usr/include/c++/11/ext/type_traits.h + /usr/include/c++/11/ext/numeric_traits.h + /usr/include/c++/11/bits/stl_pair.h + /usr/include/c++/11/bits/stl_iterator_base_types.h + /usr/include/c++/11/bits/stl_iterator_base_funcs.h + /usr/include/c++/11/bits/concept_check.h + /usr/include/c++/11/debug/assertions.h + /usr/include/c++/11/bits/stl_iterator.h + /usr/include/c++/11/bits/ptr_traits.h + /usr/include/c++/11/debug/debug.h + /usr/include/c++/11/bits/predefined_ops.h + /usr/include/c++/11/cstdint + /usr/lib/gcc/x86_64-redhat-linux/11/include/stdint.h + /usr/include/stdint.h + /usr/include/bits/stdint-intn.h + /usr/include/bits/stdint-uintn.h + /usr/include/c++/11/bits/localefwd.h + /usr/include/c++/11/x86_64-redhat-linux/bits/c++locale.h + /usr/include/c++/11/clocale + /usr/include/locale.h + /usr/include/bits/locale.h + /usr/include/c++/11/cctype + /usr/include/ctype.h + /usr/include/c++/11/bits/ios_base.h + /usr/include/c++/11/ext/atomicity.h + /usr/include/c++/11/x86_64-redhat-linux/bits/gthr.h + /usr/include/c++/11/x86_64-redhat-linux/bits/gthr-default.h + /usr/include/c++/11/x86_64-redhat-linux/bits/atomic_word.h + /usr/include/sys/single_threaded.h + /usr/include/c++/11/bits/locale_classes.h + /usr/include/c++/11/string + /usr/include/c++/11/bits/allocator.h + /usr/include/c++/11/x86_64-redhat-linux/bits/c++allocator.h + /usr/include/c++/11/ext/new_allocator.h + /usr/include/c++/11/bits/ostream_insert.h + /usr/include/c++/11/bits/cxxabi_forced.h + /usr/include/c++/11/bits/stl_function.h + /usr/include/c++/11/backward/binders.h + /usr/include/c++/11/bits/range_access.h + /usr/include/c++/11/initializer_list + /usr/include/c++/11/bits/basic_string.h + /usr/include/c++/11/ext/alloc_traits.h + /usr/include/c++/11/bits/alloc_traits.h + /usr/include/c++/11/bits/stl_construct.h + /usr/include/c++/11/ext/string_conversions.h + /usr/include/c++/11/cstdlib + /usr/include/stdlib.h + /usr/include/bits/waitflags.h + /usr/include/bits/waitstatus.h + /usr/include/sys/types.h + /usr/include/endian.h + /usr/include/bits/byteswap.h + /usr/include/bits/uintn-identity.h + /usr/include/sys/select.h + /usr/include/bits/select.h + /usr/include/alloca.h + /usr/include/bits/stdlib-bsearch.h + /usr/include/bits/stdlib-float.h + /usr/include/c++/11/bits/std_abs.h + /usr/include/c++/11/cstdio + /usr/include/stdio.h + /usr/include/bits/types/__fpos_t.h + /usr/include/bits/types/__fpos64_t.h + /usr/include/bits/types/struct_FILE.h + /usr/include/bits/types/cookie_io_functions_t.h + /usr/include/bits/stdio_lim.h + /usr/include/bits/stdio.h + /usr/include/c++/11/cerrno + /usr/include/errno.h + /usr/include/bits/errno.h + /usr/include/linux/errno.h + /usr/include/asm/errno.h + /usr/include/asm-generic/errno.h + /usr/include/asm-generic/errno-base.h + /usr/include/bits/types/error_t.h + /usr/include/c++/11/bits/charconv.h + /usr/include/c++/11/bits/functional_hash.h + /usr/include/c++/11/bits/basic_string.tcc + /usr/include/c++/11/bits/locale_classes.tcc + /usr/include/c++/11/system_error + /usr/include/c++/11/x86_64-redhat-linux/bits/error_constants.h + /usr/include/c++/11/stdexcept + /usr/include/c++/11/streambuf + /usr/include/c++/11/bits/streambuf.tcc + /usr/include/c++/11/bits/basic_ios.h + /usr/include/c++/11/bits/locale_facets.h + /usr/include/c++/11/cwctype + /usr/include/wctype.h + /usr/include/bits/wctype-wchar.h + /usr/include/c++/11/x86_64-redhat-linux/bits/ctype_base.h + /usr/include/c++/11/bits/streambuf_iterator.h + /usr/include/c++/11/x86_64-redhat-linux/bits/ctype_inline.h + /usr/include/c++/11/bits/locale_facets.tcc + /usr/include/c++/11/bits/basic_ios.tcc + /usr/include/c++/11/bits/ostream.tcc + /usr/include/c++/11/istream + /usr/include/c++/11/bits/istream.tcc + +CMakeFiles/lspcpp.dir/src/jsonrpc/MessageJsonHandler.cpp.o + /usr/local/src/asymptote-2.78/LspCpp/src/jsonrpc/MessageJsonHandler.cpp + /usr/include/stdc-predef.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/JsonRpc/MessageJsonHandler.h + /usr/include/c++/11/string + /usr/include/c++/11/x86_64-redhat-linux/bits/c++config.h + /usr/include/bits/wordsize.h + /usr/include/c++/11/x86_64-redhat-linux/bits/os_defines.h + /usr/include/features.h + /usr/include/sys/cdefs.h + /usr/include/bits/long-double.h + /usr/include/gnu/stubs.h + /usr/include/gnu/stubs-64.h + /usr/include/c++/11/x86_64-redhat-linux/bits/cpu_defines.h + /usr/include/c++/11/bits/stringfwd.h + /usr/include/c++/11/bits/memoryfwd.h + /usr/include/c++/11/bits/char_traits.h + /usr/include/c++/11/bits/stl_algobase.h + /usr/include/c++/11/bits/functexcept.h + /usr/include/c++/11/bits/exception_defines.h + /usr/include/c++/11/bits/cpp_type_traits.h + /usr/include/c++/11/ext/type_traits.h + /usr/include/c++/11/ext/numeric_traits.h + /usr/include/c++/11/bits/stl_pair.h + /usr/include/c++/11/bits/move.h + /usr/include/c++/11/type_traits + /usr/include/c++/11/bits/stl_iterator_base_types.h + /usr/include/c++/11/bits/stl_iterator_base_funcs.h + /usr/include/c++/11/bits/concept_check.h + /usr/include/c++/11/debug/assertions.h + /usr/include/c++/11/bits/stl_iterator.h + /usr/include/c++/11/bits/ptr_traits.h + /usr/include/c++/11/debug/debug.h + /usr/include/c++/11/bits/predefined_ops.h + /usr/include/c++/11/bits/postypes.h + /usr/include/c++/11/cwchar + /usr/include/wchar.h + /usr/include/bits/libc-header-start.h + /usr/include/bits/floatn.h + /usr/include/bits/floatn-common.h + /usr/lib/gcc/x86_64-redhat-linux/11/include/stddef.h + /usr/lib/gcc/x86_64-redhat-linux/11/include/stdarg.h + /usr/include/bits/wchar.h + /usr/include/bits/types/wint_t.h + /usr/include/bits/types/mbstate_t.h + /usr/include/bits/types/__mbstate_t.h + /usr/include/bits/types/__FILE.h + /usr/include/bits/types/FILE.h + /usr/include/bits/types/locale_t.h + /usr/include/bits/types/__locale_t.h + /usr/include/c++/11/cstdint + /usr/lib/gcc/x86_64-redhat-linux/11/include/stdint.h + /usr/include/stdint.h + /usr/include/bits/types.h + /usr/include/bits/timesize.h + /usr/include/bits/typesizes.h + /usr/include/bits/time64.h + /usr/include/bits/stdint-intn.h + /usr/include/bits/stdint-uintn.h + /usr/include/c++/11/bits/allocator.h + /usr/include/c++/11/x86_64-redhat-linux/bits/c++allocator.h + /usr/include/c++/11/ext/new_allocator.h + /usr/include/c++/11/new + /usr/include/c++/11/bits/exception.h + /usr/include/c++/11/bits/localefwd.h + /usr/include/c++/11/x86_64-redhat-linux/bits/c++locale.h + /usr/include/c++/11/clocale + /usr/include/locale.h + /usr/include/bits/locale.h + /usr/include/c++/11/iosfwd + /usr/include/c++/11/cctype + /usr/include/ctype.h + /usr/include/bits/endian.h + /usr/include/bits/endianness.h + /usr/include/c++/11/bits/ostream_insert.h + /usr/include/c++/11/bits/cxxabi_forced.h + /usr/include/c++/11/bits/stl_function.h + /usr/include/c++/11/backward/binders.h + /usr/include/c++/11/bits/range_access.h + /usr/include/c++/11/initializer_list + /usr/include/c++/11/bits/basic_string.h + /usr/include/c++/11/ext/atomicity.h + /usr/include/c++/11/x86_64-redhat-linux/bits/gthr.h + /usr/include/c++/11/x86_64-redhat-linux/bits/gthr-default.h + /usr/include/pthread.h + /usr/include/sched.h + /usr/include/bits/types/time_t.h + /usr/include/bits/types/struct_timespec.h + /usr/include/bits/sched.h + /usr/include/bits/types/struct_sched_param.h + /usr/include/bits/cpu-set.h + /usr/include/time.h + /usr/include/bits/time.h + /usr/include/bits/timex.h + /usr/include/bits/types/struct_timeval.h + /usr/include/bits/types/clock_t.h + /usr/include/bits/types/struct_tm.h + /usr/include/bits/types/clockid_t.h + /usr/include/bits/types/timer_t.h + /usr/include/bits/types/struct_itimerspec.h + /usr/include/bits/pthreadtypes.h + /usr/include/bits/thread-shared-types.h + /usr/include/bits/pthreadtypes-arch.h + /usr/include/bits/struct_mutex.h + /usr/include/bits/struct_rwlock.h + /usr/include/bits/setjmp.h + /usr/include/bits/types/__sigset_t.h + /usr/include/bits/types/struct___jmp_buf_tag.h + /usr/include/c++/11/x86_64-redhat-linux/bits/atomic_word.h + /usr/include/sys/single_threaded.h + /usr/include/c++/11/ext/alloc_traits.h + /usr/include/c++/11/bits/alloc_traits.h + /usr/include/c++/11/bits/stl_construct.h + /usr/include/c++/11/ext/string_conversions.h + /usr/include/c++/11/cstdlib + /usr/include/stdlib.h + /usr/include/bits/waitflags.h + /usr/include/bits/waitstatus.h + /usr/include/sys/types.h + /usr/include/endian.h + /usr/include/bits/byteswap.h + /usr/include/bits/uintn-identity.h + /usr/include/sys/select.h + /usr/include/bits/select.h + /usr/include/bits/types/sigset_t.h + /usr/include/alloca.h + /usr/include/bits/stdlib-bsearch.h + /usr/include/bits/stdlib-float.h + /usr/include/c++/11/bits/std_abs.h + /usr/include/c++/11/cstdio + /usr/include/stdio.h + /usr/include/bits/types/__fpos_t.h + /usr/include/bits/types/__fpos64_t.h + /usr/include/bits/types/struct_FILE.h + /usr/include/bits/types/cookie_io_functions_t.h + /usr/include/bits/stdio_lim.h + /usr/include/bits/stdio.h + /usr/include/c++/11/cerrno + /usr/include/errno.h + /usr/include/bits/errno.h + /usr/include/linux/errno.h + /usr/include/asm/errno.h + /usr/include/asm-generic/errno.h + /usr/include/asm-generic/errno-base.h + /usr/include/bits/types/error_t.h + /usr/include/c++/11/bits/charconv.h + /usr/include/c++/11/bits/functional_hash.h + /usr/include/c++/11/bits/hash_bytes.h + /usr/include/c++/11/bits/basic_string.tcc + /usr/include/c++/11/map + /usr/include/c++/11/bits/stl_tree.h + /usr/include/c++/11/ext/aligned_buffer.h + /usr/include/c++/11/bits/stl_map.h + /usr/include/c++/11/tuple + /usr/include/c++/11/utility + /usr/include/c++/11/bits/stl_relops.h + /usr/include/c++/11/array + /usr/include/c++/11/bits/uses_allocator.h + /usr/include/c++/11/bits/invoke.h + /usr/include/c++/11/bits/stl_multimap.h + /usr/include/c++/11/bits/erase_if.h + /usr/include/c++/11/functional + /usr/include/c++/11/bits/refwrap.h + /usr/include/c++/11/bits/std_function.h + /usr/include/c++/11/typeinfo + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/JsonRpc/message.h + /usr/include/c++/11/atomic + /usr/include/c++/11/bits/atomic_base.h + /usr/include/c++/11/bits/atomic_lockfree_defines.h + /usr/include/c++/11/iostream + /usr/include/c++/11/ostream + /usr/include/c++/11/ios + /usr/include/c++/11/exception + /usr/include/c++/11/bits/exception_ptr.h + /usr/include/c++/11/bits/cxxabi_init_exception.h + /usr/include/c++/11/bits/nested_exception.h + /usr/include/c++/11/bits/ios_base.h + /usr/include/c++/11/bits/locale_classes.h + /usr/include/c++/11/bits/locale_classes.tcc + /usr/include/c++/11/system_error + /usr/include/c++/11/x86_64-redhat-linux/bits/error_constants.h + /usr/include/c++/11/stdexcept + /usr/include/c++/11/streambuf + /usr/include/c++/11/bits/streambuf.tcc + /usr/include/c++/11/bits/basic_ios.h + /usr/include/c++/11/bits/locale_facets.h + /usr/include/c++/11/cwctype + /usr/include/wctype.h + /usr/include/bits/wctype-wchar.h + /usr/include/c++/11/x86_64-redhat-linux/bits/ctype_base.h + /usr/include/c++/11/bits/streambuf_iterator.h + /usr/include/c++/11/x86_64-redhat-linux/bits/ctype_inline.h + /usr/include/c++/11/bits/locale_facets.tcc + /usr/include/c++/11/bits/basic_ios.tcc + /usr/include/c++/11/bits/ostream.tcc + /usr/include/c++/11/istream + /usr/include/c++/11/bits/istream.tcc + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/JsonRpc/serializer.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/JsonRpc/macro_map.h + /usr/include/boost/optional.hpp + /usr/include/boost/optional/optional.hpp + /usr/include/boost/assert.hpp + /usr/include/assert.h + /usr/include/boost/core/addressof.hpp + /usr/include/boost/config.hpp + /usr/include/boost/config/user.hpp + /usr/include/boost/config/detail/select_compiler_config.hpp + /usr/include/boost/config/compiler/gcc.hpp + /usr/include/c++/11/cstddef + /usr/include/boost/config/detail/select_stdlib_config.hpp + /usr/include/c++/11/version + /usr/include/boost/config/stdlib/libstdcpp3.hpp + /usr/include/unistd.h + /usr/include/bits/posix_opt.h + /usr/include/bits/environments.h + /usr/include/bits/confname.h + /usr/include/bits/getopt_posix.h + /usr/include/bits/getopt_core.h + /usr/include/bits/unistd_ext.h + /usr/include/boost/config/detail/select_platform_config.hpp + /usr/include/boost/config/platform/linux.hpp + /usr/include/boost/config/detail/posix_features.hpp + /usr/include/boost/config/detail/suffix.hpp + /usr/include/boost/config/helper_macros.hpp + /usr/include/boost/core/enable_if.hpp + /usr/include/boost/core/explicit_operator_bool.hpp + /usr/include/boost/config/workaround.hpp + /usr/include/boost/core/swap.hpp + /usr/include/boost/optional/bad_optional_access.hpp + /usr/include/boost/static_assert.hpp + /usr/include/boost/detail/workaround.hpp + /usr/include/boost/throw_exception.hpp + /usr/include/boost/assert/source_location.hpp + /usr/include/boost/current_function.hpp + /usr/include/boost/cstdint.hpp + /usr/include/boost/exception/exception.hpp + /usr/include/boost/type.hpp + /usr/include/boost/type_traits/alignment_of.hpp + /usr/include/boost/type_traits/intrinsics.hpp + /usr/include/boost/type_traits/detail/config.hpp + /usr/include/boost/version.hpp + /usr/include/boost/type_traits/integral_constant.hpp + /usr/include/boost/type_traits/conditional.hpp + /usr/include/boost/type_traits/has_nothrow_constructor.hpp + /usr/include/boost/type_traits/is_default_constructible.hpp + /usr/include/boost/type_traits/is_complete.hpp + /usr/include/boost/type_traits/declval.hpp + /usr/include/boost/type_traits/add_rvalue_reference.hpp + /usr/include/boost/type_traits/is_void.hpp + /usr/include/boost/type_traits/is_reference.hpp + /usr/include/boost/type_traits/is_lvalue_reference.hpp + /usr/include/boost/type_traits/is_rvalue_reference.hpp + /usr/include/boost/type_traits/remove_reference.hpp + /usr/include/boost/type_traits/is_function.hpp + /usr/include/boost/type_traits/detail/is_function_cxx_11.hpp + /usr/include/boost/type_traits/detail/yes_no_type.hpp + /usr/include/boost/type_traits/type_with_alignment.hpp + /usr/include/boost/type_traits/is_pod.hpp + /usr/include/boost/type_traits/is_scalar.hpp + /usr/include/boost/type_traits/is_arithmetic.hpp + /usr/include/boost/type_traits/is_integral.hpp + /usr/include/boost/type_traits/is_floating_point.hpp + /usr/include/boost/type_traits/is_enum.hpp + /usr/include/boost/type_traits/is_pointer.hpp + /usr/include/boost/type_traits/is_member_pointer.hpp + /usr/include/boost/type_traits/is_member_function_pointer.hpp + /usr/include/boost/type_traits/detail/is_member_function_pointer_cxx_11.hpp + /usr/include/boost/type_traits/remove_const.hpp + /usr/include/boost/type_traits/decay.hpp + /usr/include/boost/type_traits/is_array.hpp + /usr/include/boost/type_traits/remove_bounds.hpp + /usr/include/boost/type_traits/remove_extent.hpp + /usr/include/boost/type_traits/add_pointer.hpp + /usr/include/boost/type_traits/remove_cv.hpp + /usr/include/boost/type_traits/is_base_of.hpp + /usr/include/boost/type_traits/is_base_and_derived.hpp + /usr/include/boost/type_traits/is_same.hpp + /usr/include/boost/type_traits/is_class.hpp + /usr/include/boost/type_traits/is_const.hpp + /usr/include/boost/type_traits/is_constructible.hpp + /usr/include/boost/type_traits/is_destructible.hpp + /usr/include/boost/type_traits/is_nothrow_move_assignable.hpp + /usr/include/boost/type_traits/has_trivial_move_assign.hpp + /usr/include/boost/type_traits/is_assignable.hpp + /usr/include/boost/type_traits/is_volatile.hpp + /usr/include/boost/type_traits/has_nothrow_assign.hpp + /usr/include/boost/type_traits/enable_if.hpp + /usr/include/boost/type_traits/is_nothrow_move_constructible.hpp + /usr/include/boost/move/utility.hpp + /usr/include/boost/move/detail/config_begin.hpp + /usr/include/boost/move/detail/workaround.hpp + /usr/include/boost/move/utility_core.hpp + /usr/include/boost/move/core.hpp + /usr/include/boost/move/detail/config_end.hpp + /usr/include/boost/move/detail/meta_utils.hpp + /usr/include/boost/move/detail/meta_utils_core.hpp + /usr/include/boost/move/traits.hpp + /usr/include/boost/move/detail/type_traits.hpp + /usr/include/boost/none.hpp + /usr/include/boost/none_t.hpp + /usr/include/boost/utility/compare_pointees.hpp + /usr/include/boost/utility/result_of.hpp + /usr/include/boost/preprocessor/cat.hpp + /usr/include/boost/preprocessor/config/config.hpp + /usr/include/boost/preprocessor/iteration/iterate.hpp + /usr/include/boost/preprocessor/arithmetic/dec.hpp + /usr/include/boost/preprocessor/config/limits.hpp + /usr/include/boost/preprocessor/arithmetic/limits/dec_256.hpp + /usr/include/boost/preprocessor/arithmetic/inc.hpp + /usr/include/boost/preprocessor/arithmetic/limits/inc_256.hpp + /usr/include/boost/preprocessor/array/elem.hpp + /usr/include/boost/preprocessor/array/data.hpp + /usr/include/boost/preprocessor/tuple/elem.hpp + /usr/include/boost/preprocessor/facilities/expand.hpp + /usr/include/boost/preprocessor/facilities/overload.hpp + /usr/include/boost/preprocessor/variadic/size.hpp + /usr/include/boost/preprocessor/control/iif.hpp + /usr/include/boost/preprocessor/facilities/check_empty.hpp + /usr/include/boost/preprocessor/variadic/has_opt.hpp + /usr/include/boost/preprocessor/variadic/limits/size_64.hpp + /usr/include/boost/preprocessor/tuple/rem.hpp + /usr/include/boost/preprocessor/tuple/detail/is_single_return.hpp + /usr/include/boost/preprocessor/variadic/elem.hpp + /usr/include/boost/preprocessor/variadic/limits/elem_64.hpp + /usr/include/boost/preprocessor/array/size.hpp + /usr/include/boost/preprocessor/slot/slot.hpp + /usr/include/boost/preprocessor/slot/detail/def.hpp + /usr/include/boost/preprocessor/repetition/enum_params.hpp + /usr/include/boost/preprocessor/punctuation/comma_if.hpp + /usr/include/boost/preprocessor/control/if.hpp + /usr/include/boost/preprocessor/logical/bool.hpp + /usr/include/boost/preprocessor/logical/limits/bool_256.hpp + /usr/include/boost/preprocessor/facilities/empty.hpp + /usr/include/boost/preprocessor/punctuation/comma.hpp + /usr/include/boost/preprocessor/repetition/repeat.hpp + /usr/include/boost/preprocessor/debug/error.hpp + /usr/include/boost/preprocessor/detail/auto_rec.hpp + /usr/include/boost/preprocessor/detail/limits/auto_rec_256.hpp + /usr/include/boost/preprocessor/tuple/eat.hpp + /usr/include/boost/preprocessor/repetition/limits/repeat_256.hpp + /usr/include/boost/preprocessor/repetition/enum_trailing_params.hpp + /usr/include/boost/preprocessor/repetition/enum_binary_params.hpp + /usr/include/boost/preprocessor/repetition/enum_shifted_params.hpp + /usr/include/boost/preprocessor/facilities/intercept.hpp + /usr/include/boost/preprocessor/facilities/limits/intercept_256.hpp + /usr/include/boost/type_traits/type_identity.hpp + /usr/include/boost/preprocessor/iteration/detail/iter/forward1.hpp + /usr/include/boost/preprocessor/iteration/detail/bounds/lower1.hpp + /usr/include/boost/preprocessor/slot/detail/shared.hpp + /usr/include/boost/preprocessor/iteration/detail/bounds/upper1.hpp + /usr/include/boost/preprocessor/iteration/detail/iter/limits/forward1_256.hpp + /usr/include/boost/utility/detail/result_of_iterate.hpp + /usr/include/boost/optional/optional_fwd.hpp + /usr/include/boost/optional/detail/optional_config.hpp + /usr/include/boost/optional/detail/optional_factory_support.hpp + /usr/include/boost/optional/detail/optional_aligned_storage.hpp + /usr/include/boost/optional/detail/optional_trivially_copyable_base.hpp + /usr/include/boost/optional/detail/optional_reference_spec.hpp + /usr/include/boost/optional/detail/optional_relops.hpp + /usr/include/boost/optional/detail/optional_swap.hpp + /usr/include/c++/11/cassert + /usr/include/c++/11/memory + /usr/include/c++/11/bits/stl_uninitialized.h + /usr/include/c++/11/bits/stl_tempbuf.h + /usr/include/c++/11/bits/stl_raw_storage_iter.h + /usr/include/c++/11/bits/align.h + /usr/include/c++/11/bit + /usr/include/c++/11/bits/unique_ptr.h + /usr/include/c++/11/bits/shared_ptr.h + /usr/include/c++/11/bits/shared_ptr_base.h + /usr/include/c++/11/bits/allocated_ptr.h + /usr/include/c++/11/ext/concurrence.h + /usr/include/c++/11/bits/shared_ptr_atomic.h + /usr/include/c++/11/backward/auto_ptr.h + /usr/include/c++/11/vector + /usr/include/c++/11/bits/stl_vector.h + /usr/include/c++/11/bits/stl_bvector.h + /usr/include/c++/11/bits/vector.tcc + /usr/include/c++/11/algorithm + /usr/include/c++/11/bits/stl_algo.h + /usr/include/c++/11/bits/algorithmfwd.h + /usr/include/c++/11/bits/stl_heap.h + /usr/include/c++/11/bits/uniform_int_dist.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/method_type.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/document.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/reader.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/allocators.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/rapidjson.h + /usr/include/c++/11/cstring + /usr/include/string.h + /usr/include/strings.h + /usr/include/inttypes.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/internal/meta.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/rapidjson.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/stream.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/encodings.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/encodedstream.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/memorystream.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/internal/clzll.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/internal/stack.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/allocators.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/internal/swap.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/internal/strtod.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/internal/ieee754.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/internal/biginteger.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/internal/diyfp.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/internal/clzll.h + /usr/include/c++/11/limits + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/internal/pow10.h + /usr/include/c++/11/climits + /usr/lib/gcc/x86_64-redhat-linux/11/include/limits.h + /usr/lib/gcc/x86_64-redhat-linux/11/include/syslimits.h + /usr/include/limits.h + /usr/include/bits/posix1_lim.h + /usr/include/bits/local_lim.h + /usr/include/linux/limits.h + /usr/include/bits/posix2_lim.h + /usr/include/bits/xopen_lim.h + /usr/include/bits/uio_lim.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/error/error.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/rapidjson.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/internal/strfunc.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/stream.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/rapidjson.h + /usr/include/c++/11/iterator + /usr/include/c++/11/bits/stream_iterator.h + +CMakeFiles/lspcpp.dir/src/jsonrpc/RemoteEndPoint.cpp.o + /usr/local/src/asymptote-2.78/LspCpp/src/jsonrpc/RemoteEndPoint.cpp + /usr/include/stdc-predef.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/JsonRpc/MessageJsonHandler.h + /usr/include/c++/11/string + /usr/include/c++/11/x86_64-redhat-linux/bits/c++config.h + /usr/include/bits/wordsize.h + /usr/include/c++/11/x86_64-redhat-linux/bits/os_defines.h + /usr/include/features.h + /usr/include/sys/cdefs.h + /usr/include/bits/long-double.h + /usr/include/gnu/stubs.h + /usr/include/gnu/stubs-64.h + /usr/include/c++/11/x86_64-redhat-linux/bits/cpu_defines.h + /usr/include/c++/11/bits/stringfwd.h + /usr/include/c++/11/bits/memoryfwd.h + /usr/include/c++/11/bits/char_traits.h + /usr/include/c++/11/bits/stl_algobase.h + /usr/include/c++/11/bits/functexcept.h + /usr/include/c++/11/bits/exception_defines.h + /usr/include/c++/11/bits/cpp_type_traits.h + /usr/include/c++/11/ext/type_traits.h + /usr/include/c++/11/ext/numeric_traits.h + /usr/include/c++/11/bits/stl_pair.h + /usr/include/c++/11/bits/move.h + /usr/include/c++/11/type_traits + /usr/include/c++/11/bits/stl_iterator_base_types.h + /usr/include/c++/11/bits/stl_iterator_base_funcs.h + /usr/include/c++/11/bits/concept_check.h + /usr/include/c++/11/debug/assertions.h + /usr/include/c++/11/bits/stl_iterator.h + /usr/include/c++/11/bits/ptr_traits.h + /usr/include/c++/11/debug/debug.h + /usr/include/c++/11/bits/predefined_ops.h + /usr/include/c++/11/bits/postypes.h + /usr/include/c++/11/cwchar + /usr/include/wchar.h + /usr/include/bits/libc-header-start.h + /usr/include/bits/floatn.h + /usr/include/bits/floatn-common.h + /usr/lib/gcc/x86_64-redhat-linux/11/include/stddef.h + /usr/lib/gcc/x86_64-redhat-linux/11/include/stdarg.h + /usr/include/bits/wchar.h + /usr/include/bits/types/wint_t.h + /usr/include/bits/types/mbstate_t.h + /usr/include/bits/types/__mbstate_t.h + /usr/include/bits/types/__FILE.h + /usr/include/bits/types/FILE.h + /usr/include/bits/types/locale_t.h + /usr/include/bits/types/__locale_t.h + /usr/include/c++/11/cstdint + /usr/lib/gcc/x86_64-redhat-linux/11/include/stdint.h + /usr/include/stdint.h + /usr/include/bits/types.h + /usr/include/bits/timesize.h + /usr/include/bits/typesizes.h + /usr/include/bits/time64.h + /usr/include/bits/stdint-intn.h + /usr/include/bits/stdint-uintn.h + /usr/include/c++/11/bits/allocator.h + /usr/include/c++/11/x86_64-redhat-linux/bits/c++allocator.h + /usr/include/c++/11/ext/new_allocator.h + /usr/include/c++/11/new + /usr/include/c++/11/bits/exception.h + /usr/include/c++/11/bits/localefwd.h + /usr/include/c++/11/x86_64-redhat-linux/bits/c++locale.h + /usr/include/c++/11/clocale + /usr/include/locale.h + /usr/include/bits/locale.h + /usr/include/c++/11/iosfwd + /usr/include/c++/11/cctype + /usr/include/ctype.h + /usr/include/bits/endian.h + /usr/include/bits/endianness.h + /usr/include/c++/11/bits/ostream_insert.h + /usr/include/c++/11/bits/cxxabi_forced.h + /usr/include/c++/11/bits/stl_function.h + /usr/include/c++/11/backward/binders.h + /usr/include/c++/11/bits/range_access.h + /usr/include/c++/11/initializer_list + /usr/include/c++/11/bits/basic_string.h + /usr/include/c++/11/ext/atomicity.h + /usr/include/c++/11/x86_64-redhat-linux/bits/gthr.h + /usr/include/c++/11/x86_64-redhat-linux/bits/gthr-default.h + /usr/include/pthread.h + /usr/include/sched.h + /usr/include/bits/types/time_t.h + /usr/include/bits/types/struct_timespec.h + /usr/include/bits/sched.h + /usr/include/bits/types/struct_sched_param.h + /usr/include/bits/cpu-set.h + /usr/include/time.h + /usr/include/bits/time.h + /usr/include/bits/timex.h + /usr/include/bits/types/struct_timeval.h + /usr/include/bits/types/clock_t.h + /usr/include/bits/types/struct_tm.h + /usr/include/bits/types/clockid_t.h + /usr/include/bits/types/timer_t.h + /usr/include/bits/types/struct_itimerspec.h + /usr/include/bits/pthreadtypes.h + /usr/include/bits/thread-shared-types.h + /usr/include/bits/pthreadtypes-arch.h + /usr/include/bits/struct_mutex.h + /usr/include/bits/struct_rwlock.h + /usr/include/bits/setjmp.h + /usr/include/bits/types/__sigset_t.h + /usr/include/bits/types/struct___jmp_buf_tag.h + /usr/include/c++/11/x86_64-redhat-linux/bits/atomic_word.h + /usr/include/sys/single_threaded.h + /usr/include/c++/11/ext/alloc_traits.h + /usr/include/c++/11/bits/alloc_traits.h + /usr/include/c++/11/bits/stl_construct.h + /usr/include/c++/11/ext/string_conversions.h + /usr/include/c++/11/cstdlib + /usr/include/stdlib.h + /usr/include/bits/waitflags.h + /usr/include/bits/waitstatus.h + /usr/include/sys/types.h + /usr/include/endian.h + /usr/include/bits/byteswap.h + /usr/include/bits/uintn-identity.h + /usr/include/sys/select.h + /usr/include/bits/select.h + /usr/include/bits/types/sigset_t.h + /usr/include/alloca.h + /usr/include/bits/stdlib-bsearch.h + /usr/include/bits/stdlib-float.h + /usr/include/c++/11/bits/std_abs.h + /usr/include/c++/11/cstdio + /usr/include/stdio.h + /usr/include/bits/types/__fpos_t.h + /usr/include/bits/types/__fpos64_t.h + /usr/include/bits/types/struct_FILE.h + /usr/include/bits/types/cookie_io_functions_t.h + /usr/include/bits/stdio_lim.h + /usr/include/bits/stdio.h + /usr/include/c++/11/cerrno + /usr/include/errno.h + /usr/include/bits/errno.h + /usr/include/linux/errno.h + /usr/include/asm/errno.h + /usr/include/asm-generic/errno.h + /usr/include/asm-generic/errno-base.h + /usr/include/bits/types/error_t.h + /usr/include/c++/11/bits/charconv.h + /usr/include/c++/11/bits/functional_hash.h + /usr/include/c++/11/bits/hash_bytes.h + /usr/include/c++/11/bits/basic_string.tcc + /usr/include/c++/11/map + /usr/include/c++/11/bits/stl_tree.h + /usr/include/c++/11/ext/aligned_buffer.h + /usr/include/c++/11/bits/stl_map.h + /usr/include/c++/11/tuple + /usr/include/c++/11/utility + /usr/include/c++/11/bits/stl_relops.h + /usr/include/c++/11/array + /usr/include/c++/11/bits/uses_allocator.h + /usr/include/c++/11/bits/invoke.h + /usr/include/c++/11/bits/stl_multimap.h + /usr/include/c++/11/bits/erase_if.h + /usr/include/c++/11/functional + /usr/include/c++/11/bits/refwrap.h + /usr/include/c++/11/bits/std_function.h + /usr/include/c++/11/typeinfo + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/JsonRpc/message.h + /usr/include/c++/11/atomic + /usr/include/c++/11/bits/atomic_base.h + /usr/include/c++/11/bits/atomic_lockfree_defines.h + /usr/include/c++/11/iostream + /usr/include/c++/11/ostream + /usr/include/c++/11/ios + /usr/include/c++/11/exception + /usr/include/c++/11/bits/exception_ptr.h + /usr/include/c++/11/bits/cxxabi_init_exception.h + /usr/include/c++/11/bits/nested_exception.h + /usr/include/c++/11/bits/ios_base.h + /usr/include/c++/11/bits/locale_classes.h + /usr/include/c++/11/bits/locale_classes.tcc + /usr/include/c++/11/system_error + /usr/include/c++/11/x86_64-redhat-linux/bits/error_constants.h + /usr/include/c++/11/stdexcept + /usr/include/c++/11/streambuf + /usr/include/c++/11/bits/streambuf.tcc + /usr/include/c++/11/bits/basic_ios.h + /usr/include/c++/11/bits/locale_facets.h + /usr/include/c++/11/cwctype + /usr/include/wctype.h + /usr/include/bits/wctype-wchar.h + /usr/include/c++/11/x86_64-redhat-linux/bits/ctype_base.h + /usr/include/c++/11/bits/streambuf_iterator.h + /usr/include/c++/11/x86_64-redhat-linux/bits/ctype_inline.h + /usr/include/c++/11/bits/locale_facets.tcc + /usr/include/c++/11/bits/basic_ios.tcc + /usr/include/c++/11/bits/ostream.tcc + /usr/include/c++/11/istream + /usr/include/c++/11/bits/istream.tcc + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/JsonRpc/serializer.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/JsonRpc/macro_map.h + /usr/include/boost/optional.hpp + /usr/include/boost/optional/optional.hpp + /usr/include/boost/assert.hpp + /usr/include/assert.h + /usr/include/boost/core/addressof.hpp + /usr/include/boost/config.hpp + /usr/include/boost/config/user.hpp + /usr/include/boost/config/detail/select_compiler_config.hpp + /usr/include/boost/config/compiler/gcc.hpp + /usr/include/c++/11/cstddef + /usr/include/boost/config/detail/select_stdlib_config.hpp + /usr/include/c++/11/version + /usr/include/boost/config/stdlib/libstdcpp3.hpp + /usr/include/unistd.h + /usr/include/bits/posix_opt.h + /usr/include/bits/environments.h + /usr/include/bits/confname.h + /usr/include/bits/getopt_posix.h + /usr/include/bits/getopt_core.h + /usr/include/bits/unistd_ext.h + /usr/include/boost/config/detail/select_platform_config.hpp + /usr/include/boost/config/platform/linux.hpp + /usr/include/boost/config/detail/posix_features.hpp + /usr/include/boost/config/detail/suffix.hpp + /usr/include/boost/config/helper_macros.hpp + /usr/include/boost/core/enable_if.hpp + /usr/include/boost/core/explicit_operator_bool.hpp + /usr/include/boost/config/workaround.hpp + /usr/include/boost/core/swap.hpp + /usr/include/boost/optional/bad_optional_access.hpp + /usr/include/boost/static_assert.hpp + /usr/include/boost/detail/workaround.hpp + /usr/include/boost/throw_exception.hpp + /usr/include/boost/assert/source_location.hpp + /usr/include/boost/current_function.hpp + /usr/include/boost/cstdint.hpp + /usr/include/boost/exception/exception.hpp + /usr/include/boost/type.hpp + /usr/include/boost/type_traits/alignment_of.hpp + /usr/include/boost/type_traits/intrinsics.hpp + /usr/include/boost/type_traits/detail/config.hpp + /usr/include/boost/version.hpp + /usr/include/boost/type_traits/integral_constant.hpp + /usr/include/boost/type_traits/conditional.hpp + /usr/include/boost/type_traits/has_nothrow_constructor.hpp + /usr/include/boost/type_traits/is_default_constructible.hpp + /usr/include/boost/type_traits/is_complete.hpp + /usr/include/boost/type_traits/declval.hpp + /usr/include/boost/type_traits/add_rvalue_reference.hpp + /usr/include/boost/type_traits/is_void.hpp + /usr/include/boost/type_traits/is_reference.hpp + /usr/include/boost/type_traits/is_lvalue_reference.hpp + /usr/include/boost/type_traits/is_rvalue_reference.hpp + /usr/include/boost/type_traits/remove_reference.hpp + /usr/include/boost/type_traits/is_function.hpp + /usr/include/boost/type_traits/detail/is_function_cxx_11.hpp + /usr/include/boost/type_traits/detail/yes_no_type.hpp + /usr/include/boost/type_traits/type_with_alignment.hpp + /usr/include/boost/type_traits/is_pod.hpp + /usr/include/boost/type_traits/is_scalar.hpp + /usr/include/boost/type_traits/is_arithmetic.hpp + /usr/include/boost/type_traits/is_integral.hpp + /usr/include/boost/type_traits/is_floating_point.hpp + /usr/include/boost/type_traits/is_enum.hpp + /usr/include/boost/type_traits/is_pointer.hpp + /usr/include/boost/type_traits/is_member_pointer.hpp + /usr/include/boost/type_traits/is_member_function_pointer.hpp + /usr/include/boost/type_traits/detail/is_member_function_pointer_cxx_11.hpp + /usr/include/boost/type_traits/remove_const.hpp + /usr/include/boost/type_traits/decay.hpp + /usr/include/boost/type_traits/is_array.hpp + /usr/include/boost/type_traits/remove_bounds.hpp + /usr/include/boost/type_traits/remove_extent.hpp + /usr/include/boost/type_traits/add_pointer.hpp + /usr/include/boost/type_traits/remove_cv.hpp + /usr/include/boost/type_traits/is_base_of.hpp + /usr/include/boost/type_traits/is_base_and_derived.hpp + /usr/include/boost/type_traits/is_same.hpp + /usr/include/boost/type_traits/is_class.hpp + /usr/include/boost/type_traits/is_const.hpp + /usr/include/boost/type_traits/is_constructible.hpp + /usr/include/boost/type_traits/is_destructible.hpp + /usr/include/boost/type_traits/is_nothrow_move_assignable.hpp + /usr/include/boost/type_traits/has_trivial_move_assign.hpp + /usr/include/boost/type_traits/is_assignable.hpp + /usr/include/boost/type_traits/is_volatile.hpp + /usr/include/boost/type_traits/has_nothrow_assign.hpp + /usr/include/boost/type_traits/enable_if.hpp + /usr/include/boost/type_traits/is_nothrow_move_constructible.hpp + /usr/include/boost/move/utility.hpp + /usr/include/boost/move/detail/config_begin.hpp + /usr/include/boost/move/detail/workaround.hpp + /usr/include/boost/move/utility_core.hpp + /usr/include/boost/move/core.hpp + /usr/include/boost/move/detail/config_end.hpp + /usr/include/boost/move/detail/meta_utils.hpp + /usr/include/boost/move/detail/meta_utils_core.hpp + /usr/include/boost/move/traits.hpp + /usr/include/boost/move/detail/type_traits.hpp + /usr/include/boost/none.hpp + /usr/include/boost/none_t.hpp + /usr/include/boost/utility/compare_pointees.hpp + /usr/include/boost/utility/result_of.hpp + /usr/include/boost/preprocessor/cat.hpp + /usr/include/boost/preprocessor/config/config.hpp + /usr/include/boost/preprocessor/iteration/iterate.hpp + /usr/include/boost/preprocessor/arithmetic/dec.hpp + /usr/include/boost/preprocessor/config/limits.hpp + /usr/include/boost/preprocessor/arithmetic/limits/dec_256.hpp + /usr/include/boost/preprocessor/arithmetic/inc.hpp + /usr/include/boost/preprocessor/arithmetic/limits/inc_256.hpp + /usr/include/boost/preprocessor/array/elem.hpp + /usr/include/boost/preprocessor/array/data.hpp + /usr/include/boost/preprocessor/tuple/elem.hpp + /usr/include/boost/preprocessor/facilities/expand.hpp + /usr/include/boost/preprocessor/facilities/overload.hpp + /usr/include/boost/preprocessor/variadic/size.hpp + /usr/include/boost/preprocessor/control/iif.hpp + /usr/include/boost/preprocessor/facilities/check_empty.hpp + /usr/include/boost/preprocessor/variadic/has_opt.hpp + /usr/include/boost/preprocessor/variadic/limits/size_64.hpp + /usr/include/boost/preprocessor/tuple/rem.hpp + /usr/include/boost/preprocessor/tuple/detail/is_single_return.hpp + /usr/include/boost/preprocessor/variadic/elem.hpp + /usr/include/boost/preprocessor/variadic/limits/elem_64.hpp + /usr/include/boost/preprocessor/array/size.hpp + /usr/include/boost/preprocessor/slot/slot.hpp + /usr/include/boost/preprocessor/slot/detail/def.hpp + /usr/include/boost/preprocessor/repetition/enum_params.hpp + /usr/include/boost/preprocessor/punctuation/comma_if.hpp + /usr/include/boost/preprocessor/control/if.hpp + /usr/include/boost/preprocessor/logical/bool.hpp + /usr/include/boost/preprocessor/logical/limits/bool_256.hpp + /usr/include/boost/preprocessor/facilities/empty.hpp + /usr/include/boost/preprocessor/punctuation/comma.hpp + /usr/include/boost/preprocessor/repetition/repeat.hpp + /usr/include/boost/preprocessor/debug/error.hpp + /usr/include/boost/preprocessor/detail/auto_rec.hpp + /usr/include/boost/preprocessor/detail/limits/auto_rec_256.hpp + /usr/include/boost/preprocessor/tuple/eat.hpp + /usr/include/boost/preprocessor/repetition/limits/repeat_256.hpp + /usr/include/boost/preprocessor/repetition/enum_trailing_params.hpp + /usr/include/boost/preprocessor/repetition/enum_binary_params.hpp + /usr/include/boost/preprocessor/repetition/enum_shifted_params.hpp + /usr/include/boost/preprocessor/facilities/intercept.hpp + /usr/include/boost/preprocessor/facilities/limits/intercept_256.hpp + /usr/include/boost/type_traits/type_identity.hpp + /usr/include/boost/preprocessor/iteration/detail/iter/forward1.hpp + /usr/include/boost/preprocessor/iteration/detail/bounds/lower1.hpp + /usr/include/boost/preprocessor/slot/detail/shared.hpp + /usr/include/boost/preprocessor/iteration/detail/bounds/upper1.hpp + /usr/include/boost/preprocessor/iteration/detail/iter/limits/forward1_256.hpp + /usr/include/boost/utility/detail/result_of_iterate.hpp + /usr/include/boost/optional/optional_fwd.hpp + /usr/include/boost/optional/detail/optional_config.hpp + /usr/include/boost/optional/detail/optional_factory_support.hpp + /usr/include/boost/optional/detail/optional_aligned_storage.hpp + /usr/include/boost/optional/detail/optional_trivially_copyable_base.hpp + /usr/include/boost/optional/detail/optional_reference_spec.hpp + /usr/include/boost/optional/detail/optional_relops.hpp + /usr/include/boost/optional/detail/optional_swap.hpp + /usr/include/c++/11/cassert + /usr/include/c++/11/memory + /usr/include/c++/11/bits/stl_uninitialized.h + /usr/include/c++/11/bits/stl_tempbuf.h + /usr/include/c++/11/bits/stl_raw_storage_iter.h + /usr/include/c++/11/bits/align.h + /usr/include/c++/11/bit + /usr/include/c++/11/bits/unique_ptr.h + /usr/include/c++/11/bits/shared_ptr.h + /usr/include/c++/11/bits/shared_ptr_base.h + /usr/include/c++/11/bits/allocated_ptr.h + /usr/include/c++/11/ext/concurrence.h + /usr/include/c++/11/bits/shared_ptr_atomic.h + /usr/include/c++/11/backward/auto_ptr.h + /usr/include/c++/11/vector + /usr/include/c++/11/bits/stl_vector.h + /usr/include/c++/11/bits/stl_bvector.h + /usr/include/c++/11/bits/vector.tcc + /usr/include/c++/11/algorithm + /usr/include/c++/11/bits/stl_algo.h + /usr/include/c++/11/bits/algorithmfwd.h + /usr/include/c++/11/bits/stl_heap.h + /usr/include/c++/11/bits/uniform_int_dist.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/method_type.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/JsonRpc/Endpoint.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/JsonRpc/MessageIssue.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/JsonRpc/RemoteEndPoint.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/lsp_diagnostic.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/lsRange.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/lsPosition.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/lsTextEdit.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/lsDocumentUri.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/lsResponseError.h + /usr/include/c++/11/sstream + /usr/include/c++/11/bits/sstream.tcc + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/lsAny.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/location_type.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/JsonRpc/RequestInMessage.h + /usr/include/c++/11/mutex + /usr/include/c++/11/chrono + /usr/include/c++/11/ratio + /usr/include/c++/11/limits + /usr/include/c++/11/ctime + /usr/include/c++/11/bits/parse_numbers.h + /usr/include/c++/11/bits/std_mutex.h + /usr/include/c++/11/bits/unique_lock.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/JsonRpc/lsRequestId.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/JsonRpc/lsResponseMessage.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/JsonRpc/Cancellation.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/JsonRpc/NotificationInMessage.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/JsonRpc/traits.h + /usr/include/c++/11/future + /usr/include/c++/11/condition_variable + /usr/include/c++/11/bits/atomic_futex.h + /usr/include/c++/11/bits/std_thread.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/JsonRpc/threaded_queue.h + /usr/include/c++/11/deque + /usr/include/c++/11/bits/stl_deque.h + /usr/include/c++/11/bits/deque.tcc + /usr/include/c++/11/unordered_map + /usr/include/c++/11/bits/hashtable.h + /usr/include/c++/11/bits/hashtable_policy.h + /usr/include/c++/11/bits/unordered_map.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/JsonRpc/StreamMessageProducer.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/JsonRpc/MessageProducer.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/JsonRpc/Condition.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/JsonRpc/Context.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/error/en.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/error/error.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/rapidjson.h + /usr/include/c++/11/cstring + /usr/include/string.h + /usr/include/strings.h + /usr/include/inttypes.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/JsonRpc/json.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/document.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/reader.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/allocators.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/rapidjson.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/internal/meta.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/rapidjson.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/stream.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/encodings.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/encodedstream.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/memorystream.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/internal/clzll.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/internal/stack.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/allocators.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/internal/swap.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/internal/strtod.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/internal/ieee754.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/internal/biginteger.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/internal/diyfp.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/internal/clzll.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/internal/pow10.h + /usr/include/c++/11/climits + /usr/lib/gcc/x86_64-redhat-linux/11/include/limits.h + /usr/lib/gcc/x86_64-redhat-linux/11/include/syslimits.h + /usr/include/limits.h + /usr/include/bits/posix1_lim.h + /usr/include/bits/local_lim.h + /usr/include/linux/limits.h + /usr/include/bits/posix2_lim.h + /usr/include/bits/xopen_lim.h + /usr/include/bits/uio_lim.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/error/error.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/internal/strfunc.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/stream.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/rapidjson.h + /usr/include/c++/11/iterator + /usr/include/c++/11/bits/stream_iterator.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/prettywriter.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/writer.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/internal/dtoa.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/internal/itoa.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/internal/itoa.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/stringbuffer.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/JsonRpc/GCThreadContext.h + ../gc-8.2.0/include/gc.h + ../gc-8.2.0/include/gc_version.h + ../gc-8.2.0/include/gc_config_macros.h + ../gc-8.2.0/include/gc_pthread_redirects.h + /usr/include/dlfcn.h + /usr/include/bits/dlfcn.h + /usr/include/signal.h + /usr/include/bits/signum-generic.h + /usr/include/bits/signum-arch.h + /usr/include/bits/types/sig_atomic_t.h + /usr/include/bits/types/siginfo_t.h + /usr/include/bits/types/__sigval_t.h + /usr/include/bits/siginfo-arch.h + /usr/include/bits/siginfo-consts.h + /usr/include/bits/siginfo-consts-arch.h + /usr/include/bits/types/sigval_t.h + /usr/include/bits/types/sigevent_t.h + /usr/include/bits/sigevent-consts.h + /usr/include/bits/sigaction.h + /usr/include/bits/sigcontext.h + /usr/include/bits/types/stack_t.h + /usr/include/sys/ucontext.h + /usr/include/bits/sigstack.h + /usr/include/bits/ss_flags.h + /usr/include/bits/types/struct_sigstack.h + /usr/include/bits/sigthread.h + /usr/include/bits/signal_ext.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/JsonRpc/ScopeExit.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/JsonRpc/stream.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/threadpool/boost/threadpool.hpp + /usr/local/src/asymptote-2.78/LspCpp/third_party/threadpool/boost/threadpool/future.hpp + /usr/local/src/asymptote-2.78/LspCpp/third_party/threadpool/boost/threadpool/detail/future.hpp + /usr/local/src/asymptote-2.78/LspCpp/third_party/threadpool/boost/threadpool/detail/locking_ptr.hpp + /usr/include/boost/utility.hpp + /usr/include/boost/utility/base_from_member.hpp + /usr/include/boost/preprocessor/repetition/repeat_from_to.hpp + /usr/include/boost/preprocessor/arithmetic/add.hpp + /usr/include/boost/preprocessor/control/while.hpp + /usr/include/boost/preprocessor/list/fold_left.hpp + /usr/include/boost/preprocessor/list/detail/fold_left.hpp + /usr/include/boost/preprocessor/control/expr_iif.hpp + /usr/include/boost/preprocessor/list/adt.hpp + /usr/include/boost/preprocessor/detail/is_binary.hpp + /usr/include/boost/preprocessor/detail/check.hpp + /usr/include/boost/preprocessor/logical/compl.hpp + /usr/include/boost/preprocessor/list/detail/limits/fold_left_256.hpp + /usr/include/boost/preprocessor/list/limits/fold_left_256.hpp + /usr/include/boost/preprocessor/list/fold_right.hpp + /usr/include/boost/preprocessor/list/detail/fold_right.hpp + /usr/include/boost/preprocessor/list/reverse.hpp + /usr/include/boost/preprocessor/facilities/identity.hpp + /usr/include/boost/preprocessor/list/detail/limits/fold_right_256.hpp + /usr/include/boost/preprocessor/logical/bitand.hpp + /usr/include/boost/preprocessor/control/detail/while.hpp + /usr/include/boost/preprocessor/control/detail/limits/while_256.hpp + /usr/include/boost/preprocessor/control/limits/while_256.hpp + /usr/include/boost/preprocessor/logical/bitor.hpp + /usr/include/boost/preprocessor/arithmetic/detail/is_maximum_number.hpp + /usr/include/boost/preprocessor/comparison/equal.hpp + /usr/include/boost/preprocessor/comparison/not_equal.hpp + /usr/include/boost/preprocessor/comparison/limits/not_equal_256.hpp + /usr/include/boost/preprocessor/arithmetic/detail/maximum_number.hpp + /usr/include/boost/preprocessor/arithmetic/detail/is_minimum_number.hpp + /usr/include/boost/preprocessor/logical/not.hpp + /usr/include/boost/preprocessor/arithmetic/sub.hpp + /usr/include/boost/preprocessor/logical/and.hpp + /usr/include/boost/utility/enable_if.hpp + /usr/include/boost/utility/binary.hpp + /usr/include/boost/preprocessor/control/deduce_d.hpp + /usr/include/boost/preprocessor/seq/cat.hpp + /usr/include/boost/preprocessor/seq/fold_left.hpp + /usr/include/boost/preprocessor/seq/seq.hpp + /usr/include/boost/preprocessor/seq/elem.hpp + /usr/include/boost/preprocessor/seq/limits/elem_256.hpp + /usr/include/boost/preprocessor/seq/size.hpp + /usr/include/boost/preprocessor/seq/limits/size_256.hpp + /usr/include/boost/preprocessor/seq/limits/fold_left_256.hpp + /usr/include/boost/preprocessor/seq/transform.hpp + /usr/include/boost/preprocessor/arithmetic/mod.hpp + /usr/include/boost/preprocessor/arithmetic/detail/div_base.hpp + /usr/include/boost/preprocessor/comparison/less_equal.hpp + /usr/include/boost/preprocessor/arithmetic/detail/is_1_number.hpp + /usr/include/boost/utility/identity_type.hpp + /usr/include/boost/type_traits/function_traits.hpp + /usr/include/boost/core/checked_delete.hpp + /usr/include/boost/core/noncopyable.hpp + /usr/include/boost/thread/mutex.hpp + /usr/include/boost/thread/detail/platform.hpp + /usr/include/boost/config/requires_threads.hpp + /usr/include/boost/thread/pthread/mutex.hpp + /usr/include/boost/thread/detail/config.hpp + /usr/include/boost/thread/detail/thread_safety.hpp + /usr/include/boost/config/auto_link.hpp + /usr/include/boost/core/ignore_unused.hpp + /usr/include/boost/thread/exceptions.hpp + /usr/include/boost/system/system_error.hpp + /usr/include/boost/system/error_code.hpp + /usr/include/boost/system/detail/error_code.hpp + /usr/include/boost/system/detail/error_category.hpp + /usr/include/boost/system/detail/config.hpp + /usr/include/boost/system/detail/error_condition.hpp + /usr/include/boost/system/detail/generic_category.hpp + /usr/include/boost/system/detail/generic_category_message.hpp + /usr/include/boost/system/detail/enable_if.hpp + /usr/include/boost/system/is_error_condition_enum.hpp + /usr/include/boost/system/detail/system_category.hpp + /usr/include/boost/system/is_error_code_enum.hpp + /usr/include/boost/system/error_category.hpp + /usr/include/boost/system/detail/error_category_impl.hpp + /usr/include/boost/system/detail/to_std_category.hpp + /usr/include/boost/system/error_condition.hpp + /usr/include/boost/system/errc.hpp + /usr/include/boost/system/detail/errc.hpp + /usr/include/boost/system/detail/cerrno.hpp + /usr/include/boost/system/generic_category.hpp + /usr/include/boost/system/system_category.hpp + /usr/include/boost/system/detail/system_category_impl.hpp + /usr/include/boost/system/api_config.hpp + /usr/include/boost/system/detail/is_generic_value.hpp + /usr/include/boost/system/detail/throws.hpp + /usr/include/boost/config/abi_prefix.hpp + /usr/include/boost/config/abi_suffix.hpp + /usr/include/boost/thread/lock_types.hpp + /usr/include/boost/thread/detail/move.hpp + /usr/include/boost/type_traits/is_convertible.hpp + /usr/include/boost/type_traits/is_abstract.hpp + /usr/include/boost/type_traits/add_lvalue_reference.hpp + /usr/include/boost/type_traits/add_reference.hpp + /usr/include/boost/thread/detail/delete.hpp + /usr/include/boost/thread/lock_options.hpp + /usr/include/boost/thread/lockable_traits.hpp + /usr/include/boost/thread/thread_time.hpp + /usr/include/boost/date_time/time_clock.hpp + /usr/include/boost/date_time/c_time.hpp + /usr/include/boost/date_time/compiler_config.hpp + /usr/include/boost/date_time/locale_config.hpp + /usr/include/sys/time.h + /usr/include/boost/shared_ptr.hpp + /usr/include/boost/smart_ptr/shared_ptr.hpp + /usr/include/boost/smart_ptr/detail/shared_count.hpp + /usr/include/boost/smart_ptr/bad_weak_ptr.hpp + /usr/include/boost/smart_ptr/detail/sp_counted_base.hpp + /usr/include/boost/smart_ptr/detail/sp_has_gcc_intrinsics.hpp + /usr/include/boost/smart_ptr/detail/sp_has_sync_intrinsics.hpp + /usr/include/boost/smart_ptr/detail/sp_counted_base_gcc_atomic.hpp + /usr/include/boost/smart_ptr/detail/sp_typeinfo_.hpp + /usr/include/boost/smart_ptr/detail/sp_counted_impl.hpp + /usr/include/boost/smart_ptr/detail/sp_noexcept.hpp + /usr/include/boost/checked_delete.hpp + /usr/include/boost/smart_ptr/detail/sp_disable_deprecated.hpp + /usr/include/boost/smart_ptr/detail/sp_convertible.hpp + /usr/include/boost/smart_ptr/detail/sp_nullptr_t.hpp + /usr/include/boost/smart_ptr/detail/spinlock_pool.hpp + /usr/include/boost/smart_ptr/detail/spinlock.hpp + /usr/include/boost/smart_ptr/detail/spinlock_gcc_atomic.hpp + /usr/include/boost/smart_ptr/detail/yield_k.hpp + /usr/include/boost/smart_ptr/detail/sp_thread_pause.hpp + /usr/include/boost/smart_ptr/detail/sp_thread_sleep.hpp + /usr/include/boost/config/pragma_message.hpp + /usr/include/boost/smart_ptr/detail/operator_bool.hpp + /usr/include/boost/smart_ptr/detail/local_sp_deleter.hpp + /usr/include/boost/smart_ptr/detail/local_counted_base.hpp + /usr/include/boost/date_time/microsec_time_clock.hpp + /usr/include/boost/date_time/posix_time/posix_time_types.hpp + /usr/include/boost/date_time/posix_time/ptime.hpp + /usr/include/boost/date_time/posix_time/posix_time_system.hpp + /usr/include/boost/date_time/posix_time/posix_time_config.hpp + /usr/include/boost/limits.hpp + /usr/include/boost/config/no_tr1/cmath.hpp + /usr/include/c++/11/cmath + /usr/include/math.h + /usr/include/bits/math-vector.h + /usr/include/bits/libm-simd-decl-stubs.h + /usr/include/bits/flt-eval-method.h + /usr/include/bits/fp-logb.h + /usr/include/bits/fp-fast.h + /usr/include/bits/mathcalls-helper-functions.h + /usr/include/bits/mathcalls.h + /usr/include/bits/mathcalls-narrow.h + /usr/include/bits/iscanonical.h + /usr/include/boost/date_time/time_duration.hpp + /usr/include/boost/date_time/special_defs.hpp + /usr/include/boost/date_time/time_defs.hpp + /usr/include/boost/operators.hpp + /usr/include/boost/date_time/time_resolution_traits.hpp + /usr/include/boost/date_time/int_adapter.hpp + /usr/include/boost/date_time/gregorian/gregorian_types.hpp + /usr/include/boost/date_time/date.hpp + /usr/include/boost/date_time/year_month_day.hpp + /usr/include/boost/date_time/period.hpp + /usr/include/boost/date_time/gregorian/greg_calendar.hpp + /usr/include/boost/date_time/gregorian/greg_weekday.hpp + /usr/include/boost/date_time/constrained_value.hpp + /usr/include/boost/date_time/date_defs.hpp + /usr/include/boost/date_time/gregorian/greg_day_of_year.hpp + /usr/include/boost/date_time/gregorian_calendar.hpp + /usr/include/boost/date_time/gregorian_calendar.ipp + /usr/include/boost/date_time/gregorian/greg_ymd.hpp + /usr/include/boost/date_time/gregorian/greg_day.hpp + /usr/include/boost/date_time/gregorian/greg_year.hpp + /usr/include/boost/date_time/gregorian/greg_month.hpp + /usr/include/boost/date_time/gregorian/greg_duration.hpp + /usr/include/boost/date_time/date_duration.hpp + /usr/include/boost/date_time/date_duration_types.hpp + /usr/include/boost/date_time/gregorian/greg_duration_types.hpp + /usr/include/boost/date_time/gregorian/greg_date.hpp + /usr/include/boost/date_time/adjust_functors.hpp + /usr/include/boost/date_time/wrapping_int.hpp + /usr/include/boost/date_time/date_generators.hpp + /usr/include/boost/date_time/date_clock_device.hpp + /usr/include/boost/date_time/date_iterator.hpp + /usr/include/boost/date_time/time_system_split.hpp + /usr/include/boost/date_time/time_system_counted.hpp + /usr/include/boost/date_time/time.hpp + /usr/include/boost/date_time/posix_time/date_duration_operators.hpp + /usr/include/boost/date_time/posix_time/posix_time_duration.hpp + /usr/include/boost/numeric/conversion/cast.hpp + /usr/include/boost/numeric/conversion/converter.hpp + /usr/include/boost/numeric/conversion/conversion_traits.hpp + /usr/include/boost/numeric/conversion/detail/conversion_traits.hpp + /usr/include/boost/numeric/conversion/detail/meta.hpp + /usr/include/boost/mpl/if.hpp + /usr/include/boost/mpl/aux_/value_wknd.hpp + /usr/include/boost/mpl/aux_/static_cast.hpp + /usr/include/boost/mpl/aux_/config/workaround.hpp + /usr/include/boost/mpl/aux_/config/integral.hpp + /usr/include/boost/mpl/aux_/config/msvc.hpp + /usr/include/boost/mpl/aux_/config/eti.hpp + /usr/include/boost/mpl/aux_/na_spec.hpp + /usr/include/boost/mpl/lambda_fwd.hpp + /usr/include/boost/mpl/void_fwd.hpp + /usr/include/boost/mpl/aux_/adl_barrier.hpp + /usr/include/boost/mpl/aux_/config/adl.hpp + /usr/include/boost/mpl/aux_/config/intel.hpp + /usr/include/boost/mpl/aux_/config/gcc.hpp + /usr/include/boost/mpl/aux_/na.hpp + /usr/include/boost/mpl/bool.hpp + /usr/include/boost/mpl/bool_fwd.hpp + /usr/include/boost/mpl/integral_c_tag.hpp + /usr/include/boost/mpl/aux_/config/static_constant.hpp + /usr/include/boost/mpl/aux_/na_fwd.hpp + /usr/include/boost/mpl/aux_/config/ctps.hpp + /usr/include/boost/mpl/aux_/config/lambda.hpp + /usr/include/boost/mpl/aux_/config/ttp.hpp + /usr/include/boost/mpl/int.hpp + /usr/include/boost/mpl/int_fwd.hpp + /usr/include/boost/mpl/aux_/nttp_decl.hpp + /usr/include/boost/mpl/aux_/config/nttp.hpp + /usr/include/boost/mpl/aux_/integral_wrapper.hpp + /usr/include/boost/mpl/aux_/lambda_arity_param.hpp + /usr/include/boost/mpl/aux_/template_arity_fwd.hpp + /usr/include/boost/mpl/aux_/arity.hpp + /usr/include/boost/mpl/aux_/config/dtp.hpp + /usr/include/boost/mpl/aux_/preprocessor/params.hpp + /usr/include/boost/mpl/aux_/config/preprocessor.hpp + /usr/include/boost/preprocessor/comma_if.hpp + /usr/include/boost/preprocessor/repeat.hpp + /usr/include/boost/preprocessor/inc.hpp + /usr/include/boost/mpl/aux_/preprocessor/enum.hpp + /usr/include/boost/mpl/aux_/preprocessor/def_params_tail.hpp + /usr/include/boost/mpl/limits/arity.hpp + /usr/include/boost/preprocessor/identity.hpp + /usr/include/boost/preprocessor/empty.hpp + /usr/include/boost/mpl/aux_/config/overload_resolution.hpp + /usr/include/boost/mpl/aux_/lambda_support.hpp + /usr/include/boost/mpl/eval_if.hpp + /usr/include/boost/mpl/equal_to.hpp + /usr/include/boost/mpl/aux_/comparison_op.hpp + /usr/include/boost/mpl/aux_/numeric_op.hpp + /usr/include/boost/mpl/numeric_cast.hpp + /usr/include/boost/mpl/apply_wrap.hpp + /usr/include/boost/mpl/aux_/has_apply.hpp + /usr/include/boost/mpl/has_xxx.hpp + /usr/include/boost/mpl/aux_/type_wrapper.hpp + /usr/include/boost/mpl/aux_/yes_no.hpp + /usr/include/boost/mpl/aux_/config/arrays.hpp + /usr/include/boost/mpl/aux_/config/has_xxx.hpp + /usr/include/boost/mpl/aux_/config/msvc_typename.hpp + /usr/include/boost/mpl/aux_/config/has_apply.hpp + /usr/include/boost/mpl/aux_/msvc_never_true.hpp + /usr/include/boost/mpl/aux_/config/use_preprocessed.hpp + /usr/include/boost/mpl/aux_/include_preprocessed.hpp + /usr/include/boost/mpl/aux_/config/compiler.hpp + /usr/include/boost/preprocessor/stringize.hpp + /usr/include/boost/mpl/aux_/preprocessed/gcc/apply_wrap.hpp + /usr/include/boost/mpl/tag.hpp + /usr/include/boost/mpl/void.hpp + /usr/include/boost/mpl/aux_/has_tag.hpp + /usr/include/boost/mpl/aux_/numeric_cast_utils.hpp + /usr/include/boost/mpl/aux_/config/forwarding.hpp + /usr/include/boost/mpl/aux_/msvc_eti_base.hpp + /usr/include/boost/mpl/aux_/is_msvc_eti_arg.hpp + /usr/include/boost/mpl/aux_/preprocessed/gcc/equal_to.hpp + /usr/include/boost/mpl/not.hpp + /usr/include/boost/mpl/aux_/nested_type_wknd.hpp + /usr/include/boost/mpl/and.hpp + /usr/include/boost/mpl/aux_/preprocessed/gcc/and.hpp + /usr/include/boost/mpl/identity.hpp + /usr/include/boost/numeric/conversion/detail/int_float_mixture.hpp + /usr/include/boost/numeric/conversion/int_float_mixture_enum.hpp + /usr/include/boost/mpl/integral_c.hpp + /usr/include/boost/mpl/integral_c_fwd.hpp + /usr/include/boost/numeric/conversion/detail/sign_mixture.hpp + /usr/include/boost/numeric/conversion/sign_mixture_enum.hpp + /usr/include/boost/numeric/conversion/detail/udt_builtin_mixture.hpp + /usr/include/boost/numeric/conversion/udt_builtin_mixture_enum.hpp + /usr/include/boost/numeric/conversion/detail/is_subranged.hpp + /usr/include/boost/mpl/multiplies.hpp + /usr/include/boost/mpl/times.hpp + /usr/include/boost/mpl/aux_/arithmetic_op.hpp + /usr/include/boost/mpl/aux_/largest_int.hpp + /usr/include/boost/mpl/aux_/preprocessed/gcc/times.hpp + /usr/include/boost/mpl/aux_/preprocessor/default_params.hpp + /usr/include/boost/mpl/less.hpp + /usr/include/boost/mpl/aux_/preprocessed/gcc/less.hpp + /usr/include/boost/numeric/conversion/converter_policies.hpp + /usr/include/boost/numeric/conversion/detail/converter.hpp + /usr/include/boost/numeric/conversion/bounds.hpp + /usr/include/boost/numeric/conversion/detail/bounds.hpp + /usr/include/boost/numeric/conversion/numeric_cast_traits.hpp + /usr/include/boost/numeric/conversion/detail/numeric_cast_traits.hpp + /usr/include/boost/numeric/conversion/detail/preprocessed/numeric_cast_traits_common.hpp + /usr/include/boost/numeric/conversion/detail/preprocessed/numeric_cast_traits_long_long.hpp + /usr/include/boost/date_time/posix_time/time_period.hpp + /usr/include/boost/date_time/time_iterator.hpp + /usr/include/boost/date_time/dst_rules.hpp + /usr/include/boost/chrono/time_point.hpp + /usr/include/boost/chrono/duration.hpp + /usr/include/boost/chrono/config.hpp + /usr/include/boost/predef.h + /usr/include/boost/predef/language.h + /usr/include/boost/predef/language/stdc.h + /usr/include/boost/predef/version_number.h + /usr/include/boost/predef/make.h + /usr/include/boost/predef/detail/test.h + /usr/include/boost/predef/language/stdcpp.h + /usr/include/boost/predef/language/objc.h + /usr/include/boost/predef/language/cuda.h + /usr/include/boost/predef/architecture.h + /usr/include/boost/predef/architecture/alpha.h + /usr/include/boost/predef/architecture/arm.h + /usr/include/boost/predef/architecture/blackfin.h + /usr/include/boost/predef/architecture/convex.h + /usr/include/boost/predef/architecture/ia64.h + /usr/include/boost/predef/architecture/m68k.h + /usr/include/boost/predef/architecture/mips.h + /usr/include/boost/predef/architecture/parisc.h + /usr/include/boost/predef/architecture/ppc.h + /usr/include/boost/predef/architecture/ptx.h + /usr/include/boost/predef/architecture/pyramid.h + /usr/include/boost/predef/architecture/riscv.h + /usr/include/boost/predef/architecture/rs6k.h + /usr/include/boost/predef/architecture/sparc.h + /usr/include/boost/predef/architecture/superh.h + /usr/include/boost/predef/architecture/sys370.h + /usr/include/boost/predef/architecture/sys390.h + /usr/include/boost/predef/architecture/x86.h + /usr/include/boost/predef/architecture/x86/32.h + /usr/include/boost/predef/architecture/x86/64.h + /usr/include/boost/predef/architecture/z.h + /usr/include/boost/predef/compiler.h + /usr/include/boost/predef/compiler/borland.h + /usr/include/boost/predef/compiler/clang.h + /usr/include/boost/predef/compiler/comeau.h + /usr/include/boost/predef/compiler/compaq.h + /usr/include/boost/predef/compiler/diab.h + /usr/include/boost/predef/compiler/digitalmars.h + /usr/include/boost/predef/compiler/dignus.h + /usr/include/boost/predef/compiler/edg.h + /usr/include/boost/predef/compiler/ekopath.h + /usr/include/boost/predef/compiler/gcc_xml.h + /usr/include/boost/predef/compiler/gcc.h + /usr/include/boost/predef/detail/comp_detected.h + /usr/include/boost/predef/compiler/greenhills.h + /usr/include/boost/predef/compiler/hp_acc.h + /usr/include/boost/predef/compiler/iar.h + /usr/include/boost/predef/compiler/ibm.h + /usr/include/boost/predef/compiler/intel.h + /usr/include/boost/predef/compiler/kai.h + /usr/include/boost/predef/compiler/llvm.h + /usr/include/boost/predef/compiler/metaware.h + /usr/include/boost/predef/compiler/metrowerks.h + /usr/include/boost/predef/compiler/microtec.h + /usr/include/boost/predef/compiler/mpw.h + /usr/include/boost/predef/compiler/nvcc.h + /usr/include/boost/predef/compiler/palm.h + /usr/include/boost/predef/compiler/pgi.h + /usr/include/boost/predef/compiler/sgi_mipspro.h + /usr/include/boost/predef/compiler/sunpro.h + /usr/include/boost/predef/compiler/tendra.h + /usr/include/boost/predef/compiler/visualc.h + /usr/include/boost/predef/compiler/watcom.h + /usr/include/boost/predef/library.h + /usr/include/boost/predef/library/c.h + /usr/include/boost/predef/library/c/_prefix.h + /usr/include/boost/predef/detail/_cassert.h + /usr/include/boost/predef/library/c/cloudabi.h + /usr/include/boost/predef/library/c/gnu.h + /usr/include/boost/predef/library/c/uc.h + /usr/include/boost/predef/library/c/vms.h + /usr/include/boost/predef/library/c/zos.h + /usr/include/boost/predef/library/std.h + /usr/include/boost/predef/library/std/_prefix.h + /usr/include/boost/predef/detail/_exception.h + /usr/include/boost/predef/library/std/cxx.h + /usr/include/boost/predef/library/std/dinkumware.h + /usr/include/boost/predef/library/std/libcomo.h + /usr/include/boost/predef/library/std/modena.h + /usr/include/boost/predef/library/std/msl.h + /usr/include/boost/predef/library/std/roguewave.h + /usr/include/boost/predef/library/std/sgi.h + /usr/include/boost/predef/library/std/stdcpp3.h + /usr/include/boost/predef/library/std/stlport.h + /usr/include/boost/predef/library/std/vacpp.h + /usr/include/boost/predef/os.h + /usr/include/boost/predef/os/aix.h + /usr/include/boost/predef/os/amigaos.h + /usr/include/boost/predef/os/beos.h + /usr/include/boost/predef/os/bsd.h + /usr/include/boost/predef/os/macos.h + /usr/include/boost/predef/os/ios.h + /usr/include/boost/predef/os/bsd/bsdi.h + /usr/include/boost/predef/os/bsd/dragonfly.h + /usr/include/boost/predef/os/bsd/free.h + /usr/include/boost/predef/os/bsd/open.h + /usr/include/boost/predef/os/bsd/net.h + /usr/include/boost/predef/os/cygwin.h + /usr/include/boost/predef/os/haiku.h + /usr/include/boost/predef/os/hpux.h + /usr/include/boost/predef/os/irix.h + /usr/include/boost/predef/os/linux.h + /usr/include/boost/predef/detail/os_detected.h + /usr/include/boost/predef/os/os400.h + /usr/include/boost/predef/os/qnxnto.h + /usr/include/boost/predef/os/solaris.h + /usr/include/boost/predef/os/unix.h + /usr/include/boost/predef/os/vms.h + /usr/include/boost/predef/os/windows.h + /usr/include/boost/predef/other.h + /usr/include/boost/predef/other/endian.h + /usr/include/boost/predef/platform/android.h + /usr/include/boost/predef/platform.h + /usr/include/boost/predef/platform/cloudabi.h + /usr/include/boost/predef/platform/mingw.h + /usr/include/boost/predef/platform/mingw32.h + /usr/include/boost/predef/platform/mingw64.h + /usr/include/boost/predef/platform/windows_uwp.h + /usr/include/boost/predef/platform/windows_desktop.h + /usr/include/boost/predef/platform/windows_phone.h + /usr/include/boost/predef/platform/windows_server.h + /usr/include/boost/predef/platform/windows_store.h + /usr/include/boost/predef/platform/windows_system.h + /usr/include/boost/predef/platform/windows_runtime.h + /usr/include/boost/predef/platform/ios.h + /usr/include/boost/predef/hardware.h + /usr/include/boost/predef/hardware/simd.h + /usr/include/boost/predef/hardware/simd/x86.h + /usr/include/boost/predef/hardware/simd/x86/versions.h + /usr/include/boost/predef/hardware/simd/x86_amd.h + /usr/include/boost/predef/hardware/simd/x86_amd/versions.h + /usr/include/boost/predef/hardware/simd/arm.h + /usr/include/boost/predef/hardware/simd/arm/versions.h + /usr/include/boost/predef/hardware/simd/ppc.h + /usr/include/boost/predef/hardware/simd/ppc/versions.h + /usr/include/boost/predef/version.h + /usr/include/boost/chrono/detail/static_assert.hpp + /usr/include/boost/mpl/logical.hpp + /usr/include/boost/mpl/or.hpp + /usr/include/boost/mpl/aux_/preprocessed/gcc/or.hpp + /usr/include/boost/ratio/ratio.hpp + /usr/include/boost/ratio/config.hpp + /usr/include/boost/ratio/detail/mpl/abs.hpp + /usr/include/boost/ratio/detail/mpl/sign.hpp + /usr/include/boost/ratio/detail/mpl/gcd.hpp + /usr/include/boost/mpl/aux_/config/dependent_nttp.hpp + /usr/include/boost/ratio/detail/mpl/lcm.hpp + /usr/include/boost/integer_traits.hpp + /usr/include/boost/ratio/ratio_fwd.hpp + /usr/include/boost/ratio/detail/overflow_helpers.hpp + /usr/include/boost/type_traits/common_type.hpp + /usr/include/boost/type_traits/detail/mp_defer.hpp + /usr/include/boost/type_traits/is_unsigned.hpp + /usr/include/boost/chrono/detail/is_evenly_divisible_by.hpp + /usr/include/boost/thread/xtime.hpp + /usr/include/boost/date_time/posix_time/conversion.hpp + /usr/include/boost/date_time/filetime_functions.hpp + /usr/include/boost/date_time/gregorian/conversion.hpp + /usr/include/boost/thread/detail/platform_time.hpp + /usr/include/boost/chrono/system_clocks.hpp + /usr/include/boost/chrono/detail/system.hpp + /usr/include/boost/chrono/clock_string.hpp + /usr/include/boost/chrono/ceil.hpp + /usr/include/boost/thread/pthread/pthread_mutex_scoped_lock.hpp + /usr/include/boost/thread/pthread/pthread_helpers.hpp + /usr/include/boost/smart_ptr.hpp + /usr/include/boost/scoped_ptr.hpp + /usr/include/boost/smart_ptr/scoped_ptr.hpp + /usr/include/boost/scoped_array.hpp + /usr/include/boost/smart_ptr/scoped_array.hpp + /usr/include/boost/shared_array.hpp + /usr/include/boost/smart_ptr/shared_array.hpp + /usr/include/boost/weak_ptr.hpp + /usr/include/boost/smart_ptr/weak_ptr.hpp + /usr/include/boost/intrusive_ptr.hpp + /usr/include/boost/smart_ptr/intrusive_ptr.hpp + /usr/include/boost/config/no_tr1/functional.hpp + /usr/include/boost/enable_shared_from_this.hpp + /usr/include/boost/smart_ptr/enable_shared_from_this.hpp + /usr/include/boost/make_shared.hpp + /usr/include/boost/smart_ptr/make_shared.hpp + /usr/include/boost/smart_ptr/make_shared_object.hpp + /usr/include/boost/smart_ptr/detail/sp_forward.hpp + /usr/include/boost/smart_ptr/make_shared_array.hpp + /usr/include/boost/core/default_allocator.hpp + /usr/include/boost/smart_ptr/allocate_shared_array.hpp + /usr/include/boost/core/allocator_access.hpp + /usr/include/boost/core/pointer_traits.hpp + /usr/include/boost/core/alloc_construct.hpp + /usr/include/boost/core/noinit_adaptor.hpp + /usr/include/boost/core/first_scalar.hpp + /usr/include/boost/type_traits/extent.hpp + /usr/include/boost/type_traits/is_bounded_array.hpp + /usr/include/boost/type_traits/is_unbounded_array.hpp + /usr/include/boost/thread/condition.hpp + /usr/include/boost/thread/condition_variable.hpp + /usr/include/boost/thread/pthread/condition_variable.hpp + /usr/include/boost/thread/interruption.hpp + /usr/include/boost/thread/pthread/thread_data.hpp + /usr/include/boost/thread/lock_guard.hpp + /usr/include/boost/thread/detail/lockable_wrapper.hpp + /usr/include/boost/thread/pthread/condition_variable_fwd.hpp + /usr/include/boost/thread/cv_status.hpp + /usr/include/boost/core/scoped_enum.hpp + /usr/include/boost/type_traits.hpp + /usr/include/boost/type_traits/add_const.hpp + /usr/include/boost/type_traits/add_cv.hpp + /usr/include/boost/type_traits/add_volatile.hpp + /usr/include/boost/type_traits/aligned_storage.hpp + /usr/include/boost/type_traits/conjunction.hpp + /usr/include/boost/type_traits/copy_cv.hpp + /usr/include/boost/type_traits/copy_cv_ref.hpp + /usr/include/boost/type_traits/copy_reference.hpp + /usr/include/boost/type_traits/disjunction.hpp + /usr/include/boost/type_traits/floating_point_promotion.hpp + /usr/include/boost/type_traits/has_bit_and.hpp + /usr/include/boost/type_traits/detail/has_binary_operator.hpp + /usr/include/boost/type_traits/make_void.hpp + /usr/include/boost/type_traits/has_bit_and_assign.hpp + /usr/include/boost/type_traits/has_bit_or.hpp + /usr/include/boost/type_traits/has_bit_or_assign.hpp + /usr/include/boost/type_traits/has_bit_xor.hpp + /usr/include/boost/type_traits/has_bit_xor_assign.hpp + /usr/include/boost/type_traits/has_complement.hpp + /usr/include/boost/type_traits/detail/has_prefix_operator.hpp + /usr/include/boost/type_traits/has_dereference.hpp + /usr/include/boost/type_traits/has_divides.hpp + /usr/include/boost/type_traits/has_divides_assign.hpp + /usr/include/boost/type_traits/has_equal_to.hpp + /usr/include/boost/type_traits/has_greater.hpp + /usr/include/boost/type_traits/has_greater_equal.hpp + /usr/include/boost/type_traits/has_left_shift.hpp + /usr/include/boost/type_traits/has_left_shift_assign.hpp + /usr/include/boost/type_traits/has_less.hpp + /usr/include/boost/type_traits/has_less_equal.hpp + /usr/include/boost/type_traits/has_logical_and.hpp + /usr/include/boost/type_traits/has_logical_not.hpp + /usr/include/boost/type_traits/has_logical_or.hpp + /usr/include/boost/type_traits/has_minus.hpp + /usr/include/boost/type_traits/remove_pointer.hpp + /usr/include/boost/type_traits/has_minus_assign.hpp + /usr/include/boost/type_traits/has_modulus.hpp + /usr/include/boost/type_traits/has_modulus_assign.hpp + /usr/include/boost/type_traits/has_multiplies.hpp + /usr/include/boost/type_traits/has_multiplies_assign.hpp + /usr/include/boost/type_traits/has_negate.hpp + /usr/include/boost/type_traits/has_new_operator.hpp + /usr/include/boost/type_traits/has_not_equal_to.hpp + /usr/include/boost/type_traits/has_nothrow_copy.hpp + /usr/include/boost/type_traits/is_copy_constructible.hpp + /usr/include/boost/type_traits/has_nothrow_destructor.hpp + /usr/include/boost/type_traits/has_trivial_destructor.hpp + /usr/include/boost/type_traits/has_plus.hpp + /usr/include/boost/type_traits/has_plus_assign.hpp + /usr/include/boost/type_traits/has_post_decrement.hpp + /usr/include/boost/type_traits/detail/has_postfix_operator.hpp + /usr/include/boost/type_traits/has_post_increment.hpp + /usr/include/boost/type_traits/has_pre_decrement.hpp + /usr/include/boost/type_traits/has_pre_increment.hpp + /usr/include/boost/type_traits/has_right_shift.hpp + /usr/include/boost/type_traits/has_right_shift_assign.hpp + /usr/include/boost/type_traits/has_trivial_assign.hpp + /usr/include/boost/type_traits/has_trivial_constructor.hpp + /usr/include/boost/type_traits/has_trivial_copy.hpp + /usr/include/boost/type_traits/has_trivial_move_constructor.hpp + /usr/include/boost/type_traits/has_unary_minus.hpp + /usr/include/boost/type_traits/has_unary_plus.hpp + /usr/include/boost/type_traits/has_virtual_destructor.hpp + /usr/include/boost/type_traits/is_complex.hpp + /usr/include/c++/11/complex + /usr/include/boost/type_traits/is_compound.hpp + /usr/include/boost/type_traits/is_fundamental.hpp + /usr/include/boost/type_traits/is_copy_assignable.hpp + /usr/include/boost/type_traits/is_noncopyable.hpp + /usr/include/boost/type_traits/is_empty.hpp + /usr/include/boost/type_traits/is_final.hpp + /usr/include/boost/type_traits/is_float.hpp + /usr/include/boost/type_traits/is_list_constructible.hpp + /usr/include/boost/type_traits/is_member_object_pointer.hpp + /usr/include/boost/type_traits/is_nothrow_swappable.hpp + /usr/include/boost/type_traits/is_object.hpp + /usr/include/boost/type_traits/is_polymorphic.hpp + /usr/include/boost/type_traits/is_scoped_enum.hpp + /usr/include/boost/type_traits/negation.hpp + /usr/include/boost/type_traits/is_signed.hpp + /usr/include/boost/type_traits/is_stateless.hpp + /usr/include/boost/type_traits/is_trivially_copyable.hpp + /usr/include/boost/type_traits/is_union.hpp + /usr/include/boost/type_traits/is_unscoped_enum.hpp + /usr/include/boost/type_traits/is_virtual_base_of.hpp + /usr/include/boost/type_traits/make_signed.hpp + /usr/include/boost/type_traits/make_unsigned.hpp + /usr/include/boost/type_traits/rank.hpp + /usr/include/boost/type_traits/remove_all_extents.hpp + /usr/include/boost/type_traits/remove_cv_ref.hpp + /usr/include/boost/type_traits/remove_volatile.hpp + /usr/include/boost/type_traits/integral_promotion.hpp + /usr/include/boost/type_traits/promote.hpp + /usr/local/src/asymptote-2.78/LspCpp/third_party/threadpool/boost/threadpool/pool.hpp + /usr/include/boost/ref.hpp + /usr/include/boost/core/ref.hpp + /usr/local/src/asymptote-2.78/LspCpp/third_party/threadpool/boost/threadpool/detail/pool_core.hpp + /usr/local/src/asymptote-2.78/LspCpp/third_party/threadpool/boost/threadpool/detail/worker_thread.hpp + /usr/local/src/asymptote-2.78/LspCpp/third_party/threadpool/boost/threadpool/detail/scope_guard.hpp + /usr/include/boost/function.hpp + /usr/include/boost/preprocessor/iterate.hpp + /usr/include/boost/function/detail/prologue.hpp + /usr/include/boost/function/function_base.hpp + /usr/include/boost/integer.hpp + /usr/include/boost/integer_fwd.hpp + /usr/include/boost/type_index.hpp + /usr/include/boost/type_index/stl_type_index.hpp + /usr/include/boost/type_index/type_index_facade.hpp + /usr/include/boost/container_hash/hash_fwd.hpp + /usr/include/boost/core/demangle.hpp + /usr/include/c++/11/cxxabi.h + /usr/include/c++/11/x86_64-redhat-linux/bits/cxxabi_tweaks.h + /usr/include/boost/type_traits/composite_traits.hpp + /usr/include/boost/function_equal.hpp + /usr/include/boost/function/function_fwd.hpp + /usr/include/boost/mem_fn.hpp + /usr/include/boost/bind/mem_fn.hpp + /usr/include/boost/get_pointer.hpp + /usr/include/boost/config/no_tr1/memory.hpp + /usr/include/boost/bind/mem_fn_template.hpp + /usr/include/boost/bind/mem_fn_cc.hpp + /usr/include/boost/preprocessor/enum.hpp + /usr/include/boost/preprocessor/repetition/enum.hpp + /usr/include/boost/preprocessor/enum_params.hpp + /usr/include/boost/function/detail/function_iterate.hpp + /usr/include/boost/function/detail/maybe_include.hpp + /usr/include/boost/function/function_template.hpp + /usr/include/boost/core/no_exceptions_support.hpp + /usr/include/boost/thread.hpp + /usr/include/boost/thread/thread.hpp + /usr/include/boost/thread/thread_only.hpp + /usr/include/boost/thread/detail/thread.hpp + /usr/include/boost/thread/detail/thread_heap_alloc.hpp + /usr/include/boost/thread/pthread/thread_heap_alloc.hpp + /usr/include/boost/thread/detail/make_tuple_indices.hpp + /usr/include/boost/thread/detail/invoke.hpp + /usr/include/boost/thread/detail/is_convertible.hpp + /usr/include/c++/11/list + /usr/include/c++/11/bits/stl_list.h + /usr/include/c++/11/bits/list.tcc + /usr/include/boost/bind/bind.hpp + /usr/include/boost/is_placeholder.hpp + /usr/include/boost/bind/arg.hpp + /usr/include/boost/bind/detail/result_traits.hpp + /usr/include/boost/visit_each.hpp + /usr/include/boost/core/is_same.hpp + /usr/include/boost/bind/storage.hpp + /usr/include/boost/bind/bind_cc.hpp + /usr/include/boost/bind/bind_mf_cc.hpp + /usr/include/boost/bind/bind_mf2_cc.hpp + /usr/include/boost/bind/placeholders.hpp + /usr/include/c++/11/stdlib.h + /usr/include/boost/io/ios_state.hpp + /usr/include/boost/io_fwd.hpp + /usr/include/c++/11/locale + /usr/include/c++/11/bits/locale_facets_nonio.h + /usr/include/c++/11/x86_64-redhat-linux/bits/time_members.h + /usr/include/c++/11/x86_64-redhat-linux/bits/messages_members.h + /usr/include/libintl.h + /usr/include/c++/11/bits/codecvt.h + /usr/include/c++/11/bits/locale_facets_nonio.tcc + /usr/include/c++/11/bits/locale_conv.h + /usr/include/boost/functional/hash.hpp + /usr/include/boost/container_hash/hash.hpp + /usr/include/boost/container_hash/detail/hash_float.hpp + /usr/include/boost/container_hash/detail/float_functions.hpp + /usr/include/boost/container_hash/detail/limits.hpp + /usr/include/boost/integer/static_log2.hpp + /usr/include/c++/11/typeindex + /usr/include/boost/container_hash/extensions.hpp + /usr/include/boost/detail/container_fwd.hpp + /usr/include/c++/11/set + /usr/include/c++/11/bits/stl_set.h + /usr/include/c++/11/bits/stl_multiset.h + /usr/include/c++/11/bitset + /usr/include/boost/thread/detail/thread_interruption.hpp + /usr/include/boost/thread/detail/thread_group.hpp + /usr/include/boost/thread/csbl/memory/unique_ptr.hpp + /usr/include/boost/thread/csbl/memory/config.hpp + /usr/include/boost/move/unique_ptr.hpp + /usr/include/boost/move/detail/unique_ptr_meta_utils.hpp + /usr/include/boost/move/default_delete.hpp + /usr/include/boost/move/adl_move_swap.hpp + /usr/include/boost/move/make_unique.hpp + /usr/include/boost/thread/shared_mutex.hpp + /usr/include/boost/thread/pthread/shared_mutex.hpp + /usr/include/boost/thread/once.hpp + /usr/include/boost/thread/pthread/once_atomic.hpp + /usr/include/boost/atomic.hpp + /usr/include/boost/memory_order.hpp + /usr/include/boost/atomic/capabilities.hpp + /usr/include/boost/atomic/detail/config.hpp + /usr/include/boost/atomic/detail/capabilities.hpp + /usr/include/boost/atomic/detail/platform.hpp + /usr/include/boost/atomic/detail/futex.hpp + /usr/include/sys/syscall.h + /usr/include/asm/unistd.h + /usr/include/asm/unistd_64.h + /usr/include/bits/syscall.h + /usr/include/linux/futex.h + /usr/include/linux/types.h + /usr/include/asm/types.h + /usr/include/asm-generic/types.h + /usr/include/asm-generic/int-ll64.h + /usr/include/asm/bitsperlong.h + /usr/include/asm-generic/bitsperlong.h + /usr/include/linux/posix_types.h + /usr/include/linux/stddef.h + /usr/include/asm/posix_types.h + /usr/include/asm/posix_types_64.h + /usr/include/asm-generic/posix_types.h + /usr/include/boost/atomic/detail/intptr.hpp + /usr/include/boost/atomic/detail/header.hpp + /usr/include/boost/atomic/detail/footer.hpp + /usr/include/boost/atomic/detail/int_sizes.hpp + /usr/include/boost/atomic/detail/float_sizes.hpp + /usr/lib/gcc/x86_64-redhat-linux/11/include/float.h + /usr/include/boost/atomic/detail/caps_gcc_atomic.hpp + /usr/include/boost/atomic/detail/caps_arch_gcc_x86.hpp + /usr/include/boost/atomic/detail/wait_capabilities.hpp + /usr/include/boost/atomic/detail/wait_caps_futex.hpp + /usr/include/boost/atomic/atomic.hpp + /usr/include/boost/atomic/detail/classify.hpp + /usr/include/boost/atomic/detail/type_traits/is_integral.hpp + /usr/include/boost/atomic/detail/type_traits/is_function.hpp + /usr/include/boost/atomic/detail/type_traits/is_floating_point.hpp + /usr/include/boost/atomic/detail/atomic_impl.hpp + /usr/include/boost/atomic/detail/storage_traits.hpp + /usr/include/boost/atomic/detail/string_ops.hpp + /usr/include/boost/atomic/detail/aligned_variable.hpp + /usr/include/boost/atomic/detail/type_traits/alignment_of.hpp + /usr/include/boost/atomic/detail/bitwise_cast.hpp + /usr/include/boost/atomic/detail/addressof.hpp + /usr/include/boost/atomic/detail/type_traits/integral_constant.hpp + /usr/include/boost/atomic/detail/integral_conversions.hpp + /usr/include/boost/atomic/detail/type_traits/is_signed.hpp + /usr/include/boost/atomic/detail/type_traits/make_signed.hpp + /usr/include/boost/atomic/detail/type_traits/make_unsigned.hpp + /usr/include/boost/atomic/detail/core_operations.hpp + /usr/include/boost/atomic/detail/core_arch_operations.hpp + /usr/include/boost/atomic/detail/core_arch_operations_fwd.hpp + /usr/include/boost/atomic/detail/core_operations_emulated.hpp + /usr/include/boost/atomic/detail/core_operations_emulated_fwd.hpp + /usr/include/boost/atomic/detail/lock_pool.hpp + /usr/include/boost/atomic/detail/link.hpp + /usr/include/boost/atomic/detail/core_arch_ops_gcc_x86.hpp + /usr/include/boost/atomic/detail/core_operations_fwd.hpp + /usr/include/boost/atomic/detail/core_ops_gcc_atomic.hpp + /usr/include/boost/atomic/detail/gcc_atomic_memory_order_utils.hpp + /usr/include/boost/atomic/detail/wait_operations.hpp + /usr/include/boost/atomic/detail/wait_ops_generic.hpp + /usr/include/boost/atomic/detail/pause.hpp + /usr/include/boost/atomic/detail/wait_operations_fwd.hpp + /usr/include/boost/atomic/detail/wait_ops_emulated.hpp + /usr/include/boost/atomic/detail/wait_ops_futex.hpp + /usr/include/boost/atomic/detail/extra_operations.hpp + /usr/include/boost/atomic/detail/extra_ops_generic.hpp + /usr/include/boost/atomic/detail/extra_operations_fwd.hpp + /usr/include/boost/atomic/detail/extra_ops_emulated.hpp + /usr/include/boost/atomic/detail/extra_ops_gcc_x86.hpp + /usr/include/boost/atomic/detail/memory_order_utils.hpp + /usr/include/boost/atomic/detail/type_traits/is_trivially_default_constructible.hpp + /usr/include/boost/atomic/detail/type_traits/conditional.hpp + /usr/include/boost/atomic/detail/bitwise_fp_cast.hpp + /usr/include/boost/atomic/detail/fp_operations.hpp + /usr/include/boost/atomic/detail/fp_ops_generic.hpp + /usr/include/boost/atomic/detail/fp_operations_fwd.hpp + /usr/include/boost/atomic/detail/fp_ops_emulated.hpp + /usr/include/boost/atomic/detail/extra_fp_operations.hpp + /usr/include/boost/atomic/detail/extra_fp_ops_generic.hpp + /usr/include/boost/atomic/detail/extra_fp_operations_fwd.hpp + /usr/include/boost/atomic/detail/type_traits/is_iec559.hpp + /usr/include/boost/atomic/detail/extra_fp_ops_emulated.hpp + /usr/include/boost/atomic/detail/type_traits/is_trivially_copyable.hpp + /usr/include/boost/atomic/atomic_ref.hpp + /usr/include/boost/atomic/detail/atomic_ref_impl.hpp + /usr/include/boost/atomic/atomic_flag.hpp + /usr/include/boost/atomic/detail/atomic_flag_impl.hpp + /usr/include/boost/atomic/ipc_atomic.hpp + /usr/include/boost/atomic/ipc_atomic_ref.hpp + /usr/include/boost/atomic/ipc_atomic_flag.hpp + /usr/include/boost/atomic/fences.hpp + /usr/include/boost/atomic/detail/fence_operations.hpp + /usr/include/boost/atomic/detail/fence_ops_gcc_atomic.hpp + /usr/include/boost/atomic/detail/fence_arch_operations.hpp + /usr/include/boost/atomic/detail/fence_arch_ops_gcc_x86.hpp + /usr/include/boost/thread/recursive_mutex.hpp + /usr/include/boost/thread/pthread/recursive_mutex.hpp + /usr/include/boost/thread/tss.hpp + /usr/include/boost/thread/locks.hpp + /usr/include/boost/thread/lock_algorithms.hpp + /usr/include/boost/thread/shared_lock_guard.hpp + /usr/include/boost/thread/barrier.hpp + /usr/include/boost/thread/detail/nullary_function.hpp + /usr/include/boost/thread/detail/memory.hpp + /usr/include/boost/thread/csbl/memory/pointer_traits.hpp + /usr/include/boost/thread/csbl/memory/allocator_arg.hpp + /usr/include/boost/thread/csbl/memory/allocator_traits.hpp + /usr/include/boost/thread/csbl/memory/scoped_allocator.hpp + /usr/include/boost/thread/csbl/memory/shared_ptr.hpp + /usr/include/boost/thread/future.hpp + /usr/include/boost/thread/detail/invoker.hpp + /usr/include/boost/thread/csbl/tuple.hpp + /usr/include/boost/tuple/tuple.hpp + /usr/include/boost/tuple/detail/tuple_basic.hpp + /usr/include/boost/type_traits/cv_traits.hpp + /usr/include/boost/utility/swap.hpp + /usr/include/boost/thread/detail/variadic_header.hpp + /usr/include/boost/thread/detail/variadic_footer.hpp + /usr/include/boost/thread/exceptional_ptr.hpp + /usr/include/boost/exception_ptr.hpp + /usr/include/boost/exception/detail/exception_ptr.hpp + /usr/include/boost/exception/info.hpp + /usr/include/boost/exception/to_string_stub.hpp + /usr/include/boost/exception/to_string.hpp + /usr/include/boost/exception/detail/is_output_streamable.hpp + /usr/include/boost/exception/detail/object_hex_dump.hpp + /usr/include/boost/exception/detail/type_info.hpp + /usr/include/boost/core/typeinfo.hpp + /usr/include/c++/11/iomanip + /usr/include/c++/11/bits/quoted_string.h + /usr/include/boost/exception/detail/error_info_impl.hpp + /usr/include/boost/exception/detail/shared_ptr.hpp + /usr/include/boost/exception/diagnostic_information.hpp + /usr/include/boost/exception/get_error_info.hpp + /usr/include/boost/exception/current_exception_cast.hpp + /usr/include/boost/exception/detail/clone_current_exception.hpp + /usr/include/boost/thread/futures/future_error.hpp + /usr/include/boost/thread/futures/future_error_code.hpp + /usr/include/boost/thread/futures/future_status.hpp + /usr/include/boost/thread/futures/is_future_type.hpp + /usr/include/boost/thread/futures/launch.hpp + /usr/include/boost/thread/futures/wait_for_all.hpp + /usr/include/boost/thread/futures/wait_for_any.hpp + /usr/include/boost/next_prior.hpp + /usr/include/boost/iterator/advance.hpp + /usr/include/boost/iterator/iterator_categories.hpp + /usr/include/boost/iterator/detail/config_def.hpp + /usr/include/boost/mpl/placeholders.hpp + /usr/include/boost/mpl/arg.hpp + /usr/include/boost/mpl/arg_fwd.hpp + /usr/include/boost/mpl/aux_/na_assert.hpp + /usr/include/boost/mpl/assert.hpp + /usr/include/boost/mpl/aux_/config/gpu.hpp + /usr/include/boost/mpl/aux_/config/pp_counter.hpp + /usr/include/boost/mpl/aux_/arity_spec.hpp + /usr/include/boost/mpl/aux_/arg_typedef.hpp + /usr/include/boost/mpl/aux_/preprocessed/gcc/arg.hpp + /usr/include/boost/mpl/aux_/preprocessed/gcc/placeholders.hpp + /usr/include/boost/iterator/detail/config_undef.hpp + /usr/include/boost/iterator/reverse_iterator.hpp + /usr/include/boost/iterator/iterator_adaptor.hpp + /usr/include/boost/core/use_default.hpp + /usr/include/boost/iterator/iterator_facade.hpp + /usr/include/boost/iterator/interoperable.hpp + /usr/include/boost/iterator/iterator_traits.hpp + /usr/include/boost/iterator/detail/facade_iterator_category.hpp + /usr/include/boost/detail/indirect_traits.hpp + /usr/include/boost/detail/select_type.hpp + /usr/include/boost/iterator/detail/enable_if.hpp + /usr/include/boost/mpl/always.hpp + /usr/include/boost/mpl/apply.hpp + /usr/include/boost/mpl/apply_fwd.hpp + /usr/include/boost/mpl/aux_/preprocessed/gcc/apply_fwd.hpp + /usr/include/boost/mpl/lambda.hpp + /usr/include/boost/mpl/bind.hpp + /usr/include/boost/mpl/bind_fwd.hpp + /usr/include/boost/mpl/aux_/config/bind.hpp + /usr/include/boost/mpl/aux_/preprocessed/gcc/bind_fwd.hpp + /usr/include/boost/mpl/next.hpp + /usr/include/boost/mpl/next_prior.hpp + /usr/include/boost/mpl/aux_/common_name_wknd.hpp + /usr/include/boost/mpl/protect.hpp + /usr/include/boost/mpl/aux_/preprocessed/gcc/bind.hpp + /usr/include/boost/mpl/aux_/full_lambda.hpp + /usr/include/boost/mpl/quote.hpp + /usr/include/boost/mpl/aux_/has_type.hpp + /usr/include/boost/mpl/aux_/config/bcc.hpp + /usr/include/boost/mpl/aux_/preprocessed/gcc/quote.hpp + /usr/include/boost/mpl/aux_/template_arity.hpp + /usr/include/boost/mpl/aux_/preprocessed/gcc/template_arity.hpp + /usr/include/boost/mpl/aux_/preprocessed/gcc/full_lambda.hpp + /usr/include/boost/mpl/aux_/preprocessed/gcc/apply.hpp + /usr/include/boost/thread/executor.hpp + /usr/include/boost/thread/executors/executor.hpp + /usr/include/boost/thread/executors/executor_adaptor.hpp + /usr/include/boost/thread/executors/generic_executor_ref.hpp + /usr/include/boost/thread/detail/atomic_undef_macros.hpp + /usr/include/boost/thread/detail/atomic_redef_macros.hpp + /usr/include/boost/bind.hpp + /usr/local/src/asymptote-2.78/LspCpp/third_party/threadpool/boost/threadpool/task_adaptors.hpp + /usr/local/src/asymptote-2.78/LspCpp/third_party/threadpool/boost/threadpool/task_adaptors.hpp + /usr/local/src/asymptote-2.78/LspCpp/third_party/threadpool/boost/threadpool/detail/locking_ptr.hpp + /usr/local/src/asymptote-2.78/LspCpp/third_party/threadpool/boost/threadpool/scheduling_policies.hpp + /usr/include/c++/11/queue + /usr/include/c++/11/bits/stl_queue.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/threadpool/boost/threadpool/size_policies.hpp + /usr/local/src/asymptote-2.78/LspCpp/third_party/threadpool/boost/threadpool/shutdown_policies.hpp + /usr/local/src/asymptote-2.78/LspCpp/third_party/threadpool/boost/threadpool/pool_adaptors.hpp + /usr/local/src/asymptote-2.78/LspCpp/third_party/threadpool/boost/threadpool/task_adaptors.hpp + +CMakeFiles/lspcpp.dir/src/jsonrpc/StreamMessageProducer.cpp.o + /usr/local/src/asymptote-2.78/LspCpp/src/jsonrpc/StreamMessageProducer.cpp + /usr/include/stdc-predef.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/JsonRpc/StreamMessageProducer.h + /usr/include/c++/11/string + /usr/include/c++/11/x86_64-redhat-linux/bits/c++config.h + /usr/include/bits/wordsize.h + /usr/include/c++/11/x86_64-redhat-linux/bits/os_defines.h + /usr/include/features.h + /usr/include/sys/cdefs.h + /usr/include/bits/long-double.h + /usr/include/gnu/stubs.h + /usr/include/gnu/stubs-64.h + /usr/include/c++/11/x86_64-redhat-linux/bits/cpu_defines.h + /usr/include/c++/11/bits/stringfwd.h + /usr/include/c++/11/bits/memoryfwd.h + /usr/include/c++/11/bits/char_traits.h + /usr/include/c++/11/bits/stl_algobase.h + /usr/include/c++/11/bits/functexcept.h + /usr/include/c++/11/bits/exception_defines.h + /usr/include/c++/11/bits/cpp_type_traits.h + /usr/include/c++/11/ext/type_traits.h + /usr/include/c++/11/ext/numeric_traits.h + /usr/include/c++/11/bits/stl_pair.h + /usr/include/c++/11/bits/move.h + /usr/include/c++/11/type_traits + /usr/include/c++/11/bits/stl_iterator_base_types.h + /usr/include/c++/11/bits/stl_iterator_base_funcs.h + /usr/include/c++/11/bits/concept_check.h + /usr/include/c++/11/debug/assertions.h + /usr/include/c++/11/bits/stl_iterator.h + /usr/include/c++/11/bits/ptr_traits.h + /usr/include/c++/11/debug/debug.h + /usr/include/c++/11/bits/predefined_ops.h + /usr/include/c++/11/bits/postypes.h + /usr/include/c++/11/cwchar + /usr/include/wchar.h + /usr/include/bits/libc-header-start.h + /usr/include/bits/floatn.h + /usr/include/bits/floatn-common.h + /usr/lib/gcc/x86_64-redhat-linux/11/include/stddef.h + /usr/lib/gcc/x86_64-redhat-linux/11/include/stdarg.h + /usr/include/bits/wchar.h + /usr/include/bits/types/wint_t.h + /usr/include/bits/types/mbstate_t.h + /usr/include/bits/types/__mbstate_t.h + /usr/include/bits/types/__FILE.h + /usr/include/bits/types/FILE.h + /usr/include/bits/types/locale_t.h + /usr/include/bits/types/__locale_t.h + /usr/include/c++/11/cstdint + /usr/lib/gcc/x86_64-redhat-linux/11/include/stdint.h + /usr/include/stdint.h + /usr/include/bits/types.h + /usr/include/bits/timesize.h + /usr/include/bits/typesizes.h + /usr/include/bits/time64.h + /usr/include/bits/stdint-intn.h + /usr/include/bits/stdint-uintn.h + /usr/include/c++/11/bits/allocator.h + /usr/include/c++/11/x86_64-redhat-linux/bits/c++allocator.h + /usr/include/c++/11/ext/new_allocator.h + /usr/include/c++/11/new + /usr/include/c++/11/bits/exception.h + /usr/include/c++/11/bits/localefwd.h + /usr/include/c++/11/x86_64-redhat-linux/bits/c++locale.h + /usr/include/c++/11/clocale + /usr/include/locale.h + /usr/include/bits/locale.h + /usr/include/c++/11/iosfwd + /usr/include/c++/11/cctype + /usr/include/ctype.h + /usr/include/bits/endian.h + /usr/include/bits/endianness.h + /usr/include/c++/11/bits/ostream_insert.h + /usr/include/c++/11/bits/cxxabi_forced.h + /usr/include/c++/11/bits/stl_function.h + /usr/include/c++/11/backward/binders.h + /usr/include/c++/11/bits/range_access.h + /usr/include/c++/11/initializer_list + /usr/include/c++/11/bits/basic_string.h + /usr/include/c++/11/ext/atomicity.h + /usr/include/c++/11/x86_64-redhat-linux/bits/gthr.h + /usr/include/c++/11/x86_64-redhat-linux/bits/gthr-default.h + /usr/include/pthread.h + /usr/include/sched.h + /usr/include/bits/types/time_t.h + /usr/include/bits/types/struct_timespec.h + /usr/include/bits/sched.h + /usr/include/bits/types/struct_sched_param.h + /usr/include/bits/cpu-set.h + /usr/include/time.h + /usr/include/bits/time.h + /usr/include/bits/timex.h + /usr/include/bits/types/struct_timeval.h + /usr/include/bits/types/clock_t.h + /usr/include/bits/types/struct_tm.h + /usr/include/bits/types/clockid_t.h + /usr/include/bits/types/timer_t.h + /usr/include/bits/types/struct_itimerspec.h + /usr/include/bits/pthreadtypes.h + /usr/include/bits/thread-shared-types.h + /usr/include/bits/pthreadtypes-arch.h + /usr/include/bits/struct_mutex.h + /usr/include/bits/struct_rwlock.h + /usr/include/bits/setjmp.h + /usr/include/bits/types/__sigset_t.h + /usr/include/bits/types/struct___jmp_buf_tag.h + /usr/include/c++/11/x86_64-redhat-linux/bits/atomic_word.h + /usr/include/sys/single_threaded.h + /usr/include/c++/11/ext/alloc_traits.h + /usr/include/c++/11/bits/alloc_traits.h + /usr/include/c++/11/bits/stl_construct.h + /usr/include/c++/11/ext/string_conversions.h + /usr/include/c++/11/cstdlib + /usr/include/stdlib.h + /usr/include/bits/waitflags.h + /usr/include/bits/waitstatus.h + /usr/include/sys/types.h + /usr/include/endian.h + /usr/include/bits/byteswap.h + /usr/include/bits/uintn-identity.h + /usr/include/sys/select.h + /usr/include/bits/select.h + /usr/include/bits/types/sigset_t.h + /usr/include/alloca.h + /usr/include/bits/stdlib-bsearch.h + /usr/include/bits/stdlib-float.h + /usr/include/c++/11/bits/std_abs.h + /usr/include/c++/11/cstdio + /usr/include/stdio.h + /usr/include/bits/types/__fpos_t.h + /usr/include/bits/types/__fpos64_t.h + /usr/include/bits/types/struct_FILE.h + /usr/include/bits/types/cookie_io_functions_t.h + /usr/include/bits/stdio_lim.h + /usr/include/bits/stdio.h + /usr/include/c++/11/cerrno + /usr/include/errno.h + /usr/include/bits/errno.h + /usr/include/linux/errno.h + /usr/include/asm/errno.h + /usr/include/asm-generic/errno.h + /usr/include/asm-generic/errno-base.h + /usr/include/bits/types/error_t.h + /usr/include/c++/11/bits/charconv.h + /usr/include/c++/11/bits/functional_hash.h + /usr/include/c++/11/bits/hash_bytes.h + /usr/include/c++/11/bits/basic_string.tcc + /usr/include/c++/11/functional + /usr/include/c++/11/tuple + /usr/include/c++/11/utility + /usr/include/c++/11/bits/stl_relops.h + /usr/include/c++/11/array + /usr/include/c++/11/bits/uses_allocator.h + /usr/include/c++/11/bits/invoke.h + /usr/include/c++/11/bits/refwrap.h + /usr/include/c++/11/bits/std_function.h + /usr/include/c++/11/typeinfo + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/JsonRpc/MessageProducer.h + /usr/include/c++/11/iostream + /usr/include/c++/11/ostream + /usr/include/c++/11/ios + /usr/include/c++/11/exception + /usr/include/c++/11/bits/exception_ptr.h + /usr/include/c++/11/bits/cxxabi_init_exception.h + /usr/include/c++/11/bits/nested_exception.h + /usr/include/c++/11/bits/ios_base.h + /usr/include/c++/11/bits/locale_classes.h + /usr/include/c++/11/bits/locale_classes.tcc + /usr/include/c++/11/system_error + /usr/include/c++/11/x86_64-redhat-linux/bits/error_constants.h + /usr/include/c++/11/stdexcept + /usr/include/c++/11/streambuf + /usr/include/c++/11/bits/streambuf.tcc + /usr/include/c++/11/bits/basic_ios.h + /usr/include/c++/11/bits/locale_facets.h + /usr/include/c++/11/cwctype + /usr/include/wctype.h + /usr/include/bits/wctype-wchar.h + /usr/include/c++/11/x86_64-redhat-linux/bits/ctype_base.h + /usr/include/c++/11/bits/streambuf_iterator.h + /usr/include/c++/11/x86_64-redhat-linux/bits/ctype_inline.h + /usr/include/c++/11/bits/locale_facets.tcc + /usr/include/c++/11/bits/basic_ios.tcc + /usr/include/c++/11/bits/ostream.tcc + /usr/include/c++/11/istream + /usr/include/c++/11/bits/istream.tcc + /usr/include/c++/11/memory + /usr/include/c++/11/bits/stl_uninitialized.h + /usr/include/c++/11/bits/stl_tempbuf.h + /usr/include/c++/11/bits/stl_raw_storage_iter.h + /usr/include/c++/11/bits/align.h + /usr/include/c++/11/bit + /usr/include/c++/11/bits/unique_ptr.h + /usr/include/c++/11/bits/shared_ptr.h + /usr/include/c++/11/bits/shared_ptr_base.h + /usr/include/c++/11/bits/allocated_ptr.h + /usr/include/c++/11/ext/aligned_buffer.h + /usr/include/c++/11/ext/concurrence.h + /usr/include/c++/11/bits/shared_ptr_atomic.h + /usr/include/c++/11/bits/atomic_base.h + /usr/include/c++/11/bits/atomic_lockfree_defines.h + /usr/include/c++/11/backward/auto_ptr.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/JsonRpc/MessageIssue.h + /usr/include/c++/11/vector + /usr/include/c++/11/bits/stl_vector.h + /usr/include/c++/11/bits/stl_bvector.h + /usr/include/c++/11/bits/vector.tcc + /usr/include/c++/11/cassert + /usr/include/assert.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/JsonRpc/stream.h + /usr/include/c++/11/mutex + /usr/include/c++/11/chrono + /usr/include/c++/11/ratio + /usr/include/c++/11/limits + /usr/include/c++/11/ctime + /usr/include/c++/11/bits/parse_numbers.h + /usr/include/c++/11/bits/std_mutex.h + /usr/include/c++/11/bits/unique_lock.h + +CMakeFiles/lspcpp.dir/src/jsonrpc/TcpServer.cpp.o + /usr/local/src/asymptote-2.78/LspCpp/src/jsonrpc/TcpServer.cpp + /usr/include/stdc-predef.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/JsonRpc/TcpServer.h + /usr/include/boost/asio.hpp + /usr/include/boost/asio/associated_allocator.hpp + /usr/include/boost/asio/detail/config.hpp + /usr/include/boost/config.hpp + /usr/include/boost/config/user.hpp + /usr/include/boost/config/detail/select_compiler_config.hpp + /usr/include/boost/config/compiler/gcc.hpp + /usr/include/c++/11/cstddef + /usr/include/c++/11/x86_64-redhat-linux/bits/c++config.h + /usr/include/bits/wordsize.h + /usr/include/c++/11/x86_64-redhat-linux/bits/os_defines.h + /usr/include/features.h + /usr/include/sys/cdefs.h + /usr/include/bits/long-double.h + /usr/include/gnu/stubs.h + /usr/include/gnu/stubs-64.h + /usr/include/c++/11/x86_64-redhat-linux/bits/cpu_defines.h + /usr/lib/gcc/x86_64-redhat-linux/11/include/stddef.h + /usr/include/boost/config/detail/select_stdlib_config.hpp + /usr/include/c++/11/version + /usr/include/boost/config/stdlib/libstdcpp3.hpp + /usr/include/unistd.h + /usr/include/bits/posix_opt.h + /usr/include/bits/environments.h + /usr/include/bits/types.h + /usr/include/bits/timesize.h + /usr/include/bits/typesizes.h + /usr/include/bits/time64.h + /usr/include/bits/confname.h + /usr/include/bits/getopt_posix.h + /usr/include/bits/getopt_core.h + /usr/include/bits/unistd_ext.h + /usr/include/boost/config/detail/select_platform_config.hpp + /usr/include/boost/config/platform/linux.hpp + /usr/include/c++/11/cstdlib + /usr/include/stdlib.h + /usr/include/bits/libc-header-start.h + /usr/include/bits/waitflags.h + /usr/include/bits/waitstatus.h + /usr/include/bits/floatn.h + /usr/include/bits/floatn-common.h + /usr/include/bits/types/locale_t.h + /usr/include/bits/types/__locale_t.h + /usr/include/sys/types.h + /usr/include/bits/types/clock_t.h + /usr/include/bits/types/clockid_t.h + /usr/include/bits/types/time_t.h + /usr/include/bits/types/timer_t.h + /usr/include/bits/stdint-intn.h + /usr/include/endian.h + /usr/include/bits/endian.h + /usr/include/bits/endianness.h + /usr/include/bits/byteswap.h + /usr/include/bits/uintn-identity.h + /usr/include/sys/select.h + /usr/include/bits/select.h + /usr/include/bits/types/sigset_t.h + /usr/include/bits/types/__sigset_t.h + /usr/include/bits/types/struct_timeval.h + /usr/include/bits/types/struct_timespec.h + /usr/include/bits/pthreadtypes.h + /usr/include/bits/thread-shared-types.h + /usr/include/bits/pthreadtypes-arch.h + /usr/include/bits/struct_mutex.h + /usr/include/bits/struct_rwlock.h + /usr/include/alloca.h + /usr/include/bits/stdlib-bsearch.h + /usr/include/bits/stdlib-float.h + /usr/include/c++/11/bits/std_abs.h + /usr/include/boost/config/detail/posix_features.hpp + /usr/include/boost/config/detail/suffix.hpp + /usr/include/boost/config/helper_macros.hpp + /usr/include/boost/version.hpp + /usr/include/linux/version.h + /usr/include/c++/11/memory + /usr/include/c++/11/bits/stl_algobase.h + /usr/include/c++/11/bits/functexcept.h + /usr/include/c++/11/bits/exception_defines.h + /usr/include/c++/11/bits/cpp_type_traits.h + /usr/include/c++/11/ext/type_traits.h + /usr/include/c++/11/ext/numeric_traits.h + /usr/include/c++/11/bits/stl_pair.h + /usr/include/c++/11/bits/move.h + /usr/include/c++/11/type_traits + /usr/include/c++/11/bits/stl_iterator_base_types.h + /usr/include/c++/11/bits/stl_iterator_base_funcs.h + /usr/include/c++/11/bits/concept_check.h + /usr/include/c++/11/debug/assertions.h + /usr/include/c++/11/bits/stl_iterator.h + /usr/include/c++/11/bits/ptr_traits.h + /usr/include/c++/11/debug/debug.h + /usr/include/c++/11/bits/predefined_ops.h + /usr/include/c++/11/bits/allocator.h + /usr/include/c++/11/x86_64-redhat-linux/bits/c++allocator.h + /usr/include/c++/11/ext/new_allocator.h + /usr/include/c++/11/new + /usr/include/c++/11/bits/exception.h + /usr/include/c++/11/bits/memoryfwd.h + /usr/include/c++/11/bits/stl_construct.h + /usr/include/c++/11/bits/stl_uninitialized.h + /usr/include/c++/11/ext/alloc_traits.h + /usr/include/c++/11/bits/alloc_traits.h + /usr/include/c++/11/bits/stl_tempbuf.h + /usr/include/c++/11/bits/stl_raw_storage_iter.h + /usr/include/c++/11/bits/align.h + /usr/include/c++/11/bit + /usr/lib/gcc/x86_64-redhat-linux/11/include/stdint.h + /usr/include/stdint.h + /usr/include/bits/wchar.h + /usr/include/bits/stdint-uintn.h + /usr/include/c++/11/bits/uses_allocator.h + /usr/include/c++/11/bits/unique_ptr.h + /usr/include/c++/11/utility + /usr/include/c++/11/bits/stl_relops.h + /usr/include/c++/11/initializer_list + /usr/include/c++/11/tuple + /usr/include/c++/11/array + /usr/include/c++/11/bits/range_access.h + /usr/include/c++/11/bits/invoke.h + /usr/include/c++/11/bits/stl_function.h + /usr/include/c++/11/backward/binders.h + /usr/include/c++/11/bits/functional_hash.h + /usr/include/c++/11/bits/hash_bytes.h + /usr/include/c++/11/bits/shared_ptr.h + /usr/include/c++/11/iosfwd + /usr/include/c++/11/bits/stringfwd.h + /usr/include/c++/11/bits/postypes.h + /usr/include/c++/11/cwchar + /usr/include/wchar.h + /usr/lib/gcc/x86_64-redhat-linux/11/include/stdarg.h + /usr/include/bits/types/wint_t.h + /usr/include/bits/types/mbstate_t.h + /usr/include/bits/types/__mbstate_t.h + /usr/include/bits/types/__FILE.h + /usr/include/bits/types/FILE.h + /usr/include/c++/11/bits/shared_ptr_base.h + /usr/include/c++/11/typeinfo + /usr/include/c++/11/bits/allocated_ptr.h + /usr/include/c++/11/bits/refwrap.h + /usr/include/c++/11/ext/aligned_buffer.h + /usr/include/c++/11/ext/atomicity.h + /usr/include/c++/11/x86_64-redhat-linux/bits/gthr.h + /usr/include/c++/11/x86_64-redhat-linux/bits/gthr-default.h + /usr/include/pthread.h + /usr/include/sched.h + /usr/include/bits/sched.h + /usr/include/bits/types/struct_sched_param.h + /usr/include/bits/cpu-set.h + /usr/include/time.h + /usr/include/bits/time.h + /usr/include/bits/timex.h + /usr/include/bits/types/struct_tm.h + /usr/include/bits/types/struct_itimerspec.h + /usr/include/bits/setjmp.h + /usr/include/bits/types/struct___jmp_buf_tag.h + /usr/include/c++/11/x86_64-redhat-linux/bits/atomic_word.h + /usr/include/sys/single_threaded.h + /usr/include/c++/11/ext/concurrence.h + /usr/include/c++/11/exception + /usr/include/c++/11/bits/exception_ptr.h + /usr/include/c++/11/bits/cxxabi_init_exception.h + /usr/include/c++/11/bits/nested_exception.h + /usr/include/c++/11/bits/shared_ptr_atomic.h + /usr/include/c++/11/bits/atomic_base.h + /usr/include/c++/11/bits/atomic_lockfree_defines.h + /usr/include/c++/11/backward/auto_ptr.h + /usr/include/boost/asio/detail/type_traits.hpp + /usr/include/boost/asio/detail/push_options.hpp + /usr/include/boost/asio/detail/pop_options.hpp + /usr/include/boost/asio/associated_executor.hpp + /usr/include/boost/asio/execution/executor.hpp + /usr/include/boost/asio/execution/execute.hpp + /usr/include/boost/asio/execution/detail/as_invocable.hpp + /usr/include/boost/asio/detail/atomic_count.hpp + /usr/include/c++/11/atomic + /usr/include/boost/asio/detail/memory.hpp + /usr/include/boost/asio/execution/receiver_invocation_error.hpp + /usr/include/c++/11/stdexcept + /usr/include/c++/11/string + /usr/include/c++/11/bits/char_traits.h + /usr/include/c++/11/cstdint + /usr/include/c++/11/bits/localefwd.h + /usr/include/c++/11/x86_64-redhat-linux/bits/c++locale.h + /usr/include/c++/11/clocale + /usr/include/locale.h + /usr/include/bits/locale.h + /usr/include/c++/11/cctype + /usr/include/ctype.h + /usr/include/c++/11/bits/ostream_insert.h + /usr/include/c++/11/bits/cxxabi_forced.h + /usr/include/c++/11/bits/basic_string.h + /usr/include/c++/11/ext/string_conversions.h + /usr/include/c++/11/cstdio + /usr/include/stdio.h + /usr/include/bits/types/__fpos_t.h + /usr/include/bits/types/__fpos64_t.h + /usr/include/bits/types/struct_FILE.h + /usr/include/bits/types/cookie_io_functions_t.h + /usr/include/bits/stdio_lim.h + /usr/include/bits/stdio.h + /usr/include/c++/11/cerrno + /usr/include/errno.h + /usr/include/bits/errno.h + /usr/include/linux/errno.h + /usr/include/asm/errno.h + /usr/include/asm-generic/errno.h + /usr/include/asm-generic/errno-base.h + /usr/include/bits/types/error_t.h + /usr/include/c++/11/bits/charconv.h + /usr/include/c++/11/bits/basic_string.tcc + /usr/include/boost/asio/execution/impl/receiver_invocation_error.ipp + /usr/include/boost/asio/execution/set_done.hpp + /usr/include/boost/asio/traits/set_done_member.hpp + /usr/include/boost/asio/traits/set_done_free.hpp + /usr/include/boost/asio/execution/set_error.hpp + /usr/include/boost/asio/traits/set_error_member.hpp + /usr/include/boost/asio/traits/set_error_free.hpp + /usr/include/boost/asio/execution/set_value.hpp + /usr/include/boost/asio/detail/variadic_templates.hpp + /usr/include/boost/asio/traits/set_value_member.hpp + /usr/include/boost/asio/traits/set_value_free.hpp + /usr/include/boost/asio/execution/detail/as_receiver.hpp + /usr/include/boost/asio/traits/execute_member.hpp + /usr/include/boost/asio/traits/execute_free.hpp + /usr/include/boost/asio/execution/invocable_archetype.hpp + /usr/include/boost/asio/traits/equality_comparable.hpp + /usr/include/boost/asio/is_executor.hpp + /usr/include/boost/asio/detail/is_executor.hpp + /usr/include/boost/asio/system_executor.hpp + /usr/include/boost/asio/execution.hpp + /usr/include/boost/asio/execution/allocator.hpp + /usr/include/boost/asio/execution/scheduler.hpp + /usr/include/boost/asio/execution/schedule.hpp + /usr/include/boost/asio/traits/schedule_member.hpp + /usr/include/boost/asio/traits/schedule_free.hpp + /usr/include/boost/asio/execution/sender.hpp + /usr/include/boost/asio/execution/detail/void_receiver.hpp + /usr/include/boost/asio/execution/receiver.hpp + /usr/include/boost/asio/execution/connect.hpp + /usr/include/boost/asio/execution/detail/as_operation.hpp + /usr/include/boost/asio/traits/start_member.hpp + /usr/include/boost/asio/execution/operation_state.hpp + /usr/include/boost/asio/execution/start.hpp + /usr/include/boost/asio/traits/start_free.hpp + /usr/include/boost/asio/traits/connect_member.hpp + /usr/include/boost/asio/traits/connect_free.hpp + /usr/include/boost/asio/is_applicable_property.hpp + /usr/include/boost/asio/traits/query_static_constexpr_member.hpp + /usr/include/boost/asio/traits/static_query.hpp + /usr/include/boost/asio/execution/any_executor.hpp + /usr/include/boost/asio/detail/assert.hpp + /usr/include/boost/assert.hpp + /usr/include/assert.h + /usr/include/boost/asio/detail/cstddef.hpp + /usr/include/boost/asio/detail/executor_function.hpp + /usr/include/boost/asio/detail/handler_alloc_helpers.hpp + /usr/include/boost/asio/detail/noncopyable.hpp + /usr/include/boost/asio/detail/recycling_allocator.hpp + /usr/include/boost/asio/detail/thread_context.hpp + /usr/include/c++/11/climits + /usr/lib/gcc/x86_64-redhat-linux/11/include/limits.h + /usr/lib/gcc/x86_64-redhat-linux/11/include/syslimits.h + /usr/include/limits.h + /usr/include/bits/posix1_lim.h + /usr/include/bits/local_lim.h + /usr/include/linux/limits.h + /usr/include/bits/posix2_lim.h + /usr/include/bits/xopen_lim.h + /usr/include/bits/uio_lim.h + /usr/include/boost/asio/detail/call_stack.hpp + /usr/include/boost/asio/detail/tss_ptr.hpp + /usr/include/boost/asio/detail/keyword_tss_ptr.hpp + /usr/include/boost/asio/detail/thread_info_base.hpp + /usr/include/boost/asio/multiple_exceptions.hpp + /usr/include/boost/asio/impl/multiple_exceptions.ipp + /usr/include/boost/asio/handler_alloc_hook.hpp + /usr/include/boost/asio/impl/handler_alloc_hook.ipp + /usr/include/boost/asio/detail/handler_invoke_helpers.hpp + /usr/include/boost/asio/handler_invoke_hook.hpp + /usr/include/boost/asio/detail/non_const_lvalue.hpp + /usr/include/boost/asio/detail/scoped_ptr.hpp + /usr/include/boost/asio/detail/throw_exception.hpp + /usr/include/boost/throw_exception.hpp + /usr/include/boost/assert/source_location.hpp + /usr/include/boost/current_function.hpp + /usr/include/boost/cstdint.hpp + /usr/include/boost/config/workaround.hpp + /usr/include/boost/exception/exception.hpp + /usr/include/boost/asio/execution/bad_executor.hpp + /usr/include/boost/asio/execution/impl/bad_executor.ipp + /usr/include/boost/asio/execution/blocking.hpp + /usr/include/boost/asio/prefer.hpp + /usr/include/boost/asio/traits/prefer_free.hpp + /usr/include/boost/asio/traits/prefer_member.hpp + /usr/include/boost/asio/traits/require_free.hpp + /usr/include/boost/asio/traits/require_member.hpp + /usr/include/boost/asio/traits/static_require.hpp + /usr/include/boost/asio/query.hpp + /usr/include/boost/asio/traits/query_member.hpp + /usr/include/boost/asio/traits/query_free.hpp + /usr/include/boost/asio/require.hpp + /usr/include/boost/asio/execution/blocking_adaptation.hpp + /usr/include/boost/asio/detail/event.hpp + /usr/include/boost/asio/detail/posix_event.hpp + /usr/include/boost/asio/detail/impl/posix_event.ipp + /usr/include/boost/asio/detail/throw_error.hpp + /usr/include/boost/system/error_code.hpp + /usr/include/boost/system/detail/error_code.hpp + /usr/include/boost/system/detail/error_category.hpp + /usr/include/boost/system/detail/config.hpp + /usr/include/c++/11/functional + /usr/include/c++/11/bits/std_function.h + /usr/include/c++/11/system_error + /usr/include/c++/11/x86_64-redhat-linux/bits/error_constants.h + /usr/include/boost/system/detail/error_condition.hpp + /usr/include/boost/system/detail/generic_category.hpp + /usr/include/boost/system/detail/generic_category_message.hpp + /usr/include/c++/11/cstring + /usr/include/string.h + /usr/include/strings.h + /usr/include/boost/system/detail/enable_if.hpp + /usr/include/boost/system/is_error_condition_enum.hpp + /usr/include/boost/system/detail/system_category.hpp + /usr/include/boost/system/is_error_code_enum.hpp + /usr/include/c++/11/ostream + /usr/include/c++/11/ios + /usr/include/c++/11/bits/ios_base.h + /usr/include/c++/11/bits/locale_classes.h + /usr/include/c++/11/bits/locale_classes.tcc + /usr/include/c++/11/streambuf + /usr/include/c++/11/bits/streambuf.tcc + /usr/include/c++/11/bits/basic_ios.h + /usr/include/c++/11/bits/locale_facets.h + /usr/include/c++/11/cwctype + /usr/include/wctype.h + /usr/include/bits/wctype-wchar.h + /usr/include/c++/11/x86_64-redhat-linux/bits/ctype_base.h + /usr/include/c++/11/bits/streambuf_iterator.h + /usr/include/c++/11/x86_64-redhat-linux/bits/ctype_inline.h + /usr/include/c++/11/bits/locale_facets.tcc + /usr/include/c++/11/bits/basic_ios.tcc + /usr/include/c++/11/bits/ostream.tcc + /usr/include/boost/system/error_category.hpp + /usr/include/boost/system/detail/error_category_impl.hpp + /usr/include/boost/system/detail/to_std_category.hpp + /usr/include/c++/11/map + /usr/include/c++/11/bits/stl_tree.h + /usr/include/c++/11/bits/stl_map.h + /usr/include/c++/11/bits/stl_multimap.h + /usr/include/c++/11/bits/erase_if.h + /usr/include/c++/11/mutex + /usr/include/c++/11/chrono + /usr/include/c++/11/ratio + /usr/include/c++/11/limits + /usr/include/c++/11/ctime + /usr/include/c++/11/bits/parse_numbers.h + /usr/include/c++/11/bits/std_mutex.h + /usr/include/c++/11/bits/unique_lock.h + /usr/include/boost/system/error_condition.hpp + /usr/include/boost/system/errc.hpp + /usr/include/boost/system/detail/errc.hpp + /usr/include/boost/system/detail/cerrno.hpp + /usr/include/boost/system/generic_category.hpp + /usr/include/boost/system/system_category.hpp + /usr/include/boost/system/detail/system_category_impl.hpp + /usr/include/boost/system/api_config.hpp + /usr/include/boost/system/detail/is_generic_value.hpp + /usr/include/boost/system/detail/throws.hpp + /usr/include/boost/asio/detail/impl/throw_error.ipp + /usr/include/boost/system/system_error.hpp + /usr/include/c++/11/cassert + /usr/include/boost/asio/error.hpp + /usr/include/boost/cerrno.hpp + /usr/include/netdb.h + /usr/include/netinet/in.h + /usr/include/sys/socket.h + /usr/include/bits/types/struct_iovec.h + /usr/include/bits/socket.h + /usr/include/bits/socket_type.h + /usr/include/bits/sockaddr.h + /usr/include/asm/socket.h + /usr/include/asm-generic/socket.h + /usr/include/linux/posix_types.h + /usr/include/linux/stddef.h + /usr/include/asm/posix_types.h + /usr/include/asm/posix_types_64.h + /usr/include/asm-generic/posix_types.h + /usr/include/asm/bitsperlong.h + /usr/include/asm-generic/bitsperlong.h + /usr/include/asm/sockios.h + /usr/include/asm-generic/sockios.h + /usr/include/bits/types/struct_osockaddr.h + /usr/include/bits/in.h + /usr/include/rpc/netdb.h + /usr/include/bits/types/sigevent_t.h + /usr/include/bits/types/__sigval_t.h + /usr/include/bits/netdb.h + /usr/include/boost/asio/impl/error.ipp + /usr/include/boost/asio/detail/mutex.hpp + /usr/include/boost/asio/detail/posix_mutex.hpp + /usr/include/boost/asio/detail/scoped_lock.hpp + /usr/include/boost/asio/detail/impl/posix_mutex.ipp + /usr/include/boost/asio/execution/bulk_execute.hpp + /usr/include/boost/asio/execution/bulk_guarantee.hpp + /usr/include/boost/asio/execution/detail/bulk_sender.hpp + /usr/include/boost/asio/traits/bulk_execute_member.hpp + /usr/include/boost/asio/traits/bulk_execute_free.hpp + /usr/include/boost/asio/execution/context.hpp + /usr/include/boost/asio/execution/context_as.hpp + /usr/include/boost/asio/execution/mapping.hpp + /usr/include/boost/asio/execution/occupancy.hpp + /usr/include/boost/asio/execution/outstanding_work.hpp + /usr/include/boost/asio/execution/prefer_only.hpp + /usr/include/boost/asio/execution/relationship.hpp + /usr/include/boost/asio/execution/submit.hpp + /usr/include/boost/asio/execution/detail/submit_receiver.hpp + /usr/include/boost/asio/traits/submit_member.hpp + /usr/include/boost/asio/traits/submit_free.hpp + /usr/include/boost/asio/impl/system_executor.hpp + /usr/include/boost/asio/detail/executor_op.hpp + /usr/include/boost/asio/detail/fenced_block.hpp + /usr/include/boost/asio/detail/std_fenced_block.hpp + /usr/include/boost/asio/detail/scheduler_operation.hpp + /usr/include/boost/asio/detail/handler_tracking.hpp + /usr/include/boost/asio/detail/impl/handler_tracking.ipp + /usr/include/boost/asio/detail/op_queue.hpp + /usr/include/boost/asio/detail/global.hpp + /usr/include/boost/asio/detail/posix_global.hpp + /usr/include/boost/asio/system_context.hpp + /usr/include/boost/asio/detail/scheduler.hpp + /usr/include/boost/asio/execution_context.hpp + /usr/include/boost/asio/impl/execution_context.hpp + /usr/include/boost/asio/detail/handler_type_requirements.hpp + /usr/include/boost/asio/async_result.hpp + /usr/include/boost/asio/detail/service_registry.hpp + /usr/include/boost/asio/detail/impl/service_registry.hpp + /usr/include/boost/asio/detail/impl/service_registry.ipp + /usr/include/c++/11/vector + /usr/include/c++/11/bits/stl_vector.h + /usr/include/c++/11/bits/stl_bvector.h + /usr/include/c++/11/bits/vector.tcc + /usr/include/boost/asio/impl/execution_context.ipp + /usr/include/boost/asio/detail/conditionally_enabled_event.hpp + /usr/include/boost/asio/detail/conditionally_enabled_mutex.hpp + /usr/include/boost/asio/detail/null_event.hpp + /usr/include/boost/asio/detail/impl/null_event.ipp + /usr/include/boost/asio/detail/reactor_fwd.hpp + /usr/include/boost/asio/detail/thread.hpp + /usr/include/boost/asio/detail/posix_thread.hpp + /usr/include/boost/asio/detail/impl/posix_thread.ipp + /usr/include/boost/asio/detail/impl/scheduler.ipp + /usr/include/boost/asio/detail/concurrency_hint.hpp + /usr/include/boost/asio/detail/limits.hpp + /usr/include/boost/limits.hpp + /usr/include/boost/asio/detail/reactor.hpp + /usr/include/boost/asio/detail/epoll_reactor.hpp + /usr/include/boost/asio/detail/object_pool.hpp + /usr/include/boost/asio/detail/reactor_op.hpp + /usr/include/boost/asio/detail/operation.hpp + /usr/include/boost/asio/detail/select_interrupter.hpp + /usr/include/boost/asio/detail/eventfd_select_interrupter.hpp + /usr/include/boost/asio/detail/impl/eventfd_select_interrupter.ipp + /usr/include/sys/stat.h + /usr/include/bits/stat.h + /usr/include/bits/struct_stat.h + /usr/include/bits/statx.h + /usr/include/linux/stat.h + /usr/include/linux/types.h + /usr/include/asm/types.h + /usr/include/asm-generic/types.h + /usr/include/asm-generic/int-ll64.h + /usr/include/bits/statx-generic.h + /usr/include/bits/types/struct_statx_timestamp.h + /usr/include/bits/types/struct_statx.h + /usr/include/fcntl.h + /usr/include/bits/fcntl.h + /usr/include/bits/fcntl-linux.h + /usr/include/linux/falloc.h + /usr/include/sys/eventfd.h + /usr/include/bits/eventfd.h + /usr/include/boost/asio/detail/cstdint.hpp + /usr/include/boost/asio/detail/socket_types.hpp + /usr/include/sys/ioctl.h + /usr/include/bits/ioctls.h + /usr/include/asm/ioctls.h + /usr/include/asm-generic/ioctls.h + /usr/include/linux/ioctl.h + /usr/include/asm/ioctl.h + /usr/include/asm-generic/ioctl.h + /usr/include/bits/ioctl-types.h + /usr/include/sys/ttydefaults.h + /usr/include/poll.h + /usr/include/sys/poll.h + /usr/include/bits/poll.h + /usr/include/sys/uio.h + /usr/include/bits/uio-ext.h + /usr/include/sys/un.h + /usr/include/netinet/tcp.h + /usr/include/arpa/inet.h + /usr/include/net/if.h + /usr/include/boost/asio/detail/timer_queue_base.hpp + /usr/include/boost/asio/detail/timer_queue_set.hpp + /usr/include/boost/asio/detail/impl/timer_queue_set.ipp + /usr/include/boost/asio/detail/wait_op.hpp + /usr/include/sys/timerfd.h + /usr/include/bits/timerfd.h + /usr/include/boost/asio/detail/impl/epoll_reactor.hpp + /usr/include/boost/asio/detail/impl/epoll_reactor.ipp + /usr/include/sys/epoll.h + /usr/include/bits/epoll.h + /usr/include/boost/asio/detail/scheduler_thread_info.hpp + /usr/include/boost/asio/detail/signal_blocker.hpp + /usr/include/boost/asio/detail/posix_signal_blocker.hpp + /usr/include/c++/11/csignal + /usr/include/signal.h + /usr/include/bits/signum-generic.h + /usr/include/bits/signum-arch.h + /usr/include/bits/types/sig_atomic_t.h + /usr/include/bits/types/siginfo_t.h + /usr/include/bits/siginfo-arch.h + /usr/include/bits/siginfo-consts.h + /usr/include/bits/siginfo-consts-arch.h + /usr/include/bits/types/sigval_t.h + /usr/include/bits/sigevent-consts.h + /usr/include/bits/sigaction.h + /usr/include/bits/sigcontext.h + /usr/include/bits/types/stack_t.h + /usr/include/sys/ucontext.h + /usr/include/bits/sigstack.h + /usr/include/bits/ss_flags.h + /usr/include/bits/types/struct_sigstack.h + /usr/include/bits/sigthread.h + /usr/include/bits/signal_ext.h + /usr/include/boost/asio/detail/thread_group.hpp + /usr/include/boost/asio/impl/system_context.hpp + /usr/include/boost/asio/impl/system_context.ipp + /usr/include/boost/asio/awaitable.hpp + /usr/include/boost/asio/basic_datagram_socket.hpp + /usr/include/boost/asio/basic_socket.hpp + /usr/include/boost/asio/any_io_executor.hpp + /usr/include/boost/asio/detail/io_object_impl.hpp + /usr/include/boost/asio/io_context.hpp + /usr/include/boost/asio/detail/wrapped_handler.hpp + /usr/include/boost/asio/detail/bind_handler.hpp + /usr/include/boost/asio/detail/handler_cont_helpers.hpp + /usr/include/boost/asio/handler_continuation_hook.hpp + /usr/include/boost/asio/detail/chrono.hpp + /usr/include/boost/asio/impl/io_context.hpp + /usr/include/boost/asio/detail/completion_handler.hpp + /usr/include/boost/asio/detail/handler_work.hpp + /usr/include/boost/asio/executor_work_guard.hpp + /usr/include/boost/asio/impl/io_context.ipp + /usr/include/boost/asio/post.hpp + /usr/include/boost/asio/impl/post.hpp + /usr/include/boost/asio/detail/work_dispatcher.hpp + /usr/include/boost/asio/socket_base.hpp + /usr/include/boost/asio/detail/io_control.hpp + /usr/include/boost/asio/detail/socket_option.hpp + /usr/include/boost/asio/detail/reactive_socket_service.hpp + /usr/include/boost/asio/buffer.hpp + /usr/include/boost/asio/detail/array_fwd.hpp + /usr/include/boost/asio/detail/string_view.hpp + /usr/include/c++/11/experimental/string_view + /usr/include/c++/11/bits/ranges_base.h + /usr/include/c++/11/experimental/bits/lfts_config.h + /usr/include/c++/11/experimental/bits/string_view.tcc + /usr/include/boost/detail/workaround.hpp + /usr/include/boost/asio/detail/is_buffer_sequence.hpp + /usr/include/boost/asio/detail/buffer_sequence_adapter.hpp + /usr/include/boost/asio/detail/impl/buffer_sequence_adapter.ipp + /usr/include/boost/asio/detail/reactive_null_buffers_op.hpp + /usr/include/boost/asio/detail/reactive_socket_accept_op.hpp + /usr/include/boost/asio/detail/socket_holder.hpp + /usr/include/boost/asio/detail/socket_ops.hpp + /usr/include/boost/asio/detail/impl/socket_ops.ipp + /usr/include/boost/asio/detail/reactive_socket_connect_op.hpp + /usr/include/boost/asio/detail/reactive_socket_recvfrom_op.hpp + /usr/include/boost/asio/detail/reactive_socket_sendto_op.hpp + /usr/include/boost/asio/detail/reactive_socket_service_base.hpp + /usr/include/boost/asio/detail/reactive_socket_recv_op.hpp + /usr/include/boost/asio/detail/reactive_socket_recvmsg_op.hpp + /usr/include/boost/asio/detail/reactive_socket_send_op.hpp + /usr/include/boost/asio/detail/reactive_wait_op.hpp + /usr/include/boost/asio/detail/impl/reactive_socket_service_base.ipp + /usr/include/boost/asio/basic_deadline_timer.hpp + /usr/include/boost/asio/detail/deadline_timer_service.hpp + /usr/include/boost/asio/detail/timer_queue.hpp + /usr/include/boost/asio/detail/date_time_fwd.hpp + /usr/include/boost/asio/detail/timer_queue_ptime.hpp + /usr/include/boost/asio/time_traits.hpp + /usr/include/boost/date_time/posix_time/posix_time_types.hpp + /usr/include/boost/date_time/time_clock.hpp + /usr/include/boost/date_time/c_time.hpp + /usr/include/boost/date_time/compiler_config.hpp + /usr/include/boost/date_time/locale_config.hpp + /usr/include/boost/config/auto_link.hpp + /usr/include/sys/time.h + /usr/include/boost/shared_ptr.hpp + /usr/include/boost/smart_ptr/shared_ptr.hpp + /usr/include/boost/smart_ptr/detail/shared_count.hpp + /usr/include/boost/smart_ptr/bad_weak_ptr.hpp + /usr/include/boost/smart_ptr/detail/sp_counted_base.hpp + /usr/include/boost/smart_ptr/detail/sp_has_gcc_intrinsics.hpp + /usr/include/boost/smart_ptr/detail/sp_has_sync_intrinsics.hpp + /usr/include/boost/smart_ptr/detail/sp_counted_base_gcc_atomic.hpp + /usr/include/boost/smart_ptr/detail/sp_typeinfo_.hpp + /usr/include/boost/smart_ptr/detail/sp_counted_impl.hpp + /usr/include/boost/smart_ptr/detail/sp_noexcept.hpp + /usr/include/boost/checked_delete.hpp + /usr/include/boost/core/checked_delete.hpp + /usr/include/boost/core/addressof.hpp + /usr/include/boost/smart_ptr/detail/sp_disable_deprecated.hpp + /usr/include/boost/smart_ptr/detail/sp_convertible.hpp + /usr/include/boost/smart_ptr/detail/sp_nullptr_t.hpp + /usr/include/boost/smart_ptr/detail/spinlock_pool.hpp + /usr/include/boost/smart_ptr/detail/spinlock.hpp + /usr/include/boost/smart_ptr/detail/spinlock_gcc_atomic.hpp + /usr/include/boost/smart_ptr/detail/yield_k.hpp + /usr/include/boost/smart_ptr/detail/sp_thread_pause.hpp + /usr/include/boost/smart_ptr/detail/sp_thread_sleep.hpp + /usr/include/boost/config/pragma_message.hpp + /usr/include/c++/11/algorithm + /usr/include/c++/11/bits/stl_algo.h + /usr/include/c++/11/bits/algorithmfwd.h + /usr/include/c++/11/bits/stl_heap.h + /usr/include/c++/11/bits/uniform_int_dist.h + /usr/include/boost/smart_ptr/detail/operator_bool.hpp + /usr/include/boost/smart_ptr/detail/local_sp_deleter.hpp + /usr/include/boost/smart_ptr/detail/local_counted_base.hpp + /usr/include/boost/date_time/microsec_time_clock.hpp + /usr/include/boost/date_time/posix_time/ptime.hpp + /usr/include/boost/date_time/posix_time/posix_time_system.hpp + /usr/include/boost/date_time/posix_time/posix_time_config.hpp + /usr/include/boost/config/no_tr1/cmath.hpp + /usr/include/c++/11/cmath + /usr/include/math.h + /usr/include/bits/math-vector.h + /usr/include/bits/libm-simd-decl-stubs.h + /usr/include/bits/flt-eval-method.h + /usr/include/bits/fp-logb.h + /usr/include/bits/fp-fast.h + /usr/include/bits/mathcalls-helper-functions.h + /usr/include/bits/mathcalls.h + /usr/include/bits/mathcalls-narrow.h + /usr/include/bits/iscanonical.h + /usr/include/boost/date_time/time_duration.hpp + /usr/include/boost/core/enable_if.hpp + /usr/include/boost/date_time/special_defs.hpp + /usr/include/boost/date_time/time_defs.hpp + /usr/include/boost/operators.hpp + /usr/include/c++/11/iterator + /usr/include/c++/11/bits/stream_iterator.h + /usr/include/boost/static_assert.hpp + /usr/include/boost/type_traits/is_integral.hpp + /usr/include/boost/type_traits/integral_constant.hpp + /usr/include/boost/date_time/time_resolution_traits.hpp + /usr/include/boost/date_time/int_adapter.hpp + /usr/include/boost/date_time/gregorian/gregorian_types.hpp + /usr/include/boost/date_time/date.hpp + /usr/include/boost/date_time/year_month_day.hpp + /usr/include/boost/date_time/period.hpp + /usr/include/boost/date_time/gregorian/greg_calendar.hpp + /usr/include/boost/date_time/gregorian/greg_weekday.hpp + /usr/include/boost/date_time/constrained_value.hpp + /usr/include/boost/type_traits/conditional.hpp + /usr/include/boost/type_traits/is_base_of.hpp + /usr/include/boost/type_traits/is_base_and_derived.hpp + /usr/include/boost/type_traits/intrinsics.hpp + /usr/include/boost/type_traits/detail/config.hpp + /usr/include/boost/type_traits/remove_cv.hpp + /usr/include/boost/type_traits/is_same.hpp + /usr/include/boost/type_traits/is_class.hpp + /usr/include/boost/date_time/date_defs.hpp + /usr/include/boost/date_time/gregorian/greg_day_of_year.hpp + /usr/include/boost/date_time/gregorian_calendar.hpp + /usr/include/boost/date_time/gregorian_calendar.ipp + /usr/include/boost/date_time/gregorian/greg_ymd.hpp + /usr/include/boost/date_time/gregorian/greg_day.hpp + /usr/include/boost/date_time/gregorian/greg_year.hpp + /usr/include/boost/date_time/gregorian/greg_month.hpp + /usr/include/boost/date_time/gregorian/greg_duration.hpp + /usr/include/boost/date_time/date_duration.hpp + /usr/include/boost/date_time/date_duration_types.hpp + /usr/include/boost/date_time/gregorian/greg_duration_types.hpp + /usr/include/boost/date_time/gregorian/greg_date.hpp + /usr/include/boost/date_time/adjust_functors.hpp + /usr/include/boost/date_time/wrapping_int.hpp + /usr/include/boost/date_time/date_generators.hpp + /usr/include/c++/11/sstream + /usr/include/c++/11/istream + /usr/include/c++/11/bits/istream.tcc + /usr/include/c++/11/bits/sstream.tcc + /usr/include/boost/date_time/date_clock_device.hpp + /usr/include/boost/date_time/date_iterator.hpp + /usr/include/boost/date_time/time_system_split.hpp + /usr/include/boost/date_time/time_system_counted.hpp + /usr/include/boost/date_time/time.hpp + /usr/include/boost/date_time/posix_time/date_duration_operators.hpp + /usr/include/boost/date_time/posix_time/posix_time_duration.hpp + /usr/include/boost/numeric/conversion/cast.hpp + /usr/include/boost/type.hpp + /usr/include/boost/numeric/conversion/converter.hpp + /usr/include/boost/numeric/conversion/conversion_traits.hpp + /usr/include/boost/numeric/conversion/detail/conversion_traits.hpp + /usr/include/boost/type_traits/is_arithmetic.hpp + /usr/include/boost/type_traits/is_floating_point.hpp + /usr/include/boost/numeric/conversion/detail/meta.hpp + /usr/include/boost/mpl/if.hpp + /usr/include/boost/mpl/aux_/value_wknd.hpp + /usr/include/boost/mpl/aux_/static_cast.hpp + /usr/include/boost/mpl/aux_/config/workaround.hpp + /usr/include/boost/mpl/aux_/config/integral.hpp + /usr/include/boost/mpl/aux_/config/msvc.hpp + /usr/include/boost/mpl/aux_/config/eti.hpp + /usr/include/boost/mpl/aux_/na_spec.hpp + /usr/include/boost/mpl/lambda_fwd.hpp + /usr/include/boost/mpl/void_fwd.hpp + /usr/include/boost/mpl/aux_/adl_barrier.hpp + /usr/include/boost/mpl/aux_/config/adl.hpp + /usr/include/boost/mpl/aux_/config/intel.hpp + /usr/include/boost/mpl/aux_/config/gcc.hpp + /usr/include/boost/mpl/aux_/na.hpp + /usr/include/boost/mpl/bool.hpp + /usr/include/boost/mpl/bool_fwd.hpp + /usr/include/boost/mpl/integral_c_tag.hpp + /usr/include/boost/mpl/aux_/config/static_constant.hpp + /usr/include/boost/mpl/aux_/na_fwd.hpp + /usr/include/boost/mpl/aux_/config/ctps.hpp + /usr/include/boost/mpl/aux_/config/lambda.hpp + /usr/include/boost/mpl/aux_/config/ttp.hpp + /usr/include/boost/mpl/int.hpp + /usr/include/boost/mpl/int_fwd.hpp + /usr/include/boost/mpl/aux_/nttp_decl.hpp + /usr/include/boost/mpl/aux_/config/nttp.hpp + /usr/include/boost/mpl/aux_/integral_wrapper.hpp + /usr/include/boost/preprocessor/cat.hpp + /usr/include/boost/preprocessor/config/config.hpp + /usr/include/boost/mpl/aux_/lambda_arity_param.hpp + /usr/include/boost/mpl/aux_/template_arity_fwd.hpp + /usr/include/boost/mpl/aux_/arity.hpp + /usr/include/boost/mpl/aux_/config/dtp.hpp + /usr/include/boost/mpl/aux_/preprocessor/params.hpp + /usr/include/boost/mpl/aux_/config/preprocessor.hpp + /usr/include/boost/preprocessor/comma_if.hpp + /usr/include/boost/preprocessor/punctuation/comma_if.hpp + /usr/include/boost/preprocessor/control/if.hpp + /usr/include/boost/preprocessor/control/iif.hpp + /usr/include/boost/preprocessor/logical/bool.hpp + /usr/include/boost/preprocessor/config/limits.hpp + /usr/include/boost/preprocessor/logical/limits/bool_256.hpp + /usr/include/boost/preprocessor/facilities/empty.hpp + /usr/include/boost/preprocessor/punctuation/comma.hpp + /usr/include/boost/preprocessor/repeat.hpp + /usr/include/boost/preprocessor/repetition/repeat.hpp + /usr/include/boost/preprocessor/debug/error.hpp + /usr/include/boost/preprocessor/detail/auto_rec.hpp + /usr/include/boost/preprocessor/detail/limits/auto_rec_256.hpp + /usr/include/boost/preprocessor/tuple/eat.hpp + /usr/include/boost/preprocessor/repetition/limits/repeat_256.hpp + /usr/include/boost/preprocessor/inc.hpp + /usr/include/boost/preprocessor/arithmetic/inc.hpp + /usr/include/boost/preprocessor/arithmetic/limits/inc_256.hpp + /usr/include/boost/mpl/aux_/preprocessor/enum.hpp + /usr/include/boost/mpl/aux_/preprocessor/def_params_tail.hpp + /usr/include/boost/mpl/limits/arity.hpp + /usr/include/boost/preprocessor/logical/and.hpp + /usr/include/boost/preprocessor/logical/bitand.hpp + /usr/include/boost/preprocessor/identity.hpp + /usr/include/boost/preprocessor/facilities/identity.hpp + /usr/include/boost/preprocessor/empty.hpp + /usr/include/boost/preprocessor/arithmetic/add.hpp + /usr/include/boost/preprocessor/arithmetic/dec.hpp + /usr/include/boost/preprocessor/arithmetic/limits/dec_256.hpp + /usr/include/boost/preprocessor/control/while.hpp + /usr/include/boost/preprocessor/list/fold_left.hpp + /usr/include/boost/preprocessor/list/detail/fold_left.hpp + /usr/include/boost/preprocessor/control/expr_iif.hpp + /usr/include/boost/preprocessor/list/adt.hpp + /usr/include/boost/preprocessor/detail/is_binary.hpp + /usr/include/boost/preprocessor/detail/check.hpp + /usr/include/boost/preprocessor/logical/compl.hpp + /usr/include/boost/preprocessor/list/detail/limits/fold_left_256.hpp + /usr/include/boost/preprocessor/list/limits/fold_left_256.hpp + /usr/include/boost/preprocessor/list/fold_right.hpp + /usr/include/boost/preprocessor/list/detail/fold_right.hpp + /usr/include/boost/preprocessor/list/reverse.hpp + /usr/include/boost/preprocessor/list/detail/limits/fold_right_256.hpp + /usr/include/boost/preprocessor/control/detail/while.hpp + /usr/include/boost/preprocessor/control/detail/limits/while_256.hpp + /usr/include/boost/preprocessor/control/limits/while_256.hpp + /usr/include/boost/preprocessor/logical/bitor.hpp + /usr/include/boost/preprocessor/tuple/elem.hpp + /usr/include/boost/preprocessor/facilities/expand.hpp + /usr/include/boost/preprocessor/facilities/overload.hpp + /usr/include/boost/preprocessor/variadic/size.hpp + /usr/include/boost/preprocessor/facilities/check_empty.hpp + /usr/include/boost/preprocessor/variadic/has_opt.hpp + /usr/include/boost/preprocessor/variadic/limits/size_64.hpp + /usr/include/boost/preprocessor/tuple/rem.hpp + /usr/include/boost/preprocessor/tuple/detail/is_single_return.hpp + /usr/include/boost/preprocessor/variadic/elem.hpp + /usr/include/boost/preprocessor/variadic/limits/elem_64.hpp + /usr/include/boost/preprocessor/arithmetic/detail/is_maximum_number.hpp + /usr/include/boost/preprocessor/comparison/equal.hpp + /usr/include/boost/preprocessor/comparison/not_equal.hpp + /usr/include/boost/preprocessor/comparison/limits/not_equal_256.hpp + /usr/include/boost/preprocessor/arithmetic/detail/maximum_number.hpp + /usr/include/boost/preprocessor/arithmetic/detail/is_minimum_number.hpp + /usr/include/boost/preprocessor/logical/not.hpp + /usr/include/boost/preprocessor/arithmetic/sub.hpp + /usr/include/boost/mpl/aux_/config/overload_resolution.hpp + /usr/include/boost/mpl/aux_/lambda_support.hpp + /usr/include/boost/mpl/eval_if.hpp + /usr/include/boost/mpl/equal_to.hpp + /usr/include/boost/mpl/aux_/comparison_op.hpp + /usr/include/boost/mpl/aux_/numeric_op.hpp + /usr/include/boost/mpl/numeric_cast.hpp + /usr/include/boost/mpl/apply_wrap.hpp + /usr/include/boost/mpl/aux_/has_apply.hpp + /usr/include/boost/mpl/has_xxx.hpp + /usr/include/boost/mpl/aux_/type_wrapper.hpp + /usr/include/boost/mpl/aux_/yes_no.hpp + /usr/include/boost/mpl/aux_/config/arrays.hpp + /usr/include/boost/mpl/aux_/config/has_xxx.hpp + /usr/include/boost/mpl/aux_/config/msvc_typename.hpp + /usr/include/boost/preprocessor/array/elem.hpp + /usr/include/boost/preprocessor/array/data.hpp + /usr/include/boost/preprocessor/array/size.hpp + /usr/include/boost/preprocessor/repetition/enum_params.hpp + /usr/include/boost/preprocessor/repetition/enum_trailing_params.hpp + /usr/include/boost/mpl/aux_/config/has_apply.hpp + /usr/include/boost/mpl/aux_/msvc_never_true.hpp + /usr/include/boost/mpl/aux_/config/use_preprocessed.hpp + /usr/include/boost/mpl/aux_/include_preprocessed.hpp + /usr/include/boost/mpl/aux_/config/compiler.hpp + /usr/include/boost/preprocessor/stringize.hpp + /usr/include/boost/mpl/aux_/preprocessed/gcc/apply_wrap.hpp + /usr/include/boost/mpl/tag.hpp + /usr/include/boost/mpl/void.hpp + /usr/include/boost/mpl/aux_/has_tag.hpp + /usr/include/boost/mpl/aux_/numeric_cast_utils.hpp + /usr/include/boost/mpl/aux_/config/forwarding.hpp + /usr/include/boost/mpl/aux_/msvc_eti_base.hpp + /usr/include/boost/mpl/aux_/is_msvc_eti_arg.hpp + /usr/include/boost/mpl/aux_/preprocessed/gcc/equal_to.hpp + /usr/include/boost/mpl/not.hpp + /usr/include/boost/mpl/aux_/nested_type_wknd.hpp + /usr/include/boost/mpl/and.hpp + /usr/include/boost/mpl/aux_/preprocessed/gcc/and.hpp + /usr/include/boost/mpl/identity.hpp + /usr/include/boost/numeric/conversion/detail/int_float_mixture.hpp + /usr/include/boost/numeric/conversion/int_float_mixture_enum.hpp + /usr/include/boost/mpl/integral_c.hpp + /usr/include/boost/mpl/integral_c_fwd.hpp + /usr/include/boost/numeric/conversion/detail/sign_mixture.hpp + /usr/include/boost/numeric/conversion/sign_mixture_enum.hpp + /usr/include/boost/numeric/conversion/detail/udt_builtin_mixture.hpp + /usr/include/boost/numeric/conversion/udt_builtin_mixture_enum.hpp + /usr/include/boost/numeric/conversion/detail/is_subranged.hpp + /usr/include/boost/mpl/multiplies.hpp + /usr/include/boost/mpl/times.hpp + /usr/include/boost/mpl/aux_/arithmetic_op.hpp + /usr/include/boost/mpl/aux_/largest_int.hpp + /usr/include/boost/mpl/aux_/preprocessed/gcc/times.hpp + /usr/include/boost/mpl/aux_/preprocessor/default_params.hpp + /usr/include/boost/mpl/less.hpp + /usr/include/boost/mpl/aux_/preprocessed/gcc/less.hpp + /usr/include/boost/numeric/conversion/converter_policies.hpp + /usr/include/boost/numeric/conversion/detail/converter.hpp + /usr/include/boost/numeric/conversion/bounds.hpp + /usr/include/boost/numeric/conversion/detail/bounds.hpp + /usr/include/boost/numeric/conversion/numeric_cast_traits.hpp + /usr/include/boost/numeric/conversion/detail/numeric_cast_traits.hpp + /usr/include/boost/numeric/conversion/detail/preprocessed/numeric_cast_traits_common.hpp + /usr/include/boost/numeric/conversion/detail/preprocessed/numeric_cast_traits_long_long.hpp + /usr/include/boost/date_time/posix_time/time_period.hpp + /usr/include/boost/date_time/time_iterator.hpp + /usr/include/boost/date_time/dst_rules.hpp + /usr/include/boost/asio/detail/impl/timer_queue_ptime.ipp + /usr/include/boost/asio/detail/timer_scheduler.hpp + /usr/include/boost/asio/detail/timer_scheduler_fwd.hpp + /usr/include/boost/asio/detail/wait_handler.hpp + /usr/include/boost/asio/basic_io_object.hpp + /usr/include/boost/asio/basic_raw_socket.hpp + /usr/include/boost/asio/basic_seq_packet_socket.hpp + /usr/include/boost/asio/basic_serial_port.hpp + /usr/include/boost/asio/serial_port_base.hpp + /usr/include/termios.h + /usr/include/bits/termios.h + /usr/include/bits/termios-struct.h + /usr/include/bits/termios-c_cc.h + /usr/include/bits/termios-c_iflag.h + /usr/include/bits/termios-c_oflag.h + /usr/include/bits/termios-baud.h + /usr/include/bits/termios-c_cflag.h + /usr/include/bits/termios-c_lflag.h + /usr/include/bits/termios-tcflow.h + /usr/include/bits/termios-misc.h + /usr/include/boost/asio/impl/serial_port_base.hpp + /usr/include/boost/asio/impl/serial_port_base.ipp + /usr/include/boost/asio/detail/reactive_serial_port_service.hpp + /usr/include/boost/asio/detail/descriptor_ops.hpp + /usr/include/boost/asio/detail/impl/descriptor_ops.ipp + /usr/include/boost/asio/detail/reactive_descriptor_service.hpp + /usr/include/boost/asio/detail/descriptor_read_op.hpp + /usr/include/boost/asio/detail/descriptor_write_op.hpp + /usr/include/boost/asio/posix/descriptor_base.hpp + /usr/include/boost/asio/detail/impl/reactive_descriptor_service.ipp + /usr/include/boost/asio/detail/impl/reactive_serial_port_service.ipp + /usr/include/boost/asio/basic_signal_set.hpp + /usr/include/boost/asio/detail/signal_set_service.hpp + /usr/include/boost/asio/detail/signal_handler.hpp + /usr/include/boost/asio/detail/signal_op.hpp + /usr/include/boost/asio/detail/impl/signal_set_service.ipp + /usr/include/boost/asio/detail/static_mutex.hpp + /usr/include/boost/asio/detail/posix_static_mutex.hpp + /usr/include/boost/asio/basic_socket_acceptor.hpp + /usr/include/boost/asio/basic_socket_iostream.hpp + /usr/include/boost/asio/basic_socket_streambuf.hpp + /usr/include/boost/asio/basic_stream_socket.hpp + /usr/include/boost/asio/steady_timer.hpp + /usr/include/boost/asio/basic_waitable_timer.hpp + /usr/include/boost/asio/detail/chrono_time_traits.hpp + /usr/include/boost/asio/wait_traits.hpp + /usr/include/boost/asio/basic_streambuf.hpp + /usr/include/boost/asio/basic_streambuf_fwd.hpp + /usr/include/boost/asio/bind_executor.hpp + /usr/include/boost/asio/uses_executor.hpp + /usr/include/boost/asio/buffered_read_stream_fwd.hpp + /usr/include/boost/asio/buffered_read_stream.hpp + /usr/include/boost/asio/detail/buffer_resize_guard.hpp + /usr/include/boost/asio/detail/buffered_stream_storage.hpp + /usr/include/boost/asio/impl/buffered_read_stream.hpp + /usr/include/boost/asio/buffered_stream_fwd.hpp + /usr/include/boost/asio/buffered_stream.hpp + /usr/include/boost/asio/buffered_write_stream.hpp + /usr/include/boost/asio/buffered_write_stream_fwd.hpp + /usr/include/boost/asio/completion_condition.hpp + /usr/include/boost/asio/write.hpp + /usr/include/boost/asio/impl/write.hpp + /usr/include/boost/asio/detail/base_from_completion_cond.hpp + /usr/include/boost/asio/detail/consuming_buffers.hpp + /usr/include/boost/asio/detail/dependent_type.hpp + /usr/include/boost/asio/impl/buffered_write_stream.hpp + /usr/include/boost/asio/buffers_iterator.hpp + /usr/include/boost/asio/co_spawn.hpp + /usr/include/boost/asio/compose.hpp + /usr/include/boost/asio/impl/compose.hpp + /usr/include/boost/asio/connect.hpp + /usr/include/boost/asio/impl/connect.hpp + /usr/include/boost/asio/coroutine.hpp + /usr/include/boost/asio/deadline_timer.hpp + /usr/include/boost/asio/defer.hpp + /usr/include/boost/asio/impl/defer.hpp + /usr/include/boost/asio/detached.hpp + /usr/include/boost/asio/impl/detached.hpp + /usr/include/boost/asio/dispatch.hpp + /usr/include/boost/asio/impl/dispatch.hpp + /usr/include/boost/asio/executor.hpp + /usr/include/boost/asio/impl/executor.hpp + /usr/include/boost/asio/impl/executor.ipp + /usr/include/boost/asio/generic/basic_endpoint.hpp + /usr/include/boost/asio/generic/detail/endpoint.hpp + /usr/include/boost/asio/generic/detail/impl/endpoint.ipp + /usr/include/boost/asio/generic/datagram_protocol.hpp + /usr/include/boost/asio/generic/raw_protocol.hpp + /usr/include/boost/asio/generic/seq_packet_protocol.hpp + /usr/include/boost/asio/generic/stream_protocol.hpp + /usr/include/boost/asio/high_resolution_timer.hpp + /usr/include/boost/asio/io_context_strand.hpp + /usr/include/boost/asio/detail/strand_service.hpp + /usr/include/boost/asio/detail/impl/strand_service.hpp + /usr/include/boost/asio/detail/impl/strand_service.ipp + /usr/include/boost/asio/io_service.hpp + /usr/include/boost/asio/io_service_strand.hpp + /usr/include/boost/asio/ip/address.hpp + /usr/include/boost/asio/ip/address_v4.hpp + /usr/include/boost/asio/detail/array.hpp + /usr/include/boost/asio/detail/winsock_init.hpp + /usr/include/boost/asio/ip/impl/address_v4.hpp + /usr/include/boost/asio/ip/impl/address_v4.ipp + /usr/include/boost/asio/ip/address_v6.hpp + /usr/include/boost/asio/ip/impl/address_v6.hpp + /usr/include/boost/asio/ip/impl/address_v6.ipp + /usr/include/boost/asio/ip/bad_address_cast.hpp + /usr/include/boost/asio/ip/impl/address.hpp + /usr/include/boost/asio/ip/impl/address.ipp + /usr/include/boost/asio/ip/address_v4_iterator.hpp + /usr/include/boost/asio/ip/address_v4_range.hpp + /usr/include/boost/asio/ip/address_v6_iterator.hpp + /usr/include/boost/asio/ip/address_v6_range.hpp + /usr/include/boost/asio/ip/network_v4.hpp + /usr/include/boost/asio/ip/impl/network_v4.hpp + /usr/include/boost/asio/ip/impl/network_v4.ipp + /usr/include/boost/asio/ip/network_v6.hpp + /usr/include/boost/asio/ip/impl/network_v6.hpp + /usr/include/boost/asio/ip/impl/network_v6.ipp + /usr/include/boost/asio/ip/basic_endpoint.hpp + /usr/include/boost/asio/ip/detail/endpoint.hpp + /usr/include/boost/asio/ip/detail/impl/endpoint.ipp + /usr/include/boost/asio/ip/impl/basic_endpoint.hpp + /usr/include/boost/asio/ip/basic_resolver.hpp + /usr/include/boost/asio/ip/basic_resolver_iterator.hpp + /usr/include/boost/asio/ip/basic_resolver_entry.hpp + /usr/include/boost/asio/ip/basic_resolver_query.hpp + /usr/include/boost/asio/ip/resolver_query_base.hpp + /usr/include/boost/asio/ip/resolver_base.hpp + /usr/include/boost/asio/ip/basic_resolver_results.hpp + /usr/include/boost/asio/detail/resolver_service.hpp + /usr/include/boost/asio/detail/resolve_endpoint_op.hpp + /usr/include/boost/asio/detail/resolve_op.hpp + /usr/include/boost/asio/detail/resolve_query_op.hpp + /usr/include/boost/asio/detail/resolver_service_base.hpp + /usr/include/boost/asio/detail/impl/resolver_service_base.ipp + /usr/include/boost/asio/ip/host_name.hpp + /usr/include/boost/asio/ip/impl/host_name.ipp + /usr/include/boost/asio/ip/icmp.hpp + /usr/include/boost/asio/ip/multicast.hpp + /usr/include/boost/asio/ip/detail/socket_option.hpp + /usr/include/boost/asio/ip/tcp.hpp + /usr/include/boost/asio/ip/udp.hpp + /usr/include/boost/asio/ip/unicast.hpp + /usr/include/boost/asio/ip/v6_only.hpp + /usr/include/boost/asio/is_read_buffered.hpp + /usr/include/boost/asio/is_write_buffered.hpp + /usr/include/boost/asio/local/basic_endpoint.hpp + /usr/include/boost/asio/local/detail/endpoint.hpp + /usr/include/boost/asio/local/detail/impl/endpoint.ipp + /usr/include/boost/asio/local/connect_pair.hpp + /usr/include/boost/asio/local/datagram_protocol.hpp + /usr/include/boost/asio/local/stream_protocol.hpp + /usr/include/boost/asio/packaged_task.hpp + /usr/include/boost/asio/detail/future.hpp + /usr/include/c++/11/future + /usr/include/c++/11/condition_variable + /usr/include/c++/11/bits/atomic_futex.h + /usr/include/c++/11/bits/std_thread.h + /usr/include/boost/asio/placeholders.hpp + /usr/include/boost/bind/arg.hpp + /usr/include/boost/is_placeholder.hpp + /usr/include/boost/asio/posix/basic_descriptor.hpp + /usr/include/boost/asio/posix/basic_stream_descriptor.hpp + /usr/include/boost/asio/posix/descriptor.hpp + /usr/include/boost/asio/posix/stream_descriptor.hpp + /usr/include/boost/asio/read.hpp + /usr/include/boost/asio/impl/read.hpp + /usr/include/boost/asio/read_at.hpp + /usr/include/boost/asio/impl/read_at.hpp + /usr/include/boost/asio/read_until.hpp + /usr/include/boost/asio/detail/regex_fwd.hpp + /usr/include/boost/regex_fwd.hpp + /usr/include/boost/regex/config.hpp + /usr/include/boost/regex/user.hpp + /usr/include/boost/predef.h + /usr/include/boost/predef/language.h + /usr/include/boost/predef/language/stdc.h + /usr/include/boost/predef/version_number.h + /usr/include/boost/predef/make.h + /usr/include/boost/predef/detail/test.h + /usr/include/boost/predef/language/stdcpp.h + /usr/include/boost/predef/language/objc.h + /usr/include/boost/predef/language/cuda.h + /usr/include/boost/predef/architecture.h + /usr/include/boost/predef/architecture/alpha.h + /usr/include/boost/predef/architecture/arm.h + /usr/include/boost/predef/architecture/blackfin.h + /usr/include/boost/predef/architecture/convex.h + /usr/include/boost/predef/architecture/ia64.h + /usr/include/boost/predef/architecture/m68k.h + /usr/include/boost/predef/architecture/mips.h + /usr/include/boost/predef/architecture/parisc.h + /usr/include/boost/predef/architecture/ppc.h + /usr/include/boost/predef/architecture/ptx.h + /usr/include/boost/predef/architecture/pyramid.h + /usr/include/boost/predef/architecture/riscv.h + /usr/include/boost/predef/architecture/rs6k.h + /usr/include/boost/predef/architecture/sparc.h + /usr/include/boost/predef/architecture/superh.h + /usr/include/boost/predef/architecture/sys370.h + /usr/include/boost/predef/architecture/sys390.h + /usr/include/boost/predef/architecture/x86.h + /usr/include/boost/predef/architecture/x86/32.h + /usr/include/boost/predef/architecture/x86/64.h + /usr/include/boost/predef/architecture/z.h + /usr/include/boost/predef/compiler.h + /usr/include/boost/predef/compiler/borland.h + /usr/include/boost/predef/compiler/clang.h + /usr/include/boost/predef/compiler/comeau.h + /usr/include/boost/predef/compiler/compaq.h + /usr/include/boost/predef/compiler/diab.h + /usr/include/boost/predef/compiler/digitalmars.h + /usr/include/boost/predef/compiler/dignus.h + /usr/include/boost/predef/compiler/edg.h + /usr/include/boost/predef/compiler/ekopath.h + /usr/include/boost/predef/compiler/gcc_xml.h + /usr/include/boost/predef/compiler/gcc.h + /usr/include/boost/predef/detail/comp_detected.h + /usr/include/boost/predef/compiler/greenhills.h + /usr/include/boost/predef/compiler/hp_acc.h + /usr/include/boost/predef/compiler/iar.h + /usr/include/boost/predef/compiler/ibm.h + /usr/include/boost/predef/compiler/intel.h + /usr/include/boost/predef/compiler/kai.h + /usr/include/boost/predef/compiler/llvm.h + /usr/include/boost/predef/compiler/metaware.h + /usr/include/boost/predef/compiler/metrowerks.h + /usr/include/boost/predef/compiler/microtec.h + /usr/include/boost/predef/compiler/mpw.h + /usr/include/boost/predef/compiler/nvcc.h + /usr/include/boost/predef/compiler/palm.h + /usr/include/boost/predef/compiler/pgi.h + /usr/include/boost/predef/compiler/sgi_mipspro.h + /usr/include/boost/predef/compiler/sunpro.h + /usr/include/boost/predef/compiler/tendra.h + /usr/include/boost/predef/compiler/visualc.h + /usr/include/boost/predef/compiler/watcom.h + /usr/include/boost/predef/library.h + /usr/include/boost/predef/library/c.h + /usr/include/boost/predef/library/c/_prefix.h + /usr/include/boost/predef/detail/_cassert.h + /usr/include/boost/predef/library/c/cloudabi.h + /usr/include/boost/predef/library/c/gnu.h + /usr/include/boost/predef/library/c/uc.h + /usr/include/boost/predef/library/c/vms.h + /usr/include/boost/predef/library/c/zos.h + /usr/include/boost/predef/library/std.h + /usr/include/boost/predef/library/std/_prefix.h + /usr/include/boost/predef/detail/_exception.h + /usr/include/boost/predef/library/std/cxx.h + /usr/include/boost/predef/library/std/dinkumware.h + /usr/include/boost/predef/library/std/libcomo.h + /usr/include/boost/predef/library/std/modena.h + /usr/include/boost/predef/library/std/msl.h + /usr/include/boost/predef/library/std/roguewave.h + /usr/include/boost/predef/library/std/sgi.h + /usr/include/boost/predef/library/std/stdcpp3.h + /usr/include/boost/predef/library/std/stlport.h + /usr/include/boost/predef/library/std/vacpp.h + /usr/include/boost/predef/os.h + /usr/include/boost/predef/os/aix.h + /usr/include/boost/predef/os/amigaos.h + /usr/include/boost/predef/os/beos.h + /usr/include/boost/predef/os/bsd.h + /usr/include/boost/predef/os/macos.h + /usr/include/boost/predef/os/ios.h + /usr/include/boost/predef/os/bsd/bsdi.h + /usr/include/boost/predef/os/bsd/dragonfly.h + /usr/include/boost/predef/os/bsd/free.h + /usr/include/boost/predef/os/bsd/open.h + /usr/include/boost/predef/os/bsd/net.h + /usr/include/boost/predef/os/cygwin.h + /usr/include/boost/predef/os/haiku.h + /usr/include/boost/predef/os/hpux.h + /usr/include/boost/predef/os/irix.h + /usr/include/boost/predef/os/linux.h + /usr/include/boost/predef/detail/os_detected.h + /usr/include/boost/predef/os/os400.h + /usr/include/boost/predef/os/qnxnto.h + /usr/include/boost/predef/os/solaris.h + /usr/include/boost/predef/os/unix.h + /usr/include/boost/predef/os/vms.h + /usr/include/boost/predef/os/windows.h + /usr/include/boost/predef/other.h + /usr/include/boost/predef/other/endian.h + /usr/include/boost/predef/platform/android.h + /usr/include/boost/predef/platform.h + /usr/include/boost/predef/platform/cloudabi.h + /usr/include/boost/predef/platform/mingw.h + /usr/include/boost/predef/platform/mingw32.h + /usr/include/boost/predef/platform/mingw64.h + /usr/include/boost/predef/platform/windows_uwp.h + /usr/include/boost/predef/platform/windows_desktop.h + /usr/include/boost/predef/platform/windows_phone.h + /usr/include/boost/predef/platform/windows_server.h + /usr/include/boost/predef/platform/windows_store.h + /usr/include/boost/predef/platform/windows_system.h + /usr/include/boost/predef/platform/windows_runtime.h + /usr/include/boost/predef/platform/ios.h + /usr/include/boost/predef/hardware.h + /usr/include/boost/predef/hardware/simd.h + /usr/include/boost/predef/hardware/simd/x86.h + /usr/include/boost/predef/hardware/simd/x86/versions.h + /usr/include/boost/predef/hardware/simd/x86_amd.h + /usr/include/boost/predef/hardware/simd/x86_amd/versions.h + /usr/include/boost/predef/hardware/simd/arm.h + /usr/include/boost/predef/hardware/simd/arm/versions.h + /usr/include/boost/predef/hardware/simd/ppc.h + /usr/include/boost/predef/hardware/simd/ppc/versions.h + /usr/include/boost/predef/version.h + /usr/include/boost/regex/config/cwchar.hpp + /usr/include/boost/regex/v4/regex_fwd.hpp + /usr/include/boost/regex/v4/match_flags.hpp + /usr/include/boost/asio/impl/read_until.hpp + /usr/include/boost/asio/redirect_error.hpp + /usr/include/boost/asio/impl/redirect_error.hpp + /usr/include/boost/asio/require_concept.hpp + /usr/include/boost/asio/traits/require_concept_member.hpp + /usr/include/boost/asio/traits/require_concept_free.hpp + /usr/include/boost/asio/traits/static_require_concept.hpp + /usr/include/boost/asio/serial_port.hpp + /usr/include/boost/asio/signal_set.hpp + /usr/include/boost/asio/static_thread_pool.hpp + /usr/include/boost/asio/thread_pool.hpp + /usr/include/boost/asio/impl/thread_pool.hpp + /usr/include/boost/asio/detail/blocking_executor_op.hpp + /usr/include/boost/asio/detail/bulk_executor_op.hpp + /usr/include/boost/asio/impl/thread_pool.ipp + /usr/include/boost/asio/strand.hpp + /usr/include/boost/asio/detail/strand_executor_service.hpp + /usr/include/boost/asio/detail/impl/strand_executor_service.hpp + /usr/include/boost/asio/detail/impl/strand_executor_service.ipp + /usr/include/boost/asio/streambuf.hpp + /usr/include/boost/asio/system_timer.hpp + /usr/include/boost/asio/this_coro.hpp + /usr/include/boost/asio/use_awaitable.hpp + /usr/include/boost/asio/use_future.hpp + /usr/include/boost/asio/impl/use_future.hpp + /usr/include/boost/asio/version.hpp + /usr/include/boost/asio/windows/basic_object_handle.hpp + /usr/include/boost/asio/windows/basic_overlapped_handle.hpp + /usr/include/boost/asio/windows/basic_random_access_handle.hpp + /usr/include/boost/asio/windows/basic_stream_handle.hpp + /usr/include/boost/asio/windows/object_handle.hpp + /usr/include/boost/asio/windows/overlapped_handle.hpp + /usr/include/boost/asio/windows/overlapped_ptr.hpp + /usr/include/boost/asio/windows/random_access_handle.hpp + /usr/include/boost/asio/windows/stream_handle.hpp + /usr/include/boost/asio/write_at.hpp + /usr/include/boost/asio/impl/write_at.hpp + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/JsonRpc/RemoteEndPoint.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/lsp_diagnostic.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/lsRange.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/JsonRpc/serializer.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/JsonRpc/macro_map.h + /usr/include/boost/optional.hpp + /usr/include/boost/optional/optional.hpp + /usr/include/boost/core/explicit_operator_bool.hpp + /usr/include/boost/core/swap.hpp + /usr/include/boost/optional/bad_optional_access.hpp + /usr/include/boost/type_traits/alignment_of.hpp + /usr/include/boost/type_traits/has_nothrow_constructor.hpp + /usr/include/boost/type_traits/is_default_constructible.hpp + /usr/include/boost/type_traits/is_complete.hpp + /usr/include/boost/type_traits/declval.hpp + /usr/include/boost/type_traits/add_rvalue_reference.hpp + /usr/include/boost/type_traits/is_void.hpp + /usr/include/boost/type_traits/is_reference.hpp + /usr/include/boost/type_traits/is_lvalue_reference.hpp + /usr/include/boost/type_traits/is_rvalue_reference.hpp + /usr/include/boost/type_traits/remove_reference.hpp + /usr/include/boost/type_traits/is_function.hpp + /usr/include/boost/type_traits/detail/is_function_cxx_11.hpp + /usr/include/boost/type_traits/detail/yes_no_type.hpp + /usr/include/boost/type_traits/type_with_alignment.hpp + /usr/include/boost/type_traits/is_pod.hpp + /usr/include/boost/type_traits/is_scalar.hpp + /usr/include/boost/type_traits/is_enum.hpp + /usr/include/boost/type_traits/is_pointer.hpp + /usr/include/boost/type_traits/is_member_pointer.hpp + /usr/include/boost/type_traits/is_member_function_pointer.hpp + /usr/include/boost/type_traits/detail/is_member_function_pointer_cxx_11.hpp + /usr/include/boost/type_traits/remove_const.hpp + /usr/include/boost/type_traits/decay.hpp + /usr/include/boost/type_traits/is_array.hpp + /usr/include/boost/type_traits/remove_bounds.hpp + /usr/include/boost/type_traits/remove_extent.hpp + /usr/include/boost/type_traits/add_pointer.hpp + /usr/include/boost/type_traits/is_const.hpp + /usr/include/boost/type_traits/is_constructible.hpp + /usr/include/boost/type_traits/is_destructible.hpp + /usr/include/boost/type_traits/is_nothrow_move_assignable.hpp + /usr/include/boost/type_traits/has_trivial_move_assign.hpp + /usr/include/boost/type_traits/is_assignable.hpp + /usr/include/boost/type_traits/is_volatile.hpp + /usr/include/boost/type_traits/has_nothrow_assign.hpp + /usr/include/boost/type_traits/enable_if.hpp + /usr/include/boost/type_traits/is_nothrow_move_constructible.hpp + /usr/include/boost/move/utility.hpp + /usr/include/boost/move/detail/config_begin.hpp + /usr/include/boost/move/detail/workaround.hpp + /usr/include/boost/move/utility_core.hpp + /usr/include/boost/move/core.hpp + /usr/include/boost/move/detail/config_end.hpp + /usr/include/boost/move/detail/meta_utils.hpp + /usr/include/boost/move/detail/meta_utils_core.hpp + /usr/include/boost/move/traits.hpp + /usr/include/boost/move/detail/type_traits.hpp + /usr/include/boost/none.hpp + /usr/include/boost/none_t.hpp + /usr/include/boost/utility/compare_pointees.hpp + /usr/include/boost/utility/result_of.hpp + /usr/include/boost/preprocessor/iteration/iterate.hpp + /usr/include/boost/preprocessor/slot/slot.hpp + /usr/include/boost/preprocessor/slot/detail/def.hpp + /usr/include/boost/preprocessor/repetition/enum_binary_params.hpp + /usr/include/boost/preprocessor/repetition/enum_shifted_params.hpp + /usr/include/boost/preprocessor/facilities/intercept.hpp + /usr/include/boost/preprocessor/facilities/limits/intercept_256.hpp + /usr/include/boost/type_traits/type_identity.hpp + /usr/include/boost/preprocessor/iteration/detail/iter/forward1.hpp + /usr/include/boost/preprocessor/iteration/detail/bounds/lower1.hpp + /usr/include/boost/preprocessor/slot/detail/shared.hpp + /usr/include/boost/preprocessor/iteration/detail/bounds/upper1.hpp + /usr/include/boost/preprocessor/iteration/detail/iter/limits/forward1_256.hpp + /usr/include/boost/utility/detail/result_of_iterate.hpp + /usr/include/boost/optional/optional_fwd.hpp + /usr/include/boost/optional/detail/optional_config.hpp + /usr/include/boost/optional/detail/optional_factory_support.hpp + /usr/include/boost/optional/detail/optional_aligned_storage.hpp + /usr/include/boost/optional/detail/optional_trivially_copyable_base.hpp + /usr/include/boost/optional/detail/optional_reference_spec.hpp + /usr/include/boost/optional/detail/optional_relops.hpp + /usr/include/boost/optional/detail/optional_swap.hpp + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/lsPosition.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/lsTextEdit.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/lsDocumentUri.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/lsResponseError.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/lsAny.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/JsonRpc/message.h + /usr/include/c++/11/iostream + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/method_type.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/location_type.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/JsonRpc/RequestInMessage.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/JsonRpc/lsRequestId.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/JsonRpc/lsResponseMessage.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/JsonRpc/Cancellation.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/JsonRpc/NotificationInMessage.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/JsonRpc/traits.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/JsonRpc/threaded_queue.h + /usr/include/c++/11/deque + /usr/include/c++/11/bits/stl_deque.h + /usr/include/c++/11/bits/deque.tcc + /usr/include/c++/11/unordered_map + /usr/include/c++/11/bits/hashtable.h + /usr/include/c++/11/bits/hashtable_policy.h + /usr/include/c++/11/bits/unordered_map.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/JsonRpc/MessageIssue.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/JsonRpc/MessageJsonHandler.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/JsonRpc/Endpoint.h + /usr/include/boost/bind/bind.hpp + /usr/include/boost/ref.hpp + /usr/include/boost/core/ref.hpp + /usr/include/boost/mem_fn.hpp + /usr/include/boost/bind/mem_fn.hpp + /usr/include/boost/get_pointer.hpp + /usr/include/boost/config/no_tr1/memory.hpp + /usr/include/boost/bind/mem_fn_template.hpp + /usr/include/boost/bind/mem_fn_cc.hpp + /usr/include/boost/bind/detail/result_traits.hpp + /usr/include/boost/visit_each.hpp + /usr/include/boost/core/is_same.hpp + /usr/include/boost/bind/storage.hpp + /usr/include/boost/bind/bind_cc.hpp + /usr/include/boost/bind/bind_mf_cc.hpp + /usr/include/boost/bind/bind_mf2_cc.hpp + /usr/include/boost/bind/placeholders.hpp + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/JsonRpc/stream.h + +CMakeFiles/lspcpp.dir/src/jsonrpc/WebSocketServer.cpp.o + /usr/local/src/asymptote-2.78/LspCpp/src/jsonrpc/WebSocketServer.cpp + /usr/include/stdc-predef.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/JsonRpc/MessageIssue.h + /usr/include/c++/11/string + /usr/include/c++/11/x86_64-redhat-linux/bits/c++config.h + /usr/include/bits/wordsize.h + /usr/include/c++/11/x86_64-redhat-linux/bits/os_defines.h + /usr/include/features.h + /usr/include/sys/cdefs.h + /usr/include/bits/long-double.h + /usr/include/gnu/stubs.h + /usr/include/gnu/stubs-64.h + /usr/include/c++/11/x86_64-redhat-linux/bits/cpu_defines.h + /usr/include/c++/11/bits/stringfwd.h + /usr/include/c++/11/bits/memoryfwd.h + /usr/include/c++/11/bits/char_traits.h + /usr/include/c++/11/bits/stl_algobase.h + /usr/include/c++/11/bits/functexcept.h + /usr/include/c++/11/bits/exception_defines.h + /usr/include/c++/11/bits/cpp_type_traits.h + /usr/include/c++/11/ext/type_traits.h + /usr/include/c++/11/ext/numeric_traits.h + /usr/include/c++/11/bits/stl_pair.h + /usr/include/c++/11/bits/move.h + /usr/include/c++/11/type_traits + /usr/include/c++/11/bits/stl_iterator_base_types.h + /usr/include/c++/11/bits/stl_iterator_base_funcs.h + /usr/include/c++/11/bits/concept_check.h + /usr/include/c++/11/debug/assertions.h + /usr/include/c++/11/bits/stl_iterator.h + /usr/include/c++/11/bits/ptr_traits.h + /usr/include/c++/11/debug/debug.h + /usr/include/c++/11/bits/predefined_ops.h + /usr/include/c++/11/bits/postypes.h + /usr/include/c++/11/cwchar + /usr/include/wchar.h + /usr/include/bits/libc-header-start.h + /usr/include/bits/floatn.h + /usr/include/bits/floatn-common.h + /usr/lib/gcc/x86_64-redhat-linux/11/include/stddef.h + /usr/lib/gcc/x86_64-redhat-linux/11/include/stdarg.h + /usr/include/bits/wchar.h + /usr/include/bits/types/wint_t.h + /usr/include/bits/types/mbstate_t.h + /usr/include/bits/types/__mbstate_t.h + /usr/include/bits/types/__FILE.h + /usr/include/bits/types/FILE.h + /usr/include/bits/types/locale_t.h + /usr/include/bits/types/__locale_t.h + /usr/include/c++/11/cstdint + /usr/lib/gcc/x86_64-redhat-linux/11/include/stdint.h + /usr/include/stdint.h + /usr/include/bits/types.h + /usr/include/bits/timesize.h + /usr/include/bits/typesizes.h + /usr/include/bits/time64.h + /usr/include/bits/stdint-intn.h + /usr/include/bits/stdint-uintn.h + /usr/include/c++/11/bits/allocator.h + /usr/include/c++/11/x86_64-redhat-linux/bits/c++allocator.h + /usr/include/c++/11/ext/new_allocator.h + /usr/include/c++/11/new + /usr/include/c++/11/bits/exception.h + /usr/include/c++/11/bits/localefwd.h + /usr/include/c++/11/x86_64-redhat-linux/bits/c++locale.h + /usr/include/c++/11/clocale + /usr/include/locale.h + /usr/include/bits/locale.h + /usr/include/c++/11/iosfwd + /usr/include/c++/11/cctype + /usr/include/ctype.h + /usr/include/bits/endian.h + /usr/include/bits/endianness.h + /usr/include/c++/11/bits/ostream_insert.h + /usr/include/c++/11/bits/cxxabi_forced.h + /usr/include/c++/11/bits/stl_function.h + /usr/include/c++/11/backward/binders.h + /usr/include/c++/11/bits/range_access.h + /usr/include/c++/11/initializer_list + /usr/include/c++/11/bits/basic_string.h + /usr/include/c++/11/ext/atomicity.h + /usr/include/c++/11/x86_64-redhat-linux/bits/gthr.h + /usr/include/c++/11/x86_64-redhat-linux/bits/gthr-default.h + /usr/include/pthread.h + /usr/include/sched.h + /usr/include/bits/types/time_t.h + /usr/include/bits/types/struct_timespec.h + /usr/include/bits/sched.h + /usr/include/bits/types/struct_sched_param.h + /usr/include/bits/cpu-set.h + /usr/include/time.h + /usr/include/bits/time.h + /usr/include/bits/timex.h + /usr/include/bits/types/struct_timeval.h + /usr/include/bits/types/clock_t.h + /usr/include/bits/types/struct_tm.h + /usr/include/bits/types/clockid_t.h + /usr/include/bits/types/timer_t.h + /usr/include/bits/types/struct_itimerspec.h + /usr/include/bits/pthreadtypes.h + /usr/include/bits/thread-shared-types.h + /usr/include/bits/pthreadtypes-arch.h + /usr/include/bits/struct_mutex.h + /usr/include/bits/struct_rwlock.h + /usr/include/bits/setjmp.h + /usr/include/bits/types/__sigset_t.h + /usr/include/bits/types/struct___jmp_buf_tag.h + /usr/include/c++/11/x86_64-redhat-linux/bits/atomic_word.h + /usr/include/sys/single_threaded.h + /usr/include/c++/11/ext/alloc_traits.h + /usr/include/c++/11/bits/alloc_traits.h + /usr/include/c++/11/bits/stl_construct.h + /usr/include/c++/11/ext/string_conversions.h + /usr/include/c++/11/cstdlib + /usr/include/stdlib.h + /usr/include/bits/waitflags.h + /usr/include/bits/waitstatus.h + /usr/include/sys/types.h + /usr/include/endian.h + /usr/include/bits/byteswap.h + /usr/include/bits/uintn-identity.h + /usr/include/sys/select.h + /usr/include/bits/select.h + /usr/include/bits/types/sigset_t.h + /usr/include/alloca.h + /usr/include/bits/stdlib-bsearch.h + /usr/include/bits/stdlib-float.h + /usr/include/c++/11/bits/std_abs.h + /usr/include/c++/11/cstdio + /usr/include/stdio.h + /usr/include/bits/types/__fpos_t.h + /usr/include/bits/types/__fpos64_t.h + /usr/include/bits/types/struct_FILE.h + /usr/include/bits/types/cookie_io_functions_t.h + /usr/include/bits/stdio_lim.h + /usr/include/bits/stdio.h + /usr/include/c++/11/cerrno + /usr/include/errno.h + /usr/include/bits/errno.h + /usr/include/linux/errno.h + /usr/include/asm/errno.h + /usr/include/asm-generic/errno.h + /usr/include/asm-generic/errno-base.h + /usr/include/bits/types/error_t.h + /usr/include/c++/11/bits/charconv.h + /usr/include/c++/11/bits/functional_hash.h + /usr/include/c++/11/bits/hash_bytes.h + /usr/include/c++/11/bits/basic_string.tcc + /usr/include/c++/11/functional + /usr/include/c++/11/tuple + /usr/include/c++/11/utility + /usr/include/c++/11/bits/stl_relops.h + /usr/include/c++/11/array + /usr/include/c++/11/bits/uses_allocator.h + /usr/include/c++/11/bits/invoke.h + /usr/include/c++/11/bits/refwrap.h + /usr/include/c++/11/bits/std_function.h + /usr/include/c++/11/typeinfo + /usr/include/c++/11/vector + /usr/include/c++/11/bits/stl_uninitialized.h + /usr/include/c++/11/bits/stl_vector.h + /usr/include/c++/11/bits/stl_bvector.h + /usr/include/c++/11/bits/vector.tcc + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/JsonRpc/WebSocketServer.h + /usr/include/boost/asio.hpp + /usr/include/boost/asio/associated_allocator.hpp + /usr/include/boost/asio/detail/config.hpp + /usr/include/boost/config.hpp + /usr/include/boost/config/user.hpp + /usr/include/boost/config/detail/select_compiler_config.hpp + /usr/include/boost/config/compiler/gcc.hpp + /usr/include/c++/11/cstddef + /usr/include/boost/config/detail/select_stdlib_config.hpp + /usr/include/c++/11/version + /usr/include/boost/config/stdlib/libstdcpp3.hpp + /usr/include/unistd.h + /usr/include/bits/posix_opt.h + /usr/include/bits/environments.h + /usr/include/bits/confname.h + /usr/include/bits/getopt_posix.h + /usr/include/bits/getopt_core.h + /usr/include/bits/unistd_ext.h + /usr/include/boost/config/detail/select_platform_config.hpp + /usr/include/boost/config/platform/linux.hpp + /usr/include/boost/config/detail/posix_features.hpp + /usr/include/boost/config/detail/suffix.hpp + /usr/include/boost/config/helper_macros.hpp + /usr/include/boost/version.hpp + /usr/include/linux/version.h + /usr/include/c++/11/memory + /usr/include/c++/11/bits/stl_tempbuf.h + /usr/include/c++/11/bits/stl_raw_storage_iter.h + /usr/include/c++/11/bits/align.h + /usr/include/c++/11/bit + /usr/include/c++/11/bits/unique_ptr.h + /usr/include/c++/11/bits/shared_ptr.h + /usr/include/c++/11/bits/shared_ptr_base.h + /usr/include/c++/11/bits/allocated_ptr.h + /usr/include/c++/11/ext/aligned_buffer.h + /usr/include/c++/11/ext/concurrence.h + /usr/include/c++/11/exception + /usr/include/c++/11/bits/exception_ptr.h + /usr/include/c++/11/bits/cxxabi_init_exception.h + /usr/include/c++/11/bits/nested_exception.h + /usr/include/c++/11/bits/shared_ptr_atomic.h + /usr/include/c++/11/bits/atomic_base.h + /usr/include/c++/11/bits/atomic_lockfree_defines.h + /usr/include/c++/11/backward/auto_ptr.h + /usr/include/boost/asio/detail/type_traits.hpp + /usr/include/boost/asio/detail/push_options.hpp + /usr/include/boost/asio/detail/pop_options.hpp + /usr/include/boost/asio/associated_executor.hpp + /usr/include/boost/asio/execution/executor.hpp + /usr/include/boost/asio/execution/execute.hpp + /usr/include/boost/asio/execution/detail/as_invocable.hpp + /usr/include/boost/asio/detail/atomic_count.hpp + /usr/include/c++/11/atomic + /usr/include/boost/asio/detail/memory.hpp + /usr/include/boost/asio/execution/receiver_invocation_error.hpp + /usr/include/c++/11/stdexcept + /usr/include/boost/asio/execution/impl/receiver_invocation_error.ipp + /usr/include/boost/asio/execution/set_done.hpp + /usr/include/boost/asio/traits/set_done_member.hpp + /usr/include/boost/asio/traits/set_done_free.hpp + /usr/include/boost/asio/execution/set_error.hpp + /usr/include/boost/asio/traits/set_error_member.hpp + /usr/include/boost/asio/traits/set_error_free.hpp + /usr/include/boost/asio/execution/set_value.hpp + /usr/include/boost/asio/detail/variadic_templates.hpp + /usr/include/boost/asio/traits/set_value_member.hpp + /usr/include/boost/asio/traits/set_value_free.hpp + /usr/include/boost/asio/execution/detail/as_receiver.hpp + /usr/include/boost/asio/traits/execute_member.hpp + /usr/include/boost/asio/traits/execute_free.hpp + /usr/include/boost/asio/execution/invocable_archetype.hpp + /usr/include/boost/asio/traits/equality_comparable.hpp + /usr/include/boost/asio/is_executor.hpp + /usr/include/boost/asio/detail/is_executor.hpp + /usr/include/boost/asio/system_executor.hpp + /usr/include/boost/asio/execution.hpp + /usr/include/boost/asio/execution/allocator.hpp + /usr/include/boost/asio/execution/scheduler.hpp + /usr/include/boost/asio/execution/schedule.hpp + /usr/include/boost/asio/traits/schedule_member.hpp + /usr/include/boost/asio/traits/schedule_free.hpp + /usr/include/boost/asio/execution/sender.hpp + /usr/include/boost/asio/execution/detail/void_receiver.hpp + /usr/include/boost/asio/execution/receiver.hpp + /usr/include/boost/asio/execution/connect.hpp + /usr/include/boost/asio/execution/detail/as_operation.hpp + /usr/include/boost/asio/traits/start_member.hpp + /usr/include/boost/asio/execution/operation_state.hpp + /usr/include/boost/asio/execution/start.hpp + /usr/include/boost/asio/traits/start_free.hpp + /usr/include/boost/asio/traits/connect_member.hpp + /usr/include/boost/asio/traits/connect_free.hpp + /usr/include/boost/asio/is_applicable_property.hpp + /usr/include/boost/asio/traits/query_static_constexpr_member.hpp + /usr/include/boost/asio/traits/static_query.hpp + /usr/include/boost/asio/execution/any_executor.hpp + /usr/include/boost/asio/detail/assert.hpp + /usr/include/boost/assert.hpp + /usr/include/assert.h + /usr/include/boost/asio/detail/cstddef.hpp + /usr/include/boost/asio/detail/executor_function.hpp + /usr/include/boost/asio/detail/handler_alloc_helpers.hpp + /usr/include/boost/asio/detail/noncopyable.hpp + /usr/include/boost/asio/detail/recycling_allocator.hpp + /usr/include/boost/asio/detail/thread_context.hpp + /usr/include/c++/11/climits + /usr/lib/gcc/x86_64-redhat-linux/11/include/limits.h + /usr/lib/gcc/x86_64-redhat-linux/11/include/syslimits.h + /usr/include/limits.h + /usr/include/bits/posix1_lim.h + /usr/include/bits/local_lim.h + /usr/include/linux/limits.h + /usr/include/bits/posix2_lim.h + /usr/include/bits/xopen_lim.h + /usr/include/bits/uio_lim.h + /usr/include/boost/asio/detail/call_stack.hpp + /usr/include/boost/asio/detail/tss_ptr.hpp + /usr/include/boost/asio/detail/keyword_tss_ptr.hpp + /usr/include/boost/asio/detail/thread_info_base.hpp + /usr/include/boost/asio/multiple_exceptions.hpp + /usr/include/boost/asio/impl/multiple_exceptions.ipp + /usr/include/boost/asio/handler_alloc_hook.hpp + /usr/include/boost/asio/impl/handler_alloc_hook.ipp + /usr/include/boost/asio/detail/handler_invoke_helpers.hpp + /usr/include/boost/asio/handler_invoke_hook.hpp + /usr/include/boost/asio/detail/non_const_lvalue.hpp + /usr/include/boost/asio/detail/scoped_ptr.hpp + /usr/include/boost/asio/detail/throw_exception.hpp + /usr/include/boost/throw_exception.hpp + /usr/include/boost/assert/source_location.hpp + /usr/include/boost/current_function.hpp + /usr/include/boost/cstdint.hpp + /usr/include/boost/config/workaround.hpp + /usr/include/boost/exception/exception.hpp + /usr/include/boost/asio/execution/bad_executor.hpp + /usr/include/boost/asio/execution/impl/bad_executor.ipp + /usr/include/boost/asio/execution/blocking.hpp + /usr/include/boost/asio/prefer.hpp + /usr/include/boost/asio/traits/prefer_free.hpp + /usr/include/boost/asio/traits/prefer_member.hpp + /usr/include/boost/asio/traits/require_free.hpp + /usr/include/boost/asio/traits/require_member.hpp + /usr/include/boost/asio/traits/static_require.hpp + /usr/include/boost/asio/query.hpp + /usr/include/boost/asio/traits/query_member.hpp + /usr/include/boost/asio/traits/query_free.hpp + /usr/include/boost/asio/require.hpp + /usr/include/boost/asio/execution/blocking_adaptation.hpp + /usr/include/boost/asio/detail/event.hpp + /usr/include/boost/asio/detail/posix_event.hpp + /usr/include/boost/asio/detail/impl/posix_event.ipp + /usr/include/boost/asio/detail/throw_error.hpp + /usr/include/boost/system/error_code.hpp + /usr/include/boost/system/detail/error_code.hpp + /usr/include/boost/system/detail/error_category.hpp + /usr/include/boost/system/detail/config.hpp + /usr/include/c++/11/system_error + /usr/include/c++/11/x86_64-redhat-linux/bits/error_constants.h + /usr/include/boost/system/detail/error_condition.hpp + /usr/include/boost/system/detail/generic_category.hpp + /usr/include/boost/system/detail/generic_category_message.hpp + /usr/include/c++/11/cstring + /usr/include/string.h + /usr/include/strings.h + /usr/include/boost/system/detail/enable_if.hpp + /usr/include/boost/system/is_error_condition_enum.hpp + /usr/include/boost/system/detail/system_category.hpp + /usr/include/boost/system/is_error_code_enum.hpp + /usr/include/c++/11/ostream + /usr/include/c++/11/ios + /usr/include/c++/11/bits/ios_base.h + /usr/include/c++/11/bits/locale_classes.h + /usr/include/c++/11/bits/locale_classes.tcc + /usr/include/c++/11/streambuf + /usr/include/c++/11/bits/streambuf.tcc + /usr/include/c++/11/bits/basic_ios.h + /usr/include/c++/11/bits/locale_facets.h + /usr/include/c++/11/cwctype + /usr/include/wctype.h + /usr/include/bits/wctype-wchar.h + /usr/include/c++/11/x86_64-redhat-linux/bits/ctype_base.h + /usr/include/c++/11/bits/streambuf_iterator.h + /usr/include/c++/11/x86_64-redhat-linux/bits/ctype_inline.h + /usr/include/c++/11/bits/locale_facets.tcc + /usr/include/c++/11/bits/basic_ios.tcc + /usr/include/c++/11/bits/ostream.tcc + /usr/include/boost/system/error_category.hpp + /usr/include/boost/system/detail/error_category_impl.hpp + /usr/include/boost/system/detail/to_std_category.hpp + /usr/include/c++/11/map + /usr/include/c++/11/bits/stl_tree.h + /usr/include/c++/11/bits/stl_map.h + /usr/include/c++/11/bits/stl_multimap.h + /usr/include/c++/11/bits/erase_if.h + /usr/include/c++/11/mutex + /usr/include/c++/11/chrono + /usr/include/c++/11/ratio + /usr/include/c++/11/limits + /usr/include/c++/11/ctime + /usr/include/c++/11/bits/parse_numbers.h + /usr/include/c++/11/bits/std_mutex.h + /usr/include/c++/11/bits/unique_lock.h + /usr/include/boost/system/error_condition.hpp + /usr/include/boost/system/errc.hpp + /usr/include/boost/system/detail/errc.hpp + /usr/include/boost/system/detail/cerrno.hpp + /usr/include/boost/system/generic_category.hpp + /usr/include/boost/system/system_category.hpp + /usr/include/boost/system/detail/system_category_impl.hpp + /usr/include/boost/system/api_config.hpp + /usr/include/boost/system/detail/is_generic_value.hpp + /usr/include/boost/system/detail/throws.hpp + /usr/include/boost/asio/detail/impl/throw_error.ipp + /usr/include/boost/system/system_error.hpp + /usr/include/c++/11/cassert + /usr/include/boost/asio/error.hpp + /usr/include/boost/cerrno.hpp + /usr/include/netdb.h + /usr/include/netinet/in.h + /usr/include/sys/socket.h + /usr/include/bits/types/struct_iovec.h + /usr/include/bits/socket.h + /usr/include/bits/socket_type.h + /usr/include/bits/sockaddr.h + /usr/include/asm/socket.h + /usr/include/asm-generic/socket.h + /usr/include/linux/posix_types.h + /usr/include/linux/stddef.h + /usr/include/asm/posix_types.h + /usr/include/asm/posix_types_64.h + /usr/include/asm-generic/posix_types.h + /usr/include/asm/bitsperlong.h + /usr/include/asm-generic/bitsperlong.h + /usr/include/asm/sockios.h + /usr/include/asm-generic/sockios.h + /usr/include/bits/types/struct_osockaddr.h + /usr/include/bits/in.h + /usr/include/rpc/netdb.h + /usr/include/bits/types/sigevent_t.h + /usr/include/bits/types/__sigval_t.h + /usr/include/bits/netdb.h + /usr/include/boost/asio/impl/error.ipp + /usr/include/boost/asio/detail/mutex.hpp + /usr/include/boost/asio/detail/posix_mutex.hpp + /usr/include/boost/asio/detail/scoped_lock.hpp + /usr/include/boost/asio/detail/impl/posix_mutex.ipp + /usr/include/boost/asio/execution/bulk_execute.hpp + /usr/include/boost/asio/execution/bulk_guarantee.hpp + /usr/include/boost/asio/execution/detail/bulk_sender.hpp + /usr/include/boost/asio/traits/bulk_execute_member.hpp + /usr/include/boost/asio/traits/bulk_execute_free.hpp + /usr/include/boost/asio/execution/context.hpp + /usr/include/boost/asio/execution/context_as.hpp + /usr/include/boost/asio/execution/mapping.hpp + /usr/include/boost/asio/execution/occupancy.hpp + /usr/include/boost/asio/execution/outstanding_work.hpp + /usr/include/boost/asio/execution/prefer_only.hpp + /usr/include/boost/asio/execution/relationship.hpp + /usr/include/boost/asio/execution/submit.hpp + /usr/include/boost/asio/execution/detail/submit_receiver.hpp + /usr/include/boost/asio/traits/submit_member.hpp + /usr/include/boost/asio/traits/submit_free.hpp + /usr/include/boost/asio/impl/system_executor.hpp + /usr/include/boost/asio/detail/executor_op.hpp + /usr/include/boost/asio/detail/fenced_block.hpp + /usr/include/boost/asio/detail/std_fenced_block.hpp + /usr/include/boost/asio/detail/scheduler_operation.hpp + /usr/include/boost/asio/detail/handler_tracking.hpp + /usr/include/boost/asio/detail/impl/handler_tracking.ipp + /usr/include/boost/asio/detail/op_queue.hpp + /usr/include/boost/asio/detail/global.hpp + /usr/include/boost/asio/detail/posix_global.hpp + /usr/include/boost/asio/system_context.hpp + /usr/include/boost/asio/detail/scheduler.hpp + /usr/include/boost/asio/execution_context.hpp + /usr/include/boost/asio/impl/execution_context.hpp + /usr/include/boost/asio/detail/handler_type_requirements.hpp + /usr/include/boost/asio/async_result.hpp + /usr/include/boost/asio/detail/service_registry.hpp + /usr/include/boost/asio/detail/impl/service_registry.hpp + /usr/include/boost/asio/detail/impl/service_registry.ipp + /usr/include/boost/asio/impl/execution_context.ipp + /usr/include/boost/asio/detail/conditionally_enabled_event.hpp + /usr/include/boost/asio/detail/conditionally_enabled_mutex.hpp + /usr/include/boost/asio/detail/null_event.hpp + /usr/include/boost/asio/detail/impl/null_event.ipp + /usr/include/boost/asio/detail/reactor_fwd.hpp + /usr/include/boost/asio/detail/thread.hpp + /usr/include/boost/asio/detail/posix_thread.hpp + /usr/include/boost/asio/detail/impl/posix_thread.ipp + /usr/include/boost/asio/detail/impl/scheduler.ipp + /usr/include/boost/asio/detail/concurrency_hint.hpp + /usr/include/boost/asio/detail/limits.hpp + /usr/include/boost/limits.hpp + /usr/include/boost/asio/detail/reactor.hpp + /usr/include/boost/asio/detail/epoll_reactor.hpp + /usr/include/boost/asio/detail/object_pool.hpp + /usr/include/boost/asio/detail/reactor_op.hpp + /usr/include/boost/asio/detail/operation.hpp + /usr/include/boost/asio/detail/select_interrupter.hpp + /usr/include/boost/asio/detail/eventfd_select_interrupter.hpp + /usr/include/boost/asio/detail/impl/eventfd_select_interrupter.ipp + /usr/include/sys/stat.h + /usr/include/bits/stat.h + /usr/include/bits/struct_stat.h + /usr/include/bits/statx.h + /usr/include/linux/stat.h + /usr/include/linux/types.h + /usr/include/asm/types.h + /usr/include/asm-generic/types.h + /usr/include/asm-generic/int-ll64.h + /usr/include/bits/statx-generic.h + /usr/include/bits/types/struct_statx_timestamp.h + /usr/include/bits/types/struct_statx.h + /usr/include/fcntl.h + /usr/include/bits/fcntl.h + /usr/include/bits/fcntl-linux.h + /usr/include/linux/falloc.h + /usr/include/sys/eventfd.h + /usr/include/bits/eventfd.h + /usr/include/boost/asio/detail/cstdint.hpp + /usr/include/boost/asio/detail/socket_types.hpp + /usr/include/sys/ioctl.h + /usr/include/bits/ioctls.h + /usr/include/asm/ioctls.h + /usr/include/asm-generic/ioctls.h + /usr/include/linux/ioctl.h + /usr/include/asm/ioctl.h + /usr/include/asm-generic/ioctl.h + /usr/include/bits/ioctl-types.h + /usr/include/sys/ttydefaults.h + /usr/include/poll.h + /usr/include/sys/poll.h + /usr/include/bits/poll.h + /usr/include/sys/uio.h + /usr/include/bits/uio-ext.h + /usr/include/sys/un.h + /usr/include/netinet/tcp.h + /usr/include/arpa/inet.h + /usr/include/net/if.h + /usr/include/boost/asio/detail/timer_queue_base.hpp + /usr/include/boost/asio/detail/timer_queue_set.hpp + /usr/include/boost/asio/detail/impl/timer_queue_set.ipp + /usr/include/boost/asio/detail/wait_op.hpp + /usr/include/sys/timerfd.h + /usr/include/bits/timerfd.h + /usr/include/boost/asio/detail/impl/epoll_reactor.hpp + /usr/include/boost/asio/detail/impl/epoll_reactor.ipp + /usr/include/sys/epoll.h + /usr/include/bits/epoll.h + /usr/include/boost/asio/detail/scheduler_thread_info.hpp + /usr/include/boost/asio/detail/signal_blocker.hpp + /usr/include/boost/asio/detail/posix_signal_blocker.hpp + /usr/include/c++/11/csignal + /usr/include/signal.h + /usr/include/bits/signum-generic.h + /usr/include/bits/signum-arch.h + /usr/include/bits/types/sig_atomic_t.h + /usr/include/bits/types/siginfo_t.h + /usr/include/bits/siginfo-arch.h + /usr/include/bits/siginfo-consts.h + /usr/include/bits/siginfo-consts-arch.h + /usr/include/bits/types/sigval_t.h + /usr/include/bits/sigevent-consts.h + /usr/include/bits/sigaction.h + /usr/include/bits/sigcontext.h + /usr/include/bits/types/stack_t.h + /usr/include/sys/ucontext.h + /usr/include/bits/sigstack.h + /usr/include/bits/ss_flags.h + /usr/include/bits/types/struct_sigstack.h + /usr/include/bits/sigthread.h + /usr/include/bits/signal_ext.h + /usr/include/boost/asio/detail/thread_group.hpp + /usr/include/boost/asio/impl/system_context.hpp + /usr/include/boost/asio/impl/system_context.ipp + /usr/include/boost/asio/awaitable.hpp + /usr/include/boost/asio/basic_datagram_socket.hpp + /usr/include/boost/asio/basic_socket.hpp + /usr/include/boost/asio/any_io_executor.hpp + /usr/include/boost/asio/detail/io_object_impl.hpp + /usr/include/boost/asio/io_context.hpp + /usr/include/boost/asio/detail/wrapped_handler.hpp + /usr/include/boost/asio/detail/bind_handler.hpp + /usr/include/boost/asio/detail/handler_cont_helpers.hpp + /usr/include/boost/asio/handler_continuation_hook.hpp + /usr/include/boost/asio/detail/chrono.hpp + /usr/include/boost/asio/impl/io_context.hpp + /usr/include/boost/asio/detail/completion_handler.hpp + /usr/include/boost/asio/detail/handler_work.hpp + /usr/include/boost/asio/executor_work_guard.hpp + /usr/include/boost/asio/impl/io_context.ipp + /usr/include/boost/asio/post.hpp + /usr/include/boost/asio/impl/post.hpp + /usr/include/boost/asio/detail/work_dispatcher.hpp + /usr/include/boost/asio/socket_base.hpp + /usr/include/boost/asio/detail/io_control.hpp + /usr/include/boost/asio/detail/socket_option.hpp + /usr/include/boost/asio/detail/reactive_socket_service.hpp + /usr/include/boost/asio/buffer.hpp + /usr/include/boost/asio/detail/array_fwd.hpp + /usr/include/boost/asio/detail/string_view.hpp + /usr/include/c++/11/experimental/string_view + /usr/include/c++/11/bits/ranges_base.h + /usr/include/c++/11/experimental/bits/lfts_config.h + /usr/include/c++/11/experimental/bits/string_view.tcc + /usr/include/boost/detail/workaround.hpp + /usr/include/boost/asio/detail/is_buffer_sequence.hpp + /usr/include/boost/asio/detail/buffer_sequence_adapter.hpp + /usr/include/boost/asio/detail/impl/buffer_sequence_adapter.ipp + /usr/include/boost/asio/detail/reactive_null_buffers_op.hpp + /usr/include/boost/asio/detail/reactive_socket_accept_op.hpp + /usr/include/boost/asio/detail/socket_holder.hpp + /usr/include/boost/asio/detail/socket_ops.hpp + /usr/include/boost/asio/detail/impl/socket_ops.ipp + /usr/include/boost/asio/detail/reactive_socket_connect_op.hpp + /usr/include/boost/asio/detail/reactive_socket_recvfrom_op.hpp + /usr/include/boost/asio/detail/reactive_socket_sendto_op.hpp + /usr/include/boost/asio/detail/reactive_socket_service_base.hpp + /usr/include/boost/asio/detail/reactive_socket_recv_op.hpp + /usr/include/boost/asio/detail/reactive_socket_recvmsg_op.hpp + /usr/include/boost/asio/detail/reactive_socket_send_op.hpp + /usr/include/boost/asio/detail/reactive_wait_op.hpp + /usr/include/boost/asio/detail/impl/reactive_socket_service_base.ipp + /usr/include/boost/asio/basic_deadline_timer.hpp + /usr/include/boost/asio/detail/deadline_timer_service.hpp + /usr/include/boost/asio/detail/timer_queue.hpp + /usr/include/boost/asio/detail/date_time_fwd.hpp + /usr/include/boost/asio/detail/timer_queue_ptime.hpp + /usr/include/boost/asio/time_traits.hpp + /usr/include/boost/date_time/posix_time/posix_time_types.hpp + /usr/include/boost/date_time/time_clock.hpp + /usr/include/boost/date_time/c_time.hpp + /usr/include/boost/date_time/compiler_config.hpp + /usr/include/boost/date_time/locale_config.hpp + /usr/include/boost/config/auto_link.hpp + /usr/include/sys/time.h + /usr/include/boost/shared_ptr.hpp + /usr/include/boost/smart_ptr/shared_ptr.hpp + /usr/include/boost/smart_ptr/detail/shared_count.hpp + /usr/include/boost/smart_ptr/bad_weak_ptr.hpp + /usr/include/boost/smart_ptr/detail/sp_counted_base.hpp + /usr/include/boost/smart_ptr/detail/sp_has_gcc_intrinsics.hpp + /usr/include/boost/smart_ptr/detail/sp_has_sync_intrinsics.hpp + /usr/include/boost/smart_ptr/detail/sp_counted_base_gcc_atomic.hpp + /usr/include/boost/smart_ptr/detail/sp_typeinfo_.hpp + /usr/include/boost/smart_ptr/detail/sp_counted_impl.hpp + /usr/include/boost/smart_ptr/detail/sp_noexcept.hpp + /usr/include/boost/checked_delete.hpp + /usr/include/boost/core/checked_delete.hpp + /usr/include/boost/core/addressof.hpp + /usr/include/boost/smart_ptr/detail/sp_disable_deprecated.hpp + /usr/include/boost/smart_ptr/detail/sp_convertible.hpp + /usr/include/boost/smart_ptr/detail/sp_nullptr_t.hpp + /usr/include/boost/smart_ptr/detail/spinlock_pool.hpp + /usr/include/boost/smart_ptr/detail/spinlock.hpp + /usr/include/boost/smart_ptr/detail/spinlock_gcc_atomic.hpp + /usr/include/boost/smart_ptr/detail/yield_k.hpp + /usr/include/boost/smart_ptr/detail/sp_thread_pause.hpp + /usr/include/boost/smart_ptr/detail/sp_thread_sleep.hpp + /usr/include/boost/config/pragma_message.hpp + /usr/include/c++/11/algorithm + /usr/include/c++/11/bits/stl_algo.h + /usr/include/c++/11/bits/algorithmfwd.h + /usr/include/c++/11/bits/stl_heap.h + /usr/include/c++/11/bits/uniform_int_dist.h + /usr/include/boost/smart_ptr/detail/operator_bool.hpp + /usr/include/boost/smart_ptr/detail/local_sp_deleter.hpp + /usr/include/boost/smart_ptr/detail/local_counted_base.hpp + /usr/include/boost/date_time/microsec_time_clock.hpp + /usr/include/boost/date_time/posix_time/ptime.hpp + /usr/include/boost/date_time/posix_time/posix_time_system.hpp + /usr/include/boost/date_time/posix_time/posix_time_config.hpp + /usr/include/boost/config/no_tr1/cmath.hpp + /usr/include/c++/11/cmath + /usr/include/math.h + /usr/include/bits/math-vector.h + /usr/include/bits/libm-simd-decl-stubs.h + /usr/include/bits/flt-eval-method.h + /usr/include/bits/fp-logb.h + /usr/include/bits/fp-fast.h + /usr/include/bits/mathcalls-helper-functions.h + /usr/include/bits/mathcalls.h + /usr/include/bits/mathcalls-narrow.h + /usr/include/bits/iscanonical.h + /usr/include/boost/date_time/time_duration.hpp + /usr/include/boost/core/enable_if.hpp + /usr/include/boost/date_time/special_defs.hpp + /usr/include/boost/date_time/time_defs.hpp + /usr/include/boost/operators.hpp + /usr/include/c++/11/iterator + /usr/include/c++/11/bits/stream_iterator.h + /usr/include/boost/static_assert.hpp + /usr/include/boost/type_traits/is_integral.hpp + /usr/include/boost/type_traits/integral_constant.hpp + /usr/include/boost/date_time/time_resolution_traits.hpp + /usr/include/boost/date_time/int_adapter.hpp + /usr/include/boost/date_time/gregorian/gregorian_types.hpp + /usr/include/boost/date_time/date.hpp + /usr/include/boost/date_time/year_month_day.hpp + /usr/include/boost/date_time/period.hpp + /usr/include/boost/date_time/gregorian/greg_calendar.hpp + /usr/include/boost/date_time/gregorian/greg_weekday.hpp + /usr/include/boost/date_time/constrained_value.hpp + /usr/include/boost/type_traits/conditional.hpp + /usr/include/boost/type_traits/is_base_of.hpp + /usr/include/boost/type_traits/is_base_and_derived.hpp + /usr/include/boost/type_traits/intrinsics.hpp + /usr/include/boost/type_traits/detail/config.hpp + /usr/include/boost/type_traits/remove_cv.hpp + /usr/include/boost/type_traits/is_same.hpp + /usr/include/boost/type_traits/is_class.hpp + /usr/include/boost/date_time/date_defs.hpp + /usr/include/boost/date_time/gregorian/greg_day_of_year.hpp + /usr/include/boost/date_time/gregorian_calendar.hpp + /usr/include/boost/date_time/gregorian_calendar.ipp + /usr/include/boost/date_time/gregorian/greg_ymd.hpp + /usr/include/boost/date_time/gregorian/greg_day.hpp + /usr/include/boost/date_time/gregorian/greg_year.hpp + /usr/include/boost/date_time/gregorian/greg_month.hpp + /usr/include/boost/date_time/gregorian/greg_duration.hpp + /usr/include/boost/date_time/date_duration.hpp + /usr/include/boost/date_time/date_duration_types.hpp + /usr/include/boost/date_time/gregorian/greg_duration_types.hpp + /usr/include/boost/date_time/gregorian/greg_date.hpp + /usr/include/boost/date_time/adjust_functors.hpp + /usr/include/boost/date_time/wrapping_int.hpp + /usr/include/boost/date_time/date_generators.hpp + /usr/include/c++/11/sstream + /usr/include/c++/11/istream + /usr/include/c++/11/bits/istream.tcc + /usr/include/c++/11/bits/sstream.tcc + /usr/include/boost/date_time/date_clock_device.hpp + /usr/include/boost/date_time/date_iterator.hpp + /usr/include/boost/date_time/time_system_split.hpp + /usr/include/boost/date_time/time_system_counted.hpp + /usr/include/boost/date_time/time.hpp + /usr/include/boost/date_time/posix_time/date_duration_operators.hpp + /usr/include/boost/date_time/posix_time/posix_time_duration.hpp + /usr/include/boost/numeric/conversion/cast.hpp + /usr/include/boost/type.hpp + /usr/include/boost/numeric/conversion/converter.hpp + /usr/include/boost/numeric/conversion/conversion_traits.hpp + /usr/include/boost/numeric/conversion/detail/conversion_traits.hpp + /usr/include/boost/type_traits/is_arithmetic.hpp + /usr/include/boost/type_traits/is_floating_point.hpp + /usr/include/boost/numeric/conversion/detail/meta.hpp + /usr/include/boost/mpl/if.hpp + /usr/include/boost/mpl/aux_/value_wknd.hpp + /usr/include/boost/mpl/aux_/static_cast.hpp + /usr/include/boost/mpl/aux_/config/workaround.hpp + /usr/include/boost/mpl/aux_/config/integral.hpp + /usr/include/boost/mpl/aux_/config/msvc.hpp + /usr/include/boost/mpl/aux_/config/eti.hpp + /usr/include/boost/mpl/aux_/na_spec.hpp + /usr/include/boost/mpl/lambda_fwd.hpp + /usr/include/boost/mpl/void_fwd.hpp + /usr/include/boost/mpl/aux_/adl_barrier.hpp + /usr/include/boost/mpl/aux_/config/adl.hpp + /usr/include/boost/mpl/aux_/config/intel.hpp + /usr/include/boost/mpl/aux_/config/gcc.hpp + /usr/include/boost/mpl/aux_/na.hpp + /usr/include/boost/mpl/bool.hpp + /usr/include/boost/mpl/bool_fwd.hpp + /usr/include/boost/mpl/integral_c_tag.hpp + /usr/include/boost/mpl/aux_/config/static_constant.hpp + /usr/include/boost/mpl/aux_/na_fwd.hpp + /usr/include/boost/mpl/aux_/config/ctps.hpp + /usr/include/boost/mpl/aux_/config/lambda.hpp + /usr/include/boost/mpl/aux_/config/ttp.hpp + /usr/include/boost/mpl/int.hpp + /usr/include/boost/mpl/int_fwd.hpp + /usr/include/boost/mpl/aux_/nttp_decl.hpp + /usr/include/boost/mpl/aux_/config/nttp.hpp + /usr/include/boost/mpl/aux_/integral_wrapper.hpp + /usr/include/boost/preprocessor/cat.hpp + /usr/include/boost/preprocessor/config/config.hpp + /usr/include/boost/mpl/aux_/lambda_arity_param.hpp + /usr/include/boost/mpl/aux_/template_arity_fwd.hpp + /usr/include/boost/mpl/aux_/arity.hpp + /usr/include/boost/mpl/aux_/config/dtp.hpp + /usr/include/boost/mpl/aux_/preprocessor/params.hpp + /usr/include/boost/mpl/aux_/config/preprocessor.hpp + /usr/include/boost/preprocessor/comma_if.hpp + /usr/include/boost/preprocessor/punctuation/comma_if.hpp + /usr/include/boost/preprocessor/control/if.hpp + /usr/include/boost/preprocessor/control/iif.hpp + /usr/include/boost/preprocessor/logical/bool.hpp + /usr/include/boost/preprocessor/config/limits.hpp + /usr/include/boost/preprocessor/logical/limits/bool_256.hpp + /usr/include/boost/preprocessor/facilities/empty.hpp + /usr/include/boost/preprocessor/punctuation/comma.hpp + /usr/include/boost/preprocessor/repeat.hpp + /usr/include/boost/preprocessor/repetition/repeat.hpp + /usr/include/boost/preprocessor/debug/error.hpp + /usr/include/boost/preprocessor/detail/auto_rec.hpp + /usr/include/boost/preprocessor/detail/limits/auto_rec_256.hpp + /usr/include/boost/preprocessor/tuple/eat.hpp + /usr/include/boost/preprocessor/repetition/limits/repeat_256.hpp + /usr/include/boost/preprocessor/inc.hpp + /usr/include/boost/preprocessor/arithmetic/inc.hpp + /usr/include/boost/preprocessor/arithmetic/limits/inc_256.hpp + /usr/include/boost/mpl/aux_/preprocessor/enum.hpp + /usr/include/boost/mpl/aux_/preprocessor/def_params_tail.hpp + /usr/include/boost/mpl/limits/arity.hpp + /usr/include/boost/preprocessor/logical/and.hpp + /usr/include/boost/preprocessor/logical/bitand.hpp + /usr/include/boost/preprocessor/identity.hpp + /usr/include/boost/preprocessor/facilities/identity.hpp + /usr/include/boost/preprocessor/empty.hpp + /usr/include/boost/preprocessor/arithmetic/add.hpp + /usr/include/boost/preprocessor/arithmetic/dec.hpp + /usr/include/boost/preprocessor/arithmetic/limits/dec_256.hpp + /usr/include/boost/preprocessor/control/while.hpp + /usr/include/boost/preprocessor/list/fold_left.hpp + /usr/include/boost/preprocessor/list/detail/fold_left.hpp + /usr/include/boost/preprocessor/control/expr_iif.hpp + /usr/include/boost/preprocessor/list/adt.hpp + /usr/include/boost/preprocessor/detail/is_binary.hpp + /usr/include/boost/preprocessor/detail/check.hpp + /usr/include/boost/preprocessor/logical/compl.hpp + /usr/include/boost/preprocessor/list/detail/limits/fold_left_256.hpp + /usr/include/boost/preprocessor/list/limits/fold_left_256.hpp + /usr/include/boost/preprocessor/list/fold_right.hpp + /usr/include/boost/preprocessor/list/detail/fold_right.hpp + /usr/include/boost/preprocessor/list/reverse.hpp + /usr/include/boost/preprocessor/list/detail/limits/fold_right_256.hpp + /usr/include/boost/preprocessor/control/detail/while.hpp + /usr/include/boost/preprocessor/control/detail/limits/while_256.hpp + /usr/include/boost/preprocessor/control/limits/while_256.hpp + /usr/include/boost/preprocessor/logical/bitor.hpp + /usr/include/boost/preprocessor/tuple/elem.hpp + /usr/include/boost/preprocessor/facilities/expand.hpp + /usr/include/boost/preprocessor/facilities/overload.hpp + /usr/include/boost/preprocessor/variadic/size.hpp + /usr/include/boost/preprocessor/facilities/check_empty.hpp + /usr/include/boost/preprocessor/variadic/has_opt.hpp + /usr/include/boost/preprocessor/variadic/limits/size_64.hpp + /usr/include/boost/preprocessor/tuple/rem.hpp + /usr/include/boost/preprocessor/tuple/detail/is_single_return.hpp + /usr/include/boost/preprocessor/variadic/elem.hpp + /usr/include/boost/preprocessor/variadic/limits/elem_64.hpp + /usr/include/boost/preprocessor/arithmetic/detail/is_maximum_number.hpp + /usr/include/boost/preprocessor/comparison/equal.hpp + /usr/include/boost/preprocessor/comparison/not_equal.hpp + /usr/include/boost/preprocessor/comparison/limits/not_equal_256.hpp + /usr/include/boost/preprocessor/arithmetic/detail/maximum_number.hpp + /usr/include/boost/preprocessor/arithmetic/detail/is_minimum_number.hpp + /usr/include/boost/preprocessor/logical/not.hpp + /usr/include/boost/preprocessor/arithmetic/sub.hpp + /usr/include/boost/mpl/aux_/config/overload_resolution.hpp + /usr/include/boost/mpl/aux_/lambda_support.hpp + /usr/include/boost/mpl/eval_if.hpp + /usr/include/boost/mpl/equal_to.hpp + /usr/include/boost/mpl/aux_/comparison_op.hpp + /usr/include/boost/mpl/aux_/numeric_op.hpp + /usr/include/boost/mpl/numeric_cast.hpp + /usr/include/boost/mpl/apply_wrap.hpp + /usr/include/boost/mpl/aux_/has_apply.hpp + /usr/include/boost/mpl/has_xxx.hpp + /usr/include/boost/mpl/aux_/type_wrapper.hpp + /usr/include/boost/mpl/aux_/yes_no.hpp + /usr/include/boost/mpl/aux_/config/arrays.hpp + /usr/include/boost/mpl/aux_/config/has_xxx.hpp + /usr/include/boost/mpl/aux_/config/msvc_typename.hpp + /usr/include/boost/preprocessor/array/elem.hpp + /usr/include/boost/preprocessor/array/data.hpp + /usr/include/boost/preprocessor/array/size.hpp + /usr/include/boost/preprocessor/repetition/enum_params.hpp + /usr/include/boost/preprocessor/repetition/enum_trailing_params.hpp + /usr/include/boost/mpl/aux_/config/has_apply.hpp + /usr/include/boost/mpl/aux_/msvc_never_true.hpp + /usr/include/boost/mpl/aux_/config/use_preprocessed.hpp + /usr/include/boost/mpl/aux_/include_preprocessed.hpp + /usr/include/boost/mpl/aux_/config/compiler.hpp + /usr/include/boost/preprocessor/stringize.hpp + /usr/include/boost/mpl/aux_/preprocessed/gcc/apply_wrap.hpp + /usr/include/boost/mpl/tag.hpp + /usr/include/boost/mpl/void.hpp + /usr/include/boost/mpl/aux_/has_tag.hpp + /usr/include/boost/mpl/aux_/numeric_cast_utils.hpp + /usr/include/boost/mpl/aux_/config/forwarding.hpp + /usr/include/boost/mpl/aux_/msvc_eti_base.hpp + /usr/include/boost/mpl/aux_/is_msvc_eti_arg.hpp + /usr/include/boost/mpl/aux_/preprocessed/gcc/equal_to.hpp + /usr/include/boost/mpl/not.hpp + /usr/include/boost/mpl/aux_/nested_type_wknd.hpp + /usr/include/boost/mpl/and.hpp + /usr/include/boost/mpl/aux_/preprocessed/gcc/and.hpp + /usr/include/boost/mpl/identity.hpp + /usr/include/boost/numeric/conversion/detail/int_float_mixture.hpp + /usr/include/boost/numeric/conversion/int_float_mixture_enum.hpp + /usr/include/boost/mpl/integral_c.hpp + /usr/include/boost/mpl/integral_c_fwd.hpp + /usr/include/boost/numeric/conversion/detail/sign_mixture.hpp + /usr/include/boost/numeric/conversion/sign_mixture_enum.hpp + /usr/include/boost/numeric/conversion/detail/udt_builtin_mixture.hpp + /usr/include/boost/numeric/conversion/udt_builtin_mixture_enum.hpp + /usr/include/boost/numeric/conversion/detail/is_subranged.hpp + /usr/include/boost/mpl/multiplies.hpp + /usr/include/boost/mpl/times.hpp + /usr/include/boost/mpl/aux_/arithmetic_op.hpp + /usr/include/boost/mpl/aux_/largest_int.hpp + /usr/include/boost/mpl/aux_/preprocessed/gcc/times.hpp + /usr/include/boost/mpl/aux_/preprocessor/default_params.hpp + /usr/include/boost/mpl/less.hpp + /usr/include/boost/mpl/aux_/preprocessed/gcc/less.hpp + /usr/include/boost/numeric/conversion/converter_policies.hpp + /usr/include/boost/numeric/conversion/detail/converter.hpp + /usr/include/boost/numeric/conversion/bounds.hpp + /usr/include/boost/numeric/conversion/detail/bounds.hpp + /usr/include/boost/numeric/conversion/numeric_cast_traits.hpp + /usr/include/boost/numeric/conversion/detail/numeric_cast_traits.hpp + /usr/include/boost/numeric/conversion/detail/preprocessed/numeric_cast_traits_common.hpp + /usr/include/boost/numeric/conversion/detail/preprocessed/numeric_cast_traits_long_long.hpp + /usr/include/boost/date_time/posix_time/time_period.hpp + /usr/include/boost/date_time/time_iterator.hpp + /usr/include/boost/date_time/dst_rules.hpp + /usr/include/boost/asio/detail/impl/timer_queue_ptime.ipp + /usr/include/boost/asio/detail/timer_scheduler.hpp + /usr/include/boost/asio/detail/timer_scheduler_fwd.hpp + /usr/include/boost/asio/detail/wait_handler.hpp + /usr/include/boost/asio/basic_io_object.hpp + /usr/include/boost/asio/basic_raw_socket.hpp + /usr/include/boost/asio/basic_seq_packet_socket.hpp + /usr/include/boost/asio/basic_serial_port.hpp + /usr/include/boost/asio/serial_port_base.hpp + /usr/include/termios.h + /usr/include/bits/termios.h + /usr/include/bits/termios-struct.h + /usr/include/bits/termios-c_cc.h + /usr/include/bits/termios-c_iflag.h + /usr/include/bits/termios-c_oflag.h + /usr/include/bits/termios-baud.h + /usr/include/bits/termios-c_cflag.h + /usr/include/bits/termios-c_lflag.h + /usr/include/bits/termios-tcflow.h + /usr/include/bits/termios-misc.h + /usr/include/boost/asio/impl/serial_port_base.hpp + /usr/include/boost/asio/impl/serial_port_base.ipp + /usr/include/boost/asio/detail/reactive_serial_port_service.hpp + /usr/include/boost/asio/detail/descriptor_ops.hpp + /usr/include/boost/asio/detail/impl/descriptor_ops.ipp + /usr/include/boost/asio/detail/reactive_descriptor_service.hpp + /usr/include/boost/asio/detail/descriptor_read_op.hpp + /usr/include/boost/asio/detail/descriptor_write_op.hpp + /usr/include/boost/asio/posix/descriptor_base.hpp + /usr/include/boost/asio/detail/impl/reactive_descriptor_service.ipp + /usr/include/boost/asio/detail/impl/reactive_serial_port_service.ipp + /usr/include/boost/asio/basic_signal_set.hpp + /usr/include/boost/asio/detail/signal_set_service.hpp + /usr/include/boost/asio/detail/signal_handler.hpp + /usr/include/boost/asio/detail/signal_op.hpp + /usr/include/boost/asio/detail/impl/signal_set_service.ipp + /usr/include/boost/asio/detail/static_mutex.hpp + /usr/include/boost/asio/detail/posix_static_mutex.hpp + /usr/include/boost/asio/basic_socket_acceptor.hpp + /usr/include/boost/asio/basic_socket_iostream.hpp + /usr/include/boost/asio/basic_socket_streambuf.hpp + /usr/include/boost/asio/basic_stream_socket.hpp + /usr/include/boost/asio/steady_timer.hpp + /usr/include/boost/asio/basic_waitable_timer.hpp + /usr/include/boost/asio/detail/chrono_time_traits.hpp + /usr/include/boost/asio/wait_traits.hpp + /usr/include/boost/asio/basic_streambuf.hpp + /usr/include/boost/asio/basic_streambuf_fwd.hpp + /usr/include/boost/asio/bind_executor.hpp + /usr/include/boost/asio/uses_executor.hpp + /usr/include/boost/asio/buffered_read_stream_fwd.hpp + /usr/include/boost/asio/buffered_read_stream.hpp + /usr/include/boost/asio/detail/buffer_resize_guard.hpp + /usr/include/boost/asio/detail/buffered_stream_storage.hpp + /usr/include/boost/asio/impl/buffered_read_stream.hpp + /usr/include/boost/asio/buffered_stream_fwd.hpp + /usr/include/boost/asio/buffered_stream.hpp + /usr/include/boost/asio/buffered_write_stream.hpp + /usr/include/boost/asio/buffered_write_stream_fwd.hpp + /usr/include/boost/asio/completion_condition.hpp + /usr/include/boost/asio/write.hpp + /usr/include/boost/asio/impl/write.hpp + /usr/include/boost/asio/detail/base_from_completion_cond.hpp + /usr/include/boost/asio/detail/consuming_buffers.hpp + /usr/include/boost/asio/detail/dependent_type.hpp + /usr/include/boost/asio/impl/buffered_write_stream.hpp + /usr/include/boost/asio/buffers_iterator.hpp + /usr/include/boost/asio/co_spawn.hpp + /usr/include/boost/asio/compose.hpp + /usr/include/boost/asio/impl/compose.hpp + /usr/include/boost/asio/connect.hpp + /usr/include/boost/asio/impl/connect.hpp + /usr/include/boost/asio/coroutine.hpp + /usr/include/boost/asio/deadline_timer.hpp + /usr/include/boost/asio/defer.hpp + /usr/include/boost/asio/impl/defer.hpp + /usr/include/boost/asio/detached.hpp + /usr/include/boost/asio/impl/detached.hpp + /usr/include/boost/asio/dispatch.hpp + /usr/include/boost/asio/impl/dispatch.hpp + /usr/include/boost/asio/executor.hpp + /usr/include/boost/asio/impl/executor.hpp + /usr/include/boost/asio/impl/executor.ipp + /usr/include/boost/asio/generic/basic_endpoint.hpp + /usr/include/boost/asio/generic/detail/endpoint.hpp + /usr/include/boost/asio/generic/detail/impl/endpoint.ipp + /usr/include/boost/asio/generic/datagram_protocol.hpp + /usr/include/boost/asio/generic/raw_protocol.hpp + /usr/include/boost/asio/generic/seq_packet_protocol.hpp + /usr/include/boost/asio/generic/stream_protocol.hpp + /usr/include/boost/asio/high_resolution_timer.hpp + /usr/include/boost/asio/io_context_strand.hpp + /usr/include/boost/asio/detail/strand_service.hpp + /usr/include/boost/asio/detail/impl/strand_service.hpp + /usr/include/boost/asio/detail/impl/strand_service.ipp + /usr/include/boost/asio/io_service.hpp + /usr/include/boost/asio/io_service_strand.hpp + /usr/include/boost/asio/ip/address.hpp + /usr/include/boost/asio/ip/address_v4.hpp + /usr/include/boost/asio/detail/array.hpp + /usr/include/boost/asio/detail/winsock_init.hpp + /usr/include/boost/asio/ip/impl/address_v4.hpp + /usr/include/boost/asio/ip/impl/address_v4.ipp + /usr/include/boost/asio/ip/address_v6.hpp + /usr/include/boost/asio/ip/impl/address_v6.hpp + /usr/include/boost/asio/ip/impl/address_v6.ipp + /usr/include/boost/asio/ip/bad_address_cast.hpp + /usr/include/boost/asio/ip/impl/address.hpp + /usr/include/boost/asio/ip/impl/address.ipp + /usr/include/boost/asio/ip/address_v4_iterator.hpp + /usr/include/boost/asio/ip/address_v4_range.hpp + /usr/include/boost/asio/ip/address_v6_iterator.hpp + /usr/include/boost/asio/ip/address_v6_range.hpp + /usr/include/boost/asio/ip/network_v4.hpp + /usr/include/boost/asio/ip/impl/network_v4.hpp + /usr/include/boost/asio/ip/impl/network_v4.ipp + /usr/include/boost/asio/ip/network_v6.hpp + /usr/include/boost/asio/ip/impl/network_v6.hpp + /usr/include/boost/asio/ip/impl/network_v6.ipp + /usr/include/boost/asio/ip/basic_endpoint.hpp + /usr/include/boost/asio/ip/detail/endpoint.hpp + /usr/include/boost/asio/ip/detail/impl/endpoint.ipp + /usr/include/boost/asio/ip/impl/basic_endpoint.hpp + /usr/include/boost/asio/ip/basic_resolver.hpp + /usr/include/boost/asio/ip/basic_resolver_iterator.hpp + /usr/include/boost/asio/ip/basic_resolver_entry.hpp + /usr/include/boost/asio/ip/basic_resolver_query.hpp + /usr/include/boost/asio/ip/resolver_query_base.hpp + /usr/include/boost/asio/ip/resolver_base.hpp + /usr/include/boost/asio/ip/basic_resolver_results.hpp + /usr/include/boost/asio/detail/resolver_service.hpp + /usr/include/boost/asio/detail/resolve_endpoint_op.hpp + /usr/include/boost/asio/detail/resolve_op.hpp + /usr/include/boost/asio/detail/resolve_query_op.hpp + /usr/include/boost/asio/detail/resolver_service_base.hpp + /usr/include/boost/asio/detail/impl/resolver_service_base.ipp + /usr/include/boost/asio/ip/host_name.hpp + /usr/include/boost/asio/ip/impl/host_name.ipp + /usr/include/boost/asio/ip/icmp.hpp + /usr/include/boost/asio/ip/multicast.hpp + /usr/include/boost/asio/ip/detail/socket_option.hpp + /usr/include/boost/asio/ip/tcp.hpp + /usr/include/boost/asio/ip/udp.hpp + /usr/include/boost/asio/ip/unicast.hpp + /usr/include/boost/asio/ip/v6_only.hpp + /usr/include/boost/asio/is_read_buffered.hpp + /usr/include/boost/asio/is_write_buffered.hpp + /usr/include/boost/asio/local/basic_endpoint.hpp + /usr/include/boost/asio/local/detail/endpoint.hpp + /usr/include/boost/asio/local/detail/impl/endpoint.ipp + /usr/include/boost/asio/local/connect_pair.hpp + /usr/include/boost/asio/local/datagram_protocol.hpp + /usr/include/boost/asio/local/stream_protocol.hpp + /usr/include/boost/asio/packaged_task.hpp + /usr/include/boost/asio/detail/future.hpp + /usr/include/c++/11/future + /usr/include/c++/11/condition_variable + /usr/include/c++/11/bits/atomic_futex.h + /usr/include/c++/11/bits/std_thread.h + /usr/include/boost/asio/placeholders.hpp + /usr/include/boost/bind/arg.hpp + /usr/include/boost/is_placeholder.hpp + /usr/include/boost/asio/posix/basic_descriptor.hpp + /usr/include/boost/asio/posix/basic_stream_descriptor.hpp + /usr/include/boost/asio/posix/descriptor.hpp + /usr/include/boost/asio/posix/stream_descriptor.hpp + /usr/include/boost/asio/read.hpp + /usr/include/boost/asio/impl/read.hpp + /usr/include/boost/asio/read_at.hpp + /usr/include/boost/asio/impl/read_at.hpp + /usr/include/boost/asio/read_until.hpp + /usr/include/boost/asio/detail/regex_fwd.hpp + /usr/include/boost/regex_fwd.hpp + /usr/include/boost/regex/config.hpp + /usr/include/boost/regex/user.hpp + /usr/include/boost/predef.h + /usr/include/boost/predef/language.h + /usr/include/boost/predef/language/stdc.h + /usr/include/boost/predef/version_number.h + /usr/include/boost/predef/make.h + /usr/include/boost/predef/detail/test.h + /usr/include/boost/predef/language/stdcpp.h + /usr/include/boost/predef/language/objc.h + /usr/include/boost/predef/language/cuda.h + /usr/include/boost/predef/architecture.h + /usr/include/boost/predef/architecture/alpha.h + /usr/include/boost/predef/architecture/arm.h + /usr/include/boost/predef/architecture/blackfin.h + /usr/include/boost/predef/architecture/convex.h + /usr/include/boost/predef/architecture/ia64.h + /usr/include/boost/predef/architecture/m68k.h + /usr/include/boost/predef/architecture/mips.h + /usr/include/boost/predef/architecture/parisc.h + /usr/include/boost/predef/architecture/ppc.h + /usr/include/boost/predef/architecture/ptx.h + /usr/include/boost/predef/architecture/pyramid.h + /usr/include/boost/predef/architecture/riscv.h + /usr/include/boost/predef/architecture/rs6k.h + /usr/include/boost/predef/architecture/sparc.h + /usr/include/boost/predef/architecture/superh.h + /usr/include/boost/predef/architecture/sys370.h + /usr/include/boost/predef/architecture/sys390.h + /usr/include/boost/predef/architecture/x86.h + /usr/include/boost/predef/architecture/x86/32.h + /usr/include/boost/predef/architecture/x86/64.h + /usr/include/boost/predef/architecture/z.h + /usr/include/boost/predef/compiler.h + /usr/include/boost/predef/compiler/borland.h + /usr/include/boost/predef/compiler/clang.h + /usr/include/boost/predef/compiler/comeau.h + /usr/include/boost/predef/compiler/compaq.h + /usr/include/boost/predef/compiler/diab.h + /usr/include/boost/predef/compiler/digitalmars.h + /usr/include/boost/predef/compiler/dignus.h + /usr/include/boost/predef/compiler/edg.h + /usr/include/boost/predef/compiler/ekopath.h + /usr/include/boost/predef/compiler/gcc_xml.h + /usr/include/boost/predef/compiler/gcc.h + /usr/include/boost/predef/detail/comp_detected.h + /usr/include/boost/predef/compiler/greenhills.h + /usr/include/boost/predef/compiler/hp_acc.h + /usr/include/boost/predef/compiler/iar.h + /usr/include/boost/predef/compiler/ibm.h + /usr/include/boost/predef/compiler/intel.h + /usr/include/boost/predef/compiler/kai.h + /usr/include/boost/predef/compiler/llvm.h + /usr/include/boost/predef/compiler/metaware.h + /usr/include/boost/predef/compiler/metrowerks.h + /usr/include/boost/predef/compiler/microtec.h + /usr/include/boost/predef/compiler/mpw.h + /usr/include/boost/predef/compiler/nvcc.h + /usr/include/boost/predef/compiler/palm.h + /usr/include/boost/predef/compiler/pgi.h + /usr/include/boost/predef/compiler/sgi_mipspro.h + /usr/include/boost/predef/compiler/sunpro.h + /usr/include/boost/predef/compiler/tendra.h + /usr/include/boost/predef/compiler/visualc.h + /usr/include/boost/predef/compiler/watcom.h + /usr/include/boost/predef/library.h + /usr/include/boost/predef/library/c.h + /usr/include/boost/predef/library/c/_prefix.h + /usr/include/boost/predef/detail/_cassert.h + /usr/include/boost/predef/library/c/cloudabi.h + /usr/include/boost/predef/library/c/gnu.h + /usr/include/boost/predef/library/c/uc.h + /usr/include/boost/predef/library/c/vms.h + /usr/include/boost/predef/library/c/zos.h + /usr/include/boost/predef/library/std.h + /usr/include/boost/predef/library/std/_prefix.h + /usr/include/boost/predef/detail/_exception.h + /usr/include/boost/predef/library/std/cxx.h + /usr/include/boost/predef/library/std/dinkumware.h + /usr/include/boost/predef/library/std/libcomo.h + /usr/include/boost/predef/library/std/modena.h + /usr/include/boost/predef/library/std/msl.h + /usr/include/boost/predef/library/std/roguewave.h + /usr/include/boost/predef/library/std/sgi.h + /usr/include/boost/predef/library/std/stdcpp3.h + /usr/include/boost/predef/library/std/stlport.h + /usr/include/boost/predef/library/std/vacpp.h + /usr/include/boost/predef/os.h + /usr/include/boost/predef/os/aix.h + /usr/include/boost/predef/os/amigaos.h + /usr/include/boost/predef/os/beos.h + /usr/include/boost/predef/os/bsd.h + /usr/include/boost/predef/os/macos.h + /usr/include/boost/predef/os/ios.h + /usr/include/boost/predef/os/bsd/bsdi.h + /usr/include/boost/predef/os/bsd/dragonfly.h + /usr/include/boost/predef/os/bsd/free.h + /usr/include/boost/predef/os/bsd/open.h + /usr/include/boost/predef/os/bsd/net.h + /usr/include/boost/predef/os/cygwin.h + /usr/include/boost/predef/os/haiku.h + /usr/include/boost/predef/os/hpux.h + /usr/include/boost/predef/os/irix.h + /usr/include/boost/predef/os/linux.h + /usr/include/boost/predef/detail/os_detected.h + /usr/include/boost/predef/os/os400.h + /usr/include/boost/predef/os/qnxnto.h + /usr/include/boost/predef/os/solaris.h + /usr/include/boost/predef/os/unix.h + /usr/include/boost/predef/os/vms.h + /usr/include/boost/predef/os/windows.h + /usr/include/boost/predef/other.h + /usr/include/boost/predef/other/endian.h + /usr/include/boost/predef/platform/android.h + /usr/include/boost/predef/platform.h + /usr/include/boost/predef/platform/cloudabi.h + /usr/include/boost/predef/platform/mingw.h + /usr/include/boost/predef/platform/mingw32.h + /usr/include/boost/predef/platform/mingw64.h + /usr/include/boost/predef/platform/windows_uwp.h + /usr/include/boost/predef/platform/windows_desktop.h + /usr/include/boost/predef/platform/windows_phone.h + /usr/include/boost/predef/platform/windows_server.h + /usr/include/boost/predef/platform/windows_store.h + /usr/include/boost/predef/platform/windows_system.h + /usr/include/boost/predef/platform/windows_runtime.h + /usr/include/boost/predef/platform/ios.h + /usr/include/boost/predef/hardware.h + /usr/include/boost/predef/hardware/simd.h + /usr/include/boost/predef/hardware/simd/x86.h + /usr/include/boost/predef/hardware/simd/x86/versions.h + /usr/include/boost/predef/hardware/simd/x86_amd.h + /usr/include/boost/predef/hardware/simd/x86_amd/versions.h + /usr/include/boost/predef/hardware/simd/arm.h + /usr/include/boost/predef/hardware/simd/arm/versions.h + /usr/include/boost/predef/hardware/simd/ppc.h + /usr/include/boost/predef/hardware/simd/ppc/versions.h + /usr/include/boost/predef/version.h + /usr/include/boost/regex/config/cwchar.hpp + /usr/include/boost/regex/v4/regex_fwd.hpp + /usr/include/boost/regex/v4/match_flags.hpp + /usr/include/boost/asio/impl/read_until.hpp + /usr/include/boost/asio/redirect_error.hpp + /usr/include/boost/asio/impl/redirect_error.hpp + /usr/include/boost/asio/require_concept.hpp + /usr/include/boost/asio/traits/require_concept_member.hpp + /usr/include/boost/asio/traits/require_concept_free.hpp + /usr/include/boost/asio/traits/static_require_concept.hpp + /usr/include/boost/asio/serial_port.hpp + /usr/include/boost/asio/signal_set.hpp + /usr/include/boost/asio/static_thread_pool.hpp + /usr/include/boost/asio/thread_pool.hpp + /usr/include/boost/asio/impl/thread_pool.hpp + /usr/include/boost/asio/detail/blocking_executor_op.hpp + /usr/include/boost/asio/detail/bulk_executor_op.hpp + /usr/include/boost/asio/impl/thread_pool.ipp + /usr/include/boost/asio/strand.hpp + /usr/include/boost/asio/detail/strand_executor_service.hpp + /usr/include/boost/asio/detail/impl/strand_executor_service.hpp + /usr/include/boost/asio/detail/impl/strand_executor_service.ipp + /usr/include/boost/asio/streambuf.hpp + /usr/include/boost/asio/system_timer.hpp + /usr/include/boost/asio/this_coro.hpp + /usr/include/boost/asio/use_awaitable.hpp + /usr/include/boost/asio/use_future.hpp + /usr/include/boost/asio/impl/use_future.hpp + /usr/include/boost/asio/version.hpp + /usr/include/boost/asio/windows/basic_object_handle.hpp + /usr/include/boost/asio/windows/basic_overlapped_handle.hpp + /usr/include/boost/asio/windows/basic_random_access_handle.hpp + /usr/include/boost/asio/windows/basic_stream_handle.hpp + /usr/include/boost/asio/windows/object_handle.hpp + /usr/include/boost/asio/windows/overlapped_handle.hpp + /usr/include/boost/asio/windows/overlapped_ptr.hpp + /usr/include/boost/asio/windows/random_access_handle.hpp + /usr/include/boost/asio/windows/stream_handle.hpp + /usr/include/boost/asio/write_at.hpp + /usr/include/boost/asio/impl/write_at.hpp + /usr/include/boost/beast/core/tcp_stream.hpp + /usr/include/boost/beast/core/detail/config.hpp + /usr/include/boost/core/ignore_unused.hpp + /usr/include/boost/beast/core/basic_stream.hpp + /usr/include/boost/beast/core/detail/stream_base.hpp + /usr/include/boost/core/exchange.hpp + /usr/include/boost/beast/core/error.hpp + /usr/include/boost/beast/core/impl/error.hpp + /usr/include/boost/beast/core/impl/error.ipp + /usr/include/boost/beast/core/rate_policy.hpp + /usr/include/boost/beast/core/role.hpp + /usr/include/boost/beast/core/stream_traits.hpp + /usr/include/boost/beast/core/detail/static_const.hpp + /usr/include/boost/beast/core/detail/stream_traits.hpp + /usr/include/boost/type_traits/make_void.hpp + /usr/include/boost/core/empty_value.hpp + /usr/include/boost/enable_shared_from_this.hpp + /usr/include/boost/smart_ptr/enable_shared_from_this.hpp + /usr/include/boost/smart_ptr/weak_ptr.hpp + /usr/include/boost/beast/core/impl/basic_stream.hpp + /usr/include/boost/beast/core/async_base.hpp + /usr/include/boost/beast/core/bind_handler.hpp + /usr/include/boost/beast/core/detail/bind_handler.hpp + /usr/include/boost/beast/core/detail/tuple.hpp + /usr/include/boost/mp11/integer_sequence.hpp + /usr/include/boost/mp11/version.hpp + /usr/include/boost/mp11/algorithm.hpp + /usr/include/boost/mp11/list.hpp + /usr/include/boost/mp11/integral.hpp + /usr/include/boost/mp11/detail/mp_list.hpp + /usr/include/boost/mp11/detail/mp_is_list.hpp + /usr/include/boost/mp11/detail/mp_append.hpp + /usr/include/boost/mp11/utility.hpp + /usr/include/boost/mp11/detail/mp_fold.hpp + /usr/include/boost/mp11/detail/config.hpp + /usr/include/boost/mp11/set.hpp + /usr/include/boost/mp11/function.hpp + /usr/include/boost/mp11/detail/mp_count.hpp + /usr/include/boost/mp11/detail/mp_plus.hpp + /usr/include/boost/mp11/detail/mp_min_element.hpp + /usr/include/boost/mp11/detail/mp_void.hpp + /usr/include/boost/mp11/detail/mp_copy_if.hpp + /usr/include/boost/mp11/detail/mp_remove_if.hpp + /usr/include/boost/mp11/detail/mp_map_find.hpp + /usr/include/boost/mp11/detail/mp_with_index.hpp + /usr/include/boost/type_traits/copy_cv.hpp + /usr/include/boost/type_traits/is_const.hpp + /usr/include/boost/type_traits/is_volatile.hpp + /usr/include/boost/type_traits/add_const.hpp + /usr/include/boost/type_traits/add_volatile.hpp + /usr/include/boost/beast/core/detail/allocator.hpp + /usr/include/boost/beast/core/detail/async_base.hpp + /usr/include/boost/beast/core/detail/work_guard.hpp + /usr/include/boost/optional.hpp + /usr/include/boost/optional/optional.hpp + /usr/include/boost/core/explicit_operator_bool.hpp + /usr/include/boost/core/swap.hpp + /usr/include/boost/optional/bad_optional_access.hpp + /usr/include/boost/type_traits/alignment_of.hpp + /usr/include/boost/type_traits/has_nothrow_constructor.hpp + /usr/include/boost/type_traits/is_default_constructible.hpp + /usr/include/boost/type_traits/is_complete.hpp + /usr/include/boost/type_traits/declval.hpp + /usr/include/boost/type_traits/add_rvalue_reference.hpp + /usr/include/boost/type_traits/is_void.hpp + /usr/include/boost/type_traits/is_reference.hpp + /usr/include/boost/type_traits/is_lvalue_reference.hpp + /usr/include/boost/type_traits/is_rvalue_reference.hpp + /usr/include/boost/type_traits/remove_reference.hpp + /usr/include/boost/type_traits/is_function.hpp + /usr/include/boost/type_traits/detail/is_function_cxx_11.hpp + /usr/include/boost/type_traits/detail/yes_no_type.hpp + /usr/include/boost/type_traits/type_with_alignment.hpp + /usr/include/boost/type_traits/is_pod.hpp + /usr/include/boost/type_traits/is_scalar.hpp + /usr/include/boost/type_traits/is_enum.hpp + /usr/include/boost/type_traits/is_pointer.hpp + /usr/include/boost/type_traits/is_member_pointer.hpp + /usr/include/boost/type_traits/is_member_function_pointer.hpp + /usr/include/boost/type_traits/detail/is_member_function_pointer_cxx_11.hpp + /usr/include/boost/type_traits/remove_const.hpp + /usr/include/boost/type_traits/decay.hpp + /usr/include/boost/type_traits/is_array.hpp + /usr/include/boost/type_traits/remove_bounds.hpp + /usr/include/boost/type_traits/remove_extent.hpp + /usr/include/boost/type_traits/add_pointer.hpp + /usr/include/boost/type_traits/is_constructible.hpp + /usr/include/boost/type_traits/is_destructible.hpp + /usr/include/boost/type_traits/is_nothrow_move_assignable.hpp + /usr/include/boost/type_traits/has_trivial_move_assign.hpp + /usr/include/boost/type_traits/is_assignable.hpp + /usr/include/boost/type_traits/has_nothrow_assign.hpp + /usr/include/boost/type_traits/enable_if.hpp + /usr/include/boost/type_traits/is_nothrow_move_constructible.hpp + /usr/include/boost/move/utility.hpp + /usr/include/boost/move/detail/config_begin.hpp + /usr/include/boost/move/detail/workaround.hpp + /usr/include/boost/move/utility_core.hpp + /usr/include/boost/move/core.hpp + /usr/include/boost/move/detail/config_end.hpp + /usr/include/boost/move/detail/meta_utils.hpp + /usr/include/boost/move/detail/meta_utils_core.hpp + /usr/include/boost/move/traits.hpp + /usr/include/boost/move/detail/type_traits.hpp + /usr/include/boost/none.hpp + /usr/include/boost/none_t.hpp + /usr/include/boost/utility/compare_pointees.hpp + /usr/include/boost/utility/result_of.hpp + /usr/include/boost/preprocessor/iteration/iterate.hpp + /usr/include/boost/preprocessor/slot/slot.hpp + /usr/include/boost/preprocessor/slot/detail/def.hpp + /usr/include/boost/preprocessor/repetition/enum_binary_params.hpp + /usr/include/boost/preprocessor/repetition/enum_shifted_params.hpp + /usr/include/boost/preprocessor/facilities/intercept.hpp + /usr/include/boost/preprocessor/facilities/limits/intercept_256.hpp + /usr/include/boost/type_traits/type_identity.hpp + /usr/include/boost/preprocessor/iteration/detail/iter/forward1.hpp + /usr/include/boost/preprocessor/iteration/detail/bounds/lower1.hpp + /usr/include/boost/preprocessor/slot/detail/shared.hpp + /usr/include/boost/preprocessor/iteration/detail/bounds/upper1.hpp + /usr/include/boost/preprocessor/iteration/detail/iter/limits/forward1_256.hpp + /usr/include/boost/utility/detail/result_of_iterate.hpp + /usr/include/boost/optional/optional_fwd.hpp + /usr/include/boost/optional/detail/optional_config.hpp + /usr/include/boost/optional/detail/optional_factory_support.hpp + /usr/include/boost/optional/detail/optional_aligned_storage.hpp + /usr/include/boost/optional/detail/optional_trivially_copyable_base.hpp + /usr/include/boost/optional/detail/optional_reference_spec.hpp + /usr/include/boost/optional/detail/optional_relops.hpp + /usr/include/boost/optional/detail/optional_swap.hpp + /usr/include/boost/beast/core/impl/async_base.hpp + /usr/include/boost/beast/core/buffer_traits.hpp + /usr/include/boost/beast/core/detail/buffer_traits.hpp + /usr/include/boost/beast/core/buffers_prefix.hpp + /usr/include/boost/beast/core/impl/buffers_prefix.hpp + /usr/include/boost/beast/websocket/teardown.hpp + /usr/include/boost/beast/websocket/impl/teardown.hpp + /usr/include/boost/beast/core/detail/bind_continuation.hpp + /usr/include/boost/beast/core/detail/remap_post_to_defer.hpp + /usr/include/boost/beast/core/detail/is_invocable.hpp + /usr/include/boost/make_shared.hpp + /usr/include/boost/smart_ptr/make_shared.hpp + /usr/include/boost/smart_ptr/make_shared_object.hpp + /usr/include/boost/smart_ptr/detail/sp_forward.hpp + /usr/include/boost/smart_ptr/make_shared_array.hpp + /usr/include/boost/core/default_allocator.hpp + /usr/include/boost/smart_ptr/allocate_shared_array.hpp + /usr/include/boost/core/allocator_access.hpp + /usr/include/boost/core/pointer_traits.hpp + /usr/include/boost/core/alloc_construct.hpp + /usr/include/boost/core/noinit_adaptor.hpp + /usr/include/boost/core/first_scalar.hpp + /usr/include/boost/type_traits/extent.hpp + /usr/include/boost/type_traits/is_bounded_array.hpp + /usr/include/boost/type_traits/is_unbounded_array.hpp + /usr/include/boost/beast/websocket/stream.hpp + /usr/include/boost/beast/websocket/error.hpp + /usr/include/boost/beast/websocket/impl/error.hpp + /usr/include/boost/beast/websocket/impl/error.ipp + /usr/include/boost/beast/websocket/option.hpp + /usr/include/boost/beast/websocket/rfc6455.hpp + /usr/include/boost/beast/core/static_string.hpp + /usr/include/boost/beast/core/string.hpp + /usr/include/boost/beast/core/string_type.hpp + /usr/include/boost/utility/string_view.hpp + /usr/include/boost/io/ostream_put.hpp + /usr/include/boost/io/detail/buffer_fill.hpp + /usr/include/boost/io/detail/ostream_guard.hpp + /usr/include/boost/utility/string_view_fwd.hpp + /usr/include/boost/container_hash/hash_fwd.hpp + /usr/include/boost/beast/core/impl/string.ipp + /usr/include/boost/beast/core/detail/string.hpp + /usr/include/boost/beast/core/detail/static_string.hpp + /usr/include/boost/beast/core/impl/static_string.hpp + /usr/include/boost/beast/http/empty_body.hpp + /usr/include/boost/beast/http/error.hpp + /usr/include/boost/beast/http/impl/error.hpp + /usr/include/boost/beast/http/impl/error.ipp + /usr/include/boost/beast/http/message.hpp + /usr/include/boost/beast/http/fields.hpp + /usr/include/boost/beast/http/field.hpp + /usr/include/boost/beast/http/impl/field.ipp + /usr/include/boost/intrusive/list.hpp + /usr/include/boost/intrusive/detail/config_begin.hpp + /usr/include/boost/intrusive/intrusive_fwd.hpp + /usr/include/boost/intrusive/link_mode.hpp + /usr/include/boost/intrusive/detail/workaround.hpp + /usr/include/boost/intrusive/detail/assert.hpp + /usr/include/boost/intrusive/list_hook.hpp + /usr/include/boost/intrusive/detail/list_node.hpp + /usr/include/boost/intrusive/pointer_rebind.hpp + /usr/include/boost/intrusive/circular_list_algorithms.hpp + /usr/include/boost/intrusive/detail/algo_type.hpp + /usr/include/boost/core/no_exceptions_support.hpp + /usr/include/boost/intrusive/detail/config_end.hpp + /usr/include/boost/intrusive/options.hpp + /usr/include/boost/intrusive/pack_options.hpp + /usr/include/boost/intrusive/detail/generic_hook.hpp + /usr/include/boost/intrusive/pointer_traits.hpp + /usr/include/boost/move/detail/pointer_element.hpp + /usr/include/boost/intrusive/detail/mpl.hpp + /usr/include/boost/intrusive/detail/node_holder.hpp + /usr/include/boost/intrusive/detail/get_value_traits.hpp + /usr/include/boost/intrusive/detail/hook_traits.hpp + /usr/include/boost/intrusive/detail/parent_from_member.hpp + /usr/include/boost/move/detail/to_raw_pointer.hpp + /usr/include/boost/intrusive/detail/is_stateful_value_traits.hpp + /usr/include/boost/intrusive/detail/function_detector.hpp + /usr/include/boost/intrusive/detail/default_header_holder.hpp + /usr/include/boost/intrusive/detail/reverse_iterator.hpp + /usr/include/boost/intrusive/detail/iterator.hpp + /usr/include/boost/intrusive/detail/std_fwd.hpp + /usr/include/boost/move/detail/std_ns_begin.hpp + /usr/include/boost/move/detail/std_ns_end.hpp + /usr/include/boost/move/detail/iterator_traits.hpp + /usr/include/boost/intrusive/detail/uncast.hpp + /usr/include/boost/intrusive/detail/list_iterator.hpp + /usr/include/boost/intrusive/detail/iiterator.hpp + /usr/include/boost/intrusive/detail/array_initializer.hpp + /usr/include/boost/move/detail/placement_new.hpp + /usr/include/boost/intrusive/detail/exception_disposer.hpp + /usr/include/boost/intrusive/detail/equal_to_value.hpp + /usr/include/boost/intrusive/detail/key_nodeptr_comp.hpp + /usr/include/boost/intrusive/detail/ebo_functor_holder.hpp + /usr/include/boost/intrusive/detail/tree_value_compare.hpp + /usr/include/boost/intrusive/detail/simple_disposers.hpp + /usr/include/boost/intrusive/detail/size_holder.hpp + /usr/include/boost/intrusive/detail/algorithm.hpp + /usr/include/boost/intrusive/detail/minimal_less_equal_header.hpp + /usr/include/boost/intrusive/set.hpp + /usr/include/boost/intrusive/rbtree.hpp + /usr/include/boost/intrusive/detail/minimal_pair_header.hpp + /usr/include/boost/intrusive/set_hook.hpp + /usr/include/boost/intrusive/detail/rbtree_node.hpp + /usr/include/boost/intrusive/rbtree_algorithms.hpp + /usr/include/boost/intrusive/bstree_algorithms.hpp + /usr/include/boost/intrusive/detail/bstree_algorithms_base.hpp + /usr/include/boost/intrusive/detail/math.hpp + /usr/include/boost/intrusive/pointer_plus_bits.hpp + /usr/include/boost/intrusive/detail/tree_node.hpp + /usr/include/boost/intrusive/bstree.hpp + /usr/include/boost/intrusive/bs_set_hook.hpp + /usr/include/boost/intrusive/detail/tree_iterator.hpp + /usr/include/boost/intrusive/detail/empty_node_checker.hpp + /usr/include/boost/intrusive/detail/node_cloner_disposer.hpp + /usr/include/boost/intrusive/parent_from_member.hpp + /usr/include/boost/move/adl_move_swap.hpp + /usr/include/boost/beast/http/impl/fields.hpp + /usr/include/boost/beast/core/buffers_cat.hpp + /usr/include/boost/beast/core/detail/type_traits.hpp + /usr/include/boost/beast/core/impl/buffers_cat.hpp + /usr/include/boost/beast/core/detail/variant.hpp + /usr/include/boost/beast/core/detail/buffers_ref.hpp + /usr/include/boost/beast/core/detail/clamp.hpp + /usr/include/boost/beast/core/detail/temporary_buffer.hpp + /usr/include/boost/beast/core/detail/impl/temporary_buffer.ipp + /usr/include/boost/beast/http/verb.hpp + /usr/include/boost/beast/http/impl/verb.ipp + /usr/include/boost/beast/http/rfc7230.hpp + /usr/include/boost/beast/http/detail/rfc7230.hpp + /usr/include/boost/beast/http/detail/rfc7230.ipp + /usr/include/boost/beast/http/detail/basic_parsed_list.hpp + /usr/include/boost/beast/http/impl/rfc7230.hpp + /usr/include/boost/beast/http/impl/rfc7230.ipp + /usr/include/boost/beast/http/status.hpp + /usr/include/boost/beast/http/impl/status.ipp + /usr/include/boost/beast/http/chunk_encode.hpp + /usr/include/boost/beast/http/type_traits.hpp + /usr/include/boost/beast/http/detail/type_traits.hpp + /usr/include/boost/beast/http/detail/chunk_encode.hpp + /usr/include/boost/beast/http/impl/chunk_encode.hpp + /usr/include/boost/beast/core/detail/varint.hpp + /usr/include/boost/beast/http/impl/fields.ipp + /usr/include/boost/beast/http/impl/message.hpp + /usr/include/boost/beast/http/string_body.hpp + /usr/include/boost/beast/core/buffers_range.hpp + /usr/include/boost/beast/core/detail/buffers_range_adaptor.hpp + /usr/include/boost/beast/websocket/impl/rfc6455.hpp + /usr/include/boost/beast/websocket/stream_base.hpp + /usr/include/boost/beast/websocket/detail/decorator.hpp + /usr/include/boost/beast/websocket/stream_fwd.hpp + /usr/include/boost/beast/websocket/detail/hybi13.hpp + /usr/include/boost/beast/core/detail/base64.hpp + /usr/include/boost/beast/core/detail/base64.ipp + /usr/include/boost/beast/websocket/detail/hybi13.ipp + /usr/include/boost/beast/core/detail/sha1.hpp + /usr/include/boost/beast/core/detail/sha1.ipp + /usr/include/boost/beast/websocket/detail/prng.hpp + /usr/include/c++/11/random + /usr/include/c++/11/bits/random.h + /usr/include/c++/11/x86_64-redhat-linux/bits/opt_random.h + /usr/include/c++/11/bits/random.tcc + /usr/include/c++/11/numeric + /usr/include/c++/11/bits/stl_numeric.h + /usr/include/boost/beast/websocket/detail/prng.ipp + /usr/include/boost/beast/core/detail/chacha.hpp + /usr/include/boost/beast/core/detail/pcg.hpp + /usr/include/boost/beast/websocket/detail/impl_base.hpp + /usr/include/boost/beast/websocket/detail/frame.hpp + /usr/include/boost/beast/websocket/detail/utf8_checker.hpp + /usr/include/boost/beast/websocket/detail/utf8_checker.ipp + /usr/include/boost/beast/core/flat_static_buffer.hpp + /usr/include/boost/beast/core/impl/flat_static_buffer.hpp + /usr/include/boost/beast/core/impl/flat_static_buffer.ipp + /usr/include/boost/endian/conversion.hpp + /usr/include/boost/endian/detail/endian_reverse.hpp + /usr/include/boost/endian/detail/integral_by_size.hpp + /usr/include/boost/endian/detail/intrinsic.hpp + /usr/include/boost/endian/detail/is_scoped_enum.hpp + /usr/include/boost/type_traits/is_convertible.hpp + /usr/include/boost/type_traits/is_abstract.hpp + /usr/include/boost/type_traits/add_lvalue_reference.hpp + /usr/include/boost/type_traits/add_reference.hpp + /usr/include/boost/endian/detail/endian_load.hpp + /usr/include/boost/endian/detail/order.hpp + /usr/include/boost/core/scoped_enum.hpp + /usr/include/boost/endian/detail/is_trivially_copyable.hpp + /usr/include/boost/type_traits/has_trivial_copy.hpp + /usr/include/boost/type_traits/is_copy_constructible.hpp + /usr/include/boost/type_traits/has_trivial_assign.hpp + /usr/include/boost/type_traits/has_trivial_destructor.hpp + /usr/include/boost/type_traits/is_signed.hpp + /usr/include/boost/endian/detail/endian_store.hpp + /usr/include/boost/beast/websocket/detail/pmd_extension.hpp + /usr/include/boost/beast/websocket/detail/pmd_extension.ipp + /usr/include/boost/beast/zlib/deflate_stream.hpp + /usr/include/boost/beast/zlib/error.hpp + /usr/include/boost/beast/zlib/impl/error.hpp + /usr/include/boost/beast/zlib/impl/error.ipp + /usr/include/boost/beast/zlib/zlib.hpp + /usr/include/boost/beast/zlib/detail/deflate_stream.hpp + /usr/include/boost/beast/zlib/detail/ranges.hpp + /usr/include/boost/beast/zlib/detail/deflate_stream.ipp + /usr/include/boost/make_unique.hpp + /usr/include/boost/smart_ptr/make_unique.hpp + /usr/include/boost/beast/zlib/inflate_stream.hpp + /usr/include/boost/beast/zlib/detail/inflate_stream.hpp + /usr/include/boost/beast/zlib/detail/bitstream.hpp + /usr/include/boost/beast/zlib/detail/window.hpp + /usr/include/boost/beast/zlib/detail/inflate_stream.ipp + /usr/include/boost/beast/core/buffers_suffix.hpp + /usr/include/boost/beast/core/impl/buffers_suffix.hpp + /usr/include/boost/type_traits.hpp + /usr/include/boost/type_traits/add_cv.hpp + /usr/include/boost/type_traits/aligned_storage.hpp + /usr/include/boost/type_traits/common_type.hpp + /usr/include/boost/type_traits/detail/mp_defer.hpp + /usr/include/boost/type_traits/conjunction.hpp + /usr/include/boost/type_traits/copy_cv_ref.hpp + /usr/include/boost/type_traits/copy_reference.hpp + /usr/include/boost/type_traits/disjunction.hpp + /usr/include/boost/type_traits/floating_point_promotion.hpp + /usr/include/boost/type_traits/function_traits.hpp + /usr/include/boost/type_traits/has_bit_and.hpp + /usr/include/boost/type_traits/detail/has_binary_operator.hpp + /usr/include/boost/type_traits/has_bit_and_assign.hpp + /usr/include/boost/type_traits/has_bit_or.hpp + /usr/include/boost/type_traits/has_bit_or_assign.hpp + /usr/include/boost/type_traits/has_bit_xor.hpp + /usr/include/boost/type_traits/has_bit_xor_assign.hpp + /usr/include/boost/type_traits/has_complement.hpp + /usr/include/boost/type_traits/detail/has_prefix_operator.hpp + /usr/include/boost/type_traits/has_dereference.hpp + /usr/include/boost/type_traits/has_divides.hpp + /usr/include/boost/type_traits/has_divides_assign.hpp + /usr/include/boost/type_traits/has_equal_to.hpp + /usr/include/boost/type_traits/has_greater.hpp + /usr/include/boost/type_traits/has_greater_equal.hpp + /usr/include/boost/type_traits/has_left_shift.hpp + /usr/include/boost/type_traits/has_left_shift_assign.hpp + /usr/include/boost/type_traits/has_less.hpp + /usr/include/boost/type_traits/has_less_equal.hpp + /usr/include/boost/type_traits/has_logical_and.hpp + /usr/include/boost/type_traits/has_logical_not.hpp + /usr/include/boost/type_traits/has_logical_or.hpp + /usr/include/boost/type_traits/has_minus.hpp + /usr/include/boost/type_traits/remove_pointer.hpp + /usr/include/boost/type_traits/has_minus_assign.hpp + /usr/include/boost/type_traits/has_modulus.hpp + /usr/include/boost/type_traits/has_modulus_assign.hpp + /usr/include/boost/type_traits/has_multiplies.hpp + /usr/include/boost/type_traits/has_multiplies_assign.hpp + /usr/include/boost/type_traits/has_negate.hpp + /usr/include/boost/type_traits/has_new_operator.hpp + /usr/include/boost/type_traits/has_not_equal_to.hpp + /usr/include/boost/type_traits/has_nothrow_copy.hpp + /usr/include/boost/type_traits/has_nothrow_destructor.hpp + /usr/include/boost/type_traits/has_plus.hpp + /usr/include/boost/type_traits/has_plus_assign.hpp + /usr/include/boost/type_traits/has_post_decrement.hpp + /usr/include/boost/type_traits/detail/has_postfix_operator.hpp + /usr/include/boost/type_traits/has_post_increment.hpp + /usr/include/boost/type_traits/has_pre_decrement.hpp + /usr/include/boost/type_traits/has_pre_increment.hpp + /usr/include/boost/type_traits/has_right_shift.hpp + /usr/include/boost/type_traits/has_right_shift_assign.hpp + /usr/include/boost/type_traits/has_trivial_constructor.hpp + /usr/include/boost/type_traits/has_trivial_move_constructor.hpp + /usr/include/boost/type_traits/has_unary_minus.hpp + /usr/include/boost/type_traits/has_unary_plus.hpp + /usr/include/boost/type_traits/has_virtual_destructor.hpp + /usr/include/boost/type_traits/is_complex.hpp + /usr/include/c++/11/complex + /usr/include/boost/type_traits/is_compound.hpp + /usr/include/boost/type_traits/is_fundamental.hpp + /usr/include/boost/type_traits/is_copy_assignable.hpp + /usr/include/boost/type_traits/is_noncopyable.hpp + /usr/include/boost/type_traits/is_empty.hpp + /usr/include/boost/type_traits/is_final.hpp + /usr/include/boost/type_traits/is_float.hpp + /usr/include/boost/type_traits/is_list_constructible.hpp + /usr/include/boost/type_traits/is_member_object_pointer.hpp + /usr/include/boost/type_traits/is_nothrow_swappable.hpp + /usr/include/boost/type_traits/is_object.hpp + /usr/include/boost/type_traits/is_polymorphic.hpp + /usr/include/boost/type_traits/is_scoped_enum.hpp + /usr/include/boost/type_traits/negation.hpp + /usr/include/boost/type_traits/is_stateless.hpp + /usr/include/boost/type_traits/is_trivially_copyable.hpp + /usr/include/boost/type_traits/is_union.hpp + /usr/include/boost/type_traits/is_unscoped_enum.hpp + /usr/include/boost/type_traits/is_unsigned.hpp + /usr/include/boost/type_traits/is_virtual_base_of.hpp + /usr/include/boost/type_traits/make_signed.hpp + /usr/include/boost/type_traits/make_unsigned.hpp + /usr/include/boost/type_traits/rank.hpp + /usr/include/boost/type_traits/remove_all_extents.hpp + /usr/include/boost/type_traits/remove_cv_ref.hpp + /usr/include/boost/type_traits/remove_volatile.hpp + /usr/include/boost/type_traits/integral_promotion.hpp + /usr/include/boost/type_traits/promote.hpp + /usr/include/boost/beast/websocket/impl/stream_impl.hpp + /usr/include/boost/beast/websocket/detail/mask.hpp + /usr/include/boost/beast/websocket/detail/mask.ipp + /usr/include/boost/beast/websocket/detail/service.hpp + /usr/include/boost/beast/core/detail/service_base.hpp + /usr/include/boost/beast/websocket/detail/service.ipp + /usr/include/boost/beast/websocket/detail/soft_mutex.hpp + /usr/include/boost/beast/http/read.hpp + /usr/include/boost/beast/http/basic_parser.hpp + /usr/include/boost/beast/http/detail/basic_parser.hpp + /usr/include/boost/beast/core/detail/char_buffer.hpp + /usr/include/boost/beast/http/detail/basic_parser.ipp + /usr/include/boost/beast/http/impl/basic_parser.hpp + /usr/include/boost/beast/http/impl/basic_parser.ipp + /usr/include/boost/beast/http/impl/read.hpp + /usr/include/boost/beast/http/parser.hpp + /usr/include/boost/beast/http/impl/parser.hpp + /usr/include/boost/beast/core/detail/buffer.hpp + /usr/include/boost/beast/core/detail/read.hpp + /usr/include/boost/beast/core/detail/impl/read.hpp + /usr/include/boost/beast/core/read_size.hpp + /usr/include/boost/beast/core/impl/read_size.hpp + /usr/include/boost/beast/http/write.hpp + /usr/include/boost/beast/http/serializer.hpp + /usr/include/boost/beast/http/impl/serializer.hpp + /usr/include/boost/beast/http/impl/write.hpp + /usr/include/boost/beast/core/make_printable.hpp + /usr/include/boost/beast/core/saved_handler.hpp + /usr/include/boost/beast/core/impl/saved_handler.hpp + /usr/include/boost/beast/core/impl/saved_handler.ipp + /usr/include/boost/beast/core/static_buffer.hpp + /usr/include/boost/beast/core/detail/buffers_pair.hpp + /usr/include/boost/beast/core/impl/static_buffer.hpp + /usr/include/boost/beast/core/impl/static_buffer.ipp + /usr/include/boost/beast/websocket/impl/accept.hpp + /usr/include/boost/beast/websocket/detail/type_traits.hpp + /usr/include/boost/beast/version.hpp + /usr/include/boost/beast/websocket/impl/close.hpp + /usr/include/boost/beast/websocket/impl/handshake.hpp + /usr/include/boost/beast/core/flat_buffer.hpp + /usr/include/boost/beast/core/impl/flat_buffer.hpp + /usr/include/boost/beast/websocket/impl/ping.hpp + /usr/include/boost/beast/websocket/impl/read.hpp + /usr/include/boost/beast/websocket/impl/stream.hpp + /usr/include/boost/beast/websocket/impl/write.hpp + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/JsonRpc/RemoteEndPoint.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/lsp_diagnostic.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/lsRange.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/JsonRpc/serializer.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/JsonRpc/macro_map.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/lsPosition.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/lsTextEdit.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/lsDocumentUri.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/lsResponseError.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/lsAny.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/JsonRpc/message.h + /usr/include/c++/11/iostream + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/method_type.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/location_type.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/JsonRpc/RequestInMessage.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/JsonRpc/lsRequestId.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/JsonRpc/lsResponseMessage.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/JsonRpc/Cancellation.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/JsonRpc/NotificationInMessage.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/JsonRpc/traits.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/JsonRpc/threaded_queue.h + /usr/include/c++/11/deque + /usr/include/c++/11/bits/stl_deque.h + /usr/include/c++/11/bits/deque.tcc + /usr/include/c++/11/unordered_map + /usr/include/c++/11/bits/hashtable.h + /usr/include/c++/11/bits/hashtable_policy.h + /usr/include/c++/11/bits/unordered_map.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/JsonRpc/MessageJsonHandler.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/JsonRpc/Endpoint.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/JsonRpc/stream.h + /usr/include/boost/beast/core.hpp + /usr/include/boost/beast/core/buffered_read_stream.hpp + /usr/include/boost/beast/core/multi_buffer.hpp + /usr/include/boost/beast/core/impl/multi_buffer.hpp + /usr/include/boost/beast/core/impl/buffered_read_stream.hpp + /usr/include/boost/beast/core/buffers_adaptor.hpp + /usr/include/boost/beast/core/impl/buffers_adaptor.hpp + /usr/include/boost/beast/core/buffers_to_string.hpp + /usr/include/boost/beast/core/detect_ssl.hpp + /usr/include/boost/logic/tribool.hpp + /usr/include/boost/logic/tribool_fwd.hpp + /usr/include/boost/asio/yield.hpp + /usr/include/boost/asio/coroutine.hpp + /usr/include/boost/asio/unyield.hpp + /usr/include/boost/beast/core/file.hpp + /usr/include/boost/beast/core/file_base.hpp + /usr/include/boost/beast/core/file_posix.hpp + /usr/include/boost/beast/core/impl/file_posix.ipp + /usr/include/boost/beast/core/file_stdio.hpp + /usr/include/boost/beast/core/impl/file_stdio.ipp + /usr/include/boost/beast/core/detail/win32_unicode_path.hpp + /usr/include/boost/beast/core/file_win32.hpp + /usr/include/boost/beast/core/flat_stream.hpp + /usr/include/boost/beast/core/detail/flat_stream.hpp + /usr/include/boost/beast/core/impl/flat_stream.hpp + /usr/include/boost/beast/core/ostream.hpp + /usr/include/boost/beast/core/detail/ostream.hpp + /usr/include/boost/beast/core/span.hpp + /usr/include/boost/beast/websocket.hpp + +CMakeFiles/lspcpp.dir/src/jsonrpc/message.cpp.o + /usr/local/src/asymptote-2.78/LspCpp/src/jsonrpc/message.cpp + /usr/include/stdc-predef.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/JsonRpc/message.h + /usr/include/c++/11/atomic + /usr/include/c++/11/bits/atomic_base.h + /usr/include/c++/11/x86_64-redhat-linux/bits/c++config.h + /usr/include/bits/wordsize.h + /usr/include/c++/11/x86_64-redhat-linux/bits/os_defines.h + /usr/include/features.h + /usr/include/sys/cdefs.h + /usr/include/bits/long-double.h + /usr/include/gnu/stubs.h + /usr/include/gnu/stubs-64.h + /usr/include/c++/11/x86_64-redhat-linux/bits/cpu_defines.h + /usr/lib/gcc/x86_64-redhat-linux/11/include/stdint.h + /usr/include/stdint.h + /usr/include/bits/libc-header-start.h + /usr/include/bits/types.h + /usr/include/bits/timesize.h + /usr/include/bits/typesizes.h + /usr/include/bits/time64.h + /usr/include/bits/wchar.h + /usr/include/bits/stdint-intn.h + /usr/include/bits/stdint-uintn.h + /usr/include/c++/11/bits/atomic_lockfree_defines.h + /usr/include/c++/11/bits/move.h + /usr/include/c++/11/type_traits + /usr/include/c++/11/string + /usr/include/c++/11/bits/stringfwd.h + /usr/include/c++/11/bits/memoryfwd.h + /usr/include/c++/11/bits/char_traits.h + /usr/include/c++/11/bits/stl_algobase.h + /usr/include/c++/11/bits/functexcept.h + /usr/include/c++/11/bits/exception_defines.h + /usr/include/c++/11/bits/cpp_type_traits.h + /usr/include/c++/11/ext/type_traits.h + /usr/include/c++/11/ext/numeric_traits.h + /usr/include/c++/11/bits/stl_pair.h + /usr/include/c++/11/bits/stl_iterator_base_types.h + /usr/include/c++/11/bits/stl_iterator_base_funcs.h + /usr/include/c++/11/bits/concept_check.h + /usr/include/c++/11/debug/assertions.h + /usr/include/c++/11/bits/stl_iterator.h + /usr/include/c++/11/bits/ptr_traits.h + /usr/include/c++/11/debug/debug.h + /usr/include/c++/11/bits/predefined_ops.h + /usr/include/c++/11/bits/postypes.h + /usr/include/c++/11/cwchar + /usr/include/wchar.h + /usr/include/bits/floatn.h + /usr/include/bits/floatn-common.h + /usr/lib/gcc/x86_64-redhat-linux/11/include/stddef.h + /usr/lib/gcc/x86_64-redhat-linux/11/include/stdarg.h + /usr/include/bits/types/wint_t.h + /usr/include/bits/types/mbstate_t.h + /usr/include/bits/types/__mbstate_t.h + /usr/include/bits/types/__FILE.h + /usr/include/bits/types/FILE.h + /usr/include/bits/types/locale_t.h + /usr/include/bits/types/__locale_t.h + /usr/include/c++/11/cstdint + /usr/include/c++/11/bits/allocator.h + /usr/include/c++/11/x86_64-redhat-linux/bits/c++allocator.h + /usr/include/c++/11/ext/new_allocator.h + /usr/include/c++/11/new + /usr/include/c++/11/bits/exception.h + /usr/include/c++/11/bits/localefwd.h + /usr/include/c++/11/x86_64-redhat-linux/bits/c++locale.h + /usr/include/c++/11/clocale + /usr/include/locale.h + /usr/include/bits/locale.h + /usr/include/c++/11/iosfwd + /usr/include/c++/11/cctype + /usr/include/ctype.h + /usr/include/bits/endian.h + /usr/include/bits/endianness.h + /usr/include/c++/11/bits/ostream_insert.h + /usr/include/c++/11/bits/cxxabi_forced.h + /usr/include/c++/11/bits/stl_function.h + /usr/include/c++/11/backward/binders.h + /usr/include/c++/11/bits/range_access.h + /usr/include/c++/11/initializer_list + /usr/include/c++/11/bits/basic_string.h + /usr/include/c++/11/ext/atomicity.h + /usr/include/c++/11/x86_64-redhat-linux/bits/gthr.h + /usr/include/c++/11/x86_64-redhat-linux/bits/gthr-default.h + /usr/include/pthread.h + /usr/include/sched.h + /usr/include/bits/types/time_t.h + /usr/include/bits/types/struct_timespec.h + /usr/include/bits/sched.h + /usr/include/bits/types/struct_sched_param.h + /usr/include/bits/cpu-set.h + /usr/include/time.h + /usr/include/bits/time.h + /usr/include/bits/timex.h + /usr/include/bits/types/struct_timeval.h + /usr/include/bits/types/clock_t.h + /usr/include/bits/types/struct_tm.h + /usr/include/bits/types/clockid_t.h + /usr/include/bits/types/timer_t.h + /usr/include/bits/types/struct_itimerspec.h + /usr/include/bits/pthreadtypes.h + /usr/include/bits/thread-shared-types.h + /usr/include/bits/pthreadtypes-arch.h + /usr/include/bits/struct_mutex.h + /usr/include/bits/struct_rwlock.h + /usr/include/bits/setjmp.h + /usr/include/bits/types/__sigset_t.h + /usr/include/bits/types/struct___jmp_buf_tag.h + /usr/include/c++/11/x86_64-redhat-linux/bits/atomic_word.h + /usr/include/sys/single_threaded.h + /usr/include/c++/11/ext/alloc_traits.h + /usr/include/c++/11/bits/alloc_traits.h + /usr/include/c++/11/bits/stl_construct.h + /usr/include/c++/11/ext/string_conversions.h + /usr/include/c++/11/cstdlib + /usr/include/stdlib.h + /usr/include/bits/waitflags.h + /usr/include/bits/waitstatus.h + /usr/include/sys/types.h + /usr/include/endian.h + /usr/include/bits/byteswap.h + /usr/include/bits/uintn-identity.h + /usr/include/sys/select.h + /usr/include/bits/select.h + /usr/include/bits/types/sigset_t.h + /usr/include/alloca.h + /usr/include/bits/stdlib-bsearch.h + /usr/include/bits/stdlib-float.h + /usr/include/c++/11/bits/std_abs.h + /usr/include/c++/11/cstdio + /usr/include/stdio.h + /usr/include/bits/types/__fpos_t.h + /usr/include/bits/types/__fpos64_t.h + /usr/include/bits/types/struct_FILE.h + /usr/include/bits/types/cookie_io_functions_t.h + /usr/include/bits/stdio_lim.h + /usr/include/bits/stdio.h + /usr/include/c++/11/cerrno + /usr/include/errno.h + /usr/include/bits/errno.h + /usr/include/linux/errno.h + /usr/include/asm/errno.h + /usr/include/asm-generic/errno.h + /usr/include/asm-generic/errno-base.h + /usr/include/bits/types/error_t.h + /usr/include/c++/11/bits/charconv.h + /usr/include/c++/11/bits/functional_hash.h + /usr/include/c++/11/bits/hash_bytes.h + /usr/include/c++/11/bits/basic_string.tcc + /usr/include/c++/11/iostream + /usr/include/c++/11/ostream + /usr/include/c++/11/ios + /usr/include/c++/11/exception + /usr/include/c++/11/bits/exception_ptr.h + /usr/include/c++/11/bits/cxxabi_init_exception.h + /usr/include/c++/11/typeinfo + /usr/include/c++/11/bits/nested_exception.h + /usr/include/c++/11/bits/ios_base.h + /usr/include/c++/11/bits/locale_classes.h + /usr/include/c++/11/bits/locale_classes.tcc + /usr/include/c++/11/system_error + /usr/include/c++/11/x86_64-redhat-linux/bits/error_constants.h + /usr/include/c++/11/stdexcept + /usr/include/c++/11/streambuf + /usr/include/c++/11/bits/streambuf.tcc + /usr/include/c++/11/bits/basic_ios.h + /usr/include/c++/11/bits/locale_facets.h + /usr/include/c++/11/cwctype + /usr/include/wctype.h + /usr/include/bits/wctype-wchar.h + /usr/include/c++/11/x86_64-redhat-linux/bits/ctype_base.h + /usr/include/c++/11/bits/streambuf_iterator.h + /usr/include/c++/11/x86_64-redhat-linux/bits/ctype_inline.h + /usr/include/c++/11/bits/locale_facets.tcc + /usr/include/c++/11/bits/basic_ios.tcc + /usr/include/c++/11/bits/ostream.tcc + /usr/include/c++/11/istream + /usr/include/c++/11/bits/istream.tcc + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/JsonRpc/serializer.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/JsonRpc/macro_map.h + /usr/include/boost/optional.hpp + /usr/include/boost/optional/optional.hpp + /usr/include/boost/assert.hpp + /usr/include/assert.h + /usr/include/boost/core/addressof.hpp + /usr/include/boost/config.hpp + /usr/include/boost/config/user.hpp + /usr/include/boost/config/detail/select_compiler_config.hpp + /usr/include/boost/config/compiler/gcc.hpp + /usr/include/c++/11/cstddef + /usr/include/boost/config/detail/select_stdlib_config.hpp + /usr/include/c++/11/version + /usr/include/boost/config/stdlib/libstdcpp3.hpp + /usr/include/unistd.h + /usr/include/bits/posix_opt.h + /usr/include/bits/environments.h + /usr/include/bits/confname.h + /usr/include/bits/getopt_posix.h + /usr/include/bits/getopt_core.h + /usr/include/bits/unistd_ext.h + /usr/include/boost/config/detail/select_platform_config.hpp + /usr/include/boost/config/platform/linux.hpp + /usr/include/boost/config/detail/posix_features.hpp + /usr/include/boost/config/detail/suffix.hpp + /usr/include/boost/config/helper_macros.hpp + /usr/include/boost/core/enable_if.hpp + /usr/include/boost/core/explicit_operator_bool.hpp + /usr/include/boost/config/workaround.hpp + /usr/include/boost/core/swap.hpp + /usr/include/c++/11/utility + /usr/include/c++/11/bits/stl_relops.h + /usr/include/boost/optional/bad_optional_access.hpp + /usr/include/boost/static_assert.hpp + /usr/include/boost/detail/workaround.hpp + /usr/include/boost/throw_exception.hpp + /usr/include/boost/assert/source_location.hpp + /usr/include/boost/current_function.hpp + /usr/include/boost/cstdint.hpp + /usr/include/boost/exception/exception.hpp + /usr/include/boost/type.hpp + /usr/include/boost/type_traits/alignment_of.hpp + /usr/include/boost/type_traits/intrinsics.hpp + /usr/include/boost/type_traits/detail/config.hpp + /usr/include/boost/version.hpp + /usr/include/boost/type_traits/integral_constant.hpp + /usr/include/boost/type_traits/conditional.hpp + /usr/include/boost/type_traits/has_nothrow_constructor.hpp + /usr/include/boost/type_traits/is_default_constructible.hpp + /usr/include/boost/type_traits/is_complete.hpp + /usr/include/boost/type_traits/declval.hpp + /usr/include/boost/type_traits/add_rvalue_reference.hpp + /usr/include/boost/type_traits/is_void.hpp + /usr/include/boost/type_traits/is_reference.hpp + /usr/include/boost/type_traits/is_lvalue_reference.hpp + /usr/include/boost/type_traits/is_rvalue_reference.hpp + /usr/include/boost/type_traits/remove_reference.hpp + /usr/include/boost/type_traits/is_function.hpp + /usr/include/boost/type_traits/detail/is_function_cxx_11.hpp + /usr/include/boost/type_traits/detail/yes_no_type.hpp + /usr/include/boost/type_traits/type_with_alignment.hpp + /usr/include/boost/type_traits/is_pod.hpp + /usr/include/boost/type_traits/is_scalar.hpp + /usr/include/boost/type_traits/is_arithmetic.hpp + /usr/include/boost/type_traits/is_integral.hpp + /usr/include/boost/type_traits/is_floating_point.hpp + /usr/include/boost/type_traits/is_enum.hpp + /usr/include/boost/type_traits/is_pointer.hpp + /usr/include/boost/type_traits/is_member_pointer.hpp + /usr/include/boost/type_traits/is_member_function_pointer.hpp + /usr/include/boost/type_traits/detail/is_member_function_pointer_cxx_11.hpp + /usr/include/boost/type_traits/remove_const.hpp + /usr/include/boost/type_traits/decay.hpp + /usr/include/boost/type_traits/is_array.hpp + /usr/include/boost/type_traits/remove_bounds.hpp + /usr/include/boost/type_traits/remove_extent.hpp + /usr/include/boost/type_traits/add_pointer.hpp + /usr/include/boost/type_traits/remove_cv.hpp + /usr/include/boost/type_traits/is_base_of.hpp + /usr/include/boost/type_traits/is_base_and_derived.hpp + /usr/include/boost/type_traits/is_same.hpp + /usr/include/boost/type_traits/is_class.hpp + /usr/include/boost/type_traits/is_const.hpp + /usr/include/boost/type_traits/is_constructible.hpp + /usr/include/boost/type_traits/is_destructible.hpp + /usr/include/boost/type_traits/is_nothrow_move_assignable.hpp + /usr/include/boost/type_traits/has_trivial_move_assign.hpp + /usr/include/boost/type_traits/is_assignable.hpp + /usr/include/boost/type_traits/is_volatile.hpp + /usr/include/boost/type_traits/has_nothrow_assign.hpp + /usr/include/boost/type_traits/enable_if.hpp + /usr/include/boost/type_traits/is_nothrow_move_constructible.hpp + /usr/include/boost/move/utility.hpp + /usr/include/boost/move/detail/config_begin.hpp + /usr/include/boost/move/detail/workaround.hpp + /usr/include/boost/move/utility_core.hpp + /usr/include/boost/move/core.hpp + /usr/include/boost/move/detail/config_end.hpp + /usr/include/boost/move/detail/meta_utils.hpp + /usr/include/boost/move/detail/meta_utils_core.hpp + /usr/include/boost/move/traits.hpp + /usr/include/boost/move/detail/type_traits.hpp + /usr/include/boost/none.hpp + /usr/include/boost/none_t.hpp + /usr/include/boost/utility/compare_pointees.hpp + /usr/include/c++/11/functional + /usr/include/c++/11/tuple + /usr/include/c++/11/array + /usr/include/c++/11/bits/uses_allocator.h + /usr/include/c++/11/bits/invoke.h + /usr/include/c++/11/bits/refwrap.h + /usr/include/c++/11/bits/std_function.h + /usr/include/boost/utility/result_of.hpp + /usr/include/boost/preprocessor/cat.hpp + /usr/include/boost/preprocessor/config/config.hpp + /usr/include/boost/preprocessor/iteration/iterate.hpp + /usr/include/boost/preprocessor/arithmetic/dec.hpp + /usr/include/boost/preprocessor/config/limits.hpp + /usr/include/boost/preprocessor/arithmetic/limits/dec_256.hpp + /usr/include/boost/preprocessor/arithmetic/inc.hpp + /usr/include/boost/preprocessor/arithmetic/limits/inc_256.hpp + /usr/include/boost/preprocessor/array/elem.hpp + /usr/include/boost/preprocessor/array/data.hpp + /usr/include/boost/preprocessor/tuple/elem.hpp + /usr/include/boost/preprocessor/facilities/expand.hpp + /usr/include/boost/preprocessor/facilities/overload.hpp + /usr/include/boost/preprocessor/variadic/size.hpp + /usr/include/boost/preprocessor/control/iif.hpp + /usr/include/boost/preprocessor/facilities/check_empty.hpp + /usr/include/boost/preprocessor/variadic/has_opt.hpp + /usr/include/boost/preprocessor/variadic/limits/size_64.hpp + /usr/include/boost/preprocessor/tuple/rem.hpp + /usr/include/boost/preprocessor/tuple/detail/is_single_return.hpp + /usr/include/boost/preprocessor/variadic/elem.hpp + /usr/include/boost/preprocessor/variadic/limits/elem_64.hpp + /usr/include/boost/preprocessor/array/size.hpp + /usr/include/boost/preprocessor/slot/slot.hpp + /usr/include/boost/preprocessor/slot/detail/def.hpp + /usr/include/boost/preprocessor/repetition/enum_params.hpp + /usr/include/boost/preprocessor/punctuation/comma_if.hpp + /usr/include/boost/preprocessor/control/if.hpp + /usr/include/boost/preprocessor/logical/bool.hpp + /usr/include/boost/preprocessor/logical/limits/bool_256.hpp + /usr/include/boost/preprocessor/facilities/empty.hpp + /usr/include/boost/preprocessor/punctuation/comma.hpp + /usr/include/boost/preprocessor/repetition/repeat.hpp + /usr/include/boost/preprocessor/debug/error.hpp + /usr/include/boost/preprocessor/detail/auto_rec.hpp + /usr/include/boost/preprocessor/detail/limits/auto_rec_256.hpp + /usr/include/boost/preprocessor/tuple/eat.hpp + /usr/include/boost/preprocessor/repetition/limits/repeat_256.hpp + /usr/include/boost/preprocessor/repetition/enum_trailing_params.hpp + /usr/include/boost/preprocessor/repetition/enum_binary_params.hpp + /usr/include/boost/preprocessor/repetition/enum_shifted_params.hpp + /usr/include/boost/preprocessor/facilities/intercept.hpp + /usr/include/boost/preprocessor/facilities/limits/intercept_256.hpp + /usr/include/boost/type_traits/type_identity.hpp + /usr/include/boost/preprocessor/iteration/detail/iter/forward1.hpp + /usr/include/boost/preprocessor/iteration/detail/bounds/lower1.hpp + /usr/include/boost/preprocessor/slot/detail/shared.hpp + /usr/include/boost/preprocessor/iteration/detail/bounds/upper1.hpp + /usr/include/boost/preprocessor/iteration/detail/iter/limits/forward1_256.hpp + /usr/include/boost/utility/detail/result_of_iterate.hpp + /usr/include/boost/optional/optional_fwd.hpp + /usr/include/boost/optional/detail/optional_config.hpp + /usr/include/boost/optional/detail/optional_factory_support.hpp + /usr/include/boost/optional/detail/optional_aligned_storage.hpp + /usr/include/boost/optional/detail/optional_trivially_copyable_base.hpp + /usr/include/boost/optional/detail/optional_reference_spec.hpp + /usr/include/boost/optional/detail/optional_relops.hpp + /usr/include/boost/optional/detail/optional_swap.hpp + /usr/include/c++/11/cassert + /usr/include/c++/11/memory + /usr/include/c++/11/bits/stl_uninitialized.h + /usr/include/c++/11/bits/stl_tempbuf.h + /usr/include/c++/11/bits/stl_raw_storage_iter.h + /usr/include/c++/11/bits/align.h + /usr/include/c++/11/bit + /usr/include/c++/11/bits/unique_ptr.h + /usr/include/c++/11/bits/shared_ptr.h + /usr/include/c++/11/bits/shared_ptr_base.h + /usr/include/c++/11/bits/allocated_ptr.h + /usr/include/c++/11/ext/aligned_buffer.h + /usr/include/c++/11/ext/concurrence.h + /usr/include/c++/11/bits/shared_ptr_atomic.h + /usr/include/c++/11/backward/auto_ptr.h + /usr/include/c++/11/vector + /usr/include/c++/11/bits/stl_vector.h + /usr/include/c++/11/bits/stl_bvector.h + /usr/include/c++/11/bits/vector.tcc + /usr/include/c++/11/map + /usr/include/c++/11/bits/stl_tree.h + /usr/include/c++/11/bits/stl_map.h + /usr/include/c++/11/bits/stl_multimap.h + /usr/include/c++/11/bits/erase_if.h + /usr/include/c++/11/algorithm + /usr/include/c++/11/bits/stl_algo.h + /usr/include/c++/11/bits/algorithmfwd.h + /usr/include/c++/11/bits/stl_heap.h + /usr/include/c++/11/bits/uniform_int_dist.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/method_type.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/stringbuffer.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/stream.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/rapidjson.h + /usr/include/c++/11/cstring + /usr/include/string.h + /usr/include/strings.h + /usr/include/inttypes.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/encodings.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/internal/stack.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/allocators.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/rapidjson.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/internal/meta.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/rapidjson.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/internal/swap.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/rapidjson.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/writer.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/internal/clzll.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/internal/meta.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/internal/strfunc.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/stream.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/internal/dtoa.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/internal/itoa.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/internal/diyfp.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/internal/clzll.h + /usr/include/c++/11/limits + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/internal/ieee754.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/internal/itoa.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/stringbuffer.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/JsonRpc/lsRequestId.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/JsonRpc/RequestInMessage.h + /usr/include/c++/11/mutex + /usr/include/c++/11/chrono + /usr/include/c++/11/ratio + /usr/include/c++/11/ctime + /usr/include/c++/11/bits/parse_numbers.h + /usr/include/c++/11/bits/std_mutex.h + /usr/include/c++/11/bits/unique_lock.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/JsonRpc/lsResponseMessage.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/JsonRpc/Condition.h + /usr/include/c++/11/condition_variable + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/JsonRpc/json.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/document.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/reader.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/allocators.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/encodedstream.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/memorystream.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/internal/strtod.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/internal/biginteger.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/internal/pow10.h + /usr/include/c++/11/climits + /usr/lib/gcc/x86_64-redhat-linux/11/include/limits.h + /usr/lib/gcc/x86_64-redhat-linux/11/include/syslimits.h + /usr/include/limits.h + /usr/include/bits/posix1_lim.h + /usr/include/bits/local_lim.h + /usr/include/linux/limits.h + /usr/include/bits/posix2_lim.h + /usr/include/bits/xopen_lim.h + /usr/include/bits/uio_lim.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/error/error.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/rapidjson.h + /usr/include/c++/11/iterator + /usr/include/c++/11/bits/stream_iterator.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/prettywriter.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/writer.h + +CMakeFiles/lspcpp.dir/src/jsonrpc/serializer.cpp.o + /usr/local/src/asymptote-2.78/LspCpp/src/jsonrpc/serializer.cpp + /usr/include/stdc-predef.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/JsonRpc/serializer.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/JsonRpc/macro_map.h + /usr/include/boost/optional.hpp + /usr/include/boost/optional/optional.hpp + /usr/include/c++/11/new + /usr/include/c++/11/x86_64-redhat-linux/bits/c++config.h + /usr/include/bits/wordsize.h + /usr/include/c++/11/x86_64-redhat-linux/bits/os_defines.h + /usr/include/features.h + /usr/include/sys/cdefs.h + /usr/include/bits/long-double.h + /usr/include/gnu/stubs.h + /usr/include/gnu/stubs-64.h + /usr/include/c++/11/x86_64-redhat-linux/bits/cpu_defines.h + /usr/include/c++/11/bits/exception.h + /usr/include/c++/11/iosfwd + /usr/include/c++/11/bits/stringfwd.h + /usr/include/c++/11/bits/memoryfwd.h + /usr/include/c++/11/bits/postypes.h + /usr/include/c++/11/cwchar + /usr/include/wchar.h + /usr/include/bits/libc-header-start.h + /usr/include/bits/floatn.h + /usr/include/bits/floatn-common.h + /usr/lib/gcc/x86_64-redhat-linux/11/include/stddef.h + /usr/lib/gcc/x86_64-redhat-linux/11/include/stdarg.h + /usr/include/bits/wchar.h + /usr/include/bits/types/wint_t.h + /usr/include/bits/types/mbstate_t.h + /usr/include/bits/types/__mbstate_t.h + /usr/include/bits/types/__FILE.h + /usr/include/bits/types/FILE.h + /usr/include/bits/types/locale_t.h + /usr/include/bits/types/__locale_t.h + /usr/include/boost/assert.hpp + /usr/include/assert.h + /usr/include/boost/core/addressof.hpp + /usr/include/boost/config.hpp + /usr/include/boost/config/user.hpp + /usr/include/boost/config/detail/select_compiler_config.hpp + /usr/include/boost/config/compiler/gcc.hpp + /usr/include/c++/11/cstddef + /usr/include/boost/config/detail/select_stdlib_config.hpp + /usr/include/c++/11/version + /usr/include/boost/config/stdlib/libstdcpp3.hpp + /usr/include/unistd.h + /usr/include/bits/posix_opt.h + /usr/include/bits/environments.h + /usr/include/bits/types.h + /usr/include/bits/timesize.h + /usr/include/bits/typesizes.h + /usr/include/bits/time64.h + /usr/include/bits/confname.h + /usr/include/bits/getopt_posix.h + /usr/include/bits/getopt_core.h + /usr/include/bits/unistd_ext.h + /usr/include/boost/config/detail/select_platform_config.hpp + /usr/include/boost/config/platform/linux.hpp + /usr/include/c++/11/cstdlib + /usr/include/stdlib.h + /usr/include/bits/waitflags.h + /usr/include/bits/waitstatus.h + /usr/include/sys/types.h + /usr/include/bits/types/clock_t.h + /usr/include/bits/types/clockid_t.h + /usr/include/bits/types/time_t.h + /usr/include/bits/types/timer_t.h + /usr/include/bits/stdint-intn.h + /usr/include/endian.h + /usr/include/bits/endian.h + /usr/include/bits/endianness.h + /usr/include/bits/byteswap.h + /usr/include/bits/uintn-identity.h + /usr/include/sys/select.h + /usr/include/bits/select.h + /usr/include/bits/types/sigset_t.h + /usr/include/bits/types/__sigset_t.h + /usr/include/bits/types/struct_timeval.h + /usr/include/bits/types/struct_timespec.h + /usr/include/bits/pthreadtypes.h + /usr/include/bits/thread-shared-types.h + /usr/include/bits/pthreadtypes-arch.h + /usr/include/bits/struct_mutex.h + /usr/include/bits/struct_rwlock.h + /usr/include/alloca.h + /usr/include/bits/stdlib-bsearch.h + /usr/include/bits/stdlib-float.h + /usr/include/c++/11/bits/std_abs.h + /usr/include/boost/config/detail/posix_features.hpp + /usr/include/boost/config/detail/suffix.hpp + /usr/include/boost/config/helper_macros.hpp + /usr/include/boost/core/enable_if.hpp + /usr/include/boost/core/explicit_operator_bool.hpp + /usr/include/boost/config/workaround.hpp + /usr/include/boost/core/swap.hpp + /usr/include/c++/11/utility + /usr/include/c++/11/bits/stl_relops.h + /usr/include/c++/11/bits/stl_pair.h + /usr/include/c++/11/bits/move.h + /usr/include/c++/11/type_traits + /usr/include/c++/11/initializer_list + /usr/include/boost/optional/bad_optional_access.hpp + /usr/include/c++/11/stdexcept + /usr/include/c++/11/exception + /usr/include/c++/11/bits/exception_ptr.h + /usr/include/c++/11/bits/exception_defines.h + /usr/include/c++/11/bits/cxxabi_init_exception.h + /usr/include/c++/11/typeinfo + /usr/include/c++/11/bits/hash_bytes.h + /usr/include/c++/11/bits/nested_exception.h + /usr/include/c++/11/string + /usr/include/c++/11/bits/char_traits.h + /usr/include/c++/11/bits/stl_algobase.h + /usr/include/c++/11/bits/functexcept.h + /usr/include/c++/11/bits/cpp_type_traits.h + /usr/include/c++/11/ext/type_traits.h + /usr/include/c++/11/ext/numeric_traits.h + /usr/include/c++/11/bits/stl_iterator_base_types.h + /usr/include/c++/11/bits/stl_iterator_base_funcs.h + /usr/include/c++/11/bits/concept_check.h + /usr/include/c++/11/debug/assertions.h + /usr/include/c++/11/bits/stl_iterator.h + /usr/include/c++/11/bits/ptr_traits.h + /usr/include/c++/11/debug/debug.h + /usr/include/c++/11/bits/predefined_ops.h + /usr/include/c++/11/cstdint + /usr/lib/gcc/x86_64-redhat-linux/11/include/stdint.h + /usr/include/stdint.h + /usr/include/bits/stdint-uintn.h + /usr/include/c++/11/bits/allocator.h + /usr/include/c++/11/x86_64-redhat-linux/bits/c++allocator.h + /usr/include/c++/11/ext/new_allocator.h + /usr/include/c++/11/bits/localefwd.h + /usr/include/c++/11/x86_64-redhat-linux/bits/c++locale.h + /usr/include/c++/11/clocale + /usr/include/locale.h + /usr/include/bits/locale.h + /usr/include/c++/11/cctype + /usr/include/ctype.h + /usr/include/c++/11/bits/ostream_insert.h + /usr/include/c++/11/bits/cxxabi_forced.h + /usr/include/c++/11/bits/stl_function.h + /usr/include/c++/11/backward/binders.h + /usr/include/c++/11/bits/range_access.h + /usr/include/c++/11/bits/basic_string.h + /usr/include/c++/11/ext/atomicity.h + /usr/include/c++/11/x86_64-redhat-linux/bits/gthr.h + /usr/include/c++/11/x86_64-redhat-linux/bits/gthr-default.h + /usr/include/pthread.h + /usr/include/sched.h + /usr/include/bits/sched.h + /usr/include/bits/types/struct_sched_param.h + /usr/include/bits/cpu-set.h + /usr/include/time.h + /usr/include/bits/time.h + /usr/include/bits/timex.h + /usr/include/bits/types/struct_tm.h + /usr/include/bits/types/struct_itimerspec.h + /usr/include/bits/setjmp.h + /usr/include/bits/types/struct___jmp_buf_tag.h + /usr/include/c++/11/x86_64-redhat-linux/bits/atomic_word.h + /usr/include/sys/single_threaded.h + /usr/include/c++/11/ext/alloc_traits.h + /usr/include/c++/11/bits/alloc_traits.h + /usr/include/c++/11/bits/stl_construct.h + /usr/include/c++/11/ext/string_conversions.h + /usr/include/c++/11/cstdio + /usr/include/stdio.h + /usr/include/bits/types/__fpos_t.h + /usr/include/bits/types/__fpos64_t.h + /usr/include/bits/types/struct_FILE.h + /usr/include/bits/types/cookie_io_functions_t.h + /usr/include/bits/stdio_lim.h + /usr/include/bits/stdio.h + /usr/include/c++/11/cerrno + /usr/include/errno.h + /usr/include/bits/errno.h + /usr/include/linux/errno.h + /usr/include/asm/errno.h + /usr/include/asm-generic/errno.h + /usr/include/asm-generic/errno-base.h + /usr/include/bits/types/error_t.h + /usr/include/c++/11/bits/charconv.h + /usr/include/c++/11/bits/functional_hash.h + /usr/include/c++/11/bits/basic_string.tcc + /usr/include/boost/static_assert.hpp + /usr/include/boost/detail/workaround.hpp + /usr/include/boost/throw_exception.hpp + /usr/include/boost/assert/source_location.hpp + /usr/include/boost/current_function.hpp + /usr/include/boost/cstdint.hpp + /usr/include/boost/exception/exception.hpp + /usr/include/boost/type.hpp + /usr/include/boost/type_traits/alignment_of.hpp + /usr/include/boost/type_traits/intrinsics.hpp + /usr/include/boost/type_traits/detail/config.hpp + /usr/include/boost/version.hpp + /usr/include/boost/type_traits/integral_constant.hpp + /usr/include/boost/type_traits/conditional.hpp + /usr/include/boost/type_traits/has_nothrow_constructor.hpp + /usr/include/boost/type_traits/is_default_constructible.hpp + /usr/include/boost/type_traits/is_complete.hpp + /usr/include/boost/type_traits/declval.hpp + /usr/include/boost/type_traits/add_rvalue_reference.hpp + /usr/include/boost/type_traits/is_void.hpp + /usr/include/boost/type_traits/is_reference.hpp + /usr/include/boost/type_traits/is_lvalue_reference.hpp + /usr/include/boost/type_traits/is_rvalue_reference.hpp + /usr/include/boost/type_traits/remove_reference.hpp + /usr/include/boost/type_traits/is_function.hpp + /usr/include/boost/type_traits/detail/is_function_cxx_11.hpp + /usr/include/boost/type_traits/detail/yes_no_type.hpp + /usr/include/boost/type_traits/type_with_alignment.hpp + /usr/include/boost/type_traits/is_pod.hpp + /usr/include/boost/type_traits/is_scalar.hpp + /usr/include/boost/type_traits/is_arithmetic.hpp + /usr/include/boost/type_traits/is_integral.hpp + /usr/include/boost/type_traits/is_floating_point.hpp + /usr/include/boost/type_traits/is_enum.hpp + /usr/include/boost/type_traits/is_pointer.hpp + /usr/include/boost/type_traits/is_member_pointer.hpp + /usr/include/boost/type_traits/is_member_function_pointer.hpp + /usr/include/boost/type_traits/detail/is_member_function_pointer_cxx_11.hpp + /usr/include/boost/type_traits/remove_const.hpp + /usr/include/boost/type_traits/decay.hpp + /usr/include/boost/type_traits/is_array.hpp + /usr/include/boost/type_traits/remove_bounds.hpp + /usr/include/boost/type_traits/remove_extent.hpp + /usr/include/boost/type_traits/add_pointer.hpp + /usr/include/boost/type_traits/remove_cv.hpp + /usr/include/boost/type_traits/is_base_of.hpp + /usr/include/boost/type_traits/is_base_and_derived.hpp + /usr/include/boost/type_traits/is_same.hpp + /usr/include/boost/type_traits/is_class.hpp + /usr/include/boost/type_traits/is_const.hpp + /usr/include/boost/type_traits/is_constructible.hpp + /usr/include/boost/type_traits/is_destructible.hpp + /usr/include/boost/type_traits/is_nothrow_move_assignable.hpp + /usr/include/boost/type_traits/has_trivial_move_assign.hpp + /usr/include/boost/type_traits/is_assignable.hpp + /usr/include/boost/type_traits/is_volatile.hpp + /usr/include/boost/type_traits/has_nothrow_assign.hpp + /usr/include/boost/type_traits/enable_if.hpp + /usr/include/boost/type_traits/is_nothrow_move_constructible.hpp + /usr/include/boost/move/utility.hpp + /usr/include/boost/move/detail/config_begin.hpp + /usr/include/boost/move/detail/workaround.hpp + /usr/include/boost/move/utility_core.hpp + /usr/include/boost/move/core.hpp + /usr/include/boost/move/detail/config_end.hpp + /usr/include/boost/move/detail/meta_utils.hpp + /usr/include/boost/move/detail/meta_utils_core.hpp + /usr/include/boost/move/traits.hpp + /usr/include/boost/move/detail/type_traits.hpp + /usr/include/boost/none.hpp + /usr/include/boost/none_t.hpp + /usr/include/boost/utility/compare_pointees.hpp + /usr/include/c++/11/functional + /usr/include/c++/11/tuple + /usr/include/c++/11/array + /usr/include/c++/11/bits/uses_allocator.h + /usr/include/c++/11/bits/invoke.h + /usr/include/c++/11/bits/refwrap.h + /usr/include/c++/11/bits/std_function.h + /usr/include/boost/utility/result_of.hpp + /usr/include/boost/preprocessor/cat.hpp + /usr/include/boost/preprocessor/config/config.hpp + /usr/include/boost/preprocessor/iteration/iterate.hpp + /usr/include/boost/preprocessor/arithmetic/dec.hpp + /usr/include/boost/preprocessor/config/limits.hpp + /usr/include/boost/preprocessor/arithmetic/limits/dec_256.hpp + /usr/include/boost/preprocessor/arithmetic/inc.hpp + /usr/include/boost/preprocessor/arithmetic/limits/inc_256.hpp + /usr/include/boost/preprocessor/array/elem.hpp + /usr/include/boost/preprocessor/array/data.hpp + /usr/include/boost/preprocessor/tuple/elem.hpp + /usr/include/boost/preprocessor/facilities/expand.hpp + /usr/include/boost/preprocessor/facilities/overload.hpp + /usr/include/boost/preprocessor/variadic/size.hpp + /usr/include/boost/preprocessor/control/iif.hpp + /usr/include/boost/preprocessor/facilities/check_empty.hpp + /usr/include/boost/preprocessor/variadic/has_opt.hpp + /usr/include/boost/preprocessor/variadic/limits/size_64.hpp + /usr/include/boost/preprocessor/tuple/rem.hpp + /usr/include/boost/preprocessor/tuple/detail/is_single_return.hpp + /usr/include/boost/preprocessor/variadic/elem.hpp + /usr/include/boost/preprocessor/variadic/limits/elem_64.hpp + /usr/include/boost/preprocessor/array/size.hpp + /usr/include/boost/preprocessor/slot/slot.hpp + /usr/include/boost/preprocessor/slot/detail/def.hpp + /usr/include/boost/preprocessor/repetition/enum_params.hpp + /usr/include/boost/preprocessor/punctuation/comma_if.hpp + /usr/include/boost/preprocessor/control/if.hpp + /usr/include/boost/preprocessor/logical/bool.hpp + /usr/include/boost/preprocessor/logical/limits/bool_256.hpp + /usr/include/boost/preprocessor/facilities/empty.hpp + /usr/include/boost/preprocessor/punctuation/comma.hpp + /usr/include/boost/preprocessor/repetition/repeat.hpp + /usr/include/boost/preprocessor/debug/error.hpp + /usr/include/boost/preprocessor/detail/auto_rec.hpp + /usr/include/boost/preprocessor/detail/limits/auto_rec_256.hpp + /usr/include/boost/preprocessor/tuple/eat.hpp + /usr/include/boost/preprocessor/repetition/limits/repeat_256.hpp + /usr/include/boost/preprocessor/repetition/enum_trailing_params.hpp + /usr/include/boost/preprocessor/repetition/enum_binary_params.hpp + /usr/include/boost/preprocessor/repetition/enum_shifted_params.hpp + /usr/include/boost/preprocessor/facilities/intercept.hpp + /usr/include/boost/preprocessor/facilities/limits/intercept_256.hpp + /usr/include/boost/type_traits/type_identity.hpp + /usr/include/boost/preprocessor/iteration/detail/iter/forward1.hpp + /usr/include/boost/preprocessor/iteration/detail/bounds/lower1.hpp + /usr/include/boost/preprocessor/slot/detail/shared.hpp + /usr/include/boost/preprocessor/iteration/detail/bounds/upper1.hpp + /usr/include/boost/preprocessor/iteration/detail/iter/limits/forward1_256.hpp + /usr/include/boost/utility/detail/result_of_iterate.hpp + /usr/include/boost/optional/optional_fwd.hpp + /usr/include/boost/optional/detail/optional_config.hpp + /usr/include/boost/optional/detail/optional_factory_support.hpp + /usr/include/boost/optional/detail/optional_aligned_storage.hpp + /usr/include/boost/optional/detail/optional_trivially_copyable_base.hpp + /usr/include/boost/optional/detail/optional_reference_spec.hpp + /usr/include/boost/optional/detail/optional_relops.hpp + /usr/include/boost/optional/detail/optional_swap.hpp + /usr/include/c++/11/cassert + /usr/include/c++/11/memory + /usr/include/c++/11/bits/stl_uninitialized.h + /usr/include/c++/11/bits/stl_tempbuf.h + /usr/include/c++/11/bits/stl_raw_storage_iter.h + /usr/include/c++/11/bits/align.h + /usr/include/c++/11/bit + /usr/include/c++/11/bits/unique_ptr.h + /usr/include/c++/11/bits/shared_ptr.h + /usr/include/c++/11/bits/shared_ptr_base.h + /usr/include/c++/11/bits/allocated_ptr.h + /usr/include/c++/11/ext/aligned_buffer.h + /usr/include/c++/11/ext/concurrence.h + /usr/include/c++/11/bits/shared_ptr_atomic.h + /usr/include/c++/11/bits/atomic_base.h + /usr/include/c++/11/bits/atomic_lockfree_defines.h + /usr/include/c++/11/backward/auto_ptr.h + /usr/include/c++/11/vector + /usr/include/c++/11/bits/stl_vector.h + /usr/include/c++/11/bits/stl_bvector.h + /usr/include/c++/11/bits/vector.tcc + /usr/include/c++/11/map + /usr/include/c++/11/bits/stl_tree.h + /usr/include/c++/11/bits/stl_map.h + /usr/include/c++/11/bits/stl_multimap.h + /usr/include/c++/11/bits/erase_if.h + /usr/include/c++/11/algorithm + /usr/include/c++/11/bits/stl_algo.h + /usr/include/c++/11/bits/algorithmfwd.h + /usr/include/c++/11/bits/stl_heap.h + /usr/include/c++/11/bits/uniform_int_dist.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/allocators.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/rapidjson.h + /usr/include/c++/11/cstring + /usr/include/string.h + /usr/include/strings.h + /usr/include/inttypes.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/internal/meta.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/rapidjson.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/JsonRpc/json.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/document.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/reader.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/allocators.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/stream.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/encodings.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/encodedstream.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/memorystream.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/internal/clzll.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/internal/stack.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/allocators.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/internal/swap.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/internal/strtod.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/internal/ieee754.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/internal/biginteger.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/internal/diyfp.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/internal/clzll.h + /usr/include/c++/11/limits + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/internal/pow10.h + /usr/include/c++/11/climits + /usr/lib/gcc/x86_64-redhat-linux/11/include/limits.h + /usr/lib/gcc/x86_64-redhat-linux/11/include/syslimits.h + /usr/include/limits.h + /usr/include/bits/posix1_lim.h + /usr/include/bits/local_lim.h + /usr/include/linux/limits.h + /usr/include/bits/posix2_lim.h + /usr/include/bits/xopen_lim.h + /usr/include/bits/uio_lim.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/error/error.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/rapidjson.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/internal/strfunc.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/stream.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/rapidjson.h + /usr/include/c++/11/iterator + /usr/include/c++/11/bits/stream_iterator.h + /usr/include/c++/11/bits/streambuf_iterator.h + /usr/include/c++/11/streambuf + /usr/include/c++/11/bits/ios_base.h + /usr/include/c++/11/bits/locale_classes.h + /usr/include/c++/11/bits/locale_classes.tcc + /usr/include/c++/11/system_error + /usr/include/c++/11/x86_64-redhat-linux/bits/error_constants.h + /usr/include/c++/11/bits/streambuf.tcc + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/prettywriter.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/writer.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/internal/dtoa.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/internal/itoa.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/internal/itoa.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/stringbuffer.h + +CMakeFiles/lspcpp.dir/src/jsonrpc/threaded_queue.cpp.o + /usr/local/src/asymptote-2.78/LspCpp/src/jsonrpc/threaded_queue.cpp + /usr/include/stdc-predef.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/JsonRpc/threaded_queue.h + /usr/include/boost/optional/optional.hpp + /usr/include/c++/11/new + /usr/include/c++/11/x86_64-redhat-linux/bits/c++config.h + /usr/include/bits/wordsize.h + /usr/include/c++/11/x86_64-redhat-linux/bits/os_defines.h + /usr/include/features.h + /usr/include/sys/cdefs.h + /usr/include/bits/long-double.h + /usr/include/gnu/stubs.h + /usr/include/gnu/stubs-64.h + /usr/include/c++/11/x86_64-redhat-linux/bits/cpu_defines.h + /usr/include/c++/11/bits/exception.h + /usr/include/c++/11/iosfwd + /usr/include/c++/11/bits/stringfwd.h + /usr/include/c++/11/bits/memoryfwd.h + /usr/include/c++/11/bits/postypes.h + /usr/include/c++/11/cwchar + /usr/include/wchar.h + /usr/include/bits/libc-header-start.h + /usr/include/bits/floatn.h + /usr/include/bits/floatn-common.h + /usr/lib/gcc/x86_64-redhat-linux/11/include/stddef.h + /usr/lib/gcc/x86_64-redhat-linux/11/include/stdarg.h + /usr/include/bits/wchar.h + /usr/include/bits/types/wint_t.h + /usr/include/bits/types/mbstate_t.h + /usr/include/bits/types/__mbstate_t.h + /usr/include/bits/types/__FILE.h + /usr/include/bits/types/FILE.h + /usr/include/bits/types/locale_t.h + /usr/include/bits/types/__locale_t.h + /usr/include/boost/assert.hpp + /usr/include/assert.h + /usr/include/boost/core/addressof.hpp + /usr/include/boost/config.hpp + /usr/include/boost/config/user.hpp + /usr/include/boost/config/detail/select_compiler_config.hpp + /usr/include/boost/config/compiler/gcc.hpp + /usr/include/c++/11/cstddef + /usr/include/boost/config/detail/select_stdlib_config.hpp + /usr/include/c++/11/version + /usr/include/boost/config/stdlib/libstdcpp3.hpp + /usr/include/unistd.h + /usr/include/bits/posix_opt.h + /usr/include/bits/environments.h + /usr/include/bits/types.h + /usr/include/bits/timesize.h + /usr/include/bits/typesizes.h + /usr/include/bits/time64.h + /usr/include/bits/confname.h + /usr/include/bits/getopt_posix.h + /usr/include/bits/getopt_core.h + /usr/include/bits/unistd_ext.h + /usr/include/boost/config/detail/select_platform_config.hpp + /usr/include/boost/config/platform/linux.hpp + /usr/include/c++/11/cstdlib + /usr/include/stdlib.h + /usr/include/bits/waitflags.h + /usr/include/bits/waitstatus.h + /usr/include/sys/types.h + /usr/include/bits/types/clock_t.h + /usr/include/bits/types/clockid_t.h + /usr/include/bits/types/time_t.h + /usr/include/bits/types/timer_t.h + /usr/include/bits/stdint-intn.h + /usr/include/endian.h + /usr/include/bits/endian.h + /usr/include/bits/endianness.h + /usr/include/bits/byteswap.h + /usr/include/bits/uintn-identity.h + /usr/include/sys/select.h + /usr/include/bits/select.h + /usr/include/bits/types/sigset_t.h + /usr/include/bits/types/__sigset_t.h + /usr/include/bits/types/struct_timeval.h + /usr/include/bits/types/struct_timespec.h + /usr/include/bits/pthreadtypes.h + /usr/include/bits/thread-shared-types.h + /usr/include/bits/pthreadtypes-arch.h + /usr/include/bits/struct_mutex.h + /usr/include/bits/struct_rwlock.h + /usr/include/alloca.h + /usr/include/bits/stdlib-bsearch.h + /usr/include/bits/stdlib-float.h + /usr/include/c++/11/bits/std_abs.h + /usr/include/boost/config/detail/posix_features.hpp + /usr/include/boost/config/detail/suffix.hpp + /usr/include/boost/config/helper_macros.hpp + /usr/include/boost/core/enable_if.hpp + /usr/include/boost/core/explicit_operator_bool.hpp + /usr/include/boost/config/workaround.hpp + /usr/include/boost/core/swap.hpp + /usr/include/c++/11/utility + /usr/include/c++/11/bits/stl_relops.h + /usr/include/c++/11/bits/stl_pair.h + /usr/include/c++/11/bits/move.h + /usr/include/c++/11/type_traits + /usr/include/c++/11/initializer_list + /usr/include/boost/optional/bad_optional_access.hpp + /usr/include/c++/11/stdexcept + /usr/include/c++/11/exception + /usr/include/c++/11/bits/exception_ptr.h + /usr/include/c++/11/bits/exception_defines.h + /usr/include/c++/11/bits/cxxabi_init_exception.h + /usr/include/c++/11/typeinfo + /usr/include/c++/11/bits/hash_bytes.h + /usr/include/c++/11/bits/nested_exception.h + /usr/include/c++/11/string + /usr/include/c++/11/bits/char_traits.h + /usr/include/c++/11/bits/stl_algobase.h + /usr/include/c++/11/bits/functexcept.h + /usr/include/c++/11/bits/cpp_type_traits.h + /usr/include/c++/11/ext/type_traits.h + /usr/include/c++/11/ext/numeric_traits.h + /usr/include/c++/11/bits/stl_iterator_base_types.h + /usr/include/c++/11/bits/stl_iterator_base_funcs.h + /usr/include/c++/11/bits/concept_check.h + /usr/include/c++/11/debug/assertions.h + /usr/include/c++/11/bits/stl_iterator.h + /usr/include/c++/11/bits/ptr_traits.h + /usr/include/c++/11/debug/debug.h + /usr/include/c++/11/bits/predefined_ops.h + /usr/include/c++/11/cstdint + /usr/lib/gcc/x86_64-redhat-linux/11/include/stdint.h + /usr/include/stdint.h + /usr/include/bits/stdint-uintn.h + /usr/include/c++/11/bits/allocator.h + /usr/include/c++/11/x86_64-redhat-linux/bits/c++allocator.h + /usr/include/c++/11/ext/new_allocator.h + /usr/include/c++/11/bits/localefwd.h + /usr/include/c++/11/x86_64-redhat-linux/bits/c++locale.h + /usr/include/c++/11/clocale + /usr/include/locale.h + /usr/include/bits/locale.h + /usr/include/c++/11/cctype + /usr/include/ctype.h + /usr/include/c++/11/bits/ostream_insert.h + /usr/include/c++/11/bits/cxxabi_forced.h + /usr/include/c++/11/bits/stl_function.h + /usr/include/c++/11/backward/binders.h + /usr/include/c++/11/bits/range_access.h + /usr/include/c++/11/bits/basic_string.h + /usr/include/c++/11/ext/atomicity.h + /usr/include/c++/11/x86_64-redhat-linux/bits/gthr.h + /usr/include/c++/11/x86_64-redhat-linux/bits/gthr-default.h + /usr/include/pthread.h + /usr/include/sched.h + /usr/include/bits/sched.h + /usr/include/bits/types/struct_sched_param.h + /usr/include/bits/cpu-set.h + /usr/include/time.h + /usr/include/bits/time.h + /usr/include/bits/timex.h + /usr/include/bits/types/struct_tm.h + /usr/include/bits/types/struct_itimerspec.h + /usr/include/bits/setjmp.h + /usr/include/bits/types/struct___jmp_buf_tag.h + /usr/include/c++/11/x86_64-redhat-linux/bits/atomic_word.h + /usr/include/sys/single_threaded.h + /usr/include/c++/11/ext/alloc_traits.h + /usr/include/c++/11/bits/alloc_traits.h + /usr/include/c++/11/bits/stl_construct.h + /usr/include/c++/11/ext/string_conversions.h + /usr/include/c++/11/cstdio + /usr/include/stdio.h + /usr/include/bits/types/__fpos_t.h + /usr/include/bits/types/__fpos64_t.h + /usr/include/bits/types/struct_FILE.h + /usr/include/bits/types/cookie_io_functions_t.h + /usr/include/bits/stdio_lim.h + /usr/include/bits/stdio.h + /usr/include/c++/11/cerrno + /usr/include/errno.h + /usr/include/bits/errno.h + /usr/include/linux/errno.h + /usr/include/asm/errno.h + /usr/include/asm-generic/errno.h + /usr/include/asm-generic/errno-base.h + /usr/include/bits/types/error_t.h + /usr/include/c++/11/bits/charconv.h + /usr/include/c++/11/bits/functional_hash.h + /usr/include/c++/11/bits/basic_string.tcc + /usr/include/boost/static_assert.hpp + /usr/include/boost/detail/workaround.hpp + /usr/include/boost/throw_exception.hpp + /usr/include/boost/assert/source_location.hpp + /usr/include/boost/current_function.hpp + /usr/include/boost/cstdint.hpp + /usr/include/boost/exception/exception.hpp + /usr/include/boost/type.hpp + /usr/include/boost/type_traits/alignment_of.hpp + /usr/include/boost/type_traits/intrinsics.hpp + /usr/include/boost/type_traits/detail/config.hpp + /usr/include/boost/version.hpp + /usr/include/boost/type_traits/integral_constant.hpp + /usr/include/boost/type_traits/conditional.hpp + /usr/include/boost/type_traits/has_nothrow_constructor.hpp + /usr/include/boost/type_traits/is_default_constructible.hpp + /usr/include/boost/type_traits/is_complete.hpp + /usr/include/boost/type_traits/declval.hpp + /usr/include/boost/type_traits/add_rvalue_reference.hpp + /usr/include/boost/type_traits/is_void.hpp + /usr/include/boost/type_traits/is_reference.hpp + /usr/include/boost/type_traits/is_lvalue_reference.hpp + /usr/include/boost/type_traits/is_rvalue_reference.hpp + /usr/include/boost/type_traits/remove_reference.hpp + /usr/include/boost/type_traits/is_function.hpp + /usr/include/boost/type_traits/detail/is_function_cxx_11.hpp + /usr/include/boost/type_traits/detail/yes_no_type.hpp + /usr/include/boost/type_traits/type_with_alignment.hpp + /usr/include/boost/type_traits/is_pod.hpp + /usr/include/boost/type_traits/is_scalar.hpp + /usr/include/boost/type_traits/is_arithmetic.hpp + /usr/include/boost/type_traits/is_integral.hpp + /usr/include/boost/type_traits/is_floating_point.hpp + /usr/include/boost/type_traits/is_enum.hpp + /usr/include/boost/type_traits/is_pointer.hpp + /usr/include/boost/type_traits/is_member_pointer.hpp + /usr/include/boost/type_traits/is_member_function_pointer.hpp + /usr/include/boost/type_traits/detail/is_member_function_pointer_cxx_11.hpp + /usr/include/boost/type_traits/remove_const.hpp + /usr/include/boost/type_traits/decay.hpp + /usr/include/boost/type_traits/is_array.hpp + /usr/include/boost/type_traits/remove_bounds.hpp + /usr/include/boost/type_traits/remove_extent.hpp + /usr/include/boost/type_traits/add_pointer.hpp + /usr/include/boost/type_traits/remove_cv.hpp + /usr/include/boost/type_traits/is_base_of.hpp + /usr/include/boost/type_traits/is_base_and_derived.hpp + /usr/include/boost/type_traits/is_same.hpp + /usr/include/boost/type_traits/is_class.hpp + /usr/include/boost/type_traits/is_const.hpp + /usr/include/boost/type_traits/is_constructible.hpp + /usr/include/boost/type_traits/is_destructible.hpp + /usr/include/boost/type_traits/is_nothrow_move_assignable.hpp + /usr/include/boost/type_traits/has_trivial_move_assign.hpp + /usr/include/boost/type_traits/is_assignable.hpp + /usr/include/boost/type_traits/is_volatile.hpp + /usr/include/boost/type_traits/has_nothrow_assign.hpp + /usr/include/boost/type_traits/enable_if.hpp + /usr/include/boost/type_traits/is_nothrow_move_constructible.hpp + /usr/include/boost/move/utility.hpp + /usr/include/boost/move/detail/config_begin.hpp + /usr/include/boost/move/detail/workaround.hpp + /usr/include/boost/move/utility_core.hpp + /usr/include/boost/move/core.hpp + /usr/include/boost/move/detail/config_end.hpp + /usr/include/boost/move/detail/meta_utils.hpp + /usr/include/boost/move/detail/meta_utils_core.hpp + /usr/include/boost/move/traits.hpp + /usr/include/boost/move/detail/type_traits.hpp + /usr/include/boost/none.hpp + /usr/include/boost/none_t.hpp + /usr/include/boost/utility/compare_pointees.hpp + /usr/include/c++/11/functional + /usr/include/c++/11/tuple + /usr/include/c++/11/array + /usr/include/c++/11/bits/uses_allocator.h + /usr/include/c++/11/bits/invoke.h + /usr/include/c++/11/bits/refwrap.h + /usr/include/c++/11/bits/std_function.h + /usr/include/boost/utility/result_of.hpp + /usr/include/boost/preprocessor/cat.hpp + /usr/include/boost/preprocessor/config/config.hpp + /usr/include/boost/preprocessor/iteration/iterate.hpp + /usr/include/boost/preprocessor/arithmetic/dec.hpp + /usr/include/boost/preprocessor/config/limits.hpp + /usr/include/boost/preprocessor/arithmetic/limits/dec_256.hpp + /usr/include/boost/preprocessor/arithmetic/inc.hpp + /usr/include/boost/preprocessor/arithmetic/limits/inc_256.hpp + /usr/include/boost/preprocessor/array/elem.hpp + /usr/include/boost/preprocessor/array/data.hpp + /usr/include/boost/preprocessor/tuple/elem.hpp + /usr/include/boost/preprocessor/facilities/expand.hpp + /usr/include/boost/preprocessor/facilities/overload.hpp + /usr/include/boost/preprocessor/variadic/size.hpp + /usr/include/boost/preprocessor/control/iif.hpp + /usr/include/boost/preprocessor/facilities/check_empty.hpp + /usr/include/boost/preprocessor/variadic/has_opt.hpp + /usr/include/boost/preprocessor/variadic/limits/size_64.hpp + /usr/include/boost/preprocessor/tuple/rem.hpp + /usr/include/boost/preprocessor/tuple/detail/is_single_return.hpp + /usr/include/boost/preprocessor/variadic/elem.hpp + /usr/include/boost/preprocessor/variadic/limits/elem_64.hpp + /usr/include/boost/preprocessor/array/size.hpp + /usr/include/boost/preprocessor/slot/slot.hpp + /usr/include/boost/preprocessor/slot/detail/def.hpp + /usr/include/boost/preprocessor/repetition/enum_params.hpp + /usr/include/boost/preprocessor/punctuation/comma_if.hpp + /usr/include/boost/preprocessor/control/if.hpp + /usr/include/boost/preprocessor/logical/bool.hpp + /usr/include/boost/preprocessor/logical/limits/bool_256.hpp + /usr/include/boost/preprocessor/facilities/empty.hpp + /usr/include/boost/preprocessor/punctuation/comma.hpp + /usr/include/boost/preprocessor/repetition/repeat.hpp + /usr/include/boost/preprocessor/debug/error.hpp + /usr/include/boost/preprocessor/detail/auto_rec.hpp + /usr/include/boost/preprocessor/detail/limits/auto_rec_256.hpp + /usr/include/boost/preprocessor/tuple/eat.hpp + /usr/include/boost/preprocessor/repetition/limits/repeat_256.hpp + /usr/include/boost/preprocessor/repetition/enum_trailing_params.hpp + /usr/include/boost/preprocessor/repetition/enum_binary_params.hpp + /usr/include/boost/preprocessor/repetition/enum_shifted_params.hpp + /usr/include/boost/preprocessor/facilities/intercept.hpp + /usr/include/boost/preprocessor/facilities/limits/intercept_256.hpp + /usr/include/boost/type_traits/type_identity.hpp + /usr/include/boost/preprocessor/iteration/detail/iter/forward1.hpp + /usr/include/boost/preprocessor/iteration/detail/bounds/lower1.hpp + /usr/include/boost/preprocessor/slot/detail/shared.hpp + /usr/include/boost/preprocessor/iteration/detail/bounds/upper1.hpp + /usr/include/boost/preprocessor/iteration/detail/iter/limits/forward1_256.hpp + /usr/include/boost/utility/detail/result_of_iterate.hpp + /usr/include/boost/optional/optional_fwd.hpp + /usr/include/boost/optional/detail/optional_config.hpp + /usr/include/boost/optional/detail/optional_factory_support.hpp + /usr/include/boost/optional/detail/optional_aligned_storage.hpp + /usr/include/boost/optional/detail/optional_trivially_copyable_base.hpp + /usr/include/boost/optional/detail/optional_reference_spec.hpp + /usr/include/boost/optional/detail/optional_relops.hpp + /usr/include/boost/optional/detail/optional_swap.hpp + /usr/include/c++/11/algorithm + /usr/include/c++/11/bits/stl_algo.h + /usr/include/c++/11/bits/algorithmfwd.h + /usr/include/c++/11/bits/stl_heap.h + /usr/include/c++/11/bits/stl_tempbuf.h + /usr/include/c++/11/bits/uniform_int_dist.h + /usr/include/c++/11/atomic + /usr/include/c++/11/bits/atomic_base.h + /usr/include/c++/11/bits/atomic_lockfree_defines.h + /usr/include/c++/11/condition_variable + /usr/include/c++/11/chrono + /usr/include/c++/11/ratio + /usr/include/c++/11/limits + /usr/include/c++/11/ctime + /usr/include/c++/11/bits/parse_numbers.h + /usr/include/c++/11/bits/std_mutex.h + /usr/include/c++/11/system_error + /usr/include/c++/11/x86_64-redhat-linux/bits/error_constants.h + /usr/include/c++/11/bits/unique_lock.h + /usr/include/c++/11/bits/shared_ptr.h + /usr/include/c++/11/bits/shared_ptr_base.h + /usr/include/c++/11/bits/allocated_ptr.h + /usr/include/c++/11/bits/unique_ptr.h + /usr/include/c++/11/ext/aligned_buffer.h + /usr/include/c++/11/ext/concurrence.h + /usr/include/c++/11/deque + /usr/include/c++/11/bits/stl_uninitialized.h + /usr/include/c++/11/bits/stl_deque.h + /usr/include/c++/11/bits/deque.tcc + /usr/include/c++/11/memory + /usr/include/c++/11/bits/stl_raw_storage_iter.h + /usr/include/c++/11/bits/align.h + /usr/include/c++/11/bit + /usr/include/c++/11/bits/shared_ptr_atomic.h + /usr/include/c++/11/backward/auto_ptr.h + /usr/include/c++/11/mutex + /usr/include/c++/11/vector + /usr/include/c++/11/bits/stl_vector.h + /usr/include/c++/11/bits/stl_bvector.h + /usr/include/c++/11/bits/vector.tcc + +CMakeFiles/lspcpp.dir/src/lsp/Markup.cpp.o + /usr/local/src/asymptote-2.78/LspCpp/src/lsp/Markup.cpp + /usr/include/stdc-predef.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/Markup/Markup.h + /usr/include/c++/11/cctype + /usr/include/c++/11/x86_64-redhat-linux/bits/c++config.h + /usr/include/bits/wordsize.h + /usr/include/c++/11/x86_64-redhat-linux/bits/os_defines.h + /usr/include/features.h + /usr/include/sys/cdefs.h + /usr/include/bits/long-double.h + /usr/include/gnu/stubs.h + /usr/include/gnu/stubs-64.h + /usr/include/c++/11/x86_64-redhat-linux/bits/cpu_defines.h + /usr/include/ctype.h + /usr/include/bits/types.h + /usr/include/bits/timesize.h + /usr/include/bits/typesizes.h + /usr/include/bits/time64.h + /usr/include/bits/endian.h + /usr/include/bits/endianness.h + /usr/include/bits/types/locale_t.h + /usr/include/bits/types/__locale_t.h + /usr/include/c++/11/clocale + /usr/include/locale.h + /usr/lib/gcc/x86_64-redhat-linux/11/include/stddef.h + /usr/include/bits/locale.h + /usr/include/c++/11/cstddef + /usr/include/c++/11/memory + /usr/include/c++/11/bits/stl_algobase.h + /usr/include/c++/11/bits/functexcept.h + /usr/include/c++/11/bits/exception_defines.h + /usr/include/c++/11/bits/cpp_type_traits.h + /usr/include/c++/11/ext/type_traits.h + /usr/include/c++/11/ext/numeric_traits.h + /usr/include/c++/11/bits/stl_pair.h + /usr/include/c++/11/bits/move.h + /usr/include/c++/11/type_traits + /usr/include/c++/11/bits/stl_iterator_base_types.h + /usr/include/c++/11/bits/stl_iterator_base_funcs.h + /usr/include/c++/11/bits/concept_check.h + /usr/include/c++/11/debug/assertions.h + /usr/include/c++/11/bits/stl_iterator.h + /usr/include/c++/11/bits/ptr_traits.h + /usr/include/c++/11/debug/debug.h + /usr/include/c++/11/bits/predefined_ops.h + /usr/include/c++/11/bits/allocator.h + /usr/include/c++/11/x86_64-redhat-linux/bits/c++allocator.h + /usr/include/c++/11/ext/new_allocator.h + /usr/include/c++/11/new + /usr/include/c++/11/bits/exception.h + /usr/include/c++/11/bits/memoryfwd.h + /usr/include/c++/11/bits/stl_construct.h + /usr/include/c++/11/bits/stl_uninitialized.h + /usr/include/c++/11/ext/alloc_traits.h + /usr/include/c++/11/bits/alloc_traits.h + /usr/include/c++/11/bits/stl_tempbuf.h + /usr/include/c++/11/bits/stl_raw_storage_iter.h + /usr/include/c++/11/bits/align.h + /usr/include/c++/11/bit + /usr/lib/gcc/x86_64-redhat-linux/11/include/stdint.h + /usr/include/stdint.h + /usr/include/bits/libc-header-start.h + /usr/include/bits/wchar.h + /usr/include/bits/stdint-intn.h + /usr/include/bits/stdint-uintn.h + /usr/include/c++/11/bits/uses_allocator.h + /usr/include/c++/11/bits/unique_ptr.h + /usr/include/c++/11/utility + /usr/include/c++/11/bits/stl_relops.h + /usr/include/c++/11/initializer_list + /usr/include/c++/11/tuple + /usr/include/c++/11/array + /usr/include/c++/11/bits/range_access.h + /usr/include/c++/11/bits/invoke.h + /usr/include/c++/11/bits/stl_function.h + /usr/include/c++/11/backward/binders.h + /usr/include/c++/11/bits/functional_hash.h + /usr/include/c++/11/bits/hash_bytes.h + /usr/include/c++/11/bits/shared_ptr.h + /usr/include/c++/11/iosfwd + /usr/include/c++/11/bits/stringfwd.h + /usr/include/c++/11/bits/postypes.h + /usr/include/c++/11/cwchar + /usr/include/wchar.h + /usr/include/bits/floatn.h + /usr/include/bits/floatn-common.h + /usr/lib/gcc/x86_64-redhat-linux/11/include/stdarg.h + /usr/include/bits/types/wint_t.h + /usr/include/bits/types/mbstate_t.h + /usr/include/bits/types/__mbstate_t.h + /usr/include/bits/types/__FILE.h + /usr/include/bits/types/FILE.h + /usr/include/c++/11/bits/shared_ptr_base.h + /usr/include/c++/11/typeinfo + /usr/include/c++/11/bits/allocated_ptr.h + /usr/include/c++/11/bits/refwrap.h + /usr/include/c++/11/ext/aligned_buffer.h + /usr/include/c++/11/ext/atomicity.h + /usr/include/c++/11/x86_64-redhat-linux/bits/gthr.h + /usr/include/c++/11/x86_64-redhat-linux/bits/gthr-default.h + /usr/include/pthread.h + /usr/include/sched.h + /usr/include/bits/types/time_t.h + /usr/include/bits/types/struct_timespec.h + /usr/include/bits/sched.h + /usr/include/bits/types/struct_sched_param.h + /usr/include/bits/cpu-set.h + /usr/include/time.h + /usr/include/bits/time.h + /usr/include/bits/timex.h + /usr/include/bits/types/struct_timeval.h + /usr/include/bits/types/clock_t.h + /usr/include/bits/types/struct_tm.h + /usr/include/bits/types/clockid_t.h + /usr/include/bits/types/timer_t.h + /usr/include/bits/types/struct_itimerspec.h + /usr/include/bits/pthreadtypes.h + /usr/include/bits/thread-shared-types.h + /usr/include/bits/pthreadtypes-arch.h + /usr/include/bits/struct_mutex.h + /usr/include/bits/struct_rwlock.h + /usr/include/bits/setjmp.h + /usr/include/bits/types/__sigset_t.h + /usr/include/bits/types/struct___jmp_buf_tag.h + /usr/include/c++/11/x86_64-redhat-linux/bits/atomic_word.h + /usr/include/sys/single_threaded.h + /usr/include/c++/11/ext/concurrence.h + /usr/include/c++/11/exception + /usr/include/c++/11/bits/exception_ptr.h + /usr/include/c++/11/bits/cxxabi_init_exception.h + /usr/include/c++/11/bits/nested_exception.h + /usr/include/c++/11/bits/shared_ptr_atomic.h + /usr/include/c++/11/bits/atomic_base.h + /usr/include/c++/11/bits/atomic_lockfree_defines.h + /usr/include/c++/11/backward/auto_ptr.h + /usr/include/c++/11/string + /usr/include/c++/11/bits/char_traits.h + /usr/include/c++/11/cstdint + /usr/include/c++/11/bits/localefwd.h + /usr/include/c++/11/x86_64-redhat-linux/bits/c++locale.h + /usr/include/c++/11/bits/ostream_insert.h + /usr/include/c++/11/bits/cxxabi_forced.h + /usr/include/c++/11/bits/basic_string.h + /usr/include/c++/11/ext/string_conversions.h + /usr/include/c++/11/cstdlib + /usr/include/stdlib.h + /usr/include/bits/waitflags.h + /usr/include/bits/waitstatus.h + /usr/include/sys/types.h + /usr/include/endian.h + /usr/include/bits/byteswap.h + /usr/include/bits/uintn-identity.h + /usr/include/sys/select.h + /usr/include/bits/select.h + /usr/include/bits/types/sigset_t.h + /usr/include/alloca.h + /usr/include/bits/stdlib-bsearch.h + /usr/include/bits/stdlib-float.h + /usr/include/c++/11/bits/std_abs.h + /usr/include/c++/11/cstdio + /usr/include/stdio.h + /usr/include/bits/types/__fpos_t.h + /usr/include/bits/types/__fpos64_t.h + /usr/include/bits/types/struct_FILE.h + /usr/include/bits/types/cookie_io_functions_t.h + /usr/include/bits/stdio_lim.h + /usr/include/bits/stdio.h + /usr/include/c++/11/cerrno + /usr/include/errno.h + /usr/include/bits/errno.h + /usr/include/linux/errno.h + /usr/include/asm/errno.h + /usr/include/asm-generic/errno.h + /usr/include/asm-generic/errno-base.h + /usr/include/bits/types/error_t.h + /usr/include/c++/11/bits/charconv.h + /usr/include/c++/11/bits/basic_string.tcc + /usr/include/c++/11/vector + /usr/include/c++/11/bits/stl_vector.h + /usr/include/c++/11/bits/stl_bvector.h + /usr/include/c++/11/bits/vector.tcc + /usr/include/c++/11/sstream + /usr/include/c++/11/istream + /usr/include/c++/11/ios + /usr/include/c++/11/bits/ios_base.h + /usr/include/c++/11/bits/locale_classes.h + /usr/include/c++/11/bits/locale_classes.tcc + /usr/include/c++/11/system_error + /usr/include/c++/11/x86_64-redhat-linux/bits/error_constants.h + /usr/include/c++/11/stdexcept + /usr/include/c++/11/streambuf + /usr/include/c++/11/bits/streambuf.tcc + /usr/include/c++/11/bits/basic_ios.h + /usr/include/c++/11/bits/locale_facets.h + /usr/include/c++/11/cwctype + /usr/include/wctype.h + /usr/include/bits/wctype-wchar.h + /usr/include/c++/11/x86_64-redhat-linux/bits/ctype_base.h + /usr/include/c++/11/bits/streambuf_iterator.h + /usr/include/c++/11/x86_64-redhat-linux/bits/ctype_inline.h + /usr/include/c++/11/bits/locale_facets.tcc + /usr/include/c++/11/bits/basic_ios.tcc + /usr/include/c++/11/ostream + /usr/include/c++/11/bits/ostream.tcc + /usr/include/c++/11/bits/istream.tcc + /usr/include/c++/11/bits/sstream.tcc + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/Markup/string_ref.h + /usr/include/c++/11/algorithm + /usr/include/c++/11/bits/stl_algo.h + /usr/include/c++/11/bits/algorithmfwd.h + /usr/include/c++/11/bits/stl_heap.h + /usr/include/c++/11/bits/uniform_int_dist.h + /usr/include/c++/11/functional + /usr/include/c++/11/bits/std_function.h + /usr/include/c++/11/cstring + /usr/include/string.h + /usr/include/strings.h + /usr/include/c++/11/cassert + /usr/include/assert.h + /usr/include/c++/11/iterator + /usr/include/c++/11/bits/stream_iterator.h + /usr/include/boost/algorithm/string.hpp + /usr/include/boost/algorithm/string/std_containers_traits.hpp + /usr/include/boost/config.hpp + /usr/include/boost/config/user.hpp + /usr/include/boost/config/detail/select_compiler_config.hpp + /usr/include/boost/config/compiler/gcc.hpp + /usr/include/boost/config/detail/select_stdlib_config.hpp + /usr/include/c++/11/version + /usr/include/boost/config/stdlib/libstdcpp3.hpp + /usr/include/unistd.h + /usr/include/bits/posix_opt.h + /usr/include/bits/environments.h + /usr/include/bits/confname.h + /usr/include/bits/getopt_posix.h + /usr/include/bits/getopt_core.h + /usr/include/bits/unistd_ext.h + /usr/include/boost/config/detail/select_platform_config.hpp + /usr/include/boost/config/platform/linux.hpp + /usr/include/boost/config/detail/posix_features.hpp + /usr/include/boost/config/detail/suffix.hpp + /usr/include/boost/config/helper_macros.hpp + /usr/include/boost/algorithm/string/std/string_traits.hpp + /usr/include/boost/algorithm/string/yes_no_type.hpp + /usr/include/boost/algorithm/string/sequence_traits.hpp + /usr/include/boost/mpl/bool.hpp + /usr/include/boost/mpl/bool_fwd.hpp + /usr/include/boost/mpl/aux_/adl_barrier.hpp + /usr/include/boost/mpl/aux_/config/adl.hpp + /usr/include/boost/mpl/aux_/config/msvc.hpp + /usr/include/boost/mpl/aux_/config/intel.hpp + /usr/include/boost/mpl/aux_/config/gcc.hpp + /usr/include/boost/mpl/aux_/config/workaround.hpp + /usr/include/boost/detail/workaround.hpp + /usr/include/boost/config/workaround.hpp + /usr/include/boost/mpl/integral_c_tag.hpp + /usr/include/boost/mpl/aux_/config/static_constant.hpp + /usr/include/boost/algorithm/string/std/list_traits.hpp + /usr/include/c++/11/list + /usr/include/c++/11/bits/stl_list.h + /usr/include/c++/11/bits/list.tcc + /usr/include/boost/algorithm/string/std/slist_traits.hpp + /usr/include/boost/algorithm/string/config.hpp + /usr/include/c++/11/ext/slist + /usr/include/boost/algorithm/string/trim.hpp + /usr/include/boost/range/begin.hpp + /usr/include/boost/range/config.hpp + /usr/include/boost/range/iterator.hpp + /usr/include/boost/range/range_fwd.hpp + /usr/include/boost/range/mutable_iterator.hpp + /usr/include/boost/range/detail/extract_optional_type.hpp + /usr/include/boost/preprocessor/cat.hpp + /usr/include/boost/preprocessor/config/config.hpp + /usr/include/boost/mpl/has_xxx.hpp + /usr/include/boost/mpl/aux_/na_spec.hpp + /usr/include/boost/mpl/lambda_fwd.hpp + /usr/include/boost/mpl/void_fwd.hpp + /usr/include/boost/mpl/aux_/na.hpp + /usr/include/boost/mpl/aux_/na_fwd.hpp + /usr/include/boost/mpl/aux_/config/ctps.hpp + /usr/include/boost/mpl/aux_/config/lambda.hpp + /usr/include/boost/mpl/aux_/config/ttp.hpp + /usr/include/boost/mpl/int.hpp + /usr/include/boost/mpl/int_fwd.hpp + /usr/include/boost/mpl/aux_/nttp_decl.hpp + /usr/include/boost/mpl/aux_/config/nttp.hpp + /usr/include/boost/mpl/aux_/integral_wrapper.hpp + /usr/include/boost/mpl/aux_/static_cast.hpp + /usr/include/boost/mpl/aux_/lambda_arity_param.hpp + /usr/include/boost/mpl/aux_/template_arity_fwd.hpp + /usr/include/boost/mpl/aux_/arity.hpp + /usr/include/boost/mpl/aux_/config/dtp.hpp + /usr/include/boost/mpl/aux_/preprocessor/params.hpp + /usr/include/boost/mpl/aux_/config/preprocessor.hpp + /usr/include/boost/preprocessor/comma_if.hpp + /usr/include/boost/preprocessor/punctuation/comma_if.hpp + /usr/include/boost/preprocessor/control/if.hpp + /usr/include/boost/preprocessor/control/iif.hpp + /usr/include/boost/preprocessor/logical/bool.hpp + /usr/include/boost/preprocessor/config/limits.hpp + /usr/include/boost/preprocessor/logical/limits/bool_256.hpp + /usr/include/boost/preprocessor/facilities/empty.hpp + /usr/include/boost/preprocessor/punctuation/comma.hpp + /usr/include/boost/preprocessor/repeat.hpp + /usr/include/boost/preprocessor/repetition/repeat.hpp + /usr/include/boost/preprocessor/debug/error.hpp + /usr/include/boost/preprocessor/detail/auto_rec.hpp + /usr/include/boost/preprocessor/detail/limits/auto_rec_256.hpp + /usr/include/boost/preprocessor/tuple/eat.hpp + /usr/include/boost/preprocessor/repetition/limits/repeat_256.hpp + /usr/include/boost/preprocessor/inc.hpp + /usr/include/boost/preprocessor/arithmetic/inc.hpp + /usr/include/boost/preprocessor/arithmetic/limits/inc_256.hpp + /usr/include/boost/mpl/aux_/preprocessor/enum.hpp + /usr/include/boost/mpl/aux_/preprocessor/def_params_tail.hpp + /usr/include/boost/mpl/limits/arity.hpp + /usr/include/boost/preprocessor/logical/and.hpp + /usr/include/boost/preprocessor/logical/bitand.hpp + /usr/include/boost/preprocessor/identity.hpp + /usr/include/boost/preprocessor/facilities/identity.hpp + /usr/include/boost/preprocessor/empty.hpp + /usr/include/boost/preprocessor/arithmetic/add.hpp + /usr/include/boost/preprocessor/arithmetic/dec.hpp + /usr/include/boost/preprocessor/arithmetic/limits/dec_256.hpp + /usr/include/boost/preprocessor/control/while.hpp + /usr/include/boost/preprocessor/list/fold_left.hpp + /usr/include/boost/preprocessor/list/detail/fold_left.hpp + /usr/include/boost/preprocessor/control/expr_iif.hpp + /usr/include/boost/preprocessor/list/adt.hpp + /usr/include/boost/preprocessor/detail/is_binary.hpp + /usr/include/boost/preprocessor/detail/check.hpp + /usr/include/boost/preprocessor/logical/compl.hpp + /usr/include/boost/preprocessor/list/detail/limits/fold_left_256.hpp + /usr/include/boost/preprocessor/list/limits/fold_left_256.hpp + /usr/include/boost/preprocessor/list/fold_right.hpp + /usr/include/boost/preprocessor/list/detail/fold_right.hpp + /usr/include/boost/preprocessor/list/reverse.hpp + /usr/include/boost/preprocessor/list/detail/limits/fold_right_256.hpp + /usr/include/boost/preprocessor/control/detail/while.hpp + /usr/include/boost/preprocessor/control/detail/limits/while_256.hpp + /usr/include/boost/preprocessor/control/limits/while_256.hpp + /usr/include/boost/preprocessor/logical/bitor.hpp + /usr/include/boost/preprocessor/tuple/elem.hpp + /usr/include/boost/preprocessor/facilities/expand.hpp + /usr/include/boost/preprocessor/facilities/overload.hpp + /usr/include/boost/preprocessor/variadic/size.hpp + /usr/include/boost/preprocessor/facilities/check_empty.hpp + /usr/include/boost/preprocessor/variadic/has_opt.hpp + /usr/include/boost/preprocessor/variadic/limits/size_64.hpp + /usr/include/boost/preprocessor/tuple/rem.hpp + /usr/include/boost/preprocessor/tuple/detail/is_single_return.hpp + /usr/include/boost/preprocessor/variadic/elem.hpp + /usr/include/boost/preprocessor/variadic/limits/elem_64.hpp + /usr/include/boost/preprocessor/arithmetic/detail/is_maximum_number.hpp + /usr/include/boost/preprocessor/comparison/equal.hpp + /usr/include/boost/preprocessor/comparison/not_equal.hpp + /usr/include/boost/preprocessor/comparison/limits/not_equal_256.hpp + /usr/include/boost/preprocessor/arithmetic/detail/maximum_number.hpp + /usr/include/boost/preprocessor/arithmetic/detail/is_minimum_number.hpp + /usr/include/boost/preprocessor/logical/not.hpp + /usr/include/boost/preprocessor/arithmetic/sub.hpp + /usr/include/boost/mpl/aux_/config/eti.hpp + /usr/include/boost/mpl/aux_/config/overload_resolution.hpp + /usr/include/boost/mpl/aux_/type_wrapper.hpp + /usr/include/boost/mpl/aux_/yes_no.hpp + /usr/include/boost/mpl/aux_/config/arrays.hpp + /usr/include/boost/mpl/aux_/config/has_xxx.hpp + /usr/include/boost/mpl/aux_/config/msvc_typename.hpp + /usr/include/boost/preprocessor/array/elem.hpp + /usr/include/boost/preprocessor/array/data.hpp + /usr/include/boost/preprocessor/array/size.hpp + /usr/include/boost/preprocessor/repetition/enum_params.hpp + /usr/include/boost/preprocessor/repetition/enum_trailing_params.hpp + /usr/include/boost/type_traits/remove_reference.hpp + /usr/include/boost/iterator/iterator_traits.hpp + /usr/include/boost/range/detail/msvc_has_iterator_workaround.hpp + /usr/include/boost/range/const_iterator.hpp + /usr/include/boost/type_traits/remove_const.hpp + /usr/include/boost/type_traits/is_const.hpp + /usr/include/boost/type_traits/integral_constant.hpp + /usr/include/boost/mpl/eval_if.hpp + /usr/include/boost/mpl/if.hpp + /usr/include/boost/mpl/aux_/value_wknd.hpp + /usr/include/boost/mpl/aux_/config/integral.hpp + /usr/include/boost/mpl/aux_/lambda_support.hpp + /usr/include/boost/range/end.hpp + /usr/include/boost/range/detail/implementation_help.hpp + /usr/include/boost/range/detail/common.hpp + /usr/include/boost/range/detail/sfinae.hpp + /usr/include/boost/type_traits/is_array.hpp + /usr/include/boost/type_traits/detail/yes_no_type.hpp + /usr/include/boost/type_traits/is_void.hpp + /usr/include/boost/type_traits/is_same.hpp + /usr/include/boost/range/as_literal.hpp + /usr/include/boost/range/iterator_range.hpp + /usr/include/boost/range/iterator_range_core.hpp + /usr/include/boost/assert.hpp + /usr/include/boost/iterator/iterator_facade.hpp + /usr/include/boost/iterator/interoperable.hpp + /usr/include/boost/mpl/or.hpp + /usr/include/boost/mpl/aux_/config/use_preprocessed.hpp + /usr/include/boost/mpl/aux_/nested_type_wknd.hpp + /usr/include/boost/mpl/aux_/include_preprocessed.hpp + /usr/include/boost/mpl/aux_/config/compiler.hpp + /usr/include/boost/preprocessor/stringize.hpp + /usr/include/boost/mpl/aux_/preprocessed/gcc/or.hpp + /usr/include/boost/type_traits/is_convertible.hpp + /usr/include/boost/type_traits/intrinsics.hpp + /usr/include/boost/type_traits/detail/config.hpp + /usr/include/boost/version.hpp + /usr/include/boost/type_traits/is_complete.hpp + /usr/include/boost/type_traits/declval.hpp + /usr/include/boost/type_traits/add_rvalue_reference.hpp + /usr/include/boost/type_traits/is_reference.hpp + /usr/include/boost/type_traits/is_lvalue_reference.hpp + /usr/include/boost/type_traits/is_rvalue_reference.hpp + /usr/include/boost/type_traits/is_function.hpp + /usr/include/boost/type_traits/detail/is_function_cxx_11.hpp + /usr/include/boost/static_assert.hpp + /usr/include/boost/type_traits/is_arithmetic.hpp + /usr/include/boost/type_traits/is_integral.hpp + /usr/include/boost/type_traits/is_floating_point.hpp + /usr/include/boost/type_traits/is_abstract.hpp + /usr/include/boost/type_traits/add_lvalue_reference.hpp + /usr/include/boost/type_traits/add_reference.hpp + /usr/include/boost/iterator/detail/config_def.hpp + /usr/include/boost/iterator/detail/config_undef.hpp + /usr/include/boost/iterator/iterator_categories.hpp + /usr/include/boost/mpl/identity.hpp + /usr/include/boost/mpl/placeholders.hpp + /usr/include/boost/mpl/arg.hpp + /usr/include/boost/mpl/arg_fwd.hpp + /usr/include/boost/mpl/aux_/na_assert.hpp + /usr/include/boost/mpl/assert.hpp + /usr/include/boost/mpl/not.hpp + /usr/include/boost/mpl/aux_/config/gpu.hpp + /usr/include/boost/mpl/aux_/config/pp_counter.hpp + /usr/include/boost/mpl/aux_/arity_spec.hpp + /usr/include/boost/mpl/aux_/arg_typedef.hpp + /usr/include/boost/mpl/aux_/preprocessed/gcc/arg.hpp + /usr/include/boost/mpl/aux_/preprocessed/gcc/placeholders.hpp + /usr/include/boost/iterator/detail/facade_iterator_category.hpp + /usr/include/boost/core/use_default.hpp + /usr/include/boost/mpl/and.hpp + /usr/include/boost/mpl/aux_/preprocessed/gcc/and.hpp + /usr/include/boost/detail/indirect_traits.hpp + /usr/include/boost/type_traits/is_pointer.hpp + /usr/include/boost/type_traits/is_class.hpp + /usr/include/boost/type_traits/is_volatile.hpp + /usr/include/boost/type_traits/is_member_function_pointer.hpp + /usr/include/boost/type_traits/detail/is_member_function_pointer_cxx_11.hpp + /usr/include/boost/type_traits/is_member_pointer.hpp + /usr/include/boost/type_traits/remove_cv.hpp + /usr/include/boost/type_traits/remove_pointer.hpp + /usr/include/boost/detail/select_type.hpp + /usr/include/boost/iterator/detail/enable_if.hpp + /usr/include/boost/core/addressof.hpp + /usr/include/boost/type_traits/add_const.hpp + /usr/include/boost/type_traits/add_pointer.hpp + /usr/include/boost/type_traits/is_pod.hpp + /usr/include/boost/type_traits/is_scalar.hpp + /usr/include/boost/type_traits/is_enum.hpp + /usr/include/boost/mpl/always.hpp + /usr/include/boost/mpl/aux_/preprocessor/default_params.hpp + /usr/include/boost/mpl/apply.hpp + /usr/include/boost/mpl/apply_fwd.hpp + /usr/include/boost/mpl/aux_/preprocessed/gcc/apply_fwd.hpp + /usr/include/boost/mpl/apply_wrap.hpp + /usr/include/boost/mpl/aux_/has_apply.hpp + /usr/include/boost/mpl/aux_/config/has_apply.hpp + /usr/include/boost/mpl/aux_/msvc_never_true.hpp + /usr/include/boost/mpl/aux_/preprocessed/gcc/apply_wrap.hpp + /usr/include/boost/mpl/lambda.hpp + /usr/include/boost/mpl/bind.hpp + /usr/include/boost/mpl/bind_fwd.hpp + /usr/include/boost/mpl/aux_/config/bind.hpp + /usr/include/boost/mpl/aux_/preprocessed/gcc/bind_fwd.hpp + /usr/include/boost/mpl/next.hpp + /usr/include/boost/mpl/next_prior.hpp + /usr/include/boost/mpl/aux_/common_name_wknd.hpp + /usr/include/boost/mpl/protect.hpp + /usr/include/boost/mpl/aux_/preprocessed/gcc/bind.hpp + /usr/include/boost/mpl/aux_/full_lambda.hpp + /usr/include/boost/mpl/quote.hpp + /usr/include/boost/mpl/void.hpp + /usr/include/boost/mpl/aux_/has_type.hpp + /usr/include/boost/mpl/aux_/config/bcc.hpp + /usr/include/boost/mpl/aux_/preprocessed/gcc/quote.hpp + /usr/include/boost/mpl/aux_/template_arity.hpp + /usr/include/boost/mpl/aux_/preprocessed/gcc/template_arity.hpp + /usr/include/boost/mpl/aux_/preprocessed/gcc/full_lambda.hpp + /usr/include/boost/mpl/aux_/preprocessed/gcc/apply.hpp + /usr/include/boost/type_traits/is_base_and_derived.hpp + /usr/include/boost/range/functions.hpp + /usr/include/boost/range/size.hpp + /usr/include/boost/range/size_type.hpp + /usr/include/boost/range/difference_type.hpp + /usr/include/boost/range/has_range_iterator.hpp + /usr/include/boost/utility/enable_if.hpp + /usr/include/boost/core/enable_if.hpp + /usr/include/boost/range/concepts.hpp + /usr/include/boost/concept_check.hpp + /usr/include/boost/concept/assert.hpp + /usr/include/boost/concept/detail/general.hpp + /usr/include/boost/concept/detail/backward_compatibility.hpp + /usr/include/boost/concept/detail/has_constraints.hpp + /usr/include/boost/type_traits/conditional.hpp + /usr/include/boost/type_traits/conversion_traits.hpp + /usr/include/boost/concept/usage.hpp + /usr/include/boost/concept/detail/concept_def.hpp + /usr/include/boost/preprocessor/seq/for_each_i.hpp + /usr/include/boost/preprocessor/repetition/for.hpp + /usr/include/boost/preprocessor/repetition/detail/for.hpp + /usr/include/boost/preprocessor/repetition/detail/limits/for_256.hpp + /usr/include/boost/preprocessor/repetition/limits/for_256.hpp + /usr/include/boost/preprocessor/seq/seq.hpp + /usr/include/boost/preprocessor/seq/elem.hpp + /usr/include/boost/preprocessor/seq/limits/elem_256.hpp + /usr/include/boost/preprocessor/seq/size.hpp + /usr/include/boost/preprocessor/seq/limits/size_256.hpp + /usr/include/boost/preprocessor/seq/detail/is_empty.hpp + /usr/include/boost/preprocessor/seq/enum.hpp + /usr/include/boost/preprocessor/seq/limits/enum_256.hpp + /usr/include/boost/concept/detail/concept_undef.hpp + /usr/include/boost/iterator/iterator_concepts.hpp + /usr/include/boost/limits.hpp + /usr/include/c++/11/limits + /usr/include/boost/range/value_type.hpp + /usr/include/boost/range/detail/misc_concept.hpp + /usr/include/boost/type_traits/make_unsigned.hpp + /usr/include/boost/type_traits/is_signed.hpp + /usr/include/c++/11/climits + /usr/lib/gcc/x86_64-redhat-linux/11/include/limits.h + /usr/lib/gcc/x86_64-redhat-linux/11/include/syslimits.h + /usr/include/limits.h + /usr/include/bits/posix1_lim.h + /usr/include/bits/local_lim.h + /usr/include/linux/limits.h + /usr/include/bits/posix2_lim.h + /usr/include/bits/xopen_lim.h + /usr/include/bits/uio_lim.h + /usr/include/boost/type_traits/is_unsigned.hpp + /usr/include/boost/type_traits/add_volatile.hpp + /usr/include/boost/range/detail/has_member_size.hpp + /usr/include/boost/cstdint.hpp + /usr/include/boost/utility.hpp + /usr/include/boost/utility/base_from_member.hpp + /usr/include/boost/preprocessor/repetition/enum_binary_params.hpp + /usr/include/boost/preprocessor/repetition/repeat_from_to.hpp + /usr/include/boost/utility/binary.hpp + /usr/include/boost/preprocessor/control/deduce_d.hpp + /usr/include/boost/preprocessor/seq/cat.hpp + /usr/include/boost/preprocessor/seq/fold_left.hpp + /usr/include/boost/preprocessor/seq/limits/fold_left_256.hpp + /usr/include/boost/preprocessor/seq/transform.hpp + /usr/include/boost/preprocessor/arithmetic/mod.hpp + /usr/include/boost/preprocessor/arithmetic/detail/div_base.hpp + /usr/include/boost/preprocessor/comparison/less_equal.hpp + /usr/include/boost/preprocessor/arithmetic/detail/is_1_number.hpp + /usr/include/boost/utility/identity_type.hpp + /usr/include/boost/type_traits/function_traits.hpp + /usr/include/boost/core/checked_delete.hpp + /usr/include/boost/core/noncopyable.hpp + /usr/include/boost/range/distance.hpp + /usr/include/boost/iterator/distance.hpp + /usr/include/boost/range/empty.hpp + /usr/include/boost/range/rbegin.hpp + /usr/include/boost/range/reverse_iterator.hpp + /usr/include/boost/iterator/reverse_iterator.hpp + /usr/include/boost/iterator/iterator_adaptor.hpp + /usr/include/boost/range/rend.hpp + /usr/include/boost/range/algorithm/equal.hpp + /usr/include/boost/range/detail/safe_bool.hpp + /usr/include/boost/next_prior.hpp + /usr/include/boost/type_traits/has_plus.hpp + /usr/include/boost/type_traits/detail/has_binary_operator.hpp + /usr/include/boost/type_traits/make_void.hpp + /usr/include/boost/type_traits/has_plus_assign.hpp + /usr/include/boost/type_traits/has_minus.hpp + /usr/include/boost/type_traits/has_minus_assign.hpp + /usr/include/boost/iterator/advance.hpp + /usr/include/boost/range/iterator_range_io.hpp + /usr/include/boost/range/detail/str_types.hpp + /usr/include/boost/algorithm/string/detail/trim.hpp + /usr/include/boost/algorithm/string/classification.hpp + /usr/include/c++/11/locale + /usr/include/c++/11/bits/locale_facets_nonio.h + /usr/include/c++/11/ctime + /usr/include/c++/11/x86_64-redhat-linux/bits/time_members.h + /usr/include/c++/11/x86_64-redhat-linux/bits/messages_members.h + /usr/include/libintl.h + /usr/include/c++/11/bits/codecvt.h + /usr/include/c++/11/bits/locale_facets_nonio.tcc + /usr/include/c++/11/bits/locale_conv.h + /usr/include/boost/algorithm/string/detail/classification.hpp + /usr/include/boost/algorithm/string/predicate_facade.hpp + /usr/include/boost/algorithm/string/case_conv.hpp + /usr/include/boost/iterator/transform_iterator.hpp + /usr/include/boost/utility/result_of.hpp + /usr/include/boost/preprocessor/iteration/iterate.hpp + /usr/include/boost/preprocessor/slot/slot.hpp + /usr/include/boost/preprocessor/slot/detail/def.hpp + /usr/include/boost/preprocessor/repetition/enum_shifted_params.hpp + /usr/include/boost/preprocessor/facilities/intercept.hpp + /usr/include/boost/preprocessor/facilities/limits/intercept_256.hpp + /usr/include/boost/type_traits/type_identity.hpp + /usr/include/boost/preprocessor/iteration/detail/iter/forward1.hpp + /usr/include/boost/preprocessor/iteration/detail/bounds/lower1.hpp + /usr/include/boost/preprocessor/slot/detail/shared.hpp + /usr/include/boost/preprocessor/iteration/detail/bounds/upper1.hpp + /usr/include/boost/preprocessor/iteration/detail/iter/limits/forward1_256.hpp + /usr/include/boost/utility/detail/result_of_iterate.hpp + /usr/include/boost/algorithm/string/detail/case_conv.hpp + /usr/include/boost/algorithm/string/predicate.hpp + /usr/include/boost/algorithm/string/compare.hpp + /usr/include/boost/algorithm/string/find.hpp + /usr/include/boost/algorithm/string/finder.hpp + /usr/include/boost/algorithm/string/constants.hpp + /usr/include/boost/algorithm/string/detail/finder.hpp + /usr/include/boost/algorithm/string/detail/predicate.hpp + /usr/include/boost/algorithm/string/split.hpp + /usr/include/boost/algorithm/string/iter_find.hpp + /usr/include/boost/algorithm/string/concept.hpp + /usr/include/boost/algorithm/string/find_iterator.hpp + /usr/include/boost/algorithm/string/detail/find_iterator.hpp + /usr/include/boost/function.hpp + /usr/include/boost/preprocessor/iterate.hpp + /usr/include/boost/function/detail/prologue.hpp + /usr/include/boost/config/no_tr1/functional.hpp + /usr/include/boost/throw_exception.hpp + /usr/include/boost/assert/source_location.hpp + /usr/include/boost/current_function.hpp + /usr/include/boost/exception/exception.hpp + /usr/include/boost/function/function_base.hpp + /usr/include/boost/integer.hpp + /usr/include/boost/integer_fwd.hpp + /usr/include/boost/integer_traits.hpp + /usr/include/boost/type_index.hpp + /usr/include/boost/type_index/stl_type_index.hpp + /usr/include/boost/type_index/type_index_facade.hpp + /usr/include/boost/container_hash/hash_fwd.hpp + /usr/include/boost/core/demangle.hpp + /usr/include/c++/11/cxxabi.h + /usr/include/c++/11/x86_64-redhat-linux/bits/cxxabi_tweaks.h + /usr/include/boost/type_traits/has_trivial_copy.hpp + /usr/include/boost/type_traits/is_copy_constructible.hpp + /usr/include/boost/type_traits/is_constructible.hpp + /usr/include/boost/type_traits/is_destructible.hpp + /usr/include/boost/type_traits/is_default_constructible.hpp + /usr/include/boost/type_traits/has_trivial_destructor.hpp + /usr/include/boost/type_traits/composite_traits.hpp + /usr/include/boost/type_traits/is_union.hpp + /usr/include/boost/ref.hpp + /usr/include/boost/core/ref.hpp + /usr/include/boost/type_traits/alignment_of.hpp + /usr/include/boost/type_traits/enable_if.hpp + /usr/include/boost/function_equal.hpp + /usr/include/boost/function/function_fwd.hpp + /usr/include/boost/mem_fn.hpp + /usr/include/boost/bind/mem_fn.hpp + /usr/include/boost/get_pointer.hpp + /usr/include/boost/config/no_tr1/memory.hpp + /usr/include/boost/bind/mem_fn_template.hpp + /usr/include/boost/bind/mem_fn_cc.hpp + /usr/include/boost/preprocessor/enum.hpp + /usr/include/boost/preprocessor/repetition/enum.hpp + /usr/include/boost/preprocessor/enum_params.hpp + /usr/include/boost/function/detail/function_iterate.hpp + /usr/include/boost/function/detail/maybe_include.hpp + /usr/include/boost/function/function_template.hpp + /usr/include/boost/core/no_exceptions_support.hpp + /usr/include/boost/algorithm/string/detail/util.hpp + /usr/include/boost/algorithm/string/join.hpp + /usr/include/boost/algorithm/string/detail/sequence.hpp + /usr/include/boost/mpl/logical.hpp + /usr/include/boost/algorithm/string/replace.hpp + /usr/include/boost/algorithm/string/find_format.hpp + /usr/include/c++/11/deque + /usr/include/c++/11/bits/stl_deque.h + /usr/include/c++/11/bits/deque.tcc + /usr/include/boost/algorithm/string/detail/find_format.hpp + /usr/include/boost/algorithm/string/detail/find_format_store.hpp + /usr/include/boost/algorithm/string/detail/replace_storage.hpp + /usr/include/boost/algorithm/string/detail/find_format_all.hpp + /usr/include/boost/algorithm/string/formatter.hpp + /usr/include/boost/algorithm/string/detail/formatter.hpp + /usr/include/boost/algorithm/string/erase.hpp + +CMakeFiles/lspcpp.dir/src/lsp/ParentProcessWatcher.cpp.o + /usr/local/src/asymptote-2.78/LspCpp/src/lsp/ParentProcessWatcher.cpp + /usr/include/stdc-predef.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/ParentProcessWatcher.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/JsonRpc/MessageIssue.h + /usr/include/c++/11/string + /usr/include/c++/11/x86_64-redhat-linux/bits/c++config.h + /usr/include/bits/wordsize.h + /usr/include/c++/11/x86_64-redhat-linux/bits/os_defines.h + /usr/include/features.h + /usr/include/sys/cdefs.h + /usr/include/bits/long-double.h + /usr/include/gnu/stubs.h + /usr/include/gnu/stubs-64.h + /usr/include/c++/11/x86_64-redhat-linux/bits/cpu_defines.h + /usr/include/c++/11/bits/stringfwd.h + /usr/include/c++/11/bits/memoryfwd.h + /usr/include/c++/11/bits/char_traits.h + /usr/include/c++/11/bits/stl_algobase.h + /usr/include/c++/11/bits/functexcept.h + /usr/include/c++/11/bits/exception_defines.h + /usr/include/c++/11/bits/cpp_type_traits.h + /usr/include/c++/11/ext/type_traits.h + /usr/include/c++/11/ext/numeric_traits.h + /usr/include/c++/11/bits/stl_pair.h + /usr/include/c++/11/bits/move.h + /usr/include/c++/11/type_traits + /usr/include/c++/11/bits/stl_iterator_base_types.h + /usr/include/c++/11/bits/stl_iterator_base_funcs.h + /usr/include/c++/11/bits/concept_check.h + /usr/include/c++/11/debug/assertions.h + /usr/include/c++/11/bits/stl_iterator.h + /usr/include/c++/11/bits/ptr_traits.h + /usr/include/c++/11/debug/debug.h + /usr/include/c++/11/bits/predefined_ops.h + /usr/include/c++/11/bits/postypes.h + /usr/include/c++/11/cwchar + /usr/include/wchar.h + /usr/include/bits/libc-header-start.h + /usr/include/bits/floatn.h + /usr/include/bits/floatn-common.h + /usr/lib/gcc/x86_64-redhat-linux/11/include/stddef.h + /usr/lib/gcc/x86_64-redhat-linux/11/include/stdarg.h + /usr/include/bits/wchar.h + /usr/include/bits/types/wint_t.h + /usr/include/bits/types/mbstate_t.h + /usr/include/bits/types/__mbstate_t.h + /usr/include/bits/types/__FILE.h + /usr/include/bits/types/FILE.h + /usr/include/bits/types/locale_t.h + /usr/include/bits/types/__locale_t.h + /usr/include/c++/11/cstdint + /usr/lib/gcc/x86_64-redhat-linux/11/include/stdint.h + /usr/include/stdint.h + /usr/include/bits/types.h + /usr/include/bits/timesize.h + /usr/include/bits/typesizes.h + /usr/include/bits/time64.h + /usr/include/bits/stdint-intn.h + /usr/include/bits/stdint-uintn.h + /usr/include/c++/11/bits/allocator.h + /usr/include/c++/11/x86_64-redhat-linux/bits/c++allocator.h + /usr/include/c++/11/ext/new_allocator.h + /usr/include/c++/11/new + /usr/include/c++/11/bits/exception.h + /usr/include/c++/11/bits/localefwd.h + /usr/include/c++/11/x86_64-redhat-linux/bits/c++locale.h + /usr/include/c++/11/clocale + /usr/include/locale.h + /usr/include/bits/locale.h + /usr/include/c++/11/iosfwd + /usr/include/c++/11/cctype + /usr/include/ctype.h + /usr/include/bits/endian.h + /usr/include/bits/endianness.h + /usr/include/c++/11/bits/ostream_insert.h + /usr/include/c++/11/bits/cxxabi_forced.h + /usr/include/c++/11/bits/stl_function.h + /usr/include/c++/11/backward/binders.h + /usr/include/c++/11/bits/range_access.h + /usr/include/c++/11/initializer_list + /usr/include/c++/11/bits/basic_string.h + /usr/include/c++/11/ext/atomicity.h + /usr/include/c++/11/x86_64-redhat-linux/bits/gthr.h + /usr/include/c++/11/x86_64-redhat-linux/bits/gthr-default.h + /usr/include/pthread.h + /usr/include/sched.h + /usr/include/bits/types/time_t.h + /usr/include/bits/types/struct_timespec.h + /usr/include/bits/sched.h + /usr/include/bits/types/struct_sched_param.h + /usr/include/bits/cpu-set.h + /usr/include/time.h + /usr/include/bits/time.h + /usr/include/bits/timex.h + /usr/include/bits/types/struct_timeval.h + /usr/include/bits/types/clock_t.h + /usr/include/bits/types/struct_tm.h + /usr/include/bits/types/clockid_t.h + /usr/include/bits/types/timer_t.h + /usr/include/bits/types/struct_itimerspec.h + /usr/include/bits/pthreadtypes.h + /usr/include/bits/thread-shared-types.h + /usr/include/bits/pthreadtypes-arch.h + /usr/include/bits/struct_mutex.h + /usr/include/bits/struct_rwlock.h + /usr/include/bits/setjmp.h + /usr/include/bits/types/__sigset_t.h + /usr/include/bits/types/struct___jmp_buf_tag.h + /usr/include/c++/11/x86_64-redhat-linux/bits/atomic_word.h + /usr/include/sys/single_threaded.h + /usr/include/c++/11/ext/alloc_traits.h + /usr/include/c++/11/bits/alloc_traits.h + /usr/include/c++/11/bits/stl_construct.h + /usr/include/c++/11/ext/string_conversions.h + /usr/include/c++/11/cstdlib + /usr/include/stdlib.h + /usr/include/bits/waitflags.h + /usr/include/bits/waitstatus.h + /usr/include/sys/types.h + /usr/include/endian.h + /usr/include/bits/byteswap.h + /usr/include/bits/uintn-identity.h + /usr/include/sys/select.h + /usr/include/bits/select.h + /usr/include/bits/types/sigset_t.h + /usr/include/alloca.h + /usr/include/bits/stdlib-bsearch.h + /usr/include/bits/stdlib-float.h + /usr/include/c++/11/bits/std_abs.h + /usr/include/c++/11/cstdio + /usr/include/stdio.h + /usr/include/bits/types/__fpos_t.h + /usr/include/bits/types/__fpos64_t.h + /usr/include/bits/types/struct_FILE.h + /usr/include/bits/types/cookie_io_functions_t.h + /usr/include/bits/stdio_lim.h + /usr/include/bits/stdio.h + /usr/include/c++/11/cerrno + /usr/include/errno.h + /usr/include/bits/errno.h + /usr/include/linux/errno.h + /usr/include/asm/errno.h + /usr/include/asm-generic/errno.h + /usr/include/asm-generic/errno-base.h + /usr/include/bits/types/error_t.h + /usr/include/c++/11/bits/charconv.h + /usr/include/c++/11/bits/functional_hash.h + /usr/include/c++/11/bits/hash_bytes.h + /usr/include/c++/11/bits/basic_string.tcc + /usr/include/c++/11/functional + /usr/include/c++/11/tuple + /usr/include/c++/11/utility + /usr/include/c++/11/bits/stl_relops.h + /usr/include/c++/11/array + /usr/include/c++/11/bits/uses_allocator.h + /usr/include/c++/11/bits/invoke.h + /usr/include/c++/11/bits/refwrap.h + /usr/include/c++/11/bits/std_function.h + /usr/include/c++/11/typeinfo + /usr/include/c++/11/vector + /usr/include/c++/11/bits/stl_uninitialized.h + /usr/include/c++/11/bits/stl_vector.h + /usr/include/c++/11/bits/stl_bvector.h + /usr/include/c++/11/bits/vector.tcc + /usr/include/c++/11/memory + /usr/include/c++/11/bits/stl_tempbuf.h + /usr/include/c++/11/bits/stl_raw_storage_iter.h + /usr/include/c++/11/bits/align.h + /usr/include/c++/11/bit + /usr/include/c++/11/bits/unique_ptr.h + /usr/include/c++/11/bits/shared_ptr.h + /usr/include/c++/11/bits/shared_ptr_base.h + /usr/include/c++/11/bits/allocated_ptr.h + /usr/include/c++/11/ext/aligned_buffer.h + /usr/include/c++/11/ext/concurrence.h + /usr/include/c++/11/exception + /usr/include/c++/11/bits/exception_ptr.h + /usr/include/c++/11/bits/cxxabi_init_exception.h + /usr/include/c++/11/bits/nested_exception.h + /usr/include/c++/11/bits/shared_ptr_atomic.h + /usr/include/c++/11/bits/atomic_base.h + /usr/include/c++/11/bits/atomic_lockfree_defines.h + /usr/include/c++/11/backward/auto_ptr.h + /usr/include/boost/process.hpp + /usr/include/boost/process/args.hpp + /usr/include/boost/process/detail/basic_cmd.hpp + /usr/include/boost/process/detail/config.hpp + /usr/include/boost/config.hpp + /usr/include/boost/config/user.hpp + /usr/include/boost/config/detail/select_compiler_config.hpp + /usr/include/boost/config/compiler/gcc.hpp + /usr/include/c++/11/cstddef + /usr/include/boost/config/detail/select_stdlib_config.hpp + /usr/include/c++/11/version + /usr/include/boost/config/stdlib/libstdcpp3.hpp + /usr/include/unistd.h + /usr/include/bits/posix_opt.h + /usr/include/bits/environments.h + /usr/include/bits/confname.h + /usr/include/bits/getopt_posix.h + /usr/include/bits/getopt_core.h + /usr/include/bits/unistd_ext.h + /usr/include/boost/config/detail/select_platform_config.hpp + /usr/include/boost/config/platform/linux.hpp + /usr/include/boost/config/detail/posix_features.hpp + /usr/include/boost/config/detail/suffix.hpp + /usr/include/boost/config/helper_macros.hpp + /usr/include/c++/11/system_error + /usr/include/c++/11/x86_64-redhat-linux/bits/error_constants.h + /usr/include/c++/11/stdexcept + /usr/include/boost/system/api_config.hpp + /usr/include/boost/process/exception.hpp + /usr/include/boost/process/detail/handler_base.hpp + /usr/include/boost/process/detail/traits/cmd_or_exe.hpp + /usr/include/boost/filesystem/path.hpp + /usr/include/boost/assert.hpp + /usr/include/assert.h + /usr/include/boost/filesystem/config.hpp + /usr/include/boost/detail/workaround.hpp + /usr/include/boost/config/workaround.hpp + /usr/include/boost/config/auto_link.hpp + /usr/include/boost/filesystem/path_traits.hpp + /usr/include/boost/type_traits/is_array.hpp + /usr/include/boost/type_traits/integral_constant.hpp + /usr/include/boost/type_traits/decay.hpp + /usr/include/boost/type_traits/is_function.hpp + /usr/include/boost/type_traits/detail/config.hpp + /usr/include/boost/version.hpp + /usr/include/boost/type_traits/detail/is_function_cxx_11.hpp + /usr/include/boost/type_traits/remove_bounds.hpp + /usr/include/boost/type_traits/remove_extent.hpp + /usr/include/boost/type_traits/add_pointer.hpp + /usr/include/boost/type_traits/remove_reference.hpp + /usr/include/boost/type_traits/remove_cv.hpp + /usr/include/boost/system/error_code.hpp + /usr/include/boost/system/detail/error_code.hpp + /usr/include/boost/system/detail/error_category.hpp + /usr/include/boost/system/detail/config.hpp + /usr/include/boost/cstdint.hpp + /usr/include/boost/system/detail/error_condition.hpp + /usr/include/boost/system/detail/generic_category.hpp + /usr/include/boost/system/detail/generic_category_message.hpp + /usr/include/c++/11/cstring + /usr/include/string.h + /usr/include/strings.h + /usr/include/boost/system/detail/enable_if.hpp + /usr/include/boost/system/is_error_condition_enum.hpp + /usr/include/boost/system/detail/system_category.hpp + /usr/include/boost/system/is_error_code_enum.hpp + /usr/include/c++/11/ostream + /usr/include/c++/11/ios + /usr/include/c++/11/bits/ios_base.h + /usr/include/c++/11/bits/locale_classes.h + /usr/include/c++/11/bits/locale_classes.tcc + /usr/include/c++/11/streambuf + /usr/include/c++/11/bits/streambuf.tcc + /usr/include/c++/11/bits/basic_ios.h + /usr/include/c++/11/bits/locale_facets.h + /usr/include/c++/11/cwctype + /usr/include/wctype.h + /usr/include/bits/wctype-wchar.h + /usr/include/c++/11/x86_64-redhat-linux/bits/ctype_base.h + /usr/include/c++/11/bits/streambuf_iterator.h + /usr/include/c++/11/x86_64-redhat-linux/bits/ctype_inline.h + /usr/include/c++/11/bits/locale_facets.tcc + /usr/include/c++/11/bits/basic_ios.tcc + /usr/include/c++/11/bits/ostream.tcc + /usr/include/boost/system/error_category.hpp + /usr/include/boost/system/detail/error_category_impl.hpp + /usr/include/boost/system/detail/to_std_category.hpp + /usr/include/c++/11/map + /usr/include/c++/11/bits/stl_tree.h + /usr/include/c++/11/bits/stl_map.h + /usr/include/c++/11/bits/stl_multimap.h + /usr/include/c++/11/bits/erase_if.h + /usr/include/c++/11/mutex + /usr/include/c++/11/chrono + /usr/include/c++/11/ratio + /usr/include/c++/11/limits + /usr/include/c++/11/ctime + /usr/include/c++/11/bits/parse_numbers.h + /usr/include/c++/11/bits/std_mutex.h + /usr/include/c++/11/bits/unique_lock.h + /usr/include/boost/system/error_condition.hpp + /usr/include/boost/system/errc.hpp + /usr/include/boost/system/detail/errc.hpp + /usr/include/boost/system/detail/cerrno.hpp + /usr/include/boost/system/generic_category.hpp + /usr/include/boost/system/system_category.hpp + /usr/include/boost/system/detail/system_category_impl.hpp + /usr/include/boost/system/detail/is_generic_value.hpp + /usr/include/boost/system/detail/throws.hpp + /usr/include/boost/core/enable_if.hpp + /usr/include/c++/11/list + /usr/include/c++/11/bits/stl_list.h + /usr/include/c++/11/bits/list.tcc + /usr/include/c++/11/iterator + /usr/include/c++/11/bits/stream_iterator.h + /usr/include/c++/11/locale + /usr/include/c++/11/bits/locale_facets_nonio.h + /usr/include/c++/11/x86_64-redhat-linux/bits/time_members.h + /usr/include/c++/11/x86_64-redhat-linux/bits/messages_members.h + /usr/include/libintl.h + /usr/include/c++/11/bits/codecvt.h + /usr/include/c++/11/bits/locale_facets_nonio.tcc + /usr/include/c++/11/bits/locale_conv.h + /usr/include/boost/config/abi_prefix.hpp + /usr/include/boost/config/abi_suffix.hpp + /usr/include/boost/system/system_error.hpp + /usr/include/c++/11/cassert + /usr/include/boost/iterator/iterator_facade.hpp + /usr/include/boost/iterator/interoperable.hpp + /usr/include/boost/mpl/bool.hpp + /usr/include/boost/mpl/bool_fwd.hpp + /usr/include/boost/mpl/aux_/adl_barrier.hpp + /usr/include/boost/mpl/aux_/config/adl.hpp + /usr/include/boost/mpl/aux_/config/msvc.hpp + /usr/include/boost/mpl/aux_/config/intel.hpp + /usr/include/boost/mpl/aux_/config/gcc.hpp + /usr/include/boost/mpl/aux_/config/workaround.hpp + /usr/include/boost/mpl/integral_c_tag.hpp + /usr/include/boost/mpl/aux_/config/static_constant.hpp + /usr/include/boost/mpl/or.hpp + /usr/include/boost/mpl/aux_/config/use_preprocessed.hpp + /usr/include/boost/mpl/aux_/nested_type_wknd.hpp + /usr/include/boost/mpl/aux_/na_spec.hpp + /usr/include/boost/mpl/lambda_fwd.hpp + /usr/include/boost/mpl/void_fwd.hpp + /usr/include/boost/mpl/aux_/na.hpp + /usr/include/boost/mpl/aux_/na_fwd.hpp + /usr/include/boost/mpl/aux_/config/ctps.hpp + /usr/include/boost/mpl/aux_/config/lambda.hpp + /usr/include/boost/mpl/aux_/config/ttp.hpp + /usr/include/boost/mpl/int.hpp + /usr/include/boost/mpl/int_fwd.hpp + /usr/include/boost/mpl/aux_/nttp_decl.hpp + /usr/include/boost/mpl/aux_/config/nttp.hpp + /usr/include/boost/mpl/aux_/integral_wrapper.hpp + /usr/include/boost/mpl/aux_/static_cast.hpp + /usr/include/boost/preprocessor/cat.hpp + /usr/include/boost/preprocessor/config/config.hpp + /usr/include/boost/mpl/aux_/lambda_arity_param.hpp + /usr/include/boost/mpl/aux_/template_arity_fwd.hpp + /usr/include/boost/mpl/aux_/arity.hpp + /usr/include/boost/mpl/aux_/config/dtp.hpp + /usr/include/boost/mpl/aux_/preprocessor/params.hpp + /usr/include/boost/mpl/aux_/config/preprocessor.hpp + /usr/include/boost/preprocessor/comma_if.hpp + /usr/include/boost/preprocessor/punctuation/comma_if.hpp + /usr/include/boost/preprocessor/control/if.hpp + /usr/include/boost/preprocessor/control/iif.hpp + /usr/include/boost/preprocessor/logical/bool.hpp + /usr/include/boost/preprocessor/config/limits.hpp + /usr/include/boost/preprocessor/logical/limits/bool_256.hpp + /usr/include/boost/preprocessor/facilities/empty.hpp + /usr/include/boost/preprocessor/punctuation/comma.hpp + /usr/include/boost/preprocessor/repeat.hpp + /usr/include/boost/preprocessor/repetition/repeat.hpp + /usr/include/boost/preprocessor/debug/error.hpp + /usr/include/boost/preprocessor/detail/auto_rec.hpp + /usr/include/boost/preprocessor/detail/limits/auto_rec_256.hpp + /usr/include/boost/preprocessor/tuple/eat.hpp + /usr/include/boost/preprocessor/repetition/limits/repeat_256.hpp + /usr/include/boost/preprocessor/inc.hpp + /usr/include/boost/preprocessor/arithmetic/inc.hpp + /usr/include/boost/preprocessor/arithmetic/limits/inc_256.hpp + /usr/include/boost/mpl/aux_/preprocessor/enum.hpp + /usr/include/boost/mpl/aux_/preprocessor/def_params_tail.hpp + /usr/include/boost/mpl/limits/arity.hpp + /usr/include/boost/preprocessor/logical/and.hpp + /usr/include/boost/preprocessor/logical/bitand.hpp + /usr/include/boost/preprocessor/identity.hpp + /usr/include/boost/preprocessor/facilities/identity.hpp + /usr/include/boost/preprocessor/empty.hpp + /usr/include/boost/preprocessor/arithmetic/add.hpp + /usr/include/boost/preprocessor/arithmetic/dec.hpp + /usr/include/boost/preprocessor/arithmetic/limits/dec_256.hpp + /usr/include/boost/preprocessor/control/while.hpp + /usr/include/boost/preprocessor/list/fold_left.hpp + /usr/include/boost/preprocessor/list/detail/fold_left.hpp + /usr/include/boost/preprocessor/control/expr_iif.hpp + /usr/include/boost/preprocessor/list/adt.hpp + /usr/include/boost/preprocessor/detail/is_binary.hpp + /usr/include/boost/preprocessor/detail/check.hpp + /usr/include/boost/preprocessor/logical/compl.hpp + /usr/include/boost/preprocessor/list/detail/limits/fold_left_256.hpp + /usr/include/boost/preprocessor/list/limits/fold_left_256.hpp + /usr/include/boost/preprocessor/list/fold_right.hpp + /usr/include/boost/preprocessor/list/detail/fold_right.hpp + /usr/include/boost/preprocessor/list/reverse.hpp + /usr/include/boost/preprocessor/list/detail/limits/fold_right_256.hpp + /usr/include/boost/preprocessor/control/detail/while.hpp + /usr/include/boost/preprocessor/control/detail/limits/while_256.hpp + /usr/include/boost/preprocessor/control/limits/while_256.hpp + /usr/include/boost/preprocessor/logical/bitor.hpp + /usr/include/boost/preprocessor/tuple/elem.hpp + /usr/include/boost/preprocessor/facilities/expand.hpp + /usr/include/boost/preprocessor/facilities/overload.hpp + /usr/include/boost/preprocessor/variadic/size.hpp + /usr/include/boost/preprocessor/facilities/check_empty.hpp + /usr/include/boost/preprocessor/variadic/has_opt.hpp + /usr/include/boost/preprocessor/variadic/limits/size_64.hpp + /usr/include/boost/preprocessor/tuple/rem.hpp + /usr/include/boost/preprocessor/tuple/detail/is_single_return.hpp + /usr/include/boost/preprocessor/variadic/elem.hpp + /usr/include/boost/preprocessor/variadic/limits/elem_64.hpp + /usr/include/boost/preprocessor/arithmetic/detail/is_maximum_number.hpp + /usr/include/boost/preprocessor/comparison/equal.hpp + /usr/include/boost/preprocessor/comparison/not_equal.hpp + /usr/include/boost/preprocessor/comparison/limits/not_equal_256.hpp + /usr/include/boost/preprocessor/arithmetic/detail/maximum_number.hpp + /usr/include/boost/preprocessor/arithmetic/detail/is_minimum_number.hpp + /usr/include/boost/preprocessor/logical/not.hpp + /usr/include/boost/preprocessor/arithmetic/sub.hpp + /usr/include/boost/mpl/aux_/config/eti.hpp + /usr/include/boost/mpl/aux_/config/overload_resolution.hpp + /usr/include/boost/mpl/aux_/lambda_support.hpp + /usr/include/boost/mpl/aux_/include_preprocessed.hpp + /usr/include/boost/mpl/aux_/config/compiler.hpp + /usr/include/boost/preprocessor/stringize.hpp + /usr/include/boost/mpl/aux_/preprocessed/gcc/or.hpp + /usr/include/boost/type_traits/is_convertible.hpp + /usr/include/boost/type_traits/intrinsics.hpp + /usr/include/boost/type_traits/is_complete.hpp + /usr/include/boost/type_traits/declval.hpp + /usr/include/boost/type_traits/add_rvalue_reference.hpp + /usr/include/boost/type_traits/is_void.hpp + /usr/include/boost/type_traits/is_reference.hpp + /usr/include/boost/type_traits/is_lvalue_reference.hpp + /usr/include/boost/type_traits/is_rvalue_reference.hpp + /usr/include/boost/type_traits/detail/yes_no_type.hpp + /usr/include/boost/static_assert.hpp + /usr/include/boost/type_traits/is_arithmetic.hpp + /usr/include/boost/type_traits/is_integral.hpp + /usr/include/boost/type_traits/is_floating_point.hpp + /usr/include/boost/type_traits/is_abstract.hpp + /usr/include/boost/type_traits/add_lvalue_reference.hpp + /usr/include/boost/type_traits/add_reference.hpp + /usr/include/boost/iterator/detail/config_def.hpp + /usr/include/boost/iterator/detail/config_undef.hpp + /usr/include/boost/iterator/iterator_traits.hpp + /usr/include/boost/iterator/iterator_categories.hpp + /usr/include/boost/mpl/eval_if.hpp + /usr/include/boost/mpl/if.hpp + /usr/include/boost/mpl/aux_/value_wknd.hpp + /usr/include/boost/mpl/aux_/config/integral.hpp + /usr/include/boost/mpl/identity.hpp + /usr/include/boost/mpl/placeholders.hpp + /usr/include/boost/mpl/arg.hpp + /usr/include/boost/mpl/arg_fwd.hpp + /usr/include/boost/mpl/aux_/na_assert.hpp + /usr/include/boost/mpl/assert.hpp + /usr/include/boost/mpl/not.hpp + /usr/include/boost/mpl/aux_/yes_no.hpp + /usr/include/boost/mpl/aux_/config/arrays.hpp + /usr/include/boost/mpl/aux_/config/gpu.hpp + /usr/include/boost/mpl/aux_/config/pp_counter.hpp + /usr/include/boost/mpl/aux_/arity_spec.hpp + /usr/include/boost/mpl/aux_/arg_typedef.hpp + /usr/include/boost/mpl/aux_/preprocessed/gcc/arg.hpp + /usr/include/boost/mpl/aux_/preprocessed/gcc/placeholders.hpp + /usr/include/boost/iterator/detail/facade_iterator_category.hpp + /usr/include/boost/core/use_default.hpp + /usr/include/boost/mpl/and.hpp + /usr/include/boost/mpl/aux_/preprocessed/gcc/and.hpp + /usr/include/boost/type_traits/is_same.hpp + /usr/include/boost/type_traits/is_const.hpp + /usr/include/boost/detail/indirect_traits.hpp + /usr/include/boost/type_traits/is_pointer.hpp + /usr/include/boost/type_traits/is_class.hpp + /usr/include/boost/type_traits/is_volatile.hpp + /usr/include/boost/type_traits/is_member_function_pointer.hpp + /usr/include/boost/type_traits/detail/is_member_function_pointer_cxx_11.hpp + /usr/include/boost/type_traits/is_member_pointer.hpp + /usr/include/boost/type_traits/remove_pointer.hpp + /usr/include/boost/detail/select_type.hpp + /usr/include/boost/iterator/detail/enable_if.hpp + /usr/include/boost/core/addressof.hpp + /usr/include/boost/type_traits/add_const.hpp + /usr/include/boost/type_traits/remove_const.hpp + /usr/include/boost/type_traits/is_pod.hpp + /usr/include/boost/type_traits/is_scalar.hpp + /usr/include/boost/type_traits/is_enum.hpp + /usr/include/boost/mpl/always.hpp + /usr/include/boost/mpl/aux_/preprocessor/default_params.hpp + /usr/include/boost/mpl/apply.hpp + /usr/include/boost/mpl/apply_fwd.hpp + /usr/include/boost/mpl/aux_/preprocessed/gcc/apply_fwd.hpp + /usr/include/boost/mpl/apply_wrap.hpp + /usr/include/boost/mpl/aux_/has_apply.hpp + /usr/include/boost/mpl/has_xxx.hpp + /usr/include/boost/mpl/aux_/type_wrapper.hpp + /usr/include/boost/mpl/aux_/config/has_xxx.hpp + /usr/include/boost/mpl/aux_/config/msvc_typename.hpp + /usr/include/boost/preprocessor/array/elem.hpp + /usr/include/boost/preprocessor/array/data.hpp + /usr/include/boost/preprocessor/array/size.hpp + /usr/include/boost/preprocessor/repetition/enum_params.hpp + /usr/include/boost/preprocessor/repetition/enum_trailing_params.hpp + /usr/include/boost/mpl/aux_/config/has_apply.hpp + /usr/include/boost/mpl/aux_/msvc_never_true.hpp + /usr/include/boost/mpl/aux_/preprocessed/gcc/apply_wrap.hpp + /usr/include/boost/mpl/lambda.hpp + /usr/include/boost/mpl/bind.hpp + /usr/include/boost/mpl/bind_fwd.hpp + /usr/include/boost/mpl/aux_/config/bind.hpp + /usr/include/boost/mpl/aux_/preprocessed/gcc/bind_fwd.hpp + /usr/include/boost/mpl/next.hpp + /usr/include/boost/mpl/next_prior.hpp + /usr/include/boost/mpl/aux_/common_name_wknd.hpp + /usr/include/boost/mpl/protect.hpp + /usr/include/boost/mpl/aux_/preprocessed/gcc/bind.hpp + /usr/include/boost/mpl/aux_/full_lambda.hpp + /usr/include/boost/mpl/quote.hpp + /usr/include/boost/mpl/void.hpp + /usr/include/boost/mpl/aux_/has_type.hpp + /usr/include/boost/mpl/aux_/config/bcc.hpp + /usr/include/boost/mpl/aux_/preprocessed/gcc/quote.hpp + /usr/include/boost/mpl/aux_/template_arity.hpp + /usr/include/boost/mpl/aux_/preprocessed/gcc/template_arity.hpp + /usr/include/boost/mpl/aux_/preprocessed/gcc/full_lambda.hpp + /usr/include/boost/mpl/aux_/preprocessed/gcc/apply.hpp + /usr/include/boost/io/quoted.hpp + /usr/include/boost/io/detail/buffer_fill.hpp + /usr/include/boost/io/detail/ostream_guard.hpp + /usr/include/boost/io/ios_state.hpp + /usr/include/boost/io_fwd.hpp + /usr/include/boost/functional/hash_fwd.hpp + /usr/include/boost/container_hash/hash_fwd.hpp + /usr/include/c++/11/algorithm + /usr/include/c++/11/bits/stl_algo.h + /usr/include/c++/11/bits/algorithmfwd.h + /usr/include/c++/11/bits/stl_heap.h + /usr/include/c++/11/bits/uniform_int_dist.h + /usr/include/boost/process/detail/traits/decl.hpp + /usr/include/boost/none.hpp + /usr/include/boost/none_t.hpp + /usr/include/boost/process/detail/posix/handler.hpp + /usr/include/boost/process/detail/traits/wchar_t.hpp + /usr/include/boost/process/detail/traits/env.hpp + /usr/include/boost/process/locale.hpp + /usr/include/boost/process/detail/posix/basic_cmd.hpp + /usr/include/boost/process/detail/posix/cmd.hpp + /usr/include/boost/algorithm/string/replace.hpp + /usr/include/boost/algorithm/string/config.hpp + /usr/include/boost/range/iterator_range_core.hpp + /usr/include/boost/type_traits/is_base_and_derived.hpp + /usr/include/boost/range/functions.hpp + /usr/include/boost/range/begin.hpp + /usr/include/boost/range/config.hpp + /usr/include/boost/range/iterator.hpp + /usr/include/boost/range/range_fwd.hpp + /usr/include/boost/range/mutable_iterator.hpp + /usr/include/boost/range/detail/extract_optional_type.hpp + /usr/include/boost/range/detail/msvc_has_iterator_workaround.hpp + /usr/include/boost/range/const_iterator.hpp + /usr/include/boost/range/end.hpp + /usr/include/boost/range/detail/implementation_help.hpp + /usr/include/boost/range/detail/common.hpp + /usr/include/boost/range/detail/sfinae.hpp + /usr/include/boost/range/size.hpp + /usr/include/boost/range/size_type.hpp + /usr/include/boost/range/difference_type.hpp + /usr/include/boost/range/has_range_iterator.hpp + /usr/include/boost/utility/enable_if.hpp + /usr/include/boost/range/concepts.hpp + /usr/include/boost/concept_check.hpp + /usr/include/boost/concept/assert.hpp + /usr/include/boost/concept/detail/general.hpp + /usr/include/boost/concept/detail/backward_compatibility.hpp + /usr/include/boost/concept/detail/has_constraints.hpp + /usr/include/boost/type_traits/conditional.hpp + /usr/include/boost/type_traits/conversion_traits.hpp + /usr/include/boost/concept/usage.hpp + /usr/include/boost/concept/detail/concept_def.hpp + /usr/include/boost/preprocessor/seq/for_each_i.hpp + /usr/include/boost/preprocessor/repetition/for.hpp + /usr/include/boost/preprocessor/repetition/detail/for.hpp + /usr/include/boost/preprocessor/repetition/detail/limits/for_256.hpp + /usr/include/boost/preprocessor/repetition/limits/for_256.hpp + /usr/include/boost/preprocessor/seq/seq.hpp + /usr/include/boost/preprocessor/seq/elem.hpp + /usr/include/boost/preprocessor/seq/limits/elem_256.hpp + /usr/include/boost/preprocessor/seq/size.hpp + /usr/include/boost/preprocessor/seq/limits/size_256.hpp + /usr/include/boost/preprocessor/seq/detail/is_empty.hpp + /usr/include/boost/preprocessor/seq/enum.hpp + /usr/include/boost/preprocessor/seq/limits/enum_256.hpp + /usr/include/boost/concept/detail/concept_undef.hpp + /usr/include/boost/iterator/iterator_concepts.hpp + /usr/include/boost/limits.hpp + /usr/include/boost/range/value_type.hpp + /usr/include/boost/range/detail/misc_concept.hpp + /usr/include/boost/type_traits/make_unsigned.hpp + /usr/include/boost/type_traits/is_signed.hpp + /usr/include/c++/11/climits + /usr/lib/gcc/x86_64-redhat-linux/11/include/limits.h + /usr/lib/gcc/x86_64-redhat-linux/11/include/syslimits.h + /usr/include/limits.h + /usr/include/bits/posix1_lim.h + /usr/include/bits/local_lim.h + /usr/include/linux/limits.h + /usr/include/bits/posix2_lim.h + /usr/include/bits/xopen_lim.h + /usr/include/bits/uio_lim.h + /usr/include/boost/type_traits/is_unsigned.hpp + /usr/include/boost/type_traits/add_volatile.hpp + /usr/include/boost/range/detail/has_member_size.hpp + /usr/include/boost/utility.hpp + /usr/include/boost/utility/base_from_member.hpp + /usr/include/boost/preprocessor/repetition/enum_binary_params.hpp + /usr/include/boost/preprocessor/repetition/repeat_from_to.hpp + /usr/include/boost/utility/binary.hpp + /usr/include/boost/preprocessor/control/deduce_d.hpp + /usr/include/boost/preprocessor/seq/cat.hpp + /usr/include/boost/preprocessor/seq/fold_left.hpp + /usr/include/boost/preprocessor/seq/limits/fold_left_256.hpp + /usr/include/boost/preprocessor/seq/transform.hpp + /usr/include/boost/preprocessor/arithmetic/mod.hpp + /usr/include/boost/preprocessor/arithmetic/detail/div_base.hpp + /usr/include/boost/preprocessor/comparison/less_equal.hpp + /usr/include/boost/preprocessor/arithmetic/detail/is_1_number.hpp + /usr/include/boost/utility/identity_type.hpp + /usr/include/boost/type_traits/function_traits.hpp + /usr/include/boost/core/checked_delete.hpp + /usr/include/boost/core/noncopyable.hpp + /usr/include/boost/range/distance.hpp + /usr/include/boost/iterator/distance.hpp + /usr/include/boost/range/empty.hpp + /usr/include/boost/range/rbegin.hpp + /usr/include/boost/range/reverse_iterator.hpp + /usr/include/boost/iterator/reverse_iterator.hpp + /usr/include/boost/iterator/iterator_adaptor.hpp + /usr/include/boost/range/rend.hpp + /usr/include/boost/range/algorithm/equal.hpp + /usr/include/boost/range/detail/safe_bool.hpp + /usr/include/boost/next_prior.hpp + /usr/include/boost/type_traits/has_plus.hpp + /usr/include/boost/type_traits/detail/has_binary_operator.hpp + /usr/include/boost/type_traits/make_void.hpp + /usr/include/boost/type_traits/has_plus_assign.hpp + /usr/include/boost/type_traits/has_minus.hpp + /usr/include/boost/type_traits/has_minus_assign.hpp + /usr/include/boost/iterator/advance.hpp + /usr/include/boost/algorithm/string/find_format.hpp + /usr/include/c++/11/deque + /usr/include/c++/11/bits/stl_deque.h + /usr/include/c++/11/bits/deque.tcc + /usr/include/boost/range/as_literal.hpp + /usr/include/boost/range/iterator_range.hpp + /usr/include/boost/range/iterator_range_io.hpp + /usr/include/boost/range/detail/str_types.hpp + /usr/include/boost/algorithm/string/concept.hpp + /usr/include/boost/algorithm/string/detail/find_format.hpp + /usr/include/boost/algorithm/string/detail/find_format_store.hpp + /usr/include/boost/algorithm/string/detail/replace_storage.hpp + /usr/include/boost/algorithm/string/sequence_traits.hpp + /usr/include/boost/algorithm/string/yes_no_type.hpp + /usr/include/boost/algorithm/string/detail/sequence.hpp + /usr/include/boost/mpl/logical.hpp + /usr/include/boost/algorithm/string/detail/find_format_all.hpp + /usr/include/boost/algorithm/string/finder.hpp + /usr/include/boost/algorithm/string/constants.hpp + /usr/include/boost/algorithm/string/detail/finder.hpp + /usr/include/boost/algorithm/string/compare.hpp + /usr/include/boost/algorithm/string/formatter.hpp + /usr/include/boost/algorithm/string/detail/formatter.hpp + /usr/include/boost/algorithm/string/detail/util.hpp + /usr/include/boost/process/shell.hpp + /usr/include/boost/process/detail/posix/shell_path.hpp + /usr/include/boost/algorithm/string/trim.hpp + /usr/include/boost/algorithm/string/detail/trim.hpp + /usr/include/boost/algorithm/string/classification.hpp + /usr/include/boost/algorithm/string/detail/classification.hpp + /usr/include/boost/algorithm/string/predicate_facade.hpp + /usr/include/boost/algorithm/string/join.hpp + /usr/include/boost/process/async.hpp + /usr/include/boost/process/detail/traits.hpp + /usr/include/boost/process/detail/traits/async.hpp + /usr/include/boost/process/detail/traits/error.hpp + /usr/include/boost/process/detail/on_exit.hpp + /usr/include/boost/process/detail/posix/on_exit.hpp + /usr/include/boost/process/detail/posix/async_handler.hpp + /usr/include/c++/11/future + /usr/include/c++/11/condition_variable + /usr/include/c++/11/atomic + /usr/include/c++/11/bits/atomic_futex.h + /usr/include/c++/11/bits/std_thread.h + /usr/include/boost/asio/io_context.hpp + /usr/include/boost/asio/detail/config.hpp + /usr/include/linux/version.h + /usr/include/boost/asio/async_result.hpp + /usr/include/boost/asio/detail/type_traits.hpp + /usr/include/boost/asio/detail/variadic_templates.hpp + /usr/include/boost/asio/detail/push_options.hpp + /usr/include/boost/asio/detail/pop_options.hpp + /usr/include/boost/asio/detail/wrapped_handler.hpp + /usr/include/boost/asio/detail/bind_handler.hpp + /usr/include/boost/asio/associated_allocator.hpp + /usr/include/boost/asio/associated_executor.hpp + /usr/include/boost/asio/execution/executor.hpp + /usr/include/boost/asio/execution/execute.hpp + /usr/include/boost/asio/execution/detail/as_invocable.hpp + /usr/include/boost/asio/detail/atomic_count.hpp + /usr/include/boost/asio/detail/memory.hpp + /usr/include/boost/asio/execution/receiver_invocation_error.hpp + /usr/include/boost/asio/execution/impl/receiver_invocation_error.ipp + /usr/include/boost/asio/execution/set_done.hpp + /usr/include/boost/asio/traits/set_done_member.hpp + /usr/include/boost/asio/traits/set_done_free.hpp + /usr/include/boost/asio/execution/set_error.hpp + /usr/include/boost/asio/traits/set_error_member.hpp + /usr/include/boost/asio/traits/set_error_free.hpp + /usr/include/boost/asio/execution/set_value.hpp + /usr/include/boost/asio/traits/set_value_member.hpp + /usr/include/boost/asio/traits/set_value_free.hpp + /usr/include/boost/asio/execution/detail/as_receiver.hpp + /usr/include/boost/asio/traits/execute_member.hpp + /usr/include/boost/asio/traits/execute_free.hpp + /usr/include/boost/asio/execution/invocable_archetype.hpp + /usr/include/boost/asio/traits/equality_comparable.hpp + /usr/include/boost/asio/is_executor.hpp + /usr/include/boost/asio/detail/is_executor.hpp + /usr/include/boost/asio/system_executor.hpp + /usr/include/boost/asio/execution.hpp + /usr/include/boost/asio/execution/allocator.hpp + /usr/include/boost/asio/execution/scheduler.hpp + /usr/include/boost/asio/execution/schedule.hpp + /usr/include/boost/asio/traits/schedule_member.hpp + /usr/include/boost/asio/traits/schedule_free.hpp + /usr/include/boost/asio/execution/sender.hpp + /usr/include/boost/asio/execution/detail/void_receiver.hpp + /usr/include/boost/asio/execution/receiver.hpp + /usr/include/boost/asio/execution/connect.hpp + /usr/include/boost/asio/execution/detail/as_operation.hpp + /usr/include/boost/asio/traits/start_member.hpp + /usr/include/boost/asio/execution/operation_state.hpp + /usr/include/boost/asio/execution/start.hpp + /usr/include/boost/asio/traits/start_free.hpp + /usr/include/boost/asio/traits/connect_member.hpp + /usr/include/boost/asio/traits/connect_free.hpp + /usr/include/boost/asio/is_applicable_property.hpp + /usr/include/boost/asio/traits/query_static_constexpr_member.hpp + /usr/include/boost/asio/traits/static_query.hpp + /usr/include/boost/asio/execution/any_executor.hpp + /usr/include/boost/asio/detail/assert.hpp + /usr/include/boost/asio/detail/cstddef.hpp + /usr/include/boost/asio/detail/executor_function.hpp + /usr/include/boost/asio/detail/handler_alloc_helpers.hpp + /usr/include/boost/asio/detail/noncopyable.hpp + /usr/include/boost/asio/detail/recycling_allocator.hpp + /usr/include/boost/asio/detail/thread_context.hpp + /usr/include/boost/asio/detail/call_stack.hpp + /usr/include/boost/asio/detail/tss_ptr.hpp + /usr/include/boost/asio/detail/keyword_tss_ptr.hpp + /usr/include/boost/asio/detail/thread_info_base.hpp + /usr/include/boost/asio/multiple_exceptions.hpp + /usr/include/boost/asio/impl/multiple_exceptions.ipp + /usr/include/boost/asio/handler_alloc_hook.hpp + /usr/include/boost/asio/impl/handler_alloc_hook.ipp + /usr/include/boost/asio/detail/handler_invoke_helpers.hpp + /usr/include/boost/asio/handler_invoke_hook.hpp + /usr/include/boost/asio/detail/non_const_lvalue.hpp + /usr/include/boost/asio/detail/scoped_ptr.hpp + /usr/include/boost/asio/detail/throw_exception.hpp + /usr/include/boost/throw_exception.hpp + /usr/include/boost/assert/source_location.hpp + /usr/include/boost/current_function.hpp + /usr/include/boost/exception/exception.hpp + /usr/include/boost/asio/execution/bad_executor.hpp + /usr/include/boost/asio/execution/impl/bad_executor.ipp + /usr/include/boost/asio/execution/blocking.hpp + /usr/include/boost/asio/prefer.hpp + /usr/include/boost/asio/traits/prefer_free.hpp + /usr/include/boost/asio/traits/prefer_member.hpp + /usr/include/boost/asio/traits/require_free.hpp + /usr/include/boost/asio/traits/require_member.hpp + /usr/include/boost/asio/traits/static_require.hpp + /usr/include/boost/asio/query.hpp + /usr/include/boost/asio/traits/query_member.hpp + /usr/include/boost/asio/traits/query_free.hpp + /usr/include/boost/asio/require.hpp + /usr/include/boost/asio/execution/blocking_adaptation.hpp + /usr/include/boost/asio/detail/event.hpp + /usr/include/boost/asio/detail/posix_event.hpp + /usr/include/boost/asio/detail/impl/posix_event.ipp + /usr/include/boost/asio/detail/throw_error.hpp + /usr/include/boost/asio/detail/impl/throw_error.ipp + /usr/include/boost/asio/error.hpp + /usr/include/boost/cerrno.hpp + /usr/include/netdb.h + /usr/include/netinet/in.h + /usr/include/sys/socket.h + /usr/include/bits/types/struct_iovec.h + /usr/include/bits/socket.h + /usr/include/bits/socket_type.h + /usr/include/bits/sockaddr.h + /usr/include/asm/socket.h + /usr/include/asm-generic/socket.h + /usr/include/linux/posix_types.h + /usr/include/linux/stddef.h + /usr/include/asm/posix_types.h + /usr/include/asm/posix_types_64.h + /usr/include/asm-generic/posix_types.h + /usr/include/asm/bitsperlong.h + /usr/include/asm-generic/bitsperlong.h + /usr/include/asm/sockios.h + /usr/include/asm-generic/sockios.h + /usr/include/bits/types/struct_osockaddr.h + /usr/include/bits/in.h + /usr/include/rpc/netdb.h + /usr/include/bits/types/sigevent_t.h + /usr/include/bits/types/__sigval_t.h + /usr/include/bits/netdb.h + /usr/include/boost/asio/impl/error.ipp + /usr/include/boost/asio/detail/mutex.hpp + /usr/include/boost/asio/detail/posix_mutex.hpp + /usr/include/boost/asio/detail/scoped_lock.hpp + /usr/include/boost/asio/detail/impl/posix_mutex.ipp + /usr/include/boost/asio/execution/bulk_execute.hpp + /usr/include/boost/asio/execution/bulk_guarantee.hpp + /usr/include/boost/asio/execution/detail/bulk_sender.hpp + /usr/include/boost/asio/traits/bulk_execute_member.hpp + /usr/include/boost/asio/traits/bulk_execute_free.hpp + /usr/include/boost/asio/execution/context.hpp + /usr/include/boost/asio/execution/context_as.hpp + /usr/include/boost/asio/execution/mapping.hpp + /usr/include/boost/asio/execution/occupancy.hpp + /usr/include/boost/asio/execution/outstanding_work.hpp + /usr/include/boost/asio/execution/prefer_only.hpp + /usr/include/boost/asio/execution/relationship.hpp + /usr/include/boost/asio/execution/submit.hpp + /usr/include/boost/asio/execution/detail/submit_receiver.hpp + /usr/include/boost/asio/traits/submit_member.hpp + /usr/include/boost/asio/traits/submit_free.hpp + /usr/include/boost/asio/impl/system_executor.hpp + /usr/include/boost/asio/detail/executor_op.hpp + /usr/include/boost/asio/detail/fenced_block.hpp + /usr/include/boost/asio/detail/std_fenced_block.hpp + /usr/include/boost/asio/detail/scheduler_operation.hpp + /usr/include/boost/asio/detail/handler_tracking.hpp + /usr/include/boost/asio/detail/impl/handler_tracking.ipp + /usr/include/boost/asio/detail/op_queue.hpp + /usr/include/boost/asio/detail/global.hpp + /usr/include/boost/asio/detail/posix_global.hpp + /usr/include/boost/asio/system_context.hpp + /usr/include/boost/asio/detail/scheduler.hpp + /usr/include/boost/asio/execution_context.hpp + /usr/include/boost/asio/impl/execution_context.hpp + /usr/include/boost/asio/detail/handler_type_requirements.hpp + /usr/include/boost/asio/detail/service_registry.hpp + /usr/include/boost/asio/detail/impl/service_registry.hpp + /usr/include/boost/asio/detail/impl/service_registry.ipp + /usr/include/boost/asio/impl/execution_context.ipp + /usr/include/boost/asio/detail/conditionally_enabled_event.hpp + /usr/include/boost/asio/detail/conditionally_enabled_mutex.hpp + /usr/include/boost/asio/detail/null_event.hpp + /usr/include/boost/asio/detail/impl/null_event.ipp + /usr/include/boost/asio/detail/reactor_fwd.hpp + /usr/include/boost/asio/detail/thread.hpp + /usr/include/boost/asio/detail/posix_thread.hpp + /usr/include/boost/asio/detail/impl/posix_thread.ipp + /usr/include/boost/asio/detail/impl/scheduler.ipp + /usr/include/boost/asio/detail/concurrency_hint.hpp + /usr/include/boost/asio/detail/limits.hpp + /usr/include/boost/asio/detail/reactor.hpp + /usr/include/boost/asio/detail/epoll_reactor.hpp + /usr/include/boost/asio/detail/object_pool.hpp + /usr/include/boost/asio/detail/reactor_op.hpp + /usr/include/boost/asio/detail/operation.hpp + /usr/include/boost/asio/detail/select_interrupter.hpp + /usr/include/boost/asio/detail/eventfd_select_interrupter.hpp + /usr/include/boost/asio/detail/impl/eventfd_select_interrupter.ipp + /usr/include/sys/stat.h + /usr/include/bits/stat.h + /usr/include/bits/struct_stat.h + /usr/include/bits/statx.h + /usr/include/linux/stat.h + /usr/include/linux/types.h + /usr/include/asm/types.h + /usr/include/asm-generic/types.h + /usr/include/asm-generic/int-ll64.h + /usr/include/bits/statx-generic.h + /usr/include/bits/types/struct_statx_timestamp.h + /usr/include/bits/types/struct_statx.h + /usr/include/fcntl.h + /usr/include/bits/fcntl.h + /usr/include/bits/fcntl-linux.h + /usr/include/linux/falloc.h + /usr/include/sys/eventfd.h + /usr/include/bits/eventfd.h + /usr/include/boost/asio/detail/cstdint.hpp + /usr/include/boost/asio/detail/socket_types.hpp + /usr/include/sys/ioctl.h + /usr/include/bits/ioctls.h + /usr/include/asm/ioctls.h + /usr/include/asm-generic/ioctls.h + /usr/include/linux/ioctl.h + /usr/include/asm/ioctl.h + /usr/include/asm-generic/ioctl.h + /usr/include/bits/ioctl-types.h + /usr/include/sys/ttydefaults.h + /usr/include/poll.h + /usr/include/sys/poll.h + /usr/include/bits/poll.h + /usr/include/sys/uio.h + /usr/include/bits/uio-ext.h + /usr/include/sys/un.h + /usr/include/netinet/tcp.h + /usr/include/arpa/inet.h + /usr/include/net/if.h + /usr/include/boost/asio/detail/timer_queue_base.hpp + /usr/include/boost/asio/detail/timer_queue_set.hpp + /usr/include/boost/asio/detail/impl/timer_queue_set.ipp + /usr/include/boost/asio/detail/wait_op.hpp + /usr/include/sys/timerfd.h + /usr/include/bits/timerfd.h + /usr/include/boost/asio/detail/impl/epoll_reactor.hpp + /usr/include/boost/asio/detail/impl/epoll_reactor.ipp + /usr/include/sys/epoll.h + /usr/include/bits/epoll.h + /usr/include/boost/asio/detail/scheduler_thread_info.hpp + /usr/include/boost/asio/detail/signal_blocker.hpp + /usr/include/boost/asio/detail/posix_signal_blocker.hpp + /usr/include/c++/11/csignal + /usr/include/signal.h + /usr/include/bits/signum-generic.h + /usr/include/bits/signum-arch.h + /usr/include/bits/types/sig_atomic_t.h + /usr/include/bits/types/siginfo_t.h + /usr/include/bits/siginfo-arch.h + /usr/include/bits/siginfo-consts.h + /usr/include/bits/siginfo-consts-arch.h + /usr/include/bits/types/sigval_t.h + /usr/include/bits/sigevent-consts.h + /usr/include/bits/sigaction.h + /usr/include/bits/sigcontext.h + /usr/include/bits/types/stack_t.h + /usr/include/sys/ucontext.h + /usr/include/bits/sigstack.h + /usr/include/bits/ss_flags.h + /usr/include/bits/types/struct_sigstack.h + /usr/include/bits/sigthread.h + /usr/include/bits/signal_ext.h + /usr/include/boost/asio/detail/thread_group.hpp + /usr/include/boost/asio/impl/system_context.hpp + /usr/include/boost/asio/impl/system_context.ipp + /usr/include/boost/asio/detail/handler_cont_helpers.hpp + /usr/include/boost/asio/handler_continuation_hook.hpp + /usr/include/boost/asio/detail/chrono.hpp + /usr/include/boost/asio/impl/io_context.hpp + /usr/include/boost/asio/detail/completion_handler.hpp + /usr/include/boost/asio/detail/handler_work.hpp + /usr/include/boost/asio/executor_work_guard.hpp + /usr/include/boost/asio/impl/io_context.ipp + /usr/include/boost/asio/streambuf.hpp + /usr/include/boost/asio/basic_streambuf.hpp + /usr/include/boost/asio/basic_streambuf_fwd.hpp + /usr/include/boost/asio/buffer.hpp + /usr/include/boost/asio/detail/array_fwd.hpp + /usr/include/boost/asio/detail/string_view.hpp + /usr/include/c++/11/experimental/string_view + /usr/include/c++/11/bits/ranges_base.h + /usr/include/c++/11/experimental/bits/lfts_config.h + /usr/include/c++/11/experimental/bits/string_view.tcc + /usr/include/boost/asio/detail/is_buffer_sequence.hpp + /usr/include/boost/fusion/iterator/deref.hpp + /usr/include/boost/fusion/support/config.hpp + /usr/include/boost/fusion/support/iterator_base.hpp + /usr/include/boost/fusion/support/tag_of.hpp + /usr/include/boost/fusion/support/tag_of_fwd.hpp + /usr/include/boost/fusion/support/detail/is_mpl_sequence.hpp + /usr/include/boost/fusion/support/detail/is_native_fusion_sequence.hpp + /usr/include/boost/fusion/support/sequence_base.hpp + /usr/include/boost/mpl/begin_end_fwd.hpp + /usr/include/boost/mpl/is_sequence.hpp + /usr/include/boost/mpl/begin_end.hpp + /usr/include/boost/mpl/aux_/begin_end_impl.hpp + /usr/include/boost/mpl/sequence_tag_fwd.hpp + /usr/include/boost/mpl/aux_/has_begin.hpp + /usr/include/boost/mpl/aux_/traits_lambda_spec.hpp + /usr/include/boost/mpl/sequence_tag.hpp + /usr/include/boost/mpl/aux_/has_tag.hpp + /usr/include/boost/mpl/aux_/is_msvc_eti_arg.hpp + /usr/include/boost/config/no_tr1/utility.hpp + /usr/include/boost/process/detail/posix/io_context_ref.hpp + /usr/include/boost/fusion/algorithm/iteration/for_each.hpp + /usr/include/boost/fusion/algorithm/iteration/detail/for_each.hpp + /usr/include/boost/fusion/sequence/intrinsic/begin.hpp + /usr/include/boost/mpl/empty_base.hpp + /usr/include/boost/type_traits/is_empty.hpp + /usr/include/boost/fusion/sequence/intrinsic_fwd.hpp + /usr/include/boost/fusion/support/is_sequence.hpp + /usr/include/boost/fusion/support/is_segmented.hpp + /usr/include/boost/fusion/sequence/intrinsic/detail/segmented_begin.hpp + /usr/include/boost/fusion/sequence/intrinsic/detail/segmented_begin_impl.hpp + /usr/include/boost/fusion/container/list/cons_fwd.hpp + /usr/include/boost/fusion/sequence/intrinsic/detail/segmented_end_impl.hpp + /usr/include/boost/fusion/support/detail/segmented_fold_until_impl.hpp + /usr/include/boost/utility/result_of.hpp + /usr/include/boost/preprocessor/iteration/iterate.hpp + /usr/include/boost/preprocessor/slot/slot.hpp + /usr/include/boost/preprocessor/slot/detail/def.hpp + /usr/include/boost/preprocessor/repetition/enum_shifted_params.hpp + /usr/include/boost/preprocessor/facilities/intercept.hpp + /usr/include/boost/preprocessor/facilities/limits/intercept_256.hpp + /usr/include/boost/type_traits/type_identity.hpp + /usr/include/boost/preprocessor/iteration/detail/iter/forward1.hpp + /usr/include/boost/preprocessor/iteration/detail/bounds/lower1.hpp + /usr/include/boost/preprocessor/slot/detail/shared.hpp + /usr/include/boost/preprocessor/iteration/detail/bounds/upper1.hpp + /usr/include/boost/preprocessor/iteration/detail/iter/limits/forward1_256.hpp + /usr/include/boost/utility/detail/result_of_iterate.hpp + /usr/include/boost/fusion/support/void.hpp + /usr/include/boost/fusion/iterator/equal_to.hpp + /usr/include/boost/fusion/support/is_iterator.hpp + /usr/include/boost/type_traits/is_base_of.hpp + /usr/include/boost/fusion/iterator/next.hpp + /usr/include/boost/fusion/sequence/intrinsic/segments.hpp + /usr/include/boost/fusion/iterator/segmented_iterator.hpp + /usr/include/boost/fusion/iterator/detail/segmented_iterator.hpp + /usr/include/boost/fusion/iterator/iterator_facade.hpp + /usr/include/boost/fusion/iterator/detail/advance.hpp + /usr/include/boost/fusion/iterator/prior.hpp + /usr/include/boost/fusion/iterator/detail/distance.hpp + /usr/include/boost/fusion/support/category_of.hpp + /usr/include/boost/fusion/iterator/deref_data.hpp + /usr/include/boost/fusion/iterator/key_of.hpp + /usr/include/boost/fusion/iterator/value_of.hpp + /usr/include/boost/fusion/iterator/value_of_data.hpp + /usr/include/boost/fusion/iterator/detail/segmented_equal_to.hpp + /usr/include/boost/fusion/iterator/detail/segmented_next_impl.hpp + /usr/include/boost/fusion/container/list/cons.hpp + /usr/include/boost/fusion/support/detail/enabler.hpp + /usr/include/boost/fusion/support/detail/access.hpp + /usr/include/boost/fusion/sequence/intrinsic/end.hpp + /usr/include/boost/fusion/sequence/intrinsic/detail/segmented_end.hpp + /usr/include/boost/fusion/container/list/nil.hpp + /usr/include/boost/fusion/container/list/cons_iterator.hpp + /usr/include/boost/fusion/container/list/detail/deref_impl.hpp + /usr/include/boost/fusion/container/list/detail/next_impl.hpp + /usr/include/boost/fusion/container/list/detail/value_of_impl.hpp + /usr/include/boost/fusion/container/list/detail/equal_to_impl.hpp + /usr/include/boost/mpl/equal_to.hpp + /usr/include/boost/mpl/aux_/comparison_op.hpp + /usr/include/boost/mpl/aux_/numeric_op.hpp + /usr/include/boost/mpl/numeric_cast.hpp + /usr/include/boost/mpl/tag.hpp + /usr/include/boost/mpl/aux_/numeric_cast_utils.hpp + /usr/include/boost/mpl/aux_/config/forwarding.hpp + /usr/include/boost/mpl/aux_/msvc_eti_base.hpp + /usr/include/boost/mpl/aux_/preprocessed/gcc/equal_to.hpp + /usr/include/boost/fusion/container/list/list_fwd.hpp + /usr/include/boost/fusion/container/list/detail/begin_impl.hpp + /usr/include/boost/fusion/container/list/detail/end_impl.hpp + /usr/include/boost/fusion/container/list/detail/at_impl.hpp + /usr/include/boost/fusion/container/list/detail/value_at_impl.hpp + /usr/include/boost/fusion/container/list/detail/empty_impl.hpp + /usr/include/boost/fusion/view/iterator_range.hpp + /usr/include/boost/fusion/view/iterator_range/iterator_range.hpp + /usr/include/boost/fusion/iterator/distance.hpp + /usr/include/boost/fusion/iterator/mpl/convert_iterator.hpp + /usr/include/boost/fusion/view/iterator_range/detail/begin_impl.hpp + /usr/include/boost/fusion/view/iterator_range/detail/end_impl.hpp + /usr/include/boost/fusion/view/iterator_range/detail/at_impl.hpp + /usr/include/boost/fusion/iterator/advance.hpp + /usr/include/boost/fusion/view/iterator_range/detail/size_impl.hpp + /usr/include/boost/fusion/view/iterator_range/detail/value_at_impl.hpp + /usr/include/boost/fusion/view/iterator_range/detail/is_segmented_impl.hpp + /usr/include/boost/fusion/view/iterator_range/detail/segments_impl.hpp + /usr/include/boost/fusion/view/iterator_range/detail/segmented_iterator_range.hpp + /usr/include/boost/fusion/algorithm/transformation/push_back.hpp + /usr/include/boost/fusion/support/detail/as_fusion_element.hpp + /usr/include/boost/ref.hpp + /usr/include/boost/core/ref.hpp + /usr/include/boost/fusion/view/joint_view/joint_view.hpp + /usr/include/boost/fusion/view/joint_view/joint_view_fwd.hpp + /usr/include/boost/fusion/support/is_view.hpp + /usr/include/boost/fusion/sequence/intrinsic/size.hpp + /usr/include/boost/fusion/sequence/intrinsic/detail/segmented_size.hpp + /usr/include/boost/mpl/fold.hpp + /usr/include/boost/mpl/O1_size.hpp + /usr/include/boost/mpl/O1_size_fwd.hpp + /usr/include/boost/mpl/aux_/O1_size_impl.hpp + /usr/include/boost/mpl/long.hpp + /usr/include/boost/mpl/long_fwd.hpp + /usr/include/boost/mpl/aux_/has_size.hpp + /usr/include/boost/mpl/aux_/fold_impl.hpp + /usr/include/boost/mpl/deref.hpp + /usr/include/boost/mpl/aux_/msvc_type.hpp + /usr/include/boost/mpl/aux_/preprocessed/gcc/fold_impl.hpp + /usr/include/boost/mpl/plus.hpp + /usr/include/boost/mpl/aux_/arithmetic_op.hpp + /usr/include/boost/mpl/integral_c.hpp + /usr/include/boost/mpl/integral_c_fwd.hpp + /usr/include/boost/mpl/aux_/largest_int.hpp + /usr/include/boost/mpl/aux_/preprocessed/gcc/plus.hpp + /usr/include/boost/mpl/size_t.hpp + /usr/include/boost/mpl/size_t_fwd.hpp + /usr/include/boost/fusion/mpl/begin.hpp + /usr/include/boost/fusion/adapted/mpl/detail/begin_impl.hpp + /usr/include/boost/fusion/adapted/mpl/mpl_iterator.hpp + /usr/include/boost/fusion/support/detail/mpl_iterator_category.hpp + /usr/include/boost/mpl/prior.hpp + /usr/include/boost/mpl/advance.hpp + /usr/include/boost/mpl/advance_fwd.hpp + /usr/include/boost/mpl/less.hpp + /usr/include/boost/mpl/aux_/preprocessed/gcc/less.hpp + /usr/include/boost/mpl/negate.hpp + /usr/include/boost/mpl/aux_/advance_forward.hpp + /usr/include/boost/mpl/aux_/preprocessed/gcc/advance_forward.hpp + /usr/include/boost/mpl/aux_/advance_backward.hpp + /usr/include/boost/mpl/aux_/preprocessed/gcc/advance_backward.hpp + /usr/include/boost/mpl/distance.hpp + /usr/include/boost/mpl/distance_fwd.hpp + /usr/include/boost/mpl/iter_fold.hpp + /usr/include/boost/mpl/aux_/iter_fold_impl.hpp + /usr/include/boost/mpl/aux_/preprocessed/gcc/iter_fold_impl.hpp + /usr/include/boost/mpl/iterator_range.hpp + /usr/include/boost/mpl/begin.hpp + /usr/include/boost/fusion/iterator/mpl/fusion_iterator.hpp + /usr/include/boost/mpl/iterator_tags.hpp + /usr/include/boost/fusion/mpl/end.hpp + /usr/include/boost/fusion/adapted/mpl/detail/end_impl.hpp + /usr/include/boost/mpl/end.hpp + /usr/include/boost/fusion/view/joint_view/joint_view_iterator.hpp + /usr/include/boost/fusion/view/joint_view/detail/deref_impl.hpp + /usr/include/boost/fusion/iterator/detail/adapt_deref_traits.hpp + /usr/include/boost/fusion/view/joint_view/detail/next_impl.hpp + /usr/include/boost/fusion/view/joint_view/detail/value_of_impl.hpp + /usr/include/boost/fusion/iterator/detail/adapt_value_traits.hpp + /usr/include/boost/fusion/view/joint_view/detail/deref_data_impl.hpp + /usr/include/boost/fusion/view/joint_view/detail/value_of_data_impl.hpp + /usr/include/boost/fusion/view/joint_view/detail/key_of_impl.hpp + /usr/include/boost/fusion/view/joint_view/detail/begin_impl.hpp + /usr/include/boost/fusion/view/joint_view/detail/end_impl.hpp + /usr/include/boost/mpl/inherit.hpp + /usr/include/boost/mpl/aux_/preprocessed/gcc/inherit.hpp + /usr/include/boost/fusion/view/single_view/single_view.hpp + /usr/include/boost/fusion/view/single_view/single_view_iterator.hpp + /usr/include/boost/fusion/view/single_view/detail/deref_impl.hpp + /usr/include/boost/fusion/view/single_view/detail/next_impl.hpp + /usr/include/boost/fusion/view/single_view/detail/prior_impl.hpp + /usr/include/boost/fusion/view/single_view/detail/advance_impl.hpp + /usr/include/boost/fusion/view/single_view/detail/distance_impl.hpp + /usr/include/boost/mpl/minus.hpp + /usr/include/boost/mpl/aux_/preprocessed/gcc/minus.hpp + /usr/include/boost/fusion/view/single_view/detail/equal_to_impl.hpp + /usr/include/boost/fusion/view/single_view/detail/value_of_impl.hpp + /usr/include/boost/fusion/view/single_view/detail/at_impl.hpp + /usr/include/boost/fusion/view/single_view/detail/begin_impl.hpp + /usr/include/boost/fusion/view/single_view/detail/end_impl.hpp + /usr/include/boost/fusion/view/single_view/detail/size_impl.hpp + /usr/include/boost/fusion/view/single_view/detail/value_at_impl.hpp + /usr/include/boost/fusion/sequence/intrinsic/value_at.hpp + /usr/include/boost/fusion/algorithm/transformation/push_front.hpp + /usr/include/boost/fusion/container/list/detail/reverse_cons.hpp + /usr/include/boost/fusion/iterator/detail/segment_sequence.hpp + /usr/include/boost/fusion/sequence/intrinsic/empty.hpp + /usr/include/boost/fusion/algorithm/iteration/detail/segmented_for_each.hpp + /usr/include/boost/fusion/algorithm/iteration/for_each_fwd.hpp + /usr/include/boost/fusion/support/segmented_fold_until.hpp + /usr/include/boost/fusion/algorithm/transformation/filter_if.hpp + /usr/include/boost/fusion/view/filter_view/filter_view.hpp + /usr/include/boost/fusion/view/filter_view/filter_view_iterator.hpp + /usr/include/boost/fusion/algorithm/query/detail/find_if.hpp + /usr/include/boost/fusion/view/filter_view/detail/deref_impl.hpp + /usr/include/boost/fusion/view/filter_view/detail/next_impl.hpp + /usr/include/boost/fusion/view/filter_view/detail/value_of_impl.hpp + /usr/include/boost/fusion/view/filter_view/detail/equal_to_impl.hpp + /usr/include/boost/fusion/view/filter_view/detail/deref_data_impl.hpp + /usr/include/boost/fusion/view/filter_view/detail/value_of_data_impl.hpp + /usr/include/boost/fusion/view/filter_view/detail/key_of_impl.hpp + /usr/include/boost/fusion/view/filter_view/detail/begin_impl.hpp + /usr/include/boost/fusion/view/filter_view/detail/end_impl.hpp + /usr/include/boost/fusion/view/filter_view/detail/size_impl.hpp + /usr/include/boost/fusion/algorithm/transformation/transform.hpp + /usr/include/boost/fusion/view/transform_view/transform_view.hpp + /usr/include/boost/fusion/view/transform_view/transform_view_iterator.hpp + /usr/include/boost/fusion/view/transform_view/detail/deref_impl.hpp + /usr/include/boost/fusion/view/transform_view/detail/next_impl.hpp + /usr/include/boost/fusion/view/transform_view/detail/prior_impl.hpp + /usr/include/boost/fusion/view/transform_view/detail/value_of_impl.hpp + /usr/include/boost/fusion/view/transform_view/detail/advance_impl.hpp + /usr/include/boost/fusion/view/transform_view/detail/distance_impl.hpp + /usr/include/boost/fusion/view/transform_view/detail/equal_to_impl.hpp + /usr/include/boost/fusion/view/transform_view/transform_view_fwd.hpp + /usr/include/boost/fusion/view/transform_view/detail/begin_impl.hpp + /usr/include/boost/fusion/view/transform_view/detail/end_impl.hpp + /usr/include/boost/fusion/view/transform_view/detail/at_impl.hpp + /usr/include/boost/fusion/sequence/intrinsic/at.hpp + /usr/include/boost/fusion/view/transform_view/detail/value_at_impl.hpp + /usr/include/boost/fusion/view/detail/strictest_traversal.hpp + /usr/include/boost/fusion/mpl.hpp + /usr/include/boost/fusion/iterator/mpl.hpp + /usr/include/boost/fusion/adapted/mpl.hpp + /usr/include/boost/fusion/adapted/mpl/detail/is_sequence_impl.hpp + /usr/include/boost/fusion/adapted/mpl/detail/size_impl.hpp + /usr/include/boost/mpl/size.hpp + /usr/include/boost/mpl/size_fwd.hpp + /usr/include/boost/mpl/aux_/size_impl.hpp + /usr/include/boost/fusion/adapted/mpl/detail/value_at_impl.hpp + /usr/include/boost/mpl/at.hpp + /usr/include/boost/mpl/at_fwd.hpp + /usr/include/boost/mpl/aux_/at_impl.hpp + /usr/include/boost/fusion/adapted/mpl/detail/at_impl.hpp + /usr/include/boost/fusion/adapted/mpl/detail/has_key_impl.hpp + /usr/include/boost/mpl/has_key.hpp + /usr/include/boost/mpl/has_key_fwd.hpp + /usr/include/boost/mpl/aux_/has_key_impl.hpp + /usr/include/boost/fusion/adapted/mpl/detail/category_of_impl.hpp + /usr/include/boost/fusion/adapted/mpl/detail/is_view_impl.hpp + /usr/include/boost/fusion/adapted/mpl/detail/empty_impl.hpp + /usr/include/boost/mpl/empty.hpp + /usr/include/boost/mpl/empty_fwd.hpp + /usr/include/boost/mpl/aux_/empty_impl.hpp + /usr/include/boost/fusion/mpl/at.hpp + /usr/include/boost/fusion/mpl/back.hpp + /usr/include/boost/mpl/back.hpp + /usr/include/boost/mpl/back_fwd.hpp + /usr/include/boost/mpl/aux_/back_impl.hpp + /usr/include/boost/fusion/mpl/clear.hpp + /usr/include/boost/mpl/clear.hpp + /usr/include/boost/mpl/clear_fwd.hpp + /usr/include/boost/mpl/aux_/clear_impl.hpp + /usr/include/boost/fusion/mpl/detail/clear.hpp + /usr/include/boost/fusion/container/vector/vector_fwd.hpp + /usr/include/boost/fusion/container/vector/detail/config.hpp + /usr/include/boost/fusion/container/map/map_fwd.hpp + /usr/include/boost/fusion/container/set/set_fwd.hpp + /usr/include/boost/fusion/container/deque/deque_fwd.hpp + /usr/include/boost/fusion/mpl/empty.hpp + /usr/include/boost/fusion/mpl/erase.hpp + /usr/include/boost/mpl/erase.hpp + /usr/include/boost/mpl/erase_fwd.hpp + /usr/include/boost/mpl/aux_/erase_impl.hpp + /usr/include/boost/mpl/push_front.hpp + /usr/include/boost/mpl/push_front_fwd.hpp + /usr/include/boost/mpl/aux_/push_front_impl.hpp + /usr/include/boost/mpl/reverse_fold.hpp + /usr/include/boost/mpl/aux_/reverse_fold_impl.hpp + /usr/include/boost/mpl/aux_/preprocessed/gcc/reverse_fold_impl.hpp + /usr/include/boost/fusion/algorithm/transformation/erase.hpp + /usr/include/boost/fusion/sequence/convert.hpp + /usr/include/boost/fusion/mpl/erase_key.hpp + /usr/include/boost/mpl/erase_key.hpp + /usr/include/boost/mpl/erase_key_fwd.hpp + /usr/include/boost/mpl/aux_/erase_key_impl.hpp + /usr/include/boost/fusion/algorithm/transformation/erase_key.hpp + /usr/include/boost/fusion/algorithm/query/find.hpp + /usr/include/boost/fusion/algorithm/query/find_if_fwd.hpp + /usr/include/boost/fusion/algorithm/query/detail/segmented_find.hpp + /usr/include/boost/fusion/algorithm/query/find_fwd.hpp + /usr/include/boost/fusion/mpl/front.hpp + /usr/include/boost/mpl/front.hpp + /usr/include/boost/mpl/front_fwd.hpp + /usr/include/boost/mpl/aux_/front_impl.hpp + /usr/include/boost/fusion/mpl/has_key.hpp + /usr/include/boost/fusion/sequence/intrinsic/has_key.hpp + /usr/include/boost/fusion/mpl/insert.hpp + /usr/include/boost/mpl/insert.hpp + /usr/include/boost/mpl/insert_fwd.hpp + /usr/include/boost/mpl/aux_/insert_impl.hpp + /usr/include/boost/fusion/algorithm/transformation/insert.hpp + /usr/include/boost/fusion/mpl/insert_range.hpp + /usr/include/boost/mpl/insert_range.hpp + /usr/include/boost/mpl/insert_range_fwd.hpp + /usr/include/boost/mpl/aux_/insert_range_impl.hpp + /usr/include/boost/mpl/joint_view.hpp + /usr/include/boost/mpl/aux_/joint_iter.hpp + /usr/include/boost/mpl/aux_/lambda_spec.hpp + /usr/include/boost/mpl/aux_/iter_push_front.hpp + /usr/include/boost/type_traits/same_traits.hpp + /usr/include/boost/fusion/algorithm/transformation/insert_range.hpp + /usr/include/boost/fusion/mpl/pop_back.hpp + /usr/include/boost/mpl/pop_back.hpp + /usr/include/boost/mpl/pop_back_fwd.hpp + /usr/include/boost/mpl/aux_/pop_back_impl.hpp + /usr/include/boost/fusion/algorithm/transformation/pop_back.hpp + /usr/include/boost/fusion/iterator/iterator_adapter.hpp + /usr/include/boost/fusion/mpl/pop_front.hpp + /usr/include/boost/mpl/pop_front.hpp + /usr/include/boost/mpl/pop_front_fwd.hpp + /usr/include/boost/mpl/aux_/pop_front_impl.hpp + /usr/include/boost/fusion/algorithm/transformation/pop_front.hpp + /usr/include/boost/fusion/mpl/push_back.hpp + /usr/include/boost/mpl/push_back.hpp + /usr/include/boost/mpl/push_back_fwd.hpp + /usr/include/boost/mpl/aux_/push_back_impl.hpp + /usr/include/boost/fusion/mpl/push_front.hpp + /usr/include/boost/fusion/mpl/size.hpp + /usr/include/boost/fusion/algorithm/iteration/fold.hpp + /usr/include/boost/fusion/algorithm/iteration/fold_fwd.hpp + /usr/include/boost/fusion/algorithm/iteration/detail/preprocessed/fold.hpp + /usr/include/boost/fusion/algorithm/iteration/detail/segmented_fold.hpp + /usr/include/boost/fusion/container/vector/vector10.hpp + /usr/include/boost/fusion/container/vector/vector.hpp + /usr/include/boost/fusion/support/detail/and.hpp + /usr/include/boost/fusion/support/detail/index_sequence.hpp + /usr/include/boost/fusion/container/vector/detail/at_impl.hpp + /usr/include/boost/fusion/container/vector/detail/value_at_impl.hpp + /usr/include/boost/fusion/container/vector/detail/begin_impl.hpp + /usr/include/boost/fusion/container/vector/vector_iterator.hpp + /usr/include/boost/fusion/container/vector/detail/deref_impl.hpp + /usr/include/boost/fusion/container/vector/detail/value_of_impl.hpp + /usr/include/boost/fusion/container/vector/detail/next_impl.hpp + /usr/include/boost/fusion/container/vector/detail/prior_impl.hpp + /usr/include/boost/fusion/container/vector/detail/equal_to_impl.hpp + /usr/include/boost/fusion/container/vector/detail/distance_impl.hpp + /usr/include/boost/fusion/container/vector/detail/advance_impl.hpp + /usr/include/boost/fusion/container/vector/detail/end_impl.hpp + /usr/include/boost/fusion/view/transform_view.hpp + /usr/include/boost/fusion/container/vector/convert.hpp + /usr/include/boost/fusion/container/vector/detail/as_vector.hpp + /usr/include/boost/fusion/container/vector/detail/convert_impl.hpp + /usr/include/boost/process/detail/posix/sigchld_service.hpp + /usr/include/boost/asio/dispatch.hpp + /usr/include/boost/asio/impl/dispatch.hpp + /usr/include/boost/asio/detail/work_dispatcher.hpp + /usr/include/boost/asio/post.hpp + /usr/include/boost/asio/impl/post.hpp + /usr/include/boost/asio/signal_set.hpp + /usr/include/boost/asio/basic_signal_set.hpp + /usr/include/boost/asio/any_io_executor.hpp + /usr/include/boost/asio/detail/io_object_impl.hpp + /usr/include/boost/asio/detail/signal_set_service.hpp + /usr/include/boost/asio/detail/signal_handler.hpp + /usr/include/boost/asio/detail/signal_op.hpp + /usr/include/boost/asio/detail/impl/signal_set_service.ipp + /usr/include/boost/asio/detail/static_mutex.hpp + /usr/include/boost/asio/detail/posix_static_mutex.hpp + /usr/include/boost/asio/strand.hpp + /usr/include/boost/asio/detail/strand_executor_service.hpp + /usr/include/boost/asio/detail/impl/strand_executor_service.hpp + /usr/include/boost/asio/defer.hpp + /usr/include/boost/asio/impl/defer.hpp + /usr/include/boost/asio/detail/impl/strand_executor_service.ipp + /usr/include/boost/asio/io_context_strand.hpp + /usr/include/boost/asio/detail/strand_service.hpp + /usr/include/boost/asio/detail/impl/strand_service.hpp + /usr/include/boost/asio/detail/impl/strand_service.ipp + /usr/include/boost/optional.hpp + /usr/include/boost/optional/optional.hpp + /usr/include/boost/core/explicit_operator_bool.hpp + /usr/include/boost/core/swap.hpp + /usr/include/boost/optional/bad_optional_access.hpp + /usr/include/boost/type.hpp + /usr/include/boost/type_traits/alignment_of.hpp + /usr/include/boost/type_traits/has_nothrow_constructor.hpp + /usr/include/boost/type_traits/is_default_constructible.hpp + /usr/include/boost/type_traits/type_with_alignment.hpp + /usr/include/boost/type_traits/is_constructible.hpp + /usr/include/boost/type_traits/is_destructible.hpp + /usr/include/boost/type_traits/is_nothrow_move_assignable.hpp + /usr/include/boost/type_traits/has_trivial_move_assign.hpp + /usr/include/boost/type_traits/is_assignable.hpp + /usr/include/boost/type_traits/has_nothrow_assign.hpp + /usr/include/boost/type_traits/enable_if.hpp + /usr/include/boost/type_traits/is_nothrow_move_constructible.hpp + /usr/include/boost/move/utility.hpp + /usr/include/boost/move/detail/config_begin.hpp + /usr/include/boost/move/detail/workaround.hpp + /usr/include/boost/move/utility_core.hpp + /usr/include/boost/move/core.hpp + /usr/include/boost/move/detail/config_end.hpp + /usr/include/boost/move/detail/meta_utils.hpp + /usr/include/boost/move/detail/meta_utils_core.hpp + /usr/include/boost/move/traits.hpp + /usr/include/boost/move/detail/type_traits.hpp + /usr/include/boost/utility/compare_pointees.hpp + /usr/include/boost/optional/optional_fwd.hpp + /usr/include/boost/optional/detail/optional_config.hpp + /usr/include/boost/optional/detail/optional_factory_support.hpp + /usr/include/boost/optional/detail/optional_aligned_storage.hpp + /usr/include/boost/optional/detail/optional_trivially_copyable_base.hpp + /usr/include/boost/optional/detail/optional_reference_spec.hpp + /usr/include/boost/optional/detail/optional_relops.hpp + /usr/include/boost/optional/detail/optional_swap.hpp + /usr/include/sys/wait.h + /usr/include/boost/process/detail/posix/is_running.hpp + /usr/include/boost/process/detail/posix/child_handle.hpp + /usr/include/boost/process/detail/posix/async_in.hpp + /usr/include/boost/asio/write.hpp + /usr/include/boost/asio/impl/write.hpp + /usr/include/boost/asio/completion_condition.hpp + /usr/include/boost/asio/detail/base_from_completion_cond.hpp + /usr/include/boost/asio/detail/consuming_buffers.hpp + /usr/include/boost/asio/detail/buffer_sequence_adapter.hpp + /usr/include/boost/asio/detail/impl/buffer_sequence_adapter.ipp + /usr/include/boost/asio/detail/dependent_type.hpp + /usr/include/boost/process/async_pipe.hpp + /usr/include/boost/process/detail/posix/async_pipe.hpp + /usr/include/boost/process/detail/posix/basic_pipe.hpp + /usr/include/boost/filesystem.hpp + /usr/include/boost/filesystem/exception.hpp + /usr/include/boost/smart_ptr/intrusive_ptr.hpp + /usr/include/boost/smart_ptr/detail/sp_convertible.hpp + /usr/include/boost/smart_ptr/detail/sp_nullptr_t.hpp + /usr/include/boost/smart_ptr/detail/sp_noexcept.hpp + /usr/include/boost/config/no_tr1/functional.hpp + /usr/include/boost/smart_ptr/detail/operator_bool.hpp + /usr/include/boost/smart_ptr/intrusive_ref_counter.hpp + /usr/include/boost/smart_ptr/detail/atomic_count.hpp + /usr/include/boost/smart_ptr/detail/sp_has_gcc_intrinsics.hpp + /usr/include/boost/smart_ptr/detail/sp_has_sync_intrinsics.hpp + /usr/include/boost/smart_ptr/detail/atomic_count_gcc_atomic.hpp + /usr/include/boost/filesystem/directory.hpp + /usr/include/boost/filesystem/file_status.hpp + /usr/include/boost/detail/bitmask.hpp + /usr/include/boost/core/scoped_enum.hpp + /usr/include/boost/filesystem/operations.hpp + /usr/include/boost/filesystem/convenience.hpp + /usr/include/boost/filesystem/string_file.hpp + /usr/include/boost/filesystem/fstream.hpp + /usr/include/c++/11/fstream + /usr/include/c++/11/istream + /usr/include/c++/11/bits/istream.tcc + /usr/include/c++/11/x86_64-redhat-linux/bits/basic_file.h + /usr/include/c++/11/x86_64-redhat-linux/bits/c++io.h + /usr/include/c++/11/bits/fstream.tcc + /usr/include/boost/process/detail/posix/compare_handles.hpp + /usr/include/boost/asio/posix/stream_descriptor.hpp + /usr/include/boost/asio/posix/basic_stream_descriptor.hpp + /usr/include/boost/asio/posix/descriptor.hpp + /usr/include/boost/asio/posix/basic_descriptor.hpp + /usr/include/boost/asio/detail/reactive_descriptor_service.hpp + /usr/include/boost/asio/detail/descriptor_ops.hpp + /usr/include/boost/asio/detail/impl/descriptor_ops.ipp + /usr/include/boost/asio/detail/descriptor_read_op.hpp + /usr/include/boost/asio/detail/descriptor_write_op.hpp + /usr/include/boost/asio/detail/reactive_null_buffers_op.hpp + /usr/include/boost/asio/detail/reactive_wait_op.hpp + /usr/include/boost/asio/posix/descriptor_base.hpp + /usr/include/boost/asio/detail/io_control.hpp + /usr/include/boost/asio/detail/socket_option.hpp + /usr/include/boost/asio/detail/impl/reactive_descriptor_service.ipp + /usr/include/boost/process/detail/used_handles.hpp + /usr/include/boost/fusion/include/filter_if.hpp + /usr/include/boost/fusion/include/for_each.hpp + /usr/include/boost/process/detail/posix/handles.hpp + /usr/include/dirent.h + /usr/include/bits/dirent.h + /usr/include/bits/dirent_ext.h + /usr/include/boost/process/detail/posix/asio_fwd.hpp + /usr/include/boost/asio/ts/netfwd.hpp + /usr/include/boost/asio/detail/date_time_fwd.hpp + /usr/include/boost/process/detail/posix/async_out.hpp + /usr/include/boost/asio/read.hpp + /usr/include/boost/asio/impl/read.hpp + /usr/include/boost/process/async_system.hpp + /usr/include/boost/process/child.hpp + /usr/include/boost/process/detail/child_decl.hpp + /usr/include/boost/process/detail/posix/terminate.hpp + /usr/include/boost/process/detail/posix/wait_for_exit.hpp + /usr/include/boost/process/detail/execute_impl.hpp + /usr/include/boost/process/detail/posix/executor.hpp + /usr/include/boost/process/error.hpp + /usr/include/boost/fusion/algorithm/query/find_if.hpp + /usr/include/boost/fusion/algorithm/query/detail/segmented_find_if.hpp + /usr/include/boost/fusion/sequence/comparison/equal_to.hpp + /usr/include/boost/fusion/sequence/comparison/detail/equal_to.hpp + /usr/include/boost/fusion/support/as_const.hpp + /usr/include/boost/fusion/sequence/comparison/enable_comparison.hpp + /usr/include/boost/fusion/container/set/convert.hpp + /usr/include/boost/fusion/container/set/detail/as_set.hpp + /usr/include/boost/fusion/container/set/set.hpp + /usr/include/boost/fusion/support/detail/is_same_size.hpp + /usr/include/boost/fusion/container/set/detail/begin_impl.hpp + /usr/include/boost/fusion/iterator/basic_iterator.hpp + /usr/include/boost/fusion/container/set/detail/end_impl.hpp + /usr/include/boost/fusion/container/set/detail/value_of_impl.hpp + /usr/include/boost/fusion/container/set/detail/deref_data_impl.hpp + /usr/include/boost/fusion/container/set/detail/deref_impl.hpp + /usr/include/boost/fusion/container/set/detail/key_of_impl.hpp + /usr/include/boost/fusion/container/set/detail/value_of_data_impl.hpp + /usr/include/boost/fusion/container/set/detail/convert_impl.hpp + /usr/include/boost/type_index.hpp + /usr/include/boost/type_index/stl_type_index.hpp + /usr/include/boost/type_index/type_index_facade.hpp + /usr/include/boost/core/demangle.hpp + /usr/include/c++/11/cxxabi.h + /usr/include/c++/11/x86_64-redhat-linux/bits/cxxabi_tweaks.h + /usr/include/boost/process/pipe.hpp + /usr/include/boost/process/detail/posix/use_vfork.hpp + /usr/include/boost/algorithm/string/predicate.hpp + /usr/include/boost/algorithm/string/find.hpp + /usr/include/boost/algorithm/string/detail/predicate.hpp + /usr/include/boost/algorithm/string/split.hpp + /usr/include/boost/algorithm/string/iter_find.hpp + /usr/include/boost/iterator/transform_iterator.hpp + /usr/include/boost/algorithm/string/find_iterator.hpp + /usr/include/boost/algorithm/string/detail/find_iterator.hpp + /usr/include/boost/function.hpp + /usr/include/boost/preprocessor/iterate.hpp + /usr/include/boost/function/detail/prologue.hpp + /usr/include/boost/function/function_base.hpp + /usr/include/boost/integer.hpp + /usr/include/boost/integer_fwd.hpp + /usr/include/boost/integer_traits.hpp + /usr/include/boost/type_traits/has_trivial_copy.hpp + /usr/include/boost/type_traits/is_copy_constructible.hpp + /usr/include/boost/type_traits/has_trivial_destructor.hpp + /usr/include/boost/type_traits/composite_traits.hpp + /usr/include/boost/type_traits/is_union.hpp + /usr/include/boost/function_equal.hpp + /usr/include/boost/function/function_fwd.hpp + /usr/include/boost/mem_fn.hpp + /usr/include/boost/bind/mem_fn.hpp + /usr/include/boost/get_pointer.hpp + /usr/include/boost/config/no_tr1/memory.hpp + /usr/include/boost/bind/mem_fn_template.hpp + /usr/include/boost/bind/mem_fn_cc.hpp + /usr/include/boost/preprocessor/enum.hpp + /usr/include/boost/preprocessor/repetition/enum.hpp + /usr/include/boost/preprocessor/enum_params.hpp + /usr/include/boost/function/detail/function_iterate.hpp + /usr/include/boost/function/detail/maybe_include.hpp + /usr/include/boost/function/function_template.hpp + /usr/include/boost/core/no_exceptions_support.hpp + /usr/include/boost/process/detail/handler.hpp + /usr/include/boost/fusion/view.hpp + /usr/include/boost/fusion/view/filter_view.hpp + /usr/include/boost/fusion/view/joint_view.hpp + /usr/include/boost/fusion/view/nview.hpp + /usr/include/boost/fusion/view/nview/nview.hpp + /usr/include/boost/fusion/container/vector.hpp + /usr/include/boost/fusion/view/nview/detail/nview_impl.hpp + /usr/include/boost/fusion/view/nview/nview_iterator.hpp + /usr/include/boost/fusion/view/nview/detail/size_impl.hpp + /usr/include/boost/fusion/view/nview/detail/begin_impl.hpp + /usr/include/boost/fusion/view/nview/detail/end_impl.hpp + /usr/include/boost/fusion/view/nview/detail/deref_impl.hpp + /usr/include/boost/fusion/view/nview/detail/value_of_impl.hpp + /usr/include/boost/fusion/view/nview/detail/next_impl.hpp + /usr/include/boost/fusion/view/nview/detail/prior_impl.hpp + /usr/include/boost/fusion/view/nview/detail/at_impl.hpp + /usr/include/boost/fusion/view/nview/detail/value_at_impl.hpp + /usr/include/boost/fusion/view/nview/detail/advance_impl.hpp + /usr/include/boost/fusion/view/nview/detail/distance_impl.hpp + /usr/include/boost/fusion/view/nview/detail/equal_to_impl.hpp + /usr/include/boost/fusion/view/single_view.hpp + /usr/include/boost/fusion/view/reverse_view.hpp + /usr/include/boost/fusion/view/reverse_view/reverse_view.hpp + /usr/include/boost/fusion/view/reverse_view/reverse_view_iterator.hpp + /usr/include/boost/fusion/view/reverse_view/detail/deref_impl.hpp + /usr/include/boost/fusion/view/reverse_view/detail/next_impl.hpp + /usr/include/boost/fusion/view/reverse_view/detail/prior_impl.hpp + /usr/include/boost/fusion/view/reverse_view/detail/advance_impl.hpp + /usr/include/boost/fusion/view/reverse_view/detail/distance_impl.hpp + /usr/include/boost/fusion/view/reverse_view/detail/value_of_impl.hpp + /usr/include/boost/fusion/view/reverse_view/detail/deref_data_impl.hpp + /usr/include/boost/fusion/view/reverse_view/detail/value_of_data_impl.hpp + /usr/include/boost/fusion/view/reverse_view/detail/key_of_impl.hpp + /usr/include/boost/fusion/view/reverse_view/detail/begin_impl.hpp + /usr/include/boost/fusion/view/reverse_view/detail/end_impl.hpp + /usr/include/boost/fusion/view/reverse_view/detail/at_impl.hpp + /usr/include/boost/fusion/view/reverse_view/detail/value_at_impl.hpp + /usr/include/boost/fusion/view/zip_view.hpp + /usr/include/boost/fusion/view/zip_view/zip_view.hpp + /usr/include/boost/fusion/support/unused.hpp + /usr/include/boost/fusion/view/zip_view/detail/begin_impl.hpp + /usr/include/boost/fusion/view/zip_view/zip_view_iterator_fwd.hpp + /usr/include/boost/fusion/view/zip_view/detail/end_impl.hpp + /usr/include/boost/fusion/sequence/intrinsic/front.hpp + /usr/include/boost/mpl/min.hpp + /usr/include/boost/mpl/min_max.hpp + /usr/include/boost/fusion/view/zip_view/detail/size_impl.hpp + /usr/include/boost/fusion/view/zip_view/detail/at_impl.hpp + /usr/include/boost/fusion/view/zip_view/detail/value_at_impl.hpp + /usr/include/boost/fusion/algorithm/transformation/remove.hpp + /usr/include/boost/mpl/transform_view.hpp + /usr/include/boost/mpl/aux_/transform_iter.hpp + /usr/include/boost/mpl/find_if.hpp + /usr/include/boost/mpl/aux_/find_if_pred.hpp + /usr/include/boost/mpl/aux_/iter_apply.hpp + /usr/include/boost/mpl/iter_fold_if.hpp + /usr/include/boost/mpl/pair.hpp + /usr/include/boost/mpl/aux_/iter_fold_if_impl.hpp + /usr/include/boost/mpl/aux_/preprocessed/gcc/iter_fold_if_impl.hpp + /usr/include/boost/fusion/view/zip_view/zip_view_iterator.hpp + /usr/include/boost/fusion/view/zip_view/detail/deref_impl.hpp + /usr/include/boost/fusion/view/zip_view/detail/next_impl.hpp + /usr/include/boost/fusion/view/zip_view/detail/prior_impl.hpp + /usr/include/boost/fusion/view/zip_view/detail/advance_impl.hpp + /usr/include/boost/fusion/view/zip_view/detail/distance_impl.hpp + /usr/include/boost/fusion/view/zip_view/detail/value_of_impl.hpp + /usr/include/boost/fusion/view/zip_view/detail/equal_to_impl.hpp + /usr/include/boost/mpl/zip_view.hpp + /usr/include/boost/mpl/transform.hpp + /usr/include/boost/mpl/pair_view.hpp + /usr/include/boost/mpl/iterator_category.hpp + /usr/include/boost/mpl/aux_/inserter_algorithm.hpp + /usr/include/boost/mpl/back_inserter.hpp + /usr/include/boost/mpl/inserter.hpp + /usr/include/boost/mpl/front_inserter.hpp + /usr/include/boost/mpl/vector.hpp + /usr/include/boost/mpl/limits/vector.hpp + /usr/include/boost/mpl/vector/vector20.hpp + /usr/include/boost/mpl/vector/vector10.hpp + /usr/include/boost/mpl/vector/vector0.hpp + /usr/include/boost/mpl/vector/aux_/at.hpp + /usr/include/boost/mpl/vector/aux_/tag.hpp + /usr/include/boost/mpl/aux_/config/typeof.hpp + /usr/include/boost/mpl/vector/aux_/front.hpp + /usr/include/boost/mpl/vector/aux_/push_front.hpp + /usr/include/boost/mpl/vector/aux_/item.hpp + /usr/include/boost/mpl/vector/aux_/pop_front.hpp + /usr/include/boost/mpl/vector/aux_/push_back.hpp + /usr/include/boost/mpl/vector/aux_/pop_back.hpp + /usr/include/boost/mpl/vector/aux_/back.hpp + /usr/include/boost/mpl/vector/aux_/clear.hpp + /usr/include/boost/mpl/vector/aux_/vector0.hpp + /usr/include/boost/mpl/vector/aux_/iterator.hpp + /usr/include/boost/mpl/vector/aux_/O1_size.hpp + /usr/include/boost/mpl/vector/aux_/size.hpp + /usr/include/boost/mpl/vector/aux_/empty.hpp + /usr/include/boost/mpl/vector/aux_/begin_end.hpp + /usr/include/boost/mpl/vector/aux_/include_preprocessed.hpp + /usr/include/boost/mpl/vector/aux_/preprocessed/typeof_based/vector10.hpp + /usr/include/boost/mpl/vector/aux_/preprocessed/typeof_based/vector20.hpp + /usr/include/boost/mpl/aux_/preprocessed/gcc/vector.hpp + /usr/include/boost/mpl/unpack_args.hpp + /usr/include/boost/mpl/aux_/preprocessed/gcc/unpack_args.hpp + /usr/include/boost/fusion/view/flatten_view.hpp + /usr/include/boost/fusion/view/flatten_view/flatten_view.hpp + /usr/include/boost/mpl/single_view.hpp + /usr/include/boost/mpl/aux_/single_element_iter.hpp + /usr/include/boost/fusion/view/flatten_view/flatten_view_iterator.hpp + /usr/include/boost/fusion/include/equal_to.hpp + /usr/include/boost/fusion/container.hpp + /usr/include/boost/fusion/container/list.hpp + /usr/include/boost/fusion/container/list/list.hpp + /usr/include/boost/fusion/container/list/detail/list_to_cons.hpp + /usr/include/boost/fusion/container/list/convert.hpp + /usr/include/boost/fusion/container/list/detail/build_cons.hpp + /usr/include/boost/fusion/container/list/detail/convert_impl.hpp + /usr/include/boost/fusion/container/map.hpp + /usr/include/boost/fusion/container/map/map.hpp + /usr/include/boost/fusion/support/pair.hpp + /usr/include/boost/fusion/container/map/detail/map_impl.hpp + /usr/include/boost/fusion/container/map/detail/begin_impl.hpp + /usr/include/boost/fusion/container/map/map_iterator.hpp + /usr/include/boost/utility/declval.hpp + /usr/include/boost/fusion/container/map/detail/end_impl.hpp + /usr/include/boost/fusion/container/map/detail/at_impl.hpp + /usr/include/boost/fusion/container/map/detail/at_key_impl.hpp + /usr/include/boost/fusion/container/map/detail/value_at_impl.hpp + /usr/include/boost/fusion/container/map/detail/value_at_key_impl.hpp + /usr/include/boost/fusion/sequence/intrinsic/at_c.hpp + /usr/include/boost/fusion/container/map/convert.hpp + /usr/include/boost/fusion/container/map/detail/build_map.hpp + /usr/include/boost/fusion/container/set.hpp + /usr/include/boost/fusion/container/deque.hpp + /usr/include/boost/fusion/container/deque/deque.hpp + /usr/include/boost/fusion/container/deque/detail/keyed_element.hpp + /usr/include/boost/fusion/container/deque/detail/deque_keyed_values.hpp + /usr/include/boost/fusion/container/deque/detail/value_at_impl.hpp + /usr/include/boost/fusion/container/deque/detail/at_impl.hpp + /usr/include/boost/fusion/container/deque/detail/begin_impl.hpp + /usr/include/boost/fusion/container/deque/deque_iterator.hpp + /usr/include/boost/fusion/container/deque/detail/end_impl.hpp + /usr/include/boost/fusion/container/deque/detail/is_sequence_impl.hpp + /usr/include/boost/fusion/container/deque/convert.hpp + /usr/include/boost/fusion/container/deque/detail/convert_impl.hpp + /usr/include/boost/fusion/container/deque/detail/build_deque.hpp + /usr/include/boost/fusion/container/deque/front_extended_deque.hpp + /usr/include/boost/fusion/container/generation.hpp + /usr/include/boost/fusion/container/generation/make_deque.hpp + /usr/include/boost/fusion/container/generation/deque_tie.hpp + /usr/include/boost/fusion/container/generation/cons_tie.hpp + /usr/include/boost/fusion/container/generation/ignore.hpp + /usr/include/boost/fusion/container/generation/list_tie.hpp + /usr/include/boost/fusion/container/generation/make_cons.hpp + /usr/include/boost/fusion/container/generation/make_list.hpp + /usr/include/boost/fusion/container/generation/make_map.hpp + /usr/include/boost/fusion/container/generation/map_tie.hpp + /usr/include/boost/fusion/container/generation/make_vector.hpp + /usr/include/boost/fusion/container/generation/vector_tie.hpp + /usr/include/boost/fusion/container/generation/make_set.hpp + /usr/include/boost/fusion/sequence.hpp + /usr/include/boost/fusion/sequence/sequence_facade.hpp + /usr/include/boost/fusion/sequence/comparison.hpp + /usr/include/boost/fusion/sequence/comparison/greater.hpp + /usr/include/boost/fusion/sequence/comparison/less.hpp + /usr/include/boost/fusion/sequence/comparison/detail/less.hpp + /usr/include/boost/fusion/sequence/comparison/greater_equal.hpp + /usr/include/boost/fusion/sequence/comparison/less_equal.hpp + /usr/include/boost/fusion/sequence/comparison/not_equal_to.hpp + /usr/include/boost/fusion/sequence/intrinsic.hpp + /usr/include/boost/fusion/sequence/intrinsic/back.hpp + /usr/include/boost/fusion/sequence/intrinsic/at_key.hpp + /usr/include/boost/fusion/sequence/intrinsic/value_at_key.hpp + /usr/include/boost/fusion/sequence/intrinsic/swap.hpp + /usr/include/boost/fusion/sequence/io.hpp + /usr/include/boost/fusion/sequence/io/in.hpp + /usr/include/boost/fusion/sequence/io/detail/in.hpp + /usr/include/boost/fusion/sequence/io/detail/manip.hpp + /usr/include/boost/fusion/sequence/io/out.hpp + /usr/include/boost/fusion/sequence/io/detail/out.hpp + /usr/include/boost/fusion/tuple.hpp + /usr/include/boost/fusion/tuple/tuple.hpp + /usr/include/boost/fusion/tuple/tuple_fwd.hpp + /usr/include/boost/fusion/tuple/make_tuple.hpp + /usr/include/boost/fusion/tuple/tuple_tie.hpp + /usr/include/boost/fusion/adapted/std_tuple.hpp + /usr/include/boost/fusion/adapted/std_tuple/detail/is_view_impl.hpp + /usr/include/boost/fusion/adapted/std_tuple/detail/is_sequence_impl.hpp + /usr/include/boost/fusion/adapted/std_tuple/detail/category_of_impl.hpp + /usr/include/boost/fusion/adapted/std_tuple/detail/begin_impl.hpp + /usr/include/boost/fusion/adapted/std_tuple/std_tuple_iterator.hpp + /usr/include/boost/fusion/adapted/std_tuple/detail/end_impl.hpp + /usr/include/boost/fusion/adapted/std_tuple/detail/size_impl.hpp + /usr/include/boost/fusion/adapted/std_tuple/detail/at_impl.hpp + /usr/include/boost/fusion/adapted/std_tuple/detail/value_at_impl.hpp + /usr/include/boost/fusion/adapted/std_tuple/detail/convert_impl.hpp + /usr/include/boost/fusion/adapted/std_tuple/detail/build_std_tuple.hpp + /usr/include/boost/fusion/adapted/std_tuple/tag_of.hpp + /usr/include/boost/fusion/adapted/std_tuple/mpl/clear.hpp + /usr/include/boost/process/posix.hpp + /usr/include/boost/process/detail/posix/fd.hpp + /usr/include/boost/process/detail/posix/signal.hpp + /usr/include/boost/process/detail/async_handler.hpp + /usr/include/boost/process/group.hpp + /usr/include/boost/process/detail/posix/group_handle.hpp + /usr/include/boost/process/detail/posix/group_ref.hpp + /usr/include/boost/process/detail/posix/wait_group.hpp + /usr/include/boost/process/cmd.hpp + /usr/include/boost/winapi/config.hpp + /usr/include/boost/predef/version_number.h + /usr/include/boost/predef/platform.h + /usr/include/boost/predef/platform/android.h + /usr/include/boost/predef/make.h + /usr/include/boost/predef/detail/test.h + /usr/include/boost/predef/platform/cloudabi.h + /usr/include/boost/predef/platform/mingw.h + /usr/include/boost/predef/platform/mingw32.h + /usr/include/boost/predef/platform/mingw64.h + /usr/include/boost/predef/platform/windows_uwp.h + /usr/include/boost/predef/os/windows.h + /usr/include/boost/predef/platform/windows_desktop.h + /usr/include/boost/predef/platform/windows_phone.h + /usr/include/boost/predef/platform/windows_server.h + /usr/include/boost/predef/platform/windows_store.h + /usr/include/boost/predef/platform/windows_system.h + /usr/include/boost/predef/platform/windows_runtime.h + /usr/include/boost/predef/platform/ios.h + /usr/include/boost/predef/os/ios.h + /usr/include/boost/process/env.hpp + /usr/include/boost/process/environment.hpp + /usr/include/boost/algorithm/string/case_conv.hpp + /usr/include/boost/algorithm/string/detail/case_conv.hpp + /usr/include/boost/process/detail/posix/environment.hpp + /usr/include/c++/11/unordered_map + /usr/include/c++/11/bits/hashtable.h + /usr/include/c++/11/bits/hashtable_policy.h + /usr/include/c++/11/bits/unordered_map.h + /usr/include/boost/process/detail/posix/env_init.hpp + /usr/include/boost/process/exe.hpp + /usr/include/boost/process/handles.hpp + /usr/include/boost/process/io.hpp + /usr/include/boost/process/detail/posix/close_in.hpp + /usr/include/boost/process/detail/posix/close_out.hpp + /usr/include/boost/process/detail/posix/null_in.hpp + /usr/include/boost/process/detail/posix/file_descriptor.hpp + /usr/include/boost/process/detail/posix/null_out.hpp + /usr/include/boost/process/detail/posix/file_in.hpp + /usr/include/boost/process/detail/posix/file_out.hpp + /usr/include/boost/process/detail/posix/pipe_in.hpp + /usr/include/boost/process/detail/posix/pipe_out.hpp + /usr/include/boost/process/search_path.hpp + /usr/include/boost/process/detail/posix/search_path.hpp + /usr/include/boost/tokenizer.hpp + /usr/include/boost/token_iterator.hpp + /usr/include/boost/iterator/minimum_category.hpp + /usr/include/boost/token_functions.hpp + /usr/include/c++/11/stdlib.h + /usr/include/boost/process/spawn.hpp + /usr/include/boost/process/system.hpp + /usr/include/boost/process/start_dir.hpp + /usr/include/boost/process/detail/posix/start_dir.hpp + /usr/include/boost/asio.hpp + /usr/include/boost/asio/awaitable.hpp + /usr/include/boost/asio/basic_datagram_socket.hpp + /usr/include/boost/asio/basic_socket.hpp + /usr/include/boost/asio/socket_base.hpp + /usr/include/boost/asio/detail/reactive_socket_service.hpp + /usr/include/boost/asio/detail/reactive_socket_accept_op.hpp + /usr/include/boost/asio/detail/socket_holder.hpp + /usr/include/boost/asio/detail/socket_ops.hpp + /usr/include/boost/asio/detail/impl/socket_ops.ipp + /usr/include/boost/asio/detail/reactive_socket_connect_op.hpp + /usr/include/boost/asio/detail/reactive_socket_recvfrom_op.hpp + /usr/include/boost/asio/detail/reactive_socket_sendto_op.hpp + /usr/include/boost/asio/detail/reactive_socket_service_base.hpp + /usr/include/boost/asio/detail/reactive_socket_recv_op.hpp + /usr/include/boost/asio/detail/reactive_socket_recvmsg_op.hpp + /usr/include/boost/asio/detail/reactive_socket_send_op.hpp + /usr/include/boost/asio/detail/impl/reactive_socket_service_base.ipp + /usr/include/boost/asio/basic_deadline_timer.hpp + /usr/include/boost/asio/detail/deadline_timer_service.hpp + /usr/include/boost/asio/detail/timer_queue.hpp + /usr/include/boost/asio/detail/timer_queue_ptime.hpp + /usr/include/boost/asio/time_traits.hpp + /usr/include/boost/date_time/posix_time/posix_time_types.hpp + /usr/include/boost/date_time/time_clock.hpp + /usr/include/boost/date_time/c_time.hpp + /usr/include/boost/date_time/compiler_config.hpp + /usr/include/boost/date_time/locale_config.hpp + /usr/include/sys/time.h + /usr/include/boost/shared_ptr.hpp + /usr/include/boost/smart_ptr/shared_ptr.hpp + /usr/include/boost/smart_ptr/detail/shared_count.hpp + /usr/include/boost/smart_ptr/bad_weak_ptr.hpp + /usr/include/boost/smart_ptr/detail/sp_counted_base.hpp + /usr/include/boost/smart_ptr/detail/sp_counted_base_gcc_atomic.hpp + /usr/include/boost/smart_ptr/detail/sp_typeinfo_.hpp + /usr/include/boost/smart_ptr/detail/sp_counted_impl.hpp + /usr/include/boost/checked_delete.hpp + /usr/include/boost/smart_ptr/detail/sp_disable_deprecated.hpp + /usr/include/boost/smart_ptr/detail/spinlock_pool.hpp + /usr/include/boost/smart_ptr/detail/spinlock.hpp + /usr/include/boost/smart_ptr/detail/spinlock_gcc_atomic.hpp + /usr/include/boost/smart_ptr/detail/yield_k.hpp + /usr/include/boost/smart_ptr/detail/sp_thread_pause.hpp + /usr/include/boost/smart_ptr/detail/sp_thread_sleep.hpp + /usr/include/boost/config/pragma_message.hpp + /usr/include/boost/smart_ptr/detail/local_sp_deleter.hpp + /usr/include/boost/smart_ptr/detail/local_counted_base.hpp + /usr/include/boost/date_time/microsec_time_clock.hpp + /usr/include/boost/date_time/posix_time/ptime.hpp + /usr/include/boost/date_time/posix_time/posix_time_system.hpp + /usr/include/boost/date_time/posix_time/posix_time_config.hpp + /usr/include/boost/config/no_tr1/cmath.hpp + /usr/include/c++/11/cmath + /usr/include/math.h + /usr/include/bits/math-vector.h + /usr/include/bits/libm-simd-decl-stubs.h + /usr/include/bits/flt-eval-method.h + /usr/include/bits/fp-logb.h + /usr/include/bits/fp-fast.h + /usr/include/bits/mathcalls-helper-functions.h + /usr/include/bits/mathcalls.h + /usr/include/bits/mathcalls-narrow.h + /usr/include/bits/iscanonical.h + /usr/include/boost/date_time/time_duration.hpp + /usr/include/boost/date_time/special_defs.hpp + /usr/include/boost/date_time/time_defs.hpp + /usr/include/boost/operators.hpp + /usr/include/boost/date_time/time_resolution_traits.hpp + /usr/include/boost/date_time/int_adapter.hpp + /usr/include/boost/date_time/gregorian/gregorian_types.hpp + /usr/include/boost/date_time/date.hpp + /usr/include/boost/date_time/year_month_day.hpp + /usr/include/boost/date_time/period.hpp + /usr/include/boost/date_time/gregorian/greg_calendar.hpp + /usr/include/boost/date_time/gregorian/greg_weekday.hpp + /usr/include/boost/date_time/constrained_value.hpp + /usr/include/boost/date_time/date_defs.hpp + /usr/include/boost/date_time/gregorian/greg_day_of_year.hpp + /usr/include/boost/date_time/gregorian_calendar.hpp + /usr/include/boost/date_time/gregorian_calendar.ipp + /usr/include/boost/date_time/gregorian/greg_ymd.hpp + /usr/include/boost/date_time/gregorian/greg_day.hpp + /usr/include/boost/date_time/gregorian/greg_year.hpp + /usr/include/boost/date_time/gregorian/greg_month.hpp + /usr/include/boost/date_time/gregorian/greg_duration.hpp + /usr/include/boost/date_time/date_duration.hpp + /usr/include/boost/date_time/date_duration_types.hpp + /usr/include/boost/date_time/gregorian/greg_duration_types.hpp + /usr/include/boost/date_time/gregorian/greg_date.hpp + /usr/include/boost/date_time/adjust_functors.hpp + /usr/include/boost/date_time/wrapping_int.hpp + /usr/include/boost/date_time/date_generators.hpp + /usr/include/c++/11/sstream + /usr/include/c++/11/bits/sstream.tcc + /usr/include/boost/date_time/date_clock_device.hpp + /usr/include/boost/date_time/date_iterator.hpp + /usr/include/boost/date_time/time_system_split.hpp + /usr/include/boost/date_time/time_system_counted.hpp + /usr/include/boost/date_time/time.hpp + /usr/include/boost/date_time/posix_time/date_duration_operators.hpp + /usr/include/boost/date_time/posix_time/posix_time_duration.hpp + /usr/include/boost/numeric/conversion/cast.hpp + /usr/include/boost/numeric/conversion/converter.hpp + /usr/include/boost/numeric/conversion/conversion_traits.hpp + /usr/include/boost/numeric/conversion/detail/conversion_traits.hpp + /usr/include/boost/numeric/conversion/detail/meta.hpp + /usr/include/boost/numeric/conversion/detail/int_float_mixture.hpp + /usr/include/boost/numeric/conversion/int_float_mixture_enum.hpp + /usr/include/boost/numeric/conversion/detail/sign_mixture.hpp + /usr/include/boost/numeric/conversion/sign_mixture_enum.hpp + /usr/include/boost/numeric/conversion/detail/udt_builtin_mixture.hpp + /usr/include/boost/numeric/conversion/udt_builtin_mixture_enum.hpp + /usr/include/boost/numeric/conversion/detail/is_subranged.hpp + /usr/include/boost/mpl/multiplies.hpp + /usr/include/boost/mpl/times.hpp + /usr/include/boost/mpl/aux_/preprocessed/gcc/times.hpp + /usr/include/boost/numeric/conversion/converter_policies.hpp + /usr/include/boost/numeric/conversion/detail/converter.hpp + /usr/include/boost/numeric/conversion/bounds.hpp + /usr/include/boost/numeric/conversion/detail/bounds.hpp + /usr/include/boost/numeric/conversion/numeric_cast_traits.hpp + /usr/include/boost/numeric/conversion/detail/numeric_cast_traits.hpp + /usr/include/boost/numeric/conversion/detail/preprocessed/numeric_cast_traits_common.hpp + /usr/include/boost/numeric/conversion/detail/preprocessed/numeric_cast_traits_long_long.hpp + /usr/include/boost/date_time/posix_time/time_period.hpp + /usr/include/boost/date_time/time_iterator.hpp + /usr/include/boost/date_time/dst_rules.hpp + /usr/include/boost/asio/detail/impl/timer_queue_ptime.ipp + /usr/include/boost/asio/detail/timer_scheduler.hpp + /usr/include/boost/asio/detail/timer_scheduler_fwd.hpp + /usr/include/boost/asio/detail/wait_handler.hpp + /usr/include/boost/asio/basic_io_object.hpp + /usr/include/boost/asio/basic_raw_socket.hpp + /usr/include/boost/asio/basic_seq_packet_socket.hpp + /usr/include/boost/asio/basic_serial_port.hpp + /usr/include/boost/asio/serial_port_base.hpp + /usr/include/termios.h + /usr/include/bits/termios.h + /usr/include/bits/termios-struct.h + /usr/include/bits/termios-c_cc.h + /usr/include/bits/termios-c_iflag.h + /usr/include/bits/termios-c_oflag.h + /usr/include/bits/termios-baud.h + /usr/include/bits/termios-c_cflag.h + /usr/include/bits/termios-c_lflag.h + /usr/include/bits/termios-tcflow.h + /usr/include/bits/termios-misc.h + /usr/include/boost/asio/impl/serial_port_base.hpp + /usr/include/boost/asio/impl/serial_port_base.ipp + /usr/include/boost/asio/detail/reactive_serial_port_service.hpp + /usr/include/boost/asio/detail/impl/reactive_serial_port_service.ipp + /usr/include/boost/asio/basic_socket_acceptor.hpp + /usr/include/boost/asio/basic_socket_iostream.hpp + /usr/include/boost/asio/basic_socket_streambuf.hpp + /usr/include/boost/asio/basic_stream_socket.hpp + /usr/include/boost/asio/steady_timer.hpp + /usr/include/boost/asio/basic_waitable_timer.hpp + /usr/include/boost/asio/detail/chrono_time_traits.hpp + /usr/include/boost/asio/wait_traits.hpp + /usr/include/boost/asio/bind_executor.hpp + /usr/include/boost/asio/uses_executor.hpp + /usr/include/boost/asio/buffered_read_stream_fwd.hpp + /usr/include/boost/asio/buffered_read_stream.hpp + /usr/include/boost/asio/detail/buffer_resize_guard.hpp + /usr/include/boost/asio/detail/buffered_stream_storage.hpp + /usr/include/boost/asio/impl/buffered_read_stream.hpp + /usr/include/boost/asio/buffered_stream_fwd.hpp + /usr/include/boost/asio/buffered_stream.hpp + /usr/include/boost/asio/buffered_write_stream.hpp + /usr/include/boost/asio/buffered_write_stream_fwd.hpp + /usr/include/boost/asio/impl/buffered_write_stream.hpp + /usr/include/boost/asio/buffers_iterator.hpp + /usr/include/boost/asio/co_spawn.hpp + /usr/include/boost/asio/compose.hpp + /usr/include/boost/asio/impl/compose.hpp + /usr/include/boost/asio/connect.hpp + /usr/include/boost/asio/impl/connect.hpp + /usr/include/boost/asio/coroutine.hpp + /usr/include/boost/asio/deadline_timer.hpp + /usr/include/boost/asio/detached.hpp + /usr/include/boost/asio/impl/detached.hpp + /usr/include/boost/asio/executor.hpp + /usr/include/boost/asio/impl/executor.hpp + /usr/include/boost/asio/impl/executor.ipp + /usr/include/boost/asio/generic/basic_endpoint.hpp + /usr/include/boost/asio/generic/detail/endpoint.hpp + /usr/include/boost/asio/generic/detail/impl/endpoint.ipp + /usr/include/boost/asio/generic/datagram_protocol.hpp + /usr/include/boost/asio/generic/raw_protocol.hpp + /usr/include/boost/asio/generic/seq_packet_protocol.hpp + /usr/include/boost/asio/generic/stream_protocol.hpp + /usr/include/boost/asio/high_resolution_timer.hpp + /usr/include/boost/asio/io_service.hpp + /usr/include/boost/asio/io_service_strand.hpp + /usr/include/boost/asio/ip/address.hpp + /usr/include/boost/asio/ip/address_v4.hpp + /usr/include/boost/asio/detail/array.hpp + /usr/include/boost/asio/detail/winsock_init.hpp + /usr/include/boost/asio/ip/impl/address_v4.hpp + /usr/include/boost/asio/ip/impl/address_v4.ipp + /usr/include/boost/asio/ip/address_v6.hpp + /usr/include/boost/asio/ip/impl/address_v6.hpp + /usr/include/boost/asio/ip/impl/address_v6.ipp + /usr/include/boost/asio/ip/bad_address_cast.hpp + /usr/include/boost/asio/ip/impl/address.hpp + /usr/include/boost/asio/ip/impl/address.ipp + /usr/include/boost/asio/ip/address_v4_iterator.hpp + /usr/include/boost/asio/ip/address_v4_range.hpp + /usr/include/boost/asio/ip/address_v6_iterator.hpp + /usr/include/boost/asio/ip/address_v6_range.hpp + /usr/include/boost/asio/ip/network_v4.hpp + /usr/include/boost/asio/ip/impl/network_v4.hpp + /usr/include/boost/asio/ip/impl/network_v4.ipp + /usr/include/boost/asio/ip/network_v6.hpp + /usr/include/boost/asio/ip/impl/network_v6.hpp + /usr/include/boost/asio/ip/impl/network_v6.ipp + /usr/include/boost/asio/ip/basic_endpoint.hpp + /usr/include/boost/asio/ip/detail/endpoint.hpp + /usr/include/boost/asio/ip/detail/impl/endpoint.ipp + /usr/include/boost/asio/ip/impl/basic_endpoint.hpp + /usr/include/boost/asio/ip/basic_resolver.hpp + /usr/include/boost/asio/ip/basic_resolver_iterator.hpp + /usr/include/boost/asio/ip/basic_resolver_entry.hpp + /usr/include/boost/asio/ip/basic_resolver_query.hpp + /usr/include/boost/asio/ip/resolver_query_base.hpp + /usr/include/boost/asio/ip/resolver_base.hpp + /usr/include/boost/asio/ip/basic_resolver_results.hpp + /usr/include/boost/asio/detail/resolver_service.hpp + /usr/include/boost/asio/detail/resolve_endpoint_op.hpp + /usr/include/boost/asio/detail/resolve_op.hpp + /usr/include/boost/asio/detail/resolve_query_op.hpp + /usr/include/boost/asio/detail/resolver_service_base.hpp + /usr/include/boost/asio/detail/impl/resolver_service_base.ipp + /usr/include/boost/asio/ip/host_name.hpp + /usr/include/boost/asio/ip/impl/host_name.ipp + /usr/include/boost/asio/ip/icmp.hpp + /usr/include/boost/asio/ip/multicast.hpp + /usr/include/boost/asio/ip/detail/socket_option.hpp + /usr/include/boost/asio/ip/tcp.hpp + /usr/include/boost/asio/ip/udp.hpp + /usr/include/boost/asio/ip/unicast.hpp + /usr/include/boost/asio/ip/v6_only.hpp + /usr/include/boost/asio/is_read_buffered.hpp + /usr/include/boost/asio/is_write_buffered.hpp + /usr/include/boost/asio/local/basic_endpoint.hpp + /usr/include/boost/asio/local/detail/endpoint.hpp + /usr/include/boost/asio/local/detail/impl/endpoint.ipp + /usr/include/boost/asio/local/connect_pair.hpp + /usr/include/boost/asio/local/datagram_protocol.hpp + /usr/include/boost/asio/local/stream_protocol.hpp + /usr/include/boost/asio/packaged_task.hpp + /usr/include/boost/asio/detail/future.hpp + /usr/include/boost/asio/placeholders.hpp + /usr/include/boost/bind/arg.hpp + /usr/include/boost/is_placeholder.hpp + /usr/include/boost/asio/read_at.hpp + /usr/include/boost/asio/impl/read_at.hpp + /usr/include/boost/asio/read_until.hpp + /usr/include/boost/asio/detail/regex_fwd.hpp + /usr/include/boost/regex_fwd.hpp + /usr/include/boost/regex/config.hpp + /usr/include/boost/regex/user.hpp + /usr/include/boost/predef.h + /usr/include/boost/predef/language.h + /usr/include/boost/predef/language/stdc.h + /usr/include/boost/predef/language/stdcpp.h + /usr/include/boost/predef/language/objc.h + /usr/include/boost/predef/language/cuda.h + /usr/include/boost/predef/architecture.h + /usr/include/boost/predef/architecture/alpha.h + /usr/include/boost/predef/architecture/arm.h + /usr/include/boost/predef/architecture/blackfin.h + /usr/include/boost/predef/architecture/convex.h + /usr/include/boost/predef/architecture/ia64.h + /usr/include/boost/predef/architecture/m68k.h + /usr/include/boost/predef/architecture/mips.h + /usr/include/boost/predef/architecture/parisc.h + /usr/include/boost/predef/architecture/ppc.h + /usr/include/boost/predef/architecture/ptx.h + /usr/include/boost/predef/architecture/pyramid.h + /usr/include/boost/predef/architecture/riscv.h + /usr/include/boost/predef/architecture/rs6k.h + /usr/include/boost/predef/architecture/sparc.h + /usr/include/boost/predef/architecture/superh.h + /usr/include/boost/predef/architecture/sys370.h + /usr/include/boost/predef/architecture/sys390.h + /usr/include/boost/predef/architecture/x86.h + /usr/include/boost/predef/architecture/x86/32.h + /usr/include/boost/predef/architecture/x86/64.h + /usr/include/boost/predef/architecture/z.h + /usr/include/boost/predef/compiler.h + /usr/include/boost/predef/compiler/borland.h + /usr/include/boost/predef/compiler/clang.h + /usr/include/boost/predef/compiler/comeau.h + /usr/include/boost/predef/compiler/compaq.h + /usr/include/boost/predef/compiler/diab.h + /usr/include/boost/predef/compiler/digitalmars.h + /usr/include/boost/predef/compiler/dignus.h + /usr/include/boost/predef/compiler/edg.h + /usr/include/boost/predef/compiler/ekopath.h + /usr/include/boost/predef/compiler/gcc_xml.h + /usr/include/boost/predef/compiler/gcc.h + /usr/include/boost/predef/detail/comp_detected.h + /usr/include/boost/predef/compiler/greenhills.h + /usr/include/boost/predef/compiler/hp_acc.h + /usr/include/boost/predef/compiler/iar.h + /usr/include/boost/predef/compiler/ibm.h + /usr/include/boost/predef/compiler/intel.h + /usr/include/boost/predef/compiler/kai.h + /usr/include/boost/predef/compiler/llvm.h + /usr/include/boost/predef/compiler/metaware.h + /usr/include/boost/predef/compiler/metrowerks.h + /usr/include/boost/predef/compiler/microtec.h + /usr/include/boost/predef/compiler/mpw.h + /usr/include/boost/predef/compiler/nvcc.h + /usr/include/boost/predef/compiler/palm.h + /usr/include/boost/predef/compiler/pgi.h + /usr/include/boost/predef/compiler/sgi_mipspro.h + /usr/include/boost/predef/compiler/sunpro.h + /usr/include/boost/predef/compiler/tendra.h + /usr/include/boost/predef/compiler/visualc.h + /usr/include/boost/predef/compiler/watcom.h + /usr/include/boost/predef/library.h + /usr/include/boost/predef/library/c.h + /usr/include/boost/predef/library/c/_prefix.h + /usr/include/boost/predef/detail/_cassert.h + /usr/include/boost/predef/library/c/cloudabi.h + /usr/include/boost/predef/library/c/gnu.h + /usr/include/boost/predef/library/c/uc.h + /usr/include/boost/predef/library/c/vms.h + /usr/include/boost/predef/library/c/zos.h + /usr/include/boost/predef/library/std.h + /usr/include/boost/predef/library/std/_prefix.h + /usr/include/boost/predef/detail/_exception.h + /usr/include/boost/predef/library/std/cxx.h + /usr/include/boost/predef/library/std/dinkumware.h + /usr/include/boost/predef/library/std/libcomo.h + /usr/include/boost/predef/library/std/modena.h + /usr/include/boost/predef/library/std/msl.h + /usr/include/boost/predef/library/std/roguewave.h + /usr/include/boost/predef/library/std/sgi.h + /usr/include/boost/predef/library/std/stdcpp3.h + /usr/include/boost/predef/library/std/stlport.h + /usr/include/boost/predef/library/std/vacpp.h + /usr/include/boost/predef/os.h + /usr/include/boost/predef/os/aix.h + /usr/include/boost/predef/os/amigaos.h + /usr/include/boost/predef/os/beos.h + /usr/include/boost/predef/os/bsd.h + /usr/include/boost/predef/os/macos.h + /usr/include/boost/predef/os/bsd/bsdi.h + /usr/include/boost/predef/os/bsd/dragonfly.h + /usr/include/boost/predef/os/bsd/free.h + /usr/include/boost/predef/os/bsd/open.h + /usr/include/boost/predef/os/bsd/net.h + /usr/include/boost/predef/os/cygwin.h + /usr/include/boost/predef/os/haiku.h + /usr/include/boost/predef/os/hpux.h + /usr/include/boost/predef/os/irix.h + /usr/include/boost/predef/os/linux.h + /usr/include/boost/predef/detail/os_detected.h + /usr/include/boost/predef/os/os400.h + /usr/include/boost/predef/os/qnxnto.h + /usr/include/boost/predef/os/solaris.h + /usr/include/boost/predef/os/unix.h + /usr/include/boost/predef/os/vms.h + /usr/include/boost/predef/other.h + /usr/include/boost/predef/other/endian.h + /usr/include/boost/predef/hardware.h + /usr/include/boost/predef/hardware/simd.h + /usr/include/boost/predef/hardware/simd/x86.h + /usr/include/boost/predef/hardware/simd/x86/versions.h + /usr/include/boost/predef/hardware/simd/x86_amd.h + /usr/include/boost/predef/hardware/simd/x86_amd/versions.h + /usr/include/boost/predef/hardware/simd/arm.h + /usr/include/boost/predef/hardware/simd/arm/versions.h + /usr/include/boost/predef/hardware/simd/ppc.h + /usr/include/boost/predef/hardware/simd/ppc/versions.h + /usr/include/boost/predef/version.h + /usr/include/boost/regex/config/cwchar.hpp + /usr/include/boost/regex/v4/regex_fwd.hpp + /usr/include/boost/regex/v4/match_flags.hpp + /usr/include/boost/asio/impl/read_until.hpp + /usr/include/boost/asio/redirect_error.hpp + /usr/include/boost/asio/impl/redirect_error.hpp + /usr/include/boost/asio/require_concept.hpp + /usr/include/boost/asio/traits/require_concept_member.hpp + /usr/include/boost/asio/traits/require_concept_free.hpp + /usr/include/boost/asio/traits/static_require_concept.hpp + /usr/include/boost/asio/serial_port.hpp + /usr/include/boost/asio/static_thread_pool.hpp + /usr/include/boost/asio/thread_pool.hpp + /usr/include/boost/asio/impl/thread_pool.hpp + /usr/include/boost/asio/detail/blocking_executor_op.hpp + /usr/include/boost/asio/detail/bulk_executor_op.hpp + /usr/include/boost/asio/impl/thread_pool.ipp + /usr/include/boost/asio/system_timer.hpp + /usr/include/boost/asio/this_coro.hpp + /usr/include/boost/asio/use_awaitable.hpp + /usr/include/boost/asio/use_future.hpp + /usr/include/boost/asio/impl/use_future.hpp + /usr/include/boost/asio/version.hpp + /usr/include/boost/asio/windows/basic_object_handle.hpp + /usr/include/boost/asio/windows/basic_overlapped_handle.hpp + /usr/include/boost/asio/windows/basic_random_access_handle.hpp + /usr/include/boost/asio/windows/basic_stream_handle.hpp + /usr/include/boost/asio/windows/object_handle.hpp + /usr/include/boost/asio/windows/overlapped_handle.hpp + /usr/include/boost/asio/windows/overlapped_ptr.hpp + /usr/include/boost/asio/windows/random_access_handle.hpp + /usr/include/boost/asio/windows/stream_handle.hpp + /usr/include/boost/asio/write_at.hpp + /usr/include/boost/asio/impl/write_at.hpp + /usr/include/c++/11/iostream + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/ProcessIoService.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/SimpleTimer.h + /usr/include/c++/11/thread + /usr/include/c++/11/bits/this_thread_sleep.h + +CMakeFiles/lspcpp.dir/src/lsp/ProtocolJsonHandler.cpp.o + /usr/local/src/asymptote-2.78/LspCpp/src/lsp/ProtocolJsonHandler.cpp + /usr/include/stdc-predef.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/ProtocolJsonHandler.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/JsonRpc/MessageJsonHandler.h + /usr/include/c++/11/string + /usr/include/c++/11/x86_64-redhat-linux/bits/c++config.h + /usr/include/bits/wordsize.h + /usr/include/c++/11/x86_64-redhat-linux/bits/os_defines.h + /usr/include/features.h + /usr/include/sys/cdefs.h + /usr/include/bits/long-double.h + /usr/include/gnu/stubs.h + /usr/include/gnu/stubs-64.h + /usr/include/c++/11/x86_64-redhat-linux/bits/cpu_defines.h + /usr/include/c++/11/bits/stringfwd.h + /usr/include/c++/11/bits/memoryfwd.h + /usr/include/c++/11/bits/char_traits.h + /usr/include/c++/11/bits/stl_algobase.h + /usr/include/c++/11/bits/functexcept.h + /usr/include/c++/11/bits/exception_defines.h + /usr/include/c++/11/bits/cpp_type_traits.h + /usr/include/c++/11/ext/type_traits.h + /usr/include/c++/11/ext/numeric_traits.h + /usr/include/c++/11/bits/stl_pair.h + /usr/include/c++/11/bits/move.h + /usr/include/c++/11/type_traits + /usr/include/c++/11/bits/stl_iterator_base_types.h + /usr/include/c++/11/bits/stl_iterator_base_funcs.h + /usr/include/c++/11/bits/concept_check.h + /usr/include/c++/11/debug/assertions.h + /usr/include/c++/11/bits/stl_iterator.h + /usr/include/c++/11/bits/ptr_traits.h + /usr/include/c++/11/debug/debug.h + /usr/include/c++/11/bits/predefined_ops.h + /usr/include/c++/11/bits/postypes.h + /usr/include/c++/11/cwchar + /usr/include/wchar.h + /usr/include/bits/libc-header-start.h + /usr/include/bits/floatn.h + /usr/include/bits/floatn-common.h + /usr/lib/gcc/x86_64-redhat-linux/11/include/stddef.h + /usr/lib/gcc/x86_64-redhat-linux/11/include/stdarg.h + /usr/include/bits/wchar.h + /usr/include/bits/types/wint_t.h + /usr/include/bits/types/mbstate_t.h + /usr/include/bits/types/__mbstate_t.h + /usr/include/bits/types/__FILE.h + /usr/include/bits/types/FILE.h + /usr/include/bits/types/locale_t.h + /usr/include/bits/types/__locale_t.h + /usr/include/c++/11/cstdint + /usr/lib/gcc/x86_64-redhat-linux/11/include/stdint.h + /usr/include/stdint.h + /usr/include/bits/types.h + /usr/include/bits/timesize.h + /usr/include/bits/typesizes.h + /usr/include/bits/time64.h + /usr/include/bits/stdint-intn.h + /usr/include/bits/stdint-uintn.h + /usr/include/c++/11/bits/allocator.h + /usr/include/c++/11/x86_64-redhat-linux/bits/c++allocator.h + /usr/include/c++/11/ext/new_allocator.h + /usr/include/c++/11/new + /usr/include/c++/11/bits/exception.h + /usr/include/c++/11/bits/localefwd.h + /usr/include/c++/11/x86_64-redhat-linux/bits/c++locale.h + /usr/include/c++/11/clocale + /usr/include/locale.h + /usr/include/bits/locale.h + /usr/include/c++/11/iosfwd + /usr/include/c++/11/cctype + /usr/include/ctype.h + /usr/include/bits/endian.h + /usr/include/bits/endianness.h + /usr/include/c++/11/bits/ostream_insert.h + /usr/include/c++/11/bits/cxxabi_forced.h + /usr/include/c++/11/bits/stl_function.h + /usr/include/c++/11/backward/binders.h + /usr/include/c++/11/bits/range_access.h + /usr/include/c++/11/initializer_list + /usr/include/c++/11/bits/basic_string.h + /usr/include/c++/11/ext/atomicity.h + /usr/include/c++/11/x86_64-redhat-linux/bits/gthr.h + /usr/include/c++/11/x86_64-redhat-linux/bits/gthr-default.h + /usr/include/pthread.h + /usr/include/sched.h + /usr/include/bits/types/time_t.h + /usr/include/bits/types/struct_timespec.h + /usr/include/bits/sched.h + /usr/include/bits/types/struct_sched_param.h + /usr/include/bits/cpu-set.h + /usr/include/time.h + /usr/include/bits/time.h + /usr/include/bits/timex.h + /usr/include/bits/types/struct_timeval.h + /usr/include/bits/types/clock_t.h + /usr/include/bits/types/struct_tm.h + /usr/include/bits/types/clockid_t.h + /usr/include/bits/types/timer_t.h + /usr/include/bits/types/struct_itimerspec.h + /usr/include/bits/pthreadtypes.h + /usr/include/bits/thread-shared-types.h + /usr/include/bits/pthreadtypes-arch.h + /usr/include/bits/struct_mutex.h + /usr/include/bits/struct_rwlock.h + /usr/include/bits/setjmp.h + /usr/include/bits/types/__sigset_t.h + /usr/include/bits/types/struct___jmp_buf_tag.h + /usr/include/c++/11/x86_64-redhat-linux/bits/atomic_word.h + /usr/include/sys/single_threaded.h + /usr/include/c++/11/ext/alloc_traits.h + /usr/include/c++/11/bits/alloc_traits.h + /usr/include/c++/11/bits/stl_construct.h + /usr/include/c++/11/ext/string_conversions.h + /usr/include/c++/11/cstdlib + /usr/include/stdlib.h + /usr/include/bits/waitflags.h + /usr/include/bits/waitstatus.h + /usr/include/sys/types.h + /usr/include/endian.h + /usr/include/bits/byteswap.h + /usr/include/bits/uintn-identity.h + /usr/include/sys/select.h + /usr/include/bits/select.h + /usr/include/bits/types/sigset_t.h + /usr/include/alloca.h + /usr/include/bits/stdlib-bsearch.h + /usr/include/bits/stdlib-float.h + /usr/include/c++/11/bits/std_abs.h + /usr/include/c++/11/cstdio + /usr/include/stdio.h + /usr/include/bits/types/__fpos_t.h + /usr/include/bits/types/__fpos64_t.h + /usr/include/bits/types/struct_FILE.h + /usr/include/bits/types/cookie_io_functions_t.h + /usr/include/bits/stdio_lim.h + /usr/include/bits/stdio.h + /usr/include/c++/11/cerrno + /usr/include/errno.h + /usr/include/bits/errno.h + /usr/include/linux/errno.h + /usr/include/asm/errno.h + /usr/include/asm-generic/errno.h + /usr/include/asm-generic/errno-base.h + /usr/include/bits/types/error_t.h + /usr/include/c++/11/bits/charconv.h + /usr/include/c++/11/bits/functional_hash.h + /usr/include/c++/11/bits/hash_bytes.h + /usr/include/c++/11/bits/basic_string.tcc + /usr/include/c++/11/map + /usr/include/c++/11/bits/stl_tree.h + /usr/include/c++/11/ext/aligned_buffer.h + /usr/include/c++/11/bits/stl_map.h + /usr/include/c++/11/tuple + /usr/include/c++/11/utility + /usr/include/c++/11/bits/stl_relops.h + /usr/include/c++/11/array + /usr/include/c++/11/bits/uses_allocator.h + /usr/include/c++/11/bits/invoke.h + /usr/include/c++/11/bits/stl_multimap.h + /usr/include/c++/11/bits/erase_if.h + /usr/include/c++/11/functional + /usr/include/c++/11/bits/refwrap.h + /usr/include/c++/11/bits/std_function.h + /usr/include/c++/11/typeinfo + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/JsonRpc/message.h + /usr/include/c++/11/atomic + /usr/include/c++/11/bits/atomic_base.h + /usr/include/c++/11/bits/atomic_lockfree_defines.h + /usr/include/c++/11/iostream + /usr/include/c++/11/ostream + /usr/include/c++/11/ios + /usr/include/c++/11/exception + /usr/include/c++/11/bits/exception_ptr.h + /usr/include/c++/11/bits/cxxabi_init_exception.h + /usr/include/c++/11/bits/nested_exception.h + /usr/include/c++/11/bits/ios_base.h + /usr/include/c++/11/bits/locale_classes.h + /usr/include/c++/11/bits/locale_classes.tcc + /usr/include/c++/11/system_error + /usr/include/c++/11/x86_64-redhat-linux/bits/error_constants.h + /usr/include/c++/11/stdexcept + /usr/include/c++/11/streambuf + /usr/include/c++/11/bits/streambuf.tcc + /usr/include/c++/11/bits/basic_ios.h + /usr/include/c++/11/bits/locale_facets.h + /usr/include/c++/11/cwctype + /usr/include/wctype.h + /usr/include/bits/wctype-wchar.h + /usr/include/c++/11/x86_64-redhat-linux/bits/ctype_base.h + /usr/include/c++/11/bits/streambuf_iterator.h + /usr/include/c++/11/x86_64-redhat-linux/bits/ctype_inline.h + /usr/include/c++/11/bits/locale_facets.tcc + /usr/include/c++/11/bits/basic_ios.tcc + /usr/include/c++/11/bits/ostream.tcc + /usr/include/c++/11/istream + /usr/include/c++/11/bits/istream.tcc + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/JsonRpc/serializer.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/JsonRpc/macro_map.h + /usr/include/boost/optional.hpp + /usr/include/boost/optional/optional.hpp + /usr/include/boost/assert.hpp + /usr/include/assert.h + /usr/include/boost/core/addressof.hpp + /usr/include/boost/config.hpp + /usr/include/boost/config/user.hpp + /usr/include/boost/config/detail/select_compiler_config.hpp + /usr/include/boost/config/compiler/gcc.hpp + /usr/include/c++/11/cstddef + /usr/include/boost/config/detail/select_stdlib_config.hpp + /usr/include/c++/11/version + /usr/include/boost/config/stdlib/libstdcpp3.hpp + /usr/include/unistd.h + /usr/include/bits/posix_opt.h + /usr/include/bits/environments.h + /usr/include/bits/confname.h + /usr/include/bits/getopt_posix.h + /usr/include/bits/getopt_core.h + /usr/include/bits/unistd_ext.h + /usr/include/boost/config/detail/select_platform_config.hpp + /usr/include/boost/config/platform/linux.hpp + /usr/include/boost/config/detail/posix_features.hpp + /usr/include/boost/config/detail/suffix.hpp + /usr/include/boost/config/helper_macros.hpp + /usr/include/boost/core/enable_if.hpp + /usr/include/boost/core/explicit_operator_bool.hpp + /usr/include/boost/config/workaround.hpp + /usr/include/boost/core/swap.hpp + /usr/include/boost/optional/bad_optional_access.hpp + /usr/include/boost/static_assert.hpp + /usr/include/boost/detail/workaround.hpp + /usr/include/boost/throw_exception.hpp + /usr/include/boost/assert/source_location.hpp + /usr/include/boost/current_function.hpp + /usr/include/boost/cstdint.hpp + /usr/include/boost/exception/exception.hpp + /usr/include/boost/type.hpp + /usr/include/boost/type_traits/alignment_of.hpp + /usr/include/boost/type_traits/intrinsics.hpp + /usr/include/boost/type_traits/detail/config.hpp + /usr/include/boost/version.hpp + /usr/include/boost/type_traits/integral_constant.hpp + /usr/include/boost/type_traits/conditional.hpp + /usr/include/boost/type_traits/has_nothrow_constructor.hpp + /usr/include/boost/type_traits/is_default_constructible.hpp + /usr/include/boost/type_traits/is_complete.hpp + /usr/include/boost/type_traits/declval.hpp + /usr/include/boost/type_traits/add_rvalue_reference.hpp + /usr/include/boost/type_traits/is_void.hpp + /usr/include/boost/type_traits/is_reference.hpp + /usr/include/boost/type_traits/is_lvalue_reference.hpp + /usr/include/boost/type_traits/is_rvalue_reference.hpp + /usr/include/boost/type_traits/remove_reference.hpp + /usr/include/boost/type_traits/is_function.hpp + /usr/include/boost/type_traits/detail/is_function_cxx_11.hpp + /usr/include/boost/type_traits/detail/yes_no_type.hpp + /usr/include/boost/type_traits/type_with_alignment.hpp + /usr/include/boost/type_traits/is_pod.hpp + /usr/include/boost/type_traits/is_scalar.hpp + /usr/include/boost/type_traits/is_arithmetic.hpp + /usr/include/boost/type_traits/is_integral.hpp + /usr/include/boost/type_traits/is_floating_point.hpp + /usr/include/boost/type_traits/is_enum.hpp + /usr/include/boost/type_traits/is_pointer.hpp + /usr/include/boost/type_traits/is_member_pointer.hpp + /usr/include/boost/type_traits/is_member_function_pointer.hpp + /usr/include/boost/type_traits/detail/is_member_function_pointer_cxx_11.hpp + /usr/include/boost/type_traits/remove_const.hpp + /usr/include/boost/type_traits/decay.hpp + /usr/include/boost/type_traits/is_array.hpp + /usr/include/boost/type_traits/remove_bounds.hpp + /usr/include/boost/type_traits/remove_extent.hpp + /usr/include/boost/type_traits/add_pointer.hpp + /usr/include/boost/type_traits/remove_cv.hpp + /usr/include/boost/type_traits/is_base_of.hpp + /usr/include/boost/type_traits/is_base_and_derived.hpp + /usr/include/boost/type_traits/is_same.hpp + /usr/include/boost/type_traits/is_class.hpp + /usr/include/boost/type_traits/is_const.hpp + /usr/include/boost/type_traits/is_constructible.hpp + /usr/include/boost/type_traits/is_destructible.hpp + /usr/include/boost/type_traits/is_nothrow_move_assignable.hpp + /usr/include/boost/type_traits/has_trivial_move_assign.hpp + /usr/include/boost/type_traits/is_assignable.hpp + /usr/include/boost/type_traits/is_volatile.hpp + /usr/include/boost/type_traits/has_nothrow_assign.hpp + /usr/include/boost/type_traits/enable_if.hpp + /usr/include/boost/type_traits/is_nothrow_move_constructible.hpp + /usr/include/boost/move/utility.hpp + /usr/include/boost/move/detail/config_begin.hpp + /usr/include/boost/move/detail/workaround.hpp + /usr/include/boost/move/utility_core.hpp + /usr/include/boost/move/core.hpp + /usr/include/boost/move/detail/config_end.hpp + /usr/include/boost/move/detail/meta_utils.hpp + /usr/include/boost/move/detail/meta_utils_core.hpp + /usr/include/boost/move/traits.hpp + /usr/include/boost/move/detail/type_traits.hpp + /usr/include/boost/none.hpp + /usr/include/boost/none_t.hpp + /usr/include/boost/utility/compare_pointees.hpp + /usr/include/boost/utility/result_of.hpp + /usr/include/boost/preprocessor/cat.hpp + /usr/include/boost/preprocessor/config/config.hpp + /usr/include/boost/preprocessor/iteration/iterate.hpp + /usr/include/boost/preprocessor/arithmetic/dec.hpp + /usr/include/boost/preprocessor/config/limits.hpp + /usr/include/boost/preprocessor/arithmetic/limits/dec_256.hpp + /usr/include/boost/preprocessor/arithmetic/inc.hpp + /usr/include/boost/preprocessor/arithmetic/limits/inc_256.hpp + /usr/include/boost/preprocessor/array/elem.hpp + /usr/include/boost/preprocessor/array/data.hpp + /usr/include/boost/preprocessor/tuple/elem.hpp + /usr/include/boost/preprocessor/facilities/expand.hpp + /usr/include/boost/preprocessor/facilities/overload.hpp + /usr/include/boost/preprocessor/variadic/size.hpp + /usr/include/boost/preprocessor/control/iif.hpp + /usr/include/boost/preprocessor/facilities/check_empty.hpp + /usr/include/boost/preprocessor/variadic/has_opt.hpp + /usr/include/boost/preprocessor/variadic/limits/size_64.hpp + /usr/include/boost/preprocessor/tuple/rem.hpp + /usr/include/boost/preprocessor/tuple/detail/is_single_return.hpp + /usr/include/boost/preprocessor/variadic/elem.hpp + /usr/include/boost/preprocessor/variadic/limits/elem_64.hpp + /usr/include/boost/preprocessor/array/size.hpp + /usr/include/boost/preprocessor/slot/slot.hpp + /usr/include/boost/preprocessor/slot/detail/def.hpp + /usr/include/boost/preprocessor/repetition/enum_params.hpp + /usr/include/boost/preprocessor/punctuation/comma_if.hpp + /usr/include/boost/preprocessor/control/if.hpp + /usr/include/boost/preprocessor/logical/bool.hpp + /usr/include/boost/preprocessor/logical/limits/bool_256.hpp + /usr/include/boost/preprocessor/facilities/empty.hpp + /usr/include/boost/preprocessor/punctuation/comma.hpp + /usr/include/boost/preprocessor/repetition/repeat.hpp + /usr/include/boost/preprocessor/debug/error.hpp + /usr/include/boost/preprocessor/detail/auto_rec.hpp + /usr/include/boost/preprocessor/detail/limits/auto_rec_256.hpp + /usr/include/boost/preprocessor/tuple/eat.hpp + /usr/include/boost/preprocessor/repetition/limits/repeat_256.hpp + /usr/include/boost/preprocessor/repetition/enum_trailing_params.hpp + /usr/include/boost/preprocessor/repetition/enum_binary_params.hpp + /usr/include/boost/preprocessor/repetition/enum_shifted_params.hpp + /usr/include/boost/preprocessor/facilities/intercept.hpp + /usr/include/boost/preprocessor/facilities/limits/intercept_256.hpp + /usr/include/boost/type_traits/type_identity.hpp + /usr/include/boost/preprocessor/iteration/detail/iter/forward1.hpp + /usr/include/boost/preprocessor/iteration/detail/bounds/lower1.hpp + /usr/include/boost/preprocessor/slot/detail/shared.hpp + /usr/include/boost/preprocessor/iteration/detail/bounds/upper1.hpp + /usr/include/boost/preprocessor/iteration/detail/iter/limits/forward1_256.hpp + /usr/include/boost/utility/detail/result_of_iterate.hpp + /usr/include/boost/optional/optional_fwd.hpp + /usr/include/boost/optional/detail/optional_config.hpp + /usr/include/boost/optional/detail/optional_factory_support.hpp + /usr/include/boost/optional/detail/optional_aligned_storage.hpp + /usr/include/boost/optional/detail/optional_trivially_copyable_base.hpp + /usr/include/boost/optional/detail/optional_reference_spec.hpp + /usr/include/boost/optional/detail/optional_relops.hpp + /usr/include/boost/optional/detail/optional_swap.hpp + /usr/include/c++/11/cassert + /usr/include/c++/11/memory + /usr/include/c++/11/bits/stl_uninitialized.h + /usr/include/c++/11/bits/stl_tempbuf.h + /usr/include/c++/11/bits/stl_raw_storage_iter.h + /usr/include/c++/11/bits/align.h + /usr/include/c++/11/bit + /usr/include/c++/11/bits/unique_ptr.h + /usr/include/c++/11/bits/shared_ptr.h + /usr/include/c++/11/bits/shared_ptr_base.h + /usr/include/c++/11/bits/allocated_ptr.h + /usr/include/c++/11/ext/concurrence.h + /usr/include/c++/11/bits/shared_ptr_atomic.h + /usr/include/c++/11/backward/auto_ptr.h + /usr/include/c++/11/vector + /usr/include/c++/11/bits/stl_vector.h + /usr/include/c++/11/bits/stl_bvector.h + /usr/include/c++/11/bits/vector.tcc + /usr/include/c++/11/algorithm + /usr/include/c++/11/bits/stl_algo.h + /usr/include/c++/11/bits/algorithmfwd.h + /usr/include/c++/11/bits/stl_heap.h + /usr/include/c++/11/bits/uniform_int_dist.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/method_type.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/general/initialize.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/general/InitializeParams.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/lsDocumentUri.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/lsAny.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/general/lsClientCapabilities.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/general/lsWorkspaceClientCapabilites.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/extention/jdtls/searchSymbols.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/JsonRpc/RequestInMessage.h + /usr/include/c++/11/mutex + /usr/include/c++/11/chrono + /usr/include/c++/11/ratio + /usr/include/c++/11/limits + /usr/include/c++/11/ctime + /usr/include/c++/11/bits/parse_numbers.h + /usr/include/c++/11/bits/std_mutex.h + /usr/include/c++/11/bits/unique_lock.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/JsonRpc/lsRequestId.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/JsonRpc/lsResponseMessage.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/extention/jdtls/WorkspaceSymbolParams.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/symbol.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/location_type.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/lsRange.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/lsPosition.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/general/lsTextDocumentClientCapabilities.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/lsp_completion.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/lsTextEdit.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/lsMarkedString.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/lsCommand.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/lsp_diagnostic.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/lsResponseError.h + /usr/include/c++/11/sstream + /usr/include/c++/11/bits/sstream.tcc + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/workspace/workspaceFolders.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/general/lsServerCapabilities.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/textDocument/SemanticTokens.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/lsTextDocumentIdentifier.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/lsVersionedTextDocumentIdentifier.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/general/shutdown.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/textDocument/code_action.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/CodeActionParams.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/workspace/execute_command.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/ExecuteCommandParams.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/JsonRpc/NotificationInMessage.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/lsCodeAction.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/lsWorkspaceEdit.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/lsTextDocumentEdit.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/ResourceOperation.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/textDocument/code_lens.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/textDocument/completion.h + /usr/include/c++/11/regex + /usr/include/c++/11/bitset + /usr/include/c++/11/iterator + /usr/include/c++/11/bits/stream_iterator.h + /usr/include/c++/11/locale + /usr/include/c++/11/bits/locale_facets_nonio.h + /usr/include/c++/11/x86_64-redhat-linux/bits/time_members.h + /usr/include/c++/11/x86_64-redhat-linux/bits/messages_members.h + /usr/include/libintl.h + /usr/include/c++/11/bits/codecvt.h + /usr/include/c++/11/bits/locale_facets_nonio.tcc + /usr/include/c++/11/bits/locale_conv.h + /usr/include/c++/11/stack + /usr/include/c++/11/deque + /usr/include/c++/11/bits/stl_deque.h + /usr/include/c++/11/bits/deque.tcc + /usr/include/c++/11/bits/stl_stack.h + /usr/include/c++/11/cstring + /usr/include/string.h + /usr/include/strings.h + /usr/include/c++/11/bits/regex_constants.h + /usr/include/c++/11/bits/regex_error.h + /usr/include/c++/11/bits/regex_automaton.h + /usr/include/c++/11/bits/regex_automaton.tcc + /usr/include/c++/11/bits/regex_scanner.h + /usr/include/c++/11/bits/regex_scanner.tcc + /usr/include/c++/11/bits/regex_compiler.h + /usr/include/c++/11/bits/regex_compiler.tcc + /usr/include/c++/11/bits/regex.h + /usr/include/c++/11/bits/regex.tcc + /usr/include/c++/11/bits/regex_executor.h + /usr/include/c++/11/bits/regex_executor.tcc + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/lsTextDocumentPositionParams.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/textDocument/did_close.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/textDocument/highlight.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/textDocument/document_symbol.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/textDocument/document_link.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/textDocument/formatting.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/lsFormattingOptions.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/textDocument/hover.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/textDocument/implementation.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/out_list.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/textDocument/range_formatting.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/textDocument/references.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/textDocument/rename.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/textDocument/signature_help.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/textDocument/type_definition.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/workspace/symbol.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/textDocument/typeHierarchy.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/extention/jdtls/codeActionResult.h + /usr/include/c++/11/set + /usr/include/c++/11/bits/stl_set.h + /usr/include/c++/11/bits/stl_multiset.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/textDocument/declaration_definition.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/textDocument/resolveCompletionItem.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/textDocument/resolveCodeLens.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/textDocument/colorPresentation.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/textDocument/documentColor.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/textDocument/foldingRange.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/textDocument/prepareRename.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/textDocument/resolveTypeHierarchy.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/textDocument/callHierarchy.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/textDocument/selectionRange.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/extention/jdtls/classFileContents.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/extention/jdtls/buildWorkspace.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/extention/jdtls/listOverridableMethods.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/extention/jdtls/OverridableMethod.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/extention/jdtls/addOverridableMethods.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/extention/jdtls/checkHashCodeEqualsStatus.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/extention/jdtls/checkConstructorsStatus.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/extention/jdtls/checkDelegateMethodsStatus.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/extention/jdtls/checkToStringStatus.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/extention/jdtls/executeCommand.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/extention/jdtls/findLinks.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/extention/jdtls/getRefactorEdit.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/extention/jdtls/generateAccessors.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/extention/jdtls/resolveUnimplementedAccessors.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/extention/jdtls/generateConstructors.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/extention/jdtls/generateDelegateMethods.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/extention/jdtls/generateHashCodeEquals.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/extention/jdtls/generateToString.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/extention/jdtls/getMoveDestinations.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/extention/jdtls/Move.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/extention/jdtls/organizeImports.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/general/exit.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/general/initialized.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/extention/jdtls/projectConfigurationUpdate.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/textDocument/did_change.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/textDocument/did_open.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/lsTextDocumentItem.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/textDocument/did_save.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/textDocument/publishDiagnostics.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/textDocument/willSave.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/workspace/didChangeWorkspaceFolders.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/workspace/did_change_configuration.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/workspace/did_change_watched_files.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/windows/MessageNotify.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/language/language.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/client/registerCapability.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/client/unregisterCapability.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/JsonRpc/Cancellation.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/textDocument/didRenameFiles.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/textDocument/semanticHighlighting.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/workspace/configuration.h + +CMakeFiles/lspcpp.dir/src/lsp/initialize.cpp.o + /usr/local/src/asymptote-2.78/LspCpp/src/lsp/initialize.cpp + /usr/include/stdc-predef.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/general/initialize.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/JsonRpc/message.h + /usr/include/c++/11/atomic + /usr/include/c++/11/bits/atomic_base.h + /usr/include/c++/11/x86_64-redhat-linux/bits/c++config.h + /usr/include/bits/wordsize.h + /usr/include/c++/11/x86_64-redhat-linux/bits/os_defines.h + /usr/include/features.h + /usr/include/sys/cdefs.h + /usr/include/bits/long-double.h + /usr/include/gnu/stubs.h + /usr/include/gnu/stubs-64.h + /usr/include/c++/11/x86_64-redhat-linux/bits/cpu_defines.h + /usr/lib/gcc/x86_64-redhat-linux/11/include/stdint.h + /usr/include/stdint.h + /usr/include/bits/libc-header-start.h + /usr/include/bits/types.h + /usr/include/bits/timesize.h + /usr/include/bits/typesizes.h + /usr/include/bits/time64.h + /usr/include/bits/wchar.h + /usr/include/bits/stdint-intn.h + /usr/include/bits/stdint-uintn.h + /usr/include/c++/11/bits/atomic_lockfree_defines.h + /usr/include/c++/11/bits/move.h + /usr/include/c++/11/type_traits + /usr/include/c++/11/string + /usr/include/c++/11/bits/stringfwd.h + /usr/include/c++/11/bits/memoryfwd.h + /usr/include/c++/11/bits/char_traits.h + /usr/include/c++/11/bits/stl_algobase.h + /usr/include/c++/11/bits/functexcept.h + /usr/include/c++/11/bits/exception_defines.h + /usr/include/c++/11/bits/cpp_type_traits.h + /usr/include/c++/11/ext/type_traits.h + /usr/include/c++/11/ext/numeric_traits.h + /usr/include/c++/11/bits/stl_pair.h + /usr/include/c++/11/bits/stl_iterator_base_types.h + /usr/include/c++/11/bits/stl_iterator_base_funcs.h + /usr/include/c++/11/bits/concept_check.h + /usr/include/c++/11/debug/assertions.h + /usr/include/c++/11/bits/stl_iterator.h + /usr/include/c++/11/bits/ptr_traits.h + /usr/include/c++/11/debug/debug.h + /usr/include/c++/11/bits/predefined_ops.h + /usr/include/c++/11/bits/postypes.h + /usr/include/c++/11/cwchar + /usr/include/wchar.h + /usr/include/bits/floatn.h + /usr/include/bits/floatn-common.h + /usr/lib/gcc/x86_64-redhat-linux/11/include/stddef.h + /usr/lib/gcc/x86_64-redhat-linux/11/include/stdarg.h + /usr/include/bits/types/wint_t.h + /usr/include/bits/types/mbstate_t.h + /usr/include/bits/types/__mbstate_t.h + /usr/include/bits/types/__FILE.h + /usr/include/bits/types/FILE.h + /usr/include/bits/types/locale_t.h + /usr/include/bits/types/__locale_t.h + /usr/include/c++/11/cstdint + /usr/include/c++/11/bits/allocator.h + /usr/include/c++/11/x86_64-redhat-linux/bits/c++allocator.h + /usr/include/c++/11/ext/new_allocator.h + /usr/include/c++/11/new + /usr/include/c++/11/bits/exception.h + /usr/include/c++/11/bits/localefwd.h + /usr/include/c++/11/x86_64-redhat-linux/bits/c++locale.h + /usr/include/c++/11/clocale + /usr/include/locale.h + /usr/include/bits/locale.h + /usr/include/c++/11/iosfwd + /usr/include/c++/11/cctype + /usr/include/ctype.h + /usr/include/bits/endian.h + /usr/include/bits/endianness.h + /usr/include/c++/11/bits/ostream_insert.h + /usr/include/c++/11/bits/cxxabi_forced.h + /usr/include/c++/11/bits/stl_function.h + /usr/include/c++/11/backward/binders.h + /usr/include/c++/11/bits/range_access.h + /usr/include/c++/11/initializer_list + /usr/include/c++/11/bits/basic_string.h + /usr/include/c++/11/ext/atomicity.h + /usr/include/c++/11/x86_64-redhat-linux/bits/gthr.h + /usr/include/c++/11/x86_64-redhat-linux/bits/gthr-default.h + /usr/include/pthread.h + /usr/include/sched.h + /usr/include/bits/types/time_t.h + /usr/include/bits/types/struct_timespec.h + /usr/include/bits/sched.h + /usr/include/bits/types/struct_sched_param.h + /usr/include/bits/cpu-set.h + /usr/include/time.h + /usr/include/bits/time.h + /usr/include/bits/timex.h + /usr/include/bits/types/struct_timeval.h + /usr/include/bits/types/clock_t.h + /usr/include/bits/types/struct_tm.h + /usr/include/bits/types/clockid_t.h + /usr/include/bits/types/timer_t.h + /usr/include/bits/types/struct_itimerspec.h + /usr/include/bits/pthreadtypes.h + /usr/include/bits/thread-shared-types.h + /usr/include/bits/pthreadtypes-arch.h + /usr/include/bits/struct_mutex.h + /usr/include/bits/struct_rwlock.h + /usr/include/bits/setjmp.h + /usr/include/bits/types/__sigset_t.h + /usr/include/bits/types/struct___jmp_buf_tag.h + /usr/include/c++/11/x86_64-redhat-linux/bits/atomic_word.h + /usr/include/sys/single_threaded.h + /usr/include/c++/11/ext/alloc_traits.h + /usr/include/c++/11/bits/alloc_traits.h + /usr/include/c++/11/bits/stl_construct.h + /usr/include/c++/11/ext/string_conversions.h + /usr/include/c++/11/cstdlib + /usr/include/stdlib.h + /usr/include/bits/waitflags.h + /usr/include/bits/waitstatus.h + /usr/include/sys/types.h + /usr/include/endian.h + /usr/include/bits/byteswap.h + /usr/include/bits/uintn-identity.h + /usr/include/sys/select.h + /usr/include/bits/select.h + /usr/include/bits/types/sigset_t.h + /usr/include/alloca.h + /usr/include/bits/stdlib-bsearch.h + /usr/include/bits/stdlib-float.h + /usr/include/c++/11/bits/std_abs.h + /usr/include/c++/11/cstdio + /usr/include/stdio.h + /usr/include/bits/types/__fpos_t.h + /usr/include/bits/types/__fpos64_t.h + /usr/include/bits/types/struct_FILE.h + /usr/include/bits/types/cookie_io_functions_t.h + /usr/include/bits/stdio_lim.h + /usr/include/bits/stdio.h + /usr/include/c++/11/cerrno + /usr/include/errno.h + /usr/include/bits/errno.h + /usr/include/linux/errno.h + /usr/include/asm/errno.h + /usr/include/asm-generic/errno.h + /usr/include/asm-generic/errno-base.h + /usr/include/bits/types/error_t.h + /usr/include/c++/11/bits/charconv.h + /usr/include/c++/11/bits/functional_hash.h + /usr/include/c++/11/bits/hash_bytes.h + /usr/include/c++/11/bits/basic_string.tcc + /usr/include/c++/11/iostream + /usr/include/c++/11/ostream + /usr/include/c++/11/ios + /usr/include/c++/11/exception + /usr/include/c++/11/bits/exception_ptr.h + /usr/include/c++/11/bits/cxxabi_init_exception.h + /usr/include/c++/11/typeinfo + /usr/include/c++/11/bits/nested_exception.h + /usr/include/c++/11/bits/ios_base.h + /usr/include/c++/11/bits/locale_classes.h + /usr/include/c++/11/bits/locale_classes.tcc + /usr/include/c++/11/system_error + /usr/include/c++/11/x86_64-redhat-linux/bits/error_constants.h + /usr/include/c++/11/stdexcept + /usr/include/c++/11/streambuf + /usr/include/c++/11/bits/streambuf.tcc + /usr/include/c++/11/bits/basic_ios.h + /usr/include/c++/11/bits/locale_facets.h + /usr/include/c++/11/cwctype + /usr/include/wctype.h + /usr/include/bits/wctype-wchar.h + /usr/include/c++/11/x86_64-redhat-linux/bits/ctype_base.h + /usr/include/c++/11/bits/streambuf_iterator.h + /usr/include/c++/11/x86_64-redhat-linux/bits/ctype_inline.h + /usr/include/c++/11/bits/locale_facets.tcc + /usr/include/c++/11/bits/basic_ios.tcc + /usr/include/c++/11/bits/ostream.tcc + /usr/include/c++/11/istream + /usr/include/c++/11/bits/istream.tcc + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/JsonRpc/serializer.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/JsonRpc/macro_map.h + /usr/include/boost/optional.hpp + /usr/include/boost/optional/optional.hpp + /usr/include/boost/assert.hpp + /usr/include/assert.h + /usr/include/boost/core/addressof.hpp + /usr/include/boost/config.hpp + /usr/include/boost/config/user.hpp + /usr/include/boost/config/detail/select_compiler_config.hpp + /usr/include/boost/config/compiler/gcc.hpp + /usr/include/c++/11/cstddef + /usr/include/boost/config/detail/select_stdlib_config.hpp + /usr/include/c++/11/version + /usr/include/boost/config/stdlib/libstdcpp3.hpp + /usr/include/unistd.h + /usr/include/bits/posix_opt.h + /usr/include/bits/environments.h + /usr/include/bits/confname.h + /usr/include/bits/getopt_posix.h + /usr/include/bits/getopt_core.h + /usr/include/bits/unistd_ext.h + /usr/include/boost/config/detail/select_platform_config.hpp + /usr/include/boost/config/platform/linux.hpp + /usr/include/boost/config/detail/posix_features.hpp + /usr/include/boost/config/detail/suffix.hpp + /usr/include/boost/config/helper_macros.hpp + /usr/include/boost/core/enable_if.hpp + /usr/include/boost/core/explicit_operator_bool.hpp + /usr/include/boost/config/workaround.hpp + /usr/include/boost/core/swap.hpp + /usr/include/c++/11/utility + /usr/include/c++/11/bits/stl_relops.h + /usr/include/boost/optional/bad_optional_access.hpp + /usr/include/boost/static_assert.hpp + /usr/include/boost/detail/workaround.hpp + /usr/include/boost/throw_exception.hpp + /usr/include/boost/assert/source_location.hpp + /usr/include/boost/current_function.hpp + /usr/include/boost/cstdint.hpp + /usr/include/boost/exception/exception.hpp + /usr/include/boost/type.hpp + /usr/include/boost/type_traits/alignment_of.hpp + /usr/include/boost/type_traits/intrinsics.hpp + /usr/include/boost/type_traits/detail/config.hpp + /usr/include/boost/version.hpp + /usr/include/boost/type_traits/integral_constant.hpp + /usr/include/boost/type_traits/conditional.hpp + /usr/include/boost/type_traits/has_nothrow_constructor.hpp + /usr/include/boost/type_traits/is_default_constructible.hpp + /usr/include/boost/type_traits/is_complete.hpp + /usr/include/boost/type_traits/declval.hpp + /usr/include/boost/type_traits/add_rvalue_reference.hpp + /usr/include/boost/type_traits/is_void.hpp + /usr/include/boost/type_traits/is_reference.hpp + /usr/include/boost/type_traits/is_lvalue_reference.hpp + /usr/include/boost/type_traits/is_rvalue_reference.hpp + /usr/include/boost/type_traits/remove_reference.hpp + /usr/include/boost/type_traits/is_function.hpp + /usr/include/boost/type_traits/detail/is_function_cxx_11.hpp + /usr/include/boost/type_traits/detail/yes_no_type.hpp + /usr/include/boost/type_traits/type_with_alignment.hpp + /usr/include/boost/type_traits/is_pod.hpp + /usr/include/boost/type_traits/is_scalar.hpp + /usr/include/boost/type_traits/is_arithmetic.hpp + /usr/include/boost/type_traits/is_integral.hpp + /usr/include/boost/type_traits/is_floating_point.hpp + /usr/include/boost/type_traits/is_enum.hpp + /usr/include/boost/type_traits/is_pointer.hpp + /usr/include/boost/type_traits/is_member_pointer.hpp + /usr/include/boost/type_traits/is_member_function_pointer.hpp + /usr/include/boost/type_traits/detail/is_member_function_pointer_cxx_11.hpp + /usr/include/boost/type_traits/remove_const.hpp + /usr/include/boost/type_traits/decay.hpp + /usr/include/boost/type_traits/is_array.hpp + /usr/include/boost/type_traits/remove_bounds.hpp + /usr/include/boost/type_traits/remove_extent.hpp + /usr/include/boost/type_traits/add_pointer.hpp + /usr/include/boost/type_traits/remove_cv.hpp + /usr/include/boost/type_traits/is_base_of.hpp + /usr/include/boost/type_traits/is_base_and_derived.hpp + /usr/include/boost/type_traits/is_same.hpp + /usr/include/boost/type_traits/is_class.hpp + /usr/include/boost/type_traits/is_const.hpp + /usr/include/boost/type_traits/is_constructible.hpp + /usr/include/boost/type_traits/is_destructible.hpp + /usr/include/boost/type_traits/is_nothrow_move_assignable.hpp + /usr/include/boost/type_traits/has_trivial_move_assign.hpp + /usr/include/boost/type_traits/is_assignable.hpp + /usr/include/boost/type_traits/is_volatile.hpp + /usr/include/boost/type_traits/has_nothrow_assign.hpp + /usr/include/boost/type_traits/enable_if.hpp + /usr/include/boost/type_traits/is_nothrow_move_constructible.hpp + /usr/include/boost/move/utility.hpp + /usr/include/boost/move/detail/config_begin.hpp + /usr/include/boost/move/detail/workaround.hpp + /usr/include/boost/move/utility_core.hpp + /usr/include/boost/move/core.hpp + /usr/include/boost/move/detail/config_end.hpp + /usr/include/boost/move/detail/meta_utils.hpp + /usr/include/boost/move/detail/meta_utils_core.hpp + /usr/include/boost/move/traits.hpp + /usr/include/boost/move/detail/type_traits.hpp + /usr/include/boost/none.hpp + /usr/include/boost/none_t.hpp + /usr/include/boost/utility/compare_pointees.hpp + /usr/include/c++/11/functional + /usr/include/c++/11/tuple + /usr/include/c++/11/array + /usr/include/c++/11/bits/uses_allocator.h + /usr/include/c++/11/bits/invoke.h + /usr/include/c++/11/bits/refwrap.h + /usr/include/c++/11/bits/std_function.h + /usr/include/boost/utility/result_of.hpp + /usr/include/boost/preprocessor/cat.hpp + /usr/include/boost/preprocessor/config/config.hpp + /usr/include/boost/preprocessor/iteration/iterate.hpp + /usr/include/boost/preprocessor/arithmetic/dec.hpp + /usr/include/boost/preprocessor/config/limits.hpp + /usr/include/boost/preprocessor/arithmetic/limits/dec_256.hpp + /usr/include/boost/preprocessor/arithmetic/inc.hpp + /usr/include/boost/preprocessor/arithmetic/limits/inc_256.hpp + /usr/include/boost/preprocessor/array/elem.hpp + /usr/include/boost/preprocessor/array/data.hpp + /usr/include/boost/preprocessor/tuple/elem.hpp + /usr/include/boost/preprocessor/facilities/expand.hpp + /usr/include/boost/preprocessor/facilities/overload.hpp + /usr/include/boost/preprocessor/variadic/size.hpp + /usr/include/boost/preprocessor/control/iif.hpp + /usr/include/boost/preprocessor/facilities/check_empty.hpp + /usr/include/boost/preprocessor/variadic/has_opt.hpp + /usr/include/boost/preprocessor/variadic/limits/size_64.hpp + /usr/include/boost/preprocessor/tuple/rem.hpp + /usr/include/boost/preprocessor/tuple/detail/is_single_return.hpp + /usr/include/boost/preprocessor/variadic/elem.hpp + /usr/include/boost/preprocessor/variadic/limits/elem_64.hpp + /usr/include/boost/preprocessor/array/size.hpp + /usr/include/boost/preprocessor/slot/slot.hpp + /usr/include/boost/preprocessor/slot/detail/def.hpp + /usr/include/boost/preprocessor/repetition/enum_params.hpp + /usr/include/boost/preprocessor/punctuation/comma_if.hpp + /usr/include/boost/preprocessor/control/if.hpp + /usr/include/boost/preprocessor/logical/bool.hpp + /usr/include/boost/preprocessor/logical/limits/bool_256.hpp + /usr/include/boost/preprocessor/facilities/empty.hpp + /usr/include/boost/preprocessor/punctuation/comma.hpp + /usr/include/boost/preprocessor/repetition/repeat.hpp + /usr/include/boost/preprocessor/debug/error.hpp + /usr/include/boost/preprocessor/detail/auto_rec.hpp + /usr/include/boost/preprocessor/detail/limits/auto_rec_256.hpp + /usr/include/boost/preprocessor/tuple/eat.hpp + /usr/include/boost/preprocessor/repetition/limits/repeat_256.hpp + /usr/include/boost/preprocessor/repetition/enum_trailing_params.hpp + /usr/include/boost/preprocessor/repetition/enum_binary_params.hpp + /usr/include/boost/preprocessor/repetition/enum_shifted_params.hpp + /usr/include/boost/preprocessor/facilities/intercept.hpp + /usr/include/boost/preprocessor/facilities/limits/intercept_256.hpp + /usr/include/boost/type_traits/type_identity.hpp + /usr/include/boost/preprocessor/iteration/detail/iter/forward1.hpp + /usr/include/boost/preprocessor/iteration/detail/bounds/lower1.hpp + /usr/include/boost/preprocessor/slot/detail/shared.hpp + /usr/include/boost/preprocessor/iteration/detail/bounds/upper1.hpp + /usr/include/boost/preprocessor/iteration/detail/iter/limits/forward1_256.hpp + /usr/include/boost/utility/detail/result_of_iterate.hpp + /usr/include/boost/optional/optional_fwd.hpp + /usr/include/boost/optional/detail/optional_config.hpp + /usr/include/boost/optional/detail/optional_factory_support.hpp + /usr/include/boost/optional/detail/optional_aligned_storage.hpp + /usr/include/boost/optional/detail/optional_trivially_copyable_base.hpp + /usr/include/boost/optional/detail/optional_reference_spec.hpp + /usr/include/boost/optional/detail/optional_relops.hpp + /usr/include/boost/optional/detail/optional_swap.hpp + /usr/include/c++/11/cassert + /usr/include/c++/11/memory + /usr/include/c++/11/bits/stl_uninitialized.h + /usr/include/c++/11/bits/stl_tempbuf.h + /usr/include/c++/11/bits/stl_raw_storage_iter.h + /usr/include/c++/11/bits/align.h + /usr/include/c++/11/bit + /usr/include/c++/11/bits/unique_ptr.h + /usr/include/c++/11/bits/shared_ptr.h + /usr/include/c++/11/bits/shared_ptr_base.h + /usr/include/c++/11/bits/allocated_ptr.h + /usr/include/c++/11/ext/aligned_buffer.h + /usr/include/c++/11/ext/concurrence.h + /usr/include/c++/11/bits/shared_ptr_atomic.h + /usr/include/c++/11/backward/auto_ptr.h + /usr/include/c++/11/vector + /usr/include/c++/11/bits/stl_vector.h + /usr/include/c++/11/bits/stl_bvector.h + /usr/include/c++/11/bits/vector.tcc + /usr/include/c++/11/map + /usr/include/c++/11/bits/stl_tree.h + /usr/include/c++/11/bits/stl_map.h + /usr/include/c++/11/bits/stl_multimap.h + /usr/include/c++/11/bits/erase_if.h + /usr/include/c++/11/algorithm + /usr/include/c++/11/bits/stl_algo.h + /usr/include/c++/11/bits/algorithmfwd.h + /usr/include/c++/11/bits/stl_heap.h + /usr/include/c++/11/bits/uniform_int_dist.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/method_type.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/general/InitializeParams.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/lsDocumentUri.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/lsAny.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/general/lsClientCapabilities.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/general/lsWorkspaceClientCapabilites.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/extention/jdtls/searchSymbols.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/JsonRpc/RequestInMessage.h + /usr/include/c++/11/mutex + /usr/include/c++/11/chrono + /usr/include/c++/11/ratio + /usr/include/c++/11/limits + /usr/include/c++/11/ctime + /usr/include/c++/11/bits/parse_numbers.h + /usr/include/c++/11/bits/std_mutex.h + /usr/include/c++/11/bits/unique_lock.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/JsonRpc/lsRequestId.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/JsonRpc/lsResponseMessage.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/extention/jdtls/WorkspaceSymbolParams.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/symbol.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/location_type.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/lsRange.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/lsPosition.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/general/lsTextDocumentClientCapabilities.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/lsp_completion.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/lsTextEdit.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/lsMarkedString.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/lsCommand.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/lsp_diagnostic.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/lsResponseError.h + /usr/include/c++/11/sstream + /usr/include/c++/11/bits/sstream.tcc + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/workspace/workspaceFolders.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/general/lsServerCapabilities.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/textDocument/SemanticTokens.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/lsTextDocumentIdentifier.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/lsVersionedTextDocumentIdentifier.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/JsonRpc/json.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/document.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/reader.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/allocators.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/rapidjson.h + /usr/include/c++/11/cstring + /usr/include/string.h + /usr/include/strings.h + /usr/include/inttypes.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/internal/meta.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/rapidjson.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/stream.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/encodings.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/encodedstream.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/memorystream.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/internal/clzll.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/internal/stack.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/allocators.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/internal/swap.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/internal/strtod.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/internal/ieee754.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/internal/biginteger.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/internal/diyfp.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/internal/clzll.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/internal/pow10.h + /usr/include/c++/11/climits + /usr/lib/gcc/x86_64-redhat-linux/11/include/limits.h + /usr/lib/gcc/x86_64-redhat-linux/11/include/syslimits.h + /usr/include/limits.h + /usr/include/bits/posix1_lim.h + /usr/include/bits/local_lim.h + /usr/include/linux/limits.h + /usr/include/bits/posix2_lim.h + /usr/include/bits/xopen_lim.h + /usr/include/bits/uio_lim.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/error/error.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/rapidjson.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/internal/strfunc.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/stream.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/rapidjson.h + /usr/include/c++/11/iterator + /usr/include/c++/11/bits/stream_iterator.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/prettywriter.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/writer.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/internal/dtoa.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/internal/itoa.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/internal/itoa.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/stringbuffer.h + +CMakeFiles/lspcpp.dir/src/lsp/lsp.cpp.o + /usr/local/src/asymptote-2.78/LspCpp/src/lsp/lsp.cpp + /usr/include/stdc-predef.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/lru_cache.h + /usr/include/c++/11/algorithm + /usr/include/c++/11/utility + /usr/include/c++/11/x86_64-redhat-linux/bits/c++config.h + /usr/include/bits/wordsize.h + /usr/include/c++/11/x86_64-redhat-linux/bits/os_defines.h + /usr/include/features.h + /usr/include/sys/cdefs.h + /usr/include/bits/long-double.h + /usr/include/gnu/stubs.h + /usr/include/gnu/stubs-64.h + /usr/include/c++/11/x86_64-redhat-linux/bits/cpu_defines.h + /usr/include/c++/11/bits/stl_relops.h + /usr/include/c++/11/bits/stl_pair.h + /usr/include/c++/11/bits/move.h + /usr/include/c++/11/type_traits + /usr/include/c++/11/initializer_list + /usr/include/c++/11/bits/stl_algobase.h + /usr/include/c++/11/bits/functexcept.h + /usr/include/c++/11/bits/exception_defines.h + /usr/include/c++/11/bits/cpp_type_traits.h + /usr/include/c++/11/ext/type_traits.h + /usr/include/c++/11/ext/numeric_traits.h + /usr/include/c++/11/bits/stl_iterator_base_types.h + /usr/include/c++/11/bits/stl_iterator_base_funcs.h + /usr/include/c++/11/bits/concept_check.h + /usr/include/c++/11/debug/assertions.h + /usr/include/c++/11/bits/stl_iterator.h + /usr/include/c++/11/bits/ptr_traits.h + /usr/include/c++/11/debug/debug.h + /usr/include/c++/11/bits/predefined_ops.h + /usr/include/c++/11/bits/stl_algo.h + /usr/include/c++/11/cstdlib + /usr/include/stdlib.h + /usr/include/bits/libc-header-start.h + /usr/lib/gcc/x86_64-redhat-linux/11/include/stddef.h + /usr/include/bits/waitflags.h + /usr/include/bits/waitstatus.h + /usr/include/bits/floatn.h + /usr/include/bits/floatn-common.h + /usr/include/bits/types/locale_t.h + /usr/include/bits/types/__locale_t.h + /usr/include/sys/types.h + /usr/include/bits/types.h + /usr/include/bits/timesize.h + /usr/include/bits/typesizes.h + /usr/include/bits/time64.h + /usr/include/bits/types/clock_t.h + /usr/include/bits/types/clockid_t.h + /usr/include/bits/types/time_t.h + /usr/include/bits/types/timer_t.h + /usr/include/bits/stdint-intn.h + /usr/include/endian.h + /usr/include/bits/endian.h + /usr/include/bits/endianness.h + /usr/include/bits/byteswap.h + /usr/include/bits/uintn-identity.h + /usr/include/sys/select.h + /usr/include/bits/select.h + /usr/include/bits/types/sigset_t.h + /usr/include/bits/types/__sigset_t.h + /usr/include/bits/types/struct_timeval.h + /usr/include/bits/types/struct_timespec.h + /usr/include/bits/pthreadtypes.h + /usr/include/bits/thread-shared-types.h + /usr/include/bits/pthreadtypes-arch.h + /usr/include/bits/struct_mutex.h + /usr/include/bits/struct_rwlock.h + /usr/include/alloca.h + /usr/include/bits/stdlib-bsearch.h + /usr/include/bits/stdlib-float.h + /usr/include/c++/11/bits/std_abs.h + /usr/include/c++/11/bits/algorithmfwd.h + /usr/include/c++/11/bits/stl_heap.h + /usr/include/c++/11/bits/stl_tempbuf.h + /usr/include/c++/11/bits/stl_construct.h + /usr/include/c++/11/new + /usr/include/c++/11/bits/exception.h + /usr/include/c++/11/bits/uniform_int_dist.h + /usr/include/c++/11/cassert + /usr/include/assert.h + /usr/include/c++/11/limits + /usr/include/c++/11/memory + /usr/include/c++/11/bits/allocator.h + /usr/include/c++/11/x86_64-redhat-linux/bits/c++allocator.h + /usr/include/c++/11/ext/new_allocator.h + /usr/include/c++/11/bits/memoryfwd.h + /usr/include/c++/11/bits/stl_uninitialized.h + /usr/include/c++/11/ext/alloc_traits.h + /usr/include/c++/11/bits/alloc_traits.h + /usr/include/c++/11/bits/stl_raw_storage_iter.h + /usr/include/c++/11/bits/align.h + /usr/include/c++/11/bit + /usr/lib/gcc/x86_64-redhat-linux/11/include/stdint.h + /usr/include/stdint.h + /usr/include/bits/wchar.h + /usr/include/bits/stdint-uintn.h + /usr/include/c++/11/bits/uses_allocator.h + /usr/include/c++/11/bits/unique_ptr.h + /usr/include/c++/11/tuple + /usr/include/c++/11/array + /usr/include/c++/11/bits/range_access.h + /usr/include/c++/11/bits/invoke.h + /usr/include/c++/11/bits/stl_function.h + /usr/include/c++/11/backward/binders.h + /usr/include/c++/11/bits/functional_hash.h + /usr/include/c++/11/bits/hash_bytes.h + /usr/include/c++/11/bits/shared_ptr.h + /usr/include/c++/11/iosfwd + /usr/include/c++/11/bits/stringfwd.h + /usr/include/c++/11/bits/postypes.h + /usr/include/c++/11/cwchar + /usr/include/wchar.h + /usr/lib/gcc/x86_64-redhat-linux/11/include/stdarg.h + /usr/include/bits/types/wint_t.h + /usr/include/bits/types/mbstate_t.h + /usr/include/bits/types/__mbstate_t.h + /usr/include/bits/types/__FILE.h + /usr/include/bits/types/FILE.h + /usr/include/c++/11/bits/shared_ptr_base.h + /usr/include/c++/11/typeinfo + /usr/include/c++/11/bits/allocated_ptr.h + /usr/include/c++/11/bits/refwrap.h + /usr/include/c++/11/ext/aligned_buffer.h + /usr/include/c++/11/ext/atomicity.h + /usr/include/c++/11/x86_64-redhat-linux/bits/gthr.h + /usr/include/c++/11/x86_64-redhat-linux/bits/gthr-default.h + /usr/include/pthread.h + /usr/include/sched.h + /usr/include/bits/sched.h + /usr/include/bits/types/struct_sched_param.h + /usr/include/bits/cpu-set.h + /usr/include/time.h + /usr/include/bits/time.h + /usr/include/bits/timex.h + /usr/include/bits/types/struct_tm.h + /usr/include/bits/types/struct_itimerspec.h + /usr/include/bits/setjmp.h + /usr/include/bits/types/struct___jmp_buf_tag.h + /usr/include/c++/11/x86_64-redhat-linux/bits/atomic_word.h + /usr/include/sys/single_threaded.h + /usr/include/c++/11/ext/concurrence.h + /usr/include/c++/11/exception + /usr/include/c++/11/bits/exception_ptr.h + /usr/include/c++/11/bits/cxxabi_init_exception.h + /usr/include/c++/11/bits/nested_exception.h + /usr/include/c++/11/bits/shared_ptr_atomic.h + /usr/include/c++/11/bits/atomic_base.h + /usr/include/c++/11/bits/atomic_lockfree_defines.h + /usr/include/c++/11/backward/auto_ptr.h + /usr/include/c++/11/vector + /usr/include/c++/11/bits/stl_vector.h + /usr/include/c++/11/bits/stl_bvector.h + /usr/include/c++/11/bits/vector.tcc + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/writer.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/stream.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/rapidjson.h + /usr/include/c++/11/cstring + /usr/include/string.h + /usr/include/strings.h + /usr/include/inttypes.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/encodings.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/internal/clzll.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/rapidjson.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/internal/meta.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/internal/stack.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/allocators.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/rapidjson.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/internal/meta.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/internal/swap.h + /usr/include/c++/11/cstddef + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/internal/strfunc.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/stream.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/internal/dtoa.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/internal/itoa.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/internal/diyfp.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/internal/clzll.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/internal/ieee754.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/internal/itoa.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/stringbuffer.h + /usr/include/stdio.h + /usr/include/bits/types/__fpos_t.h + /usr/include/bits/types/__fpos64_t.h + /usr/include/bits/types/struct_FILE.h + /usr/include/bits/types/cookie_io_functions_t.h + /usr/include/bits/stdio_lim.h + /usr/include/bits/stdio.h + /usr/include/c++/11/iostream + /usr/include/c++/11/ostream + /usr/include/c++/11/ios + /usr/include/c++/11/bits/char_traits.h + /usr/include/c++/11/cstdint + /usr/include/c++/11/bits/localefwd.h + /usr/include/c++/11/x86_64-redhat-linux/bits/c++locale.h + /usr/include/c++/11/clocale + /usr/include/locale.h + /usr/include/bits/locale.h + /usr/include/c++/11/cctype + /usr/include/ctype.h + /usr/include/c++/11/bits/ios_base.h + /usr/include/c++/11/bits/locale_classes.h + /usr/include/c++/11/string + /usr/include/c++/11/bits/ostream_insert.h + /usr/include/c++/11/bits/cxxabi_forced.h + /usr/include/c++/11/bits/basic_string.h + /usr/include/c++/11/ext/string_conversions.h + /usr/include/c++/11/cstdio + /usr/include/c++/11/cerrno + /usr/include/errno.h + /usr/include/bits/errno.h + /usr/include/linux/errno.h + /usr/include/asm/errno.h + /usr/include/asm-generic/errno.h + /usr/include/asm-generic/errno-base.h + /usr/include/bits/types/error_t.h + /usr/include/c++/11/bits/charconv.h + /usr/include/c++/11/bits/basic_string.tcc + /usr/include/c++/11/bits/locale_classes.tcc + /usr/include/c++/11/system_error + /usr/include/c++/11/x86_64-redhat-linux/bits/error_constants.h + /usr/include/c++/11/stdexcept + /usr/include/c++/11/streambuf + /usr/include/c++/11/bits/streambuf.tcc + /usr/include/c++/11/bits/basic_ios.h + /usr/include/c++/11/bits/locale_facets.h + /usr/include/c++/11/cwctype + /usr/include/wctype.h + /usr/include/bits/wctype-wchar.h + /usr/include/c++/11/x86_64-redhat-linux/bits/ctype_base.h + /usr/include/c++/11/bits/streambuf_iterator.h + /usr/include/c++/11/x86_64-redhat-linux/bits/ctype_inline.h + /usr/include/c++/11/bits/locale_facets.tcc + /usr/include/c++/11/bits/basic_ios.tcc + /usr/include/c++/11/bits/ostream.tcc + /usr/include/c++/11/istream + /usr/include/c++/11/bits/istream.tcc + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/location_type.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/lsDocumentUri.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/JsonRpc/serializer.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/JsonRpc/macro_map.h + /usr/include/boost/optional.hpp + /usr/include/boost/optional/optional.hpp + /usr/include/boost/assert.hpp + /usr/include/boost/core/addressof.hpp + /usr/include/boost/config.hpp + /usr/include/boost/config/user.hpp + /usr/include/boost/config/detail/select_compiler_config.hpp + /usr/include/boost/config/compiler/gcc.hpp + /usr/include/boost/config/detail/select_stdlib_config.hpp + /usr/include/c++/11/version + /usr/include/boost/config/stdlib/libstdcpp3.hpp + /usr/include/unistd.h + /usr/include/bits/posix_opt.h + /usr/include/bits/environments.h + /usr/include/bits/confname.h + /usr/include/bits/getopt_posix.h + /usr/include/bits/getopt_core.h + /usr/include/bits/unistd_ext.h + /usr/include/boost/config/detail/select_platform_config.hpp + /usr/include/boost/config/platform/linux.hpp + /usr/include/boost/config/detail/posix_features.hpp + /usr/include/boost/config/detail/suffix.hpp + /usr/include/boost/config/helper_macros.hpp + /usr/include/boost/core/enable_if.hpp + /usr/include/boost/core/explicit_operator_bool.hpp + /usr/include/boost/config/workaround.hpp + /usr/include/boost/core/swap.hpp + /usr/include/boost/optional/bad_optional_access.hpp + /usr/include/boost/static_assert.hpp + /usr/include/boost/detail/workaround.hpp + /usr/include/boost/throw_exception.hpp + /usr/include/boost/assert/source_location.hpp + /usr/include/boost/current_function.hpp + /usr/include/boost/cstdint.hpp + /usr/include/boost/exception/exception.hpp + /usr/include/boost/type.hpp + /usr/include/boost/type_traits/alignment_of.hpp + /usr/include/boost/type_traits/intrinsics.hpp + /usr/include/boost/type_traits/detail/config.hpp + /usr/include/boost/version.hpp + /usr/include/boost/type_traits/integral_constant.hpp + /usr/include/boost/type_traits/conditional.hpp + /usr/include/boost/type_traits/has_nothrow_constructor.hpp + /usr/include/boost/type_traits/is_default_constructible.hpp + /usr/include/boost/type_traits/is_complete.hpp + /usr/include/boost/type_traits/declval.hpp + /usr/include/boost/type_traits/add_rvalue_reference.hpp + /usr/include/boost/type_traits/is_void.hpp + /usr/include/boost/type_traits/is_reference.hpp + /usr/include/boost/type_traits/is_lvalue_reference.hpp + /usr/include/boost/type_traits/is_rvalue_reference.hpp + /usr/include/boost/type_traits/remove_reference.hpp + /usr/include/boost/type_traits/is_function.hpp + /usr/include/boost/type_traits/detail/is_function_cxx_11.hpp + /usr/include/boost/type_traits/detail/yes_no_type.hpp + /usr/include/boost/type_traits/type_with_alignment.hpp + /usr/include/boost/type_traits/is_pod.hpp + /usr/include/boost/type_traits/is_scalar.hpp + /usr/include/boost/type_traits/is_arithmetic.hpp + /usr/include/boost/type_traits/is_integral.hpp + /usr/include/boost/type_traits/is_floating_point.hpp + /usr/include/boost/type_traits/is_enum.hpp + /usr/include/boost/type_traits/is_pointer.hpp + /usr/include/boost/type_traits/is_member_pointer.hpp + /usr/include/boost/type_traits/is_member_function_pointer.hpp + /usr/include/boost/type_traits/detail/is_member_function_pointer_cxx_11.hpp + /usr/include/boost/type_traits/remove_const.hpp + /usr/include/boost/type_traits/decay.hpp + /usr/include/boost/type_traits/is_array.hpp + /usr/include/boost/type_traits/remove_bounds.hpp + /usr/include/boost/type_traits/remove_extent.hpp + /usr/include/boost/type_traits/add_pointer.hpp + /usr/include/boost/type_traits/remove_cv.hpp + /usr/include/boost/type_traits/is_base_of.hpp + /usr/include/boost/type_traits/is_base_and_derived.hpp + /usr/include/boost/type_traits/is_same.hpp + /usr/include/boost/type_traits/is_class.hpp + /usr/include/boost/type_traits/is_const.hpp + /usr/include/boost/type_traits/is_constructible.hpp + /usr/include/boost/type_traits/is_destructible.hpp + /usr/include/boost/type_traits/is_nothrow_move_assignable.hpp + /usr/include/boost/type_traits/has_trivial_move_assign.hpp + /usr/include/boost/type_traits/is_assignable.hpp + /usr/include/boost/type_traits/is_volatile.hpp + /usr/include/boost/type_traits/has_nothrow_assign.hpp + /usr/include/boost/type_traits/enable_if.hpp + /usr/include/boost/type_traits/is_nothrow_move_constructible.hpp + /usr/include/boost/move/utility.hpp + /usr/include/boost/move/detail/config_begin.hpp + /usr/include/boost/move/detail/workaround.hpp + /usr/include/boost/move/utility_core.hpp + /usr/include/boost/move/core.hpp + /usr/include/boost/move/detail/config_end.hpp + /usr/include/boost/move/detail/meta_utils.hpp + /usr/include/boost/move/detail/meta_utils_core.hpp + /usr/include/boost/move/traits.hpp + /usr/include/boost/move/detail/type_traits.hpp + /usr/include/boost/none.hpp + /usr/include/boost/none_t.hpp + /usr/include/boost/utility/compare_pointees.hpp + /usr/include/c++/11/functional + /usr/include/c++/11/bits/std_function.h + /usr/include/boost/utility/result_of.hpp + /usr/include/boost/preprocessor/cat.hpp + /usr/include/boost/preprocessor/config/config.hpp + /usr/include/boost/preprocessor/iteration/iterate.hpp + /usr/include/boost/preprocessor/arithmetic/dec.hpp + /usr/include/boost/preprocessor/config/limits.hpp + /usr/include/boost/preprocessor/arithmetic/limits/dec_256.hpp + /usr/include/boost/preprocessor/arithmetic/inc.hpp + /usr/include/boost/preprocessor/arithmetic/limits/inc_256.hpp + /usr/include/boost/preprocessor/array/elem.hpp + /usr/include/boost/preprocessor/array/data.hpp + /usr/include/boost/preprocessor/tuple/elem.hpp + /usr/include/boost/preprocessor/facilities/expand.hpp + /usr/include/boost/preprocessor/facilities/overload.hpp + /usr/include/boost/preprocessor/variadic/size.hpp + /usr/include/boost/preprocessor/control/iif.hpp + /usr/include/boost/preprocessor/facilities/check_empty.hpp + /usr/include/boost/preprocessor/variadic/has_opt.hpp + /usr/include/boost/preprocessor/variadic/limits/size_64.hpp + /usr/include/boost/preprocessor/tuple/rem.hpp + /usr/include/boost/preprocessor/tuple/detail/is_single_return.hpp + /usr/include/boost/preprocessor/variadic/elem.hpp + /usr/include/boost/preprocessor/variadic/limits/elem_64.hpp + /usr/include/boost/preprocessor/array/size.hpp + /usr/include/boost/preprocessor/slot/slot.hpp + /usr/include/boost/preprocessor/slot/detail/def.hpp + /usr/include/boost/preprocessor/repetition/enum_params.hpp + /usr/include/boost/preprocessor/punctuation/comma_if.hpp + /usr/include/boost/preprocessor/control/if.hpp + /usr/include/boost/preprocessor/logical/bool.hpp + /usr/include/boost/preprocessor/logical/limits/bool_256.hpp + /usr/include/boost/preprocessor/facilities/empty.hpp + /usr/include/boost/preprocessor/punctuation/comma.hpp + /usr/include/boost/preprocessor/repetition/repeat.hpp + /usr/include/boost/preprocessor/debug/error.hpp + /usr/include/boost/preprocessor/detail/auto_rec.hpp + /usr/include/boost/preprocessor/detail/limits/auto_rec_256.hpp + /usr/include/boost/preprocessor/tuple/eat.hpp + /usr/include/boost/preprocessor/repetition/limits/repeat_256.hpp + /usr/include/boost/preprocessor/repetition/enum_trailing_params.hpp + /usr/include/boost/preprocessor/repetition/enum_binary_params.hpp + /usr/include/boost/preprocessor/repetition/enum_shifted_params.hpp + /usr/include/boost/preprocessor/facilities/intercept.hpp + /usr/include/boost/preprocessor/facilities/limits/intercept_256.hpp + /usr/include/boost/type_traits/type_identity.hpp + /usr/include/boost/preprocessor/iteration/detail/iter/forward1.hpp + /usr/include/boost/preprocessor/iteration/detail/bounds/lower1.hpp + /usr/include/boost/preprocessor/slot/detail/shared.hpp + /usr/include/boost/preprocessor/iteration/detail/bounds/upper1.hpp + /usr/include/boost/preprocessor/iteration/detail/iter/limits/forward1_256.hpp + /usr/include/boost/utility/detail/result_of_iterate.hpp + /usr/include/boost/optional/optional_fwd.hpp + /usr/include/boost/optional/detail/optional_config.hpp + /usr/include/boost/optional/detail/optional_factory_support.hpp + /usr/include/boost/optional/detail/optional_aligned_storage.hpp + /usr/include/boost/optional/detail/optional_trivially_copyable_base.hpp + /usr/include/boost/optional/detail/optional_reference_spec.hpp + /usr/include/boost/optional/detail/optional_relops.hpp + /usr/include/boost/optional/detail/optional_swap.hpp + /usr/include/c++/11/map + /usr/include/c++/11/bits/stl_tree.h + /usr/include/c++/11/bits/stl_map.h + /usr/include/c++/11/bits/stl_multimap.h + /usr/include/c++/11/bits/erase_if.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/lsRange.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/lsPosition.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/out_list.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/JsonRpc/RequestInMessage.h + /usr/include/c++/11/atomic + /usr/include/c++/11/mutex + /usr/include/c++/11/chrono + /usr/include/c++/11/ratio + /usr/include/c++/11/ctime + /usr/include/c++/11/bits/parse_numbers.h + /usr/include/c++/11/bits/std_mutex.h + /usr/include/c++/11/bits/unique_lock.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/JsonRpc/lsRequestId.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/JsonRpc/message.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/method_type.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/JsonRpc/lsResponseMessage.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/lsTextDocumentIdentifier.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/lsVersionedTextDocumentIdentifier.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/lsResponseError.h + /usr/include/c++/11/sstream + /usr/include/c++/11/bits/sstream.tcc + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/lsAny.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/lsTextEdit.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/lsMarkedString.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/lsWorkspaceEdit.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/lsTextDocumentEdit.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/ResourceOperation.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/textDocument/code_action.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/CodeActionParams.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/lsp_diagnostic.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/workspace/execute_command.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/ExecuteCommandParams.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/JsonRpc/NotificationInMessage.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/lsCodeAction.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/lsCommand.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/textDocument/document_symbol.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/symbol.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/extention/jdtls/codeActionResult.h + /usr/include/c++/11/set + /usr/include/c++/11/bits/stl_set.h + /usr/include/c++/11/bits/stl_multiset.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/textDocument/selectionRange.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/AbsolutePath.h + /usr/include/c++/11/climits + /usr/lib/gcc/x86_64-redhat-linux/11/include/limits.h + /usr/lib/gcc/x86_64-redhat-linux/11/include/syslimits.h + /usr/include/limits.h + /usr/include/bits/posix1_lim.h + /usr/include/bits/local_lim.h + /usr/include/linux/limits.h + /usr/include/bits/posix2_lim.h + /usr/include/bits/xopen_lim.h + /usr/include/bits/uio_lim.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/Directory.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/lsFormattingOptions.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/JsonRpc/json.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/document.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/reader.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/allocators.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/encodedstream.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/memorystream.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/internal/strtod.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/internal/biginteger.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/internal/pow10.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/error/error.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/rapidjson.h + /usr/include/c++/11/iterator + /usr/include/c++/11/bits/stream_iterator.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/prettywriter.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/writer.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/language/language.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/uri/include/network/uri/uri_builder.hpp + /usr/local/src/asymptote-2.78/LspCpp/third_party/uri/include/network/uri/uri.hpp + /usr/local/src/asymptote-2.78/LspCpp/third_party/uri/include/network/string_view.hpp + /usr/local/src/asymptote-2.78/LspCpp/third_party/uri/include/network/optional.hpp + /usr/local/src/asymptote-2.78/LspCpp/third_party/uri/include/network/uri/config.hpp + /usr/local/src/asymptote-2.78/LspCpp/third_party/uri/include/network/uri/uri_errors.hpp + /usr/local/src/asymptote-2.78/LspCpp/third_party/uri/include/network/uri/detail/uri_parts.hpp + /usr/local/src/asymptote-2.78/LspCpp/third_party/uri/include/network/uri/detail/encode.hpp + /usr/local/src/asymptote-2.78/LspCpp/third_party/uri/include/network/uri/detail/decode.hpp + /usr/local/src/asymptote-2.78/LspCpp/third_party/uri/include/network/uri/detail/translate.hpp + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/lsp_completion.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/utils.h + /usr/include/c++/11/codecvt + /usr/include/c++/11/bits/codecvt.h + /usr/include/c++/11/locale + /usr/include/c++/11/bits/locale_facets_nonio.h + /usr/include/c++/11/x86_64-redhat-linux/bits/time_members.h + /usr/include/c++/11/x86_64-redhat-linux/bits/messages_members.h + /usr/include/libintl.h + /usr/include/c++/11/bits/locale_facets_nonio.tcc + /usr/include/c++/11/bits/locale_conv.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/client/registerCapability.h + /usr/include/boost/uuid/uuid.hpp + /usr/include/boost/uuid/detail/config.hpp + /usr/include/boost/uuid/detail/uuid_x86.ipp + /usr/lib/gcc/x86_64-redhat-linux/11/include/emmintrin.h + /usr/lib/gcc/x86_64-redhat-linux/11/include/xmmintrin.h + /usr/lib/gcc/x86_64-redhat-linux/11/include/mmintrin.h + /usr/lib/gcc/x86_64-redhat-linux/11/include/mm_malloc.h + /usr/include/c++/11/stdlib.h + /usr/include/boost/uuid/uuid_io.hpp + /usr/include/boost/io/ios_state.hpp + /usr/include/boost/io_fwd.hpp + /usr/include/boost/uuid/uuid_generators.hpp + /usr/include/boost/uuid/nil_generator.hpp + /usr/include/boost/uuid/string_generator.hpp + /usr/include/boost/uuid/name_generator.hpp + /usr/include/boost/uuid/name_generator_sha1.hpp + /usr/include/boost/uuid/basic_name_generator.hpp + /usr/include/boost/uuid/detail/sha1.hpp + /usr/include/boost/uuid/random_generator.hpp + /usr/include/boost/random/mersenne_twister.hpp + /usr/include/boost/integer/integer_mask.hpp + /usr/include/boost/integer_fwd.hpp + /usr/include/boost/limits.hpp + /usr/include/boost/integer.hpp + /usr/include/boost/integer_traits.hpp + /usr/include/boost/random/detail/config.hpp + /usr/include/boost/random/detail/ptr_helper.hpp + /usr/include/boost/random/detail/seed.hpp + /usr/include/boost/utility/enable_if.hpp + /usr/include/boost/random/detail/seed_impl.hpp + /usr/include/boost/config/no_tr1/cmath.hpp + /usr/include/c++/11/cmath + /usr/include/math.h + /usr/include/bits/math-vector.h + /usr/include/bits/libm-simd-decl-stubs.h + /usr/include/bits/flt-eval-method.h + /usr/include/bits/fp-logb.h + /usr/include/bits/fp-fast.h + /usr/include/bits/mathcalls-helper-functions.h + /usr/include/bits/mathcalls.h + /usr/include/bits/mathcalls-narrow.h + /usr/include/bits/iscanonical.h + /usr/include/boost/integer/static_log2.hpp + /usr/include/boost/random/traits.hpp + /usr/include/boost/type_traits/is_signed.hpp + /usr/include/boost/type_traits/make_unsigned.hpp + /usr/include/boost/type_traits/is_unsigned.hpp + /usr/include/boost/type_traits/add_const.hpp + /usr/include/boost/type_traits/add_volatile.hpp + /usr/include/boost/random/detail/const_mod.hpp + /usr/include/boost/random/detail/large_arithmetic.hpp + /usr/include/boost/random/detail/integer_log2.hpp + /usr/include/boost/integer/integer_log2.hpp + /usr/include/boost/random/detail/disable_warnings.hpp + /usr/include/boost/random/detail/enable_warnings.hpp + /usr/include/boost/random/detail/signed_unsigned_tools.hpp + /usr/include/boost/random/detail/generator_bits.hpp + /usr/include/boost/random/detail/generator_seed_seq.hpp + /usr/include/boost/random/detail/polynomial.hpp + /usr/include/boost/random/uniform_int.hpp + /usr/include/boost/random/uniform_int_distribution.hpp + /usr/include/boost/random/detail/operators.hpp + /usr/include/boost/random/detail/uniform_int_float.hpp + /usr/include/boost/random/variate_generator.hpp + /usr/include/boost/tti/has_member_function.hpp + /usr/include/boost/function_types/property_tags.hpp + /usr/include/boost/mpl/bitxor.hpp + /usr/include/boost/mpl/aux_/arithmetic_op.hpp + /usr/include/boost/mpl/integral_c.hpp + /usr/include/boost/mpl/integral_c_fwd.hpp + /usr/include/boost/mpl/aux_/config/workaround.hpp + /usr/include/boost/mpl/aux_/adl_barrier.hpp + /usr/include/boost/mpl/aux_/config/adl.hpp + /usr/include/boost/mpl/aux_/config/msvc.hpp + /usr/include/boost/mpl/aux_/config/intel.hpp + /usr/include/boost/mpl/aux_/config/gcc.hpp + /usr/include/boost/mpl/aux_/config/ctps.hpp + /usr/include/boost/mpl/aux_/config/static_constant.hpp + /usr/include/boost/mpl/aux_/integral_wrapper.hpp + /usr/include/boost/mpl/integral_c_tag.hpp + /usr/include/boost/mpl/aux_/static_cast.hpp + /usr/include/boost/mpl/aux_/nttp_decl.hpp + /usr/include/boost/mpl/aux_/config/nttp.hpp + /usr/include/boost/mpl/aux_/largest_int.hpp + /usr/include/boost/mpl/if.hpp + /usr/include/boost/mpl/aux_/value_wknd.hpp + /usr/include/boost/mpl/aux_/config/integral.hpp + /usr/include/boost/mpl/aux_/config/eti.hpp + /usr/include/boost/mpl/aux_/na_spec.hpp + /usr/include/boost/mpl/lambda_fwd.hpp + /usr/include/boost/mpl/void_fwd.hpp + /usr/include/boost/mpl/aux_/na.hpp + /usr/include/boost/mpl/bool.hpp + /usr/include/boost/mpl/bool_fwd.hpp + /usr/include/boost/mpl/aux_/na_fwd.hpp + /usr/include/boost/mpl/aux_/config/lambda.hpp + /usr/include/boost/mpl/aux_/config/ttp.hpp + /usr/include/boost/mpl/int.hpp + /usr/include/boost/mpl/int_fwd.hpp + /usr/include/boost/mpl/aux_/lambda_arity_param.hpp + /usr/include/boost/mpl/aux_/template_arity_fwd.hpp + /usr/include/boost/mpl/aux_/arity.hpp + /usr/include/boost/mpl/aux_/config/dtp.hpp + /usr/include/boost/mpl/aux_/preprocessor/params.hpp + /usr/include/boost/mpl/aux_/config/preprocessor.hpp + /usr/include/boost/preprocessor/comma_if.hpp + /usr/include/boost/preprocessor/repeat.hpp + /usr/include/boost/preprocessor/inc.hpp + /usr/include/boost/mpl/aux_/preprocessor/enum.hpp + /usr/include/boost/mpl/aux_/preprocessor/def_params_tail.hpp + /usr/include/boost/mpl/limits/arity.hpp + /usr/include/boost/preprocessor/logical/and.hpp + /usr/include/boost/preprocessor/logical/bitand.hpp + /usr/include/boost/preprocessor/identity.hpp + /usr/include/boost/preprocessor/facilities/identity.hpp + /usr/include/boost/preprocessor/empty.hpp + /usr/include/boost/preprocessor/arithmetic/add.hpp + /usr/include/boost/preprocessor/control/while.hpp + /usr/include/boost/preprocessor/list/fold_left.hpp + /usr/include/boost/preprocessor/list/detail/fold_left.hpp + /usr/include/boost/preprocessor/control/expr_iif.hpp + /usr/include/boost/preprocessor/list/adt.hpp + /usr/include/boost/preprocessor/detail/is_binary.hpp + /usr/include/boost/preprocessor/detail/check.hpp + /usr/include/boost/preprocessor/logical/compl.hpp + /usr/include/boost/preprocessor/list/detail/limits/fold_left_256.hpp + /usr/include/boost/preprocessor/list/limits/fold_left_256.hpp + /usr/include/boost/preprocessor/list/fold_right.hpp + /usr/include/boost/preprocessor/list/detail/fold_right.hpp + /usr/include/boost/preprocessor/list/reverse.hpp + /usr/include/boost/preprocessor/list/detail/limits/fold_right_256.hpp + /usr/include/boost/preprocessor/control/detail/while.hpp + /usr/include/boost/preprocessor/control/detail/limits/while_256.hpp + /usr/include/boost/preprocessor/control/limits/while_256.hpp + /usr/include/boost/preprocessor/logical/bitor.hpp + /usr/include/boost/preprocessor/arithmetic/detail/is_maximum_number.hpp + /usr/include/boost/preprocessor/comparison/equal.hpp + /usr/include/boost/preprocessor/comparison/not_equal.hpp + /usr/include/boost/preprocessor/comparison/limits/not_equal_256.hpp + /usr/include/boost/preprocessor/arithmetic/detail/maximum_number.hpp + /usr/include/boost/preprocessor/arithmetic/detail/is_minimum_number.hpp + /usr/include/boost/preprocessor/logical/not.hpp + /usr/include/boost/preprocessor/arithmetic/sub.hpp + /usr/include/boost/mpl/aux_/config/overload_resolution.hpp + /usr/include/boost/mpl/aux_/lambda_support.hpp + /usr/include/boost/mpl/aux_/numeric_op.hpp + /usr/include/boost/mpl/numeric_cast.hpp + /usr/include/boost/mpl/apply_wrap.hpp + /usr/include/boost/mpl/aux_/has_apply.hpp + /usr/include/boost/mpl/has_xxx.hpp + /usr/include/boost/mpl/aux_/type_wrapper.hpp + /usr/include/boost/mpl/aux_/yes_no.hpp + /usr/include/boost/mpl/aux_/config/arrays.hpp + /usr/include/boost/mpl/aux_/config/has_xxx.hpp + /usr/include/boost/mpl/aux_/config/msvc_typename.hpp + /usr/include/boost/mpl/aux_/config/has_apply.hpp + /usr/include/boost/mpl/aux_/msvc_never_true.hpp + /usr/include/boost/mpl/aux_/config/use_preprocessed.hpp + /usr/include/boost/mpl/aux_/include_preprocessed.hpp + /usr/include/boost/mpl/aux_/config/compiler.hpp + /usr/include/boost/preprocessor/stringize.hpp + /usr/include/boost/mpl/aux_/preprocessed/gcc/apply_wrap.hpp + /usr/include/boost/mpl/tag.hpp + /usr/include/boost/mpl/eval_if.hpp + /usr/include/boost/mpl/void.hpp + /usr/include/boost/mpl/aux_/has_tag.hpp + /usr/include/boost/mpl/aux_/numeric_cast_utils.hpp + /usr/include/boost/mpl/aux_/config/forwarding.hpp + /usr/include/boost/mpl/aux_/msvc_eti_base.hpp + /usr/include/boost/mpl/aux_/is_msvc_eti_arg.hpp + /usr/include/boost/mpl/aux_/preprocessed/gcc/bitxor.hpp + /usr/include/boost/function_types/detail/pp_tags/preprocessed.hpp + /usr/include/boost/function_types/detail/pp_loop.hpp + /usr/include/boost/preprocessor/punctuation/paren.hpp + /usr/include/boost/function_types/detail/encoding/def.hpp + /usr/include/boost/function_types/detail/encoding/aliases_def.hpp + /usr/include/boost/function_types/detail/pp_cc_loop/preprocessed.hpp + /usr/include/boost/function_types/detail/pp_tags/cc_tag.hpp + /usr/include/boost/function_types/detail/encoding/aliases_undef.hpp + /usr/include/boost/function_types/detail/encoding/undef.hpp + /usr/include/boost/mpl/vector.hpp + /usr/include/boost/mpl/limits/vector.hpp + /usr/include/boost/mpl/vector/vector20.hpp + /usr/include/boost/mpl/vector/vector10.hpp + /usr/include/boost/mpl/vector/vector0.hpp + /usr/include/boost/mpl/vector/aux_/at.hpp + /usr/include/boost/mpl/at_fwd.hpp + /usr/include/boost/mpl/vector/aux_/tag.hpp + /usr/include/boost/mpl/aux_/config/typeof.hpp + /usr/include/boost/mpl/long.hpp + /usr/include/boost/mpl/long_fwd.hpp + /usr/include/boost/mpl/vector/aux_/front.hpp + /usr/include/boost/mpl/front_fwd.hpp + /usr/include/boost/mpl/vector/aux_/push_front.hpp + /usr/include/boost/mpl/push_front_fwd.hpp + /usr/include/boost/mpl/vector/aux_/item.hpp + /usr/include/boost/mpl/next_prior.hpp + /usr/include/boost/mpl/aux_/common_name_wknd.hpp + /usr/include/boost/mpl/vector/aux_/pop_front.hpp + /usr/include/boost/mpl/pop_front_fwd.hpp + /usr/include/boost/mpl/vector/aux_/push_back.hpp + /usr/include/boost/mpl/push_back_fwd.hpp + /usr/include/boost/mpl/vector/aux_/pop_back.hpp + /usr/include/boost/mpl/pop_back_fwd.hpp + /usr/include/boost/mpl/vector/aux_/back.hpp + /usr/include/boost/mpl/back_fwd.hpp + /usr/include/boost/mpl/vector/aux_/clear.hpp + /usr/include/boost/mpl/clear_fwd.hpp + /usr/include/boost/mpl/vector/aux_/vector0.hpp + /usr/include/boost/mpl/vector/aux_/iterator.hpp + /usr/include/boost/mpl/iterator_tags.hpp + /usr/include/boost/mpl/plus.hpp + /usr/include/boost/mpl/aux_/preprocessed/gcc/plus.hpp + /usr/include/boost/mpl/minus.hpp + /usr/include/boost/mpl/aux_/preprocessed/gcc/minus.hpp + /usr/include/boost/mpl/advance_fwd.hpp + /usr/include/boost/mpl/distance_fwd.hpp + /usr/include/boost/mpl/next.hpp + /usr/include/boost/mpl/prior.hpp + /usr/include/boost/mpl/vector/aux_/O1_size.hpp + /usr/include/boost/mpl/O1_size_fwd.hpp + /usr/include/boost/mpl/vector/aux_/size.hpp + /usr/include/boost/mpl/size_fwd.hpp + /usr/include/boost/mpl/vector/aux_/empty.hpp + /usr/include/boost/mpl/empty_fwd.hpp + /usr/include/boost/mpl/vector/aux_/begin_end.hpp + /usr/include/boost/mpl/begin_end_fwd.hpp + /usr/include/boost/mpl/vector/aux_/include_preprocessed.hpp + /usr/include/boost/mpl/vector/aux_/preprocessed/typeof_based/vector10.hpp + /usr/include/boost/mpl/vector/aux_/preprocessed/typeof_based/vector20.hpp + /usr/include/boost/mpl/aux_/preprocessed/gcc/vector.hpp + /usr/include/boost/tti/detail/ddeftype.hpp + /usr/include/boost/tti/detail/dmem_fun.hpp + /usr/include/boost/function_types/is_member_function_pointer.hpp + /usr/include/boost/function_types/components.hpp + /usr/include/boost/mpl/remove.hpp + /usr/include/boost/mpl/remove_if.hpp + /usr/include/boost/mpl/fold.hpp + /usr/include/boost/mpl/begin_end.hpp + /usr/include/boost/mpl/aux_/begin_end_impl.hpp + /usr/include/boost/mpl/sequence_tag_fwd.hpp + /usr/include/boost/mpl/aux_/has_begin.hpp + /usr/include/boost/mpl/aux_/traits_lambda_spec.hpp + /usr/include/boost/mpl/sequence_tag.hpp + /usr/include/boost/mpl/O1_size.hpp + /usr/include/boost/mpl/aux_/O1_size_impl.hpp + /usr/include/boost/mpl/aux_/has_size.hpp + /usr/include/boost/mpl/aux_/fold_impl.hpp + /usr/include/boost/mpl/apply.hpp + /usr/include/boost/mpl/apply_fwd.hpp + /usr/include/boost/mpl/aux_/preprocessed/gcc/apply_fwd.hpp + /usr/include/boost/mpl/placeholders.hpp + /usr/include/boost/mpl/arg.hpp + /usr/include/boost/mpl/arg_fwd.hpp + /usr/include/boost/mpl/aux_/na_assert.hpp + /usr/include/boost/mpl/assert.hpp + /usr/include/boost/mpl/not.hpp + /usr/include/boost/mpl/aux_/nested_type_wknd.hpp + /usr/include/boost/mpl/aux_/config/gpu.hpp + /usr/include/boost/mpl/aux_/config/pp_counter.hpp + /usr/include/boost/mpl/aux_/arity_spec.hpp + /usr/include/boost/mpl/aux_/arg_typedef.hpp + /usr/include/boost/mpl/aux_/preprocessed/gcc/arg.hpp + /usr/include/boost/mpl/aux_/preprocessed/gcc/placeholders.hpp + /usr/include/boost/mpl/lambda.hpp + /usr/include/boost/mpl/bind.hpp + /usr/include/boost/mpl/bind_fwd.hpp + /usr/include/boost/mpl/aux_/config/bind.hpp + /usr/include/boost/mpl/aux_/preprocessed/gcc/bind_fwd.hpp + /usr/include/boost/mpl/protect.hpp + /usr/include/boost/mpl/aux_/preprocessed/gcc/bind.hpp + /usr/include/boost/mpl/aux_/full_lambda.hpp + /usr/include/boost/mpl/quote.hpp + /usr/include/boost/mpl/aux_/has_type.hpp + /usr/include/boost/mpl/aux_/config/bcc.hpp + /usr/include/boost/mpl/aux_/preprocessed/gcc/quote.hpp + /usr/include/boost/mpl/aux_/template_arity.hpp + /usr/include/boost/mpl/aux_/preprocessed/gcc/template_arity.hpp + /usr/include/boost/mpl/aux_/preprocessed/gcc/full_lambda.hpp + /usr/include/boost/mpl/aux_/preprocessed/gcc/apply.hpp + /usr/include/boost/mpl/deref.hpp + /usr/include/boost/mpl/aux_/msvc_type.hpp + /usr/include/boost/mpl/aux_/preprocessed/gcc/fold_impl.hpp + /usr/include/boost/mpl/reverse_fold.hpp + /usr/include/boost/mpl/aux_/reverse_fold_impl.hpp + /usr/include/boost/mpl/aux_/preprocessed/gcc/reverse_fold_impl.hpp + /usr/include/boost/mpl/identity.hpp + /usr/include/boost/mpl/aux_/inserter_algorithm.hpp + /usr/include/boost/mpl/back_inserter.hpp + /usr/include/boost/mpl/push_back.hpp + /usr/include/boost/mpl/aux_/push_back_impl.hpp + /usr/include/boost/mpl/inserter.hpp + /usr/include/boost/mpl/front_inserter.hpp + /usr/include/boost/mpl/push_front.hpp + /usr/include/boost/mpl/aux_/push_front_impl.hpp + /usr/include/boost/mpl/clear.hpp + /usr/include/boost/mpl/aux_/clear_impl.hpp + /usr/include/boost/mpl/aux_/preprocessor/default_params.hpp + /usr/include/boost/mpl/same_as.hpp + /usr/include/boost/mpl/aux_/lambda_spec.hpp + /usr/include/boost/function_types/config/config.hpp + /usr/include/boost/function_types/config/compiler.hpp + /usr/include/boost/function_types/config/cc_names.hpp + /usr/include/boost/mpl/vector/vector30.hpp + /usr/include/boost/mpl/vector/aux_/preprocessed/typeof_based/vector30.hpp + /usr/include/boost/function_types/detail/class_transform.hpp + /usr/include/boost/mpl/always.hpp + /usr/include/boost/type_traits/add_reference.hpp + /usr/include/boost/function_types/detail/pp_variate_loop/preprocessed.hpp + /usr/include/boost/function_types/detail/pp_arity_loop.hpp + /usr/include/boost/function_types/detail/components_impl/arity20_0.hpp + /usr/include/boost/function_types/detail/components_impl/arity10_0.hpp + /usr/include/boost/function_types/detail/components_impl/arity20_1.hpp + /usr/include/boost/function_types/detail/components_impl/arity10_1.hpp + /usr/include/boost/function_types/detail/components_as_mpl_sequence.hpp + /usr/include/boost/function_types/detail/retag_default_cc.hpp + /usr/include/boost/mpl/bitand.hpp + /usr/include/boost/mpl/aux_/preprocessed/gcc/bitand.hpp + /usr/include/boost/function_types/detail/pp_retag_default_cc/preprocessed.hpp + /usr/include/boost/mpl/and.hpp + /usr/include/boost/mpl/aux_/preprocessed/gcc/and.hpp + /usr/include/boost/mpl/logical.hpp + /usr/include/boost/mpl/or.hpp + /usr/include/boost/mpl/aux_/preprocessed/gcc/or.hpp + /usr/include/boost/tti/detail/dcomp_mem_fun.hpp + /usr/include/boost/tti/detail/dftclass.hpp + /usr/include/boost/function_types/parameter_types.hpp + /usr/include/boost/blank.hpp + /usr/include/boost/blank_fwd.hpp + /usr/include/boost/detail/templated_streams.hpp + /usr/include/boost/type_traits/is_empty.hpp + /usr/include/boost/type_traits/is_convertible.hpp + /usr/include/boost/type_traits/is_abstract.hpp + /usr/include/boost/type_traits/add_lvalue_reference.hpp + /usr/include/boost/type_traits/is_stateless.hpp + /usr/include/boost/type_traits/has_trivial_constructor.hpp + /usr/include/boost/type_traits/has_trivial_copy.hpp + /usr/include/boost/type_traits/is_copy_constructible.hpp + /usr/include/boost/type_traits/has_trivial_destructor.hpp + /usr/include/boost/mpl/pop_front.hpp + /usr/include/boost/mpl/aux_/pop_front_impl.hpp + /usr/include/boost/function_types/is_callable_builtin.hpp + /usr/include/boost/mpl/at.hpp + /usr/include/boost/mpl/aux_/at_impl.hpp + /usr/include/boost/mpl/advance.hpp + /usr/include/boost/mpl/less.hpp + /usr/include/boost/mpl/aux_/comparison_op.hpp + /usr/include/boost/mpl/aux_/preprocessed/gcc/less.hpp + /usr/include/boost/mpl/negate.hpp + /usr/include/boost/mpl/aux_/advance_forward.hpp + /usr/include/boost/mpl/aux_/preprocessed/gcc/advance_forward.hpp + /usr/include/boost/mpl/aux_/advance_backward.hpp + /usr/include/boost/mpl/aux_/preprocessed/gcc/advance_backward.hpp + /usr/include/boost/tti/detail/dmacro_sunfix.hpp + /usr/include/boost/tti/detail/dnullptr.hpp + /usr/include/boost/tti/gen/namespace_gen.hpp + /usr/include/boost/tti/detail/denclosing_type.hpp + /usr/include/boost/type_traits/is_union.hpp + /usr/include/boost/tti/detail/dptmf.hpp + /usr/include/boost/function_types/member_function_pointer.hpp + /usr/include/boost/function_types/detail/synthesize.hpp + /usr/include/boost/mpl/size.hpp + /usr/include/boost/mpl/aux_/size_impl.hpp + /usr/include/boost/mpl/distance.hpp + /usr/include/boost/mpl/iter_fold.hpp + /usr/include/boost/mpl/aux_/iter_fold_impl.hpp + /usr/include/boost/mpl/aux_/preprocessed/gcc/iter_fold_impl.hpp + /usr/include/boost/mpl/iterator_range.hpp + /usr/include/boost/function_types/detail/cv_traits.hpp + /usr/include/boost/function_types/detail/synthesize_impl/arity20_0.hpp + /usr/include/boost/function_types/detail/synthesize_impl/arity10_0.hpp + /usr/include/boost/function_types/detail/synthesize_impl/arity20_1.hpp + /usr/include/boost/function_types/detail/synthesize_impl/arity10_1.hpp + /usr/include/boost/function_types/detail/to_sequence.hpp + /usr/include/boost/mpl/is_sequence.hpp + /usr/include/boost/tti/gen/has_member_function_gen.hpp + /usr/include/boost/uuid/detail/random_provider.hpp + /usr/include/boost/uuid/entropy_error.hpp + /usr/include/boost/uuid/detail/random_provider_detect_platform.hpp + /usr/include/boost/predef/library/c/cloudabi.h + /usr/include/boost/predef/version_number.h + /usr/include/boost/predef/make.h + /usr/include/boost/predef/detail/test.h + /usr/include/boost/predef/library/c/_prefix.h + /usr/include/boost/predef/detail/_cassert.h + /usr/include/boost/predef/library/c/gnu.h + /usr/include/boost/predef/os/bsd/open.h + /usr/include/boost/predef/os/bsd.h + /usr/include/boost/predef/os/macos.h + /usr/include/boost/predef/os/ios.h + /usr/include/boost/predef/os/bsd/bsdi.h + /usr/include/boost/predef/os/bsd/dragonfly.h + /usr/include/boost/predef/os/bsd/free.h + /usr/include/boost/predef/os/bsd/net.h + /usr/include/boost/predef/os/windows.h + /usr/include/sys/syscall.h + /usr/include/asm/unistd.h + /usr/include/asm/unistd_64.h + /usr/include/bits/syscall.h + /usr/include/boost/uuid/detail/random_provider_include_platform.hpp + /usr/include/boost/uuid/detail/random_provider_getrandom.ipp + /usr/include/sys/random.h + +CMakeFiles/lspcpp.dir/src/lsp/lsp_diagnostic.cpp.o + /usr/local/src/asymptote-2.78/LspCpp/src/lsp/lsp_diagnostic.cpp + /usr/include/stdc-predef.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/lsp_diagnostic.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/lsRange.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/JsonRpc/serializer.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/JsonRpc/macro_map.h + /usr/include/boost/optional.hpp + /usr/include/boost/optional/optional.hpp + /usr/include/c++/11/new + /usr/include/c++/11/x86_64-redhat-linux/bits/c++config.h + /usr/include/bits/wordsize.h + /usr/include/c++/11/x86_64-redhat-linux/bits/os_defines.h + /usr/include/features.h + /usr/include/sys/cdefs.h + /usr/include/bits/long-double.h + /usr/include/gnu/stubs.h + /usr/include/gnu/stubs-64.h + /usr/include/c++/11/x86_64-redhat-linux/bits/cpu_defines.h + /usr/include/c++/11/bits/exception.h + /usr/include/c++/11/iosfwd + /usr/include/c++/11/bits/stringfwd.h + /usr/include/c++/11/bits/memoryfwd.h + /usr/include/c++/11/bits/postypes.h + /usr/include/c++/11/cwchar + /usr/include/wchar.h + /usr/include/bits/libc-header-start.h + /usr/include/bits/floatn.h + /usr/include/bits/floatn-common.h + /usr/lib/gcc/x86_64-redhat-linux/11/include/stddef.h + /usr/lib/gcc/x86_64-redhat-linux/11/include/stdarg.h + /usr/include/bits/wchar.h + /usr/include/bits/types/wint_t.h + /usr/include/bits/types/mbstate_t.h + /usr/include/bits/types/__mbstate_t.h + /usr/include/bits/types/__FILE.h + /usr/include/bits/types/FILE.h + /usr/include/bits/types/locale_t.h + /usr/include/bits/types/__locale_t.h + /usr/include/boost/assert.hpp + /usr/include/assert.h + /usr/include/boost/core/addressof.hpp + /usr/include/boost/config.hpp + /usr/include/boost/config/user.hpp + /usr/include/boost/config/detail/select_compiler_config.hpp + /usr/include/boost/config/compiler/gcc.hpp + /usr/include/c++/11/cstddef + /usr/include/boost/config/detail/select_stdlib_config.hpp + /usr/include/c++/11/version + /usr/include/boost/config/stdlib/libstdcpp3.hpp + /usr/include/unistd.h + /usr/include/bits/posix_opt.h + /usr/include/bits/environments.h + /usr/include/bits/types.h + /usr/include/bits/timesize.h + /usr/include/bits/typesizes.h + /usr/include/bits/time64.h + /usr/include/bits/confname.h + /usr/include/bits/getopt_posix.h + /usr/include/bits/getopt_core.h + /usr/include/bits/unistd_ext.h + /usr/include/boost/config/detail/select_platform_config.hpp + /usr/include/boost/config/platform/linux.hpp + /usr/include/c++/11/cstdlib + /usr/include/stdlib.h + /usr/include/bits/waitflags.h + /usr/include/bits/waitstatus.h + /usr/include/sys/types.h + /usr/include/bits/types/clock_t.h + /usr/include/bits/types/clockid_t.h + /usr/include/bits/types/time_t.h + /usr/include/bits/types/timer_t.h + /usr/include/bits/stdint-intn.h + /usr/include/endian.h + /usr/include/bits/endian.h + /usr/include/bits/endianness.h + /usr/include/bits/byteswap.h + /usr/include/bits/uintn-identity.h + /usr/include/sys/select.h + /usr/include/bits/select.h + /usr/include/bits/types/sigset_t.h + /usr/include/bits/types/__sigset_t.h + /usr/include/bits/types/struct_timeval.h + /usr/include/bits/types/struct_timespec.h + /usr/include/bits/pthreadtypes.h + /usr/include/bits/thread-shared-types.h + /usr/include/bits/pthreadtypes-arch.h + /usr/include/bits/struct_mutex.h + /usr/include/bits/struct_rwlock.h + /usr/include/alloca.h + /usr/include/bits/stdlib-bsearch.h + /usr/include/bits/stdlib-float.h + /usr/include/c++/11/bits/std_abs.h + /usr/include/boost/config/detail/posix_features.hpp + /usr/include/boost/config/detail/suffix.hpp + /usr/include/boost/config/helper_macros.hpp + /usr/include/boost/core/enable_if.hpp + /usr/include/boost/core/explicit_operator_bool.hpp + /usr/include/boost/config/workaround.hpp + /usr/include/boost/core/swap.hpp + /usr/include/c++/11/utility + /usr/include/c++/11/bits/stl_relops.h + /usr/include/c++/11/bits/stl_pair.h + /usr/include/c++/11/bits/move.h + /usr/include/c++/11/type_traits + /usr/include/c++/11/initializer_list + /usr/include/boost/optional/bad_optional_access.hpp + /usr/include/c++/11/stdexcept + /usr/include/c++/11/exception + /usr/include/c++/11/bits/exception_ptr.h + /usr/include/c++/11/bits/exception_defines.h + /usr/include/c++/11/bits/cxxabi_init_exception.h + /usr/include/c++/11/typeinfo + /usr/include/c++/11/bits/hash_bytes.h + /usr/include/c++/11/bits/nested_exception.h + /usr/include/c++/11/string + /usr/include/c++/11/bits/char_traits.h + /usr/include/c++/11/bits/stl_algobase.h + /usr/include/c++/11/bits/functexcept.h + /usr/include/c++/11/bits/cpp_type_traits.h + /usr/include/c++/11/ext/type_traits.h + /usr/include/c++/11/ext/numeric_traits.h + /usr/include/c++/11/bits/stl_iterator_base_types.h + /usr/include/c++/11/bits/stl_iterator_base_funcs.h + /usr/include/c++/11/bits/concept_check.h + /usr/include/c++/11/debug/assertions.h + /usr/include/c++/11/bits/stl_iterator.h + /usr/include/c++/11/bits/ptr_traits.h + /usr/include/c++/11/debug/debug.h + /usr/include/c++/11/bits/predefined_ops.h + /usr/include/c++/11/cstdint + /usr/lib/gcc/x86_64-redhat-linux/11/include/stdint.h + /usr/include/stdint.h + /usr/include/bits/stdint-uintn.h + /usr/include/c++/11/bits/allocator.h + /usr/include/c++/11/x86_64-redhat-linux/bits/c++allocator.h + /usr/include/c++/11/ext/new_allocator.h + /usr/include/c++/11/bits/localefwd.h + /usr/include/c++/11/x86_64-redhat-linux/bits/c++locale.h + /usr/include/c++/11/clocale + /usr/include/locale.h + /usr/include/bits/locale.h + /usr/include/c++/11/cctype + /usr/include/ctype.h + /usr/include/c++/11/bits/ostream_insert.h + /usr/include/c++/11/bits/cxxabi_forced.h + /usr/include/c++/11/bits/stl_function.h + /usr/include/c++/11/backward/binders.h + /usr/include/c++/11/bits/range_access.h + /usr/include/c++/11/bits/basic_string.h + /usr/include/c++/11/ext/atomicity.h + /usr/include/c++/11/x86_64-redhat-linux/bits/gthr.h + /usr/include/c++/11/x86_64-redhat-linux/bits/gthr-default.h + /usr/include/pthread.h + /usr/include/sched.h + /usr/include/bits/sched.h + /usr/include/bits/types/struct_sched_param.h + /usr/include/bits/cpu-set.h + /usr/include/time.h + /usr/include/bits/time.h + /usr/include/bits/timex.h + /usr/include/bits/types/struct_tm.h + /usr/include/bits/types/struct_itimerspec.h + /usr/include/bits/setjmp.h + /usr/include/bits/types/struct___jmp_buf_tag.h + /usr/include/c++/11/x86_64-redhat-linux/bits/atomic_word.h + /usr/include/sys/single_threaded.h + /usr/include/c++/11/ext/alloc_traits.h + /usr/include/c++/11/bits/alloc_traits.h + /usr/include/c++/11/bits/stl_construct.h + /usr/include/c++/11/ext/string_conversions.h + /usr/include/c++/11/cstdio + /usr/include/stdio.h + /usr/include/bits/types/__fpos_t.h + /usr/include/bits/types/__fpos64_t.h + /usr/include/bits/types/struct_FILE.h + /usr/include/bits/types/cookie_io_functions_t.h + /usr/include/bits/stdio_lim.h + /usr/include/bits/stdio.h + /usr/include/c++/11/cerrno + /usr/include/errno.h + /usr/include/bits/errno.h + /usr/include/linux/errno.h + /usr/include/asm/errno.h + /usr/include/asm-generic/errno.h + /usr/include/asm-generic/errno-base.h + /usr/include/bits/types/error_t.h + /usr/include/c++/11/bits/charconv.h + /usr/include/c++/11/bits/functional_hash.h + /usr/include/c++/11/bits/basic_string.tcc + /usr/include/boost/static_assert.hpp + /usr/include/boost/detail/workaround.hpp + /usr/include/boost/throw_exception.hpp + /usr/include/boost/assert/source_location.hpp + /usr/include/boost/current_function.hpp + /usr/include/boost/cstdint.hpp + /usr/include/boost/exception/exception.hpp + /usr/include/boost/type.hpp + /usr/include/boost/type_traits/alignment_of.hpp + /usr/include/boost/type_traits/intrinsics.hpp + /usr/include/boost/type_traits/detail/config.hpp + /usr/include/boost/version.hpp + /usr/include/boost/type_traits/integral_constant.hpp + /usr/include/boost/type_traits/conditional.hpp + /usr/include/boost/type_traits/has_nothrow_constructor.hpp + /usr/include/boost/type_traits/is_default_constructible.hpp + /usr/include/boost/type_traits/is_complete.hpp + /usr/include/boost/type_traits/declval.hpp + /usr/include/boost/type_traits/add_rvalue_reference.hpp + /usr/include/boost/type_traits/is_void.hpp + /usr/include/boost/type_traits/is_reference.hpp + /usr/include/boost/type_traits/is_lvalue_reference.hpp + /usr/include/boost/type_traits/is_rvalue_reference.hpp + /usr/include/boost/type_traits/remove_reference.hpp + /usr/include/boost/type_traits/is_function.hpp + /usr/include/boost/type_traits/detail/is_function_cxx_11.hpp + /usr/include/boost/type_traits/detail/yes_no_type.hpp + /usr/include/boost/type_traits/type_with_alignment.hpp + /usr/include/boost/type_traits/is_pod.hpp + /usr/include/boost/type_traits/is_scalar.hpp + /usr/include/boost/type_traits/is_arithmetic.hpp + /usr/include/boost/type_traits/is_integral.hpp + /usr/include/boost/type_traits/is_floating_point.hpp + /usr/include/boost/type_traits/is_enum.hpp + /usr/include/boost/type_traits/is_pointer.hpp + /usr/include/boost/type_traits/is_member_pointer.hpp + /usr/include/boost/type_traits/is_member_function_pointer.hpp + /usr/include/boost/type_traits/detail/is_member_function_pointer_cxx_11.hpp + /usr/include/boost/type_traits/remove_const.hpp + /usr/include/boost/type_traits/decay.hpp + /usr/include/boost/type_traits/is_array.hpp + /usr/include/boost/type_traits/remove_bounds.hpp + /usr/include/boost/type_traits/remove_extent.hpp + /usr/include/boost/type_traits/add_pointer.hpp + /usr/include/boost/type_traits/remove_cv.hpp + /usr/include/boost/type_traits/is_base_of.hpp + /usr/include/boost/type_traits/is_base_and_derived.hpp + /usr/include/boost/type_traits/is_same.hpp + /usr/include/boost/type_traits/is_class.hpp + /usr/include/boost/type_traits/is_const.hpp + /usr/include/boost/type_traits/is_constructible.hpp + /usr/include/boost/type_traits/is_destructible.hpp + /usr/include/boost/type_traits/is_nothrow_move_assignable.hpp + /usr/include/boost/type_traits/has_trivial_move_assign.hpp + /usr/include/boost/type_traits/is_assignable.hpp + /usr/include/boost/type_traits/is_volatile.hpp + /usr/include/boost/type_traits/has_nothrow_assign.hpp + /usr/include/boost/type_traits/enable_if.hpp + /usr/include/boost/type_traits/is_nothrow_move_constructible.hpp + /usr/include/boost/move/utility.hpp + /usr/include/boost/move/detail/config_begin.hpp + /usr/include/boost/move/detail/workaround.hpp + /usr/include/boost/move/utility_core.hpp + /usr/include/boost/move/core.hpp + /usr/include/boost/move/detail/config_end.hpp + /usr/include/boost/move/detail/meta_utils.hpp + /usr/include/boost/move/detail/meta_utils_core.hpp + /usr/include/boost/move/traits.hpp + /usr/include/boost/move/detail/type_traits.hpp + /usr/include/boost/none.hpp + /usr/include/boost/none_t.hpp + /usr/include/boost/utility/compare_pointees.hpp + /usr/include/c++/11/functional + /usr/include/c++/11/tuple + /usr/include/c++/11/array + /usr/include/c++/11/bits/uses_allocator.h + /usr/include/c++/11/bits/invoke.h + /usr/include/c++/11/bits/refwrap.h + /usr/include/c++/11/bits/std_function.h + /usr/include/boost/utility/result_of.hpp + /usr/include/boost/preprocessor/cat.hpp + /usr/include/boost/preprocessor/config/config.hpp + /usr/include/boost/preprocessor/iteration/iterate.hpp + /usr/include/boost/preprocessor/arithmetic/dec.hpp + /usr/include/boost/preprocessor/config/limits.hpp + /usr/include/boost/preprocessor/arithmetic/limits/dec_256.hpp + /usr/include/boost/preprocessor/arithmetic/inc.hpp + /usr/include/boost/preprocessor/arithmetic/limits/inc_256.hpp + /usr/include/boost/preprocessor/array/elem.hpp + /usr/include/boost/preprocessor/array/data.hpp + /usr/include/boost/preprocessor/tuple/elem.hpp + /usr/include/boost/preprocessor/facilities/expand.hpp + /usr/include/boost/preprocessor/facilities/overload.hpp + /usr/include/boost/preprocessor/variadic/size.hpp + /usr/include/boost/preprocessor/control/iif.hpp + /usr/include/boost/preprocessor/facilities/check_empty.hpp + /usr/include/boost/preprocessor/variadic/has_opt.hpp + /usr/include/boost/preprocessor/variadic/limits/size_64.hpp + /usr/include/boost/preprocessor/tuple/rem.hpp + /usr/include/boost/preprocessor/tuple/detail/is_single_return.hpp + /usr/include/boost/preprocessor/variadic/elem.hpp + /usr/include/boost/preprocessor/variadic/limits/elem_64.hpp + /usr/include/boost/preprocessor/array/size.hpp + /usr/include/boost/preprocessor/slot/slot.hpp + /usr/include/boost/preprocessor/slot/detail/def.hpp + /usr/include/boost/preprocessor/repetition/enum_params.hpp + /usr/include/boost/preprocessor/punctuation/comma_if.hpp + /usr/include/boost/preprocessor/control/if.hpp + /usr/include/boost/preprocessor/logical/bool.hpp + /usr/include/boost/preprocessor/logical/limits/bool_256.hpp + /usr/include/boost/preprocessor/facilities/empty.hpp + /usr/include/boost/preprocessor/punctuation/comma.hpp + /usr/include/boost/preprocessor/repetition/repeat.hpp + /usr/include/boost/preprocessor/debug/error.hpp + /usr/include/boost/preprocessor/detail/auto_rec.hpp + /usr/include/boost/preprocessor/detail/limits/auto_rec_256.hpp + /usr/include/boost/preprocessor/tuple/eat.hpp + /usr/include/boost/preprocessor/repetition/limits/repeat_256.hpp + /usr/include/boost/preprocessor/repetition/enum_trailing_params.hpp + /usr/include/boost/preprocessor/repetition/enum_binary_params.hpp + /usr/include/boost/preprocessor/repetition/enum_shifted_params.hpp + /usr/include/boost/preprocessor/facilities/intercept.hpp + /usr/include/boost/preprocessor/facilities/limits/intercept_256.hpp + /usr/include/boost/type_traits/type_identity.hpp + /usr/include/boost/preprocessor/iteration/detail/iter/forward1.hpp + /usr/include/boost/preprocessor/iteration/detail/bounds/lower1.hpp + /usr/include/boost/preprocessor/slot/detail/shared.hpp + /usr/include/boost/preprocessor/iteration/detail/bounds/upper1.hpp + /usr/include/boost/preprocessor/iteration/detail/iter/limits/forward1_256.hpp + /usr/include/boost/utility/detail/result_of_iterate.hpp + /usr/include/boost/optional/optional_fwd.hpp + /usr/include/boost/optional/detail/optional_config.hpp + /usr/include/boost/optional/detail/optional_factory_support.hpp + /usr/include/boost/optional/detail/optional_aligned_storage.hpp + /usr/include/boost/optional/detail/optional_trivially_copyable_base.hpp + /usr/include/boost/optional/detail/optional_reference_spec.hpp + /usr/include/boost/optional/detail/optional_relops.hpp + /usr/include/boost/optional/detail/optional_swap.hpp + /usr/include/c++/11/cassert + /usr/include/c++/11/memory + /usr/include/c++/11/bits/stl_uninitialized.h + /usr/include/c++/11/bits/stl_tempbuf.h + /usr/include/c++/11/bits/stl_raw_storage_iter.h + /usr/include/c++/11/bits/align.h + /usr/include/c++/11/bit + /usr/include/c++/11/bits/unique_ptr.h + /usr/include/c++/11/bits/shared_ptr.h + /usr/include/c++/11/bits/shared_ptr_base.h + /usr/include/c++/11/bits/allocated_ptr.h + /usr/include/c++/11/ext/aligned_buffer.h + /usr/include/c++/11/ext/concurrence.h + /usr/include/c++/11/bits/shared_ptr_atomic.h + /usr/include/c++/11/bits/atomic_base.h + /usr/include/c++/11/bits/atomic_lockfree_defines.h + /usr/include/c++/11/backward/auto_ptr.h + /usr/include/c++/11/vector + /usr/include/c++/11/bits/stl_vector.h + /usr/include/c++/11/bits/stl_bvector.h + /usr/include/c++/11/bits/vector.tcc + /usr/include/c++/11/map + /usr/include/c++/11/bits/stl_tree.h + /usr/include/c++/11/bits/stl_map.h + /usr/include/c++/11/bits/stl_multimap.h + /usr/include/c++/11/bits/erase_if.h + /usr/include/c++/11/algorithm + /usr/include/c++/11/bits/stl_algo.h + /usr/include/c++/11/bits/algorithmfwd.h + /usr/include/c++/11/bits/stl_heap.h + /usr/include/c++/11/bits/uniform_int_dist.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/lsPosition.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/lsTextEdit.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/lsDocumentUri.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/lsResponseError.h + /usr/include/c++/11/sstream + /usr/include/c++/11/istream + /usr/include/c++/11/ios + /usr/include/c++/11/bits/ios_base.h + /usr/include/c++/11/bits/locale_classes.h + /usr/include/c++/11/bits/locale_classes.tcc + /usr/include/c++/11/system_error + /usr/include/c++/11/x86_64-redhat-linux/bits/error_constants.h + /usr/include/c++/11/streambuf + /usr/include/c++/11/bits/streambuf.tcc + /usr/include/c++/11/bits/basic_ios.h + /usr/include/c++/11/bits/locale_facets.h + /usr/include/c++/11/cwctype + /usr/include/wctype.h + /usr/include/bits/wctype-wchar.h + /usr/include/c++/11/x86_64-redhat-linux/bits/ctype_base.h + /usr/include/c++/11/bits/streambuf_iterator.h + /usr/include/c++/11/x86_64-redhat-linux/bits/ctype_inline.h + /usr/include/c++/11/bits/locale_facets.tcc + /usr/include/c++/11/bits/basic_ios.tcc + /usr/include/c++/11/ostream + /usr/include/c++/11/bits/ostream.tcc + /usr/include/c++/11/bits/istream.tcc + /usr/include/c++/11/bits/sstream.tcc + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/lsAny.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/JsonRpc/message.h + /usr/include/c++/11/atomic + /usr/include/c++/11/iostream + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/method_type.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/location_type.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/JsonRpc/RequestInMessage.h + /usr/include/c++/11/mutex + /usr/include/c++/11/chrono + /usr/include/c++/11/ratio + /usr/include/c++/11/limits + /usr/include/c++/11/ctime + /usr/include/c++/11/bits/parse_numbers.h + /usr/include/c++/11/bits/std_mutex.h + /usr/include/c++/11/bits/unique_lock.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/JsonRpc/lsRequestId.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/JsonRpc/lsResponseMessage.h + +CMakeFiles/lspcpp.dir/src/lsp/textDocument.cpp.o + /usr/local/src/asymptote-2.78/LspCpp/src/lsp/textDocument.cpp + /usr/include/stdc-predef.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/textDocument/completion.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/JsonRpc/RequestInMessage.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/JsonRpc/serializer.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/JsonRpc/macro_map.h + /usr/include/boost/optional.hpp + /usr/include/boost/optional/optional.hpp + /usr/include/c++/11/new + /usr/include/c++/11/x86_64-redhat-linux/bits/c++config.h + /usr/include/bits/wordsize.h + /usr/include/c++/11/x86_64-redhat-linux/bits/os_defines.h + /usr/include/features.h + /usr/include/sys/cdefs.h + /usr/include/bits/long-double.h + /usr/include/gnu/stubs.h + /usr/include/gnu/stubs-64.h + /usr/include/c++/11/x86_64-redhat-linux/bits/cpu_defines.h + /usr/include/c++/11/bits/exception.h + /usr/include/c++/11/iosfwd + /usr/include/c++/11/bits/stringfwd.h + /usr/include/c++/11/bits/memoryfwd.h + /usr/include/c++/11/bits/postypes.h + /usr/include/c++/11/cwchar + /usr/include/wchar.h + /usr/include/bits/libc-header-start.h + /usr/include/bits/floatn.h + /usr/include/bits/floatn-common.h + /usr/lib/gcc/x86_64-redhat-linux/11/include/stddef.h + /usr/lib/gcc/x86_64-redhat-linux/11/include/stdarg.h + /usr/include/bits/wchar.h + /usr/include/bits/types/wint_t.h + /usr/include/bits/types/mbstate_t.h + /usr/include/bits/types/__mbstate_t.h + /usr/include/bits/types/__FILE.h + /usr/include/bits/types/FILE.h + /usr/include/bits/types/locale_t.h + /usr/include/bits/types/__locale_t.h + /usr/include/boost/assert.hpp + /usr/include/assert.h + /usr/include/boost/core/addressof.hpp + /usr/include/boost/config.hpp + /usr/include/boost/config/user.hpp + /usr/include/boost/config/detail/select_compiler_config.hpp + /usr/include/boost/config/compiler/gcc.hpp + /usr/include/c++/11/cstddef + /usr/include/boost/config/detail/select_stdlib_config.hpp + /usr/include/c++/11/version + /usr/include/boost/config/stdlib/libstdcpp3.hpp + /usr/include/unistd.h + /usr/include/bits/posix_opt.h + /usr/include/bits/environments.h + /usr/include/bits/types.h + /usr/include/bits/timesize.h + /usr/include/bits/typesizes.h + /usr/include/bits/time64.h + /usr/include/bits/confname.h + /usr/include/bits/getopt_posix.h + /usr/include/bits/getopt_core.h + /usr/include/bits/unistd_ext.h + /usr/include/boost/config/detail/select_platform_config.hpp + /usr/include/boost/config/platform/linux.hpp + /usr/include/c++/11/cstdlib + /usr/include/stdlib.h + /usr/include/bits/waitflags.h + /usr/include/bits/waitstatus.h + /usr/include/sys/types.h + /usr/include/bits/types/clock_t.h + /usr/include/bits/types/clockid_t.h + /usr/include/bits/types/time_t.h + /usr/include/bits/types/timer_t.h + /usr/include/bits/stdint-intn.h + /usr/include/endian.h + /usr/include/bits/endian.h + /usr/include/bits/endianness.h + /usr/include/bits/byteswap.h + /usr/include/bits/uintn-identity.h + /usr/include/sys/select.h + /usr/include/bits/select.h + /usr/include/bits/types/sigset_t.h + /usr/include/bits/types/__sigset_t.h + /usr/include/bits/types/struct_timeval.h + /usr/include/bits/types/struct_timespec.h + /usr/include/bits/pthreadtypes.h + /usr/include/bits/thread-shared-types.h + /usr/include/bits/pthreadtypes-arch.h + /usr/include/bits/struct_mutex.h + /usr/include/bits/struct_rwlock.h + /usr/include/alloca.h + /usr/include/bits/stdlib-bsearch.h + /usr/include/bits/stdlib-float.h + /usr/include/c++/11/bits/std_abs.h + /usr/include/boost/config/detail/posix_features.hpp + /usr/include/boost/config/detail/suffix.hpp + /usr/include/boost/config/helper_macros.hpp + /usr/include/boost/core/enable_if.hpp + /usr/include/boost/core/explicit_operator_bool.hpp + /usr/include/boost/config/workaround.hpp + /usr/include/boost/core/swap.hpp + /usr/include/c++/11/utility + /usr/include/c++/11/bits/stl_relops.h + /usr/include/c++/11/bits/stl_pair.h + /usr/include/c++/11/bits/move.h + /usr/include/c++/11/type_traits + /usr/include/c++/11/initializer_list + /usr/include/boost/optional/bad_optional_access.hpp + /usr/include/c++/11/stdexcept + /usr/include/c++/11/exception + /usr/include/c++/11/bits/exception_ptr.h + /usr/include/c++/11/bits/exception_defines.h + /usr/include/c++/11/bits/cxxabi_init_exception.h + /usr/include/c++/11/typeinfo + /usr/include/c++/11/bits/hash_bytes.h + /usr/include/c++/11/bits/nested_exception.h + /usr/include/c++/11/string + /usr/include/c++/11/bits/char_traits.h + /usr/include/c++/11/bits/stl_algobase.h + /usr/include/c++/11/bits/functexcept.h + /usr/include/c++/11/bits/cpp_type_traits.h + /usr/include/c++/11/ext/type_traits.h + /usr/include/c++/11/ext/numeric_traits.h + /usr/include/c++/11/bits/stl_iterator_base_types.h + /usr/include/c++/11/bits/stl_iterator_base_funcs.h + /usr/include/c++/11/bits/concept_check.h + /usr/include/c++/11/debug/assertions.h + /usr/include/c++/11/bits/stl_iterator.h + /usr/include/c++/11/bits/ptr_traits.h + /usr/include/c++/11/debug/debug.h + /usr/include/c++/11/bits/predefined_ops.h + /usr/include/c++/11/cstdint + /usr/lib/gcc/x86_64-redhat-linux/11/include/stdint.h + /usr/include/stdint.h + /usr/include/bits/stdint-uintn.h + /usr/include/c++/11/bits/allocator.h + /usr/include/c++/11/x86_64-redhat-linux/bits/c++allocator.h + /usr/include/c++/11/ext/new_allocator.h + /usr/include/c++/11/bits/localefwd.h + /usr/include/c++/11/x86_64-redhat-linux/bits/c++locale.h + /usr/include/c++/11/clocale + /usr/include/locale.h + /usr/include/bits/locale.h + /usr/include/c++/11/cctype + /usr/include/ctype.h + /usr/include/c++/11/bits/ostream_insert.h + /usr/include/c++/11/bits/cxxabi_forced.h + /usr/include/c++/11/bits/stl_function.h + /usr/include/c++/11/backward/binders.h + /usr/include/c++/11/bits/range_access.h + /usr/include/c++/11/bits/basic_string.h + /usr/include/c++/11/ext/atomicity.h + /usr/include/c++/11/x86_64-redhat-linux/bits/gthr.h + /usr/include/c++/11/x86_64-redhat-linux/bits/gthr-default.h + /usr/include/pthread.h + /usr/include/sched.h + /usr/include/bits/sched.h + /usr/include/bits/types/struct_sched_param.h + /usr/include/bits/cpu-set.h + /usr/include/time.h + /usr/include/bits/time.h + /usr/include/bits/timex.h + /usr/include/bits/types/struct_tm.h + /usr/include/bits/types/struct_itimerspec.h + /usr/include/bits/setjmp.h + /usr/include/bits/types/struct___jmp_buf_tag.h + /usr/include/c++/11/x86_64-redhat-linux/bits/atomic_word.h + /usr/include/sys/single_threaded.h + /usr/include/c++/11/ext/alloc_traits.h + /usr/include/c++/11/bits/alloc_traits.h + /usr/include/c++/11/bits/stl_construct.h + /usr/include/c++/11/ext/string_conversions.h + /usr/include/c++/11/cstdio + /usr/include/stdio.h + /usr/include/bits/types/__fpos_t.h + /usr/include/bits/types/__fpos64_t.h + /usr/include/bits/types/struct_FILE.h + /usr/include/bits/types/cookie_io_functions_t.h + /usr/include/bits/stdio_lim.h + /usr/include/bits/stdio.h + /usr/include/c++/11/cerrno + /usr/include/errno.h + /usr/include/bits/errno.h + /usr/include/linux/errno.h + /usr/include/asm/errno.h + /usr/include/asm-generic/errno.h + /usr/include/asm-generic/errno-base.h + /usr/include/bits/types/error_t.h + /usr/include/c++/11/bits/charconv.h + /usr/include/c++/11/bits/functional_hash.h + /usr/include/c++/11/bits/basic_string.tcc + /usr/include/boost/static_assert.hpp + /usr/include/boost/detail/workaround.hpp + /usr/include/boost/throw_exception.hpp + /usr/include/boost/assert/source_location.hpp + /usr/include/boost/current_function.hpp + /usr/include/boost/cstdint.hpp + /usr/include/boost/exception/exception.hpp + /usr/include/boost/type.hpp + /usr/include/boost/type_traits/alignment_of.hpp + /usr/include/boost/type_traits/intrinsics.hpp + /usr/include/boost/type_traits/detail/config.hpp + /usr/include/boost/version.hpp + /usr/include/boost/type_traits/integral_constant.hpp + /usr/include/boost/type_traits/conditional.hpp + /usr/include/boost/type_traits/has_nothrow_constructor.hpp + /usr/include/boost/type_traits/is_default_constructible.hpp + /usr/include/boost/type_traits/is_complete.hpp + /usr/include/boost/type_traits/declval.hpp + /usr/include/boost/type_traits/add_rvalue_reference.hpp + /usr/include/boost/type_traits/is_void.hpp + /usr/include/boost/type_traits/is_reference.hpp + /usr/include/boost/type_traits/is_lvalue_reference.hpp + /usr/include/boost/type_traits/is_rvalue_reference.hpp + /usr/include/boost/type_traits/remove_reference.hpp + /usr/include/boost/type_traits/is_function.hpp + /usr/include/boost/type_traits/detail/is_function_cxx_11.hpp + /usr/include/boost/type_traits/detail/yes_no_type.hpp + /usr/include/boost/type_traits/type_with_alignment.hpp + /usr/include/boost/type_traits/is_pod.hpp + /usr/include/boost/type_traits/is_scalar.hpp + /usr/include/boost/type_traits/is_arithmetic.hpp + /usr/include/boost/type_traits/is_integral.hpp + /usr/include/boost/type_traits/is_floating_point.hpp + /usr/include/boost/type_traits/is_enum.hpp + /usr/include/boost/type_traits/is_pointer.hpp + /usr/include/boost/type_traits/is_member_pointer.hpp + /usr/include/boost/type_traits/is_member_function_pointer.hpp + /usr/include/boost/type_traits/detail/is_member_function_pointer_cxx_11.hpp + /usr/include/boost/type_traits/remove_const.hpp + /usr/include/boost/type_traits/decay.hpp + /usr/include/boost/type_traits/is_array.hpp + /usr/include/boost/type_traits/remove_bounds.hpp + /usr/include/boost/type_traits/remove_extent.hpp + /usr/include/boost/type_traits/add_pointer.hpp + /usr/include/boost/type_traits/remove_cv.hpp + /usr/include/boost/type_traits/is_base_of.hpp + /usr/include/boost/type_traits/is_base_and_derived.hpp + /usr/include/boost/type_traits/is_same.hpp + /usr/include/boost/type_traits/is_class.hpp + /usr/include/boost/type_traits/is_const.hpp + /usr/include/boost/type_traits/is_constructible.hpp + /usr/include/boost/type_traits/is_destructible.hpp + /usr/include/boost/type_traits/is_nothrow_move_assignable.hpp + /usr/include/boost/type_traits/has_trivial_move_assign.hpp + /usr/include/boost/type_traits/is_assignable.hpp + /usr/include/boost/type_traits/is_volatile.hpp + /usr/include/boost/type_traits/has_nothrow_assign.hpp + /usr/include/boost/type_traits/enable_if.hpp + /usr/include/boost/type_traits/is_nothrow_move_constructible.hpp + /usr/include/boost/move/utility.hpp + /usr/include/boost/move/detail/config_begin.hpp + /usr/include/boost/move/detail/workaround.hpp + /usr/include/boost/move/utility_core.hpp + /usr/include/boost/move/core.hpp + /usr/include/boost/move/detail/config_end.hpp + /usr/include/boost/move/detail/meta_utils.hpp + /usr/include/boost/move/detail/meta_utils_core.hpp + /usr/include/boost/move/traits.hpp + /usr/include/boost/move/detail/type_traits.hpp + /usr/include/boost/none.hpp + /usr/include/boost/none_t.hpp + /usr/include/boost/utility/compare_pointees.hpp + /usr/include/c++/11/functional + /usr/include/c++/11/tuple + /usr/include/c++/11/array + /usr/include/c++/11/bits/uses_allocator.h + /usr/include/c++/11/bits/invoke.h + /usr/include/c++/11/bits/refwrap.h + /usr/include/c++/11/bits/std_function.h + /usr/include/boost/utility/result_of.hpp + /usr/include/boost/preprocessor/cat.hpp + /usr/include/boost/preprocessor/config/config.hpp + /usr/include/boost/preprocessor/iteration/iterate.hpp + /usr/include/boost/preprocessor/arithmetic/dec.hpp + /usr/include/boost/preprocessor/config/limits.hpp + /usr/include/boost/preprocessor/arithmetic/limits/dec_256.hpp + /usr/include/boost/preprocessor/arithmetic/inc.hpp + /usr/include/boost/preprocessor/arithmetic/limits/inc_256.hpp + /usr/include/boost/preprocessor/array/elem.hpp + /usr/include/boost/preprocessor/array/data.hpp + /usr/include/boost/preprocessor/tuple/elem.hpp + /usr/include/boost/preprocessor/facilities/expand.hpp + /usr/include/boost/preprocessor/facilities/overload.hpp + /usr/include/boost/preprocessor/variadic/size.hpp + /usr/include/boost/preprocessor/control/iif.hpp + /usr/include/boost/preprocessor/facilities/check_empty.hpp + /usr/include/boost/preprocessor/variadic/has_opt.hpp + /usr/include/boost/preprocessor/variadic/limits/size_64.hpp + /usr/include/boost/preprocessor/tuple/rem.hpp + /usr/include/boost/preprocessor/tuple/detail/is_single_return.hpp + /usr/include/boost/preprocessor/variadic/elem.hpp + /usr/include/boost/preprocessor/variadic/limits/elem_64.hpp + /usr/include/boost/preprocessor/array/size.hpp + /usr/include/boost/preprocessor/slot/slot.hpp + /usr/include/boost/preprocessor/slot/detail/def.hpp + /usr/include/boost/preprocessor/repetition/enum_params.hpp + /usr/include/boost/preprocessor/punctuation/comma_if.hpp + /usr/include/boost/preprocessor/control/if.hpp + /usr/include/boost/preprocessor/logical/bool.hpp + /usr/include/boost/preprocessor/logical/limits/bool_256.hpp + /usr/include/boost/preprocessor/facilities/empty.hpp + /usr/include/boost/preprocessor/punctuation/comma.hpp + /usr/include/boost/preprocessor/repetition/repeat.hpp + /usr/include/boost/preprocessor/debug/error.hpp + /usr/include/boost/preprocessor/detail/auto_rec.hpp + /usr/include/boost/preprocessor/detail/limits/auto_rec_256.hpp + /usr/include/boost/preprocessor/tuple/eat.hpp + /usr/include/boost/preprocessor/repetition/limits/repeat_256.hpp + /usr/include/boost/preprocessor/repetition/enum_trailing_params.hpp + /usr/include/boost/preprocessor/repetition/enum_binary_params.hpp + /usr/include/boost/preprocessor/repetition/enum_shifted_params.hpp + /usr/include/boost/preprocessor/facilities/intercept.hpp + /usr/include/boost/preprocessor/facilities/limits/intercept_256.hpp + /usr/include/boost/type_traits/type_identity.hpp + /usr/include/boost/preprocessor/iteration/detail/iter/forward1.hpp + /usr/include/boost/preprocessor/iteration/detail/bounds/lower1.hpp + /usr/include/boost/preprocessor/slot/detail/shared.hpp + /usr/include/boost/preprocessor/iteration/detail/bounds/upper1.hpp + /usr/include/boost/preprocessor/iteration/detail/iter/limits/forward1_256.hpp + /usr/include/boost/utility/detail/result_of_iterate.hpp + /usr/include/boost/optional/optional_fwd.hpp + /usr/include/boost/optional/detail/optional_config.hpp + /usr/include/boost/optional/detail/optional_factory_support.hpp + /usr/include/boost/optional/detail/optional_aligned_storage.hpp + /usr/include/boost/optional/detail/optional_trivially_copyable_base.hpp + /usr/include/boost/optional/detail/optional_reference_spec.hpp + /usr/include/boost/optional/detail/optional_relops.hpp + /usr/include/boost/optional/detail/optional_swap.hpp + /usr/include/c++/11/cassert + /usr/include/c++/11/memory + /usr/include/c++/11/bits/stl_uninitialized.h + /usr/include/c++/11/bits/stl_tempbuf.h + /usr/include/c++/11/bits/stl_raw_storage_iter.h + /usr/include/c++/11/bits/align.h + /usr/include/c++/11/bit + /usr/include/c++/11/bits/unique_ptr.h + /usr/include/c++/11/bits/shared_ptr.h + /usr/include/c++/11/bits/shared_ptr_base.h + /usr/include/c++/11/bits/allocated_ptr.h + /usr/include/c++/11/ext/aligned_buffer.h + /usr/include/c++/11/ext/concurrence.h + /usr/include/c++/11/bits/shared_ptr_atomic.h + /usr/include/c++/11/bits/atomic_base.h + /usr/include/c++/11/bits/atomic_lockfree_defines.h + /usr/include/c++/11/backward/auto_ptr.h + /usr/include/c++/11/vector + /usr/include/c++/11/bits/stl_vector.h + /usr/include/c++/11/bits/stl_bvector.h + /usr/include/c++/11/bits/vector.tcc + /usr/include/c++/11/map + /usr/include/c++/11/bits/stl_tree.h + /usr/include/c++/11/bits/stl_map.h + /usr/include/c++/11/bits/stl_multimap.h + /usr/include/c++/11/bits/erase_if.h + /usr/include/c++/11/algorithm + /usr/include/c++/11/bits/stl_algo.h + /usr/include/c++/11/bits/algorithmfwd.h + /usr/include/c++/11/bits/stl_heap.h + /usr/include/c++/11/bits/uniform_int_dist.h + /usr/include/c++/11/atomic + /usr/include/c++/11/mutex + /usr/include/c++/11/chrono + /usr/include/c++/11/ratio + /usr/include/c++/11/limits + /usr/include/c++/11/ctime + /usr/include/c++/11/bits/parse_numbers.h + /usr/include/c++/11/system_error + /usr/include/c++/11/x86_64-redhat-linux/bits/error_constants.h + /usr/include/c++/11/bits/std_mutex.h + /usr/include/c++/11/bits/unique_lock.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/JsonRpc/lsRequestId.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/JsonRpc/message.h + /usr/include/c++/11/iostream + /usr/include/c++/11/ostream + /usr/include/c++/11/ios + /usr/include/c++/11/bits/ios_base.h + /usr/include/c++/11/bits/locale_classes.h + /usr/include/c++/11/bits/locale_classes.tcc + /usr/include/c++/11/streambuf + /usr/include/c++/11/bits/streambuf.tcc + /usr/include/c++/11/bits/basic_ios.h + /usr/include/c++/11/bits/locale_facets.h + /usr/include/c++/11/cwctype + /usr/include/wctype.h + /usr/include/bits/wctype-wchar.h + /usr/include/c++/11/x86_64-redhat-linux/bits/ctype_base.h + /usr/include/c++/11/bits/streambuf_iterator.h + /usr/include/c++/11/x86_64-redhat-linux/bits/ctype_inline.h + /usr/include/c++/11/bits/locale_facets.tcc + /usr/include/c++/11/bits/basic_ios.tcc + /usr/include/c++/11/bits/ostream.tcc + /usr/include/c++/11/istream + /usr/include/c++/11/bits/istream.tcc + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/method_type.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/JsonRpc/lsResponseMessage.h + /usr/include/c++/11/regex + /usr/include/c++/11/bitset + /usr/include/c++/11/iterator + /usr/include/c++/11/bits/stream_iterator.h + /usr/include/c++/11/locale + /usr/include/c++/11/bits/locale_facets_nonio.h + /usr/include/c++/11/x86_64-redhat-linux/bits/time_members.h + /usr/include/c++/11/x86_64-redhat-linux/bits/messages_members.h + /usr/include/libintl.h + /usr/include/c++/11/bits/codecvt.h + /usr/include/c++/11/bits/locale_facets_nonio.tcc + /usr/include/c++/11/bits/locale_conv.h + /usr/include/c++/11/sstream + /usr/include/c++/11/bits/sstream.tcc + /usr/include/c++/11/stack + /usr/include/c++/11/deque + /usr/include/c++/11/bits/stl_deque.h + /usr/include/c++/11/bits/deque.tcc + /usr/include/c++/11/bits/stl_stack.h + /usr/include/c++/11/cstring + /usr/include/string.h + /usr/include/strings.h + /usr/include/c++/11/bits/regex_constants.h + /usr/include/c++/11/bits/regex_error.h + /usr/include/c++/11/bits/regex_automaton.h + /usr/include/c++/11/bits/regex_automaton.tcc + /usr/include/c++/11/bits/regex_scanner.h + /usr/include/c++/11/bits/regex_scanner.tcc + /usr/include/c++/11/bits/regex_compiler.h + /usr/include/c++/11/bits/regex_compiler.tcc + /usr/include/c++/11/bits/regex.h + /usr/include/c++/11/bits/regex.tcc + /usr/include/c++/11/bits/regex_executor.h + /usr/include/c++/11/bits/regex_executor.tcc + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/lsp_completion.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/lsTextEdit.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/lsRange.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/lsPosition.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/lsMarkedString.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/lsCommand.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/lsAny.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/lsTextDocumentPositionParams.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/lsTextDocumentIdentifier.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/lsDocumentUri.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/textDocument/document_symbol.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/symbol.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/location_type.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/textDocument/hover.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/textDocument/prepareRename.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/lsWorkspaceEdit.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/lsTextDocumentEdit.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/lsVersionedTextDocumentIdentifier.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/ResourceOperation.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/textDocument/typeHierarchy.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/textDocument/semanticHighlighting.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/JsonRpc/NotificationInMessage.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/textDocument/SemanticTokens.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/JsonRpc/json.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/document.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/reader.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/allocators.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/rapidjson.h + /usr/include/inttypes.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/internal/meta.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/rapidjson.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/stream.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/encodings.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/encodedstream.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/memorystream.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/internal/clzll.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/internal/stack.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/allocators.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/internal/swap.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/internal/strtod.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/internal/ieee754.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/internal/biginteger.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/internal/diyfp.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/internal/clzll.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/internal/pow10.h + /usr/include/c++/11/climits + /usr/lib/gcc/x86_64-redhat-linux/11/include/limits.h + /usr/lib/gcc/x86_64-redhat-linux/11/include/syslimits.h + /usr/include/limits.h + /usr/include/bits/posix1_lim.h + /usr/include/bits/local_lim.h + /usr/include/linux/limits.h + /usr/include/bits/posix2_lim.h + /usr/include/bits/xopen_lim.h + /usr/include/bits/uio_lim.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/error/error.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/rapidjson.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/internal/strfunc.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/stream.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/rapidjson.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/prettywriter.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/writer.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/internal/dtoa.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/internal/itoa.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/internal/itoa.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include/rapidjson/stringbuffer.h + +CMakeFiles/lspcpp.dir/src/lsp/utils.cpp.o + /usr/local/src/asymptote-2.78/LspCpp/src/lsp/utils.cpp + /usr/include/stdc-predef.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/utils.h + /usr/include/c++/11/algorithm + /usr/include/c++/11/utility + /usr/include/c++/11/x86_64-redhat-linux/bits/c++config.h + /usr/include/bits/wordsize.h + /usr/include/c++/11/x86_64-redhat-linux/bits/os_defines.h + /usr/include/features.h + /usr/include/sys/cdefs.h + /usr/include/bits/long-double.h + /usr/include/gnu/stubs.h + /usr/include/gnu/stubs-64.h + /usr/include/c++/11/x86_64-redhat-linux/bits/cpu_defines.h + /usr/include/c++/11/bits/stl_relops.h + /usr/include/c++/11/bits/stl_pair.h + /usr/include/c++/11/bits/move.h + /usr/include/c++/11/type_traits + /usr/include/c++/11/initializer_list + /usr/include/c++/11/bits/stl_algobase.h + /usr/include/c++/11/bits/functexcept.h + /usr/include/c++/11/bits/exception_defines.h + /usr/include/c++/11/bits/cpp_type_traits.h + /usr/include/c++/11/ext/type_traits.h + /usr/include/c++/11/ext/numeric_traits.h + /usr/include/c++/11/bits/stl_iterator_base_types.h + /usr/include/c++/11/bits/stl_iterator_base_funcs.h + /usr/include/c++/11/bits/concept_check.h + /usr/include/c++/11/debug/assertions.h + /usr/include/c++/11/bits/stl_iterator.h + /usr/include/c++/11/bits/ptr_traits.h + /usr/include/c++/11/debug/debug.h + /usr/include/c++/11/bits/predefined_ops.h + /usr/include/c++/11/bits/stl_algo.h + /usr/include/c++/11/cstdlib + /usr/include/stdlib.h + /usr/include/bits/libc-header-start.h + /usr/lib/gcc/x86_64-redhat-linux/11/include/stddef.h + /usr/include/bits/waitflags.h + /usr/include/bits/waitstatus.h + /usr/include/bits/floatn.h + /usr/include/bits/floatn-common.h + /usr/include/bits/types/locale_t.h + /usr/include/bits/types/__locale_t.h + /usr/include/sys/types.h + /usr/include/bits/types.h + /usr/include/bits/timesize.h + /usr/include/bits/typesizes.h + /usr/include/bits/time64.h + /usr/include/bits/types/clock_t.h + /usr/include/bits/types/clockid_t.h + /usr/include/bits/types/time_t.h + /usr/include/bits/types/timer_t.h + /usr/include/bits/stdint-intn.h + /usr/include/endian.h + /usr/include/bits/endian.h + /usr/include/bits/endianness.h + /usr/include/bits/byteswap.h + /usr/include/bits/uintn-identity.h + /usr/include/sys/select.h + /usr/include/bits/select.h + /usr/include/bits/types/sigset_t.h + /usr/include/bits/types/__sigset_t.h + /usr/include/bits/types/struct_timeval.h + /usr/include/bits/types/struct_timespec.h + /usr/include/bits/pthreadtypes.h + /usr/include/bits/thread-shared-types.h + /usr/include/bits/pthreadtypes-arch.h + /usr/include/bits/struct_mutex.h + /usr/include/bits/struct_rwlock.h + /usr/include/alloca.h + /usr/include/bits/stdlib-bsearch.h + /usr/include/bits/stdlib-float.h + /usr/include/c++/11/bits/std_abs.h + /usr/include/c++/11/bits/algorithmfwd.h + /usr/include/c++/11/bits/stl_heap.h + /usr/include/c++/11/bits/stl_tempbuf.h + /usr/include/c++/11/bits/stl_construct.h + /usr/include/c++/11/new + /usr/include/c++/11/bits/exception.h + /usr/include/c++/11/bits/uniform_int_dist.h + /usr/include/c++/11/codecvt + /usr/include/c++/11/bits/locale_classes.h + /usr/include/c++/11/bits/localefwd.h + /usr/include/c++/11/x86_64-redhat-linux/bits/c++locale.h + /usr/include/c++/11/clocale + /usr/include/locale.h + /usr/include/bits/locale.h + /usr/include/c++/11/iosfwd + /usr/include/c++/11/bits/stringfwd.h + /usr/include/c++/11/bits/memoryfwd.h + /usr/include/c++/11/bits/postypes.h + /usr/include/c++/11/cwchar + /usr/include/wchar.h + /usr/lib/gcc/x86_64-redhat-linux/11/include/stdarg.h + /usr/include/bits/wchar.h + /usr/include/bits/types/wint_t.h + /usr/include/bits/types/mbstate_t.h + /usr/include/bits/types/__mbstate_t.h + /usr/include/bits/types/__FILE.h + /usr/include/bits/types/FILE.h + /usr/include/c++/11/cctype + /usr/include/ctype.h + /usr/include/c++/11/string + /usr/include/c++/11/bits/char_traits.h + /usr/include/c++/11/cstdint + /usr/lib/gcc/x86_64-redhat-linux/11/include/stdint.h + /usr/include/stdint.h + /usr/include/bits/stdint-uintn.h + /usr/include/c++/11/bits/allocator.h + /usr/include/c++/11/x86_64-redhat-linux/bits/c++allocator.h + /usr/include/c++/11/ext/new_allocator.h + /usr/include/c++/11/bits/ostream_insert.h + /usr/include/c++/11/bits/cxxabi_forced.h + /usr/include/c++/11/bits/stl_function.h + /usr/include/c++/11/backward/binders.h + /usr/include/c++/11/bits/range_access.h + /usr/include/c++/11/bits/basic_string.h + /usr/include/c++/11/ext/atomicity.h + /usr/include/c++/11/x86_64-redhat-linux/bits/gthr.h + /usr/include/c++/11/x86_64-redhat-linux/bits/gthr-default.h + /usr/include/pthread.h + /usr/include/sched.h + /usr/include/bits/sched.h + /usr/include/bits/types/struct_sched_param.h + /usr/include/bits/cpu-set.h + /usr/include/time.h + /usr/include/bits/time.h + /usr/include/bits/timex.h + /usr/include/bits/types/struct_tm.h + /usr/include/bits/types/struct_itimerspec.h + /usr/include/bits/setjmp.h + /usr/include/bits/types/struct___jmp_buf_tag.h + /usr/include/c++/11/x86_64-redhat-linux/bits/atomic_word.h + /usr/include/sys/single_threaded.h + /usr/include/c++/11/ext/alloc_traits.h + /usr/include/c++/11/bits/alloc_traits.h + /usr/include/c++/11/ext/string_conversions.h + /usr/include/c++/11/cstdio + /usr/include/stdio.h + /usr/include/bits/types/__fpos_t.h + /usr/include/bits/types/__fpos64_t.h + /usr/include/bits/types/struct_FILE.h + /usr/include/bits/types/cookie_io_functions_t.h + /usr/include/bits/stdio_lim.h + /usr/include/bits/stdio.h + /usr/include/c++/11/cerrno + /usr/include/errno.h + /usr/include/bits/errno.h + /usr/include/linux/errno.h + /usr/include/asm/errno.h + /usr/include/asm-generic/errno.h + /usr/include/asm-generic/errno-base.h + /usr/include/bits/types/error_t.h + /usr/include/c++/11/bits/charconv.h + /usr/include/c++/11/bits/functional_hash.h + /usr/include/c++/11/bits/hash_bytes.h + /usr/include/c++/11/bits/basic_string.tcc + /usr/include/c++/11/bits/locale_classes.tcc + /usr/include/c++/11/bits/codecvt.h + /usr/include/c++/11/functional + /usr/include/c++/11/tuple + /usr/include/c++/11/array + /usr/include/c++/11/bits/uses_allocator.h + /usr/include/c++/11/bits/invoke.h + /usr/include/c++/11/bits/refwrap.h + /usr/include/c++/11/bits/std_function.h + /usr/include/c++/11/typeinfo + /usr/include/c++/11/iterator + /usr/include/c++/11/bits/stream_iterator.h + /usr/include/c++/11/bits/streambuf_iterator.h + /usr/include/c++/11/streambuf + /usr/include/c++/11/bits/ios_base.h + /usr/include/c++/11/system_error + /usr/include/c++/11/x86_64-redhat-linux/bits/error_constants.h + /usr/include/c++/11/stdexcept + /usr/include/c++/11/exception + /usr/include/c++/11/bits/exception_ptr.h + /usr/include/c++/11/bits/cxxabi_init_exception.h + /usr/include/c++/11/bits/nested_exception.h + /usr/include/c++/11/bits/streambuf.tcc + /usr/include/c++/11/locale + /usr/include/c++/11/bits/locale_facets.h + /usr/include/c++/11/cwctype + /usr/include/wctype.h + /usr/include/bits/wctype-wchar.h + /usr/include/c++/11/x86_64-redhat-linux/bits/ctype_base.h + /usr/include/c++/11/x86_64-redhat-linux/bits/ctype_inline.h + /usr/include/c++/11/bits/locale_facets.tcc + /usr/include/c++/11/bits/locale_facets_nonio.h + /usr/include/c++/11/ctime + /usr/include/c++/11/x86_64-redhat-linux/bits/time_members.h + /usr/include/c++/11/x86_64-redhat-linux/bits/messages_members.h + /usr/include/libintl.h + /usr/include/c++/11/bits/locale_facets_nonio.tcc + /usr/include/c++/11/bits/locale_conv.h + /usr/include/c++/11/bits/unique_ptr.h + /usr/include/c++/11/memory + /usr/include/c++/11/bits/stl_uninitialized.h + /usr/include/c++/11/bits/stl_raw_storage_iter.h + /usr/include/c++/11/bits/align.h + /usr/include/c++/11/bit + /usr/include/c++/11/bits/shared_ptr.h + /usr/include/c++/11/bits/shared_ptr_base.h + /usr/include/c++/11/bits/allocated_ptr.h + /usr/include/c++/11/ext/aligned_buffer.h + /usr/include/c++/11/ext/concurrence.h + /usr/include/c++/11/bits/shared_ptr_atomic.h + /usr/include/c++/11/bits/atomic_base.h + /usr/include/c++/11/bits/atomic_lockfree_defines.h + /usr/include/c++/11/backward/auto_ptr.h + /usr/include/c++/11/vector + /usr/include/c++/11/bits/stl_vector.h + /usr/include/c++/11/bits/stl_bvector.h + /usr/include/c++/11/bits/vector.tcc + /usr/include/boost/optional/optional.hpp + /usr/include/boost/assert.hpp + /usr/include/assert.h + /usr/include/boost/core/addressof.hpp + /usr/include/boost/config.hpp + /usr/include/boost/config/user.hpp + /usr/include/boost/config/detail/select_compiler_config.hpp + /usr/include/boost/config/compiler/gcc.hpp + /usr/include/c++/11/cstddef + /usr/include/boost/config/detail/select_stdlib_config.hpp + /usr/include/c++/11/version + /usr/include/boost/config/stdlib/libstdcpp3.hpp + /usr/include/unistd.h + /usr/include/bits/posix_opt.h + /usr/include/bits/environments.h + /usr/include/bits/confname.h + /usr/include/bits/getopt_posix.h + /usr/include/bits/getopt_core.h + /usr/include/bits/unistd_ext.h + /usr/include/boost/config/detail/select_platform_config.hpp + /usr/include/boost/config/platform/linux.hpp + /usr/include/boost/config/detail/posix_features.hpp + /usr/include/boost/config/detail/suffix.hpp + /usr/include/boost/config/helper_macros.hpp + /usr/include/boost/core/enable_if.hpp + /usr/include/boost/core/explicit_operator_bool.hpp + /usr/include/boost/config/workaround.hpp + /usr/include/boost/core/swap.hpp + /usr/include/boost/optional/bad_optional_access.hpp + /usr/include/boost/static_assert.hpp + /usr/include/boost/detail/workaround.hpp + /usr/include/boost/throw_exception.hpp + /usr/include/boost/assert/source_location.hpp + /usr/include/boost/current_function.hpp + /usr/include/boost/cstdint.hpp + /usr/include/boost/exception/exception.hpp + /usr/include/boost/type.hpp + /usr/include/boost/type_traits/alignment_of.hpp + /usr/include/boost/type_traits/intrinsics.hpp + /usr/include/boost/type_traits/detail/config.hpp + /usr/include/boost/version.hpp + /usr/include/boost/type_traits/integral_constant.hpp + /usr/include/boost/type_traits/conditional.hpp + /usr/include/boost/type_traits/has_nothrow_constructor.hpp + /usr/include/boost/type_traits/is_default_constructible.hpp + /usr/include/boost/type_traits/is_complete.hpp + /usr/include/boost/type_traits/declval.hpp + /usr/include/boost/type_traits/add_rvalue_reference.hpp + /usr/include/boost/type_traits/is_void.hpp + /usr/include/boost/type_traits/is_reference.hpp + /usr/include/boost/type_traits/is_lvalue_reference.hpp + /usr/include/boost/type_traits/is_rvalue_reference.hpp + /usr/include/boost/type_traits/remove_reference.hpp + /usr/include/boost/type_traits/is_function.hpp + /usr/include/boost/type_traits/detail/is_function_cxx_11.hpp + /usr/include/boost/type_traits/detail/yes_no_type.hpp + /usr/include/boost/type_traits/type_with_alignment.hpp + /usr/include/boost/type_traits/is_pod.hpp + /usr/include/boost/type_traits/is_scalar.hpp + /usr/include/boost/type_traits/is_arithmetic.hpp + /usr/include/boost/type_traits/is_integral.hpp + /usr/include/boost/type_traits/is_floating_point.hpp + /usr/include/boost/type_traits/is_enum.hpp + /usr/include/boost/type_traits/is_pointer.hpp + /usr/include/boost/type_traits/is_member_pointer.hpp + /usr/include/boost/type_traits/is_member_function_pointer.hpp + /usr/include/boost/type_traits/detail/is_member_function_pointer_cxx_11.hpp + /usr/include/boost/type_traits/remove_const.hpp + /usr/include/boost/type_traits/decay.hpp + /usr/include/boost/type_traits/is_array.hpp + /usr/include/boost/type_traits/remove_bounds.hpp + /usr/include/boost/type_traits/remove_extent.hpp + /usr/include/boost/type_traits/add_pointer.hpp + /usr/include/boost/type_traits/remove_cv.hpp + /usr/include/boost/type_traits/is_base_of.hpp + /usr/include/boost/type_traits/is_base_and_derived.hpp + /usr/include/boost/type_traits/is_same.hpp + /usr/include/boost/type_traits/is_class.hpp + /usr/include/boost/type_traits/is_const.hpp + /usr/include/boost/type_traits/is_constructible.hpp + /usr/include/boost/type_traits/is_destructible.hpp + /usr/include/boost/type_traits/is_nothrow_move_assignable.hpp + /usr/include/boost/type_traits/has_trivial_move_assign.hpp + /usr/include/boost/type_traits/is_assignable.hpp + /usr/include/boost/type_traits/is_volatile.hpp + /usr/include/boost/type_traits/has_nothrow_assign.hpp + /usr/include/boost/type_traits/enable_if.hpp + /usr/include/boost/type_traits/is_nothrow_move_constructible.hpp + /usr/include/boost/move/utility.hpp + /usr/include/boost/move/detail/config_begin.hpp + /usr/include/boost/move/detail/workaround.hpp + /usr/include/boost/move/utility_core.hpp + /usr/include/boost/move/core.hpp + /usr/include/boost/move/detail/config_end.hpp + /usr/include/boost/move/detail/meta_utils.hpp + /usr/include/boost/move/detail/meta_utils_core.hpp + /usr/include/boost/move/traits.hpp + /usr/include/boost/move/detail/type_traits.hpp + /usr/include/boost/none.hpp + /usr/include/boost/none_t.hpp + /usr/include/boost/utility/compare_pointees.hpp + /usr/include/boost/utility/result_of.hpp + /usr/include/boost/preprocessor/cat.hpp + /usr/include/boost/preprocessor/config/config.hpp + /usr/include/boost/preprocessor/iteration/iterate.hpp + /usr/include/boost/preprocessor/arithmetic/dec.hpp + /usr/include/boost/preprocessor/config/limits.hpp + /usr/include/boost/preprocessor/arithmetic/limits/dec_256.hpp + /usr/include/boost/preprocessor/arithmetic/inc.hpp + /usr/include/boost/preprocessor/arithmetic/limits/inc_256.hpp + /usr/include/boost/preprocessor/array/elem.hpp + /usr/include/boost/preprocessor/array/data.hpp + /usr/include/boost/preprocessor/tuple/elem.hpp + /usr/include/boost/preprocessor/facilities/expand.hpp + /usr/include/boost/preprocessor/facilities/overload.hpp + /usr/include/boost/preprocessor/variadic/size.hpp + /usr/include/boost/preprocessor/control/iif.hpp + /usr/include/boost/preprocessor/facilities/check_empty.hpp + /usr/include/boost/preprocessor/variadic/has_opt.hpp + /usr/include/boost/preprocessor/variadic/limits/size_64.hpp + /usr/include/boost/preprocessor/tuple/rem.hpp + /usr/include/boost/preprocessor/tuple/detail/is_single_return.hpp + /usr/include/boost/preprocessor/variadic/elem.hpp + /usr/include/boost/preprocessor/variadic/limits/elem_64.hpp + /usr/include/boost/preprocessor/array/size.hpp + /usr/include/boost/preprocessor/slot/slot.hpp + /usr/include/boost/preprocessor/slot/detail/def.hpp + /usr/include/boost/preprocessor/repetition/enum_params.hpp + /usr/include/boost/preprocessor/punctuation/comma_if.hpp + /usr/include/boost/preprocessor/control/if.hpp + /usr/include/boost/preprocessor/logical/bool.hpp + /usr/include/boost/preprocessor/logical/limits/bool_256.hpp + /usr/include/boost/preprocessor/facilities/empty.hpp + /usr/include/boost/preprocessor/punctuation/comma.hpp + /usr/include/boost/preprocessor/repetition/repeat.hpp + /usr/include/boost/preprocessor/debug/error.hpp + /usr/include/boost/preprocessor/detail/auto_rec.hpp + /usr/include/boost/preprocessor/detail/limits/auto_rec_256.hpp + /usr/include/boost/preprocessor/tuple/eat.hpp + /usr/include/boost/preprocessor/repetition/limits/repeat_256.hpp + /usr/include/boost/preprocessor/repetition/enum_trailing_params.hpp + /usr/include/boost/preprocessor/repetition/enum_binary_params.hpp + /usr/include/boost/preprocessor/repetition/enum_shifted_params.hpp + /usr/include/boost/preprocessor/facilities/intercept.hpp + /usr/include/boost/preprocessor/facilities/limits/intercept_256.hpp + /usr/include/boost/type_traits/type_identity.hpp + /usr/include/boost/preprocessor/iteration/detail/iter/forward1.hpp + /usr/include/boost/preprocessor/iteration/detail/bounds/lower1.hpp + /usr/include/boost/preprocessor/slot/detail/shared.hpp + /usr/include/boost/preprocessor/iteration/detail/bounds/upper1.hpp + /usr/include/boost/preprocessor/iteration/detail/iter/limits/forward1_256.hpp + /usr/include/boost/utility/detail/result_of_iterate.hpp + /usr/include/boost/optional/optional_fwd.hpp + /usr/include/boost/optional/detail/optional_config.hpp + /usr/include/boost/optional/detail/optional_factory_support.hpp + /usr/include/boost/optional/detail/optional_aligned_storage.hpp + /usr/include/boost/optional/detail/optional_trivially_copyable_base.hpp + /usr/include/boost/optional/detail/optional_reference_spec.hpp + /usr/include/boost/optional/detail/optional_relops.hpp + /usr/include/boost/optional/detail/optional_swap.hpp + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/AbsolutePath.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/JsonRpc/serializer.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/JsonRpc/macro_map.h + /usr/include/boost/optional.hpp + /usr/include/c++/11/cassert + /usr/include/c++/11/map + /usr/include/c++/11/bits/stl_tree.h + /usr/include/c++/11/bits/stl_map.h + /usr/include/c++/11/bits/stl_multimap.h + /usr/include/c++/11/bits/erase_if.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/lsPosition.h + /usr/include/c++/11/cstring + /usr/include/string.h + /usr/include/strings.h + /usr/include/c++/11/fstream + /usr/include/c++/11/istream + /usr/include/c++/11/ios + /usr/include/c++/11/bits/basic_ios.h + /usr/include/c++/11/bits/basic_ios.tcc + /usr/include/c++/11/ostream + /usr/include/c++/11/bits/ostream.tcc + /usr/include/c++/11/bits/istream.tcc + /usr/include/c++/11/x86_64-redhat-linux/bits/basic_file.h + /usr/include/c++/11/x86_64-redhat-linux/bits/c++io.h + /usr/include/c++/11/bits/fstream.tcc + /usr/include/c++/11/queue + /usr/include/c++/11/deque + /usr/include/c++/11/bits/stl_deque.h + /usr/include/c++/11/bits/deque.tcc + /usr/include/c++/11/bits/stl_queue.h + /usr/include/c++/11/sstream + /usr/include/c++/11/bits/sstream.tcc + /usr/include/c++/11/unordered_map + /usr/include/c++/11/bits/hashtable.h + /usr/include/c++/11/bits/hashtable_policy.h + /usr/include/c++/11/bits/unordered_map.h + /usr/include/sys/stat.h + /usr/include/bits/stat.h + /usr/include/bits/struct_stat.h + /usr/include/bits/statx.h + /usr/include/linux/stat.h + /usr/include/linux/types.h + /usr/include/asm/types.h + /usr/include/asm-generic/types.h + /usr/include/asm-generic/int-ll64.h + /usr/include/asm/bitsperlong.h + /usr/include/asm-generic/bitsperlong.h + /usr/include/linux/posix_types.h + /usr/include/linux/stddef.h + /usr/include/asm/posix_types.h + /usr/include/asm/posix_types_64.h + /usr/include/asm-generic/posix_types.h + /usr/include/bits/statx-generic.h + /usr/include/bits/types/struct_statx_timestamp.h + /usr/include/bits/types/struct_statx.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/utfcpp/source/utf8.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/utfcpp/source/utf8/checked.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/utfcpp/source/utf8/core.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/utfcpp/source/utf8/cpp11.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/utfcpp/source/utf8/checked.h + /usr/local/src/asymptote-2.78/LspCpp/third_party/utfcpp/source/utf8/unchecked.h + /usr/include/boost/filesystem/path.hpp + /usr/include/boost/filesystem/config.hpp + /usr/include/boost/system/api_config.hpp + /usr/include/boost/config/auto_link.hpp + /usr/include/boost/filesystem/path_traits.hpp + /usr/include/boost/system/error_code.hpp + /usr/include/boost/system/detail/error_code.hpp + /usr/include/boost/system/detail/error_category.hpp + /usr/include/boost/system/detail/config.hpp + /usr/include/boost/system/detail/error_condition.hpp + /usr/include/boost/system/detail/generic_category.hpp + /usr/include/boost/system/detail/generic_category_message.hpp + /usr/include/boost/system/detail/enable_if.hpp + /usr/include/boost/system/is_error_condition_enum.hpp + /usr/include/boost/system/detail/system_category.hpp + /usr/include/boost/system/is_error_code_enum.hpp + /usr/include/boost/system/error_category.hpp + /usr/include/boost/system/detail/error_category_impl.hpp + /usr/include/boost/system/detail/to_std_category.hpp + /usr/include/c++/11/mutex + /usr/include/c++/11/chrono + /usr/include/c++/11/ratio + /usr/include/c++/11/limits + /usr/include/c++/11/bits/parse_numbers.h + /usr/include/c++/11/bits/std_mutex.h + /usr/include/c++/11/bits/unique_lock.h + /usr/include/boost/system/error_condition.hpp + /usr/include/boost/system/errc.hpp + /usr/include/boost/system/detail/errc.hpp + /usr/include/boost/system/detail/cerrno.hpp + /usr/include/boost/system/generic_category.hpp + /usr/include/boost/system/system_category.hpp + /usr/include/boost/system/detail/system_category_impl.hpp + /usr/include/boost/system/detail/is_generic_value.hpp + /usr/include/boost/system/detail/throws.hpp + /usr/include/c++/11/list + /usr/include/c++/11/bits/stl_list.h + /usr/include/c++/11/bits/list.tcc + /usr/include/boost/config/abi_prefix.hpp + /usr/include/boost/config/abi_suffix.hpp + /usr/include/boost/system/system_error.hpp + /usr/include/boost/iterator/iterator_facade.hpp + /usr/include/boost/iterator/interoperable.hpp + /usr/include/boost/mpl/bool.hpp + /usr/include/boost/mpl/bool_fwd.hpp + /usr/include/boost/mpl/aux_/adl_barrier.hpp + /usr/include/boost/mpl/aux_/config/adl.hpp + /usr/include/boost/mpl/aux_/config/msvc.hpp + /usr/include/boost/mpl/aux_/config/intel.hpp + /usr/include/boost/mpl/aux_/config/gcc.hpp + /usr/include/boost/mpl/aux_/config/workaround.hpp + /usr/include/boost/mpl/integral_c_tag.hpp + /usr/include/boost/mpl/aux_/config/static_constant.hpp + /usr/include/boost/mpl/or.hpp + /usr/include/boost/mpl/aux_/config/use_preprocessed.hpp + /usr/include/boost/mpl/aux_/nested_type_wknd.hpp + /usr/include/boost/mpl/aux_/na_spec.hpp + /usr/include/boost/mpl/lambda_fwd.hpp + /usr/include/boost/mpl/void_fwd.hpp + /usr/include/boost/mpl/aux_/na.hpp + /usr/include/boost/mpl/aux_/na_fwd.hpp + /usr/include/boost/mpl/aux_/config/ctps.hpp + /usr/include/boost/mpl/aux_/config/lambda.hpp + /usr/include/boost/mpl/aux_/config/ttp.hpp + /usr/include/boost/mpl/int.hpp + /usr/include/boost/mpl/int_fwd.hpp + /usr/include/boost/mpl/aux_/nttp_decl.hpp + /usr/include/boost/mpl/aux_/config/nttp.hpp + /usr/include/boost/mpl/aux_/integral_wrapper.hpp + /usr/include/boost/mpl/aux_/static_cast.hpp + /usr/include/boost/mpl/aux_/lambda_arity_param.hpp + /usr/include/boost/mpl/aux_/template_arity_fwd.hpp + /usr/include/boost/mpl/aux_/arity.hpp + /usr/include/boost/mpl/aux_/config/dtp.hpp + /usr/include/boost/mpl/aux_/preprocessor/params.hpp + /usr/include/boost/mpl/aux_/config/preprocessor.hpp + /usr/include/boost/preprocessor/comma_if.hpp + /usr/include/boost/preprocessor/repeat.hpp + /usr/include/boost/preprocessor/inc.hpp + /usr/include/boost/mpl/aux_/preprocessor/enum.hpp + /usr/include/boost/mpl/aux_/preprocessor/def_params_tail.hpp + /usr/include/boost/mpl/limits/arity.hpp + /usr/include/boost/preprocessor/logical/and.hpp + /usr/include/boost/preprocessor/logical/bitand.hpp + /usr/include/boost/preprocessor/identity.hpp + /usr/include/boost/preprocessor/facilities/identity.hpp + /usr/include/boost/preprocessor/empty.hpp + /usr/include/boost/preprocessor/arithmetic/add.hpp + /usr/include/boost/preprocessor/control/while.hpp + /usr/include/boost/preprocessor/list/fold_left.hpp + /usr/include/boost/preprocessor/list/detail/fold_left.hpp + /usr/include/boost/preprocessor/control/expr_iif.hpp + /usr/include/boost/preprocessor/list/adt.hpp + /usr/include/boost/preprocessor/detail/is_binary.hpp + /usr/include/boost/preprocessor/detail/check.hpp + /usr/include/boost/preprocessor/logical/compl.hpp + /usr/include/boost/preprocessor/list/detail/limits/fold_left_256.hpp + /usr/include/boost/preprocessor/list/limits/fold_left_256.hpp + /usr/include/boost/preprocessor/list/fold_right.hpp + /usr/include/boost/preprocessor/list/detail/fold_right.hpp + /usr/include/boost/preprocessor/list/reverse.hpp + /usr/include/boost/preprocessor/list/detail/limits/fold_right_256.hpp + /usr/include/boost/preprocessor/control/detail/while.hpp + /usr/include/boost/preprocessor/control/detail/limits/while_256.hpp + /usr/include/boost/preprocessor/control/limits/while_256.hpp + /usr/include/boost/preprocessor/logical/bitor.hpp + /usr/include/boost/preprocessor/arithmetic/detail/is_maximum_number.hpp + /usr/include/boost/preprocessor/comparison/equal.hpp + /usr/include/boost/preprocessor/comparison/not_equal.hpp + /usr/include/boost/preprocessor/comparison/limits/not_equal_256.hpp + /usr/include/boost/preprocessor/arithmetic/detail/maximum_number.hpp + /usr/include/boost/preprocessor/arithmetic/detail/is_minimum_number.hpp + /usr/include/boost/preprocessor/logical/not.hpp + /usr/include/boost/preprocessor/arithmetic/sub.hpp + /usr/include/boost/mpl/aux_/config/eti.hpp + /usr/include/boost/mpl/aux_/config/overload_resolution.hpp + /usr/include/boost/mpl/aux_/lambda_support.hpp + /usr/include/boost/mpl/aux_/include_preprocessed.hpp + /usr/include/boost/mpl/aux_/config/compiler.hpp + /usr/include/boost/preprocessor/stringize.hpp + /usr/include/boost/mpl/aux_/preprocessed/gcc/or.hpp + /usr/include/boost/type_traits/is_convertible.hpp + /usr/include/boost/type_traits/is_abstract.hpp + /usr/include/boost/type_traits/add_lvalue_reference.hpp + /usr/include/boost/type_traits/add_reference.hpp + /usr/include/boost/iterator/detail/config_def.hpp + /usr/include/boost/iterator/detail/config_undef.hpp + /usr/include/boost/iterator/iterator_traits.hpp + /usr/include/boost/iterator/iterator_categories.hpp + /usr/include/boost/mpl/eval_if.hpp + /usr/include/boost/mpl/if.hpp + /usr/include/boost/mpl/aux_/value_wknd.hpp + /usr/include/boost/mpl/aux_/config/integral.hpp + /usr/include/boost/mpl/identity.hpp + /usr/include/boost/mpl/placeholders.hpp + /usr/include/boost/mpl/arg.hpp + /usr/include/boost/mpl/arg_fwd.hpp + /usr/include/boost/mpl/aux_/na_assert.hpp + /usr/include/boost/mpl/assert.hpp + /usr/include/boost/mpl/not.hpp + /usr/include/boost/mpl/aux_/yes_no.hpp + /usr/include/boost/mpl/aux_/config/arrays.hpp + /usr/include/boost/mpl/aux_/config/gpu.hpp + /usr/include/boost/mpl/aux_/config/pp_counter.hpp + /usr/include/boost/mpl/aux_/arity_spec.hpp + /usr/include/boost/mpl/aux_/arg_typedef.hpp + /usr/include/boost/mpl/aux_/preprocessed/gcc/arg.hpp + /usr/include/boost/mpl/aux_/preprocessed/gcc/placeholders.hpp + /usr/include/boost/iterator/detail/facade_iterator_category.hpp + /usr/include/boost/core/use_default.hpp + /usr/include/boost/mpl/and.hpp + /usr/include/boost/mpl/aux_/preprocessed/gcc/and.hpp + /usr/include/boost/detail/indirect_traits.hpp + /usr/include/boost/type_traits/remove_pointer.hpp + /usr/include/boost/detail/select_type.hpp + /usr/include/boost/iterator/detail/enable_if.hpp + /usr/include/boost/type_traits/add_const.hpp + /usr/include/boost/mpl/always.hpp + /usr/include/boost/mpl/aux_/preprocessor/default_params.hpp + /usr/include/boost/mpl/apply.hpp + /usr/include/boost/mpl/apply_fwd.hpp + /usr/include/boost/mpl/aux_/preprocessed/gcc/apply_fwd.hpp + /usr/include/boost/mpl/apply_wrap.hpp + /usr/include/boost/mpl/aux_/has_apply.hpp + /usr/include/boost/mpl/has_xxx.hpp + /usr/include/boost/mpl/aux_/type_wrapper.hpp + /usr/include/boost/mpl/aux_/config/has_xxx.hpp + /usr/include/boost/mpl/aux_/config/msvc_typename.hpp + /usr/include/boost/mpl/aux_/config/has_apply.hpp + /usr/include/boost/mpl/aux_/msvc_never_true.hpp + /usr/include/boost/mpl/aux_/preprocessed/gcc/apply_wrap.hpp + /usr/include/boost/mpl/lambda.hpp + /usr/include/boost/mpl/bind.hpp + /usr/include/boost/mpl/bind_fwd.hpp + /usr/include/boost/mpl/aux_/config/bind.hpp + /usr/include/boost/mpl/aux_/preprocessed/gcc/bind_fwd.hpp + /usr/include/boost/mpl/next.hpp + /usr/include/boost/mpl/next_prior.hpp + /usr/include/boost/mpl/aux_/common_name_wknd.hpp + /usr/include/boost/mpl/protect.hpp + /usr/include/boost/mpl/aux_/preprocessed/gcc/bind.hpp + /usr/include/boost/mpl/aux_/full_lambda.hpp + /usr/include/boost/mpl/quote.hpp + /usr/include/boost/mpl/void.hpp + /usr/include/boost/mpl/aux_/has_type.hpp + /usr/include/boost/mpl/aux_/config/bcc.hpp + /usr/include/boost/mpl/aux_/preprocessed/gcc/quote.hpp + /usr/include/boost/mpl/aux_/template_arity.hpp + /usr/include/boost/mpl/aux_/preprocessed/gcc/template_arity.hpp + /usr/include/boost/mpl/aux_/preprocessed/gcc/full_lambda.hpp + /usr/include/boost/mpl/aux_/preprocessed/gcc/apply.hpp + /usr/include/boost/io/quoted.hpp + /usr/include/boost/io/detail/buffer_fill.hpp + /usr/include/boost/io/detail/ostream_guard.hpp + /usr/include/boost/io/ios_state.hpp + /usr/include/boost/io_fwd.hpp + /usr/include/boost/functional/hash_fwd.hpp + /usr/include/boost/container_hash/hash_fwd.hpp + /usr/include/boost/filesystem/operations.hpp + /usr/include/boost/filesystem/file_status.hpp + /usr/include/boost/detail/bitmask.hpp + /usr/include/boost/filesystem/exception.hpp + /usr/include/boost/smart_ptr/intrusive_ptr.hpp + /usr/include/boost/smart_ptr/detail/sp_convertible.hpp + /usr/include/boost/smart_ptr/detail/sp_nullptr_t.hpp + /usr/include/boost/smart_ptr/detail/sp_noexcept.hpp + /usr/include/boost/config/no_tr1/functional.hpp + /usr/include/boost/smart_ptr/detail/operator_bool.hpp + /usr/include/boost/smart_ptr/intrusive_ref_counter.hpp + /usr/include/boost/smart_ptr/detail/atomic_count.hpp + /usr/include/boost/smart_ptr/detail/sp_has_gcc_intrinsics.hpp + /usr/include/boost/smart_ptr/detail/sp_has_sync_intrinsics.hpp + /usr/include/boost/smart_ptr/detail/atomic_count_gcc_atomic.hpp + /usr/include/boost/filesystem/directory.hpp + /usr/include/boost/core/scoped_enum.hpp + /usr/include/boost/algorithm/string.hpp + /usr/include/boost/algorithm/string/std_containers_traits.hpp + /usr/include/boost/algorithm/string/std/string_traits.hpp + /usr/include/boost/algorithm/string/yes_no_type.hpp + /usr/include/boost/algorithm/string/sequence_traits.hpp + /usr/include/boost/algorithm/string/std/list_traits.hpp + /usr/include/boost/algorithm/string/std/slist_traits.hpp + /usr/include/boost/algorithm/string/config.hpp + /usr/include/c++/11/ext/slist + /usr/include/boost/algorithm/string/trim.hpp + /usr/include/boost/range/begin.hpp + /usr/include/boost/range/config.hpp + /usr/include/boost/range/iterator.hpp + /usr/include/boost/range/range_fwd.hpp + /usr/include/boost/range/mutable_iterator.hpp + /usr/include/boost/range/detail/extract_optional_type.hpp + /usr/include/boost/range/detail/msvc_has_iterator_workaround.hpp + /usr/include/boost/range/const_iterator.hpp + /usr/include/boost/range/end.hpp + /usr/include/boost/range/detail/implementation_help.hpp + /usr/include/boost/range/detail/common.hpp + /usr/include/boost/range/detail/sfinae.hpp + /usr/include/boost/range/as_literal.hpp + /usr/include/boost/range/iterator_range.hpp + /usr/include/boost/range/iterator_range_core.hpp + /usr/include/boost/range/functions.hpp + /usr/include/boost/range/size.hpp + /usr/include/boost/range/size_type.hpp + /usr/include/boost/range/difference_type.hpp + /usr/include/boost/range/has_range_iterator.hpp + /usr/include/boost/utility/enable_if.hpp + /usr/include/boost/range/concepts.hpp + /usr/include/boost/concept_check.hpp + /usr/include/boost/concept/assert.hpp + /usr/include/boost/concept/detail/general.hpp + /usr/include/boost/concept/detail/backward_compatibility.hpp + /usr/include/boost/concept/detail/has_constraints.hpp + /usr/include/boost/type_traits/conversion_traits.hpp + /usr/include/boost/concept/usage.hpp + /usr/include/boost/concept/detail/concept_def.hpp + /usr/include/boost/preprocessor/seq/for_each_i.hpp + /usr/include/boost/preprocessor/repetition/for.hpp + /usr/include/boost/preprocessor/repetition/detail/for.hpp + /usr/include/boost/preprocessor/repetition/detail/limits/for_256.hpp + /usr/include/boost/preprocessor/repetition/limits/for_256.hpp + /usr/include/boost/preprocessor/seq/seq.hpp + /usr/include/boost/preprocessor/seq/elem.hpp + /usr/include/boost/preprocessor/seq/limits/elem_256.hpp + /usr/include/boost/preprocessor/seq/size.hpp + /usr/include/boost/preprocessor/seq/limits/size_256.hpp + /usr/include/boost/preprocessor/seq/detail/is_empty.hpp + /usr/include/boost/preprocessor/seq/enum.hpp + /usr/include/boost/preprocessor/seq/limits/enum_256.hpp + /usr/include/boost/concept/detail/concept_undef.hpp + /usr/include/boost/iterator/iterator_concepts.hpp + /usr/include/boost/limits.hpp + /usr/include/boost/range/value_type.hpp + /usr/include/boost/range/detail/misc_concept.hpp + /usr/include/boost/type_traits/make_unsigned.hpp + /usr/include/boost/type_traits/is_signed.hpp + /usr/include/c++/11/climits + /usr/lib/gcc/x86_64-redhat-linux/11/include/limits.h + /usr/lib/gcc/x86_64-redhat-linux/11/include/syslimits.h + /usr/include/limits.h + /usr/include/bits/posix1_lim.h + /usr/include/bits/local_lim.h + /usr/include/linux/limits.h + /usr/include/bits/posix2_lim.h + /usr/include/bits/xopen_lim.h + /usr/include/bits/uio_lim.h + /usr/include/boost/type_traits/is_unsigned.hpp + /usr/include/boost/type_traits/add_volatile.hpp + /usr/include/boost/range/detail/has_member_size.hpp + /usr/include/boost/utility.hpp + /usr/include/boost/utility/base_from_member.hpp + /usr/include/boost/preprocessor/repetition/repeat_from_to.hpp + /usr/include/boost/utility/binary.hpp + /usr/include/boost/preprocessor/control/deduce_d.hpp + /usr/include/boost/preprocessor/seq/cat.hpp + /usr/include/boost/preprocessor/seq/fold_left.hpp + /usr/include/boost/preprocessor/seq/limits/fold_left_256.hpp + /usr/include/boost/preprocessor/seq/transform.hpp + /usr/include/boost/preprocessor/arithmetic/mod.hpp + /usr/include/boost/preprocessor/arithmetic/detail/div_base.hpp + /usr/include/boost/preprocessor/comparison/less_equal.hpp + /usr/include/boost/preprocessor/arithmetic/detail/is_1_number.hpp + /usr/include/boost/utility/identity_type.hpp + /usr/include/boost/type_traits/function_traits.hpp + /usr/include/boost/core/checked_delete.hpp + /usr/include/boost/core/noncopyable.hpp + /usr/include/boost/range/distance.hpp + /usr/include/boost/iterator/distance.hpp + /usr/include/boost/range/empty.hpp + /usr/include/boost/range/rbegin.hpp + /usr/include/boost/range/reverse_iterator.hpp + /usr/include/boost/iterator/reverse_iterator.hpp + /usr/include/boost/iterator/iterator_adaptor.hpp + /usr/include/boost/range/rend.hpp + /usr/include/boost/range/algorithm/equal.hpp + /usr/include/boost/range/detail/safe_bool.hpp + /usr/include/boost/next_prior.hpp + /usr/include/boost/type_traits/has_plus.hpp + /usr/include/boost/type_traits/detail/has_binary_operator.hpp + /usr/include/boost/type_traits/make_void.hpp + /usr/include/boost/type_traits/has_plus_assign.hpp + /usr/include/boost/type_traits/has_minus.hpp + /usr/include/boost/type_traits/has_minus_assign.hpp + /usr/include/boost/iterator/advance.hpp + /usr/include/boost/range/iterator_range_io.hpp + /usr/include/boost/range/detail/str_types.hpp + /usr/include/boost/algorithm/string/detail/trim.hpp + /usr/include/boost/algorithm/string/classification.hpp + /usr/include/boost/algorithm/string/detail/classification.hpp + /usr/include/boost/algorithm/string/predicate_facade.hpp + /usr/include/boost/algorithm/string/case_conv.hpp + /usr/include/boost/iterator/transform_iterator.hpp + /usr/include/boost/algorithm/string/detail/case_conv.hpp + /usr/include/boost/algorithm/string/predicate.hpp + /usr/include/boost/algorithm/string/compare.hpp + /usr/include/boost/algorithm/string/find.hpp + /usr/include/boost/algorithm/string/finder.hpp + /usr/include/boost/algorithm/string/constants.hpp + /usr/include/boost/algorithm/string/detail/finder.hpp + /usr/include/boost/algorithm/string/detail/predicate.hpp + /usr/include/boost/algorithm/string/split.hpp + /usr/include/boost/algorithm/string/iter_find.hpp + /usr/include/boost/algorithm/string/concept.hpp + /usr/include/boost/algorithm/string/find_iterator.hpp + /usr/include/boost/algorithm/string/detail/find_iterator.hpp + /usr/include/boost/function.hpp + /usr/include/boost/preprocessor/iterate.hpp + /usr/include/boost/function/detail/prologue.hpp + /usr/include/boost/function/function_base.hpp + /usr/include/boost/integer.hpp + /usr/include/boost/integer_fwd.hpp + /usr/include/boost/integer_traits.hpp + /usr/include/boost/type_index.hpp + /usr/include/boost/type_index/stl_type_index.hpp + /usr/include/boost/type_index/type_index_facade.hpp + /usr/include/boost/core/demangle.hpp + /usr/include/c++/11/cxxabi.h + /usr/include/c++/11/x86_64-redhat-linux/bits/cxxabi_tweaks.h + /usr/include/boost/type_traits/has_trivial_copy.hpp + /usr/include/boost/type_traits/is_copy_constructible.hpp + /usr/include/boost/type_traits/has_trivial_destructor.hpp + /usr/include/boost/type_traits/composite_traits.hpp + /usr/include/boost/type_traits/is_union.hpp + /usr/include/boost/ref.hpp + /usr/include/boost/core/ref.hpp + /usr/include/boost/function_equal.hpp + /usr/include/boost/function/function_fwd.hpp + /usr/include/boost/mem_fn.hpp + /usr/include/boost/bind/mem_fn.hpp + /usr/include/boost/get_pointer.hpp + /usr/include/boost/config/no_tr1/memory.hpp + /usr/include/boost/bind/mem_fn_template.hpp + /usr/include/boost/bind/mem_fn_cc.hpp + /usr/include/boost/preprocessor/enum.hpp + /usr/include/boost/preprocessor/repetition/enum.hpp + /usr/include/boost/preprocessor/enum_params.hpp + /usr/include/boost/function/detail/function_iterate.hpp + /usr/include/boost/function/detail/maybe_include.hpp + /usr/include/boost/function/function_template.hpp + /usr/include/boost/core/no_exceptions_support.hpp + /usr/include/boost/algorithm/string/detail/util.hpp + /usr/include/boost/algorithm/string/join.hpp + /usr/include/boost/algorithm/string/detail/sequence.hpp + /usr/include/boost/mpl/logical.hpp + /usr/include/boost/algorithm/string/replace.hpp + /usr/include/boost/algorithm/string/find_format.hpp + /usr/include/boost/algorithm/string/detail/find_format.hpp + /usr/include/boost/algorithm/string/detail/find_format_store.hpp + /usr/include/boost/algorithm/string/detail/replace_storage.hpp + /usr/include/boost/algorithm/string/detail/find_format_all.hpp + /usr/include/boost/algorithm/string/formatter.hpp + /usr/include/boost/algorithm/string/detail/formatter.hpp + /usr/include/boost/algorithm/string/erase.hpp + +CMakeFiles/lspcpp.dir/src/lsp/working_files.cpp.o + /usr/local/src/asymptote-2.78/LspCpp/src/lsp/working_files.cpp + /usr/include/stdc-predef.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/working_files.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/lsp_diagnostic.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/lsRange.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/JsonRpc/serializer.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/JsonRpc/macro_map.h + /usr/include/boost/optional.hpp + /usr/include/boost/optional/optional.hpp + /usr/include/c++/11/new + /usr/include/c++/11/x86_64-redhat-linux/bits/c++config.h + /usr/include/bits/wordsize.h + /usr/include/c++/11/x86_64-redhat-linux/bits/os_defines.h + /usr/include/features.h + /usr/include/sys/cdefs.h + /usr/include/bits/long-double.h + /usr/include/gnu/stubs.h + /usr/include/gnu/stubs-64.h + /usr/include/c++/11/x86_64-redhat-linux/bits/cpu_defines.h + /usr/include/c++/11/bits/exception.h + /usr/include/c++/11/iosfwd + /usr/include/c++/11/bits/stringfwd.h + /usr/include/c++/11/bits/memoryfwd.h + /usr/include/c++/11/bits/postypes.h + /usr/include/c++/11/cwchar + /usr/include/wchar.h + /usr/include/bits/libc-header-start.h + /usr/include/bits/floatn.h + /usr/include/bits/floatn-common.h + /usr/lib/gcc/x86_64-redhat-linux/11/include/stddef.h + /usr/lib/gcc/x86_64-redhat-linux/11/include/stdarg.h + /usr/include/bits/wchar.h + /usr/include/bits/types/wint_t.h + /usr/include/bits/types/mbstate_t.h + /usr/include/bits/types/__mbstate_t.h + /usr/include/bits/types/__FILE.h + /usr/include/bits/types/FILE.h + /usr/include/bits/types/locale_t.h + /usr/include/bits/types/__locale_t.h + /usr/include/boost/assert.hpp + /usr/include/assert.h + /usr/include/boost/core/addressof.hpp + /usr/include/boost/config.hpp + /usr/include/boost/config/user.hpp + /usr/include/boost/config/detail/select_compiler_config.hpp + /usr/include/boost/config/compiler/gcc.hpp + /usr/include/c++/11/cstddef + /usr/include/boost/config/detail/select_stdlib_config.hpp + /usr/include/c++/11/version + /usr/include/boost/config/stdlib/libstdcpp3.hpp + /usr/include/unistd.h + /usr/include/bits/posix_opt.h + /usr/include/bits/environments.h + /usr/include/bits/types.h + /usr/include/bits/timesize.h + /usr/include/bits/typesizes.h + /usr/include/bits/time64.h + /usr/include/bits/confname.h + /usr/include/bits/getopt_posix.h + /usr/include/bits/getopt_core.h + /usr/include/bits/unistd_ext.h + /usr/include/boost/config/detail/select_platform_config.hpp + /usr/include/boost/config/platform/linux.hpp + /usr/include/c++/11/cstdlib + /usr/include/stdlib.h + /usr/include/bits/waitflags.h + /usr/include/bits/waitstatus.h + /usr/include/sys/types.h + /usr/include/bits/types/clock_t.h + /usr/include/bits/types/clockid_t.h + /usr/include/bits/types/time_t.h + /usr/include/bits/types/timer_t.h + /usr/include/bits/stdint-intn.h + /usr/include/endian.h + /usr/include/bits/endian.h + /usr/include/bits/endianness.h + /usr/include/bits/byteswap.h + /usr/include/bits/uintn-identity.h + /usr/include/sys/select.h + /usr/include/bits/select.h + /usr/include/bits/types/sigset_t.h + /usr/include/bits/types/__sigset_t.h + /usr/include/bits/types/struct_timeval.h + /usr/include/bits/types/struct_timespec.h + /usr/include/bits/pthreadtypes.h + /usr/include/bits/thread-shared-types.h + /usr/include/bits/pthreadtypes-arch.h + /usr/include/bits/struct_mutex.h + /usr/include/bits/struct_rwlock.h + /usr/include/alloca.h + /usr/include/bits/stdlib-bsearch.h + /usr/include/bits/stdlib-float.h + /usr/include/c++/11/bits/std_abs.h + /usr/include/boost/config/detail/posix_features.hpp + /usr/include/boost/config/detail/suffix.hpp + /usr/include/boost/config/helper_macros.hpp + /usr/include/boost/core/enable_if.hpp + /usr/include/boost/core/explicit_operator_bool.hpp + /usr/include/boost/config/workaround.hpp + /usr/include/boost/core/swap.hpp + /usr/include/c++/11/utility + /usr/include/c++/11/bits/stl_relops.h + /usr/include/c++/11/bits/stl_pair.h + /usr/include/c++/11/bits/move.h + /usr/include/c++/11/type_traits + /usr/include/c++/11/initializer_list + /usr/include/boost/optional/bad_optional_access.hpp + /usr/include/c++/11/stdexcept + /usr/include/c++/11/exception + /usr/include/c++/11/bits/exception_ptr.h + /usr/include/c++/11/bits/exception_defines.h + /usr/include/c++/11/bits/cxxabi_init_exception.h + /usr/include/c++/11/typeinfo + /usr/include/c++/11/bits/hash_bytes.h + /usr/include/c++/11/bits/nested_exception.h + /usr/include/c++/11/string + /usr/include/c++/11/bits/char_traits.h + /usr/include/c++/11/bits/stl_algobase.h + /usr/include/c++/11/bits/functexcept.h + /usr/include/c++/11/bits/cpp_type_traits.h + /usr/include/c++/11/ext/type_traits.h + /usr/include/c++/11/ext/numeric_traits.h + /usr/include/c++/11/bits/stl_iterator_base_types.h + /usr/include/c++/11/bits/stl_iterator_base_funcs.h + /usr/include/c++/11/bits/concept_check.h + /usr/include/c++/11/debug/assertions.h + /usr/include/c++/11/bits/stl_iterator.h + /usr/include/c++/11/bits/ptr_traits.h + /usr/include/c++/11/debug/debug.h + /usr/include/c++/11/bits/predefined_ops.h + /usr/include/c++/11/cstdint + /usr/lib/gcc/x86_64-redhat-linux/11/include/stdint.h + /usr/include/stdint.h + /usr/include/bits/stdint-uintn.h + /usr/include/c++/11/bits/allocator.h + /usr/include/c++/11/x86_64-redhat-linux/bits/c++allocator.h + /usr/include/c++/11/ext/new_allocator.h + /usr/include/c++/11/bits/localefwd.h + /usr/include/c++/11/x86_64-redhat-linux/bits/c++locale.h + /usr/include/c++/11/clocale + /usr/include/locale.h + /usr/include/bits/locale.h + /usr/include/c++/11/cctype + /usr/include/ctype.h + /usr/include/c++/11/bits/ostream_insert.h + /usr/include/c++/11/bits/cxxabi_forced.h + /usr/include/c++/11/bits/stl_function.h + /usr/include/c++/11/backward/binders.h + /usr/include/c++/11/bits/range_access.h + /usr/include/c++/11/bits/basic_string.h + /usr/include/c++/11/ext/atomicity.h + /usr/include/c++/11/x86_64-redhat-linux/bits/gthr.h + /usr/include/c++/11/x86_64-redhat-linux/bits/gthr-default.h + /usr/include/pthread.h + /usr/include/sched.h + /usr/include/bits/sched.h + /usr/include/bits/types/struct_sched_param.h + /usr/include/bits/cpu-set.h + /usr/include/time.h + /usr/include/bits/time.h + /usr/include/bits/timex.h + /usr/include/bits/types/struct_tm.h + /usr/include/bits/types/struct_itimerspec.h + /usr/include/bits/setjmp.h + /usr/include/bits/types/struct___jmp_buf_tag.h + /usr/include/c++/11/x86_64-redhat-linux/bits/atomic_word.h + /usr/include/sys/single_threaded.h + /usr/include/c++/11/ext/alloc_traits.h + /usr/include/c++/11/bits/alloc_traits.h + /usr/include/c++/11/bits/stl_construct.h + /usr/include/c++/11/ext/string_conversions.h + /usr/include/c++/11/cstdio + /usr/include/stdio.h + /usr/include/bits/types/__fpos_t.h + /usr/include/bits/types/__fpos64_t.h + /usr/include/bits/types/struct_FILE.h + /usr/include/bits/types/cookie_io_functions_t.h + /usr/include/bits/stdio_lim.h + /usr/include/bits/stdio.h + /usr/include/c++/11/cerrno + /usr/include/errno.h + /usr/include/bits/errno.h + /usr/include/linux/errno.h + /usr/include/asm/errno.h + /usr/include/asm-generic/errno.h + /usr/include/asm-generic/errno-base.h + /usr/include/bits/types/error_t.h + /usr/include/c++/11/bits/charconv.h + /usr/include/c++/11/bits/functional_hash.h + /usr/include/c++/11/bits/basic_string.tcc + /usr/include/boost/static_assert.hpp + /usr/include/boost/detail/workaround.hpp + /usr/include/boost/throw_exception.hpp + /usr/include/boost/assert/source_location.hpp + /usr/include/boost/current_function.hpp + /usr/include/boost/cstdint.hpp + /usr/include/boost/exception/exception.hpp + /usr/include/boost/type.hpp + /usr/include/boost/type_traits/alignment_of.hpp + /usr/include/boost/type_traits/intrinsics.hpp + /usr/include/boost/type_traits/detail/config.hpp + /usr/include/boost/version.hpp + /usr/include/boost/type_traits/integral_constant.hpp + /usr/include/boost/type_traits/conditional.hpp + /usr/include/boost/type_traits/has_nothrow_constructor.hpp + /usr/include/boost/type_traits/is_default_constructible.hpp + /usr/include/boost/type_traits/is_complete.hpp + /usr/include/boost/type_traits/declval.hpp + /usr/include/boost/type_traits/add_rvalue_reference.hpp + /usr/include/boost/type_traits/is_void.hpp + /usr/include/boost/type_traits/is_reference.hpp + /usr/include/boost/type_traits/is_lvalue_reference.hpp + /usr/include/boost/type_traits/is_rvalue_reference.hpp + /usr/include/boost/type_traits/remove_reference.hpp + /usr/include/boost/type_traits/is_function.hpp + /usr/include/boost/type_traits/detail/is_function_cxx_11.hpp + /usr/include/boost/type_traits/detail/yes_no_type.hpp + /usr/include/boost/type_traits/type_with_alignment.hpp + /usr/include/boost/type_traits/is_pod.hpp + /usr/include/boost/type_traits/is_scalar.hpp + /usr/include/boost/type_traits/is_arithmetic.hpp + /usr/include/boost/type_traits/is_integral.hpp + /usr/include/boost/type_traits/is_floating_point.hpp + /usr/include/boost/type_traits/is_enum.hpp + /usr/include/boost/type_traits/is_pointer.hpp + /usr/include/boost/type_traits/is_member_pointer.hpp + /usr/include/boost/type_traits/is_member_function_pointer.hpp + /usr/include/boost/type_traits/detail/is_member_function_pointer_cxx_11.hpp + /usr/include/boost/type_traits/remove_const.hpp + /usr/include/boost/type_traits/decay.hpp + /usr/include/boost/type_traits/is_array.hpp + /usr/include/boost/type_traits/remove_bounds.hpp + /usr/include/boost/type_traits/remove_extent.hpp + /usr/include/boost/type_traits/add_pointer.hpp + /usr/include/boost/type_traits/remove_cv.hpp + /usr/include/boost/type_traits/is_base_of.hpp + /usr/include/boost/type_traits/is_base_and_derived.hpp + /usr/include/boost/type_traits/is_same.hpp + /usr/include/boost/type_traits/is_class.hpp + /usr/include/boost/type_traits/is_const.hpp + /usr/include/boost/type_traits/is_constructible.hpp + /usr/include/boost/type_traits/is_destructible.hpp + /usr/include/boost/type_traits/is_nothrow_move_assignable.hpp + /usr/include/boost/type_traits/has_trivial_move_assign.hpp + /usr/include/boost/type_traits/is_assignable.hpp + /usr/include/boost/type_traits/is_volatile.hpp + /usr/include/boost/type_traits/has_nothrow_assign.hpp + /usr/include/boost/type_traits/enable_if.hpp + /usr/include/boost/type_traits/is_nothrow_move_constructible.hpp + /usr/include/boost/move/utility.hpp + /usr/include/boost/move/detail/config_begin.hpp + /usr/include/boost/move/detail/workaround.hpp + /usr/include/boost/move/utility_core.hpp + /usr/include/boost/move/core.hpp + /usr/include/boost/move/detail/config_end.hpp + /usr/include/boost/move/detail/meta_utils.hpp + /usr/include/boost/move/detail/meta_utils_core.hpp + /usr/include/boost/move/traits.hpp + /usr/include/boost/move/detail/type_traits.hpp + /usr/include/boost/none.hpp + /usr/include/boost/none_t.hpp + /usr/include/boost/utility/compare_pointees.hpp + /usr/include/c++/11/functional + /usr/include/c++/11/tuple + /usr/include/c++/11/array + /usr/include/c++/11/bits/uses_allocator.h + /usr/include/c++/11/bits/invoke.h + /usr/include/c++/11/bits/refwrap.h + /usr/include/c++/11/bits/std_function.h + /usr/include/boost/utility/result_of.hpp + /usr/include/boost/preprocessor/cat.hpp + /usr/include/boost/preprocessor/config/config.hpp + /usr/include/boost/preprocessor/iteration/iterate.hpp + /usr/include/boost/preprocessor/arithmetic/dec.hpp + /usr/include/boost/preprocessor/config/limits.hpp + /usr/include/boost/preprocessor/arithmetic/limits/dec_256.hpp + /usr/include/boost/preprocessor/arithmetic/inc.hpp + /usr/include/boost/preprocessor/arithmetic/limits/inc_256.hpp + /usr/include/boost/preprocessor/array/elem.hpp + /usr/include/boost/preprocessor/array/data.hpp + /usr/include/boost/preprocessor/tuple/elem.hpp + /usr/include/boost/preprocessor/facilities/expand.hpp + /usr/include/boost/preprocessor/facilities/overload.hpp + /usr/include/boost/preprocessor/variadic/size.hpp + /usr/include/boost/preprocessor/control/iif.hpp + /usr/include/boost/preprocessor/facilities/check_empty.hpp + /usr/include/boost/preprocessor/variadic/has_opt.hpp + /usr/include/boost/preprocessor/variadic/limits/size_64.hpp + /usr/include/boost/preprocessor/tuple/rem.hpp + /usr/include/boost/preprocessor/tuple/detail/is_single_return.hpp + /usr/include/boost/preprocessor/variadic/elem.hpp + /usr/include/boost/preprocessor/variadic/limits/elem_64.hpp + /usr/include/boost/preprocessor/array/size.hpp + /usr/include/boost/preprocessor/slot/slot.hpp + /usr/include/boost/preprocessor/slot/detail/def.hpp + /usr/include/boost/preprocessor/repetition/enum_params.hpp + /usr/include/boost/preprocessor/punctuation/comma_if.hpp + /usr/include/boost/preprocessor/control/if.hpp + /usr/include/boost/preprocessor/logical/bool.hpp + /usr/include/boost/preprocessor/logical/limits/bool_256.hpp + /usr/include/boost/preprocessor/facilities/empty.hpp + /usr/include/boost/preprocessor/punctuation/comma.hpp + /usr/include/boost/preprocessor/repetition/repeat.hpp + /usr/include/boost/preprocessor/debug/error.hpp + /usr/include/boost/preprocessor/detail/auto_rec.hpp + /usr/include/boost/preprocessor/detail/limits/auto_rec_256.hpp + /usr/include/boost/preprocessor/tuple/eat.hpp + /usr/include/boost/preprocessor/repetition/limits/repeat_256.hpp + /usr/include/boost/preprocessor/repetition/enum_trailing_params.hpp + /usr/include/boost/preprocessor/repetition/enum_binary_params.hpp + /usr/include/boost/preprocessor/repetition/enum_shifted_params.hpp + /usr/include/boost/preprocessor/facilities/intercept.hpp + /usr/include/boost/preprocessor/facilities/limits/intercept_256.hpp + /usr/include/boost/type_traits/type_identity.hpp + /usr/include/boost/preprocessor/iteration/detail/iter/forward1.hpp + /usr/include/boost/preprocessor/iteration/detail/bounds/lower1.hpp + /usr/include/boost/preprocessor/slot/detail/shared.hpp + /usr/include/boost/preprocessor/iteration/detail/bounds/upper1.hpp + /usr/include/boost/preprocessor/iteration/detail/iter/limits/forward1_256.hpp + /usr/include/boost/utility/detail/result_of_iterate.hpp + /usr/include/boost/optional/optional_fwd.hpp + /usr/include/boost/optional/detail/optional_config.hpp + /usr/include/boost/optional/detail/optional_factory_support.hpp + /usr/include/boost/optional/detail/optional_aligned_storage.hpp + /usr/include/boost/optional/detail/optional_trivially_copyable_base.hpp + /usr/include/boost/optional/detail/optional_reference_spec.hpp + /usr/include/boost/optional/detail/optional_relops.hpp + /usr/include/boost/optional/detail/optional_swap.hpp + /usr/include/c++/11/cassert + /usr/include/c++/11/memory + /usr/include/c++/11/bits/stl_uninitialized.h + /usr/include/c++/11/bits/stl_tempbuf.h + /usr/include/c++/11/bits/stl_raw_storage_iter.h + /usr/include/c++/11/bits/align.h + /usr/include/c++/11/bit + /usr/include/c++/11/bits/unique_ptr.h + /usr/include/c++/11/bits/shared_ptr.h + /usr/include/c++/11/bits/shared_ptr_base.h + /usr/include/c++/11/bits/allocated_ptr.h + /usr/include/c++/11/ext/aligned_buffer.h + /usr/include/c++/11/ext/concurrence.h + /usr/include/c++/11/bits/shared_ptr_atomic.h + /usr/include/c++/11/bits/atomic_base.h + /usr/include/c++/11/bits/atomic_lockfree_defines.h + /usr/include/c++/11/backward/auto_ptr.h + /usr/include/c++/11/vector + /usr/include/c++/11/bits/stl_vector.h + /usr/include/c++/11/bits/stl_bvector.h + /usr/include/c++/11/bits/vector.tcc + /usr/include/c++/11/map + /usr/include/c++/11/bits/stl_tree.h + /usr/include/c++/11/bits/stl_map.h + /usr/include/c++/11/bits/stl_multimap.h + /usr/include/c++/11/bits/erase_if.h + /usr/include/c++/11/algorithm + /usr/include/c++/11/bits/stl_algo.h + /usr/include/c++/11/bits/algorithmfwd.h + /usr/include/c++/11/bits/stl_heap.h + /usr/include/c++/11/bits/uniform_int_dist.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/lsPosition.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/lsTextEdit.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/lsDocumentUri.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/lsResponseError.h + /usr/include/c++/11/sstream + /usr/include/c++/11/istream + /usr/include/c++/11/ios + /usr/include/c++/11/bits/ios_base.h + /usr/include/c++/11/bits/locale_classes.h + /usr/include/c++/11/bits/locale_classes.tcc + /usr/include/c++/11/system_error + /usr/include/c++/11/x86_64-redhat-linux/bits/error_constants.h + /usr/include/c++/11/streambuf + /usr/include/c++/11/bits/streambuf.tcc + /usr/include/c++/11/bits/basic_ios.h + /usr/include/c++/11/bits/locale_facets.h + /usr/include/c++/11/cwctype + /usr/include/wctype.h + /usr/include/bits/wctype-wchar.h + /usr/include/c++/11/x86_64-redhat-linux/bits/ctype_base.h + /usr/include/c++/11/bits/streambuf_iterator.h + /usr/include/c++/11/x86_64-redhat-linux/bits/ctype_inline.h + /usr/include/c++/11/bits/locale_facets.tcc + /usr/include/c++/11/bits/basic_ios.tcc + /usr/include/c++/11/ostream + /usr/include/c++/11/bits/ostream.tcc + /usr/include/c++/11/bits/istream.tcc + /usr/include/c++/11/bits/sstream.tcc + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/lsAny.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/JsonRpc/message.h + /usr/include/c++/11/atomic + /usr/include/c++/11/iostream + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/method_type.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/location_type.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/JsonRpc/RequestInMessage.h + /usr/include/c++/11/mutex + /usr/include/c++/11/chrono + /usr/include/c++/11/ratio + /usr/include/c++/11/limits + /usr/include/c++/11/ctime + /usr/include/c++/11/bits/parse_numbers.h + /usr/include/c++/11/bits/std_mutex.h + /usr/include/c++/11/bits/unique_lock.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/JsonRpc/lsRequestId.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/JsonRpc/lsResponseMessage.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/AbsolutePath.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/textDocument/did_change.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/JsonRpc/NotificationInMessage.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/lsVersionedTextDocumentIdentifier.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/lsTextDocumentIdentifier.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/textDocument/did_close.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/textDocument/did_open.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/lsTextDocumentItem.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/Directory.h + /usr/include/c++/11/climits + /usr/lib/gcc/x86_64-redhat-linux/11/include/limits.h + /usr/lib/gcc/x86_64-redhat-linux/11/include/syslimits.h + /usr/include/limits.h + /usr/include/bits/posix1_lim.h + /usr/include/bits/local_lim.h + /usr/include/linux/limits.h + /usr/include/bits/posix2_lim.h + /usr/include/bits/xopen_lim.h + /usr/include/bits/uio_lim.h + /usr/include/c++/11/numeric + /usr/include/c++/11/bits/stl_numeric.h + /usr/local/src/asymptote-2.78/LspCpp/include/LibLsp/lsp/utils.h + /usr/include/c++/11/codecvt + /usr/include/c++/11/bits/codecvt.h + /usr/include/c++/11/iterator + /usr/include/c++/11/bits/stream_iterator.h + /usr/include/c++/11/locale + /usr/include/c++/11/bits/locale_facets_nonio.h + /usr/include/c++/11/x86_64-redhat-linux/bits/time_members.h + /usr/include/c++/11/x86_64-redhat-linux/bits/messages_members.h + /usr/include/libintl.h + /usr/include/c++/11/bits/locale_facets_nonio.tcc + /usr/include/c++/11/bits/locale_conv.h + diff --git a/graphics/asymptote/LspCpp/CMakeFiles/lspcpp.dir/compiler_depend.make b/graphics/asymptote/LspCpp/CMakeFiles/lspcpp.dir/compiler_depend.make new file mode 100644 index 0000000000..e35c2bb137 --- /dev/null +++ b/graphics/asymptote/LspCpp/CMakeFiles/lspcpp.dir/compiler_depend.make @@ -0,0 +1,20463 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 3.20 + +CMakeFiles/lspcpp.dir/src/jsonrpc/Context.cpp.o: src/jsonrpc/Context.cpp \ + /usr/include/stdc-predef.h \ + include/LibLsp/JsonRpc/Context.h \ + /usr/include/c++/11/memory \ + /usr/include/c++/11/bits/stl_algobase.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/c++config.h \ + /usr/include/bits/wordsize.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/os_defines.h \ + /usr/include/features.h \ + /usr/include/sys/cdefs.h \ + /usr/include/bits/long-double.h \ + /usr/include/gnu/stubs.h \ + /usr/include/gnu/stubs-64.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/cpu_defines.h \ + /usr/include/c++/11/bits/functexcept.h \ + /usr/include/c++/11/bits/exception_defines.h \ + /usr/include/c++/11/bits/cpp_type_traits.h \ + /usr/include/c++/11/ext/type_traits.h \ + /usr/include/c++/11/ext/numeric_traits.h \ + /usr/include/c++/11/bits/stl_pair.h \ + /usr/include/c++/11/bits/move.h \ + /usr/include/c++/11/type_traits \ + /usr/include/c++/11/bits/stl_iterator_base_types.h \ + /usr/include/c++/11/bits/stl_iterator_base_funcs.h \ + /usr/include/c++/11/bits/concept_check.h \ + /usr/include/c++/11/debug/assertions.h \ + /usr/include/c++/11/bits/stl_iterator.h \ + /usr/include/c++/11/bits/ptr_traits.h \ + /usr/include/c++/11/debug/debug.h \ + /usr/include/c++/11/bits/predefined_ops.h \ + /usr/include/c++/11/bits/allocator.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/c++allocator.h \ + /usr/include/c++/11/ext/new_allocator.h \ + /usr/include/c++/11/new \ + /usr/include/c++/11/bits/exception.h \ + /usr/include/c++/11/bits/memoryfwd.h \ + /usr/include/c++/11/bits/stl_construct.h \ + /usr/include/c++/11/bits/stl_uninitialized.h \ + /usr/include/c++/11/ext/alloc_traits.h \ + /usr/include/c++/11/bits/alloc_traits.h \ + /usr/include/c++/11/bits/stl_tempbuf.h \ + /usr/include/c++/11/bits/stl_raw_storage_iter.h \ + /usr/include/c++/11/bits/align.h \ + /usr/include/c++/11/bit \ + /usr/lib/gcc/x86_64-redhat-linux/11/include/stdint.h \ + /usr/include/stdint.h \ + /usr/include/bits/libc-header-start.h \ + /usr/include/bits/types.h \ + /usr/include/bits/timesize.h \ + /usr/include/bits/typesizes.h \ + /usr/include/bits/time64.h \ + /usr/include/bits/wchar.h \ + /usr/include/bits/stdint-intn.h \ + /usr/include/bits/stdint-uintn.h \ + /usr/include/c++/11/bits/uses_allocator.h \ + /usr/include/c++/11/bits/unique_ptr.h \ + /usr/include/c++/11/utility \ + /usr/include/c++/11/bits/stl_relops.h \ + /usr/include/c++/11/initializer_list \ + /usr/include/c++/11/tuple \ + /usr/include/c++/11/array \ + /usr/include/c++/11/bits/range_access.h \ + /usr/include/c++/11/bits/invoke.h \ + /usr/include/c++/11/bits/stl_function.h \ + /usr/include/c++/11/backward/binders.h \ + /usr/include/c++/11/bits/functional_hash.h \ + /usr/include/c++/11/bits/hash_bytes.h \ + /usr/include/c++/11/bits/shared_ptr.h \ + /usr/include/c++/11/iosfwd \ + /usr/include/c++/11/bits/stringfwd.h \ + /usr/include/c++/11/bits/postypes.h \ + /usr/include/c++/11/cwchar \ + /usr/include/wchar.h \ + /usr/include/bits/floatn.h \ + /usr/include/bits/floatn-common.h \ + /usr/lib/gcc/x86_64-redhat-linux/11/include/stddef.h \ + /usr/lib/gcc/x86_64-redhat-linux/11/include/stdarg.h \ + /usr/include/bits/types/wint_t.h \ + /usr/include/bits/types/mbstate_t.h \ + /usr/include/bits/types/__mbstate_t.h \ + /usr/include/bits/types/__FILE.h \ + /usr/include/bits/types/FILE.h \ + /usr/include/bits/types/locale_t.h \ + /usr/include/bits/types/__locale_t.h \ + /usr/include/c++/11/bits/shared_ptr_base.h \ + /usr/include/c++/11/typeinfo \ + /usr/include/c++/11/bits/allocated_ptr.h \ + /usr/include/c++/11/bits/refwrap.h \ + /usr/include/c++/11/ext/aligned_buffer.h \ + /usr/include/c++/11/ext/atomicity.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/gthr.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/gthr-default.h \ + /usr/include/pthread.h \ + /usr/include/sched.h \ + /usr/include/bits/types/time_t.h \ + /usr/include/bits/types/struct_timespec.h \ + /usr/include/bits/endian.h \ + /usr/include/bits/endianness.h \ + /usr/include/bits/sched.h \ + /usr/include/bits/types/struct_sched_param.h \ + /usr/include/bits/cpu-set.h \ + /usr/include/time.h \ + /usr/include/bits/time.h \ + /usr/include/bits/timex.h \ + /usr/include/bits/types/struct_timeval.h \ + /usr/include/bits/types/clock_t.h \ + /usr/include/bits/types/struct_tm.h \ + /usr/include/bits/types/clockid_t.h \ + /usr/include/bits/types/timer_t.h \ + /usr/include/bits/types/struct_itimerspec.h \ + /usr/include/bits/pthreadtypes.h \ + /usr/include/bits/thread-shared-types.h \ + /usr/include/bits/pthreadtypes-arch.h \ + /usr/include/bits/struct_mutex.h \ + /usr/include/bits/struct_rwlock.h \ + /usr/include/bits/setjmp.h \ + /usr/include/bits/types/__sigset_t.h \ + /usr/include/bits/types/struct___jmp_buf_tag.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/atomic_word.h \ + /usr/include/sys/single_threaded.h \ + /usr/include/c++/11/ext/concurrence.h \ + /usr/include/c++/11/exception \ + /usr/include/c++/11/bits/exception_ptr.h \ + /usr/include/c++/11/bits/cxxabi_init_exception.h \ + /usr/include/c++/11/bits/nested_exception.h \ + /usr/include/c++/11/bits/shared_ptr_atomic.h \ + /usr/include/c++/11/bits/atomic_base.h \ + /usr/include/c++/11/bits/atomic_lockfree_defines.h \ + /usr/include/c++/11/backward/auto_ptr.h \ + /usr/include/c++/11/cassert \ + /usr/include/assert.h + +CMakeFiles/lspcpp.dir/src/jsonrpc/Endpoint.cpp.o: src/jsonrpc/Endpoint.cpp \ + /usr/include/stdc-predef.h \ + include/LibLsp/JsonRpc/Endpoint.h \ + /usr/include/c++/11/map \ + /usr/include/c++/11/bits/stl_tree.h \ + /usr/include/c++/11/bits/stl_algobase.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/c++config.h \ + /usr/include/bits/wordsize.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/os_defines.h \ + /usr/include/features.h \ + /usr/include/sys/cdefs.h \ + /usr/include/bits/long-double.h \ + /usr/include/gnu/stubs.h \ + /usr/include/gnu/stubs-64.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/cpu_defines.h \ + /usr/include/c++/11/bits/functexcept.h \ + /usr/include/c++/11/bits/exception_defines.h \ + /usr/include/c++/11/bits/cpp_type_traits.h \ + /usr/include/c++/11/ext/type_traits.h \ + /usr/include/c++/11/ext/numeric_traits.h \ + /usr/include/c++/11/bits/stl_pair.h \ + /usr/include/c++/11/bits/move.h \ + /usr/include/c++/11/type_traits \ + /usr/include/c++/11/bits/stl_iterator_base_types.h \ + /usr/include/c++/11/bits/stl_iterator_base_funcs.h \ + /usr/include/c++/11/bits/concept_check.h \ + /usr/include/c++/11/debug/assertions.h \ + /usr/include/c++/11/bits/stl_iterator.h \ + /usr/include/c++/11/bits/ptr_traits.h \ + /usr/include/c++/11/debug/debug.h \ + /usr/include/c++/11/bits/predefined_ops.h \ + /usr/include/c++/11/bits/allocator.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/c++allocator.h \ + /usr/include/c++/11/ext/new_allocator.h \ + /usr/include/c++/11/new \ + /usr/include/c++/11/bits/exception.h \ + /usr/include/c++/11/bits/memoryfwd.h \ + /usr/include/c++/11/bits/stl_function.h \ + /usr/include/c++/11/backward/binders.h \ + /usr/include/c++/11/ext/alloc_traits.h \ + /usr/include/c++/11/bits/alloc_traits.h \ + /usr/include/c++/11/bits/stl_construct.h \ + /usr/include/c++/11/ext/aligned_buffer.h \ + /usr/include/c++/11/bits/stl_map.h \ + /usr/include/c++/11/initializer_list \ + /usr/include/c++/11/tuple \ + /usr/include/c++/11/utility \ + /usr/include/c++/11/bits/stl_relops.h \ + /usr/include/c++/11/array \ + /usr/include/c++/11/bits/range_access.h \ + /usr/include/c++/11/bits/uses_allocator.h \ + /usr/include/c++/11/bits/invoke.h \ + /usr/include/c++/11/bits/stl_multimap.h \ + /usr/include/c++/11/bits/erase_if.h \ + /usr/include/c++/11/functional \ + /usr/include/c++/11/bits/functional_hash.h \ + /usr/include/c++/11/bits/hash_bytes.h \ + /usr/include/c++/11/bits/refwrap.h \ + /usr/include/c++/11/bits/std_function.h \ + /usr/include/c++/11/typeinfo \ + /usr/include/c++/11/memory \ + /usr/include/c++/11/bits/stl_uninitialized.h \ + /usr/include/c++/11/bits/stl_tempbuf.h \ + /usr/include/c++/11/bits/stl_raw_storage_iter.h \ + /usr/include/c++/11/bits/align.h \ + /usr/include/c++/11/bit \ + /usr/lib/gcc/x86_64-redhat-linux/11/include/stdint.h \ + /usr/include/stdint.h \ + /usr/include/bits/libc-header-start.h \ + /usr/include/bits/types.h \ + /usr/include/bits/timesize.h \ + /usr/include/bits/typesizes.h \ + /usr/include/bits/time64.h \ + /usr/include/bits/wchar.h \ + /usr/include/bits/stdint-intn.h \ + /usr/include/bits/stdint-uintn.h \ + /usr/include/c++/11/bits/unique_ptr.h \ + /usr/include/c++/11/bits/shared_ptr.h \ + /usr/include/c++/11/iosfwd \ + /usr/include/c++/11/bits/stringfwd.h \ + /usr/include/c++/11/bits/postypes.h \ + /usr/include/c++/11/cwchar \ + /usr/include/wchar.h \ + /usr/include/bits/floatn.h \ + /usr/include/bits/floatn-common.h \ + /usr/lib/gcc/x86_64-redhat-linux/11/include/stddef.h \ + /usr/lib/gcc/x86_64-redhat-linux/11/include/stdarg.h \ + /usr/include/bits/types/wint_t.h \ + /usr/include/bits/types/mbstate_t.h \ + /usr/include/bits/types/__mbstate_t.h \ + /usr/include/bits/types/__FILE.h \ + /usr/include/bits/types/FILE.h \ + /usr/include/bits/types/locale_t.h \ + /usr/include/bits/types/__locale_t.h \ + /usr/include/c++/11/bits/shared_ptr_base.h \ + /usr/include/c++/11/bits/allocated_ptr.h \ + /usr/include/c++/11/ext/atomicity.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/gthr.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/gthr-default.h \ + /usr/include/pthread.h \ + /usr/include/sched.h \ + /usr/include/bits/types/time_t.h \ + /usr/include/bits/types/struct_timespec.h \ + /usr/include/bits/endian.h \ + /usr/include/bits/endianness.h \ + /usr/include/bits/sched.h \ + /usr/include/bits/types/struct_sched_param.h \ + /usr/include/bits/cpu-set.h \ + /usr/include/time.h \ + /usr/include/bits/time.h \ + /usr/include/bits/timex.h \ + /usr/include/bits/types/struct_timeval.h \ + /usr/include/bits/types/clock_t.h \ + /usr/include/bits/types/struct_tm.h \ + /usr/include/bits/types/clockid_t.h \ + /usr/include/bits/types/timer_t.h \ + /usr/include/bits/types/struct_itimerspec.h \ + /usr/include/bits/pthreadtypes.h \ + /usr/include/bits/thread-shared-types.h \ + /usr/include/bits/pthreadtypes-arch.h \ + /usr/include/bits/struct_mutex.h \ + /usr/include/bits/struct_rwlock.h \ + /usr/include/bits/setjmp.h \ + /usr/include/bits/types/__sigset_t.h \ + /usr/include/bits/types/struct___jmp_buf_tag.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/atomic_word.h \ + /usr/include/sys/single_threaded.h \ + /usr/include/c++/11/ext/concurrence.h \ + /usr/include/c++/11/exception \ + /usr/include/c++/11/bits/exception_ptr.h \ + /usr/include/c++/11/bits/cxxabi_init_exception.h \ + /usr/include/c++/11/bits/nested_exception.h \ + /usr/include/c++/11/bits/shared_ptr_atomic.h \ + /usr/include/c++/11/bits/atomic_base.h \ + /usr/include/c++/11/bits/atomic_lockfree_defines.h \ + /usr/include/c++/11/backward/auto_ptr.h \ + include/LibLsp/JsonRpc/MessageIssue.h \ + /usr/include/c++/11/string \ + /usr/include/c++/11/bits/char_traits.h \ + /usr/include/c++/11/cstdint \ + /usr/include/c++/11/bits/localefwd.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/c++locale.h \ + /usr/include/c++/11/clocale \ + /usr/include/locale.h \ + /usr/include/bits/locale.h \ + /usr/include/c++/11/cctype \ + /usr/include/ctype.h \ + /usr/include/c++/11/bits/ostream_insert.h \ + /usr/include/c++/11/bits/cxxabi_forced.h \ + /usr/include/c++/11/bits/basic_string.h \ + /usr/include/c++/11/ext/string_conversions.h \ + /usr/include/c++/11/cstdlib \ + /usr/include/stdlib.h \ + /usr/include/bits/waitflags.h \ + /usr/include/bits/waitstatus.h \ + /usr/include/sys/types.h \ + /usr/include/endian.h \ + /usr/include/bits/byteswap.h \ + /usr/include/bits/uintn-identity.h \ + /usr/include/sys/select.h \ + /usr/include/bits/select.h \ + /usr/include/bits/types/sigset_t.h \ + /usr/include/alloca.h \ + /usr/include/bits/stdlib-bsearch.h \ + /usr/include/bits/stdlib-float.h \ + /usr/include/c++/11/bits/std_abs.h \ + /usr/include/c++/11/cstdio \ + /usr/include/stdio.h \ + /usr/include/bits/types/__fpos_t.h \ + /usr/include/bits/types/__fpos64_t.h \ + /usr/include/bits/types/struct_FILE.h \ + /usr/include/bits/types/cookie_io_functions_t.h \ + /usr/include/bits/stdio_lim.h \ + /usr/include/bits/stdio.h \ + /usr/include/c++/11/cerrno \ + /usr/include/errno.h \ + /usr/include/bits/errno.h \ + /usr/include/linux/errno.h \ + /usr/include/asm/errno.h \ + /usr/include/asm-generic/errno.h \ + /usr/include/asm-generic/errno-base.h \ + /usr/include/bits/types/error_t.h \ + /usr/include/c++/11/bits/charconv.h \ + /usr/include/c++/11/bits/basic_string.tcc \ + /usr/include/c++/11/vector \ + /usr/include/c++/11/bits/stl_vector.h \ + /usr/include/c++/11/bits/stl_bvector.h \ + /usr/include/c++/11/bits/vector.tcc \ + include/LibLsp/JsonRpc/message.h \ + /usr/include/c++/11/atomic \ + /usr/include/c++/11/iostream \ + /usr/include/c++/11/ostream \ + /usr/include/c++/11/ios \ + /usr/include/c++/11/bits/ios_base.h \ + /usr/include/c++/11/bits/locale_classes.h \ + /usr/include/c++/11/bits/locale_classes.tcc \ + /usr/include/c++/11/system_error \ + /usr/include/c++/11/x86_64-redhat-linux/bits/error_constants.h \ + /usr/include/c++/11/stdexcept \ + /usr/include/c++/11/streambuf \ + /usr/include/c++/11/bits/streambuf.tcc \ + /usr/include/c++/11/bits/basic_ios.h \ + /usr/include/c++/11/bits/locale_facets.h \ + /usr/include/c++/11/cwctype \ + /usr/include/wctype.h \ + /usr/include/bits/wctype-wchar.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/ctype_base.h \ + /usr/include/c++/11/bits/streambuf_iterator.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/ctype_inline.h \ + /usr/include/c++/11/bits/locale_facets.tcc \ + /usr/include/c++/11/bits/basic_ios.tcc \ + /usr/include/c++/11/bits/ostream.tcc \ + /usr/include/c++/11/istream \ + /usr/include/c++/11/bits/istream.tcc \ + include/LibLsp/JsonRpc/serializer.h \ + include/LibLsp/JsonRpc/macro_map.h \ + /usr/include/boost/optional.hpp \ + /usr/include/boost/optional/optional.hpp \ + /usr/include/boost/assert.hpp \ + /usr/include/assert.h \ + /usr/include/boost/core/addressof.hpp \ + /usr/include/boost/config.hpp \ + /usr/include/boost/config/user.hpp \ + /usr/include/boost/config/detail/select_compiler_config.hpp \ + /usr/include/boost/config/compiler/gcc.hpp \ + /usr/include/c++/11/cstddef \ + /usr/include/boost/config/detail/select_stdlib_config.hpp \ + /usr/include/c++/11/version \ + /usr/include/boost/config/stdlib/libstdcpp3.hpp \ + /usr/include/unistd.h \ + /usr/include/bits/posix_opt.h \ + /usr/include/bits/environments.h \ + /usr/include/bits/confname.h \ + /usr/include/bits/getopt_posix.h \ + /usr/include/bits/getopt_core.h \ + /usr/include/bits/unistd_ext.h \ + /usr/include/boost/config/detail/select_platform_config.hpp \ + /usr/include/boost/config/platform/linux.hpp \ + /usr/include/boost/config/detail/posix_features.hpp \ + /usr/include/boost/config/detail/suffix.hpp \ + /usr/include/boost/config/helper_macros.hpp \ + /usr/include/boost/core/enable_if.hpp \ + /usr/include/boost/core/explicit_operator_bool.hpp \ + /usr/include/boost/config/workaround.hpp \ + /usr/include/boost/core/swap.hpp \ + /usr/include/boost/optional/bad_optional_access.hpp \ + /usr/include/boost/static_assert.hpp \ + /usr/include/boost/detail/workaround.hpp \ + /usr/include/boost/throw_exception.hpp \ + /usr/include/boost/assert/source_location.hpp \ + /usr/include/boost/current_function.hpp \ + /usr/include/boost/cstdint.hpp \ + /usr/include/boost/exception/exception.hpp \ + /usr/include/boost/type.hpp \ + /usr/include/boost/type_traits/alignment_of.hpp \ + /usr/include/boost/type_traits/intrinsics.hpp \ + /usr/include/boost/type_traits/detail/config.hpp \ + /usr/include/boost/version.hpp \ + /usr/include/boost/type_traits/integral_constant.hpp \ + /usr/include/boost/type_traits/conditional.hpp \ + /usr/include/boost/type_traits/has_nothrow_constructor.hpp \ + /usr/include/boost/type_traits/is_default_constructible.hpp \ + /usr/include/boost/type_traits/is_complete.hpp \ + /usr/include/boost/type_traits/declval.hpp \ + /usr/include/boost/type_traits/add_rvalue_reference.hpp \ + /usr/include/boost/type_traits/is_void.hpp \ + /usr/include/boost/type_traits/is_reference.hpp \ + /usr/include/boost/type_traits/is_lvalue_reference.hpp \ + /usr/include/boost/type_traits/is_rvalue_reference.hpp \ + /usr/include/boost/type_traits/remove_reference.hpp \ + /usr/include/boost/type_traits/is_function.hpp \ + /usr/include/boost/type_traits/detail/is_function_cxx_11.hpp \ + /usr/include/boost/type_traits/detail/yes_no_type.hpp \ + /usr/include/boost/type_traits/type_with_alignment.hpp \ + /usr/include/boost/type_traits/is_pod.hpp \ + /usr/include/boost/type_traits/is_scalar.hpp \ + /usr/include/boost/type_traits/is_arithmetic.hpp \ + /usr/include/boost/type_traits/is_integral.hpp \ + /usr/include/boost/type_traits/is_floating_point.hpp \ + /usr/include/boost/type_traits/is_enum.hpp \ + /usr/include/boost/type_traits/is_pointer.hpp \ + /usr/include/boost/type_traits/is_member_pointer.hpp \ + /usr/include/boost/type_traits/is_member_function_pointer.hpp \ + /usr/include/boost/type_traits/detail/is_member_function_pointer_cxx_11.hpp \ + /usr/include/boost/type_traits/remove_const.hpp \ + /usr/include/boost/type_traits/decay.hpp \ + /usr/include/boost/type_traits/is_array.hpp \ + /usr/include/boost/type_traits/remove_bounds.hpp \ + /usr/include/boost/type_traits/remove_extent.hpp \ + /usr/include/boost/type_traits/add_pointer.hpp \ + /usr/include/boost/type_traits/remove_cv.hpp \ + /usr/include/boost/type_traits/is_base_of.hpp \ + /usr/include/boost/type_traits/is_base_and_derived.hpp \ + /usr/include/boost/type_traits/is_same.hpp \ + /usr/include/boost/type_traits/is_class.hpp \ + /usr/include/boost/type_traits/is_const.hpp \ + /usr/include/boost/type_traits/is_constructible.hpp \ + /usr/include/boost/type_traits/is_destructible.hpp \ + /usr/include/boost/type_traits/is_nothrow_move_assignable.hpp \ + /usr/include/boost/type_traits/has_trivial_move_assign.hpp \ + /usr/include/boost/type_traits/is_assignable.hpp \ + /usr/include/boost/type_traits/is_volatile.hpp \ + /usr/include/boost/type_traits/has_nothrow_assign.hpp \ + /usr/include/boost/type_traits/enable_if.hpp \ + /usr/include/boost/type_traits/is_nothrow_move_constructible.hpp \ + /usr/include/boost/move/utility.hpp \ + /usr/include/boost/move/detail/config_begin.hpp \ + /usr/include/boost/move/detail/workaround.hpp \ + /usr/include/boost/move/utility_core.hpp \ + /usr/include/boost/move/core.hpp \ + /usr/include/boost/move/detail/config_end.hpp \ + /usr/include/boost/move/detail/meta_utils.hpp \ + /usr/include/boost/move/detail/meta_utils_core.hpp \ + /usr/include/boost/move/traits.hpp \ + /usr/include/boost/move/detail/type_traits.hpp \ + /usr/include/boost/none.hpp \ + /usr/include/boost/none_t.hpp \ + /usr/include/boost/utility/compare_pointees.hpp \ + /usr/include/boost/utility/result_of.hpp \ + /usr/include/boost/preprocessor/cat.hpp \ + /usr/include/boost/preprocessor/config/config.hpp \ + /usr/include/boost/preprocessor/iteration/iterate.hpp \ + /usr/include/boost/preprocessor/arithmetic/dec.hpp \ + /usr/include/boost/preprocessor/config/limits.hpp \ + /usr/include/boost/preprocessor/arithmetic/limits/dec_256.hpp \ + /usr/include/boost/preprocessor/arithmetic/inc.hpp \ + /usr/include/boost/preprocessor/arithmetic/limits/inc_256.hpp \ + /usr/include/boost/preprocessor/array/elem.hpp \ + /usr/include/boost/preprocessor/array/data.hpp \ + /usr/include/boost/preprocessor/tuple/elem.hpp \ + /usr/include/boost/preprocessor/facilities/expand.hpp \ + /usr/include/boost/preprocessor/facilities/overload.hpp \ + /usr/include/boost/preprocessor/variadic/size.hpp \ + /usr/include/boost/preprocessor/control/iif.hpp \ + /usr/include/boost/preprocessor/facilities/check_empty.hpp \ + /usr/include/boost/preprocessor/variadic/has_opt.hpp \ + /usr/include/boost/preprocessor/variadic/limits/size_64.hpp \ + /usr/include/boost/preprocessor/tuple/rem.hpp \ + /usr/include/boost/preprocessor/tuple/detail/is_single_return.hpp \ + /usr/include/boost/preprocessor/variadic/elem.hpp \ + /usr/include/boost/preprocessor/variadic/limits/elem_64.hpp \ + /usr/include/boost/preprocessor/array/size.hpp \ + /usr/include/boost/preprocessor/slot/slot.hpp \ + /usr/include/boost/preprocessor/slot/detail/def.hpp \ + /usr/include/boost/preprocessor/repetition/enum_params.hpp \ + /usr/include/boost/preprocessor/punctuation/comma_if.hpp \ + /usr/include/boost/preprocessor/control/if.hpp \ + /usr/include/boost/preprocessor/logical/bool.hpp \ + /usr/include/boost/preprocessor/logical/limits/bool_256.hpp \ + /usr/include/boost/preprocessor/facilities/empty.hpp \ + /usr/include/boost/preprocessor/punctuation/comma.hpp \ + /usr/include/boost/preprocessor/repetition/repeat.hpp \ + /usr/include/boost/preprocessor/debug/error.hpp \ + /usr/include/boost/preprocessor/detail/auto_rec.hpp \ + /usr/include/boost/preprocessor/detail/limits/auto_rec_256.hpp \ + /usr/include/boost/preprocessor/tuple/eat.hpp \ + /usr/include/boost/preprocessor/repetition/limits/repeat_256.hpp \ + /usr/include/boost/preprocessor/repetition/enum_trailing_params.hpp \ + /usr/include/boost/preprocessor/repetition/enum_binary_params.hpp \ + /usr/include/boost/preprocessor/repetition/enum_shifted_params.hpp \ + /usr/include/boost/preprocessor/facilities/intercept.hpp \ + /usr/include/boost/preprocessor/facilities/limits/intercept_256.hpp \ + /usr/include/boost/type_traits/type_identity.hpp \ + /usr/include/boost/preprocessor/iteration/detail/iter/forward1.hpp \ + /usr/include/boost/preprocessor/iteration/detail/bounds/lower1.hpp \ + /usr/include/boost/preprocessor/slot/detail/shared.hpp \ + /usr/include/boost/preprocessor/iteration/detail/bounds/upper1.hpp \ + /usr/include/boost/preprocessor/iteration/detail/iter/limits/forward1_256.hpp \ + /usr/include/boost/utility/detail/result_of_iterate.hpp \ + /usr/include/boost/optional/optional_fwd.hpp \ + /usr/include/boost/optional/detail/optional_config.hpp \ + /usr/include/boost/optional/detail/optional_factory_support.hpp \ + /usr/include/boost/optional/detail/optional_aligned_storage.hpp \ + /usr/include/boost/optional/detail/optional_trivially_copyable_base.hpp \ + /usr/include/boost/optional/detail/optional_reference_spec.hpp \ + /usr/include/boost/optional/detail/optional_relops.hpp \ + /usr/include/boost/optional/detail/optional_swap.hpp \ + /usr/include/c++/11/cassert \ + /usr/include/c++/11/algorithm \ + /usr/include/c++/11/bits/stl_algo.h \ + /usr/include/c++/11/bits/algorithmfwd.h \ + /usr/include/c++/11/bits/stl_heap.h \ + /usr/include/c++/11/bits/uniform_int_dist.h \ + include/LibLsp/lsp/method_type.h + +CMakeFiles/lspcpp.dir/src/jsonrpc/GCThreadContext.cpp.o: src/jsonrpc/GCThreadContext.cpp \ + /usr/include/stdc-predef.h \ + include/LibLsp/JsonRpc/GCThreadContext.h \ + ../gc-8.2.0/include/gc.h \ + ../gc-8.2.0/include/gc_version.h \ + ../gc-8.2.0/include/gc_config_macros.h \ + /usr/lib/gcc/x86_64-redhat-linux/11/include/stddef.h \ + /usr/include/features.h \ + /usr/include/sys/cdefs.h \ + /usr/include/bits/wordsize.h \ + /usr/include/bits/long-double.h \ + /usr/include/gnu/stubs.h \ + /usr/include/gnu/stubs-64.h \ + ../gc-8.2.0/include/gc_pthread_redirects.h \ + /usr/include/pthread.h \ + /usr/include/sched.h \ + /usr/include/bits/types.h \ + /usr/include/bits/timesize.h \ + /usr/include/bits/typesizes.h \ + /usr/include/bits/time64.h \ + /usr/include/bits/types/time_t.h \ + /usr/include/bits/types/struct_timespec.h \ + /usr/include/bits/endian.h \ + /usr/include/bits/endianness.h \ + /usr/include/bits/sched.h \ + /usr/include/bits/types/struct_sched_param.h \ + /usr/include/bits/cpu-set.h \ + /usr/include/time.h \ + /usr/include/bits/time.h \ + /usr/include/bits/timex.h \ + /usr/include/bits/types/struct_timeval.h \ + /usr/include/bits/types/clock_t.h \ + /usr/include/bits/types/struct_tm.h \ + /usr/include/bits/types/clockid_t.h \ + /usr/include/bits/types/timer_t.h \ + /usr/include/bits/types/struct_itimerspec.h \ + /usr/include/bits/types/locale_t.h \ + /usr/include/bits/types/__locale_t.h \ + /usr/include/bits/pthreadtypes.h \ + /usr/include/bits/thread-shared-types.h \ + /usr/include/bits/pthreadtypes-arch.h \ + /usr/include/bits/struct_mutex.h \ + /usr/include/bits/struct_rwlock.h \ + /usr/include/bits/setjmp.h \ + /usr/include/bits/types/__sigset_t.h \ + /usr/include/bits/types/struct___jmp_buf_tag.h \ + /usr/include/dlfcn.h \ + /usr/include/bits/dlfcn.h \ + /usr/include/signal.h \ + /usr/include/bits/signum-generic.h \ + /usr/include/bits/signum-arch.h \ + /usr/include/bits/types/sig_atomic_t.h \ + /usr/include/bits/types/sigset_t.h \ + /usr/include/bits/types/siginfo_t.h \ + /usr/include/bits/types/__sigval_t.h \ + /usr/include/bits/siginfo-arch.h \ + /usr/include/bits/siginfo-consts.h \ + /usr/include/bits/siginfo-consts-arch.h \ + /usr/include/bits/types/sigval_t.h \ + /usr/include/bits/types/sigevent_t.h \ + /usr/include/bits/sigevent-consts.h \ + /usr/include/bits/sigaction.h \ + /usr/include/bits/sigcontext.h \ + /usr/include/bits/types/stack_t.h \ + /usr/include/sys/ucontext.h \ + /usr/include/bits/sigstack.h \ + /usr/include/bits/ss_flags.h \ + /usr/include/bits/types/struct_sigstack.h \ + /usr/include/bits/sigthread.h \ + /usr/include/bits/signal_ext.h \ + /usr/include/c++/11/iostream \ + /usr/include/c++/11/x86_64-redhat-linux/bits/c++config.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/os_defines.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/cpu_defines.h \ + /usr/include/c++/11/ostream \ + /usr/include/c++/11/ios \ + /usr/include/c++/11/iosfwd \ + /usr/include/c++/11/bits/stringfwd.h \ + /usr/include/c++/11/bits/memoryfwd.h \ + /usr/include/c++/11/bits/postypes.h \ + /usr/include/c++/11/cwchar \ + /usr/include/wchar.h \ + /usr/include/bits/libc-header-start.h \ + /usr/include/bits/floatn.h \ + /usr/include/bits/floatn-common.h \ + /usr/lib/gcc/x86_64-redhat-linux/11/include/stdarg.h \ + /usr/include/bits/wchar.h \ + /usr/include/bits/types/wint_t.h \ + /usr/include/bits/types/mbstate_t.h \ + /usr/include/bits/types/__mbstate_t.h \ + /usr/include/bits/types/__FILE.h \ + /usr/include/bits/types/FILE.h \ + /usr/include/c++/11/exception \ + /usr/include/c++/11/bits/exception.h \ + /usr/include/c++/11/bits/exception_ptr.h \ + /usr/include/c++/11/bits/exception_defines.h \ + /usr/include/c++/11/bits/cxxabi_init_exception.h \ + /usr/include/c++/11/typeinfo \ + /usr/include/c++/11/bits/hash_bytes.h \ + /usr/include/c++/11/new \ + /usr/include/c++/11/bits/nested_exception.h \ + /usr/include/c++/11/bits/move.h \ + /usr/include/c++/11/type_traits \ + /usr/include/c++/11/bits/char_traits.h \ + /usr/include/c++/11/bits/stl_algobase.h \ + /usr/include/c++/11/bits/functexcept.h \ + /usr/include/c++/11/bits/cpp_type_traits.h \ + /usr/include/c++/11/ext/type_traits.h \ + /usr/include/c++/11/ext/numeric_traits.h \ + /usr/include/c++/11/bits/stl_pair.h \ + /usr/include/c++/11/bits/stl_iterator_base_types.h \ + /usr/include/c++/11/bits/stl_iterator_base_funcs.h \ + /usr/include/c++/11/bits/concept_check.h \ + /usr/include/c++/11/debug/assertions.h \ + /usr/include/c++/11/bits/stl_iterator.h \ + /usr/include/c++/11/bits/ptr_traits.h \ + /usr/include/c++/11/debug/debug.h \ + /usr/include/c++/11/bits/predefined_ops.h \ + /usr/include/c++/11/cstdint \ + /usr/lib/gcc/x86_64-redhat-linux/11/include/stdint.h \ + /usr/include/stdint.h \ + /usr/include/bits/stdint-intn.h \ + /usr/include/bits/stdint-uintn.h \ + /usr/include/c++/11/bits/localefwd.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/c++locale.h \ + /usr/include/c++/11/clocale \ + /usr/include/locale.h \ + /usr/include/bits/locale.h \ + /usr/include/c++/11/cctype \ + /usr/include/ctype.h \ + /usr/include/c++/11/bits/ios_base.h \ + /usr/include/c++/11/ext/atomicity.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/gthr.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/gthr-default.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/atomic_word.h \ + /usr/include/sys/single_threaded.h \ + /usr/include/c++/11/bits/locale_classes.h \ + /usr/include/c++/11/string \ + /usr/include/c++/11/bits/allocator.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/c++allocator.h \ + /usr/include/c++/11/ext/new_allocator.h \ + /usr/include/c++/11/bits/ostream_insert.h \ + /usr/include/c++/11/bits/cxxabi_forced.h \ + /usr/include/c++/11/bits/stl_function.h \ + /usr/include/c++/11/backward/binders.h \ + /usr/include/c++/11/bits/range_access.h \ + /usr/include/c++/11/initializer_list \ + /usr/include/c++/11/bits/basic_string.h \ + /usr/include/c++/11/ext/alloc_traits.h \ + /usr/include/c++/11/bits/alloc_traits.h \ + /usr/include/c++/11/bits/stl_construct.h \ + /usr/include/c++/11/ext/string_conversions.h \ + /usr/include/c++/11/cstdlib \ + /usr/include/stdlib.h \ + /usr/include/bits/waitflags.h \ + /usr/include/bits/waitstatus.h \ + /usr/include/sys/types.h \ + /usr/include/endian.h \ + /usr/include/bits/byteswap.h \ + /usr/include/bits/uintn-identity.h \ + /usr/include/sys/select.h \ + /usr/include/bits/select.h \ + /usr/include/alloca.h \ + /usr/include/bits/stdlib-bsearch.h \ + /usr/include/bits/stdlib-float.h \ + /usr/include/c++/11/bits/std_abs.h \ + /usr/include/c++/11/cstdio \ + /usr/include/stdio.h \ + /usr/include/bits/types/__fpos_t.h \ + /usr/include/bits/types/__fpos64_t.h \ + /usr/include/bits/types/struct_FILE.h \ + /usr/include/bits/types/cookie_io_functions_t.h \ + /usr/include/bits/stdio_lim.h \ + /usr/include/bits/stdio.h \ + /usr/include/c++/11/cerrno \ + /usr/include/errno.h \ + /usr/include/bits/errno.h \ + /usr/include/linux/errno.h \ + /usr/include/asm/errno.h \ + /usr/include/asm-generic/errno.h \ + /usr/include/asm-generic/errno-base.h \ + /usr/include/bits/types/error_t.h \ + /usr/include/c++/11/bits/charconv.h \ + /usr/include/c++/11/bits/functional_hash.h \ + /usr/include/c++/11/bits/basic_string.tcc \ + /usr/include/c++/11/bits/locale_classes.tcc \ + /usr/include/c++/11/system_error \ + /usr/include/c++/11/x86_64-redhat-linux/bits/error_constants.h \ + /usr/include/c++/11/stdexcept \ + /usr/include/c++/11/streambuf \ + /usr/include/c++/11/bits/streambuf.tcc \ + /usr/include/c++/11/bits/basic_ios.h \ + /usr/include/c++/11/bits/locale_facets.h \ + /usr/include/c++/11/cwctype \ + /usr/include/wctype.h \ + /usr/include/bits/wctype-wchar.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/ctype_base.h \ + /usr/include/c++/11/bits/streambuf_iterator.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/ctype_inline.h \ + /usr/include/c++/11/bits/locale_facets.tcc \ + /usr/include/c++/11/bits/basic_ios.tcc \ + /usr/include/c++/11/bits/ostream.tcc \ + /usr/include/c++/11/istream \ + /usr/include/c++/11/bits/istream.tcc + +CMakeFiles/lspcpp.dir/src/jsonrpc/MessageJsonHandler.cpp.o: src/jsonrpc/MessageJsonHandler.cpp \ + /usr/include/stdc-predef.h \ + include/LibLsp/JsonRpc/MessageJsonHandler.h \ + /usr/include/c++/11/string \ + /usr/include/c++/11/x86_64-redhat-linux/bits/c++config.h \ + /usr/include/bits/wordsize.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/os_defines.h \ + /usr/include/features.h \ + /usr/include/sys/cdefs.h \ + /usr/include/bits/long-double.h \ + /usr/include/gnu/stubs.h \ + /usr/include/gnu/stubs-64.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/cpu_defines.h \ + /usr/include/c++/11/bits/stringfwd.h \ + /usr/include/c++/11/bits/memoryfwd.h \ + /usr/include/c++/11/bits/char_traits.h \ + /usr/include/c++/11/bits/stl_algobase.h \ + /usr/include/c++/11/bits/functexcept.h \ + /usr/include/c++/11/bits/exception_defines.h \ + /usr/include/c++/11/bits/cpp_type_traits.h \ + /usr/include/c++/11/ext/type_traits.h \ + /usr/include/c++/11/ext/numeric_traits.h \ + /usr/include/c++/11/bits/stl_pair.h \ + /usr/include/c++/11/bits/move.h \ + /usr/include/c++/11/type_traits \ + /usr/include/c++/11/bits/stl_iterator_base_types.h \ + /usr/include/c++/11/bits/stl_iterator_base_funcs.h \ + /usr/include/c++/11/bits/concept_check.h \ + /usr/include/c++/11/debug/assertions.h \ + /usr/include/c++/11/bits/stl_iterator.h \ + /usr/include/c++/11/bits/ptr_traits.h \ + /usr/include/c++/11/debug/debug.h \ + /usr/include/c++/11/bits/predefined_ops.h \ + /usr/include/c++/11/bits/postypes.h \ + /usr/include/c++/11/cwchar \ + /usr/include/wchar.h \ + /usr/include/bits/libc-header-start.h \ + /usr/include/bits/floatn.h \ + /usr/include/bits/floatn-common.h \ + /usr/lib/gcc/x86_64-redhat-linux/11/include/stddef.h \ + /usr/lib/gcc/x86_64-redhat-linux/11/include/stdarg.h \ + /usr/include/bits/wchar.h \ + /usr/include/bits/types/wint_t.h \ + /usr/include/bits/types/mbstate_t.h \ + /usr/include/bits/types/__mbstate_t.h \ + /usr/include/bits/types/__FILE.h \ + /usr/include/bits/types/FILE.h \ + /usr/include/bits/types/locale_t.h \ + /usr/include/bits/types/__locale_t.h \ + /usr/include/c++/11/cstdint \ + /usr/lib/gcc/x86_64-redhat-linux/11/include/stdint.h \ + /usr/include/stdint.h \ + /usr/include/bits/types.h \ + /usr/include/bits/timesize.h \ + /usr/include/bits/typesizes.h \ + /usr/include/bits/time64.h \ + /usr/include/bits/stdint-intn.h \ + /usr/include/bits/stdint-uintn.h \ + /usr/include/c++/11/bits/allocator.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/c++allocator.h \ + /usr/include/c++/11/ext/new_allocator.h \ + /usr/include/c++/11/new \ + /usr/include/c++/11/bits/exception.h \ + /usr/include/c++/11/bits/localefwd.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/c++locale.h \ + /usr/include/c++/11/clocale \ + /usr/include/locale.h \ + /usr/include/bits/locale.h \ + /usr/include/c++/11/iosfwd \ + /usr/include/c++/11/cctype \ + /usr/include/ctype.h \ + /usr/include/bits/endian.h \ + /usr/include/bits/endianness.h \ + /usr/include/c++/11/bits/ostream_insert.h \ + /usr/include/c++/11/bits/cxxabi_forced.h \ + /usr/include/c++/11/bits/stl_function.h \ + /usr/include/c++/11/backward/binders.h \ + /usr/include/c++/11/bits/range_access.h \ + /usr/include/c++/11/initializer_list \ + /usr/include/c++/11/bits/basic_string.h \ + /usr/include/c++/11/ext/atomicity.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/gthr.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/gthr-default.h \ + /usr/include/pthread.h \ + /usr/include/sched.h \ + /usr/include/bits/types/time_t.h \ + /usr/include/bits/types/struct_timespec.h \ + /usr/include/bits/sched.h \ + /usr/include/bits/types/struct_sched_param.h \ + /usr/include/bits/cpu-set.h \ + /usr/include/time.h \ + /usr/include/bits/time.h \ + /usr/include/bits/timex.h \ + /usr/include/bits/types/struct_timeval.h \ + /usr/include/bits/types/clock_t.h \ + /usr/include/bits/types/struct_tm.h \ + /usr/include/bits/types/clockid_t.h \ + /usr/include/bits/types/timer_t.h \ + /usr/include/bits/types/struct_itimerspec.h \ + /usr/include/bits/pthreadtypes.h \ + /usr/include/bits/thread-shared-types.h \ + /usr/include/bits/pthreadtypes-arch.h \ + /usr/include/bits/struct_mutex.h \ + /usr/include/bits/struct_rwlock.h \ + /usr/include/bits/setjmp.h \ + /usr/include/bits/types/__sigset_t.h \ + /usr/include/bits/types/struct___jmp_buf_tag.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/atomic_word.h \ + /usr/include/sys/single_threaded.h \ + /usr/include/c++/11/ext/alloc_traits.h \ + /usr/include/c++/11/bits/alloc_traits.h \ + /usr/include/c++/11/bits/stl_construct.h \ + /usr/include/c++/11/ext/string_conversions.h \ + /usr/include/c++/11/cstdlib \ + /usr/include/stdlib.h \ + /usr/include/bits/waitflags.h \ + /usr/include/bits/waitstatus.h \ + /usr/include/sys/types.h \ + /usr/include/endian.h \ + /usr/include/bits/byteswap.h \ + /usr/include/bits/uintn-identity.h \ + /usr/include/sys/select.h \ + /usr/include/bits/select.h \ + /usr/include/bits/types/sigset_t.h \ + /usr/include/alloca.h \ + /usr/include/bits/stdlib-bsearch.h \ + /usr/include/bits/stdlib-float.h \ + /usr/include/c++/11/bits/std_abs.h \ + /usr/include/c++/11/cstdio \ + /usr/include/stdio.h \ + /usr/include/bits/types/__fpos_t.h \ + /usr/include/bits/types/__fpos64_t.h \ + /usr/include/bits/types/struct_FILE.h \ + /usr/include/bits/types/cookie_io_functions_t.h \ + /usr/include/bits/stdio_lim.h \ + /usr/include/bits/stdio.h \ + /usr/include/c++/11/cerrno \ + /usr/include/errno.h \ + /usr/include/bits/errno.h \ + /usr/include/linux/errno.h \ + /usr/include/asm/errno.h \ + /usr/include/asm-generic/errno.h \ + /usr/include/asm-generic/errno-base.h \ + /usr/include/bits/types/error_t.h \ + /usr/include/c++/11/bits/charconv.h \ + /usr/include/c++/11/bits/functional_hash.h \ + /usr/include/c++/11/bits/hash_bytes.h \ + /usr/include/c++/11/bits/basic_string.tcc \ + /usr/include/c++/11/map \ + /usr/include/c++/11/bits/stl_tree.h \ + /usr/include/c++/11/ext/aligned_buffer.h \ + /usr/include/c++/11/bits/stl_map.h \ + /usr/include/c++/11/tuple \ + /usr/include/c++/11/utility \ + /usr/include/c++/11/bits/stl_relops.h \ + /usr/include/c++/11/array \ + /usr/include/c++/11/bits/uses_allocator.h \ + /usr/include/c++/11/bits/invoke.h \ + /usr/include/c++/11/bits/stl_multimap.h \ + /usr/include/c++/11/bits/erase_if.h \ + /usr/include/c++/11/functional \ + /usr/include/c++/11/bits/refwrap.h \ + /usr/include/c++/11/bits/std_function.h \ + /usr/include/c++/11/typeinfo \ + include/LibLsp/JsonRpc/message.h \ + /usr/include/c++/11/atomic \ + /usr/include/c++/11/bits/atomic_base.h \ + /usr/include/c++/11/bits/atomic_lockfree_defines.h \ + /usr/include/c++/11/iostream \ + /usr/include/c++/11/ostream \ + /usr/include/c++/11/ios \ + /usr/include/c++/11/exception \ + /usr/include/c++/11/bits/exception_ptr.h \ + /usr/include/c++/11/bits/cxxabi_init_exception.h \ + /usr/include/c++/11/bits/nested_exception.h \ + /usr/include/c++/11/bits/ios_base.h \ + /usr/include/c++/11/bits/locale_classes.h \ + /usr/include/c++/11/bits/locale_classes.tcc \ + /usr/include/c++/11/system_error \ + /usr/include/c++/11/x86_64-redhat-linux/bits/error_constants.h \ + /usr/include/c++/11/stdexcept \ + /usr/include/c++/11/streambuf \ + /usr/include/c++/11/bits/streambuf.tcc \ + /usr/include/c++/11/bits/basic_ios.h \ + /usr/include/c++/11/bits/locale_facets.h \ + /usr/include/c++/11/cwctype \ + /usr/include/wctype.h \ + /usr/include/bits/wctype-wchar.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/ctype_base.h \ + /usr/include/c++/11/bits/streambuf_iterator.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/ctype_inline.h \ + /usr/include/c++/11/bits/locale_facets.tcc \ + /usr/include/c++/11/bits/basic_ios.tcc \ + /usr/include/c++/11/bits/ostream.tcc \ + /usr/include/c++/11/istream \ + /usr/include/c++/11/bits/istream.tcc \ + include/LibLsp/JsonRpc/serializer.h \ + include/LibLsp/JsonRpc/macro_map.h \ + /usr/include/boost/optional.hpp \ + /usr/include/boost/optional/optional.hpp \ + /usr/include/boost/assert.hpp \ + /usr/include/assert.h \ + /usr/include/boost/core/addressof.hpp \ + /usr/include/boost/config.hpp \ + /usr/include/boost/config/user.hpp \ + /usr/include/boost/config/detail/select_compiler_config.hpp \ + /usr/include/boost/config/compiler/gcc.hpp \ + /usr/include/c++/11/cstddef \ + /usr/include/boost/config/detail/select_stdlib_config.hpp \ + /usr/include/c++/11/version \ + /usr/include/boost/config/stdlib/libstdcpp3.hpp \ + /usr/include/unistd.h \ + /usr/include/bits/posix_opt.h \ + /usr/include/bits/environments.h \ + /usr/include/bits/confname.h \ + /usr/include/bits/getopt_posix.h \ + /usr/include/bits/getopt_core.h \ + /usr/include/bits/unistd_ext.h \ + /usr/include/boost/config/detail/select_platform_config.hpp \ + /usr/include/boost/config/platform/linux.hpp \ + /usr/include/boost/config/detail/posix_features.hpp \ + /usr/include/boost/config/detail/suffix.hpp \ + /usr/include/boost/config/helper_macros.hpp \ + /usr/include/boost/core/enable_if.hpp \ + /usr/include/boost/core/explicit_operator_bool.hpp \ + /usr/include/boost/config/workaround.hpp \ + /usr/include/boost/core/swap.hpp \ + /usr/include/boost/optional/bad_optional_access.hpp \ + /usr/include/boost/static_assert.hpp \ + /usr/include/boost/detail/workaround.hpp \ + /usr/include/boost/throw_exception.hpp \ + /usr/include/boost/assert/source_location.hpp \ + /usr/include/boost/current_function.hpp \ + /usr/include/boost/cstdint.hpp \ + /usr/include/boost/exception/exception.hpp \ + /usr/include/boost/type.hpp \ + /usr/include/boost/type_traits/alignment_of.hpp \ + /usr/include/boost/type_traits/intrinsics.hpp \ + /usr/include/boost/type_traits/detail/config.hpp \ + /usr/include/boost/version.hpp \ + /usr/include/boost/type_traits/integral_constant.hpp \ + /usr/include/boost/type_traits/conditional.hpp \ + /usr/include/boost/type_traits/has_nothrow_constructor.hpp \ + /usr/include/boost/type_traits/is_default_constructible.hpp \ + /usr/include/boost/type_traits/is_complete.hpp \ + /usr/include/boost/type_traits/declval.hpp \ + /usr/include/boost/type_traits/add_rvalue_reference.hpp \ + /usr/include/boost/type_traits/is_void.hpp \ + /usr/include/boost/type_traits/is_reference.hpp \ + /usr/include/boost/type_traits/is_lvalue_reference.hpp \ + /usr/include/boost/type_traits/is_rvalue_reference.hpp \ + /usr/include/boost/type_traits/remove_reference.hpp \ + /usr/include/boost/type_traits/is_function.hpp \ + /usr/include/boost/type_traits/detail/is_function_cxx_11.hpp \ + /usr/include/boost/type_traits/detail/yes_no_type.hpp \ + /usr/include/boost/type_traits/type_with_alignment.hpp \ + /usr/include/boost/type_traits/is_pod.hpp \ + /usr/include/boost/type_traits/is_scalar.hpp \ + /usr/include/boost/type_traits/is_arithmetic.hpp \ + /usr/include/boost/type_traits/is_integral.hpp \ + /usr/include/boost/type_traits/is_floating_point.hpp \ + /usr/include/boost/type_traits/is_enum.hpp \ + /usr/include/boost/type_traits/is_pointer.hpp \ + /usr/include/boost/type_traits/is_member_pointer.hpp \ + /usr/include/boost/type_traits/is_member_function_pointer.hpp \ + /usr/include/boost/type_traits/detail/is_member_function_pointer_cxx_11.hpp \ + /usr/include/boost/type_traits/remove_const.hpp \ + /usr/include/boost/type_traits/decay.hpp \ + /usr/include/boost/type_traits/is_array.hpp \ + /usr/include/boost/type_traits/remove_bounds.hpp \ + /usr/include/boost/type_traits/remove_extent.hpp \ + /usr/include/boost/type_traits/add_pointer.hpp \ + /usr/include/boost/type_traits/remove_cv.hpp \ + /usr/include/boost/type_traits/is_base_of.hpp \ + /usr/include/boost/type_traits/is_base_and_derived.hpp \ + /usr/include/boost/type_traits/is_same.hpp \ + /usr/include/boost/type_traits/is_class.hpp \ + /usr/include/boost/type_traits/is_const.hpp \ + /usr/include/boost/type_traits/is_constructible.hpp \ + /usr/include/boost/type_traits/is_destructible.hpp \ + /usr/include/boost/type_traits/is_nothrow_move_assignable.hpp \ + /usr/include/boost/type_traits/has_trivial_move_assign.hpp \ + /usr/include/boost/type_traits/is_assignable.hpp \ + /usr/include/boost/type_traits/is_volatile.hpp \ + /usr/include/boost/type_traits/has_nothrow_assign.hpp \ + /usr/include/boost/type_traits/enable_if.hpp \ + /usr/include/boost/type_traits/is_nothrow_move_constructible.hpp \ + /usr/include/boost/move/utility.hpp \ + /usr/include/boost/move/detail/config_begin.hpp \ + /usr/include/boost/move/detail/workaround.hpp \ + /usr/include/boost/move/utility_core.hpp \ + /usr/include/boost/move/core.hpp \ + /usr/include/boost/move/detail/config_end.hpp \ + /usr/include/boost/move/detail/meta_utils.hpp \ + /usr/include/boost/move/detail/meta_utils_core.hpp \ + /usr/include/boost/move/traits.hpp \ + /usr/include/boost/move/detail/type_traits.hpp \ + /usr/include/boost/none.hpp \ + /usr/include/boost/none_t.hpp \ + /usr/include/boost/utility/compare_pointees.hpp \ + /usr/include/boost/utility/result_of.hpp \ + /usr/include/boost/preprocessor/cat.hpp \ + /usr/include/boost/preprocessor/config/config.hpp \ + /usr/include/boost/preprocessor/iteration/iterate.hpp \ + /usr/include/boost/preprocessor/arithmetic/dec.hpp \ + /usr/include/boost/preprocessor/config/limits.hpp \ + /usr/include/boost/preprocessor/arithmetic/limits/dec_256.hpp \ + /usr/include/boost/preprocessor/arithmetic/inc.hpp \ + /usr/include/boost/preprocessor/arithmetic/limits/inc_256.hpp \ + /usr/include/boost/preprocessor/array/elem.hpp \ + /usr/include/boost/preprocessor/array/data.hpp \ + /usr/include/boost/preprocessor/tuple/elem.hpp \ + /usr/include/boost/preprocessor/facilities/expand.hpp \ + /usr/include/boost/preprocessor/facilities/overload.hpp \ + /usr/include/boost/preprocessor/variadic/size.hpp \ + /usr/include/boost/preprocessor/control/iif.hpp \ + /usr/include/boost/preprocessor/facilities/check_empty.hpp \ + /usr/include/boost/preprocessor/variadic/has_opt.hpp \ + /usr/include/boost/preprocessor/variadic/limits/size_64.hpp \ + /usr/include/boost/preprocessor/tuple/rem.hpp \ + /usr/include/boost/preprocessor/tuple/detail/is_single_return.hpp \ + /usr/include/boost/preprocessor/variadic/elem.hpp \ + /usr/include/boost/preprocessor/variadic/limits/elem_64.hpp \ + /usr/include/boost/preprocessor/array/size.hpp \ + /usr/include/boost/preprocessor/slot/slot.hpp \ + /usr/include/boost/preprocessor/slot/detail/def.hpp \ + /usr/include/boost/preprocessor/repetition/enum_params.hpp \ + /usr/include/boost/preprocessor/punctuation/comma_if.hpp \ + /usr/include/boost/preprocessor/control/if.hpp \ + /usr/include/boost/preprocessor/logical/bool.hpp \ + /usr/include/boost/preprocessor/logical/limits/bool_256.hpp \ + /usr/include/boost/preprocessor/facilities/empty.hpp \ + /usr/include/boost/preprocessor/punctuation/comma.hpp \ + /usr/include/boost/preprocessor/repetition/repeat.hpp \ + /usr/include/boost/preprocessor/debug/error.hpp \ + /usr/include/boost/preprocessor/detail/auto_rec.hpp \ + /usr/include/boost/preprocessor/detail/limits/auto_rec_256.hpp \ + /usr/include/boost/preprocessor/tuple/eat.hpp \ + /usr/include/boost/preprocessor/repetition/limits/repeat_256.hpp \ + /usr/include/boost/preprocessor/repetition/enum_trailing_params.hpp \ + /usr/include/boost/preprocessor/repetition/enum_binary_params.hpp \ + /usr/include/boost/preprocessor/repetition/enum_shifted_params.hpp \ + /usr/include/boost/preprocessor/facilities/intercept.hpp \ + /usr/include/boost/preprocessor/facilities/limits/intercept_256.hpp \ + /usr/include/boost/type_traits/type_identity.hpp \ + /usr/include/boost/preprocessor/iteration/detail/iter/forward1.hpp \ + /usr/include/boost/preprocessor/iteration/detail/bounds/lower1.hpp \ + /usr/include/boost/preprocessor/slot/detail/shared.hpp \ + /usr/include/boost/preprocessor/iteration/detail/bounds/upper1.hpp \ + /usr/include/boost/preprocessor/iteration/detail/iter/limits/forward1_256.hpp \ + /usr/include/boost/utility/detail/result_of_iterate.hpp \ + /usr/include/boost/optional/optional_fwd.hpp \ + /usr/include/boost/optional/detail/optional_config.hpp \ + /usr/include/boost/optional/detail/optional_factory_support.hpp \ + /usr/include/boost/optional/detail/optional_aligned_storage.hpp \ + /usr/include/boost/optional/detail/optional_trivially_copyable_base.hpp \ + /usr/include/boost/optional/detail/optional_reference_spec.hpp \ + /usr/include/boost/optional/detail/optional_relops.hpp \ + /usr/include/boost/optional/detail/optional_swap.hpp \ + /usr/include/c++/11/cassert \ + /usr/include/c++/11/memory \ + /usr/include/c++/11/bits/stl_uninitialized.h \ + /usr/include/c++/11/bits/stl_tempbuf.h \ + /usr/include/c++/11/bits/stl_raw_storage_iter.h \ + /usr/include/c++/11/bits/align.h \ + /usr/include/c++/11/bit \ + /usr/include/c++/11/bits/unique_ptr.h \ + /usr/include/c++/11/bits/shared_ptr.h \ + /usr/include/c++/11/bits/shared_ptr_base.h \ + /usr/include/c++/11/bits/allocated_ptr.h \ + /usr/include/c++/11/ext/concurrence.h \ + /usr/include/c++/11/bits/shared_ptr_atomic.h \ + /usr/include/c++/11/backward/auto_ptr.h \ + /usr/include/c++/11/vector \ + /usr/include/c++/11/bits/stl_vector.h \ + /usr/include/c++/11/bits/stl_bvector.h \ + /usr/include/c++/11/bits/vector.tcc \ + /usr/include/c++/11/algorithm \ + /usr/include/c++/11/bits/stl_algo.h \ + /usr/include/c++/11/bits/algorithmfwd.h \ + /usr/include/c++/11/bits/stl_heap.h \ + /usr/include/c++/11/bits/uniform_int_dist.h \ + include/LibLsp/lsp/method_type.h \ + third_party/rapidjson/include/rapidjson/document.h \ + third_party/rapidjson/include/rapidjson/reader.h \ + third_party/rapidjson/include/rapidjson/allocators.h \ + third_party/rapidjson/include/rapidjson/rapidjson.h \ + /usr/include/c++/11/cstring \ + /usr/include/string.h \ + /usr/include/strings.h \ + /usr/include/inttypes.h \ + third_party/rapidjson/include/rapidjson/internal/meta.h \ + third_party/rapidjson/include/rapidjson/rapidjson.h \ + third_party/rapidjson/include/rapidjson/stream.h \ + third_party/rapidjson/include/rapidjson/encodings.h \ + third_party/rapidjson/include/rapidjson/encodedstream.h \ + third_party/rapidjson/include/rapidjson/memorystream.h \ + third_party/rapidjson/include/rapidjson/internal/clzll.h \ + third_party/rapidjson/include/rapidjson/internal/stack.h \ + third_party/rapidjson/include/rapidjson/allocators.h \ + third_party/rapidjson/include/rapidjson/internal/swap.h \ + third_party/rapidjson/include/rapidjson/internal/strtod.h \ + third_party/rapidjson/include/rapidjson/internal/ieee754.h \ + third_party/rapidjson/include/rapidjson/internal/biginteger.h \ + third_party/rapidjson/include/rapidjson/internal/diyfp.h \ + third_party/rapidjson/include/rapidjson/internal/clzll.h \ + /usr/include/c++/11/limits \ + third_party/rapidjson/include/rapidjson/internal/pow10.h \ + /usr/include/c++/11/climits \ + /usr/lib/gcc/x86_64-redhat-linux/11/include/limits.h \ + /usr/lib/gcc/x86_64-redhat-linux/11/include/syslimits.h \ + /usr/include/limits.h \ + /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h \ + /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h \ + /usr/include/bits/xopen_lim.h \ + /usr/include/bits/uio_lim.h \ + third_party/rapidjson/include/rapidjson/error/error.h \ + third_party/rapidjson/include/rapidjson/rapidjson.h \ + third_party/rapidjson/include/rapidjson/internal/strfunc.h \ + third_party/rapidjson/include/rapidjson/stream.h \ + third_party/rapidjson/include/rapidjson/rapidjson.h \ + /usr/include/c++/11/iterator \ + /usr/include/c++/11/bits/stream_iterator.h + +CMakeFiles/lspcpp.dir/src/jsonrpc/RemoteEndPoint.cpp.o: src/jsonrpc/RemoteEndPoint.cpp \ + /usr/include/stdc-predef.h \ + include/LibLsp/JsonRpc/MessageJsonHandler.h \ + /usr/include/c++/11/string \ + /usr/include/c++/11/x86_64-redhat-linux/bits/c++config.h \ + /usr/include/bits/wordsize.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/os_defines.h \ + /usr/include/features.h \ + /usr/include/sys/cdefs.h \ + /usr/include/bits/long-double.h \ + /usr/include/gnu/stubs.h \ + /usr/include/gnu/stubs-64.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/cpu_defines.h \ + /usr/include/c++/11/bits/stringfwd.h \ + /usr/include/c++/11/bits/memoryfwd.h \ + /usr/include/c++/11/bits/char_traits.h \ + /usr/include/c++/11/bits/stl_algobase.h \ + /usr/include/c++/11/bits/functexcept.h \ + /usr/include/c++/11/bits/exception_defines.h \ + /usr/include/c++/11/bits/cpp_type_traits.h \ + /usr/include/c++/11/ext/type_traits.h \ + /usr/include/c++/11/ext/numeric_traits.h \ + /usr/include/c++/11/bits/stl_pair.h \ + /usr/include/c++/11/bits/move.h \ + /usr/include/c++/11/type_traits \ + /usr/include/c++/11/bits/stl_iterator_base_types.h \ + /usr/include/c++/11/bits/stl_iterator_base_funcs.h \ + /usr/include/c++/11/bits/concept_check.h \ + /usr/include/c++/11/debug/assertions.h \ + /usr/include/c++/11/bits/stl_iterator.h \ + /usr/include/c++/11/bits/ptr_traits.h \ + /usr/include/c++/11/debug/debug.h \ + /usr/include/c++/11/bits/predefined_ops.h \ + /usr/include/c++/11/bits/postypes.h \ + /usr/include/c++/11/cwchar \ + /usr/include/wchar.h \ + /usr/include/bits/libc-header-start.h \ + /usr/include/bits/floatn.h \ + /usr/include/bits/floatn-common.h \ + /usr/lib/gcc/x86_64-redhat-linux/11/include/stddef.h \ + /usr/lib/gcc/x86_64-redhat-linux/11/include/stdarg.h \ + /usr/include/bits/wchar.h \ + /usr/include/bits/types/wint_t.h \ + /usr/include/bits/types/mbstate_t.h \ + /usr/include/bits/types/__mbstate_t.h \ + /usr/include/bits/types/__FILE.h \ + /usr/include/bits/types/FILE.h \ + /usr/include/bits/types/locale_t.h \ + /usr/include/bits/types/__locale_t.h \ + /usr/include/c++/11/cstdint \ + /usr/lib/gcc/x86_64-redhat-linux/11/include/stdint.h \ + /usr/include/stdint.h \ + /usr/include/bits/types.h \ + /usr/include/bits/timesize.h \ + /usr/include/bits/typesizes.h \ + /usr/include/bits/time64.h \ + /usr/include/bits/stdint-intn.h \ + /usr/include/bits/stdint-uintn.h \ + /usr/include/c++/11/bits/allocator.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/c++allocator.h \ + /usr/include/c++/11/ext/new_allocator.h \ + /usr/include/c++/11/new \ + /usr/include/c++/11/bits/exception.h \ + /usr/include/c++/11/bits/localefwd.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/c++locale.h \ + /usr/include/c++/11/clocale \ + /usr/include/locale.h \ + /usr/include/bits/locale.h \ + /usr/include/c++/11/iosfwd \ + /usr/include/c++/11/cctype \ + /usr/include/ctype.h \ + /usr/include/bits/endian.h \ + /usr/include/bits/endianness.h \ + /usr/include/c++/11/bits/ostream_insert.h \ + /usr/include/c++/11/bits/cxxabi_forced.h \ + /usr/include/c++/11/bits/stl_function.h \ + /usr/include/c++/11/backward/binders.h \ + /usr/include/c++/11/bits/range_access.h \ + /usr/include/c++/11/initializer_list \ + /usr/include/c++/11/bits/basic_string.h \ + /usr/include/c++/11/ext/atomicity.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/gthr.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/gthr-default.h \ + /usr/include/pthread.h \ + /usr/include/sched.h \ + /usr/include/bits/types/time_t.h \ + /usr/include/bits/types/struct_timespec.h \ + /usr/include/bits/sched.h \ + /usr/include/bits/types/struct_sched_param.h \ + /usr/include/bits/cpu-set.h \ + /usr/include/time.h \ + /usr/include/bits/time.h \ + /usr/include/bits/timex.h \ + /usr/include/bits/types/struct_timeval.h \ + /usr/include/bits/types/clock_t.h \ + /usr/include/bits/types/struct_tm.h \ + /usr/include/bits/types/clockid_t.h \ + /usr/include/bits/types/timer_t.h \ + /usr/include/bits/types/struct_itimerspec.h \ + /usr/include/bits/pthreadtypes.h \ + /usr/include/bits/thread-shared-types.h \ + /usr/include/bits/pthreadtypes-arch.h \ + /usr/include/bits/struct_mutex.h \ + /usr/include/bits/struct_rwlock.h \ + /usr/include/bits/setjmp.h \ + /usr/include/bits/types/__sigset_t.h \ + /usr/include/bits/types/struct___jmp_buf_tag.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/atomic_word.h \ + /usr/include/sys/single_threaded.h \ + /usr/include/c++/11/ext/alloc_traits.h \ + /usr/include/c++/11/bits/alloc_traits.h \ + /usr/include/c++/11/bits/stl_construct.h \ + /usr/include/c++/11/ext/string_conversions.h \ + /usr/include/c++/11/cstdlib \ + /usr/include/stdlib.h \ + /usr/include/bits/waitflags.h \ + /usr/include/bits/waitstatus.h \ + /usr/include/sys/types.h \ + /usr/include/endian.h \ + /usr/include/bits/byteswap.h \ + /usr/include/bits/uintn-identity.h \ + /usr/include/sys/select.h \ + /usr/include/bits/select.h \ + /usr/include/bits/types/sigset_t.h \ + /usr/include/alloca.h \ + /usr/include/bits/stdlib-bsearch.h \ + /usr/include/bits/stdlib-float.h \ + /usr/include/c++/11/bits/std_abs.h \ + /usr/include/c++/11/cstdio \ + /usr/include/stdio.h \ + /usr/include/bits/types/__fpos_t.h \ + /usr/include/bits/types/__fpos64_t.h \ + /usr/include/bits/types/struct_FILE.h \ + /usr/include/bits/types/cookie_io_functions_t.h \ + /usr/include/bits/stdio_lim.h \ + /usr/include/bits/stdio.h \ + /usr/include/c++/11/cerrno \ + /usr/include/errno.h \ + /usr/include/bits/errno.h \ + /usr/include/linux/errno.h \ + /usr/include/asm/errno.h \ + /usr/include/asm-generic/errno.h \ + /usr/include/asm-generic/errno-base.h \ + /usr/include/bits/types/error_t.h \ + /usr/include/c++/11/bits/charconv.h \ + /usr/include/c++/11/bits/functional_hash.h \ + /usr/include/c++/11/bits/hash_bytes.h \ + /usr/include/c++/11/bits/basic_string.tcc \ + /usr/include/c++/11/map \ + /usr/include/c++/11/bits/stl_tree.h \ + /usr/include/c++/11/ext/aligned_buffer.h \ + /usr/include/c++/11/bits/stl_map.h \ + /usr/include/c++/11/tuple \ + /usr/include/c++/11/utility \ + /usr/include/c++/11/bits/stl_relops.h \ + /usr/include/c++/11/array \ + /usr/include/c++/11/bits/uses_allocator.h \ + /usr/include/c++/11/bits/invoke.h \ + /usr/include/c++/11/bits/stl_multimap.h \ + /usr/include/c++/11/bits/erase_if.h \ + /usr/include/c++/11/functional \ + /usr/include/c++/11/bits/refwrap.h \ + /usr/include/c++/11/bits/std_function.h \ + /usr/include/c++/11/typeinfo \ + include/LibLsp/JsonRpc/message.h \ + /usr/include/c++/11/atomic \ + /usr/include/c++/11/bits/atomic_base.h \ + /usr/include/c++/11/bits/atomic_lockfree_defines.h \ + /usr/include/c++/11/iostream \ + /usr/include/c++/11/ostream \ + /usr/include/c++/11/ios \ + /usr/include/c++/11/exception \ + /usr/include/c++/11/bits/exception_ptr.h \ + /usr/include/c++/11/bits/cxxabi_init_exception.h \ + /usr/include/c++/11/bits/nested_exception.h \ + /usr/include/c++/11/bits/ios_base.h \ + /usr/include/c++/11/bits/locale_classes.h \ + /usr/include/c++/11/bits/locale_classes.tcc \ + /usr/include/c++/11/system_error \ + /usr/include/c++/11/x86_64-redhat-linux/bits/error_constants.h \ + /usr/include/c++/11/stdexcept \ + /usr/include/c++/11/streambuf \ + /usr/include/c++/11/bits/streambuf.tcc \ + /usr/include/c++/11/bits/basic_ios.h \ + /usr/include/c++/11/bits/locale_facets.h \ + /usr/include/c++/11/cwctype \ + /usr/include/wctype.h \ + /usr/include/bits/wctype-wchar.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/ctype_base.h \ + /usr/include/c++/11/bits/streambuf_iterator.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/ctype_inline.h \ + /usr/include/c++/11/bits/locale_facets.tcc \ + /usr/include/c++/11/bits/basic_ios.tcc \ + /usr/include/c++/11/bits/ostream.tcc \ + /usr/include/c++/11/istream \ + /usr/include/c++/11/bits/istream.tcc \ + include/LibLsp/JsonRpc/serializer.h \ + include/LibLsp/JsonRpc/macro_map.h \ + /usr/include/boost/optional.hpp \ + /usr/include/boost/optional/optional.hpp \ + /usr/include/boost/assert.hpp \ + /usr/include/assert.h \ + /usr/include/boost/core/addressof.hpp \ + /usr/include/boost/config.hpp \ + /usr/include/boost/config/user.hpp \ + /usr/include/boost/config/detail/select_compiler_config.hpp \ + /usr/include/boost/config/compiler/gcc.hpp \ + /usr/include/c++/11/cstddef \ + /usr/include/boost/config/detail/select_stdlib_config.hpp \ + /usr/include/c++/11/version \ + /usr/include/boost/config/stdlib/libstdcpp3.hpp \ + /usr/include/unistd.h \ + /usr/include/bits/posix_opt.h \ + /usr/include/bits/environments.h \ + /usr/include/bits/confname.h \ + /usr/include/bits/getopt_posix.h \ + /usr/include/bits/getopt_core.h \ + /usr/include/bits/unistd_ext.h \ + /usr/include/boost/config/detail/select_platform_config.hpp \ + /usr/include/boost/config/platform/linux.hpp \ + /usr/include/boost/config/detail/posix_features.hpp \ + /usr/include/boost/config/detail/suffix.hpp \ + /usr/include/boost/config/helper_macros.hpp \ + /usr/include/boost/core/enable_if.hpp \ + /usr/include/boost/core/explicit_operator_bool.hpp \ + /usr/include/boost/config/workaround.hpp \ + /usr/include/boost/core/swap.hpp \ + /usr/include/boost/optional/bad_optional_access.hpp \ + /usr/include/boost/static_assert.hpp \ + /usr/include/boost/detail/workaround.hpp \ + /usr/include/boost/throw_exception.hpp \ + /usr/include/boost/assert/source_location.hpp \ + /usr/include/boost/current_function.hpp \ + /usr/include/boost/cstdint.hpp \ + /usr/include/boost/exception/exception.hpp \ + /usr/include/boost/type.hpp \ + /usr/include/boost/type_traits/alignment_of.hpp \ + /usr/include/boost/type_traits/intrinsics.hpp \ + /usr/include/boost/type_traits/detail/config.hpp \ + /usr/include/boost/version.hpp \ + /usr/include/boost/type_traits/integral_constant.hpp \ + /usr/include/boost/type_traits/conditional.hpp \ + /usr/include/boost/type_traits/has_nothrow_constructor.hpp \ + /usr/include/boost/type_traits/is_default_constructible.hpp \ + /usr/include/boost/type_traits/is_complete.hpp \ + /usr/include/boost/type_traits/declval.hpp \ + /usr/include/boost/type_traits/add_rvalue_reference.hpp \ + /usr/include/boost/type_traits/is_void.hpp \ + /usr/include/boost/type_traits/is_reference.hpp \ + /usr/include/boost/type_traits/is_lvalue_reference.hpp \ + /usr/include/boost/type_traits/is_rvalue_reference.hpp \ + /usr/include/boost/type_traits/remove_reference.hpp \ + /usr/include/boost/type_traits/is_function.hpp \ + /usr/include/boost/type_traits/detail/is_function_cxx_11.hpp \ + /usr/include/boost/type_traits/detail/yes_no_type.hpp \ + /usr/include/boost/type_traits/type_with_alignment.hpp \ + /usr/include/boost/type_traits/is_pod.hpp \ + /usr/include/boost/type_traits/is_scalar.hpp \ + /usr/include/boost/type_traits/is_arithmetic.hpp \ + /usr/include/boost/type_traits/is_integral.hpp \ + /usr/include/boost/type_traits/is_floating_point.hpp \ + /usr/include/boost/type_traits/is_enum.hpp \ + /usr/include/boost/type_traits/is_pointer.hpp \ + /usr/include/boost/type_traits/is_member_pointer.hpp \ + /usr/include/boost/type_traits/is_member_function_pointer.hpp \ + /usr/include/boost/type_traits/detail/is_member_function_pointer_cxx_11.hpp \ + /usr/include/boost/type_traits/remove_const.hpp \ + /usr/include/boost/type_traits/decay.hpp \ + /usr/include/boost/type_traits/is_array.hpp \ + /usr/include/boost/type_traits/remove_bounds.hpp \ + /usr/include/boost/type_traits/remove_extent.hpp \ + /usr/include/boost/type_traits/add_pointer.hpp \ + /usr/include/boost/type_traits/remove_cv.hpp \ + /usr/include/boost/type_traits/is_base_of.hpp \ + /usr/include/boost/type_traits/is_base_and_derived.hpp \ + /usr/include/boost/type_traits/is_same.hpp \ + /usr/include/boost/type_traits/is_class.hpp \ + /usr/include/boost/type_traits/is_const.hpp \ + /usr/include/boost/type_traits/is_constructible.hpp \ + /usr/include/boost/type_traits/is_destructible.hpp \ + /usr/include/boost/type_traits/is_nothrow_move_assignable.hpp \ + /usr/include/boost/type_traits/has_trivial_move_assign.hpp \ + /usr/include/boost/type_traits/is_assignable.hpp \ + /usr/include/boost/type_traits/is_volatile.hpp \ + /usr/include/boost/type_traits/has_nothrow_assign.hpp \ + /usr/include/boost/type_traits/enable_if.hpp \ + /usr/include/boost/type_traits/is_nothrow_move_constructible.hpp \ + /usr/include/boost/move/utility.hpp \ + /usr/include/boost/move/detail/config_begin.hpp \ + /usr/include/boost/move/detail/workaround.hpp \ + /usr/include/boost/move/utility_core.hpp \ + /usr/include/boost/move/core.hpp \ + /usr/include/boost/move/detail/config_end.hpp \ + /usr/include/boost/move/detail/meta_utils.hpp \ + /usr/include/boost/move/detail/meta_utils_core.hpp \ + /usr/include/boost/move/traits.hpp \ + /usr/include/boost/move/detail/type_traits.hpp \ + /usr/include/boost/none.hpp \ + /usr/include/boost/none_t.hpp \ + /usr/include/boost/utility/compare_pointees.hpp \ + /usr/include/boost/utility/result_of.hpp \ + /usr/include/boost/preprocessor/cat.hpp \ + /usr/include/boost/preprocessor/config/config.hpp \ + /usr/include/boost/preprocessor/iteration/iterate.hpp \ + /usr/include/boost/preprocessor/arithmetic/dec.hpp \ + /usr/include/boost/preprocessor/config/limits.hpp \ + /usr/include/boost/preprocessor/arithmetic/limits/dec_256.hpp \ + /usr/include/boost/preprocessor/arithmetic/inc.hpp \ + /usr/include/boost/preprocessor/arithmetic/limits/inc_256.hpp \ + /usr/include/boost/preprocessor/array/elem.hpp \ + /usr/include/boost/preprocessor/array/data.hpp \ + /usr/include/boost/preprocessor/tuple/elem.hpp \ + /usr/include/boost/preprocessor/facilities/expand.hpp \ + /usr/include/boost/preprocessor/facilities/overload.hpp \ + /usr/include/boost/preprocessor/variadic/size.hpp \ + /usr/include/boost/preprocessor/control/iif.hpp \ + /usr/include/boost/preprocessor/facilities/check_empty.hpp \ + /usr/include/boost/preprocessor/variadic/has_opt.hpp \ + /usr/include/boost/preprocessor/variadic/limits/size_64.hpp \ + /usr/include/boost/preprocessor/tuple/rem.hpp \ + /usr/include/boost/preprocessor/tuple/detail/is_single_return.hpp \ + /usr/include/boost/preprocessor/variadic/elem.hpp \ + /usr/include/boost/preprocessor/variadic/limits/elem_64.hpp \ + /usr/include/boost/preprocessor/array/size.hpp \ + /usr/include/boost/preprocessor/slot/slot.hpp \ + /usr/include/boost/preprocessor/slot/detail/def.hpp \ + /usr/include/boost/preprocessor/repetition/enum_params.hpp \ + /usr/include/boost/preprocessor/punctuation/comma_if.hpp \ + /usr/include/boost/preprocessor/control/if.hpp \ + /usr/include/boost/preprocessor/logical/bool.hpp \ + /usr/include/boost/preprocessor/logical/limits/bool_256.hpp \ + /usr/include/boost/preprocessor/facilities/empty.hpp \ + /usr/include/boost/preprocessor/punctuation/comma.hpp \ + /usr/include/boost/preprocessor/repetition/repeat.hpp \ + /usr/include/boost/preprocessor/debug/error.hpp \ + /usr/include/boost/preprocessor/detail/auto_rec.hpp \ + /usr/include/boost/preprocessor/detail/limits/auto_rec_256.hpp \ + /usr/include/boost/preprocessor/tuple/eat.hpp \ + /usr/include/boost/preprocessor/repetition/limits/repeat_256.hpp \ + /usr/include/boost/preprocessor/repetition/enum_trailing_params.hpp \ + /usr/include/boost/preprocessor/repetition/enum_binary_params.hpp \ + /usr/include/boost/preprocessor/repetition/enum_shifted_params.hpp \ + /usr/include/boost/preprocessor/facilities/intercept.hpp \ + /usr/include/boost/preprocessor/facilities/limits/intercept_256.hpp \ + /usr/include/boost/type_traits/type_identity.hpp \ + /usr/include/boost/preprocessor/iteration/detail/iter/forward1.hpp \ + /usr/include/boost/preprocessor/iteration/detail/bounds/lower1.hpp \ + /usr/include/boost/preprocessor/slot/detail/shared.hpp \ + /usr/include/boost/preprocessor/iteration/detail/bounds/upper1.hpp \ + /usr/include/boost/preprocessor/iteration/detail/iter/limits/forward1_256.hpp \ + /usr/include/boost/utility/detail/result_of_iterate.hpp \ + /usr/include/boost/optional/optional_fwd.hpp \ + /usr/include/boost/optional/detail/optional_config.hpp \ + /usr/include/boost/optional/detail/optional_factory_support.hpp \ + /usr/include/boost/optional/detail/optional_aligned_storage.hpp \ + /usr/include/boost/optional/detail/optional_trivially_copyable_base.hpp \ + /usr/include/boost/optional/detail/optional_reference_spec.hpp \ + /usr/include/boost/optional/detail/optional_relops.hpp \ + /usr/include/boost/optional/detail/optional_swap.hpp \ + /usr/include/c++/11/cassert \ + /usr/include/c++/11/memory \ + /usr/include/c++/11/bits/stl_uninitialized.h \ + /usr/include/c++/11/bits/stl_tempbuf.h \ + /usr/include/c++/11/bits/stl_raw_storage_iter.h \ + /usr/include/c++/11/bits/align.h \ + /usr/include/c++/11/bit \ + /usr/include/c++/11/bits/unique_ptr.h \ + /usr/include/c++/11/bits/shared_ptr.h \ + /usr/include/c++/11/bits/shared_ptr_base.h \ + /usr/include/c++/11/bits/allocated_ptr.h \ + /usr/include/c++/11/ext/concurrence.h \ + /usr/include/c++/11/bits/shared_ptr_atomic.h \ + /usr/include/c++/11/backward/auto_ptr.h \ + /usr/include/c++/11/vector \ + /usr/include/c++/11/bits/stl_vector.h \ + /usr/include/c++/11/bits/stl_bvector.h \ + /usr/include/c++/11/bits/vector.tcc \ + /usr/include/c++/11/algorithm \ + /usr/include/c++/11/bits/stl_algo.h \ + /usr/include/c++/11/bits/algorithmfwd.h \ + /usr/include/c++/11/bits/stl_heap.h \ + /usr/include/c++/11/bits/uniform_int_dist.h \ + include/LibLsp/lsp/method_type.h \ + include/LibLsp/JsonRpc/Endpoint.h \ + include/LibLsp/JsonRpc/MessageIssue.h \ + include/LibLsp/JsonRpc/RemoteEndPoint.h \ + include/LibLsp/lsp/lsp_diagnostic.h \ + include/LibLsp/lsp/lsRange.h \ + include/LibLsp/lsp/lsPosition.h \ + include/LibLsp/lsp/lsTextEdit.h \ + include/LibLsp/lsp/lsDocumentUri.h \ + include/LibLsp/lsp/lsResponseError.h \ + /usr/include/c++/11/sstream \ + /usr/include/c++/11/bits/sstream.tcc \ + include/LibLsp/lsp/lsAny.h \ + include/LibLsp/lsp/location_type.h \ + include/LibLsp/JsonRpc/RequestInMessage.h \ + /usr/include/c++/11/mutex \ + /usr/include/c++/11/chrono \ + /usr/include/c++/11/ratio \ + /usr/include/c++/11/limits \ + /usr/include/c++/11/ctime \ + /usr/include/c++/11/bits/parse_numbers.h \ + /usr/include/c++/11/bits/std_mutex.h \ + /usr/include/c++/11/bits/unique_lock.h \ + include/LibLsp/JsonRpc/lsRequestId.h \ + include/LibLsp/JsonRpc/lsResponseMessage.h \ + include/LibLsp/JsonRpc/Cancellation.h \ + include/LibLsp/JsonRpc/NotificationInMessage.h \ + include/LibLsp/JsonRpc/traits.h \ + /usr/include/c++/11/future \ + /usr/include/c++/11/condition_variable \ + /usr/include/c++/11/bits/atomic_futex.h \ + /usr/include/c++/11/bits/std_thread.h \ + include/LibLsp/JsonRpc/threaded_queue.h \ + /usr/include/c++/11/deque \ + /usr/include/c++/11/bits/stl_deque.h \ + /usr/include/c++/11/bits/deque.tcc \ + /usr/include/c++/11/unordered_map \ + /usr/include/c++/11/bits/hashtable.h \ + /usr/include/c++/11/bits/hashtable_policy.h \ + /usr/include/c++/11/bits/unordered_map.h \ + include/LibLsp/JsonRpc/StreamMessageProducer.h \ + include/LibLsp/JsonRpc/MessageProducer.h \ + include/LibLsp/JsonRpc/Condition.h \ + include/LibLsp/JsonRpc/Context.h \ + third_party/rapidjson/include/rapidjson/error/en.h \ + third_party/rapidjson/include/rapidjson/error/error.h \ + third_party/rapidjson/include/rapidjson/rapidjson.h \ + /usr/include/c++/11/cstring \ + /usr/include/string.h \ + /usr/include/strings.h \ + /usr/include/inttypes.h \ + include/LibLsp/JsonRpc/json.h \ + third_party/rapidjson/include/rapidjson/document.h \ + third_party/rapidjson/include/rapidjson/reader.h \ + third_party/rapidjson/include/rapidjson/allocators.h \ + third_party/rapidjson/include/rapidjson/rapidjson.h \ + third_party/rapidjson/include/rapidjson/internal/meta.h \ + third_party/rapidjson/include/rapidjson/rapidjson.h \ + third_party/rapidjson/include/rapidjson/stream.h \ + third_party/rapidjson/include/rapidjson/encodings.h \ + third_party/rapidjson/include/rapidjson/encodedstream.h \ + third_party/rapidjson/include/rapidjson/memorystream.h \ + third_party/rapidjson/include/rapidjson/internal/clzll.h \ + third_party/rapidjson/include/rapidjson/internal/stack.h \ + third_party/rapidjson/include/rapidjson/allocators.h \ + third_party/rapidjson/include/rapidjson/internal/swap.h \ + third_party/rapidjson/include/rapidjson/internal/strtod.h \ + third_party/rapidjson/include/rapidjson/internal/ieee754.h \ + third_party/rapidjson/include/rapidjson/internal/biginteger.h \ + third_party/rapidjson/include/rapidjson/internal/diyfp.h \ + third_party/rapidjson/include/rapidjson/internal/clzll.h \ + third_party/rapidjson/include/rapidjson/internal/pow10.h \ + /usr/include/c++/11/climits \ + /usr/lib/gcc/x86_64-redhat-linux/11/include/limits.h \ + /usr/lib/gcc/x86_64-redhat-linux/11/include/syslimits.h \ + /usr/include/limits.h \ + /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h \ + /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h \ + /usr/include/bits/xopen_lim.h \ + /usr/include/bits/uio_lim.h \ + third_party/rapidjson/include/rapidjson/error/error.h \ + third_party/rapidjson/include/rapidjson/internal/strfunc.h \ + third_party/rapidjson/include/rapidjson/stream.h \ + third_party/rapidjson/include/rapidjson/rapidjson.h \ + /usr/include/c++/11/iterator \ + /usr/include/c++/11/bits/stream_iterator.h \ + third_party/rapidjson/include/rapidjson/prettywriter.h \ + third_party/rapidjson/include/rapidjson/writer.h \ + third_party/rapidjson/include/rapidjson/internal/dtoa.h \ + third_party/rapidjson/include/rapidjson/internal/itoa.h \ + third_party/rapidjson/include/rapidjson/internal/itoa.h \ + third_party/rapidjson/include/rapidjson/stringbuffer.h \ + include/LibLsp/JsonRpc/GCThreadContext.h \ + ../gc-8.2.0/include/gc.h \ + ../gc-8.2.0/include/gc_version.h \ + ../gc-8.2.0/include/gc_config_macros.h \ + ../gc-8.2.0/include/gc_pthread_redirects.h \ + /usr/include/dlfcn.h \ + /usr/include/bits/dlfcn.h \ + /usr/include/signal.h \ + /usr/include/bits/signum-generic.h \ + /usr/include/bits/signum-arch.h \ + /usr/include/bits/types/sig_atomic_t.h \ + /usr/include/bits/types/siginfo_t.h \ + /usr/include/bits/types/__sigval_t.h \ + /usr/include/bits/siginfo-arch.h \ + /usr/include/bits/siginfo-consts.h \ + /usr/include/bits/siginfo-consts-arch.h \ + /usr/include/bits/types/sigval_t.h \ + /usr/include/bits/types/sigevent_t.h \ + /usr/include/bits/sigevent-consts.h \ + /usr/include/bits/sigaction.h \ + /usr/include/bits/sigcontext.h \ + /usr/include/bits/types/stack_t.h \ + /usr/include/sys/ucontext.h \ + /usr/include/bits/sigstack.h \ + /usr/include/bits/ss_flags.h \ + /usr/include/bits/types/struct_sigstack.h \ + /usr/include/bits/sigthread.h \ + /usr/include/bits/signal_ext.h \ + include/LibLsp/JsonRpc/ScopeExit.h \ + include/LibLsp/JsonRpc/stream.h \ + third_party/threadpool/boost/threadpool.hpp \ + third_party/threadpool/boost/threadpool/future.hpp \ + third_party/threadpool/boost/threadpool/detail/future.hpp \ + third_party/threadpool/boost/threadpool/detail/locking_ptr.hpp \ + /usr/include/boost/utility.hpp \ + /usr/include/boost/utility/base_from_member.hpp \ + /usr/include/boost/preprocessor/repetition/repeat_from_to.hpp \ + /usr/include/boost/preprocessor/arithmetic/add.hpp \ + /usr/include/boost/preprocessor/control/while.hpp \ + /usr/include/boost/preprocessor/list/fold_left.hpp \ + /usr/include/boost/preprocessor/list/detail/fold_left.hpp \ + /usr/include/boost/preprocessor/control/expr_iif.hpp \ + /usr/include/boost/preprocessor/list/adt.hpp \ + /usr/include/boost/preprocessor/detail/is_binary.hpp \ + /usr/include/boost/preprocessor/detail/check.hpp \ + /usr/include/boost/preprocessor/logical/compl.hpp \ + /usr/include/boost/preprocessor/list/detail/limits/fold_left_256.hpp \ + /usr/include/boost/preprocessor/list/limits/fold_left_256.hpp \ + /usr/include/boost/preprocessor/list/fold_right.hpp \ + /usr/include/boost/preprocessor/list/detail/fold_right.hpp \ + /usr/include/boost/preprocessor/list/reverse.hpp \ + /usr/include/boost/preprocessor/facilities/identity.hpp \ + /usr/include/boost/preprocessor/list/detail/limits/fold_right_256.hpp \ + /usr/include/boost/preprocessor/logical/bitand.hpp \ + /usr/include/boost/preprocessor/control/detail/while.hpp \ + /usr/include/boost/preprocessor/control/detail/limits/while_256.hpp \ + /usr/include/boost/preprocessor/control/limits/while_256.hpp \ + /usr/include/boost/preprocessor/logical/bitor.hpp \ + /usr/include/boost/preprocessor/arithmetic/detail/is_maximum_number.hpp \ + /usr/include/boost/preprocessor/comparison/equal.hpp \ + /usr/include/boost/preprocessor/comparison/not_equal.hpp \ + /usr/include/boost/preprocessor/comparison/limits/not_equal_256.hpp \ + /usr/include/boost/preprocessor/arithmetic/detail/maximum_number.hpp \ + /usr/include/boost/preprocessor/arithmetic/detail/is_minimum_number.hpp \ + /usr/include/boost/preprocessor/logical/not.hpp \ + /usr/include/boost/preprocessor/arithmetic/sub.hpp \ + /usr/include/boost/preprocessor/logical/and.hpp \ + /usr/include/boost/utility/enable_if.hpp \ + /usr/include/boost/utility/binary.hpp \ + /usr/include/boost/preprocessor/control/deduce_d.hpp \ + /usr/include/boost/preprocessor/seq/cat.hpp \ + /usr/include/boost/preprocessor/seq/fold_left.hpp \ + /usr/include/boost/preprocessor/seq/seq.hpp \ + /usr/include/boost/preprocessor/seq/elem.hpp \ + /usr/include/boost/preprocessor/seq/limits/elem_256.hpp \ + /usr/include/boost/preprocessor/seq/size.hpp \ + /usr/include/boost/preprocessor/seq/limits/size_256.hpp \ + /usr/include/boost/preprocessor/seq/limits/fold_left_256.hpp \ + /usr/include/boost/preprocessor/seq/transform.hpp \ + /usr/include/boost/preprocessor/arithmetic/mod.hpp \ + /usr/include/boost/preprocessor/arithmetic/detail/div_base.hpp \ + /usr/include/boost/preprocessor/comparison/less_equal.hpp \ + /usr/include/boost/preprocessor/arithmetic/detail/is_1_number.hpp \ + /usr/include/boost/utility/identity_type.hpp \ + /usr/include/boost/type_traits/function_traits.hpp \ + /usr/include/boost/core/checked_delete.hpp \ + /usr/include/boost/core/noncopyable.hpp \ + /usr/include/boost/thread/mutex.hpp \ + /usr/include/boost/thread/detail/platform.hpp \ + /usr/include/boost/config/requires_threads.hpp \ + /usr/include/boost/thread/pthread/mutex.hpp \ + /usr/include/boost/thread/detail/config.hpp \ + /usr/include/boost/thread/detail/thread_safety.hpp \ + /usr/include/boost/config/auto_link.hpp \ + /usr/include/boost/core/ignore_unused.hpp \ + /usr/include/boost/thread/exceptions.hpp \ + /usr/include/boost/system/system_error.hpp \ + /usr/include/boost/system/error_code.hpp \ + /usr/include/boost/system/detail/error_code.hpp \ + /usr/include/boost/system/detail/error_category.hpp \ + /usr/include/boost/system/detail/config.hpp \ + /usr/include/boost/system/detail/error_condition.hpp \ + /usr/include/boost/system/detail/generic_category.hpp \ + /usr/include/boost/system/detail/generic_category_message.hpp \ + /usr/include/boost/system/detail/enable_if.hpp \ + /usr/include/boost/system/is_error_condition_enum.hpp \ + /usr/include/boost/system/detail/system_category.hpp \ + /usr/include/boost/system/is_error_code_enum.hpp \ + /usr/include/boost/system/error_category.hpp \ + /usr/include/boost/system/detail/error_category_impl.hpp \ + /usr/include/boost/system/detail/to_std_category.hpp \ + /usr/include/boost/system/error_condition.hpp \ + /usr/include/boost/system/errc.hpp \ + /usr/include/boost/system/detail/errc.hpp \ + /usr/include/boost/system/detail/cerrno.hpp \ + /usr/include/boost/system/generic_category.hpp \ + /usr/include/boost/system/system_category.hpp \ + /usr/include/boost/system/detail/system_category_impl.hpp \ + /usr/include/boost/system/api_config.hpp \ + /usr/include/boost/system/detail/is_generic_value.hpp \ + /usr/include/boost/system/detail/throws.hpp \ + /usr/include/boost/config/abi_prefix.hpp \ + /usr/include/boost/config/abi_suffix.hpp \ + /usr/include/boost/thread/lock_types.hpp \ + /usr/include/boost/thread/detail/move.hpp \ + /usr/include/boost/type_traits/is_convertible.hpp \ + /usr/include/boost/type_traits/is_abstract.hpp \ + /usr/include/boost/type_traits/add_lvalue_reference.hpp \ + /usr/include/boost/type_traits/add_reference.hpp \ + /usr/include/boost/thread/detail/delete.hpp \ + /usr/include/boost/thread/lock_options.hpp \ + /usr/include/boost/thread/lockable_traits.hpp \ + /usr/include/boost/thread/thread_time.hpp \ + /usr/include/boost/date_time/time_clock.hpp \ + /usr/include/boost/date_time/c_time.hpp \ + /usr/include/boost/date_time/compiler_config.hpp \ + /usr/include/boost/date_time/locale_config.hpp \ + /usr/include/sys/time.h \ + /usr/include/boost/shared_ptr.hpp \ + /usr/include/boost/smart_ptr/shared_ptr.hpp \ + /usr/include/boost/smart_ptr/detail/shared_count.hpp \ + /usr/include/boost/smart_ptr/bad_weak_ptr.hpp \ + /usr/include/boost/smart_ptr/detail/sp_counted_base.hpp \ + /usr/include/boost/smart_ptr/detail/sp_has_gcc_intrinsics.hpp \ + /usr/include/boost/smart_ptr/detail/sp_has_sync_intrinsics.hpp \ + /usr/include/boost/smart_ptr/detail/sp_counted_base_gcc_atomic.hpp \ + /usr/include/boost/smart_ptr/detail/sp_typeinfo_.hpp \ + /usr/include/boost/smart_ptr/detail/sp_counted_impl.hpp \ + /usr/include/boost/smart_ptr/detail/sp_noexcept.hpp \ + /usr/include/boost/checked_delete.hpp \ + /usr/include/boost/smart_ptr/detail/sp_disable_deprecated.hpp \ + /usr/include/boost/smart_ptr/detail/sp_convertible.hpp \ + /usr/include/boost/smart_ptr/detail/sp_nullptr_t.hpp \ + /usr/include/boost/smart_ptr/detail/spinlock_pool.hpp \ + /usr/include/boost/smart_ptr/detail/spinlock.hpp \ + /usr/include/boost/smart_ptr/detail/spinlock_gcc_atomic.hpp \ + /usr/include/boost/smart_ptr/detail/yield_k.hpp \ + /usr/include/boost/smart_ptr/detail/sp_thread_pause.hpp \ + /usr/include/boost/smart_ptr/detail/sp_thread_sleep.hpp \ + /usr/include/boost/config/pragma_message.hpp \ + /usr/include/boost/smart_ptr/detail/operator_bool.hpp \ + /usr/include/boost/smart_ptr/detail/local_sp_deleter.hpp \ + /usr/include/boost/smart_ptr/detail/local_counted_base.hpp \ + /usr/include/boost/date_time/microsec_time_clock.hpp \ + /usr/include/boost/date_time/posix_time/posix_time_types.hpp \ + /usr/include/boost/date_time/posix_time/ptime.hpp \ + /usr/include/boost/date_time/posix_time/posix_time_system.hpp \ + /usr/include/boost/date_time/posix_time/posix_time_config.hpp \ + /usr/include/boost/limits.hpp \ + /usr/include/boost/config/no_tr1/cmath.hpp \ + /usr/include/c++/11/cmath \ + /usr/include/math.h \ + /usr/include/bits/math-vector.h \ + /usr/include/bits/libm-simd-decl-stubs.h \ + /usr/include/bits/flt-eval-method.h \ + /usr/include/bits/fp-logb.h \ + /usr/include/bits/fp-fast.h \ + /usr/include/bits/mathcalls-helper-functions.h \ + /usr/include/bits/mathcalls.h \ + /usr/include/bits/mathcalls-narrow.h \ + /usr/include/bits/iscanonical.h \ + /usr/include/boost/date_time/time_duration.hpp \ + /usr/include/boost/date_time/special_defs.hpp \ + /usr/include/boost/date_time/time_defs.hpp \ + /usr/include/boost/operators.hpp \ + /usr/include/boost/date_time/time_resolution_traits.hpp \ + /usr/include/boost/date_time/int_adapter.hpp \ + /usr/include/boost/date_time/gregorian/gregorian_types.hpp \ + /usr/include/boost/date_time/date.hpp \ + /usr/include/boost/date_time/year_month_day.hpp \ + /usr/include/boost/date_time/period.hpp \ + /usr/include/boost/date_time/gregorian/greg_calendar.hpp \ + /usr/include/boost/date_time/gregorian/greg_weekday.hpp \ + /usr/include/boost/date_time/constrained_value.hpp \ + /usr/include/boost/date_time/date_defs.hpp \ + /usr/include/boost/date_time/gregorian/greg_day_of_year.hpp \ + /usr/include/boost/date_time/gregorian_calendar.hpp \ + /usr/include/boost/date_time/gregorian_calendar.ipp \ + /usr/include/boost/date_time/gregorian/greg_ymd.hpp \ + /usr/include/boost/date_time/gregorian/greg_day.hpp \ + /usr/include/boost/date_time/gregorian/greg_year.hpp \ + /usr/include/boost/date_time/gregorian/greg_month.hpp \ + /usr/include/boost/date_time/gregorian/greg_duration.hpp \ + /usr/include/boost/date_time/date_duration.hpp \ + /usr/include/boost/date_time/date_duration_types.hpp \ + /usr/include/boost/date_time/gregorian/greg_duration_types.hpp \ + /usr/include/boost/date_time/gregorian/greg_date.hpp \ + /usr/include/boost/date_time/adjust_functors.hpp \ + /usr/include/boost/date_time/wrapping_int.hpp \ + /usr/include/boost/date_time/date_generators.hpp \ + /usr/include/boost/date_time/date_clock_device.hpp \ + /usr/include/boost/date_time/date_iterator.hpp \ + /usr/include/boost/date_time/time_system_split.hpp \ + /usr/include/boost/date_time/time_system_counted.hpp \ + /usr/include/boost/date_time/time.hpp \ + /usr/include/boost/date_time/posix_time/date_duration_operators.hpp \ + /usr/include/boost/date_time/posix_time/posix_time_duration.hpp \ + /usr/include/boost/numeric/conversion/cast.hpp \ + /usr/include/boost/numeric/conversion/converter.hpp \ + /usr/include/boost/numeric/conversion/conversion_traits.hpp \ + /usr/include/boost/numeric/conversion/detail/conversion_traits.hpp \ + /usr/include/boost/numeric/conversion/detail/meta.hpp \ + /usr/include/boost/mpl/if.hpp \ + /usr/include/boost/mpl/aux_/value_wknd.hpp \ + /usr/include/boost/mpl/aux_/static_cast.hpp \ + /usr/include/boost/mpl/aux_/config/workaround.hpp \ + /usr/include/boost/mpl/aux_/config/integral.hpp \ + /usr/include/boost/mpl/aux_/config/msvc.hpp \ + /usr/include/boost/mpl/aux_/config/eti.hpp \ + /usr/include/boost/mpl/aux_/na_spec.hpp \ + /usr/include/boost/mpl/lambda_fwd.hpp \ + /usr/include/boost/mpl/void_fwd.hpp \ + /usr/include/boost/mpl/aux_/adl_barrier.hpp \ + /usr/include/boost/mpl/aux_/config/adl.hpp \ + /usr/include/boost/mpl/aux_/config/intel.hpp \ + /usr/include/boost/mpl/aux_/config/gcc.hpp \ + /usr/include/boost/mpl/aux_/na.hpp \ + /usr/include/boost/mpl/bool.hpp \ + /usr/include/boost/mpl/bool_fwd.hpp \ + /usr/include/boost/mpl/integral_c_tag.hpp \ + /usr/include/boost/mpl/aux_/config/static_constant.hpp \ + /usr/include/boost/mpl/aux_/na_fwd.hpp \ + /usr/include/boost/mpl/aux_/config/ctps.hpp \ + /usr/include/boost/mpl/aux_/config/lambda.hpp \ + /usr/include/boost/mpl/aux_/config/ttp.hpp \ + /usr/include/boost/mpl/int.hpp \ + /usr/include/boost/mpl/int_fwd.hpp \ + /usr/include/boost/mpl/aux_/nttp_decl.hpp \ + /usr/include/boost/mpl/aux_/config/nttp.hpp \ + /usr/include/boost/mpl/aux_/integral_wrapper.hpp \ + /usr/include/boost/mpl/aux_/lambda_arity_param.hpp \ + /usr/include/boost/mpl/aux_/template_arity_fwd.hpp \ + /usr/include/boost/mpl/aux_/arity.hpp \ + /usr/include/boost/mpl/aux_/config/dtp.hpp \ + /usr/include/boost/mpl/aux_/preprocessor/params.hpp \ + /usr/include/boost/mpl/aux_/config/preprocessor.hpp \ + /usr/include/boost/preprocessor/comma_if.hpp \ + /usr/include/boost/preprocessor/repeat.hpp \ + /usr/include/boost/preprocessor/inc.hpp \ + /usr/include/boost/mpl/aux_/preprocessor/enum.hpp \ + /usr/include/boost/mpl/aux_/preprocessor/def_params_tail.hpp \ + /usr/include/boost/mpl/limits/arity.hpp \ + /usr/include/boost/preprocessor/identity.hpp \ + /usr/include/boost/preprocessor/empty.hpp \ + /usr/include/boost/mpl/aux_/config/overload_resolution.hpp \ + /usr/include/boost/mpl/aux_/lambda_support.hpp \ + /usr/include/boost/mpl/eval_if.hpp \ + /usr/include/boost/mpl/equal_to.hpp \ + /usr/include/boost/mpl/aux_/comparison_op.hpp \ + /usr/include/boost/mpl/aux_/numeric_op.hpp \ + /usr/include/boost/mpl/numeric_cast.hpp \ + /usr/include/boost/mpl/apply_wrap.hpp \ + /usr/include/boost/mpl/aux_/has_apply.hpp \ + /usr/include/boost/mpl/has_xxx.hpp \ + /usr/include/boost/mpl/aux_/type_wrapper.hpp \ + /usr/include/boost/mpl/aux_/yes_no.hpp \ + /usr/include/boost/mpl/aux_/config/arrays.hpp \ + /usr/include/boost/mpl/aux_/config/has_xxx.hpp \ + /usr/include/boost/mpl/aux_/config/msvc_typename.hpp \ + /usr/include/boost/mpl/aux_/config/has_apply.hpp \ + /usr/include/boost/mpl/aux_/msvc_never_true.hpp \ + /usr/include/boost/mpl/aux_/config/use_preprocessed.hpp \ + /usr/include/boost/mpl/aux_/include_preprocessed.hpp \ + /usr/include/boost/mpl/aux_/config/compiler.hpp \ + /usr/include/boost/preprocessor/stringize.hpp \ + /usr/include/boost/mpl/aux_/preprocessed/gcc/apply_wrap.hpp \ + /usr/include/boost/mpl/tag.hpp \ + /usr/include/boost/mpl/void.hpp \ + /usr/include/boost/mpl/aux_/has_tag.hpp \ + /usr/include/boost/mpl/aux_/numeric_cast_utils.hpp \ + /usr/include/boost/mpl/aux_/config/forwarding.hpp \ + /usr/include/boost/mpl/aux_/msvc_eti_base.hpp \ + /usr/include/boost/mpl/aux_/is_msvc_eti_arg.hpp \ + /usr/include/boost/mpl/aux_/preprocessed/gcc/equal_to.hpp \ + /usr/include/boost/mpl/not.hpp \ + /usr/include/boost/mpl/aux_/nested_type_wknd.hpp \ + /usr/include/boost/mpl/and.hpp \ + /usr/include/boost/mpl/aux_/preprocessed/gcc/and.hpp \ + /usr/include/boost/mpl/identity.hpp \ + /usr/include/boost/numeric/conversion/detail/int_float_mixture.hpp \ + /usr/include/boost/numeric/conversion/int_float_mixture_enum.hpp \ + /usr/include/boost/mpl/integral_c.hpp \ + /usr/include/boost/mpl/integral_c_fwd.hpp \ + /usr/include/boost/numeric/conversion/detail/sign_mixture.hpp \ + /usr/include/boost/numeric/conversion/sign_mixture_enum.hpp \ + /usr/include/boost/numeric/conversion/detail/udt_builtin_mixture.hpp \ + /usr/include/boost/numeric/conversion/udt_builtin_mixture_enum.hpp \ + /usr/include/boost/numeric/conversion/detail/is_subranged.hpp \ + /usr/include/boost/mpl/multiplies.hpp \ + /usr/include/boost/mpl/times.hpp \ + /usr/include/boost/mpl/aux_/arithmetic_op.hpp \ + /usr/include/boost/mpl/aux_/largest_int.hpp \ + /usr/include/boost/mpl/aux_/preprocessed/gcc/times.hpp \ + /usr/include/boost/mpl/aux_/preprocessor/default_params.hpp \ + /usr/include/boost/mpl/less.hpp \ + /usr/include/boost/mpl/aux_/preprocessed/gcc/less.hpp \ + /usr/include/boost/numeric/conversion/converter_policies.hpp \ + /usr/include/boost/numeric/conversion/detail/converter.hpp \ + /usr/include/boost/numeric/conversion/bounds.hpp \ + /usr/include/boost/numeric/conversion/detail/bounds.hpp \ + /usr/include/boost/numeric/conversion/numeric_cast_traits.hpp \ + /usr/include/boost/numeric/conversion/detail/numeric_cast_traits.hpp \ + /usr/include/boost/numeric/conversion/detail/preprocessed/numeric_cast_traits_common.hpp \ + /usr/include/boost/numeric/conversion/detail/preprocessed/numeric_cast_traits_long_long.hpp \ + /usr/include/boost/date_time/posix_time/time_period.hpp \ + /usr/include/boost/date_time/time_iterator.hpp \ + /usr/include/boost/date_time/dst_rules.hpp \ + /usr/include/boost/chrono/time_point.hpp \ + /usr/include/boost/chrono/duration.hpp \ + /usr/include/boost/chrono/config.hpp \ + /usr/include/boost/predef.h \ + /usr/include/boost/predef/language.h \ + /usr/include/boost/predef/language/stdc.h \ + /usr/include/boost/predef/version_number.h \ + /usr/include/boost/predef/make.h \ + /usr/include/boost/predef/detail/test.h \ + /usr/include/boost/predef/language/stdcpp.h \ + /usr/include/boost/predef/language/objc.h \ + /usr/include/boost/predef/language/cuda.h \ + /usr/include/boost/predef/architecture.h \ + /usr/include/boost/predef/architecture/alpha.h \ + /usr/include/boost/predef/architecture/arm.h \ + /usr/include/boost/predef/architecture/blackfin.h \ + /usr/include/boost/predef/architecture/convex.h \ + /usr/include/boost/predef/architecture/ia64.h \ + /usr/include/boost/predef/architecture/m68k.h \ + /usr/include/boost/predef/architecture/mips.h \ + /usr/include/boost/predef/architecture/parisc.h \ + /usr/include/boost/predef/architecture/ppc.h \ + /usr/include/boost/predef/architecture/ptx.h \ + /usr/include/boost/predef/architecture/pyramid.h \ + /usr/include/boost/predef/architecture/riscv.h \ + /usr/include/boost/predef/architecture/rs6k.h \ + /usr/include/boost/predef/architecture/sparc.h \ + /usr/include/boost/predef/architecture/superh.h \ + /usr/include/boost/predef/architecture/sys370.h \ + /usr/include/boost/predef/architecture/sys390.h \ + /usr/include/boost/predef/architecture/x86.h \ + /usr/include/boost/predef/architecture/x86/32.h \ + /usr/include/boost/predef/architecture/x86/64.h \ + /usr/include/boost/predef/architecture/z.h \ + /usr/include/boost/predef/compiler.h \ + /usr/include/boost/predef/compiler/borland.h \ + /usr/include/boost/predef/compiler/clang.h \ + /usr/include/boost/predef/compiler/comeau.h \ + /usr/include/boost/predef/compiler/compaq.h \ + /usr/include/boost/predef/compiler/diab.h \ + /usr/include/boost/predef/compiler/digitalmars.h \ + /usr/include/boost/predef/compiler/dignus.h \ + /usr/include/boost/predef/compiler/edg.h \ + /usr/include/boost/predef/compiler/ekopath.h \ + /usr/include/boost/predef/compiler/gcc_xml.h \ + /usr/include/boost/predef/compiler/gcc.h \ + /usr/include/boost/predef/detail/comp_detected.h \ + /usr/include/boost/predef/compiler/greenhills.h \ + /usr/include/boost/predef/compiler/hp_acc.h \ + /usr/include/boost/predef/compiler/iar.h \ + /usr/include/boost/predef/compiler/ibm.h \ + /usr/include/boost/predef/compiler/intel.h \ + /usr/include/boost/predef/compiler/kai.h \ + /usr/include/boost/predef/compiler/llvm.h \ + /usr/include/boost/predef/compiler/metaware.h \ + /usr/include/boost/predef/compiler/metrowerks.h \ + /usr/include/boost/predef/compiler/microtec.h \ + /usr/include/boost/predef/compiler/mpw.h \ + /usr/include/boost/predef/compiler/nvcc.h \ + /usr/include/boost/predef/compiler/palm.h \ + /usr/include/boost/predef/compiler/pgi.h \ + /usr/include/boost/predef/compiler/sgi_mipspro.h \ + /usr/include/boost/predef/compiler/sunpro.h \ + /usr/include/boost/predef/compiler/tendra.h \ + /usr/include/boost/predef/compiler/visualc.h \ + /usr/include/boost/predef/compiler/watcom.h \ + /usr/include/boost/predef/library.h \ + /usr/include/boost/predef/library/c.h \ + /usr/include/boost/predef/library/c/_prefix.h \ + /usr/include/boost/predef/detail/_cassert.h \ + /usr/include/boost/predef/library/c/cloudabi.h \ + /usr/include/boost/predef/library/c/gnu.h \ + /usr/include/boost/predef/library/c/uc.h \ + /usr/include/boost/predef/library/c/vms.h \ + /usr/include/boost/predef/library/c/zos.h \ + /usr/include/boost/predef/library/std.h \ + /usr/include/boost/predef/library/std/_prefix.h \ + /usr/include/boost/predef/detail/_exception.h \ + /usr/include/boost/predef/library/std/cxx.h \ + /usr/include/boost/predef/library/std/dinkumware.h \ + /usr/include/boost/predef/library/std/libcomo.h \ + /usr/include/boost/predef/library/std/modena.h \ + /usr/include/boost/predef/library/std/msl.h \ + /usr/include/boost/predef/library/std/roguewave.h \ + /usr/include/boost/predef/library/std/sgi.h \ + /usr/include/boost/predef/library/std/stdcpp3.h \ + /usr/include/boost/predef/library/std/stlport.h \ + /usr/include/boost/predef/library/std/vacpp.h \ + /usr/include/boost/predef/os.h \ + /usr/include/boost/predef/os/aix.h \ + /usr/include/boost/predef/os/amigaos.h \ + /usr/include/boost/predef/os/beos.h \ + /usr/include/boost/predef/os/bsd.h \ + /usr/include/boost/predef/os/macos.h \ + /usr/include/boost/predef/os/ios.h \ + /usr/include/boost/predef/os/bsd/bsdi.h \ + /usr/include/boost/predef/os/bsd/dragonfly.h \ + /usr/include/boost/predef/os/bsd/free.h \ + /usr/include/boost/predef/os/bsd/open.h \ + /usr/include/boost/predef/os/bsd/net.h \ + /usr/include/boost/predef/os/cygwin.h \ + /usr/include/boost/predef/os/haiku.h \ + /usr/include/boost/predef/os/hpux.h \ + /usr/include/boost/predef/os/irix.h \ + /usr/include/boost/predef/os/linux.h \ + /usr/include/boost/predef/detail/os_detected.h \ + /usr/include/boost/predef/os/os400.h \ + /usr/include/boost/predef/os/qnxnto.h \ + /usr/include/boost/predef/os/solaris.h \ + /usr/include/boost/predef/os/unix.h \ + /usr/include/boost/predef/os/vms.h \ + /usr/include/boost/predef/os/windows.h \ + /usr/include/boost/predef/other.h \ + /usr/include/boost/predef/other/endian.h \ + /usr/include/boost/predef/platform/android.h \ + /usr/include/boost/predef/platform.h \ + /usr/include/boost/predef/platform/cloudabi.h \ + /usr/include/boost/predef/platform/mingw.h \ + /usr/include/boost/predef/platform/mingw32.h \ + /usr/include/boost/predef/platform/mingw64.h \ + /usr/include/boost/predef/platform/windows_uwp.h \ + /usr/include/boost/predef/platform/windows_desktop.h \ + /usr/include/boost/predef/platform/windows_phone.h \ + /usr/include/boost/predef/platform/windows_server.h \ + /usr/include/boost/predef/platform/windows_store.h \ + /usr/include/boost/predef/platform/windows_system.h \ + /usr/include/boost/predef/platform/windows_runtime.h \ + /usr/include/boost/predef/platform/ios.h \ + /usr/include/boost/predef/hardware.h \ + /usr/include/boost/predef/hardware/simd.h \ + /usr/include/boost/predef/hardware/simd/x86.h \ + /usr/include/boost/predef/hardware/simd/x86/versions.h \ + /usr/include/boost/predef/hardware/simd/x86_amd.h \ + /usr/include/boost/predef/hardware/simd/x86_amd/versions.h \ + /usr/include/boost/predef/hardware/simd/arm.h \ + /usr/include/boost/predef/hardware/simd/arm/versions.h \ + /usr/include/boost/predef/hardware/simd/ppc.h \ + /usr/include/boost/predef/hardware/simd/ppc/versions.h \ + /usr/include/boost/predef/version.h \ + /usr/include/boost/chrono/detail/static_assert.hpp \ + /usr/include/boost/mpl/logical.hpp \ + /usr/include/boost/mpl/or.hpp \ + /usr/include/boost/mpl/aux_/preprocessed/gcc/or.hpp \ + /usr/include/boost/ratio/ratio.hpp \ + /usr/include/boost/ratio/config.hpp \ + /usr/include/boost/ratio/detail/mpl/abs.hpp \ + /usr/include/boost/ratio/detail/mpl/sign.hpp \ + /usr/include/boost/ratio/detail/mpl/gcd.hpp \ + /usr/include/boost/mpl/aux_/config/dependent_nttp.hpp \ + /usr/include/boost/ratio/detail/mpl/lcm.hpp \ + /usr/include/boost/integer_traits.hpp \ + /usr/include/boost/ratio/ratio_fwd.hpp \ + /usr/include/boost/ratio/detail/overflow_helpers.hpp \ + /usr/include/boost/type_traits/common_type.hpp \ + /usr/include/boost/type_traits/detail/mp_defer.hpp \ + /usr/include/boost/type_traits/is_unsigned.hpp \ + /usr/include/boost/chrono/detail/is_evenly_divisible_by.hpp \ + /usr/include/boost/thread/xtime.hpp \ + /usr/include/boost/date_time/posix_time/conversion.hpp \ + /usr/include/boost/date_time/filetime_functions.hpp \ + /usr/include/boost/date_time/gregorian/conversion.hpp \ + /usr/include/boost/thread/detail/platform_time.hpp \ + /usr/include/boost/chrono/system_clocks.hpp \ + /usr/include/boost/chrono/detail/system.hpp \ + /usr/include/boost/chrono/clock_string.hpp \ + /usr/include/boost/chrono/ceil.hpp \ + /usr/include/boost/thread/pthread/pthread_mutex_scoped_lock.hpp \ + /usr/include/boost/thread/pthread/pthread_helpers.hpp \ + /usr/include/boost/smart_ptr.hpp \ + /usr/include/boost/scoped_ptr.hpp \ + /usr/include/boost/smart_ptr/scoped_ptr.hpp \ + /usr/include/boost/scoped_array.hpp \ + /usr/include/boost/smart_ptr/scoped_array.hpp \ + /usr/include/boost/shared_array.hpp \ + /usr/include/boost/smart_ptr/shared_array.hpp \ + /usr/include/boost/weak_ptr.hpp \ + /usr/include/boost/smart_ptr/weak_ptr.hpp \ + /usr/include/boost/intrusive_ptr.hpp \ + /usr/include/boost/smart_ptr/intrusive_ptr.hpp \ + /usr/include/boost/config/no_tr1/functional.hpp \ + /usr/include/boost/enable_shared_from_this.hpp \ + /usr/include/boost/smart_ptr/enable_shared_from_this.hpp \ + /usr/include/boost/make_shared.hpp \ + /usr/include/boost/smart_ptr/make_shared.hpp \ + /usr/include/boost/smart_ptr/make_shared_object.hpp \ + /usr/include/boost/smart_ptr/detail/sp_forward.hpp \ + /usr/include/boost/smart_ptr/make_shared_array.hpp \ + /usr/include/boost/core/default_allocator.hpp \ + /usr/include/boost/smart_ptr/allocate_shared_array.hpp \ + /usr/include/boost/core/allocator_access.hpp \ + /usr/include/boost/core/pointer_traits.hpp \ + /usr/include/boost/core/alloc_construct.hpp \ + /usr/include/boost/core/noinit_adaptor.hpp \ + /usr/include/boost/core/first_scalar.hpp \ + /usr/include/boost/type_traits/extent.hpp \ + /usr/include/boost/type_traits/is_bounded_array.hpp \ + /usr/include/boost/type_traits/is_unbounded_array.hpp \ + /usr/include/boost/thread/condition.hpp \ + /usr/include/boost/thread/condition_variable.hpp \ + /usr/include/boost/thread/pthread/condition_variable.hpp \ + /usr/include/boost/thread/interruption.hpp \ + /usr/include/boost/thread/pthread/thread_data.hpp \ + /usr/include/boost/thread/lock_guard.hpp \ + /usr/include/boost/thread/detail/lockable_wrapper.hpp \ + /usr/include/boost/thread/pthread/condition_variable_fwd.hpp \ + /usr/include/boost/thread/cv_status.hpp \ + /usr/include/boost/core/scoped_enum.hpp \ + /usr/include/boost/type_traits.hpp \ + /usr/include/boost/type_traits/add_const.hpp \ + /usr/include/boost/type_traits/add_cv.hpp \ + /usr/include/boost/type_traits/add_volatile.hpp \ + /usr/include/boost/type_traits/aligned_storage.hpp \ + /usr/include/boost/type_traits/conjunction.hpp \ + /usr/include/boost/type_traits/copy_cv.hpp \ + /usr/include/boost/type_traits/copy_cv_ref.hpp \ + /usr/include/boost/type_traits/copy_reference.hpp \ + /usr/include/boost/type_traits/disjunction.hpp \ + /usr/include/boost/type_traits/floating_point_promotion.hpp \ + /usr/include/boost/type_traits/has_bit_and.hpp \ + /usr/include/boost/type_traits/detail/has_binary_operator.hpp \ + /usr/include/boost/type_traits/make_void.hpp \ + /usr/include/boost/type_traits/has_bit_and_assign.hpp \ + /usr/include/boost/type_traits/has_bit_or.hpp \ + /usr/include/boost/type_traits/has_bit_or_assign.hpp \ + /usr/include/boost/type_traits/has_bit_xor.hpp \ + /usr/include/boost/type_traits/has_bit_xor_assign.hpp \ + /usr/include/boost/type_traits/has_complement.hpp \ + /usr/include/boost/type_traits/detail/has_prefix_operator.hpp \ + /usr/include/boost/type_traits/has_dereference.hpp \ + /usr/include/boost/type_traits/has_divides.hpp \ + /usr/include/boost/type_traits/has_divides_assign.hpp \ + /usr/include/boost/type_traits/has_equal_to.hpp \ + /usr/include/boost/type_traits/has_greater.hpp \ + /usr/include/boost/type_traits/has_greater_equal.hpp \ + /usr/include/boost/type_traits/has_left_shift.hpp \ + /usr/include/boost/type_traits/has_left_shift_assign.hpp \ + /usr/include/boost/type_traits/has_less.hpp \ + /usr/include/boost/type_traits/has_less_equal.hpp \ + /usr/include/boost/type_traits/has_logical_and.hpp \ + /usr/include/boost/type_traits/has_logical_not.hpp \ + /usr/include/boost/type_traits/has_logical_or.hpp \ + /usr/include/boost/type_traits/has_minus.hpp \ + /usr/include/boost/type_traits/remove_pointer.hpp \ + /usr/include/boost/type_traits/has_minus_assign.hpp \ + /usr/include/boost/type_traits/has_modulus.hpp \ + /usr/include/boost/type_traits/has_modulus_assign.hpp \ + /usr/include/boost/type_traits/has_multiplies.hpp \ + /usr/include/boost/type_traits/has_multiplies_assign.hpp \ + /usr/include/boost/type_traits/has_negate.hpp \ + /usr/include/boost/type_traits/has_new_operator.hpp \ + /usr/include/boost/type_traits/has_not_equal_to.hpp \ + /usr/include/boost/type_traits/has_nothrow_copy.hpp \ + /usr/include/boost/type_traits/is_copy_constructible.hpp \ + /usr/include/boost/type_traits/has_nothrow_destructor.hpp \ + /usr/include/boost/type_traits/has_trivial_destructor.hpp \ + /usr/include/boost/type_traits/has_plus.hpp \ + /usr/include/boost/type_traits/has_plus_assign.hpp \ + /usr/include/boost/type_traits/has_post_decrement.hpp \ + /usr/include/boost/type_traits/detail/has_postfix_operator.hpp \ + /usr/include/boost/type_traits/has_post_increment.hpp \ + /usr/include/boost/type_traits/has_pre_decrement.hpp \ + /usr/include/boost/type_traits/has_pre_increment.hpp \ + /usr/include/boost/type_traits/has_right_shift.hpp \ + /usr/include/boost/type_traits/has_right_shift_assign.hpp \ + /usr/include/boost/type_traits/has_trivial_assign.hpp \ + /usr/include/boost/type_traits/has_trivial_constructor.hpp \ + /usr/include/boost/type_traits/has_trivial_copy.hpp \ + /usr/include/boost/type_traits/has_trivial_move_constructor.hpp \ + /usr/include/boost/type_traits/has_unary_minus.hpp \ + /usr/include/boost/type_traits/has_unary_plus.hpp \ + /usr/include/boost/type_traits/has_virtual_destructor.hpp \ + /usr/include/boost/type_traits/is_complex.hpp \ + /usr/include/c++/11/complex \ + /usr/include/boost/type_traits/is_compound.hpp \ + /usr/include/boost/type_traits/is_fundamental.hpp \ + /usr/include/boost/type_traits/is_copy_assignable.hpp \ + /usr/include/boost/type_traits/is_noncopyable.hpp \ + /usr/include/boost/type_traits/is_empty.hpp \ + /usr/include/boost/type_traits/is_final.hpp \ + /usr/include/boost/type_traits/is_float.hpp \ + /usr/include/boost/type_traits/is_list_constructible.hpp \ + /usr/include/boost/type_traits/is_member_object_pointer.hpp \ + /usr/include/boost/type_traits/is_nothrow_swappable.hpp \ + /usr/include/boost/type_traits/is_object.hpp \ + /usr/include/boost/type_traits/is_polymorphic.hpp \ + /usr/include/boost/type_traits/is_scoped_enum.hpp \ + /usr/include/boost/type_traits/negation.hpp \ + /usr/include/boost/type_traits/is_signed.hpp \ + /usr/include/boost/type_traits/is_stateless.hpp \ + /usr/include/boost/type_traits/is_trivially_copyable.hpp \ + /usr/include/boost/type_traits/is_union.hpp \ + /usr/include/boost/type_traits/is_unscoped_enum.hpp \ + /usr/include/boost/type_traits/is_virtual_base_of.hpp \ + /usr/include/boost/type_traits/make_signed.hpp \ + /usr/include/boost/type_traits/make_unsigned.hpp \ + /usr/include/boost/type_traits/rank.hpp \ + /usr/include/boost/type_traits/remove_all_extents.hpp \ + /usr/include/boost/type_traits/remove_cv_ref.hpp \ + /usr/include/boost/type_traits/remove_volatile.hpp \ + /usr/include/boost/type_traits/integral_promotion.hpp \ + /usr/include/boost/type_traits/promote.hpp \ + third_party/threadpool/boost/threadpool/pool.hpp \ + /usr/include/boost/ref.hpp \ + /usr/include/boost/core/ref.hpp \ + third_party/threadpool/boost/threadpool/detail/pool_core.hpp \ + third_party/threadpool/boost/threadpool/detail/worker_thread.hpp \ + third_party/threadpool/boost/threadpool/detail/scope_guard.hpp \ + /usr/include/boost/function.hpp \ + /usr/include/boost/preprocessor/iterate.hpp \ + /usr/include/boost/function/detail/prologue.hpp \ + /usr/include/boost/function/function_base.hpp \ + /usr/include/boost/integer.hpp \ + /usr/include/boost/integer_fwd.hpp \ + /usr/include/boost/type_index.hpp \ + /usr/include/boost/type_index/stl_type_index.hpp \ + /usr/include/boost/type_index/type_index_facade.hpp \ + /usr/include/boost/container_hash/hash_fwd.hpp \ + /usr/include/boost/core/demangle.hpp \ + /usr/include/c++/11/cxxabi.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/cxxabi_tweaks.h \ + /usr/include/boost/type_traits/composite_traits.hpp \ + /usr/include/boost/function_equal.hpp \ + /usr/include/boost/function/function_fwd.hpp \ + /usr/include/boost/mem_fn.hpp \ + /usr/include/boost/bind/mem_fn.hpp \ + /usr/include/boost/get_pointer.hpp \ + /usr/include/boost/config/no_tr1/memory.hpp \ + /usr/include/boost/bind/mem_fn_template.hpp \ + /usr/include/boost/bind/mem_fn_cc.hpp \ + /usr/include/boost/preprocessor/enum.hpp \ + /usr/include/boost/preprocessor/repetition/enum.hpp \ + /usr/include/boost/preprocessor/enum_params.hpp \ + /usr/include/boost/function/detail/function_iterate.hpp \ + /usr/include/boost/function/detail/maybe_include.hpp \ + /usr/include/boost/function/function_template.hpp \ + /usr/include/boost/core/no_exceptions_support.hpp \ + /usr/include/boost/thread.hpp \ + /usr/include/boost/thread/thread.hpp \ + /usr/include/boost/thread/thread_only.hpp \ + /usr/include/boost/thread/detail/thread.hpp \ + /usr/include/boost/thread/detail/thread_heap_alloc.hpp \ + /usr/include/boost/thread/pthread/thread_heap_alloc.hpp \ + /usr/include/boost/thread/detail/make_tuple_indices.hpp \ + /usr/include/boost/thread/detail/invoke.hpp \ + /usr/include/boost/thread/detail/is_convertible.hpp \ + /usr/include/c++/11/list \ + /usr/include/c++/11/bits/stl_list.h \ + /usr/include/c++/11/bits/list.tcc \ + /usr/include/boost/bind/bind.hpp \ + /usr/include/boost/is_placeholder.hpp \ + /usr/include/boost/bind/arg.hpp \ + /usr/include/boost/bind/detail/result_traits.hpp \ + /usr/include/boost/visit_each.hpp \ + /usr/include/boost/core/is_same.hpp \ + /usr/include/boost/bind/storage.hpp \ + /usr/include/boost/bind/bind_cc.hpp \ + /usr/include/boost/bind/bind_mf_cc.hpp \ + /usr/include/boost/bind/bind_mf2_cc.hpp \ + /usr/include/boost/bind/placeholders.hpp \ + /usr/include/c++/11/stdlib.h \ + /usr/include/boost/io/ios_state.hpp \ + /usr/include/boost/io_fwd.hpp \ + /usr/include/c++/11/locale \ + /usr/include/c++/11/bits/locale_facets_nonio.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/time_members.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/messages_members.h \ + /usr/include/libintl.h \ + /usr/include/c++/11/bits/codecvt.h \ + /usr/include/c++/11/bits/locale_facets_nonio.tcc \ + /usr/include/c++/11/bits/locale_conv.h \ + /usr/include/boost/functional/hash.hpp \ + /usr/include/boost/container_hash/hash.hpp \ + /usr/include/boost/container_hash/detail/hash_float.hpp \ + /usr/include/boost/container_hash/detail/float_functions.hpp \ + /usr/include/boost/container_hash/detail/limits.hpp \ + /usr/include/boost/integer/static_log2.hpp \ + /usr/include/c++/11/typeindex \ + /usr/include/boost/container_hash/extensions.hpp \ + /usr/include/boost/detail/container_fwd.hpp \ + /usr/include/c++/11/set \ + /usr/include/c++/11/bits/stl_set.h \ + /usr/include/c++/11/bits/stl_multiset.h \ + /usr/include/c++/11/bitset \ + /usr/include/boost/thread/detail/thread_interruption.hpp \ + /usr/include/boost/thread/detail/thread_group.hpp \ + /usr/include/boost/thread/csbl/memory/unique_ptr.hpp \ + /usr/include/boost/thread/csbl/memory/config.hpp \ + /usr/include/boost/move/unique_ptr.hpp \ + /usr/include/boost/move/detail/unique_ptr_meta_utils.hpp \ + /usr/include/boost/move/default_delete.hpp \ + /usr/include/boost/move/adl_move_swap.hpp \ + /usr/include/boost/move/make_unique.hpp \ + /usr/include/boost/thread/shared_mutex.hpp \ + /usr/include/boost/thread/pthread/shared_mutex.hpp \ + /usr/include/boost/thread/once.hpp \ + /usr/include/boost/thread/pthread/once_atomic.hpp \ + /usr/include/boost/atomic.hpp \ + /usr/include/boost/memory_order.hpp \ + /usr/include/boost/atomic/capabilities.hpp \ + /usr/include/boost/atomic/detail/config.hpp \ + /usr/include/boost/atomic/detail/capabilities.hpp \ + /usr/include/boost/atomic/detail/platform.hpp \ + /usr/include/boost/atomic/detail/futex.hpp \ + /usr/include/sys/syscall.h \ + /usr/include/asm/unistd.h \ + /usr/include/asm/unistd_64.h \ + /usr/include/bits/syscall.h \ + /usr/include/linux/futex.h \ + /usr/include/linux/types.h \ + /usr/include/asm/types.h \ + /usr/include/asm-generic/types.h \ + /usr/include/asm-generic/int-ll64.h \ + /usr/include/asm/bitsperlong.h \ + /usr/include/asm-generic/bitsperlong.h \ + /usr/include/linux/posix_types.h \ + /usr/include/linux/stddef.h \ + /usr/include/asm/posix_types.h \ + /usr/include/asm/posix_types_64.h \ + /usr/include/asm-generic/posix_types.h \ + /usr/include/boost/atomic/detail/intptr.hpp \ + /usr/include/boost/atomic/detail/header.hpp \ + /usr/include/boost/atomic/detail/footer.hpp \ + /usr/include/boost/atomic/detail/int_sizes.hpp \ + /usr/include/boost/atomic/detail/float_sizes.hpp \ + /usr/lib/gcc/x86_64-redhat-linux/11/include/float.h \ + /usr/include/boost/atomic/detail/caps_gcc_atomic.hpp \ + /usr/include/boost/atomic/detail/caps_arch_gcc_x86.hpp \ + /usr/include/boost/atomic/detail/wait_capabilities.hpp \ + /usr/include/boost/atomic/detail/wait_caps_futex.hpp \ + /usr/include/boost/atomic/atomic.hpp \ + /usr/include/boost/atomic/detail/classify.hpp \ + /usr/include/boost/atomic/detail/type_traits/is_integral.hpp \ + /usr/include/boost/atomic/detail/type_traits/is_function.hpp \ + /usr/include/boost/atomic/detail/type_traits/is_floating_point.hpp \ + /usr/include/boost/atomic/detail/atomic_impl.hpp \ + /usr/include/boost/atomic/detail/storage_traits.hpp \ + /usr/include/boost/atomic/detail/string_ops.hpp \ + /usr/include/boost/atomic/detail/aligned_variable.hpp \ + /usr/include/boost/atomic/detail/type_traits/alignment_of.hpp \ + /usr/include/boost/atomic/detail/bitwise_cast.hpp \ + /usr/include/boost/atomic/detail/addressof.hpp \ + /usr/include/boost/atomic/detail/type_traits/integral_constant.hpp \ + /usr/include/boost/atomic/detail/integral_conversions.hpp \ + /usr/include/boost/atomic/detail/type_traits/is_signed.hpp \ + /usr/include/boost/atomic/detail/type_traits/make_signed.hpp \ + /usr/include/boost/atomic/detail/type_traits/make_unsigned.hpp \ + /usr/include/boost/atomic/detail/core_operations.hpp \ + /usr/include/boost/atomic/detail/core_arch_operations.hpp \ + /usr/include/boost/atomic/detail/core_arch_operations_fwd.hpp \ + /usr/include/boost/atomic/detail/core_operations_emulated.hpp \ + /usr/include/boost/atomic/detail/core_operations_emulated_fwd.hpp \ + /usr/include/boost/atomic/detail/lock_pool.hpp \ + /usr/include/boost/atomic/detail/link.hpp \ + /usr/include/boost/atomic/detail/core_arch_ops_gcc_x86.hpp \ + /usr/include/boost/atomic/detail/core_operations_fwd.hpp \ + /usr/include/boost/atomic/detail/core_ops_gcc_atomic.hpp \ + /usr/include/boost/atomic/detail/gcc_atomic_memory_order_utils.hpp \ + /usr/include/boost/atomic/detail/wait_operations.hpp \ + /usr/include/boost/atomic/detail/wait_ops_generic.hpp \ + /usr/include/boost/atomic/detail/pause.hpp \ + /usr/include/boost/atomic/detail/wait_operations_fwd.hpp \ + /usr/include/boost/atomic/detail/wait_ops_emulated.hpp \ + /usr/include/boost/atomic/detail/wait_ops_futex.hpp \ + /usr/include/boost/atomic/detail/extra_operations.hpp \ + /usr/include/boost/atomic/detail/extra_ops_generic.hpp \ + /usr/include/boost/atomic/detail/extra_operations_fwd.hpp \ + /usr/include/boost/atomic/detail/extra_ops_emulated.hpp \ + /usr/include/boost/atomic/detail/extra_ops_gcc_x86.hpp \ + /usr/include/boost/atomic/detail/memory_order_utils.hpp \ + /usr/include/boost/atomic/detail/type_traits/is_trivially_default_constructible.hpp \ + /usr/include/boost/atomic/detail/type_traits/conditional.hpp \ + /usr/include/boost/atomic/detail/bitwise_fp_cast.hpp \ + /usr/include/boost/atomic/detail/fp_operations.hpp \ + /usr/include/boost/atomic/detail/fp_ops_generic.hpp \ + /usr/include/boost/atomic/detail/fp_operations_fwd.hpp \ + /usr/include/boost/atomic/detail/fp_ops_emulated.hpp \ + /usr/include/boost/atomic/detail/extra_fp_operations.hpp \ + /usr/include/boost/atomic/detail/extra_fp_ops_generic.hpp \ + /usr/include/boost/atomic/detail/extra_fp_operations_fwd.hpp \ + /usr/include/boost/atomic/detail/type_traits/is_iec559.hpp \ + /usr/include/boost/atomic/detail/extra_fp_ops_emulated.hpp \ + /usr/include/boost/atomic/detail/type_traits/is_trivially_copyable.hpp \ + /usr/include/boost/atomic/atomic_ref.hpp \ + /usr/include/boost/atomic/detail/atomic_ref_impl.hpp \ + /usr/include/boost/atomic/atomic_flag.hpp \ + /usr/include/boost/atomic/detail/atomic_flag_impl.hpp \ + /usr/include/boost/atomic/ipc_atomic.hpp \ + /usr/include/boost/atomic/ipc_atomic_ref.hpp \ + /usr/include/boost/atomic/ipc_atomic_flag.hpp \ + /usr/include/boost/atomic/fences.hpp \ + /usr/include/boost/atomic/detail/fence_operations.hpp \ + /usr/include/boost/atomic/detail/fence_ops_gcc_atomic.hpp \ + /usr/include/boost/atomic/detail/fence_arch_operations.hpp \ + /usr/include/boost/atomic/detail/fence_arch_ops_gcc_x86.hpp \ + /usr/include/boost/thread/recursive_mutex.hpp \ + /usr/include/boost/thread/pthread/recursive_mutex.hpp \ + /usr/include/boost/thread/tss.hpp \ + /usr/include/boost/thread/locks.hpp \ + /usr/include/boost/thread/lock_algorithms.hpp \ + /usr/include/boost/thread/shared_lock_guard.hpp \ + /usr/include/boost/thread/barrier.hpp \ + /usr/include/boost/thread/detail/nullary_function.hpp \ + /usr/include/boost/thread/detail/memory.hpp \ + /usr/include/boost/thread/csbl/memory/pointer_traits.hpp \ + /usr/include/boost/thread/csbl/memory/allocator_arg.hpp \ + /usr/include/boost/thread/csbl/memory/allocator_traits.hpp \ + /usr/include/boost/thread/csbl/memory/scoped_allocator.hpp \ + /usr/include/boost/thread/csbl/memory/shared_ptr.hpp \ + /usr/include/boost/thread/future.hpp \ + /usr/include/boost/thread/detail/invoker.hpp \ + /usr/include/boost/thread/csbl/tuple.hpp \ + /usr/include/boost/tuple/tuple.hpp \ + /usr/include/boost/tuple/detail/tuple_basic.hpp \ + /usr/include/boost/type_traits/cv_traits.hpp \ + /usr/include/boost/utility/swap.hpp \ + /usr/include/boost/thread/detail/variadic_header.hpp \ + /usr/include/boost/thread/detail/variadic_footer.hpp \ + /usr/include/boost/thread/exceptional_ptr.hpp \ + /usr/include/boost/exception_ptr.hpp \ + /usr/include/boost/exception/detail/exception_ptr.hpp \ + /usr/include/boost/exception/info.hpp \ + /usr/include/boost/exception/to_string_stub.hpp \ + /usr/include/boost/exception/to_string.hpp \ + /usr/include/boost/exception/detail/is_output_streamable.hpp \ + /usr/include/boost/exception/detail/object_hex_dump.hpp \ + /usr/include/boost/exception/detail/type_info.hpp \ + /usr/include/boost/core/typeinfo.hpp \ + /usr/include/c++/11/iomanip \ + /usr/include/c++/11/bits/quoted_string.h \ + /usr/include/boost/exception/detail/error_info_impl.hpp \ + /usr/include/boost/exception/detail/shared_ptr.hpp \ + /usr/include/boost/exception/diagnostic_information.hpp \ + /usr/include/boost/exception/get_error_info.hpp \ + /usr/include/boost/exception/current_exception_cast.hpp \ + /usr/include/boost/exception/detail/clone_current_exception.hpp \ + /usr/include/boost/thread/futures/future_error.hpp \ + /usr/include/boost/thread/futures/future_error_code.hpp \ + /usr/include/boost/thread/futures/future_status.hpp \ + /usr/include/boost/thread/futures/is_future_type.hpp \ + /usr/include/boost/thread/futures/launch.hpp \ + /usr/include/boost/thread/futures/wait_for_all.hpp \ + /usr/include/boost/thread/futures/wait_for_any.hpp \ + /usr/include/boost/next_prior.hpp \ + /usr/include/boost/iterator/advance.hpp \ + /usr/include/boost/iterator/iterator_categories.hpp \ + /usr/include/boost/iterator/detail/config_def.hpp \ + /usr/include/boost/mpl/placeholders.hpp \ + /usr/include/boost/mpl/arg.hpp \ + /usr/include/boost/mpl/arg_fwd.hpp \ + /usr/include/boost/mpl/aux_/na_assert.hpp \ + /usr/include/boost/mpl/assert.hpp \ + /usr/include/boost/mpl/aux_/config/gpu.hpp \ + /usr/include/boost/mpl/aux_/config/pp_counter.hpp \ + /usr/include/boost/mpl/aux_/arity_spec.hpp \ + /usr/include/boost/mpl/aux_/arg_typedef.hpp \ + /usr/include/boost/mpl/aux_/preprocessed/gcc/arg.hpp \ + /usr/include/boost/mpl/aux_/preprocessed/gcc/placeholders.hpp \ + /usr/include/boost/iterator/detail/config_undef.hpp \ + /usr/include/boost/iterator/reverse_iterator.hpp \ + /usr/include/boost/iterator/iterator_adaptor.hpp \ + /usr/include/boost/core/use_default.hpp \ + /usr/include/boost/iterator/iterator_facade.hpp \ + /usr/include/boost/iterator/interoperable.hpp \ + /usr/include/boost/iterator/iterator_traits.hpp \ + /usr/include/boost/iterator/detail/facade_iterator_category.hpp \ + /usr/include/boost/detail/indirect_traits.hpp \ + /usr/include/boost/detail/select_type.hpp \ + /usr/include/boost/iterator/detail/enable_if.hpp \ + /usr/include/boost/mpl/always.hpp \ + /usr/include/boost/mpl/apply.hpp \ + /usr/include/boost/mpl/apply_fwd.hpp \ + /usr/include/boost/mpl/aux_/preprocessed/gcc/apply_fwd.hpp \ + /usr/include/boost/mpl/lambda.hpp \ + /usr/include/boost/mpl/bind.hpp \ + /usr/include/boost/mpl/bind_fwd.hpp \ + /usr/include/boost/mpl/aux_/config/bind.hpp \ + /usr/include/boost/mpl/aux_/preprocessed/gcc/bind_fwd.hpp \ + /usr/include/boost/mpl/next.hpp \ + /usr/include/boost/mpl/next_prior.hpp \ + /usr/include/boost/mpl/aux_/common_name_wknd.hpp \ + /usr/include/boost/mpl/protect.hpp \ + /usr/include/boost/mpl/aux_/preprocessed/gcc/bind.hpp \ + /usr/include/boost/mpl/aux_/full_lambda.hpp \ + /usr/include/boost/mpl/quote.hpp \ + /usr/include/boost/mpl/aux_/has_type.hpp \ + /usr/include/boost/mpl/aux_/config/bcc.hpp \ + /usr/include/boost/mpl/aux_/preprocessed/gcc/quote.hpp \ + /usr/include/boost/mpl/aux_/template_arity.hpp \ + /usr/include/boost/mpl/aux_/preprocessed/gcc/template_arity.hpp \ + /usr/include/boost/mpl/aux_/preprocessed/gcc/full_lambda.hpp \ + /usr/include/boost/mpl/aux_/preprocessed/gcc/apply.hpp \ + /usr/include/boost/thread/executor.hpp \ + /usr/include/boost/thread/executors/executor.hpp \ + /usr/include/boost/thread/executors/executor_adaptor.hpp \ + /usr/include/boost/thread/executors/generic_executor_ref.hpp \ + /usr/include/boost/thread/detail/atomic_undef_macros.hpp \ + /usr/include/boost/thread/detail/atomic_redef_macros.hpp \ + /usr/include/boost/bind.hpp \ + third_party/threadpool/boost/threadpool/task_adaptors.hpp \ + third_party/threadpool/boost/threadpool/task_adaptors.hpp \ + third_party/threadpool/boost/threadpool/detail/locking_ptr.hpp \ + third_party/threadpool/boost/threadpool/scheduling_policies.hpp \ + /usr/include/c++/11/queue \ + /usr/include/c++/11/bits/stl_queue.h \ + third_party/threadpool/boost/threadpool/size_policies.hpp \ + third_party/threadpool/boost/threadpool/shutdown_policies.hpp \ + third_party/threadpool/boost/threadpool/pool_adaptors.hpp \ + third_party/threadpool/boost/threadpool/task_adaptors.hpp + +CMakeFiles/lspcpp.dir/src/jsonrpc/StreamMessageProducer.cpp.o: src/jsonrpc/StreamMessageProducer.cpp \ + /usr/include/stdc-predef.h \ + include/LibLsp/JsonRpc/StreamMessageProducer.h \ + /usr/include/c++/11/string \ + /usr/include/c++/11/x86_64-redhat-linux/bits/c++config.h \ + /usr/include/bits/wordsize.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/os_defines.h \ + /usr/include/features.h \ + /usr/include/sys/cdefs.h \ + /usr/include/bits/long-double.h \ + /usr/include/gnu/stubs.h \ + /usr/include/gnu/stubs-64.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/cpu_defines.h \ + /usr/include/c++/11/bits/stringfwd.h \ + /usr/include/c++/11/bits/memoryfwd.h \ + /usr/include/c++/11/bits/char_traits.h \ + /usr/include/c++/11/bits/stl_algobase.h \ + /usr/include/c++/11/bits/functexcept.h \ + /usr/include/c++/11/bits/exception_defines.h \ + /usr/include/c++/11/bits/cpp_type_traits.h \ + /usr/include/c++/11/ext/type_traits.h \ + /usr/include/c++/11/ext/numeric_traits.h \ + /usr/include/c++/11/bits/stl_pair.h \ + /usr/include/c++/11/bits/move.h \ + /usr/include/c++/11/type_traits \ + /usr/include/c++/11/bits/stl_iterator_base_types.h \ + /usr/include/c++/11/bits/stl_iterator_base_funcs.h \ + /usr/include/c++/11/bits/concept_check.h \ + /usr/include/c++/11/debug/assertions.h \ + /usr/include/c++/11/bits/stl_iterator.h \ + /usr/include/c++/11/bits/ptr_traits.h \ + /usr/include/c++/11/debug/debug.h \ + /usr/include/c++/11/bits/predefined_ops.h \ + /usr/include/c++/11/bits/postypes.h \ + /usr/include/c++/11/cwchar \ + /usr/include/wchar.h \ + /usr/include/bits/libc-header-start.h \ + /usr/include/bits/floatn.h \ + /usr/include/bits/floatn-common.h \ + /usr/lib/gcc/x86_64-redhat-linux/11/include/stddef.h \ + /usr/lib/gcc/x86_64-redhat-linux/11/include/stdarg.h \ + /usr/include/bits/wchar.h \ + /usr/include/bits/types/wint_t.h \ + /usr/include/bits/types/mbstate_t.h \ + /usr/include/bits/types/__mbstate_t.h \ + /usr/include/bits/types/__FILE.h \ + /usr/include/bits/types/FILE.h \ + /usr/include/bits/types/locale_t.h \ + /usr/include/bits/types/__locale_t.h \ + /usr/include/c++/11/cstdint \ + /usr/lib/gcc/x86_64-redhat-linux/11/include/stdint.h \ + /usr/include/stdint.h \ + /usr/include/bits/types.h \ + /usr/include/bits/timesize.h \ + /usr/include/bits/typesizes.h \ + /usr/include/bits/time64.h \ + /usr/include/bits/stdint-intn.h \ + /usr/include/bits/stdint-uintn.h \ + /usr/include/c++/11/bits/allocator.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/c++allocator.h \ + /usr/include/c++/11/ext/new_allocator.h \ + /usr/include/c++/11/new \ + /usr/include/c++/11/bits/exception.h \ + /usr/include/c++/11/bits/localefwd.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/c++locale.h \ + /usr/include/c++/11/clocale \ + /usr/include/locale.h \ + /usr/include/bits/locale.h \ + /usr/include/c++/11/iosfwd \ + /usr/include/c++/11/cctype \ + /usr/include/ctype.h \ + /usr/include/bits/endian.h \ + /usr/include/bits/endianness.h \ + /usr/include/c++/11/bits/ostream_insert.h \ + /usr/include/c++/11/bits/cxxabi_forced.h \ + /usr/include/c++/11/bits/stl_function.h \ + /usr/include/c++/11/backward/binders.h \ + /usr/include/c++/11/bits/range_access.h \ + /usr/include/c++/11/initializer_list \ + /usr/include/c++/11/bits/basic_string.h \ + /usr/include/c++/11/ext/atomicity.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/gthr.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/gthr-default.h \ + /usr/include/pthread.h \ + /usr/include/sched.h \ + /usr/include/bits/types/time_t.h \ + /usr/include/bits/types/struct_timespec.h \ + /usr/include/bits/sched.h \ + /usr/include/bits/types/struct_sched_param.h \ + /usr/include/bits/cpu-set.h \ + /usr/include/time.h \ + /usr/include/bits/time.h \ + /usr/include/bits/timex.h \ + /usr/include/bits/types/struct_timeval.h \ + /usr/include/bits/types/clock_t.h \ + /usr/include/bits/types/struct_tm.h \ + /usr/include/bits/types/clockid_t.h \ + /usr/include/bits/types/timer_t.h \ + /usr/include/bits/types/struct_itimerspec.h \ + /usr/include/bits/pthreadtypes.h \ + /usr/include/bits/thread-shared-types.h \ + /usr/include/bits/pthreadtypes-arch.h \ + /usr/include/bits/struct_mutex.h \ + /usr/include/bits/struct_rwlock.h \ + /usr/include/bits/setjmp.h \ + /usr/include/bits/types/__sigset_t.h \ + /usr/include/bits/types/struct___jmp_buf_tag.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/atomic_word.h \ + /usr/include/sys/single_threaded.h \ + /usr/include/c++/11/ext/alloc_traits.h \ + /usr/include/c++/11/bits/alloc_traits.h \ + /usr/include/c++/11/bits/stl_construct.h \ + /usr/include/c++/11/ext/string_conversions.h \ + /usr/include/c++/11/cstdlib \ + /usr/include/stdlib.h \ + /usr/include/bits/waitflags.h \ + /usr/include/bits/waitstatus.h \ + /usr/include/sys/types.h \ + /usr/include/endian.h \ + /usr/include/bits/byteswap.h \ + /usr/include/bits/uintn-identity.h \ + /usr/include/sys/select.h \ + /usr/include/bits/select.h \ + /usr/include/bits/types/sigset_t.h \ + /usr/include/alloca.h \ + /usr/include/bits/stdlib-bsearch.h \ + /usr/include/bits/stdlib-float.h \ + /usr/include/c++/11/bits/std_abs.h \ + /usr/include/c++/11/cstdio \ + /usr/include/stdio.h \ + /usr/include/bits/types/__fpos_t.h \ + /usr/include/bits/types/__fpos64_t.h \ + /usr/include/bits/types/struct_FILE.h \ + /usr/include/bits/types/cookie_io_functions_t.h \ + /usr/include/bits/stdio_lim.h \ + /usr/include/bits/stdio.h \ + /usr/include/c++/11/cerrno \ + /usr/include/errno.h \ + /usr/include/bits/errno.h \ + /usr/include/linux/errno.h \ + /usr/include/asm/errno.h \ + /usr/include/asm-generic/errno.h \ + /usr/include/asm-generic/errno-base.h \ + /usr/include/bits/types/error_t.h \ + /usr/include/c++/11/bits/charconv.h \ + /usr/include/c++/11/bits/functional_hash.h \ + /usr/include/c++/11/bits/hash_bytes.h \ + /usr/include/c++/11/bits/basic_string.tcc \ + /usr/include/c++/11/functional \ + /usr/include/c++/11/tuple \ + /usr/include/c++/11/utility \ + /usr/include/c++/11/bits/stl_relops.h \ + /usr/include/c++/11/array \ + /usr/include/c++/11/bits/uses_allocator.h \ + /usr/include/c++/11/bits/invoke.h \ + /usr/include/c++/11/bits/refwrap.h \ + /usr/include/c++/11/bits/std_function.h \ + /usr/include/c++/11/typeinfo \ + include/LibLsp/JsonRpc/MessageProducer.h \ + /usr/include/c++/11/iostream \ + /usr/include/c++/11/ostream \ + /usr/include/c++/11/ios \ + /usr/include/c++/11/exception \ + /usr/include/c++/11/bits/exception_ptr.h \ + /usr/include/c++/11/bits/cxxabi_init_exception.h \ + /usr/include/c++/11/bits/nested_exception.h \ + /usr/include/c++/11/bits/ios_base.h \ + /usr/include/c++/11/bits/locale_classes.h \ + /usr/include/c++/11/bits/locale_classes.tcc \ + /usr/include/c++/11/system_error \ + /usr/include/c++/11/x86_64-redhat-linux/bits/error_constants.h \ + /usr/include/c++/11/stdexcept \ + /usr/include/c++/11/streambuf \ + /usr/include/c++/11/bits/streambuf.tcc \ + /usr/include/c++/11/bits/basic_ios.h \ + /usr/include/c++/11/bits/locale_facets.h \ + /usr/include/c++/11/cwctype \ + /usr/include/wctype.h \ + /usr/include/bits/wctype-wchar.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/ctype_base.h \ + /usr/include/c++/11/bits/streambuf_iterator.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/ctype_inline.h \ + /usr/include/c++/11/bits/locale_facets.tcc \ + /usr/include/c++/11/bits/basic_ios.tcc \ + /usr/include/c++/11/bits/ostream.tcc \ + /usr/include/c++/11/istream \ + /usr/include/c++/11/bits/istream.tcc \ + /usr/include/c++/11/memory \ + /usr/include/c++/11/bits/stl_uninitialized.h \ + /usr/include/c++/11/bits/stl_tempbuf.h \ + /usr/include/c++/11/bits/stl_raw_storage_iter.h \ + /usr/include/c++/11/bits/align.h \ + /usr/include/c++/11/bit \ + /usr/include/c++/11/bits/unique_ptr.h \ + /usr/include/c++/11/bits/shared_ptr.h \ + /usr/include/c++/11/bits/shared_ptr_base.h \ + /usr/include/c++/11/bits/allocated_ptr.h \ + /usr/include/c++/11/ext/aligned_buffer.h \ + /usr/include/c++/11/ext/concurrence.h \ + /usr/include/c++/11/bits/shared_ptr_atomic.h \ + /usr/include/c++/11/bits/atomic_base.h \ + /usr/include/c++/11/bits/atomic_lockfree_defines.h \ + /usr/include/c++/11/backward/auto_ptr.h \ + include/LibLsp/JsonRpc/MessageIssue.h \ + /usr/include/c++/11/vector \ + /usr/include/c++/11/bits/stl_vector.h \ + /usr/include/c++/11/bits/stl_bvector.h \ + /usr/include/c++/11/bits/vector.tcc \ + /usr/include/c++/11/cassert \ + /usr/include/assert.h \ + include/LibLsp/JsonRpc/stream.h \ + /usr/include/c++/11/mutex \ + /usr/include/c++/11/chrono \ + /usr/include/c++/11/ratio \ + /usr/include/c++/11/limits \ + /usr/include/c++/11/ctime \ + /usr/include/c++/11/bits/parse_numbers.h \ + /usr/include/c++/11/bits/std_mutex.h \ + /usr/include/c++/11/bits/unique_lock.h + +CMakeFiles/lspcpp.dir/src/jsonrpc/TcpServer.cpp.o: src/jsonrpc/TcpServer.cpp \ + /usr/include/stdc-predef.h \ + include/LibLsp/JsonRpc/TcpServer.h \ + /usr/include/boost/asio.hpp \ + /usr/include/boost/asio/associated_allocator.hpp \ + /usr/include/boost/asio/detail/config.hpp \ + /usr/include/boost/config.hpp \ + /usr/include/boost/config/user.hpp \ + /usr/include/boost/config/detail/select_compiler_config.hpp \ + /usr/include/boost/config/compiler/gcc.hpp \ + /usr/include/c++/11/cstddef \ + /usr/include/c++/11/x86_64-redhat-linux/bits/c++config.h \ + /usr/include/bits/wordsize.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/os_defines.h \ + /usr/include/features.h \ + /usr/include/sys/cdefs.h \ + /usr/include/bits/long-double.h \ + /usr/include/gnu/stubs.h \ + /usr/include/gnu/stubs-64.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/cpu_defines.h \ + /usr/lib/gcc/x86_64-redhat-linux/11/include/stddef.h \ + /usr/include/boost/config/detail/select_stdlib_config.hpp \ + /usr/include/c++/11/version \ + /usr/include/boost/config/stdlib/libstdcpp3.hpp \ + /usr/include/unistd.h \ + /usr/include/bits/posix_opt.h \ + /usr/include/bits/environments.h \ + /usr/include/bits/types.h \ + /usr/include/bits/timesize.h \ + /usr/include/bits/typesizes.h \ + /usr/include/bits/time64.h \ + /usr/include/bits/confname.h \ + /usr/include/bits/getopt_posix.h \ + /usr/include/bits/getopt_core.h \ + /usr/include/bits/unistd_ext.h \ + /usr/include/boost/config/detail/select_platform_config.hpp \ + /usr/include/boost/config/platform/linux.hpp \ + /usr/include/c++/11/cstdlib \ + /usr/include/stdlib.h \ + /usr/include/bits/libc-header-start.h \ + /usr/include/bits/waitflags.h \ + /usr/include/bits/waitstatus.h \ + /usr/include/bits/floatn.h \ + /usr/include/bits/floatn-common.h \ + /usr/include/bits/types/locale_t.h \ + /usr/include/bits/types/__locale_t.h \ + /usr/include/sys/types.h \ + /usr/include/bits/types/clock_t.h \ + /usr/include/bits/types/clockid_t.h \ + /usr/include/bits/types/time_t.h \ + /usr/include/bits/types/timer_t.h \ + /usr/include/bits/stdint-intn.h \ + /usr/include/endian.h \ + /usr/include/bits/endian.h \ + /usr/include/bits/endianness.h \ + /usr/include/bits/byteswap.h \ + /usr/include/bits/uintn-identity.h \ + /usr/include/sys/select.h \ + /usr/include/bits/select.h \ + /usr/include/bits/types/sigset_t.h \ + /usr/include/bits/types/__sigset_t.h \ + /usr/include/bits/types/struct_timeval.h \ + /usr/include/bits/types/struct_timespec.h \ + /usr/include/bits/pthreadtypes.h \ + /usr/include/bits/thread-shared-types.h \ + /usr/include/bits/pthreadtypes-arch.h \ + /usr/include/bits/struct_mutex.h \ + /usr/include/bits/struct_rwlock.h \ + /usr/include/alloca.h \ + /usr/include/bits/stdlib-bsearch.h \ + /usr/include/bits/stdlib-float.h \ + /usr/include/c++/11/bits/std_abs.h \ + /usr/include/boost/config/detail/posix_features.hpp \ + /usr/include/boost/config/detail/suffix.hpp \ + /usr/include/boost/config/helper_macros.hpp \ + /usr/include/boost/version.hpp \ + /usr/include/linux/version.h \ + /usr/include/c++/11/memory \ + /usr/include/c++/11/bits/stl_algobase.h \ + /usr/include/c++/11/bits/functexcept.h \ + /usr/include/c++/11/bits/exception_defines.h \ + /usr/include/c++/11/bits/cpp_type_traits.h \ + /usr/include/c++/11/ext/type_traits.h \ + /usr/include/c++/11/ext/numeric_traits.h \ + /usr/include/c++/11/bits/stl_pair.h \ + /usr/include/c++/11/bits/move.h \ + /usr/include/c++/11/type_traits \ + /usr/include/c++/11/bits/stl_iterator_base_types.h \ + /usr/include/c++/11/bits/stl_iterator_base_funcs.h \ + /usr/include/c++/11/bits/concept_check.h \ + /usr/include/c++/11/debug/assertions.h \ + /usr/include/c++/11/bits/stl_iterator.h \ + /usr/include/c++/11/bits/ptr_traits.h \ + /usr/include/c++/11/debug/debug.h \ + /usr/include/c++/11/bits/predefined_ops.h \ + /usr/include/c++/11/bits/allocator.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/c++allocator.h \ + /usr/include/c++/11/ext/new_allocator.h \ + /usr/include/c++/11/new \ + /usr/include/c++/11/bits/exception.h \ + /usr/include/c++/11/bits/memoryfwd.h \ + /usr/include/c++/11/bits/stl_construct.h \ + /usr/include/c++/11/bits/stl_uninitialized.h \ + /usr/include/c++/11/ext/alloc_traits.h \ + /usr/include/c++/11/bits/alloc_traits.h \ + /usr/include/c++/11/bits/stl_tempbuf.h \ + /usr/include/c++/11/bits/stl_raw_storage_iter.h \ + /usr/include/c++/11/bits/align.h \ + /usr/include/c++/11/bit \ + /usr/lib/gcc/x86_64-redhat-linux/11/include/stdint.h \ + /usr/include/stdint.h \ + /usr/include/bits/wchar.h \ + /usr/include/bits/stdint-uintn.h \ + /usr/include/c++/11/bits/uses_allocator.h \ + /usr/include/c++/11/bits/unique_ptr.h \ + /usr/include/c++/11/utility \ + /usr/include/c++/11/bits/stl_relops.h \ + /usr/include/c++/11/initializer_list \ + /usr/include/c++/11/tuple \ + /usr/include/c++/11/array \ + /usr/include/c++/11/bits/range_access.h \ + /usr/include/c++/11/bits/invoke.h \ + /usr/include/c++/11/bits/stl_function.h \ + /usr/include/c++/11/backward/binders.h \ + /usr/include/c++/11/bits/functional_hash.h \ + /usr/include/c++/11/bits/hash_bytes.h \ + /usr/include/c++/11/bits/shared_ptr.h \ + /usr/include/c++/11/iosfwd \ + /usr/include/c++/11/bits/stringfwd.h \ + /usr/include/c++/11/bits/postypes.h \ + /usr/include/c++/11/cwchar \ + /usr/include/wchar.h \ + /usr/lib/gcc/x86_64-redhat-linux/11/include/stdarg.h \ + /usr/include/bits/types/wint_t.h \ + /usr/include/bits/types/mbstate_t.h \ + /usr/include/bits/types/__mbstate_t.h \ + /usr/include/bits/types/__FILE.h \ + /usr/include/bits/types/FILE.h \ + /usr/include/c++/11/bits/shared_ptr_base.h \ + /usr/include/c++/11/typeinfo \ + /usr/include/c++/11/bits/allocated_ptr.h \ + /usr/include/c++/11/bits/refwrap.h \ + /usr/include/c++/11/ext/aligned_buffer.h \ + /usr/include/c++/11/ext/atomicity.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/gthr.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/gthr-default.h \ + /usr/include/pthread.h \ + /usr/include/sched.h \ + /usr/include/bits/sched.h \ + /usr/include/bits/types/struct_sched_param.h \ + /usr/include/bits/cpu-set.h \ + /usr/include/time.h \ + /usr/include/bits/time.h \ + /usr/include/bits/timex.h \ + /usr/include/bits/types/struct_tm.h \ + /usr/include/bits/types/struct_itimerspec.h \ + /usr/include/bits/setjmp.h \ + /usr/include/bits/types/struct___jmp_buf_tag.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/atomic_word.h \ + /usr/include/sys/single_threaded.h \ + /usr/include/c++/11/ext/concurrence.h \ + /usr/include/c++/11/exception \ + /usr/include/c++/11/bits/exception_ptr.h \ + /usr/include/c++/11/bits/cxxabi_init_exception.h \ + /usr/include/c++/11/bits/nested_exception.h \ + /usr/include/c++/11/bits/shared_ptr_atomic.h \ + /usr/include/c++/11/bits/atomic_base.h \ + /usr/include/c++/11/bits/atomic_lockfree_defines.h \ + /usr/include/c++/11/backward/auto_ptr.h \ + /usr/include/boost/asio/detail/type_traits.hpp \ + /usr/include/boost/asio/detail/push_options.hpp \ + /usr/include/boost/asio/detail/pop_options.hpp \ + /usr/include/boost/asio/associated_executor.hpp \ + /usr/include/boost/asio/execution/executor.hpp \ + /usr/include/boost/asio/execution/execute.hpp \ + /usr/include/boost/asio/execution/detail/as_invocable.hpp \ + /usr/include/boost/asio/detail/atomic_count.hpp \ + /usr/include/c++/11/atomic \ + /usr/include/boost/asio/detail/memory.hpp \ + /usr/include/boost/asio/execution/receiver_invocation_error.hpp \ + /usr/include/c++/11/stdexcept \ + /usr/include/c++/11/string \ + /usr/include/c++/11/bits/char_traits.h \ + /usr/include/c++/11/cstdint \ + /usr/include/c++/11/bits/localefwd.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/c++locale.h \ + /usr/include/c++/11/clocale \ + /usr/include/locale.h \ + /usr/include/bits/locale.h \ + /usr/include/c++/11/cctype \ + /usr/include/ctype.h \ + /usr/include/c++/11/bits/ostream_insert.h \ + /usr/include/c++/11/bits/cxxabi_forced.h \ + /usr/include/c++/11/bits/basic_string.h \ + /usr/include/c++/11/ext/string_conversions.h \ + /usr/include/c++/11/cstdio \ + /usr/include/stdio.h \ + /usr/include/bits/types/__fpos_t.h \ + /usr/include/bits/types/__fpos64_t.h \ + /usr/include/bits/types/struct_FILE.h \ + /usr/include/bits/types/cookie_io_functions_t.h \ + /usr/include/bits/stdio_lim.h \ + /usr/include/bits/stdio.h \ + /usr/include/c++/11/cerrno \ + /usr/include/errno.h \ + /usr/include/bits/errno.h \ + /usr/include/linux/errno.h \ + /usr/include/asm/errno.h \ + /usr/include/asm-generic/errno.h \ + /usr/include/asm-generic/errno-base.h \ + /usr/include/bits/types/error_t.h \ + /usr/include/c++/11/bits/charconv.h \ + /usr/include/c++/11/bits/basic_string.tcc \ + /usr/include/boost/asio/execution/impl/receiver_invocation_error.ipp \ + /usr/include/boost/asio/execution/set_done.hpp \ + /usr/include/boost/asio/traits/set_done_member.hpp \ + /usr/include/boost/asio/traits/set_done_free.hpp \ + /usr/include/boost/asio/execution/set_error.hpp \ + /usr/include/boost/asio/traits/set_error_member.hpp \ + /usr/include/boost/asio/traits/set_error_free.hpp \ + /usr/include/boost/asio/execution/set_value.hpp \ + /usr/include/boost/asio/detail/variadic_templates.hpp \ + /usr/include/boost/asio/traits/set_value_member.hpp \ + /usr/include/boost/asio/traits/set_value_free.hpp \ + /usr/include/boost/asio/execution/detail/as_receiver.hpp \ + /usr/include/boost/asio/traits/execute_member.hpp \ + /usr/include/boost/asio/traits/execute_free.hpp \ + /usr/include/boost/asio/execution/invocable_archetype.hpp \ + /usr/include/boost/asio/traits/equality_comparable.hpp \ + /usr/include/boost/asio/is_executor.hpp \ + /usr/include/boost/asio/detail/is_executor.hpp \ + /usr/include/boost/asio/system_executor.hpp \ + /usr/include/boost/asio/execution.hpp \ + /usr/include/boost/asio/execution/allocator.hpp \ + /usr/include/boost/asio/execution/scheduler.hpp \ + /usr/include/boost/asio/execution/schedule.hpp \ + /usr/include/boost/asio/traits/schedule_member.hpp \ + /usr/include/boost/asio/traits/schedule_free.hpp \ + /usr/include/boost/asio/execution/sender.hpp \ + /usr/include/boost/asio/execution/detail/void_receiver.hpp \ + /usr/include/boost/asio/execution/receiver.hpp \ + /usr/include/boost/asio/execution/connect.hpp \ + /usr/include/boost/asio/execution/detail/as_operation.hpp \ + /usr/include/boost/asio/traits/start_member.hpp \ + /usr/include/boost/asio/execution/operation_state.hpp \ + /usr/include/boost/asio/execution/start.hpp \ + /usr/include/boost/asio/traits/start_free.hpp \ + /usr/include/boost/asio/traits/connect_member.hpp \ + /usr/include/boost/asio/traits/connect_free.hpp \ + /usr/include/boost/asio/is_applicable_property.hpp \ + /usr/include/boost/asio/traits/query_static_constexpr_member.hpp \ + /usr/include/boost/asio/traits/static_query.hpp \ + /usr/include/boost/asio/execution/any_executor.hpp \ + /usr/include/boost/asio/detail/assert.hpp \ + /usr/include/boost/assert.hpp \ + /usr/include/assert.h \ + /usr/include/boost/asio/detail/cstddef.hpp \ + /usr/include/boost/asio/detail/executor_function.hpp \ + /usr/include/boost/asio/detail/handler_alloc_helpers.hpp \ + /usr/include/boost/asio/detail/noncopyable.hpp \ + /usr/include/boost/asio/detail/recycling_allocator.hpp \ + /usr/include/boost/asio/detail/thread_context.hpp \ + /usr/include/c++/11/climits \ + /usr/lib/gcc/x86_64-redhat-linux/11/include/limits.h \ + /usr/lib/gcc/x86_64-redhat-linux/11/include/syslimits.h \ + /usr/include/limits.h \ + /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h \ + /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h \ + /usr/include/bits/xopen_lim.h \ + /usr/include/bits/uio_lim.h \ + /usr/include/boost/asio/detail/call_stack.hpp \ + /usr/include/boost/asio/detail/tss_ptr.hpp \ + /usr/include/boost/asio/detail/keyword_tss_ptr.hpp \ + /usr/include/boost/asio/detail/thread_info_base.hpp \ + /usr/include/boost/asio/multiple_exceptions.hpp \ + /usr/include/boost/asio/impl/multiple_exceptions.ipp \ + /usr/include/boost/asio/handler_alloc_hook.hpp \ + /usr/include/boost/asio/impl/handler_alloc_hook.ipp \ + /usr/include/boost/asio/detail/handler_invoke_helpers.hpp \ + /usr/include/boost/asio/handler_invoke_hook.hpp \ + /usr/include/boost/asio/detail/non_const_lvalue.hpp \ + /usr/include/boost/asio/detail/scoped_ptr.hpp \ + /usr/include/boost/asio/detail/throw_exception.hpp \ + /usr/include/boost/throw_exception.hpp \ + /usr/include/boost/assert/source_location.hpp \ + /usr/include/boost/current_function.hpp \ + /usr/include/boost/cstdint.hpp \ + /usr/include/boost/config/workaround.hpp \ + /usr/include/boost/exception/exception.hpp \ + /usr/include/boost/asio/execution/bad_executor.hpp \ + /usr/include/boost/asio/execution/impl/bad_executor.ipp \ + /usr/include/boost/asio/execution/blocking.hpp \ + /usr/include/boost/asio/prefer.hpp \ + /usr/include/boost/asio/traits/prefer_free.hpp \ + /usr/include/boost/asio/traits/prefer_member.hpp \ + /usr/include/boost/asio/traits/require_free.hpp \ + /usr/include/boost/asio/traits/require_member.hpp \ + /usr/include/boost/asio/traits/static_require.hpp \ + /usr/include/boost/asio/query.hpp \ + /usr/include/boost/asio/traits/query_member.hpp \ + /usr/include/boost/asio/traits/query_free.hpp \ + /usr/include/boost/asio/require.hpp \ + /usr/include/boost/asio/execution/blocking_adaptation.hpp \ + /usr/include/boost/asio/detail/event.hpp \ + /usr/include/boost/asio/detail/posix_event.hpp \ + /usr/include/boost/asio/detail/impl/posix_event.ipp \ + /usr/include/boost/asio/detail/throw_error.hpp \ + /usr/include/boost/system/error_code.hpp \ + /usr/include/boost/system/detail/error_code.hpp \ + /usr/include/boost/system/detail/error_category.hpp \ + /usr/include/boost/system/detail/config.hpp \ + /usr/include/c++/11/functional \ + /usr/include/c++/11/bits/std_function.h \ + /usr/include/c++/11/system_error \ + /usr/include/c++/11/x86_64-redhat-linux/bits/error_constants.h \ + /usr/include/boost/system/detail/error_condition.hpp \ + /usr/include/boost/system/detail/generic_category.hpp \ + /usr/include/boost/system/detail/generic_category_message.hpp \ + /usr/include/c++/11/cstring \ + /usr/include/string.h \ + /usr/include/strings.h \ + /usr/include/boost/system/detail/enable_if.hpp \ + /usr/include/boost/system/is_error_condition_enum.hpp \ + /usr/include/boost/system/detail/system_category.hpp \ + /usr/include/boost/system/is_error_code_enum.hpp \ + /usr/include/c++/11/ostream \ + /usr/include/c++/11/ios \ + /usr/include/c++/11/bits/ios_base.h \ + /usr/include/c++/11/bits/locale_classes.h \ + /usr/include/c++/11/bits/locale_classes.tcc \ + /usr/include/c++/11/streambuf \ + /usr/include/c++/11/bits/streambuf.tcc \ + /usr/include/c++/11/bits/basic_ios.h \ + /usr/include/c++/11/bits/locale_facets.h \ + /usr/include/c++/11/cwctype \ + /usr/include/wctype.h \ + /usr/include/bits/wctype-wchar.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/ctype_base.h \ + /usr/include/c++/11/bits/streambuf_iterator.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/ctype_inline.h \ + /usr/include/c++/11/bits/locale_facets.tcc \ + /usr/include/c++/11/bits/basic_ios.tcc \ + /usr/include/c++/11/bits/ostream.tcc \ + /usr/include/boost/system/error_category.hpp \ + /usr/include/boost/system/detail/error_category_impl.hpp \ + /usr/include/boost/system/detail/to_std_category.hpp \ + /usr/include/c++/11/map \ + /usr/include/c++/11/bits/stl_tree.h \ + /usr/include/c++/11/bits/stl_map.h \ + /usr/include/c++/11/bits/stl_multimap.h \ + /usr/include/c++/11/bits/erase_if.h \ + /usr/include/c++/11/mutex \ + /usr/include/c++/11/chrono \ + /usr/include/c++/11/ratio \ + /usr/include/c++/11/limits \ + /usr/include/c++/11/ctime \ + /usr/include/c++/11/bits/parse_numbers.h \ + /usr/include/c++/11/bits/std_mutex.h \ + /usr/include/c++/11/bits/unique_lock.h \ + /usr/include/boost/system/error_condition.hpp \ + /usr/include/boost/system/errc.hpp \ + /usr/include/boost/system/detail/errc.hpp \ + /usr/include/boost/system/detail/cerrno.hpp \ + /usr/include/boost/system/generic_category.hpp \ + /usr/include/boost/system/system_category.hpp \ + /usr/include/boost/system/detail/system_category_impl.hpp \ + /usr/include/boost/system/api_config.hpp \ + /usr/include/boost/system/detail/is_generic_value.hpp \ + /usr/include/boost/system/detail/throws.hpp \ + /usr/include/boost/asio/detail/impl/throw_error.ipp \ + /usr/include/boost/system/system_error.hpp \ + /usr/include/c++/11/cassert \ + /usr/include/boost/asio/error.hpp \ + /usr/include/boost/cerrno.hpp \ + /usr/include/netdb.h \ + /usr/include/netinet/in.h \ + /usr/include/sys/socket.h \ + /usr/include/bits/types/struct_iovec.h \ + /usr/include/bits/socket.h \ + /usr/include/bits/socket_type.h \ + /usr/include/bits/sockaddr.h \ + /usr/include/asm/socket.h \ + /usr/include/asm-generic/socket.h \ + /usr/include/linux/posix_types.h \ + /usr/include/linux/stddef.h \ + /usr/include/asm/posix_types.h \ + /usr/include/asm/posix_types_64.h \ + /usr/include/asm-generic/posix_types.h \ + /usr/include/asm/bitsperlong.h \ + /usr/include/asm-generic/bitsperlong.h \ + /usr/include/asm/sockios.h \ + /usr/include/asm-generic/sockios.h \ + /usr/include/bits/types/struct_osockaddr.h \ + /usr/include/bits/in.h \ + /usr/include/rpc/netdb.h \ + /usr/include/bits/types/sigevent_t.h \ + /usr/include/bits/types/__sigval_t.h \ + /usr/include/bits/netdb.h \ + /usr/include/boost/asio/impl/error.ipp \ + /usr/include/boost/asio/detail/mutex.hpp \ + /usr/include/boost/asio/detail/posix_mutex.hpp \ + /usr/include/boost/asio/detail/scoped_lock.hpp \ + /usr/include/boost/asio/detail/impl/posix_mutex.ipp \ + /usr/include/boost/asio/execution/bulk_execute.hpp \ + /usr/include/boost/asio/execution/bulk_guarantee.hpp \ + /usr/include/boost/asio/execution/detail/bulk_sender.hpp \ + /usr/include/boost/asio/traits/bulk_execute_member.hpp \ + /usr/include/boost/asio/traits/bulk_execute_free.hpp \ + /usr/include/boost/asio/execution/context.hpp \ + /usr/include/boost/asio/execution/context_as.hpp \ + /usr/include/boost/asio/execution/mapping.hpp \ + /usr/include/boost/asio/execution/occupancy.hpp \ + /usr/include/boost/asio/execution/outstanding_work.hpp \ + /usr/include/boost/asio/execution/prefer_only.hpp \ + /usr/include/boost/asio/execution/relationship.hpp \ + /usr/include/boost/asio/execution/submit.hpp \ + /usr/include/boost/asio/execution/detail/submit_receiver.hpp \ + /usr/include/boost/asio/traits/submit_member.hpp \ + /usr/include/boost/asio/traits/submit_free.hpp \ + /usr/include/boost/asio/impl/system_executor.hpp \ + /usr/include/boost/asio/detail/executor_op.hpp \ + /usr/include/boost/asio/detail/fenced_block.hpp \ + /usr/include/boost/asio/detail/std_fenced_block.hpp \ + /usr/include/boost/asio/detail/scheduler_operation.hpp \ + /usr/include/boost/asio/detail/handler_tracking.hpp \ + /usr/include/boost/asio/detail/impl/handler_tracking.ipp \ + /usr/include/boost/asio/detail/op_queue.hpp \ + /usr/include/boost/asio/detail/global.hpp \ + /usr/include/boost/asio/detail/posix_global.hpp \ + /usr/include/boost/asio/system_context.hpp \ + /usr/include/boost/asio/detail/scheduler.hpp \ + /usr/include/boost/asio/execution_context.hpp \ + /usr/include/boost/asio/impl/execution_context.hpp \ + /usr/include/boost/asio/detail/handler_type_requirements.hpp \ + /usr/include/boost/asio/async_result.hpp \ + /usr/include/boost/asio/detail/service_registry.hpp \ + /usr/include/boost/asio/detail/impl/service_registry.hpp \ + /usr/include/boost/asio/detail/impl/service_registry.ipp \ + /usr/include/c++/11/vector \ + /usr/include/c++/11/bits/stl_vector.h \ + /usr/include/c++/11/bits/stl_bvector.h \ + /usr/include/c++/11/bits/vector.tcc \ + /usr/include/boost/asio/impl/execution_context.ipp \ + /usr/include/boost/asio/detail/conditionally_enabled_event.hpp \ + /usr/include/boost/asio/detail/conditionally_enabled_mutex.hpp \ + /usr/include/boost/asio/detail/null_event.hpp \ + /usr/include/boost/asio/detail/impl/null_event.ipp \ + /usr/include/boost/asio/detail/reactor_fwd.hpp \ + /usr/include/boost/asio/detail/thread.hpp \ + /usr/include/boost/asio/detail/posix_thread.hpp \ + /usr/include/boost/asio/detail/impl/posix_thread.ipp \ + /usr/include/boost/asio/detail/impl/scheduler.ipp \ + /usr/include/boost/asio/detail/concurrency_hint.hpp \ + /usr/include/boost/asio/detail/limits.hpp \ + /usr/include/boost/limits.hpp \ + /usr/include/boost/asio/detail/reactor.hpp \ + /usr/include/boost/asio/detail/epoll_reactor.hpp \ + /usr/include/boost/asio/detail/object_pool.hpp \ + /usr/include/boost/asio/detail/reactor_op.hpp \ + /usr/include/boost/asio/detail/operation.hpp \ + /usr/include/boost/asio/detail/select_interrupter.hpp \ + /usr/include/boost/asio/detail/eventfd_select_interrupter.hpp \ + /usr/include/boost/asio/detail/impl/eventfd_select_interrupter.ipp \ + /usr/include/sys/stat.h \ + /usr/include/bits/stat.h \ + /usr/include/bits/struct_stat.h \ + /usr/include/bits/statx.h \ + /usr/include/linux/stat.h \ + /usr/include/linux/types.h \ + /usr/include/asm/types.h \ + /usr/include/asm-generic/types.h \ + /usr/include/asm-generic/int-ll64.h \ + /usr/include/bits/statx-generic.h \ + /usr/include/bits/types/struct_statx_timestamp.h \ + /usr/include/bits/types/struct_statx.h \ + /usr/include/fcntl.h \ + /usr/include/bits/fcntl.h \ + /usr/include/bits/fcntl-linux.h \ + /usr/include/linux/falloc.h \ + /usr/include/sys/eventfd.h \ + /usr/include/bits/eventfd.h \ + /usr/include/boost/asio/detail/cstdint.hpp \ + /usr/include/boost/asio/detail/socket_types.hpp \ + /usr/include/sys/ioctl.h \ + /usr/include/bits/ioctls.h \ + /usr/include/asm/ioctls.h \ + /usr/include/asm-generic/ioctls.h \ + /usr/include/linux/ioctl.h \ + /usr/include/asm/ioctl.h \ + /usr/include/asm-generic/ioctl.h \ + /usr/include/bits/ioctl-types.h \ + /usr/include/sys/ttydefaults.h \ + /usr/include/poll.h \ + /usr/include/sys/poll.h \ + /usr/include/bits/poll.h \ + /usr/include/sys/uio.h \ + /usr/include/bits/uio-ext.h \ + /usr/include/sys/un.h \ + /usr/include/netinet/tcp.h \ + /usr/include/arpa/inet.h \ + /usr/include/net/if.h \ + /usr/include/boost/asio/detail/timer_queue_base.hpp \ + /usr/include/boost/asio/detail/timer_queue_set.hpp \ + /usr/include/boost/asio/detail/impl/timer_queue_set.ipp \ + /usr/include/boost/asio/detail/wait_op.hpp \ + /usr/include/sys/timerfd.h \ + /usr/include/bits/timerfd.h \ + /usr/include/boost/asio/detail/impl/epoll_reactor.hpp \ + /usr/include/boost/asio/detail/impl/epoll_reactor.ipp \ + /usr/include/sys/epoll.h \ + /usr/include/bits/epoll.h \ + /usr/include/boost/asio/detail/scheduler_thread_info.hpp \ + /usr/include/boost/asio/detail/signal_blocker.hpp \ + /usr/include/boost/asio/detail/posix_signal_blocker.hpp \ + /usr/include/c++/11/csignal \ + /usr/include/signal.h \ + /usr/include/bits/signum-generic.h \ + /usr/include/bits/signum-arch.h \ + /usr/include/bits/types/sig_atomic_t.h \ + /usr/include/bits/types/siginfo_t.h \ + /usr/include/bits/siginfo-arch.h \ + /usr/include/bits/siginfo-consts.h \ + /usr/include/bits/siginfo-consts-arch.h \ + /usr/include/bits/types/sigval_t.h \ + /usr/include/bits/sigevent-consts.h \ + /usr/include/bits/sigaction.h \ + /usr/include/bits/sigcontext.h \ + /usr/include/bits/types/stack_t.h \ + /usr/include/sys/ucontext.h \ + /usr/include/bits/sigstack.h \ + /usr/include/bits/ss_flags.h \ + /usr/include/bits/types/struct_sigstack.h \ + /usr/include/bits/sigthread.h \ + /usr/include/bits/signal_ext.h \ + /usr/include/boost/asio/detail/thread_group.hpp \ + /usr/include/boost/asio/impl/system_context.hpp \ + /usr/include/boost/asio/impl/system_context.ipp \ + /usr/include/boost/asio/awaitable.hpp \ + /usr/include/boost/asio/basic_datagram_socket.hpp \ + /usr/include/boost/asio/basic_socket.hpp \ + /usr/include/boost/asio/any_io_executor.hpp \ + /usr/include/boost/asio/detail/io_object_impl.hpp \ + /usr/include/boost/asio/io_context.hpp \ + /usr/include/boost/asio/detail/wrapped_handler.hpp \ + /usr/include/boost/asio/detail/bind_handler.hpp \ + /usr/include/boost/asio/detail/handler_cont_helpers.hpp \ + /usr/include/boost/asio/handler_continuation_hook.hpp \ + /usr/include/boost/asio/detail/chrono.hpp \ + /usr/include/boost/asio/impl/io_context.hpp \ + /usr/include/boost/asio/detail/completion_handler.hpp \ + /usr/include/boost/asio/detail/handler_work.hpp \ + /usr/include/boost/asio/executor_work_guard.hpp \ + /usr/include/boost/asio/impl/io_context.ipp \ + /usr/include/boost/asio/post.hpp \ + /usr/include/boost/asio/impl/post.hpp \ + /usr/include/boost/asio/detail/work_dispatcher.hpp \ + /usr/include/boost/asio/socket_base.hpp \ + /usr/include/boost/asio/detail/io_control.hpp \ + /usr/include/boost/asio/detail/socket_option.hpp \ + /usr/include/boost/asio/detail/reactive_socket_service.hpp \ + /usr/include/boost/asio/buffer.hpp \ + /usr/include/boost/asio/detail/array_fwd.hpp \ + /usr/include/boost/asio/detail/string_view.hpp \ + /usr/include/c++/11/experimental/string_view \ + /usr/include/c++/11/bits/ranges_base.h \ + /usr/include/c++/11/experimental/bits/lfts_config.h \ + /usr/include/c++/11/experimental/bits/string_view.tcc \ + /usr/include/boost/detail/workaround.hpp \ + /usr/include/boost/asio/detail/is_buffer_sequence.hpp \ + /usr/include/boost/asio/detail/buffer_sequence_adapter.hpp \ + /usr/include/boost/asio/detail/impl/buffer_sequence_adapter.ipp \ + /usr/include/boost/asio/detail/reactive_null_buffers_op.hpp \ + /usr/include/boost/asio/detail/reactive_socket_accept_op.hpp \ + /usr/include/boost/asio/detail/socket_holder.hpp \ + /usr/include/boost/asio/detail/socket_ops.hpp \ + /usr/include/boost/asio/detail/impl/socket_ops.ipp \ + /usr/include/boost/asio/detail/reactive_socket_connect_op.hpp \ + /usr/include/boost/asio/detail/reactive_socket_recvfrom_op.hpp \ + /usr/include/boost/asio/detail/reactive_socket_sendto_op.hpp \ + /usr/include/boost/asio/detail/reactive_socket_service_base.hpp \ + /usr/include/boost/asio/detail/reactive_socket_recv_op.hpp \ + /usr/include/boost/asio/detail/reactive_socket_recvmsg_op.hpp \ + /usr/include/boost/asio/detail/reactive_socket_send_op.hpp \ + /usr/include/boost/asio/detail/reactive_wait_op.hpp \ + /usr/include/boost/asio/detail/impl/reactive_socket_service_base.ipp \ + /usr/include/boost/asio/basic_deadline_timer.hpp \ + /usr/include/boost/asio/detail/deadline_timer_service.hpp \ + /usr/include/boost/asio/detail/timer_queue.hpp \ + /usr/include/boost/asio/detail/date_time_fwd.hpp \ + /usr/include/boost/asio/detail/timer_queue_ptime.hpp \ + /usr/include/boost/asio/time_traits.hpp \ + /usr/include/boost/date_time/posix_time/posix_time_types.hpp \ + /usr/include/boost/date_time/time_clock.hpp \ + /usr/include/boost/date_time/c_time.hpp \ + /usr/include/boost/date_time/compiler_config.hpp \ + /usr/include/boost/date_time/locale_config.hpp \ + /usr/include/boost/config/auto_link.hpp \ + /usr/include/sys/time.h \ + /usr/include/boost/shared_ptr.hpp \ + /usr/include/boost/smart_ptr/shared_ptr.hpp \ + /usr/include/boost/smart_ptr/detail/shared_count.hpp \ + /usr/include/boost/smart_ptr/bad_weak_ptr.hpp \ + /usr/include/boost/smart_ptr/detail/sp_counted_base.hpp \ + /usr/include/boost/smart_ptr/detail/sp_has_gcc_intrinsics.hpp \ + /usr/include/boost/smart_ptr/detail/sp_has_sync_intrinsics.hpp \ + /usr/include/boost/smart_ptr/detail/sp_counted_base_gcc_atomic.hpp \ + /usr/include/boost/smart_ptr/detail/sp_typeinfo_.hpp \ + /usr/include/boost/smart_ptr/detail/sp_counted_impl.hpp \ + /usr/include/boost/smart_ptr/detail/sp_noexcept.hpp \ + /usr/include/boost/checked_delete.hpp \ + /usr/include/boost/core/checked_delete.hpp \ + /usr/include/boost/core/addressof.hpp \ + /usr/include/boost/smart_ptr/detail/sp_disable_deprecated.hpp \ + /usr/include/boost/smart_ptr/detail/sp_convertible.hpp \ + /usr/include/boost/smart_ptr/detail/sp_nullptr_t.hpp \ + /usr/include/boost/smart_ptr/detail/spinlock_pool.hpp \ + /usr/include/boost/smart_ptr/detail/spinlock.hpp \ + /usr/include/boost/smart_ptr/detail/spinlock_gcc_atomic.hpp \ + /usr/include/boost/smart_ptr/detail/yield_k.hpp \ + /usr/include/boost/smart_ptr/detail/sp_thread_pause.hpp \ + /usr/include/boost/smart_ptr/detail/sp_thread_sleep.hpp \ + /usr/include/boost/config/pragma_message.hpp \ + /usr/include/c++/11/algorithm \ + /usr/include/c++/11/bits/stl_algo.h \ + /usr/include/c++/11/bits/algorithmfwd.h \ + /usr/include/c++/11/bits/stl_heap.h \ + /usr/include/c++/11/bits/uniform_int_dist.h \ + /usr/include/boost/smart_ptr/detail/operator_bool.hpp \ + /usr/include/boost/smart_ptr/detail/local_sp_deleter.hpp \ + /usr/include/boost/smart_ptr/detail/local_counted_base.hpp \ + /usr/include/boost/date_time/microsec_time_clock.hpp \ + /usr/include/boost/date_time/posix_time/ptime.hpp \ + /usr/include/boost/date_time/posix_time/posix_time_system.hpp \ + /usr/include/boost/date_time/posix_time/posix_time_config.hpp \ + /usr/include/boost/config/no_tr1/cmath.hpp \ + /usr/include/c++/11/cmath \ + /usr/include/math.h \ + /usr/include/bits/math-vector.h \ + /usr/include/bits/libm-simd-decl-stubs.h \ + /usr/include/bits/flt-eval-method.h \ + /usr/include/bits/fp-logb.h \ + /usr/include/bits/fp-fast.h \ + /usr/include/bits/mathcalls-helper-functions.h \ + /usr/include/bits/mathcalls.h \ + /usr/include/bits/mathcalls-narrow.h \ + /usr/include/bits/iscanonical.h \ + /usr/include/boost/date_time/time_duration.hpp \ + /usr/include/boost/core/enable_if.hpp \ + /usr/include/boost/date_time/special_defs.hpp \ + /usr/include/boost/date_time/time_defs.hpp \ + /usr/include/boost/operators.hpp \ + /usr/include/c++/11/iterator \ + /usr/include/c++/11/bits/stream_iterator.h \ + /usr/include/boost/static_assert.hpp \ + /usr/include/boost/type_traits/is_integral.hpp \ + /usr/include/boost/type_traits/integral_constant.hpp \ + /usr/include/boost/date_time/time_resolution_traits.hpp \ + /usr/include/boost/date_time/int_adapter.hpp \ + /usr/include/boost/date_time/gregorian/gregorian_types.hpp \ + /usr/include/boost/date_time/date.hpp \ + /usr/include/boost/date_time/year_month_day.hpp \ + /usr/include/boost/date_time/period.hpp \ + /usr/include/boost/date_time/gregorian/greg_calendar.hpp \ + /usr/include/boost/date_time/gregorian/greg_weekday.hpp \ + /usr/include/boost/date_time/constrained_value.hpp \ + /usr/include/boost/type_traits/conditional.hpp \ + /usr/include/boost/type_traits/is_base_of.hpp \ + /usr/include/boost/type_traits/is_base_and_derived.hpp \ + /usr/include/boost/type_traits/intrinsics.hpp \ + /usr/include/boost/type_traits/detail/config.hpp \ + /usr/include/boost/type_traits/remove_cv.hpp \ + /usr/include/boost/type_traits/is_same.hpp \ + /usr/include/boost/type_traits/is_class.hpp \ + /usr/include/boost/date_time/date_defs.hpp \ + /usr/include/boost/date_time/gregorian/greg_day_of_year.hpp \ + /usr/include/boost/date_time/gregorian_calendar.hpp \ + /usr/include/boost/date_time/gregorian_calendar.ipp \ + /usr/include/boost/date_time/gregorian/greg_ymd.hpp \ + /usr/include/boost/date_time/gregorian/greg_day.hpp \ + /usr/include/boost/date_time/gregorian/greg_year.hpp \ + /usr/include/boost/date_time/gregorian/greg_month.hpp \ + /usr/include/boost/date_time/gregorian/greg_duration.hpp \ + /usr/include/boost/date_time/date_duration.hpp \ + /usr/include/boost/date_time/date_duration_types.hpp \ + /usr/include/boost/date_time/gregorian/greg_duration_types.hpp \ + /usr/include/boost/date_time/gregorian/greg_date.hpp \ + /usr/include/boost/date_time/adjust_functors.hpp \ + /usr/include/boost/date_time/wrapping_int.hpp \ + /usr/include/boost/date_time/date_generators.hpp \ + /usr/include/c++/11/sstream \ + /usr/include/c++/11/istream \ + /usr/include/c++/11/bits/istream.tcc \ + /usr/include/c++/11/bits/sstream.tcc \ + /usr/include/boost/date_time/date_clock_device.hpp \ + /usr/include/boost/date_time/date_iterator.hpp \ + /usr/include/boost/date_time/time_system_split.hpp \ + /usr/include/boost/date_time/time_system_counted.hpp \ + /usr/include/boost/date_time/time.hpp \ + /usr/include/boost/date_time/posix_time/date_duration_operators.hpp \ + /usr/include/boost/date_time/posix_time/posix_time_duration.hpp \ + /usr/include/boost/numeric/conversion/cast.hpp \ + /usr/include/boost/type.hpp \ + /usr/include/boost/numeric/conversion/converter.hpp \ + /usr/include/boost/numeric/conversion/conversion_traits.hpp \ + /usr/include/boost/numeric/conversion/detail/conversion_traits.hpp \ + /usr/include/boost/type_traits/is_arithmetic.hpp \ + /usr/include/boost/type_traits/is_floating_point.hpp \ + /usr/include/boost/numeric/conversion/detail/meta.hpp \ + /usr/include/boost/mpl/if.hpp \ + /usr/include/boost/mpl/aux_/value_wknd.hpp \ + /usr/include/boost/mpl/aux_/static_cast.hpp \ + /usr/include/boost/mpl/aux_/config/workaround.hpp \ + /usr/include/boost/mpl/aux_/config/integral.hpp \ + /usr/include/boost/mpl/aux_/config/msvc.hpp \ + /usr/include/boost/mpl/aux_/config/eti.hpp \ + /usr/include/boost/mpl/aux_/na_spec.hpp \ + /usr/include/boost/mpl/lambda_fwd.hpp \ + /usr/include/boost/mpl/void_fwd.hpp \ + /usr/include/boost/mpl/aux_/adl_barrier.hpp \ + /usr/include/boost/mpl/aux_/config/adl.hpp \ + /usr/include/boost/mpl/aux_/config/intel.hpp \ + /usr/include/boost/mpl/aux_/config/gcc.hpp \ + /usr/include/boost/mpl/aux_/na.hpp \ + /usr/include/boost/mpl/bool.hpp \ + /usr/include/boost/mpl/bool_fwd.hpp \ + /usr/include/boost/mpl/integral_c_tag.hpp \ + /usr/include/boost/mpl/aux_/config/static_constant.hpp \ + /usr/include/boost/mpl/aux_/na_fwd.hpp \ + /usr/include/boost/mpl/aux_/config/ctps.hpp \ + /usr/include/boost/mpl/aux_/config/lambda.hpp \ + /usr/include/boost/mpl/aux_/config/ttp.hpp \ + /usr/include/boost/mpl/int.hpp \ + /usr/include/boost/mpl/int_fwd.hpp \ + /usr/include/boost/mpl/aux_/nttp_decl.hpp \ + /usr/include/boost/mpl/aux_/config/nttp.hpp \ + /usr/include/boost/mpl/aux_/integral_wrapper.hpp \ + /usr/include/boost/preprocessor/cat.hpp \ + /usr/include/boost/preprocessor/config/config.hpp \ + /usr/include/boost/mpl/aux_/lambda_arity_param.hpp \ + /usr/include/boost/mpl/aux_/template_arity_fwd.hpp \ + /usr/include/boost/mpl/aux_/arity.hpp \ + /usr/include/boost/mpl/aux_/config/dtp.hpp \ + /usr/include/boost/mpl/aux_/preprocessor/params.hpp \ + /usr/include/boost/mpl/aux_/config/preprocessor.hpp \ + /usr/include/boost/preprocessor/comma_if.hpp \ + /usr/include/boost/preprocessor/punctuation/comma_if.hpp \ + /usr/include/boost/preprocessor/control/if.hpp \ + /usr/include/boost/preprocessor/control/iif.hpp \ + /usr/include/boost/preprocessor/logical/bool.hpp \ + /usr/include/boost/preprocessor/config/limits.hpp \ + /usr/include/boost/preprocessor/logical/limits/bool_256.hpp \ + /usr/include/boost/preprocessor/facilities/empty.hpp \ + /usr/include/boost/preprocessor/punctuation/comma.hpp \ + /usr/include/boost/preprocessor/repeat.hpp \ + /usr/include/boost/preprocessor/repetition/repeat.hpp \ + /usr/include/boost/preprocessor/debug/error.hpp \ + /usr/include/boost/preprocessor/detail/auto_rec.hpp \ + /usr/include/boost/preprocessor/detail/limits/auto_rec_256.hpp \ + /usr/include/boost/preprocessor/tuple/eat.hpp \ + /usr/include/boost/preprocessor/repetition/limits/repeat_256.hpp \ + /usr/include/boost/preprocessor/inc.hpp \ + /usr/include/boost/preprocessor/arithmetic/inc.hpp \ + /usr/include/boost/preprocessor/arithmetic/limits/inc_256.hpp \ + /usr/include/boost/mpl/aux_/preprocessor/enum.hpp \ + /usr/include/boost/mpl/aux_/preprocessor/def_params_tail.hpp \ + /usr/include/boost/mpl/limits/arity.hpp \ + /usr/include/boost/preprocessor/logical/and.hpp \ + /usr/include/boost/preprocessor/logical/bitand.hpp \ + /usr/include/boost/preprocessor/identity.hpp \ + /usr/include/boost/preprocessor/facilities/identity.hpp \ + /usr/include/boost/preprocessor/empty.hpp \ + /usr/include/boost/preprocessor/arithmetic/add.hpp \ + /usr/include/boost/preprocessor/arithmetic/dec.hpp \ + /usr/include/boost/preprocessor/arithmetic/limits/dec_256.hpp \ + /usr/include/boost/preprocessor/control/while.hpp \ + /usr/include/boost/preprocessor/list/fold_left.hpp \ + /usr/include/boost/preprocessor/list/detail/fold_left.hpp \ + /usr/include/boost/preprocessor/control/expr_iif.hpp \ + /usr/include/boost/preprocessor/list/adt.hpp \ + /usr/include/boost/preprocessor/detail/is_binary.hpp \ + /usr/include/boost/preprocessor/detail/check.hpp \ + /usr/include/boost/preprocessor/logical/compl.hpp \ + /usr/include/boost/preprocessor/list/detail/limits/fold_left_256.hpp \ + /usr/include/boost/preprocessor/list/limits/fold_left_256.hpp \ + /usr/include/boost/preprocessor/list/fold_right.hpp \ + /usr/include/boost/preprocessor/list/detail/fold_right.hpp \ + /usr/include/boost/preprocessor/list/reverse.hpp \ + /usr/include/boost/preprocessor/list/detail/limits/fold_right_256.hpp \ + /usr/include/boost/preprocessor/control/detail/while.hpp \ + /usr/include/boost/preprocessor/control/detail/limits/while_256.hpp \ + /usr/include/boost/preprocessor/control/limits/while_256.hpp \ + /usr/include/boost/preprocessor/logical/bitor.hpp \ + /usr/include/boost/preprocessor/tuple/elem.hpp \ + /usr/include/boost/preprocessor/facilities/expand.hpp \ + /usr/include/boost/preprocessor/facilities/overload.hpp \ + /usr/include/boost/preprocessor/variadic/size.hpp \ + /usr/include/boost/preprocessor/facilities/check_empty.hpp \ + /usr/include/boost/preprocessor/variadic/has_opt.hpp \ + /usr/include/boost/preprocessor/variadic/limits/size_64.hpp \ + /usr/include/boost/preprocessor/tuple/rem.hpp \ + /usr/include/boost/preprocessor/tuple/detail/is_single_return.hpp \ + /usr/include/boost/preprocessor/variadic/elem.hpp \ + /usr/include/boost/preprocessor/variadic/limits/elem_64.hpp \ + /usr/include/boost/preprocessor/arithmetic/detail/is_maximum_number.hpp \ + /usr/include/boost/preprocessor/comparison/equal.hpp \ + /usr/include/boost/preprocessor/comparison/not_equal.hpp \ + /usr/include/boost/preprocessor/comparison/limits/not_equal_256.hpp \ + /usr/include/boost/preprocessor/arithmetic/detail/maximum_number.hpp \ + /usr/include/boost/preprocessor/arithmetic/detail/is_minimum_number.hpp \ + /usr/include/boost/preprocessor/logical/not.hpp \ + /usr/include/boost/preprocessor/arithmetic/sub.hpp \ + /usr/include/boost/mpl/aux_/config/overload_resolution.hpp \ + /usr/include/boost/mpl/aux_/lambda_support.hpp \ + /usr/include/boost/mpl/eval_if.hpp \ + /usr/include/boost/mpl/equal_to.hpp \ + /usr/include/boost/mpl/aux_/comparison_op.hpp \ + /usr/include/boost/mpl/aux_/numeric_op.hpp \ + /usr/include/boost/mpl/numeric_cast.hpp \ + /usr/include/boost/mpl/apply_wrap.hpp \ + /usr/include/boost/mpl/aux_/has_apply.hpp \ + /usr/include/boost/mpl/has_xxx.hpp \ + /usr/include/boost/mpl/aux_/type_wrapper.hpp \ + /usr/include/boost/mpl/aux_/yes_no.hpp \ + /usr/include/boost/mpl/aux_/config/arrays.hpp \ + /usr/include/boost/mpl/aux_/config/has_xxx.hpp \ + /usr/include/boost/mpl/aux_/config/msvc_typename.hpp \ + /usr/include/boost/preprocessor/array/elem.hpp \ + /usr/include/boost/preprocessor/array/data.hpp \ + /usr/include/boost/preprocessor/array/size.hpp \ + /usr/include/boost/preprocessor/repetition/enum_params.hpp \ + /usr/include/boost/preprocessor/repetition/enum_trailing_params.hpp \ + /usr/include/boost/mpl/aux_/config/has_apply.hpp \ + /usr/include/boost/mpl/aux_/msvc_never_true.hpp \ + /usr/include/boost/mpl/aux_/config/use_preprocessed.hpp \ + /usr/include/boost/mpl/aux_/include_preprocessed.hpp \ + /usr/include/boost/mpl/aux_/config/compiler.hpp \ + /usr/include/boost/preprocessor/stringize.hpp \ + /usr/include/boost/mpl/aux_/preprocessed/gcc/apply_wrap.hpp \ + /usr/include/boost/mpl/tag.hpp \ + /usr/include/boost/mpl/void.hpp \ + /usr/include/boost/mpl/aux_/has_tag.hpp \ + /usr/include/boost/mpl/aux_/numeric_cast_utils.hpp \ + /usr/include/boost/mpl/aux_/config/forwarding.hpp \ + /usr/include/boost/mpl/aux_/msvc_eti_base.hpp \ + /usr/include/boost/mpl/aux_/is_msvc_eti_arg.hpp \ + /usr/include/boost/mpl/aux_/preprocessed/gcc/equal_to.hpp \ + /usr/include/boost/mpl/not.hpp \ + /usr/include/boost/mpl/aux_/nested_type_wknd.hpp \ + /usr/include/boost/mpl/and.hpp \ + /usr/include/boost/mpl/aux_/preprocessed/gcc/and.hpp \ + /usr/include/boost/mpl/identity.hpp \ + /usr/include/boost/numeric/conversion/detail/int_float_mixture.hpp \ + /usr/include/boost/numeric/conversion/int_float_mixture_enum.hpp \ + /usr/include/boost/mpl/integral_c.hpp \ + /usr/include/boost/mpl/integral_c_fwd.hpp \ + /usr/include/boost/numeric/conversion/detail/sign_mixture.hpp \ + /usr/include/boost/numeric/conversion/sign_mixture_enum.hpp \ + /usr/include/boost/numeric/conversion/detail/udt_builtin_mixture.hpp \ + /usr/include/boost/numeric/conversion/udt_builtin_mixture_enum.hpp \ + /usr/include/boost/numeric/conversion/detail/is_subranged.hpp \ + /usr/include/boost/mpl/multiplies.hpp \ + /usr/include/boost/mpl/times.hpp \ + /usr/include/boost/mpl/aux_/arithmetic_op.hpp \ + /usr/include/boost/mpl/aux_/largest_int.hpp \ + /usr/include/boost/mpl/aux_/preprocessed/gcc/times.hpp \ + /usr/include/boost/mpl/aux_/preprocessor/default_params.hpp \ + /usr/include/boost/mpl/less.hpp \ + /usr/include/boost/mpl/aux_/preprocessed/gcc/less.hpp \ + /usr/include/boost/numeric/conversion/converter_policies.hpp \ + /usr/include/boost/numeric/conversion/detail/converter.hpp \ + /usr/include/boost/numeric/conversion/bounds.hpp \ + /usr/include/boost/numeric/conversion/detail/bounds.hpp \ + /usr/include/boost/numeric/conversion/numeric_cast_traits.hpp \ + /usr/include/boost/numeric/conversion/detail/numeric_cast_traits.hpp \ + /usr/include/boost/numeric/conversion/detail/preprocessed/numeric_cast_traits_common.hpp \ + /usr/include/boost/numeric/conversion/detail/preprocessed/numeric_cast_traits_long_long.hpp \ + /usr/include/boost/date_time/posix_time/time_period.hpp \ + /usr/include/boost/date_time/time_iterator.hpp \ + /usr/include/boost/date_time/dst_rules.hpp \ + /usr/include/boost/asio/detail/impl/timer_queue_ptime.ipp \ + /usr/include/boost/asio/detail/timer_scheduler.hpp \ + /usr/include/boost/asio/detail/timer_scheduler_fwd.hpp \ + /usr/include/boost/asio/detail/wait_handler.hpp \ + /usr/include/boost/asio/basic_io_object.hpp \ + /usr/include/boost/asio/basic_raw_socket.hpp \ + /usr/include/boost/asio/basic_seq_packet_socket.hpp \ + /usr/include/boost/asio/basic_serial_port.hpp \ + /usr/include/boost/asio/serial_port_base.hpp \ + /usr/include/termios.h \ + /usr/include/bits/termios.h \ + /usr/include/bits/termios-struct.h \ + /usr/include/bits/termios-c_cc.h \ + /usr/include/bits/termios-c_iflag.h \ + /usr/include/bits/termios-c_oflag.h \ + /usr/include/bits/termios-baud.h \ + /usr/include/bits/termios-c_cflag.h \ + /usr/include/bits/termios-c_lflag.h \ + /usr/include/bits/termios-tcflow.h \ + /usr/include/bits/termios-misc.h \ + /usr/include/boost/asio/impl/serial_port_base.hpp \ + /usr/include/boost/asio/impl/serial_port_base.ipp \ + /usr/include/boost/asio/detail/reactive_serial_port_service.hpp \ + /usr/include/boost/asio/detail/descriptor_ops.hpp \ + /usr/include/boost/asio/detail/impl/descriptor_ops.ipp \ + /usr/include/boost/asio/detail/reactive_descriptor_service.hpp \ + /usr/include/boost/asio/detail/descriptor_read_op.hpp \ + /usr/include/boost/asio/detail/descriptor_write_op.hpp \ + /usr/include/boost/asio/posix/descriptor_base.hpp \ + /usr/include/boost/asio/detail/impl/reactive_descriptor_service.ipp \ + /usr/include/boost/asio/detail/impl/reactive_serial_port_service.ipp \ + /usr/include/boost/asio/basic_signal_set.hpp \ + /usr/include/boost/asio/detail/signal_set_service.hpp \ + /usr/include/boost/asio/detail/signal_handler.hpp \ + /usr/include/boost/asio/detail/signal_op.hpp \ + /usr/include/boost/asio/detail/impl/signal_set_service.ipp \ + /usr/include/boost/asio/detail/static_mutex.hpp \ + /usr/include/boost/asio/detail/posix_static_mutex.hpp \ + /usr/include/boost/asio/basic_socket_acceptor.hpp \ + /usr/include/boost/asio/basic_socket_iostream.hpp \ + /usr/include/boost/asio/basic_socket_streambuf.hpp \ + /usr/include/boost/asio/basic_stream_socket.hpp \ + /usr/include/boost/asio/steady_timer.hpp \ + /usr/include/boost/asio/basic_waitable_timer.hpp \ + /usr/include/boost/asio/detail/chrono_time_traits.hpp \ + /usr/include/boost/asio/wait_traits.hpp \ + /usr/include/boost/asio/basic_streambuf.hpp \ + /usr/include/boost/asio/basic_streambuf_fwd.hpp \ + /usr/include/boost/asio/bind_executor.hpp \ + /usr/include/boost/asio/uses_executor.hpp \ + /usr/include/boost/asio/buffered_read_stream_fwd.hpp \ + /usr/include/boost/asio/buffered_read_stream.hpp \ + /usr/include/boost/asio/detail/buffer_resize_guard.hpp \ + /usr/include/boost/asio/detail/buffered_stream_storage.hpp \ + /usr/include/boost/asio/impl/buffered_read_stream.hpp \ + /usr/include/boost/asio/buffered_stream_fwd.hpp \ + /usr/include/boost/asio/buffered_stream.hpp \ + /usr/include/boost/asio/buffered_write_stream.hpp \ + /usr/include/boost/asio/buffered_write_stream_fwd.hpp \ + /usr/include/boost/asio/completion_condition.hpp \ + /usr/include/boost/asio/write.hpp \ + /usr/include/boost/asio/impl/write.hpp \ + /usr/include/boost/asio/detail/base_from_completion_cond.hpp \ + /usr/include/boost/asio/detail/consuming_buffers.hpp \ + /usr/include/boost/asio/detail/dependent_type.hpp \ + /usr/include/boost/asio/impl/buffered_write_stream.hpp \ + /usr/include/boost/asio/buffers_iterator.hpp \ + /usr/include/boost/asio/co_spawn.hpp \ + /usr/include/boost/asio/compose.hpp \ + /usr/include/boost/asio/impl/compose.hpp \ + /usr/include/boost/asio/connect.hpp \ + /usr/include/boost/asio/impl/connect.hpp \ + /usr/include/boost/asio/coroutine.hpp \ + /usr/include/boost/asio/deadline_timer.hpp \ + /usr/include/boost/asio/defer.hpp \ + /usr/include/boost/asio/impl/defer.hpp \ + /usr/include/boost/asio/detached.hpp \ + /usr/include/boost/asio/impl/detached.hpp \ + /usr/include/boost/asio/dispatch.hpp \ + /usr/include/boost/asio/impl/dispatch.hpp \ + /usr/include/boost/asio/executor.hpp \ + /usr/include/boost/asio/impl/executor.hpp \ + /usr/include/boost/asio/impl/executor.ipp \ + /usr/include/boost/asio/generic/basic_endpoint.hpp \ + /usr/include/boost/asio/generic/detail/endpoint.hpp \ + /usr/include/boost/asio/generic/detail/impl/endpoint.ipp \ + /usr/include/boost/asio/generic/datagram_protocol.hpp \ + /usr/include/boost/asio/generic/raw_protocol.hpp \ + /usr/include/boost/asio/generic/seq_packet_protocol.hpp \ + /usr/include/boost/asio/generic/stream_protocol.hpp \ + /usr/include/boost/asio/high_resolution_timer.hpp \ + /usr/include/boost/asio/io_context_strand.hpp \ + /usr/include/boost/asio/detail/strand_service.hpp \ + /usr/include/boost/asio/detail/impl/strand_service.hpp \ + /usr/include/boost/asio/detail/impl/strand_service.ipp \ + /usr/include/boost/asio/io_service.hpp \ + /usr/include/boost/asio/io_service_strand.hpp \ + /usr/include/boost/asio/ip/address.hpp \ + /usr/include/boost/asio/ip/address_v4.hpp \ + /usr/include/boost/asio/detail/array.hpp \ + /usr/include/boost/asio/detail/winsock_init.hpp \ + /usr/include/boost/asio/ip/impl/address_v4.hpp \ + /usr/include/boost/asio/ip/impl/address_v4.ipp \ + /usr/include/boost/asio/ip/address_v6.hpp \ + /usr/include/boost/asio/ip/impl/address_v6.hpp \ + /usr/include/boost/asio/ip/impl/address_v6.ipp \ + /usr/include/boost/asio/ip/bad_address_cast.hpp \ + /usr/include/boost/asio/ip/impl/address.hpp \ + /usr/include/boost/asio/ip/impl/address.ipp \ + /usr/include/boost/asio/ip/address_v4_iterator.hpp \ + /usr/include/boost/asio/ip/address_v4_range.hpp \ + /usr/include/boost/asio/ip/address_v6_iterator.hpp \ + /usr/include/boost/asio/ip/address_v6_range.hpp \ + /usr/include/boost/asio/ip/network_v4.hpp \ + /usr/include/boost/asio/ip/impl/network_v4.hpp \ + /usr/include/boost/asio/ip/impl/network_v4.ipp \ + /usr/include/boost/asio/ip/network_v6.hpp \ + /usr/include/boost/asio/ip/impl/network_v6.hpp \ + /usr/include/boost/asio/ip/impl/network_v6.ipp \ + /usr/include/boost/asio/ip/basic_endpoint.hpp \ + /usr/include/boost/asio/ip/detail/endpoint.hpp \ + /usr/include/boost/asio/ip/detail/impl/endpoint.ipp \ + /usr/include/boost/asio/ip/impl/basic_endpoint.hpp \ + /usr/include/boost/asio/ip/basic_resolver.hpp \ + /usr/include/boost/asio/ip/basic_resolver_iterator.hpp \ + /usr/include/boost/asio/ip/basic_resolver_entry.hpp \ + /usr/include/boost/asio/ip/basic_resolver_query.hpp \ + /usr/include/boost/asio/ip/resolver_query_base.hpp \ + /usr/include/boost/asio/ip/resolver_base.hpp \ + /usr/include/boost/asio/ip/basic_resolver_results.hpp \ + /usr/include/boost/asio/detail/resolver_service.hpp \ + /usr/include/boost/asio/detail/resolve_endpoint_op.hpp \ + /usr/include/boost/asio/detail/resolve_op.hpp \ + /usr/include/boost/asio/detail/resolve_query_op.hpp \ + /usr/include/boost/asio/detail/resolver_service_base.hpp \ + /usr/include/boost/asio/detail/impl/resolver_service_base.ipp \ + /usr/include/boost/asio/ip/host_name.hpp \ + /usr/include/boost/asio/ip/impl/host_name.ipp \ + /usr/include/boost/asio/ip/icmp.hpp \ + /usr/include/boost/asio/ip/multicast.hpp \ + /usr/include/boost/asio/ip/detail/socket_option.hpp \ + /usr/include/boost/asio/ip/tcp.hpp \ + /usr/include/boost/asio/ip/udp.hpp \ + /usr/include/boost/asio/ip/unicast.hpp \ + /usr/include/boost/asio/ip/v6_only.hpp \ + /usr/include/boost/asio/is_read_buffered.hpp \ + /usr/include/boost/asio/is_write_buffered.hpp \ + /usr/include/boost/asio/local/basic_endpoint.hpp \ + /usr/include/boost/asio/local/detail/endpoint.hpp \ + /usr/include/boost/asio/local/detail/impl/endpoint.ipp \ + /usr/include/boost/asio/local/connect_pair.hpp \ + /usr/include/boost/asio/local/datagram_protocol.hpp \ + /usr/include/boost/asio/local/stream_protocol.hpp \ + /usr/include/boost/asio/packaged_task.hpp \ + /usr/include/boost/asio/detail/future.hpp \ + /usr/include/c++/11/future \ + /usr/include/c++/11/condition_variable \ + /usr/include/c++/11/bits/atomic_futex.h \ + /usr/include/c++/11/bits/std_thread.h \ + /usr/include/boost/asio/placeholders.hpp \ + /usr/include/boost/bind/arg.hpp \ + /usr/include/boost/is_placeholder.hpp \ + /usr/include/boost/asio/posix/basic_descriptor.hpp \ + /usr/include/boost/asio/posix/basic_stream_descriptor.hpp \ + /usr/include/boost/asio/posix/descriptor.hpp \ + /usr/include/boost/asio/posix/stream_descriptor.hpp \ + /usr/include/boost/asio/read.hpp \ + /usr/include/boost/asio/impl/read.hpp \ + /usr/include/boost/asio/read_at.hpp \ + /usr/include/boost/asio/impl/read_at.hpp \ + /usr/include/boost/asio/read_until.hpp \ + /usr/include/boost/asio/detail/regex_fwd.hpp \ + /usr/include/boost/regex_fwd.hpp \ + /usr/include/boost/regex/config.hpp \ + /usr/include/boost/regex/user.hpp \ + /usr/include/boost/predef.h \ + /usr/include/boost/predef/language.h \ + /usr/include/boost/predef/language/stdc.h \ + /usr/include/boost/predef/version_number.h \ + /usr/include/boost/predef/make.h \ + /usr/include/boost/predef/detail/test.h \ + /usr/include/boost/predef/language/stdcpp.h \ + /usr/include/boost/predef/language/objc.h \ + /usr/include/boost/predef/language/cuda.h \ + /usr/include/boost/predef/architecture.h \ + /usr/include/boost/predef/architecture/alpha.h \ + /usr/include/boost/predef/architecture/arm.h \ + /usr/include/boost/predef/architecture/blackfin.h \ + /usr/include/boost/predef/architecture/convex.h \ + /usr/include/boost/predef/architecture/ia64.h \ + /usr/include/boost/predef/architecture/m68k.h \ + /usr/include/boost/predef/architecture/mips.h \ + /usr/include/boost/predef/architecture/parisc.h \ + /usr/include/boost/predef/architecture/ppc.h \ + /usr/include/boost/predef/architecture/ptx.h \ + /usr/include/boost/predef/architecture/pyramid.h \ + /usr/include/boost/predef/architecture/riscv.h \ + /usr/include/boost/predef/architecture/rs6k.h \ + /usr/include/boost/predef/architecture/sparc.h \ + /usr/include/boost/predef/architecture/superh.h \ + /usr/include/boost/predef/architecture/sys370.h \ + /usr/include/boost/predef/architecture/sys390.h \ + /usr/include/boost/predef/architecture/x86.h \ + /usr/include/boost/predef/architecture/x86/32.h \ + /usr/include/boost/predef/architecture/x86/64.h \ + /usr/include/boost/predef/architecture/z.h \ + /usr/include/boost/predef/compiler.h \ + /usr/include/boost/predef/compiler/borland.h \ + /usr/include/boost/predef/compiler/clang.h \ + /usr/include/boost/predef/compiler/comeau.h \ + /usr/include/boost/predef/compiler/compaq.h \ + /usr/include/boost/predef/compiler/diab.h \ + /usr/include/boost/predef/compiler/digitalmars.h \ + /usr/include/boost/predef/compiler/dignus.h \ + /usr/include/boost/predef/compiler/edg.h \ + /usr/include/boost/predef/compiler/ekopath.h \ + /usr/include/boost/predef/compiler/gcc_xml.h \ + /usr/include/boost/predef/compiler/gcc.h \ + /usr/include/boost/predef/detail/comp_detected.h \ + /usr/include/boost/predef/compiler/greenhills.h \ + /usr/include/boost/predef/compiler/hp_acc.h \ + /usr/include/boost/predef/compiler/iar.h \ + /usr/include/boost/predef/compiler/ibm.h \ + /usr/include/boost/predef/compiler/intel.h \ + /usr/include/boost/predef/compiler/kai.h \ + /usr/include/boost/predef/compiler/llvm.h \ + /usr/include/boost/predef/compiler/metaware.h \ + /usr/include/boost/predef/compiler/metrowerks.h \ + /usr/include/boost/predef/compiler/microtec.h \ + /usr/include/boost/predef/compiler/mpw.h \ + /usr/include/boost/predef/compiler/nvcc.h \ + /usr/include/boost/predef/compiler/palm.h \ + /usr/include/boost/predef/compiler/pgi.h \ + /usr/include/boost/predef/compiler/sgi_mipspro.h \ + /usr/include/boost/predef/compiler/sunpro.h \ + /usr/include/boost/predef/compiler/tendra.h \ + /usr/include/boost/predef/compiler/visualc.h \ + /usr/include/boost/predef/compiler/watcom.h \ + /usr/include/boost/predef/library.h \ + /usr/include/boost/predef/library/c.h \ + /usr/include/boost/predef/library/c/_prefix.h \ + /usr/include/boost/predef/detail/_cassert.h \ + /usr/include/boost/predef/library/c/cloudabi.h \ + /usr/include/boost/predef/library/c/gnu.h \ + /usr/include/boost/predef/library/c/uc.h \ + /usr/include/boost/predef/library/c/vms.h \ + /usr/include/boost/predef/library/c/zos.h \ + /usr/include/boost/predef/library/std.h \ + /usr/include/boost/predef/library/std/_prefix.h \ + /usr/include/boost/predef/detail/_exception.h \ + /usr/include/boost/predef/library/std/cxx.h \ + /usr/include/boost/predef/library/std/dinkumware.h \ + /usr/include/boost/predef/library/std/libcomo.h \ + /usr/include/boost/predef/library/std/modena.h \ + /usr/include/boost/predef/library/std/msl.h \ + /usr/include/boost/predef/library/std/roguewave.h \ + /usr/include/boost/predef/library/std/sgi.h \ + /usr/include/boost/predef/library/std/stdcpp3.h \ + /usr/include/boost/predef/library/std/stlport.h \ + /usr/include/boost/predef/library/std/vacpp.h \ + /usr/include/boost/predef/os.h \ + /usr/include/boost/predef/os/aix.h \ + /usr/include/boost/predef/os/amigaos.h \ + /usr/include/boost/predef/os/beos.h \ + /usr/include/boost/predef/os/bsd.h \ + /usr/include/boost/predef/os/macos.h \ + /usr/include/boost/predef/os/ios.h \ + /usr/include/boost/predef/os/bsd/bsdi.h \ + /usr/include/boost/predef/os/bsd/dragonfly.h \ + /usr/include/boost/predef/os/bsd/free.h \ + /usr/include/boost/predef/os/bsd/open.h \ + /usr/include/boost/predef/os/bsd/net.h \ + /usr/include/boost/predef/os/cygwin.h \ + /usr/include/boost/predef/os/haiku.h \ + /usr/include/boost/predef/os/hpux.h \ + /usr/include/boost/predef/os/irix.h \ + /usr/include/boost/predef/os/linux.h \ + /usr/include/boost/predef/detail/os_detected.h \ + /usr/include/boost/predef/os/os400.h \ + /usr/include/boost/predef/os/qnxnto.h \ + /usr/include/boost/predef/os/solaris.h \ + /usr/include/boost/predef/os/unix.h \ + /usr/include/boost/predef/os/vms.h \ + /usr/include/boost/predef/os/windows.h \ + /usr/include/boost/predef/other.h \ + /usr/include/boost/predef/other/endian.h \ + /usr/include/boost/predef/platform/android.h \ + /usr/include/boost/predef/platform.h \ + /usr/include/boost/predef/platform/cloudabi.h \ + /usr/include/boost/predef/platform/mingw.h \ + /usr/include/boost/predef/platform/mingw32.h \ + /usr/include/boost/predef/platform/mingw64.h \ + /usr/include/boost/predef/platform/windows_uwp.h \ + /usr/include/boost/predef/platform/windows_desktop.h \ + /usr/include/boost/predef/platform/windows_phone.h \ + /usr/include/boost/predef/platform/windows_server.h \ + /usr/include/boost/predef/platform/windows_store.h \ + /usr/include/boost/predef/platform/windows_system.h \ + /usr/include/boost/predef/platform/windows_runtime.h \ + /usr/include/boost/predef/platform/ios.h \ + /usr/include/boost/predef/hardware.h \ + /usr/include/boost/predef/hardware/simd.h \ + /usr/include/boost/predef/hardware/simd/x86.h \ + /usr/include/boost/predef/hardware/simd/x86/versions.h \ + /usr/include/boost/predef/hardware/simd/x86_amd.h \ + /usr/include/boost/predef/hardware/simd/x86_amd/versions.h \ + /usr/include/boost/predef/hardware/simd/arm.h \ + /usr/include/boost/predef/hardware/simd/arm/versions.h \ + /usr/include/boost/predef/hardware/simd/ppc.h \ + /usr/include/boost/predef/hardware/simd/ppc/versions.h \ + /usr/include/boost/predef/version.h \ + /usr/include/boost/regex/config/cwchar.hpp \ + /usr/include/boost/regex/v4/regex_fwd.hpp \ + /usr/include/boost/regex/v4/match_flags.hpp \ + /usr/include/boost/asio/impl/read_until.hpp \ + /usr/include/boost/asio/redirect_error.hpp \ + /usr/include/boost/asio/impl/redirect_error.hpp \ + /usr/include/boost/asio/require_concept.hpp \ + /usr/include/boost/asio/traits/require_concept_member.hpp \ + /usr/include/boost/asio/traits/require_concept_free.hpp \ + /usr/include/boost/asio/traits/static_require_concept.hpp \ + /usr/include/boost/asio/serial_port.hpp \ + /usr/include/boost/asio/signal_set.hpp \ + /usr/include/boost/asio/static_thread_pool.hpp \ + /usr/include/boost/asio/thread_pool.hpp \ + /usr/include/boost/asio/impl/thread_pool.hpp \ + /usr/include/boost/asio/detail/blocking_executor_op.hpp \ + /usr/include/boost/asio/detail/bulk_executor_op.hpp \ + /usr/include/boost/asio/impl/thread_pool.ipp \ + /usr/include/boost/asio/strand.hpp \ + /usr/include/boost/asio/detail/strand_executor_service.hpp \ + /usr/include/boost/asio/detail/impl/strand_executor_service.hpp \ + /usr/include/boost/asio/detail/impl/strand_executor_service.ipp \ + /usr/include/boost/asio/streambuf.hpp \ + /usr/include/boost/asio/system_timer.hpp \ + /usr/include/boost/asio/this_coro.hpp \ + /usr/include/boost/asio/use_awaitable.hpp \ + /usr/include/boost/asio/use_future.hpp \ + /usr/include/boost/asio/impl/use_future.hpp \ + /usr/include/boost/asio/version.hpp \ + /usr/include/boost/asio/windows/basic_object_handle.hpp \ + /usr/include/boost/asio/windows/basic_overlapped_handle.hpp \ + /usr/include/boost/asio/windows/basic_random_access_handle.hpp \ + /usr/include/boost/asio/windows/basic_stream_handle.hpp \ + /usr/include/boost/asio/windows/object_handle.hpp \ + /usr/include/boost/asio/windows/overlapped_handle.hpp \ + /usr/include/boost/asio/windows/overlapped_ptr.hpp \ + /usr/include/boost/asio/windows/random_access_handle.hpp \ + /usr/include/boost/asio/windows/stream_handle.hpp \ + /usr/include/boost/asio/write_at.hpp \ + /usr/include/boost/asio/impl/write_at.hpp \ + include/LibLsp/JsonRpc/RemoteEndPoint.h \ + include/LibLsp/lsp/lsp_diagnostic.h \ + include/LibLsp/lsp/lsRange.h \ + include/LibLsp/JsonRpc/serializer.h \ + include/LibLsp/JsonRpc/macro_map.h \ + /usr/include/boost/optional.hpp \ + /usr/include/boost/optional/optional.hpp \ + /usr/include/boost/core/explicit_operator_bool.hpp \ + /usr/include/boost/core/swap.hpp \ + /usr/include/boost/optional/bad_optional_access.hpp \ + /usr/include/boost/type_traits/alignment_of.hpp \ + /usr/include/boost/type_traits/has_nothrow_constructor.hpp \ + /usr/include/boost/type_traits/is_default_constructible.hpp \ + /usr/include/boost/type_traits/is_complete.hpp \ + /usr/include/boost/type_traits/declval.hpp \ + /usr/include/boost/type_traits/add_rvalue_reference.hpp \ + /usr/include/boost/type_traits/is_void.hpp \ + /usr/include/boost/type_traits/is_reference.hpp \ + /usr/include/boost/type_traits/is_lvalue_reference.hpp \ + /usr/include/boost/type_traits/is_rvalue_reference.hpp \ + /usr/include/boost/type_traits/remove_reference.hpp \ + /usr/include/boost/type_traits/is_function.hpp \ + /usr/include/boost/type_traits/detail/is_function_cxx_11.hpp \ + /usr/include/boost/type_traits/detail/yes_no_type.hpp \ + /usr/include/boost/type_traits/type_with_alignment.hpp \ + /usr/include/boost/type_traits/is_pod.hpp \ + /usr/include/boost/type_traits/is_scalar.hpp \ + /usr/include/boost/type_traits/is_enum.hpp \ + /usr/include/boost/type_traits/is_pointer.hpp \ + /usr/include/boost/type_traits/is_member_pointer.hpp \ + /usr/include/boost/type_traits/is_member_function_pointer.hpp \ + /usr/include/boost/type_traits/detail/is_member_function_pointer_cxx_11.hpp \ + /usr/include/boost/type_traits/remove_const.hpp \ + /usr/include/boost/type_traits/decay.hpp \ + /usr/include/boost/type_traits/is_array.hpp \ + /usr/include/boost/type_traits/remove_bounds.hpp \ + /usr/include/boost/type_traits/remove_extent.hpp \ + /usr/include/boost/type_traits/add_pointer.hpp \ + /usr/include/boost/type_traits/is_const.hpp \ + /usr/include/boost/type_traits/is_constructible.hpp \ + /usr/include/boost/type_traits/is_destructible.hpp \ + /usr/include/boost/type_traits/is_nothrow_move_assignable.hpp \ + /usr/include/boost/type_traits/has_trivial_move_assign.hpp \ + /usr/include/boost/type_traits/is_assignable.hpp \ + /usr/include/boost/type_traits/is_volatile.hpp \ + /usr/include/boost/type_traits/has_nothrow_assign.hpp \ + /usr/include/boost/type_traits/enable_if.hpp \ + /usr/include/boost/type_traits/is_nothrow_move_constructible.hpp \ + /usr/include/boost/move/utility.hpp \ + /usr/include/boost/move/detail/config_begin.hpp \ + /usr/include/boost/move/detail/workaround.hpp \ + /usr/include/boost/move/utility_core.hpp \ + /usr/include/boost/move/core.hpp \ + /usr/include/boost/move/detail/config_end.hpp \ + /usr/include/boost/move/detail/meta_utils.hpp \ + /usr/include/boost/move/detail/meta_utils_core.hpp \ + /usr/include/boost/move/traits.hpp \ + /usr/include/boost/move/detail/type_traits.hpp \ + /usr/include/boost/none.hpp \ + /usr/include/boost/none_t.hpp \ + /usr/include/boost/utility/compare_pointees.hpp \ + /usr/include/boost/utility/result_of.hpp \ + /usr/include/boost/preprocessor/iteration/iterate.hpp \ + /usr/include/boost/preprocessor/slot/slot.hpp \ + /usr/include/boost/preprocessor/slot/detail/def.hpp \ + /usr/include/boost/preprocessor/repetition/enum_binary_params.hpp \ + /usr/include/boost/preprocessor/repetition/enum_shifted_params.hpp \ + /usr/include/boost/preprocessor/facilities/intercept.hpp \ + /usr/include/boost/preprocessor/facilities/limits/intercept_256.hpp \ + /usr/include/boost/type_traits/type_identity.hpp \ + /usr/include/boost/preprocessor/iteration/detail/iter/forward1.hpp \ + /usr/include/boost/preprocessor/iteration/detail/bounds/lower1.hpp \ + /usr/include/boost/preprocessor/slot/detail/shared.hpp \ + /usr/include/boost/preprocessor/iteration/detail/bounds/upper1.hpp \ + /usr/include/boost/preprocessor/iteration/detail/iter/limits/forward1_256.hpp \ + /usr/include/boost/utility/detail/result_of_iterate.hpp \ + /usr/include/boost/optional/optional_fwd.hpp \ + /usr/include/boost/optional/detail/optional_config.hpp \ + /usr/include/boost/optional/detail/optional_factory_support.hpp \ + /usr/include/boost/optional/detail/optional_aligned_storage.hpp \ + /usr/include/boost/optional/detail/optional_trivially_copyable_base.hpp \ + /usr/include/boost/optional/detail/optional_reference_spec.hpp \ + /usr/include/boost/optional/detail/optional_relops.hpp \ + /usr/include/boost/optional/detail/optional_swap.hpp \ + include/LibLsp/lsp/lsPosition.h \ + include/LibLsp/lsp/lsTextEdit.h \ + include/LibLsp/lsp/lsDocumentUri.h \ + include/LibLsp/lsp/lsResponseError.h \ + include/LibLsp/lsp/lsAny.h \ + include/LibLsp/JsonRpc/message.h \ + /usr/include/c++/11/iostream \ + include/LibLsp/lsp/method_type.h \ + include/LibLsp/lsp/location_type.h \ + include/LibLsp/JsonRpc/RequestInMessage.h \ + include/LibLsp/JsonRpc/lsRequestId.h \ + include/LibLsp/JsonRpc/lsResponseMessage.h \ + include/LibLsp/JsonRpc/Cancellation.h \ + include/LibLsp/JsonRpc/NotificationInMessage.h \ + include/LibLsp/JsonRpc/traits.h \ + include/LibLsp/JsonRpc/threaded_queue.h \ + /usr/include/c++/11/deque \ + /usr/include/c++/11/bits/stl_deque.h \ + /usr/include/c++/11/bits/deque.tcc \ + /usr/include/c++/11/unordered_map \ + /usr/include/c++/11/bits/hashtable.h \ + /usr/include/c++/11/bits/hashtable_policy.h \ + /usr/include/c++/11/bits/unordered_map.h \ + include/LibLsp/JsonRpc/MessageIssue.h \ + include/LibLsp/JsonRpc/MessageJsonHandler.h \ + include/LibLsp/JsonRpc/Endpoint.h \ + /usr/include/boost/bind/bind.hpp \ + /usr/include/boost/ref.hpp \ + /usr/include/boost/core/ref.hpp \ + /usr/include/boost/mem_fn.hpp \ + /usr/include/boost/bind/mem_fn.hpp \ + /usr/include/boost/get_pointer.hpp \ + /usr/include/boost/config/no_tr1/memory.hpp \ + /usr/include/boost/bind/mem_fn_template.hpp \ + /usr/include/boost/bind/mem_fn_cc.hpp \ + /usr/include/boost/bind/detail/result_traits.hpp \ + /usr/include/boost/visit_each.hpp \ + /usr/include/boost/core/is_same.hpp \ + /usr/include/boost/bind/storage.hpp \ + /usr/include/boost/bind/bind_cc.hpp \ + /usr/include/boost/bind/bind_mf_cc.hpp \ + /usr/include/boost/bind/bind_mf2_cc.hpp \ + /usr/include/boost/bind/placeholders.hpp \ + include/LibLsp/JsonRpc/stream.h + +CMakeFiles/lspcpp.dir/src/jsonrpc/WebSocketServer.cpp.o: src/jsonrpc/WebSocketServer.cpp \ + /usr/include/stdc-predef.h \ + include/LibLsp/JsonRpc/MessageIssue.h \ + /usr/include/c++/11/string \ + /usr/include/c++/11/x86_64-redhat-linux/bits/c++config.h \ + /usr/include/bits/wordsize.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/os_defines.h \ + /usr/include/features.h \ + /usr/include/sys/cdefs.h \ + /usr/include/bits/long-double.h \ + /usr/include/gnu/stubs.h \ + /usr/include/gnu/stubs-64.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/cpu_defines.h \ + /usr/include/c++/11/bits/stringfwd.h \ + /usr/include/c++/11/bits/memoryfwd.h \ + /usr/include/c++/11/bits/char_traits.h \ + /usr/include/c++/11/bits/stl_algobase.h \ + /usr/include/c++/11/bits/functexcept.h \ + /usr/include/c++/11/bits/exception_defines.h \ + /usr/include/c++/11/bits/cpp_type_traits.h \ + /usr/include/c++/11/ext/type_traits.h \ + /usr/include/c++/11/ext/numeric_traits.h \ + /usr/include/c++/11/bits/stl_pair.h \ + /usr/include/c++/11/bits/move.h \ + /usr/include/c++/11/type_traits \ + /usr/include/c++/11/bits/stl_iterator_base_types.h \ + /usr/include/c++/11/bits/stl_iterator_base_funcs.h \ + /usr/include/c++/11/bits/concept_check.h \ + /usr/include/c++/11/debug/assertions.h \ + /usr/include/c++/11/bits/stl_iterator.h \ + /usr/include/c++/11/bits/ptr_traits.h \ + /usr/include/c++/11/debug/debug.h \ + /usr/include/c++/11/bits/predefined_ops.h \ + /usr/include/c++/11/bits/postypes.h \ + /usr/include/c++/11/cwchar \ + /usr/include/wchar.h \ + /usr/include/bits/libc-header-start.h \ + /usr/include/bits/floatn.h \ + /usr/include/bits/floatn-common.h \ + /usr/lib/gcc/x86_64-redhat-linux/11/include/stddef.h \ + /usr/lib/gcc/x86_64-redhat-linux/11/include/stdarg.h \ + /usr/include/bits/wchar.h \ + /usr/include/bits/types/wint_t.h \ + /usr/include/bits/types/mbstate_t.h \ + /usr/include/bits/types/__mbstate_t.h \ + /usr/include/bits/types/__FILE.h \ + /usr/include/bits/types/FILE.h \ + /usr/include/bits/types/locale_t.h \ + /usr/include/bits/types/__locale_t.h \ + /usr/include/c++/11/cstdint \ + /usr/lib/gcc/x86_64-redhat-linux/11/include/stdint.h \ + /usr/include/stdint.h \ + /usr/include/bits/types.h \ + /usr/include/bits/timesize.h \ + /usr/include/bits/typesizes.h \ + /usr/include/bits/time64.h \ + /usr/include/bits/stdint-intn.h \ + /usr/include/bits/stdint-uintn.h \ + /usr/include/c++/11/bits/allocator.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/c++allocator.h \ + /usr/include/c++/11/ext/new_allocator.h \ + /usr/include/c++/11/new \ + /usr/include/c++/11/bits/exception.h \ + /usr/include/c++/11/bits/localefwd.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/c++locale.h \ + /usr/include/c++/11/clocale \ + /usr/include/locale.h \ + /usr/include/bits/locale.h \ + /usr/include/c++/11/iosfwd \ + /usr/include/c++/11/cctype \ + /usr/include/ctype.h \ + /usr/include/bits/endian.h \ + /usr/include/bits/endianness.h \ + /usr/include/c++/11/bits/ostream_insert.h \ + /usr/include/c++/11/bits/cxxabi_forced.h \ + /usr/include/c++/11/bits/stl_function.h \ + /usr/include/c++/11/backward/binders.h \ + /usr/include/c++/11/bits/range_access.h \ + /usr/include/c++/11/initializer_list \ + /usr/include/c++/11/bits/basic_string.h \ + /usr/include/c++/11/ext/atomicity.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/gthr.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/gthr-default.h \ + /usr/include/pthread.h \ + /usr/include/sched.h \ + /usr/include/bits/types/time_t.h \ + /usr/include/bits/types/struct_timespec.h \ + /usr/include/bits/sched.h \ + /usr/include/bits/types/struct_sched_param.h \ + /usr/include/bits/cpu-set.h \ + /usr/include/time.h \ + /usr/include/bits/time.h \ + /usr/include/bits/timex.h \ + /usr/include/bits/types/struct_timeval.h \ + /usr/include/bits/types/clock_t.h \ + /usr/include/bits/types/struct_tm.h \ + /usr/include/bits/types/clockid_t.h \ + /usr/include/bits/types/timer_t.h \ + /usr/include/bits/types/struct_itimerspec.h \ + /usr/include/bits/pthreadtypes.h \ + /usr/include/bits/thread-shared-types.h \ + /usr/include/bits/pthreadtypes-arch.h \ + /usr/include/bits/struct_mutex.h \ + /usr/include/bits/struct_rwlock.h \ + /usr/include/bits/setjmp.h \ + /usr/include/bits/types/__sigset_t.h \ + /usr/include/bits/types/struct___jmp_buf_tag.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/atomic_word.h \ + /usr/include/sys/single_threaded.h \ + /usr/include/c++/11/ext/alloc_traits.h \ + /usr/include/c++/11/bits/alloc_traits.h \ + /usr/include/c++/11/bits/stl_construct.h \ + /usr/include/c++/11/ext/string_conversions.h \ + /usr/include/c++/11/cstdlib \ + /usr/include/stdlib.h \ + /usr/include/bits/waitflags.h \ + /usr/include/bits/waitstatus.h \ + /usr/include/sys/types.h \ + /usr/include/endian.h \ + /usr/include/bits/byteswap.h \ + /usr/include/bits/uintn-identity.h \ + /usr/include/sys/select.h \ + /usr/include/bits/select.h \ + /usr/include/bits/types/sigset_t.h \ + /usr/include/alloca.h \ + /usr/include/bits/stdlib-bsearch.h \ + /usr/include/bits/stdlib-float.h \ + /usr/include/c++/11/bits/std_abs.h \ + /usr/include/c++/11/cstdio \ + /usr/include/stdio.h \ + /usr/include/bits/types/__fpos_t.h \ + /usr/include/bits/types/__fpos64_t.h \ + /usr/include/bits/types/struct_FILE.h \ + /usr/include/bits/types/cookie_io_functions_t.h \ + /usr/include/bits/stdio_lim.h \ + /usr/include/bits/stdio.h \ + /usr/include/c++/11/cerrno \ + /usr/include/errno.h \ + /usr/include/bits/errno.h \ + /usr/include/linux/errno.h \ + /usr/include/asm/errno.h \ + /usr/include/asm-generic/errno.h \ + /usr/include/asm-generic/errno-base.h \ + /usr/include/bits/types/error_t.h \ + /usr/include/c++/11/bits/charconv.h \ + /usr/include/c++/11/bits/functional_hash.h \ + /usr/include/c++/11/bits/hash_bytes.h \ + /usr/include/c++/11/bits/basic_string.tcc \ + /usr/include/c++/11/functional \ + /usr/include/c++/11/tuple \ + /usr/include/c++/11/utility \ + /usr/include/c++/11/bits/stl_relops.h \ + /usr/include/c++/11/array \ + /usr/include/c++/11/bits/uses_allocator.h \ + /usr/include/c++/11/bits/invoke.h \ + /usr/include/c++/11/bits/refwrap.h \ + /usr/include/c++/11/bits/std_function.h \ + /usr/include/c++/11/typeinfo \ + /usr/include/c++/11/vector \ + /usr/include/c++/11/bits/stl_uninitialized.h \ + /usr/include/c++/11/bits/stl_vector.h \ + /usr/include/c++/11/bits/stl_bvector.h \ + /usr/include/c++/11/bits/vector.tcc \ + include/LibLsp/JsonRpc/WebSocketServer.h \ + /usr/include/boost/asio.hpp \ + /usr/include/boost/asio/associated_allocator.hpp \ + /usr/include/boost/asio/detail/config.hpp \ + /usr/include/boost/config.hpp \ + /usr/include/boost/config/user.hpp \ + /usr/include/boost/config/detail/select_compiler_config.hpp \ + /usr/include/boost/config/compiler/gcc.hpp \ + /usr/include/c++/11/cstddef \ + /usr/include/boost/config/detail/select_stdlib_config.hpp \ + /usr/include/c++/11/version \ + /usr/include/boost/config/stdlib/libstdcpp3.hpp \ + /usr/include/unistd.h \ + /usr/include/bits/posix_opt.h \ + /usr/include/bits/environments.h \ + /usr/include/bits/confname.h \ + /usr/include/bits/getopt_posix.h \ + /usr/include/bits/getopt_core.h \ + /usr/include/bits/unistd_ext.h \ + /usr/include/boost/config/detail/select_platform_config.hpp \ + /usr/include/boost/config/platform/linux.hpp \ + /usr/include/boost/config/detail/posix_features.hpp \ + /usr/include/boost/config/detail/suffix.hpp \ + /usr/include/boost/config/helper_macros.hpp \ + /usr/include/boost/version.hpp \ + /usr/include/linux/version.h \ + /usr/include/c++/11/memory \ + /usr/include/c++/11/bits/stl_tempbuf.h \ + /usr/include/c++/11/bits/stl_raw_storage_iter.h \ + /usr/include/c++/11/bits/align.h \ + /usr/include/c++/11/bit \ + /usr/include/c++/11/bits/unique_ptr.h \ + /usr/include/c++/11/bits/shared_ptr.h \ + /usr/include/c++/11/bits/shared_ptr_base.h \ + /usr/include/c++/11/bits/allocated_ptr.h \ + /usr/include/c++/11/ext/aligned_buffer.h \ + /usr/include/c++/11/ext/concurrence.h \ + /usr/include/c++/11/exception \ + /usr/include/c++/11/bits/exception_ptr.h \ + /usr/include/c++/11/bits/cxxabi_init_exception.h \ + /usr/include/c++/11/bits/nested_exception.h \ + /usr/include/c++/11/bits/shared_ptr_atomic.h \ + /usr/include/c++/11/bits/atomic_base.h \ + /usr/include/c++/11/bits/atomic_lockfree_defines.h \ + /usr/include/c++/11/backward/auto_ptr.h \ + /usr/include/boost/asio/detail/type_traits.hpp \ + /usr/include/boost/asio/detail/push_options.hpp \ + /usr/include/boost/asio/detail/pop_options.hpp \ + /usr/include/boost/asio/associated_executor.hpp \ + /usr/include/boost/asio/execution/executor.hpp \ + /usr/include/boost/asio/execution/execute.hpp \ + /usr/include/boost/asio/execution/detail/as_invocable.hpp \ + /usr/include/boost/asio/detail/atomic_count.hpp \ + /usr/include/c++/11/atomic \ + /usr/include/boost/asio/detail/memory.hpp \ + /usr/include/boost/asio/execution/receiver_invocation_error.hpp \ + /usr/include/c++/11/stdexcept \ + /usr/include/boost/asio/execution/impl/receiver_invocation_error.ipp \ + /usr/include/boost/asio/execution/set_done.hpp \ + /usr/include/boost/asio/traits/set_done_member.hpp \ + /usr/include/boost/asio/traits/set_done_free.hpp \ + /usr/include/boost/asio/execution/set_error.hpp \ + /usr/include/boost/asio/traits/set_error_member.hpp \ + /usr/include/boost/asio/traits/set_error_free.hpp \ + /usr/include/boost/asio/execution/set_value.hpp \ + /usr/include/boost/asio/detail/variadic_templates.hpp \ + /usr/include/boost/asio/traits/set_value_member.hpp \ + /usr/include/boost/asio/traits/set_value_free.hpp \ + /usr/include/boost/asio/execution/detail/as_receiver.hpp \ + /usr/include/boost/asio/traits/execute_member.hpp \ + /usr/include/boost/asio/traits/execute_free.hpp \ + /usr/include/boost/asio/execution/invocable_archetype.hpp \ + /usr/include/boost/asio/traits/equality_comparable.hpp \ + /usr/include/boost/asio/is_executor.hpp \ + /usr/include/boost/asio/detail/is_executor.hpp \ + /usr/include/boost/asio/system_executor.hpp \ + /usr/include/boost/asio/execution.hpp \ + /usr/include/boost/asio/execution/allocator.hpp \ + /usr/include/boost/asio/execution/scheduler.hpp \ + /usr/include/boost/asio/execution/schedule.hpp \ + /usr/include/boost/asio/traits/schedule_member.hpp \ + /usr/include/boost/asio/traits/schedule_free.hpp \ + /usr/include/boost/asio/execution/sender.hpp \ + /usr/include/boost/asio/execution/detail/void_receiver.hpp \ + /usr/include/boost/asio/execution/receiver.hpp \ + /usr/include/boost/asio/execution/connect.hpp \ + /usr/include/boost/asio/execution/detail/as_operation.hpp \ + /usr/include/boost/asio/traits/start_member.hpp \ + /usr/include/boost/asio/execution/operation_state.hpp \ + /usr/include/boost/asio/execution/start.hpp \ + /usr/include/boost/asio/traits/start_free.hpp \ + /usr/include/boost/asio/traits/connect_member.hpp \ + /usr/include/boost/asio/traits/connect_free.hpp \ + /usr/include/boost/asio/is_applicable_property.hpp \ + /usr/include/boost/asio/traits/query_static_constexpr_member.hpp \ + /usr/include/boost/asio/traits/static_query.hpp \ + /usr/include/boost/asio/execution/any_executor.hpp \ + /usr/include/boost/asio/detail/assert.hpp \ + /usr/include/boost/assert.hpp \ + /usr/include/assert.h \ + /usr/include/boost/asio/detail/cstddef.hpp \ + /usr/include/boost/asio/detail/executor_function.hpp \ + /usr/include/boost/asio/detail/handler_alloc_helpers.hpp \ + /usr/include/boost/asio/detail/noncopyable.hpp \ + /usr/include/boost/asio/detail/recycling_allocator.hpp \ + /usr/include/boost/asio/detail/thread_context.hpp \ + /usr/include/c++/11/climits \ + /usr/lib/gcc/x86_64-redhat-linux/11/include/limits.h \ + /usr/lib/gcc/x86_64-redhat-linux/11/include/syslimits.h \ + /usr/include/limits.h \ + /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h \ + /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h \ + /usr/include/bits/xopen_lim.h \ + /usr/include/bits/uio_lim.h \ + /usr/include/boost/asio/detail/call_stack.hpp \ + /usr/include/boost/asio/detail/tss_ptr.hpp \ + /usr/include/boost/asio/detail/keyword_tss_ptr.hpp \ + /usr/include/boost/asio/detail/thread_info_base.hpp \ + /usr/include/boost/asio/multiple_exceptions.hpp \ + /usr/include/boost/asio/impl/multiple_exceptions.ipp \ + /usr/include/boost/asio/handler_alloc_hook.hpp \ + /usr/include/boost/asio/impl/handler_alloc_hook.ipp \ + /usr/include/boost/asio/detail/handler_invoke_helpers.hpp \ + /usr/include/boost/asio/handler_invoke_hook.hpp \ + /usr/include/boost/asio/detail/non_const_lvalue.hpp \ + /usr/include/boost/asio/detail/scoped_ptr.hpp \ + /usr/include/boost/asio/detail/throw_exception.hpp \ + /usr/include/boost/throw_exception.hpp \ + /usr/include/boost/assert/source_location.hpp \ + /usr/include/boost/current_function.hpp \ + /usr/include/boost/cstdint.hpp \ + /usr/include/boost/config/workaround.hpp \ + /usr/include/boost/exception/exception.hpp \ + /usr/include/boost/asio/execution/bad_executor.hpp \ + /usr/include/boost/asio/execution/impl/bad_executor.ipp \ + /usr/include/boost/asio/execution/blocking.hpp \ + /usr/include/boost/asio/prefer.hpp \ + /usr/include/boost/asio/traits/prefer_free.hpp \ + /usr/include/boost/asio/traits/prefer_member.hpp \ + /usr/include/boost/asio/traits/require_free.hpp \ + /usr/include/boost/asio/traits/require_member.hpp \ + /usr/include/boost/asio/traits/static_require.hpp \ + /usr/include/boost/asio/query.hpp \ + /usr/include/boost/asio/traits/query_member.hpp \ + /usr/include/boost/asio/traits/query_free.hpp \ + /usr/include/boost/asio/require.hpp \ + /usr/include/boost/asio/execution/blocking_adaptation.hpp \ + /usr/include/boost/asio/detail/event.hpp \ + /usr/include/boost/asio/detail/posix_event.hpp \ + /usr/include/boost/asio/detail/impl/posix_event.ipp \ + /usr/include/boost/asio/detail/throw_error.hpp \ + /usr/include/boost/system/error_code.hpp \ + /usr/include/boost/system/detail/error_code.hpp \ + /usr/include/boost/system/detail/error_category.hpp \ + /usr/include/boost/system/detail/config.hpp \ + /usr/include/c++/11/system_error \ + /usr/include/c++/11/x86_64-redhat-linux/bits/error_constants.h \ + /usr/include/boost/system/detail/error_condition.hpp \ + /usr/include/boost/system/detail/generic_category.hpp \ + /usr/include/boost/system/detail/generic_category_message.hpp \ + /usr/include/c++/11/cstring \ + /usr/include/string.h \ + /usr/include/strings.h \ + /usr/include/boost/system/detail/enable_if.hpp \ + /usr/include/boost/system/is_error_condition_enum.hpp \ + /usr/include/boost/system/detail/system_category.hpp \ + /usr/include/boost/system/is_error_code_enum.hpp \ + /usr/include/c++/11/ostream \ + /usr/include/c++/11/ios \ + /usr/include/c++/11/bits/ios_base.h \ + /usr/include/c++/11/bits/locale_classes.h \ + /usr/include/c++/11/bits/locale_classes.tcc \ + /usr/include/c++/11/streambuf \ + /usr/include/c++/11/bits/streambuf.tcc \ + /usr/include/c++/11/bits/basic_ios.h \ + /usr/include/c++/11/bits/locale_facets.h \ + /usr/include/c++/11/cwctype \ + /usr/include/wctype.h \ + /usr/include/bits/wctype-wchar.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/ctype_base.h \ + /usr/include/c++/11/bits/streambuf_iterator.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/ctype_inline.h \ + /usr/include/c++/11/bits/locale_facets.tcc \ + /usr/include/c++/11/bits/basic_ios.tcc \ + /usr/include/c++/11/bits/ostream.tcc \ + /usr/include/boost/system/error_category.hpp \ + /usr/include/boost/system/detail/error_category_impl.hpp \ + /usr/include/boost/system/detail/to_std_category.hpp \ + /usr/include/c++/11/map \ + /usr/include/c++/11/bits/stl_tree.h \ + /usr/include/c++/11/bits/stl_map.h \ + /usr/include/c++/11/bits/stl_multimap.h \ + /usr/include/c++/11/bits/erase_if.h \ + /usr/include/c++/11/mutex \ + /usr/include/c++/11/chrono \ + /usr/include/c++/11/ratio \ + /usr/include/c++/11/limits \ + /usr/include/c++/11/ctime \ + /usr/include/c++/11/bits/parse_numbers.h \ + /usr/include/c++/11/bits/std_mutex.h \ + /usr/include/c++/11/bits/unique_lock.h \ + /usr/include/boost/system/error_condition.hpp \ + /usr/include/boost/system/errc.hpp \ + /usr/include/boost/system/detail/errc.hpp \ + /usr/include/boost/system/detail/cerrno.hpp \ + /usr/include/boost/system/generic_category.hpp \ + /usr/include/boost/system/system_category.hpp \ + /usr/include/boost/system/detail/system_category_impl.hpp \ + /usr/include/boost/system/api_config.hpp \ + /usr/include/boost/system/detail/is_generic_value.hpp \ + /usr/include/boost/system/detail/throws.hpp \ + /usr/include/boost/asio/detail/impl/throw_error.ipp \ + /usr/include/boost/system/system_error.hpp \ + /usr/include/c++/11/cassert \ + /usr/include/boost/asio/error.hpp \ + /usr/include/boost/cerrno.hpp \ + /usr/include/netdb.h \ + /usr/include/netinet/in.h \ + /usr/include/sys/socket.h \ + /usr/include/bits/types/struct_iovec.h \ + /usr/include/bits/socket.h \ + /usr/include/bits/socket_type.h \ + /usr/include/bits/sockaddr.h \ + /usr/include/asm/socket.h \ + /usr/include/asm-generic/socket.h \ + /usr/include/linux/posix_types.h \ + /usr/include/linux/stddef.h \ + /usr/include/asm/posix_types.h \ + /usr/include/asm/posix_types_64.h \ + /usr/include/asm-generic/posix_types.h \ + /usr/include/asm/bitsperlong.h \ + /usr/include/asm-generic/bitsperlong.h \ + /usr/include/asm/sockios.h \ + /usr/include/asm-generic/sockios.h \ + /usr/include/bits/types/struct_osockaddr.h \ + /usr/include/bits/in.h \ + /usr/include/rpc/netdb.h \ + /usr/include/bits/types/sigevent_t.h \ + /usr/include/bits/types/__sigval_t.h \ + /usr/include/bits/netdb.h \ + /usr/include/boost/asio/impl/error.ipp \ + /usr/include/boost/asio/detail/mutex.hpp \ + /usr/include/boost/asio/detail/posix_mutex.hpp \ + /usr/include/boost/asio/detail/scoped_lock.hpp \ + /usr/include/boost/asio/detail/impl/posix_mutex.ipp \ + /usr/include/boost/asio/execution/bulk_execute.hpp \ + /usr/include/boost/asio/execution/bulk_guarantee.hpp \ + /usr/include/boost/asio/execution/detail/bulk_sender.hpp \ + /usr/include/boost/asio/traits/bulk_execute_member.hpp \ + /usr/include/boost/asio/traits/bulk_execute_free.hpp \ + /usr/include/boost/asio/execution/context.hpp \ + /usr/include/boost/asio/execution/context_as.hpp \ + /usr/include/boost/asio/execution/mapping.hpp \ + /usr/include/boost/asio/execution/occupancy.hpp \ + /usr/include/boost/asio/execution/outstanding_work.hpp \ + /usr/include/boost/asio/execution/prefer_only.hpp \ + /usr/include/boost/asio/execution/relationship.hpp \ + /usr/include/boost/asio/execution/submit.hpp \ + /usr/include/boost/asio/execution/detail/submit_receiver.hpp \ + /usr/include/boost/asio/traits/submit_member.hpp \ + /usr/include/boost/asio/traits/submit_free.hpp \ + /usr/include/boost/asio/impl/system_executor.hpp \ + /usr/include/boost/asio/detail/executor_op.hpp \ + /usr/include/boost/asio/detail/fenced_block.hpp \ + /usr/include/boost/asio/detail/std_fenced_block.hpp \ + /usr/include/boost/asio/detail/scheduler_operation.hpp \ + /usr/include/boost/asio/detail/handler_tracking.hpp \ + /usr/include/boost/asio/detail/impl/handler_tracking.ipp \ + /usr/include/boost/asio/detail/op_queue.hpp \ + /usr/include/boost/asio/detail/global.hpp \ + /usr/include/boost/asio/detail/posix_global.hpp \ + /usr/include/boost/asio/system_context.hpp \ + /usr/include/boost/asio/detail/scheduler.hpp \ + /usr/include/boost/asio/execution_context.hpp \ + /usr/include/boost/asio/impl/execution_context.hpp \ + /usr/include/boost/asio/detail/handler_type_requirements.hpp \ + /usr/include/boost/asio/async_result.hpp \ + /usr/include/boost/asio/detail/service_registry.hpp \ + /usr/include/boost/asio/detail/impl/service_registry.hpp \ + /usr/include/boost/asio/detail/impl/service_registry.ipp \ + /usr/include/boost/asio/impl/execution_context.ipp \ + /usr/include/boost/asio/detail/conditionally_enabled_event.hpp \ + /usr/include/boost/asio/detail/conditionally_enabled_mutex.hpp \ + /usr/include/boost/asio/detail/null_event.hpp \ + /usr/include/boost/asio/detail/impl/null_event.ipp \ + /usr/include/boost/asio/detail/reactor_fwd.hpp \ + /usr/include/boost/asio/detail/thread.hpp \ + /usr/include/boost/asio/detail/posix_thread.hpp \ + /usr/include/boost/asio/detail/impl/posix_thread.ipp \ + /usr/include/boost/asio/detail/impl/scheduler.ipp \ + /usr/include/boost/asio/detail/concurrency_hint.hpp \ + /usr/include/boost/asio/detail/limits.hpp \ + /usr/include/boost/limits.hpp \ + /usr/include/boost/asio/detail/reactor.hpp \ + /usr/include/boost/asio/detail/epoll_reactor.hpp \ + /usr/include/boost/asio/detail/object_pool.hpp \ + /usr/include/boost/asio/detail/reactor_op.hpp \ + /usr/include/boost/asio/detail/operation.hpp \ + /usr/include/boost/asio/detail/select_interrupter.hpp \ + /usr/include/boost/asio/detail/eventfd_select_interrupter.hpp \ + /usr/include/boost/asio/detail/impl/eventfd_select_interrupter.ipp \ + /usr/include/sys/stat.h \ + /usr/include/bits/stat.h \ + /usr/include/bits/struct_stat.h \ + /usr/include/bits/statx.h \ + /usr/include/linux/stat.h \ + /usr/include/linux/types.h \ + /usr/include/asm/types.h \ + /usr/include/asm-generic/types.h \ + /usr/include/asm-generic/int-ll64.h \ + /usr/include/bits/statx-generic.h \ + /usr/include/bits/types/struct_statx_timestamp.h \ + /usr/include/bits/types/struct_statx.h \ + /usr/include/fcntl.h \ + /usr/include/bits/fcntl.h \ + /usr/include/bits/fcntl-linux.h \ + /usr/include/linux/falloc.h \ + /usr/include/sys/eventfd.h \ + /usr/include/bits/eventfd.h \ + /usr/include/boost/asio/detail/cstdint.hpp \ + /usr/include/boost/asio/detail/socket_types.hpp \ + /usr/include/sys/ioctl.h \ + /usr/include/bits/ioctls.h \ + /usr/include/asm/ioctls.h \ + /usr/include/asm-generic/ioctls.h \ + /usr/include/linux/ioctl.h \ + /usr/include/asm/ioctl.h \ + /usr/include/asm-generic/ioctl.h \ + /usr/include/bits/ioctl-types.h \ + /usr/include/sys/ttydefaults.h \ + /usr/include/poll.h \ + /usr/include/sys/poll.h \ + /usr/include/bits/poll.h \ + /usr/include/sys/uio.h \ + /usr/include/bits/uio-ext.h \ + /usr/include/sys/un.h \ + /usr/include/netinet/tcp.h \ + /usr/include/arpa/inet.h \ + /usr/include/net/if.h \ + /usr/include/boost/asio/detail/timer_queue_base.hpp \ + /usr/include/boost/asio/detail/timer_queue_set.hpp \ + /usr/include/boost/asio/detail/impl/timer_queue_set.ipp \ + /usr/include/boost/asio/detail/wait_op.hpp \ + /usr/include/sys/timerfd.h \ + /usr/include/bits/timerfd.h \ + /usr/include/boost/asio/detail/impl/epoll_reactor.hpp \ + /usr/include/boost/asio/detail/impl/epoll_reactor.ipp \ + /usr/include/sys/epoll.h \ + /usr/include/bits/epoll.h \ + /usr/include/boost/asio/detail/scheduler_thread_info.hpp \ + /usr/include/boost/asio/detail/signal_blocker.hpp \ + /usr/include/boost/asio/detail/posix_signal_blocker.hpp \ + /usr/include/c++/11/csignal \ + /usr/include/signal.h \ + /usr/include/bits/signum-generic.h \ + /usr/include/bits/signum-arch.h \ + /usr/include/bits/types/sig_atomic_t.h \ + /usr/include/bits/types/siginfo_t.h \ + /usr/include/bits/siginfo-arch.h \ + /usr/include/bits/siginfo-consts.h \ + /usr/include/bits/siginfo-consts-arch.h \ + /usr/include/bits/types/sigval_t.h \ + /usr/include/bits/sigevent-consts.h \ + /usr/include/bits/sigaction.h \ + /usr/include/bits/sigcontext.h \ + /usr/include/bits/types/stack_t.h \ + /usr/include/sys/ucontext.h \ + /usr/include/bits/sigstack.h \ + /usr/include/bits/ss_flags.h \ + /usr/include/bits/types/struct_sigstack.h \ + /usr/include/bits/sigthread.h \ + /usr/include/bits/signal_ext.h \ + /usr/include/boost/asio/detail/thread_group.hpp \ + /usr/include/boost/asio/impl/system_context.hpp \ + /usr/include/boost/asio/impl/system_context.ipp \ + /usr/include/boost/asio/awaitable.hpp \ + /usr/include/boost/asio/basic_datagram_socket.hpp \ + /usr/include/boost/asio/basic_socket.hpp \ + /usr/include/boost/asio/any_io_executor.hpp \ + /usr/include/boost/asio/detail/io_object_impl.hpp \ + /usr/include/boost/asio/io_context.hpp \ + /usr/include/boost/asio/detail/wrapped_handler.hpp \ + /usr/include/boost/asio/detail/bind_handler.hpp \ + /usr/include/boost/asio/detail/handler_cont_helpers.hpp \ + /usr/include/boost/asio/handler_continuation_hook.hpp \ + /usr/include/boost/asio/detail/chrono.hpp \ + /usr/include/boost/asio/impl/io_context.hpp \ + /usr/include/boost/asio/detail/completion_handler.hpp \ + /usr/include/boost/asio/detail/handler_work.hpp \ + /usr/include/boost/asio/executor_work_guard.hpp \ + /usr/include/boost/asio/impl/io_context.ipp \ + /usr/include/boost/asio/post.hpp \ + /usr/include/boost/asio/impl/post.hpp \ + /usr/include/boost/asio/detail/work_dispatcher.hpp \ + /usr/include/boost/asio/socket_base.hpp \ + /usr/include/boost/asio/detail/io_control.hpp \ + /usr/include/boost/asio/detail/socket_option.hpp \ + /usr/include/boost/asio/detail/reactive_socket_service.hpp \ + /usr/include/boost/asio/buffer.hpp \ + /usr/include/boost/asio/detail/array_fwd.hpp \ + /usr/include/boost/asio/detail/string_view.hpp \ + /usr/include/c++/11/experimental/string_view \ + /usr/include/c++/11/bits/ranges_base.h \ + /usr/include/c++/11/experimental/bits/lfts_config.h \ + /usr/include/c++/11/experimental/bits/string_view.tcc \ + /usr/include/boost/detail/workaround.hpp \ + /usr/include/boost/asio/detail/is_buffer_sequence.hpp \ + /usr/include/boost/asio/detail/buffer_sequence_adapter.hpp \ + /usr/include/boost/asio/detail/impl/buffer_sequence_adapter.ipp \ + /usr/include/boost/asio/detail/reactive_null_buffers_op.hpp \ + /usr/include/boost/asio/detail/reactive_socket_accept_op.hpp \ + /usr/include/boost/asio/detail/socket_holder.hpp \ + /usr/include/boost/asio/detail/socket_ops.hpp \ + /usr/include/boost/asio/detail/impl/socket_ops.ipp \ + /usr/include/boost/asio/detail/reactive_socket_connect_op.hpp \ + /usr/include/boost/asio/detail/reactive_socket_recvfrom_op.hpp \ + /usr/include/boost/asio/detail/reactive_socket_sendto_op.hpp \ + /usr/include/boost/asio/detail/reactive_socket_service_base.hpp \ + /usr/include/boost/asio/detail/reactive_socket_recv_op.hpp \ + /usr/include/boost/asio/detail/reactive_socket_recvmsg_op.hpp \ + /usr/include/boost/asio/detail/reactive_socket_send_op.hpp \ + /usr/include/boost/asio/detail/reactive_wait_op.hpp \ + /usr/include/boost/asio/detail/impl/reactive_socket_service_base.ipp \ + /usr/include/boost/asio/basic_deadline_timer.hpp \ + /usr/include/boost/asio/detail/deadline_timer_service.hpp \ + /usr/include/boost/asio/detail/timer_queue.hpp \ + /usr/include/boost/asio/detail/date_time_fwd.hpp \ + /usr/include/boost/asio/detail/timer_queue_ptime.hpp \ + /usr/include/boost/asio/time_traits.hpp \ + /usr/include/boost/date_time/posix_time/posix_time_types.hpp \ + /usr/include/boost/date_time/time_clock.hpp \ + /usr/include/boost/date_time/c_time.hpp \ + /usr/include/boost/date_time/compiler_config.hpp \ + /usr/include/boost/date_time/locale_config.hpp \ + /usr/include/boost/config/auto_link.hpp \ + /usr/include/sys/time.h \ + /usr/include/boost/shared_ptr.hpp \ + /usr/include/boost/smart_ptr/shared_ptr.hpp \ + /usr/include/boost/smart_ptr/detail/shared_count.hpp \ + /usr/include/boost/smart_ptr/bad_weak_ptr.hpp \ + /usr/include/boost/smart_ptr/detail/sp_counted_base.hpp \ + /usr/include/boost/smart_ptr/detail/sp_has_gcc_intrinsics.hpp \ + /usr/include/boost/smart_ptr/detail/sp_has_sync_intrinsics.hpp \ + /usr/include/boost/smart_ptr/detail/sp_counted_base_gcc_atomic.hpp \ + /usr/include/boost/smart_ptr/detail/sp_typeinfo_.hpp \ + /usr/include/boost/smart_ptr/detail/sp_counted_impl.hpp \ + /usr/include/boost/smart_ptr/detail/sp_noexcept.hpp \ + /usr/include/boost/checked_delete.hpp \ + /usr/include/boost/core/checked_delete.hpp \ + /usr/include/boost/core/addressof.hpp \ + /usr/include/boost/smart_ptr/detail/sp_disable_deprecated.hpp \ + /usr/include/boost/smart_ptr/detail/sp_convertible.hpp \ + /usr/include/boost/smart_ptr/detail/sp_nullptr_t.hpp \ + /usr/include/boost/smart_ptr/detail/spinlock_pool.hpp \ + /usr/include/boost/smart_ptr/detail/spinlock.hpp \ + /usr/include/boost/smart_ptr/detail/spinlock_gcc_atomic.hpp \ + /usr/include/boost/smart_ptr/detail/yield_k.hpp \ + /usr/include/boost/smart_ptr/detail/sp_thread_pause.hpp \ + /usr/include/boost/smart_ptr/detail/sp_thread_sleep.hpp \ + /usr/include/boost/config/pragma_message.hpp \ + /usr/include/c++/11/algorithm \ + /usr/include/c++/11/bits/stl_algo.h \ + /usr/include/c++/11/bits/algorithmfwd.h \ + /usr/include/c++/11/bits/stl_heap.h \ + /usr/include/c++/11/bits/uniform_int_dist.h \ + /usr/include/boost/smart_ptr/detail/operator_bool.hpp \ + /usr/include/boost/smart_ptr/detail/local_sp_deleter.hpp \ + /usr/include/boost/smart_ptr/detail/local_counted_base.hpp \ + /usr/include/boost/date_time/microsec_time_clock.hpp \ + /usr/include/boost/date_time/posix_time/ptime.hpp \ + /usr/include/boost/date_time/posix_time/posix_time_system.hpp \ + /usr/include/boost/date_time/posix_time/posix_time_config.hpp \ + /usr/include/boost/config/no_tr1/cmath.hpp \ + /usr/include/c++/11/cmath \ + /usr/include/math.h \ + /usr/include/bits/math-vector.h \ + /usr/include/bits/libm-simd-decl-stubs.h \ + /usr/include/bits/flt-eval-method.h \ + /usr/include/bits/fp-logb.h \ + /usr/include/bits/fp-fast.h \ + /usr/include/bits/mathcalls-helper-functions.h \ + /usr/include/bits/mathcalls.h \ + /usr/include/bits/mathcalls-narrow.h \ + /usr/include/bits/iscanonical.h \ + /usr/include/boost/date_time/time_duration.hpp \ + /usr/include/boost/core/enable_if.hpp \ + /usr/include/boost/date_time/special_defs.hpp \ + /usr/include/boost/date_time/time_defs.hpp \ + /usr/include/boost/operators.hpp \ + /usr/include/c++/11/iterator \ + /usr/include/c++/11/bits/stream_iterator.h \ + /usr/include/boost/static_assert.hpp \ + /usr/include/boost/type_traits/is_integral.hpp \ + /usr/include/boost/type_traits/integral_constant.hpp \ + /usr/include/boost/date_time/time_resolution_traits.hpp \ + /usr/include/boost/date_time/int_adapter.hpp \ + /usr/include/boost/date_time/gregorian/gregorian_types.hpp \ + /usr/include/boost/date_time/date.hpp \ + /usr/include/boost/date_time/year_month_day.hpp \ + /usr/include/boost/date_time/period.hpp \ + /usr/include/boost/date_time/gregorian/greg_calendar.hpp \ + /usr/include/boost/date_time/gregorian/greg_weekday.hpp \ + /usr/include/boost/date_time/constrained_value.hpp \ + /usr/include/boost/type_traits/conditional.hpp \ + /usr/include/boost/type_traits/is_base_of.hpp \ + /usr/include/boost/type_traits/is_base_and_derived.hpp \ + /usr/include/boost/type_traits/intrinsics.hpp \ + /usr/include/boost/type_traits/detail/config.hpp \ + /usr/include/boost/type_traits/remove_cv.hpp \ + /usr/include/boost/type_traits/is_same.hpp \ + /usr/include/boost/type_traits/is_class.hpp \ + /usr/include/boost/date_time/date_defs.hpp \ + /usr/include/boost/date_time/gregorian/greg_day_of_year.hpp \ + /usr/include/boost/date_time/gregorian_calendar.hpp \ + /usr/include/boost/date_time/gregorian_calendar.ipp \ + /usr/include/boost/date_time/gregorian/greg_ymd.hpp \ + /usr/include/boost/date_time/gregorian/greg_day.hpp \ + /usr/include/boost/date_time/gregorian/greg_year.hpp \ + /usr/include/boost/date_time/gregorian/greg_month.hpp \ + /usr/include/boost/date_time/gregorian/greg_duration.hpp \ + /usr/include/boost/date_time/date_duration.hpp \ + /usr/include/boost/date_time/date_duration_types.hpp \ + /usr/include/boost/date_time/gregorian/greg_duration_types.hpp \ + /usr/include/boost/date_time/gregorian/greg_date.hpp \ + /usr/include/boost/date_time/adjust_functors.hpp \ + /usr/include/boost/date_time/wrapping_int.hpp \ + /usr/include/boost/date_time/date_generators.hpp \ + /usr/include/c++/11/sstream \ + /usr/include/c++/11/istream \ + /usr/include/c++/11/bits/istream.tcc \ + /usr/include/c++/11/bits/sstream.tcc \ + /usr/include/boost/date_time/date_clock_device.hpp \ + /usr/include/boost/date_time/date_iterator.hpp \ + /usr/include/boost/date_time/time_system_split.hpp \ + /usr/include/boost/date_time/time_system_counted.hpp \ + /usr/include/boost/date_time/time.hpp \ + /usr/include/boost/date_time/posix_time/date_duration_operators.hpp \ + /usr/include/boost/date_time/posix_time/posix_time_duration.hpp \ + /usr/include/boost/numeric/conversion/cast.hpp \ + /usr/include/boost/type.hpp \ + /usr/include/boost/numeric/conversion/converter.hpp \ + /usr/include/boost/numeric/conversion/conversion_traits.hpp \ + /usr/include/boost/numeric/conversion/detail/conversion_traits.hpp \ + /usr/include/boost/type_traits/is_arithmetic.hpp \ + /usr/include/boost/type_traits/is_floating_point.hpp \ + /usr/include/boost/numeric/conversion/detail/meta.hpp \ + /usr/include/boost/mpl/if.hpp \ + /usr/include/boost/mpl/aux_/value_wknd.hpp \ + /usr/include/boost/mpl/aux_/static_cast.hpp \ + /usr/include/boost/mpl/aux_/config/workaround.hpp \ + /usr/include/boost/mpl/aux_/config/integral.hpp \ + /usr/include/boost/mpl/aux_/config/msvc.hpp \ + /usr/include/boost/mpl/aux_/config/eti.hpp \ + /usr/include/boost/mpl/aux_/na_spec.hpp \ + /usr/include/boost/mpl/lambda_fwd.hpp \ + /usr/include/boost/mpl/void_fwd.hpp \ + /usr/include/boost/mpl/aux_/adl_barrier.hpp \ + /usr/include/boost/mpl/aux_/config/adl.hpp \ + /usr/include/boost/mpl/aux_/config/intel.hpp \ + /usr/include/boost/mpl/aux_/config/gcc.hpp \ + /usr/include/boost/mpl/aux_/na.hpp \ + /usr/include/boost/mpl/bool.hpp \ + /usr/include/boost/mpl/bool_fwd.hpp \ + /usr/include/boost/mpl/integral_c_tag.hpp \ + /usr/include/boost/mpl/aux_/config/static_constant.hpp \ + /usr/include/boost/mpl/aux_/na_fwd.hpp \ + /usr/include/boost/mpl/aux_/config/ctps.hpp \ + /usr/include/boost/mpl/aux_/config/lambda.hpp \ + /usr/include/boost/mpl/aux_/config/ttp.hpp \ + /usr/include/boost/mpl/int.hpp \ + /usr/include/boost/mpl/int_fwd.hpp \ + /usr/include/boost/mpl/aux_/nttp_decl.hpp \ + /usr/include/boost/mpl/aux_/config/nttp.hpp \ + /usr/include/boost/mpl/aux_/integral_wrapper.hpp \ + /usr/include/boost/preprocessor/cat.hpp \ + /usr/include/boost/preprocessor/config/config.hpp \ + /usr/include/boost/mpl/aux_/lambda_arity_param.hpp \ + /usr/include/boost/mpl/aux_/template_arity_fwd.hpp \ + /usr/include/boost/mpl/aux_/arity.hpp \ + /usr/include/boost/mpl/aux_/config/dtp.hpp \ + /usr/include/boost/mpl/aux_/preprocessor/params.hpp \ + /usr/include/boost/mpl/aux_/config/preprocessor.hpp \ + /usr/include/boost/preprocessor/comma_if.hpp \ + /usr/include/boost/preprocessor/punctuation/comma_if.hpp \ + /usr/include/boost/preprocessor/control/if.hpp \ + /usr/include/boost/preprocessor/control/iif.hpp \ + /usr/include/boost/preprocessor/logical/bool.hpp \ + /usr/include/boost/preprocessor/config/limits.hpp \ + /usr/include/boost/preprocessor/logical/limits/bool_256.hpp \ + /usr/include/boost/preprocessor/facilities/empty.hpp \ + /usr/include/boost/preprocessor/punctuation/comma.hpp \ + /usr/include/boost/preprocessor/repeat.hpp \ + /usr/include/boost/preprocessor/repetition/repeat.hpp \ + /usr/include/boost/preprocessor/debug/error.hpp \ + /usr/include/boost/preprocessor/detail/auto_rec.hpp \ + /usr/include/boost/preprocessor/detail/limits/auto_rec_256.hpp \ + /usr/include/boost/preprocessor/tuple/eat.hpp \ + /usr/include/boost/preprocessor/repetition/limits/repeat_256.hpp \ + /usr/include/boost/preprocessor/inc.hpp \ + /usr/include/boost/preprocessor/arithmetic/inc.hpp \ + /usr/include/boost/preprocessor/arithmetic/limits/inc_256.hpp \ + /usr/include/boost/mpl/aux_/preprocessor/enum.hpp \ + /usr/include/boost/mpl/aux_/preprocessor/def_params_tail.hpp \ + /usr/include/boost/mpl/limits/arity.hpp \ + /usr/include/boost/preprocessor/logical/and.hpp \ + /usr/include/boost/preprocessor/logical/bitand.hpp \ + /usr/include/boost/preprocessor/identity.hpp \ + /usr/include/boost/preprocessor/facilities/identity.hpp \ + /usr/include/boost/preprocessor/empty.hpp \ + /usr/include/boost/preprocessor/arithmetic/add.hpp \ + /usr/include/boost/preprocessor/arithmetic/dec.hpp \ + /usr/include/boost/preprocessor/arithmetic/limits/dec_256.hpp \ + /usr/include/boost/preprocessor/control/while.hpp \ + /usr/include/boost/preprocessor/list/fold_left.hpp \ + /usr/include/boost/preprocessor/list/detail/fold_left.hpp \ + /usr/include/boost/preprocessor/control/expr_iif.hpp \ + /usr/include/boost/preprocessor/list/adt.hpp \ + /usr/include/boost/preprocessor/detail/is_binary.hpp \ + /usr/include/boost/preprocessor/detail/check.hpp \ + /usr/include/boost/preprocessor/logical/compl.hpp \ + /usr/include/boost/preprocessor/list/detail/limits/fold_left_256.hpp \ + /usr/include/boost/preprocessor/list/limits/fold_left_256.hpp \ + /usr/include/boost/preprocessor/list/fold_right.hpp \ + /usr/include/boost/preprocessor/list/detail/fold_right.hpp \ + /usr/include/boost/preprocessor/list/reverse.hpp \ + /usr/include/boost/preprocessor/list/detail/limits/fold_right_256.hpp \ + /usr/include/boost/preprocessor/control/detail/while.hpp \ + /usr/include/boost/preprocessor/control/detail/limits/while_256.hpp \ + /usr/include/boost/preprocessor/control/limits/while_256.hpp \ + /usr/include/boost/preprocessor/logical/bitor.hpp \ + /usr/include/boost/preprocessor/tuple/elem.hpp \ + /usr/include/boost/preprocessor/facilities/expand.hpp \ + /usr/include/boost/preprocessor/facilities/overload.hpp \ + /usr/include/boost/preprocessor/variadic/size.hpp \ + /usr/include/boost/preprocessor/facilities/check_empty.hpp \ + /usr/include/boost/preprocessor/variadic/has_opt.hpp \ + /usr/include/boost/preprocessor/variadic/limits/size_64.hpp \ + /usr/include/boost/preprocessor/tuple/rem.hpp \ + /usr/include/boost/preprocessor/tuple/detail/is_single_return.hpp \ + /usr/include/boost/preprocessor/variadic/elem.hpp \ + /usr/include/boost/preprocessor/variadic/limits/elem_64.hpp \ + /usr/include/boost/preprocessor/arithmetic/detail/is_maximum_number.hpp \ + /usr/include/boost/preprocessor/comparison/equal.hpp \ + /usr/include/boost/preprocessor/comparison/not_equal.hpp \ + /usr/include/boost/preprocessor/comparison/limits/not_equal_256.hpp \ + /usr/include/boost/preprocessor/arithmetic/detail/maximum_number.hpp \ + /usr/include/boost/preprocessor/arithmetic/detail/is_minimum_number.hpp \ + /usr/include/boost/preprocessor/logical/not.hpp \ + /usr/include/boost/preprocessor/arithmetic/sub.hpp \ + /usr/include/boost/mpl/aux_/config/overload_resolution.hpp \ + /usr/include/boost/mpl/aux_/lambda_support.hpp \ + /usr/include/boost/mpl/eval_if.hpp \ + /usr/include/boost/mpl/equal_to.hpp \ + /usr/include/boost/mpl/aux_/comparison_op.hpp \ + /usr/include/boost/mpl/aux_/numeric_op.hpp \ + /usr/include/boost/mpl/numeric_cast.hpp \ + /usr/include/boost/mpl/apply_wrap.hpp \ + /usr/include/boost/mpl/aux_/has_apply.hpp \ + /usr/include/boost/mpl/has_xxx.hpp \ + /usr/include/boost/mpl/aux_/type_wrapper.hpp \ + /usr/include/boost/mpl/aux_/yes_no.hpp \ + /usr/include/boost/mpl/aux_/config/arrays.hpp \ + /usr/include/boost/mpl/aux_/config/has_xxx.hpp \ + /usr/include/boost/mpl/aux_/config/msvc_typename.hpp \ + /usr/include/boost/preprocessor/array/elem.hpp \ + /usr/include/boost/preprocessor/array/data.hpp \ + /usr/include/boost/preprocessor/array/size.hpp \ + /usr/include/boost/preprocessor/repetition/enum_params.hpp \ + /usr/include/boost/preprocessor/repetition/enum_trailing_params.hpp \ + /usr/include/boost/mpl/aux_/config/has_apply.hpp \ + /usr/include/boost/mpl/aux_/msvc_never_true.hpp \ + /usr/include/boost/mpl/aux_/config/use_preprocessed.hpp \ + /usr/include/boost/mpl/aux_/include_preprocessed.hpp \ + /usr/include/boost/mpl/aux_/config/compiler.hpp \ + /usr/include/boost/preprocessor/stringize.hpp \ + /usr/include/boost/mpl/aux_/preprocessed/gcc/apply_wrap.hpp \ + /usr/include/boost/mpl/tag.hpp \ + /usr/include/boost/mpl/void.hpp \ + /usr/include/boost/mpl/aux_/has_tag.hpp \ + /usr/include/boost/mpl/aux_/numeric_cast_utils.hpp \ + /usr/include/boost/mpl/aux_/config/forwarding.hpp \ + /usr/include/boost/mpl/aux_/msvc_eti_base.hpp \ + /usr/include/boost/mpl/aux_/is_msvc_eti_arg.hpp \ + /usr/include/boost/mpl/aux_/preprocessed/gcc/equal_to.hpp \ + /usr/include/boost/mpl/not.hpp \ + /usr/include/boost/mpl/aux_/nested_type_wknd.hpp \ + /usr/include/boost/mpl/and.hpp \ + /usr/include/boost/mpl/aux_/preprocessed/gcc/and.hpp \ + /usr/include/boost/mpl/identity.hpp \ + /usr/include/boost/numeric/conversion/detail/int_float_mixture.hpp \ + /usr/include/boost/numeric/conversion/int_float_mixture_enum.hpp \ + /usr/include/boost/mpl/integral_c.hpp \ + /usr/include/boost/mpl/integral_c_fwd.hpp \ + /usr/include/boost/numeric/conversion/detail/sign_mixture.hpp \ + /usr/include/boost/numeric/conversion/sign_mixture_enum.hpp \ + /usr/include/boost/numeric/conversion/detail/udt_builtin_mixture.hpp \ + /usr/include/boost/numeric/conversion/udt_builtin_mixture_enum.hpp \ + /usr/include/boost/numeric/conversion/detail/is_subranged.hpp \ + /usr/include/boost/mpl/multiplies.hpp \ + /usr/include/boost/mpl/times.hpp \ + /usr/include/boost/mpl/aux_/arithmetic_op.hpp \ + /usr/include/boost/mpl/aux_/largest_int.hpp \ + /usr/include/boost/mpl/aux_/preprocessed/gcc/times.hpp \ + /usr/include/boost/mpl/aux_/preprocessor/default_params.hpp \ + /usr/include/boost/mpl/less.hpp \ + /usr/include/boost/mpl/aux_/preprocessed/gcc/less.hpp \ + /usr/include/boost/numeric/conversion/converter_policies.hpp \ + /usr/include/boost/numeric/conversion/detail/converter.hpp \ + /usr/include/boost/numeric/conversion/bounds.hpp \ + /usr/include/boost/numeric/conversion/detail/bounds.hpp \ + /usr/include/boost/numeric/conversion/numeric_cast_traits.hpp \ + /usr/include/boost/numeric/conversion/detail/numeric_cast_traits.hpp \ + /usr/include/boost/numeric/conversion/detail/preprocessed/numeric_cast_traits_common.hpp \ + /usr/include/boost/numeric/conversion/detail/preprocessed/numeric_cast_traits_long_long.hpp \ + /usr/include/boost/date_time/posix_time/time_period.hpp \ + /usr/include/boost/date_time/time_iterator.hpp \ + /usr/include/boost/date_time/dst_rules.hpp \ + /usr/include/boost/asio/detail/impl/timer_queue_ptime.ipp \ + /usr/include/boost/asio/detail/timer_scheduler.hpp \ + /usr/include/boost/asio/detail/timer_scheduler_fwd.hpp \ + /usr/include/boost/asio/detail/wait_handler.hpp \ + /usr/include/boost/asio/basic_io_object.hpp \ + /usr/include/boost/asio/basic_raw_socket.hpp \ + /usr/include/boost/asio/basic_seq_packet_socket.hpp \ + /usr/include/boost/asio/basic_serial_port.hpp \ + /usr/include/boost/asio/serial_port_base.hpp \ + /usr/include/termios.h \ + /usr/include/bits/termios.h \ + /usr/include/bits/termios-struct.h \ + /usr/include/bits/termios-c_cc.h \ + /usr/include/bits/termios-c_iflag.h \ + /usr/include/bits/termios-c_oflag.h \ + /usr/include/bits/termios-baud.h \ + /usr/include/bits/termios-c_cflag.h \ + /usr/include/bits/termios-c_lflag.h \ + /usr/include/bits/termios-tcflow.h \ + /usr/include/bits/termios-misc.h \ + /usr/include/boost/asio/impl/serial_port_base.hpp \ + /usr/include/boost/asio/impl/serial_port_base.ipp \ + /usr/include/boost/asio/detail/reactive_serial_port_service.hpp \ + /usr/include/boost/asio/detail/descriptor_ops.hpp \ + /usr/include/boost/asio/detail/impl/descriptor_ops.ipp \ + /usr/include/boost/asio/detail/reactive_descriptor_service.hpp \ + /usr/include/boost/asio/detail/descriptor_read_op.hpp \ + /usr/include/boost/asio/detail/descriptor_write_op.hpp \ + /usr/include/boost/asio/posix/descriptor_base.hpp \ + /usr/include/boost/asio/detail/impl/reactive_descriptor_service.ipp \ + /usr/include/boost/asio/detail/impl/reactive_serial_port_service.ipp \ + /usr/include/boost/asio/basic_signal_set.hpp \ + /usr/include/boost/asio/detail/signal_set_service.hpp \ + /usr/include/boost/asio/detail/signal_handler.hpp \ + /usr/include/boost/asio/detail/signal_op.hpp \ + /usr/include/boost/asio/detail/impl/signal_set_service.ipp \ + /usr/include/boost/asio/detail/static_mutex.hpp \ + /usr/include/boost/asio/detail/posix_static_mutex.hpp \ + /usr/include/boost/asio/basic_socket_acceptor.hpp \ + /usr/include/boost/asio/basic_socket_iostream.hpp \ + /usr/include/boost/asio/basic_socket_streambuf.hpp \ + /usr/include/boost/asio/basic_stream_socket.hpp \ + /usr/include/boost/asio/steady_timer.hpp \ + /usr/include/boost/asio/basic_waitable_timer.hpp \ + /usr/include/boost/asio/detail/chrono_time_traits.hpp \ + /usr/include/boost/asio/wait_traits.hpp \ + /usr/include/boost/asio/basic_streambuf.hpp \ + /usr/include/boost/asio/basic_streambuf_fwd.hpp \ + /usr/include/boost/asio/bind_executor.hpp \ + /usr/include/boost/asio/uses_executor.hpp \ + /usr/include/boost/asio/buffered_read_stream_fwd.hpp \ + /usr/include/boost/asio/buffered_read_stream.hpp \ + /usr/include/boost/asio/detail/buffer_resize_guard.hpp \ + /usr/include/boost/asio/detail/buffered_stream_storage.hpp \ + /usr/include/boost/asio/impl/buffered_read_stream.hpp \ + /usr/include/boost/asio/buffered_stream_fwd.hpp \ + /usr/include/boost/asio/buffered_stream.hpp \ + /usr/include/boost/asio/buffered_write_stream.hpp \ + /usr/include/boost/asio/buffered_write_stream_fwd.hpp \ + /usr/include/boost/asio/completion_condition.hpp \ + /usr/include/boost/asio/write.hpp \ + /usr/include/boost/asio/impl/write.hpp \ + /usr/include/boost/asio/detail/base_from_completion_cond.hpp \ + /usr/include/boost/asio/detail/consuming_buffers.hpp \ + /usr/include/boost/asio/detail/dependent_type.hpp \ + /usr/include/boost/asio/impl/buffered_write_stream.hpp \ + /usr/include/boost/asio/buffers_iterator.hpp \ + /usr/include/boost/asio/co_spawn.hpp \ + /usr/include/boost/asio/compose.hpp \ + /usr/include/boost/asio/impl/compose.hpp \ + /usr/include/boost/asio/connect.hpp \ + /usr/include/boost/asio/impl/connect.hpp \ + /usr/include/boost/asio/coroutine.hpp \ + /usr/include/boost/asio/deadline_timer.hpp \ + /usr/include/boost/asio/defer.hpp \ + /usr/include/boost/asio/impl/defer.hpp \ + /usr/include/boost/asio/detached.hpp \ + /usr/include/boost/asio/impl/detached.hpp \ + /usr/include/boost/asio/dispatch.hpp \ + /usr/include/boost/asio/impl/dispatch.hpp \ + /usr/include/boost/asio/executor.hpp \ + /usr/include/boost/asio/impl/executor.hpp \ + /usr/include/boost/asio/impl/executor.ipp \ + /usr/include/boost/asio/generic/basic_endpoint.hpp \ + /usr/include/boost/asio/generic/detail/endpoint.hpp \ + /usr/include/boost/asio/generic/detail/impl/endpoint.ipp \ + /usr/include/boost/asio/generic/datagram_protocol.hpp \ + /usr/include/boost/asio/generic/raw_protocol.hpp \ + /usr/include/boost/asio/generic/seq_packet_protocol.hpp \ + /usr/include/boost/asio/generic/stream_protocol.hpp \ + /usr/include/boost/asio/high_resolution_timer.hpp \ + /usr/include/boost/asio/io_context_strand.hpp \ + /usr/include/boost/asio/detail/strand_service.hpp \ + /usr/include/boost/asio/detail/impl/strand_service.hpp \ + /usr/include/boost/asio/detail/impl/strand_service.ipp \ + /usr/include/boost/asio/io_service.hpp \ + /usr/include/boost/asio/io_service_strand.hpp \ + /usr/include/boost/asio/ip/address.hpp \ + /usr/include/boost/asio/ip/address_v4.hpp \ + /usr/include/boost/asio/detail/array.hpp \ + /usr/include/boost/asio/detail/winsock_init.hpp \ + /usr/include/boost/asio/ip/impl/address_v4.hpp \ + /usr/include/boost/asio/ip/impl/address_v4.ipp \ + /usr/include/boost/asio/ip/address_v6.hpp \ + /usr/include/boost/asio/ip/impl/address_v6.hpp \ + /usr/include/boost/asio/ip/impl/address_v6.ipp \ + /usr/include/boost/asio/ip/bad_address_cast.hpp \ + /usr/include/boost/asio/ip/impl/address.hpp \ + /usr/include/boost/asio/ip/impl/address.ipp \ + /usr/include/boost/asio/ip/address_v4_iterator.hpp \ + /usr/include/boost/asio/ip/address_v4_range.hpp \ + /usr/include/boost/asio/ip/address_v6_iterator.hpp \ + /usr/include/boost/asio/ip/address_v6_range.hpp \ + /usr/include/boost/asio/ip/network_v4.hpp \ + /usr/include/boost/asio/ip/impl/network_v4.hpp \ + /usr/include/boost/asio/ip/impl/network_v4.ipp \ + /usr/include/boost/asio/ip/network_v6.hpp \ + /usr/include/boost/asio/ip/impl/network_v6.hpp \ + /usr/include/boost/asio/ip/impl/network_v6.ipp \ + /usr/include/boost/asio/ip/basic_endpoint.hpp \ + /usr/include/boost/asio/ip/detail/endpoint.hpp \ + /usr/include/boost/asio/ip/detail/impl/endpoint.ipp \ + /usr/include/boost/asio/ip/impl/basic_endpoint.hpp \ + /usr/include/boost/asio/ip/basic_resolver.hpp \ + /usr/include/boost/asio/ip/basic_resolver_iterator.hpp \ + /usr/include/boost/asio/ip/basic_resolver_entry.hpp \ + /usr/include/boost/asio/ip/basic_resolver_query.hpp \ + /usr/include/boost/asio/ip/resolver_query_base.hpp \ + /usr/include/boost/asio/ip/resolver_base.hpp \ + /usr/include/boost/asio/ip/basic_resolver_results.hpp \ + /usr/include/boost/asio/detail/resolver_service.hpp \ + /usr/include/boost/asio/detail/resolve_endpoint_op.hpp \ + /usr/include/boost/asio/detail/resolve_op.hpp \ + /usr/include/boost/asio/detail/resolve_query_op.hpp \ + /usr/include/boost/asio/detail/resolver_service_base.hpp \ + /usr/include/boost/asio/detail/impl/resolver_service_base.ipp \ + /usr/include/boost/asio/ip/host_name.hpp \ + /usr/include/boost/asio/ip/impl/host_name.ipp \ + /usr/include/boost/asio/ip/icmp.hpp \ + /usr/include/boost/asio/ip/multicast.hpp \ + /usr/include/boost/asio/ip/detail/socket_option.hpp \ + /usr/include/boost/asio/ip/tcp.hpp \ + /usr/include/boost/asio/ip/udp.hpp \ + /usr/include/boost/asio/ip/unicast.hpp \ + /usr/include/boost/asio/ip/v6_only.hpp \ + /usr/include/boost/asio/is_read_buffered.hpp \ + /usr/include/boost/asio/is_write_buffered.hpp \ + /usr/include/boost/asio/local/basic_endpoint.hpp \ + /usr/include/boost/asio/local/detail/endpoint.hpp \ + /usr/include/boost/asio/local/detail/impl/endpoint.ipp \ + /usr/include/boost/asio/local/connect_pair.hpp \ + /usr/include/boost/asio/local/datagram_protocol.hpp \ + /usr/include/boost/asio/local/stream_protocol.hpp \ + /usr/include/boost/asio/packaged_task.hpp \ + /usr/include/boost/asio/detail/future.hpp \ + /usr/include/c++/11/future \ + /usr/include/c++/11/condition_variable \ + /usr/include/c++/11/bits/atomic_futex.h \ + /usr/include/c++/11/bits/std_thread.h \ + /usr/include/boost/asio/placeholders.hpp \ + /usr/include/boost/bind/arg.hpp \ + /usr/include/boost/is_placeholder.hpp \ + /usr/include/boost/asio/posix/basic_descriptor.hpp \ + /usr/include/boost/asio/posix/basic_stream_descriptor.hpp \ + /usr/include/boost/asio/posix/descriptor.hpp \ + /usr/include/boost/asio/posix/stream_descriptor.hpp \ + /usr/include/boost/asio/read.hpp \ + /usr/include/boost/asio/impl/read.hpp \ + /usr/include/boost/asio/read_at.hpp \ + /usr/include/boost/asio/impl/read_at.hpp \ + /usr/include/boost/asio/read_until.hpp \ + /usr/include/boost/asio/detail/regex_fwd.hpp \ + /usr/include/boost/regex_fwd.hpp \ + /usr/include/boost/regex/config.hpp \ + /usr/include/boost/regex/user.hpp \ + /usr/include/boost/predef.h \ + /usr/include/boost/predef/language.h \ + /usr/include/boost/predef/language/stdc.h \ + /usr/include/boost/predef/version_number.h \ + /usr/include/boost/predef/make.h \ + /usr/include/boost/predef/detail/test.h \ + /usr/include/boost/predef/language/stdcpp.h \ + /usr/include/boost/predef/language/objc.h \ + /usr/include/boost/predef/language/cuda.h \ + /usr/include/boost/predef/architecture.h \ + /usr/include/boost/predef/architecture/alpha.h \ + /usr/include/boost/predef/architecture/arm.h \ + /usr/include/boost/predef/architecture/blackfin.h \ + /usr/include/boost/predef/architecture/convex.h \ + /usr/include/boost/predef/architecture/ia64.h \ + /usr/include/boost/predef/architecture/m68k.h \ + /usr/include/boost/predef/architecture/mips.h \ + /usr/include/boost/predef/architecture/parisc.h \ + /usr/include/boost/predef/architecture/ppc.h \ + /usr/include/boost/predef/architecture/ptx.h \ + /usr/include/boost/predef/architecture/pyramid.h \ + /usr/include/boost/predef/architecture/riscv.h \ + /usr/include/boost/predef/architecture/rs6k.h \ + /usr/include/boost/predef/architecture/sparc.h \ + /usr/include/boost/predef/architecture/superh.h \ + /usr/include/boost/predef/architecture/sys370.h \ + /usr/include/boost/predef/architecture/sys390.h \ + /usr/include/boost/predef/architecture/x86.h \ + /usr/include/boost/predef/architecture/x86/32.h \ + /usr/include/boost/predef/architecture/x86/64.h \ + /usr/include/boost/predef/architecture/z.h \ + /usr/include/boost/predef/compiler.h \ + /usr/include/boost/predef/compiler/borland.h \ + /usr/include/boost/predef/compiler/clang.h \ + /usr/include/boost/predef/compiler/comeau.h \ + /usr/include/boost/predef/compiler/compaq.h \ + /usr/include/boost/predef/compiler/diab.h \ + /usr/include/boost/predef/compiler/digitalmars.h \ + /usr/include/boost/predef/compiler/dignus.h \ + /usr/include/boost/predef/compiler/edg.h \ + /usr/include/boost/predef/compiler/ekopath.h \ + /usr/include/boost/predef/compiler/gcc_xml.h \ + /usr/include/boost/predef/compiler/gcc.h \ + /usr/include/boost/predef/detail/comp_detected.h \ + /usr/include/boost/predef/compiler/greenhills.h \ + /usr/include/boost/predef/compiler/hp_acc.h \ + /usr/include/boost/predef/compiler/iar.h \ + /usr/include/boost/predef/compiler/ibm.h \ + /usr/include/boost/predef/compiler/intel.h \ + /usr/include/boost/predef/compiler/kai.h \ + /usr/include/boost/predef/compiler/llvm.h \ + /usr/include/boost/predef/compiler/metaware.h \ + /usr/include/boost/predef/compiler/metrowerks.h \ + /usr/include/boost/predef/compiler/microtec.h \ + /usr/include/boost/predef/compiler/mpw.h \ + /usr/include/boost/predef/compiler/nvcc.h \ + /usr/include/boost/predef/compiler/palm.h \ + /usr/include/boost/predef/compiler/pgi.h \ + /usr/include/boost/predef/compiler/sgi_mipspro.h \ + /usr/include/boost/predef/compiler/sunpro.h \ + /usr/include/boost/predef/compiler/tendra.h \ + /usr/include/boost/predef/compiler/visualc.h \ + /usr/include/boost/predef/compiler/watcom.h \ + /usr/include/boost/predef/library.h \ + /usr/include/boost/predef/library/c.h \ + /usr/include/boost/predef/library/c/_prefix.h \ + /usr/include/boost/predef/detail/_cassert.h \ + /usr/include/boost/predef/library/c/cloudabi.h \ + /usr/include/boost/predef/library/c/gnu.h \ + /usr/include/boost/predef/library/c/uc.h \ + /usr/include/boost/predef/library/c/vms.h \ + /usr/include/boost/predef/library/c/zos.h \ + /usr/include/boost/predef/library/std.h \ + /usr/include/boost/predef/library/std/_prefix.h \ + /usr/include/boost/predef/detail/_exception.h \ + /usr/include/boost/predef/library/std/cxx.h \ + /usr/include/boost/predef/library/std/dinkumware.h \ + /usr/include/boost/predef/library/std/libcomo.h \ + /usr/include/boost/predef/library/std/modena.h \ + /usr/include/boost/predef/library/std/msl.h \ + /usr/include/boost/predef/library/std/roguewave.h \ + /usr/include/boost/predef/library/std/sgi.h \ + /usr/include/boost/predef/library/std/stdcpp3.h \ + /usr/include/boost/predef/library/std/stlport.h \ + /usr/include/boost/predef/library/std/vacpp.h \ + /usr/include/boost/predef/os.h \ + /usr/include/boost/predef/os/aix.h \ + /usr/include/boost/predef/os/amigaos.h \ + /usr/include/boost/predef/os/beos.h \ + /usr/include/boost/predef/os/bsd.h \ + /usr/include/boost/predef/os/macos.h \ + /usr/include/boost/predef/os/ios.h \ + /usr/include/boost/predef/os/bsd/bsdi.h \ + /usr/include/boost/predef/os/bsd/dragonfly.h \ + /usr/include/boost/predef/os/bsd/free.h \ + /usr/include/boost/predef/os/bsd/open.h \ + /usr/include/boost/predef/os/bsd/net.h \ + /usr/include/boost/predef/os/cygwin.h \ + /usr/include/boost/predef/os/haiku.h \ + /usr/include/boost/predef/os/hpux.h \ + /usr/include/boost/predef/os/irix.h \ + /usr/include/boost/predef/os/linux.h \ + /usr/include/boost/predef/detail/os_detected.h \ + /usr/include/boost/predef/os/os400.h \ + /usr/include/boost/predef/os/qnxnto.h \ + /usr/include/boost/predef/os/solaris.h \ + /usr/include/boost/predef/os/unix.h \ + /usr/include/boost/predef/os/vms.h \ + /usr/include/boost/predef/os/windows.h \ + /usr/include/boost/predef/other.h \ + /usr/include/boost/predef/other/endian.h \ + /usr/include/boost/predef/platform/android.h \ + /usr/include/boost/predef/platform.h \ + /usr/include/boost/predef/platform/cloudabi.h \ + /usr/include/boost/predef/platform/mingw.h \ + /usr/include/boost/predef/platform/mingw32.h \ + /usr/include/boost/predef/platform/mingw64.h \ + /usr/include/boost/predef/platform/windows_uwp.h \ + /usr/include/boost/predef/platform/windows_desktop.h \ + /usr/include/boost/predef/platform/windows_phone.h \ + /usr/include/boost/predef/platform/windows_server.h \ + /usr/include/boost/predef/platform/windows_store.h \ + /usr/include/boost/predef/platform/windows_system.h \ + /usr/include/boost/predef/platform/windows_runtime.h \ + /usr/include/boost/predef/platform/ios.h \ + /usr/include/boost/predef/hardware.h \ + /usr/include/boost/predef/hardware/simd.h \ + /usr/include/boost/predef/hardware/simd/x86.h \ + /usr/include/boost/predef/hardware/simd/x86/versions.h \ + /usr/include/boost/predef/hardware/simd/x86_amd.h \ + /usr/include/boost/predef/hardware/simd/x86_amd/versions.h \ + /usr/include/boost/predef/hardware/simd/arm.h \ + /usr/include/boost/predef/hardware/simd/arm/versions.h \ + /usr/include/boost/predef/hardware/simd/ppc.h \ + /usr/include/boost/predef/hardware/simd/ppc/versions.h \ + /usr/include/boost/predef/version.h \ + /usr/include/boost/regex/config/cwchar.hpp \ + /usr/include/boost/regex/v4/regex_fwd.hpp \ + /usr/include/boost/regex/v4/match_flags.hpp \ + /usr/include/boost/asio/impl/read_until.hpp \ + /usr/include/boost/asio/redirect_error.hpp \ + /usr/include/boost/asio/impl/redirect_error.hpp \ + /usr/include/boost/asio/require_concept.hpp \ + /usr/include/boost/asio/traits/require_concept_member.hpp \ + /usr/include/boost/asio/traits/require_concept_free.hpp \ + /usr/include/boost/asio/traits/static_require_concept.hpp \ + /usr/include/boost/asio/serial_port.hpp \ + /usr/include/boost/asio/signal_set.hpp \ + /usr/include/boost/asio/static_thread_pool.hpp \ + /usr/include/boost/asio/thread_pool.hpp \ + /usr/include/boost/asio/impl/thread_pool.hpp \ + /usr/include/boost/asio/detail/blocking_executor_op.hpp \ + /usr/include/boost/asio/detail/bulk_executor_op.hpp \ + /usr/include/boost/asio/impl/thread_pool.ipp \ + /usr/include/boost/asio/strand.hpp \ + /usr/include/boost/asio/detail/strand_executor_service.hpp \ + /usr/include/boost/asio/detail/impl/strand_executor_service.hpp \ + /usr/include/boost/asio/detail/impl/strand_executor_service.ipp \ + /usr/include/boost/asio/streambuf.hpp \ + /usr/include/boost/asio/system_timer.hpp \ + /usr/include/boost/asio/this_coro.hpp \ + /usr/include/boost/asio/use_awaitable.hpp \ + /usr/include/boost/asio/use_future.hpp \ + /usr/include/boost/asio/impl/use_future.hpp \ + /usr/include/boost/asio/version.hpp \ + /usr/include/boost/asio/windows/basic_object_handle.hpp \ + /usr/include/boost/asio/windows/basic_overlapped_handle.hpp \ + /usr/include/boost/asio/windows/basic_random_access_handle.hpp \ + /usr/include/boost/asio/windows/basic_stream_handle.hpp \ + /usr/include/boost/asio/windows/object_handle.hpp \ + /usr/include/boost/asio/windows/overlapped_handle.hpp \ + /usr/include/boost/asio/windows/overlapped_ptr.hpp \ + /usr/include/boost/asio/windows/random_access_handle.hpp \ + /usr/include/boost/asio/windows/stream_handle.hpp \ + /usr/include/boost/asio/write_at.hpp \ + /usr/include/boost/asio/impl/write_at.hpp \ + /usr/include/boost/beast/core/tcp_stream.hpp \ + /usr/include/boost/beast/core/detail/config.hpp \ + /usr/include/boost/core/ignore_unused.hpp \ + /usr/include/boost/beast/core/basic_stream.hpp \ + /usr/include/boost/beast/core/detail/stream_base.hpp \ + /usr/include/boost/core/exchange.hpp \ + /usr/include/boost/beast/core/error.hpp \ + /usr/include/boost/beast/core/impl/error.hpp \ + /usr/include/boost/beast/core/impl/error.ipp \ + /usr/include/boost/beast/core/rate_policy.hpp \ + /usr/include/boost/beast/core/role.hpp \ + /usr/include/boost/beast/core/stream_traits.hpp \ + /usr/include/boost/beast/core/detail/static_const.hpp \ + /usr/include/boost/beast/core/detail/stream_traits.hpp \ + /usr/include/boost/type_traits/make_void.hpp \ + /usr/include/boost/core/empty_value.hpp \ + /usr/include/boost/enable_shared_from_this.hpp \ + /usr/include/boost/smart_ptr/enable_shared_from_this.hpp \ + /usr/include/boost/smart_ptr/weak_ptr.hpp \ + /usr/include/boost/beast/core/impl/basic_stream.hpp \ + /usr/include/boost/beast/core/async_base.hpp \ + /usr/include/boost/beast/core/bind_handler.hpp \ + /usr/include/boost/beast/core/detail/bind_handler.hpp \ + /usr/include/boost/beast/core/detail/tuple.hpp \ + /usr/include/boost/mp11/integer_sequence.hpp \ + /usr/include/boost/mp11/version.hpp \ + /usr/include/boost/mp11/algorithm.hpp \ + /usr/include/boost/mp11/list.hpp \ + /usr/include/boost/mp11/integral.hpp \ + /usr/include/boost/mp11/detail/mp_list.hpp \ + /usr/include/boost/mp11/detail/mp_is_list.hpp \ + /usr/include/boost/mp11/detail/mp_append.hpp \ + /usr/include/boost/mp11/utility.hpp \ + /usr/include/boost/mp11/detail/mp_fold.hpp \ + /usr/include/boost/mp11/detail/config.hpp \ + /usr/include/boost/mp11/set.hpp \ + /usr/include/boost/mp11/function.hpp \ + /usr/include/boost/mp11/detail/mp_count.hpp \ + /usr/include/boost/mp11/detail/mp_plus.hpp \ + /usr/include/boost/mp11/detail/mp_min_element.hpp \ + /usr/include/boost/mp11/detail/mp_void.hpp \ + /usr/include/boost/mp11/detail/mp_copy_if.hpp \ + /usr/include/boost/mp11/detail/mp_remove_if.hpp \ + /usr/include/boost/mp11/detail/mp_map_find.hpp \ + /usr/include/boost/mp11/detail/mp_with_index.hpp \ + /usr/include/boost/type_traits/copy_cv.hpp \ + /usr/include/boost/type_traits/is_const.hpp \ + /usr/include/boost/type_traits/is_volatile.hpp \ + /usr/include/boost/type_traits/add_const.hpp \ + /usr/include/boost/type_traits/add_volatile.hpp \ + /usr/include/boost/beast/core/detail/allocator.hpp \ + /usr/include/boost/beast/core/detail/async_base.hpp \ + /usr/include/boost/beast/core/detail/work_guard.hpp \ + /usr/include/boost/optional.hpp \ + /usr/include/boost/optional/optional.hpp \ + /usr/include/boost/core/explicit_operator_bool.hpp \ + /usr/include/boost/core/swap.hpp \ + /usr/include/boost/optional/bad_optional_access.hpp \ + /usr/include/boost/type_traits/alignment_of.hpp \ + /usr/include/boost/type_traits/has_nothrow_constructor.hpp \ + /usr/include/boost/type_traits/is_default_constructible.hpp \ + /usr/include/boost/type_traits/is_complete.hpp \ + /usr/include/boost/type_traits/declval.hpp \ + /usr/include/boost/type_traits/add_rvalue_reference.hpp \ + /usr/include/boost/type_traits/is_void.hpp \ + /usr/include/boost/type_traits/is_reference.hpp \ + /usr/include/boost/type_traits/is_lvalue_reference.hpp \ + /usr/include/boost/type_traits/is_rvalue_reference.hpp \ + /usr/include/boost/type_traits/remove_reference.hpp \ + /usr/include/boost/type_traits/is_function.hpp \ + /usr/include/boost/type_traits/detail/is_function_cxx_11.hpp \ + /usr/include/boost/type_traits/detail/yes_no_type.hpp \ + /usr/include/boost/type_traits/type_with_alignment.hpp \ + /usr/include/boost/type_traits/is_pod.hpp \ + /usr/include/boost/type_traits/is_scalar.hpp \ + /usr/include/boost/type_traits/is_enum.hpp \ + /usr/include/boost/type_traits/is_pointer.hpp \ + /usr/include/boost/type_traits/is_member_pointer.hpp \ + /usr/include/boost/type_traits/is_member_function_pointer.hpp \ + /usr/include/boost/type_traits/detail/is_member_function_pointer_cxx_11.hpp \ + /usr/include/boost/type_traits/remove_const.hpp \ + /usr/include/boost/type_traits/decay.hpp \ + /usr/include/boost/type_traits/is_array.hpp \ + /usr/include/boost/type_traits/remove_bounds.hpp \ + /usr/include/boost/type_traits/remove_extent.hpp \ + /usr/include/boost/type_traits/add_pointer.hpp \ + /usr/include/boost/type_traits/is_constructible.hpp \ + /usr/include/boost/type_traits/is_destructible.hpp \ + /usr/include/boost/type_traits/is_nothrow_move_assignable.hpp \ + /usr/include/boost/type_traits/has_trivial_move_assign.hpp \ + /usr/include/boost/type_traits/is_assignable.hpp \ + /usr/include/boost/type_traits/has_nothrow_assign.hpp \ + /usr/include/boost/type_traits/enable_if.hpp \ + /usr/include/boost/type_traits/is_nothrow_move_constructible.hpp \ + /usr/include/boost/move/utility.hpp \ + /usr/include/boost/move/detail/config_begin.hpp \ + /usr/include/boost/move/detail/workaround.hpp \ + /usr/include/boost/move/utility_core.hpp \ + /usr/include/boost/move/core.hpp \ + /usr/include/boost/move/detail/config_end.hpp \ + /usr/include/boost/move/detail/meta_utils.hpp \ + /usr/include/boost/move/detail/meta_utils_core.hpp \ + /usr/include/boost/move/traits.hpp \ + /usr/include/boost/move/detail/type_traits.hpp \ + /usr/include/boost/none.hpp \ + /usr/include/boost/none_t.hpp \ + /usr/include/boost/utility/compare_pointees.hpp \ + /usr/include/boost/utility/result_of.hpp \ + /usr/include/boost/preprocessor/iteration/iterate.hpp \ + /usr/include/boost/preprocessor/slot/slot.hpp \ + /usr/include/boost/preprocessor/slot/detail/def.hpp \ + /usr/include/boost/preprocessor/repetition/enum_binary_params.hpp \ + /usr/include/boost/preprocessor/repetition/enum_shifted_params.hpp \ + /usr/include/boost/preprocessor/facilities/intercept.hpp \ + /usr/include/boost/preprocessor/facilities/limits/intercept_256.hpp \ + /usr/include/boost/type_traits/type_identity.hpp \ + /usr/include/boost/preprocessor/iteration/detail/iter/forward1.hpp \ + /usr/include/boost/preprocessor/iteration/detail/bounds/lower1.hpp \ + /usr/include/boost/preprocessor/slot/detail/shared.hpp \ + /usr/include/boost/preprocessor/iteration/detail/bounds/upper1.hpp \ + /usr/include/boost/preprocessor/iteration/detail/iter/limits/forward1_256.hpp \ + /usr/include/boost/utility/detail/result_of_iterate.hpp \ + /usr/include/boost/optional/optional_fwd.hpp \ + /usr/include/boost/optional/detail/optional_config.hpp \ + /usr/include/boost/optional/detail/optional_factory_support.hpp \ + /usr/include/boost/optional/detail/optional_aligned_storage.hpp \ + /usr/include/boost/optional/detail/optional_trivially_copyable_base.hpp \ + /usr/include/boost/optional/detail/optional_reference_spec.hpp \ + /usr/include/boost/optional/detail/optional_relops.hpp \ + /usr/include/boost/optional/detail/optional_swap.hpp \ + /usr/include/boost/beast/core/impl/async_base.hpp \ + /usr/include/boost/beast/core/buffer_traits.hpp \ + /usr/include/boost/beast/core/detail/buffer_traits.hpp \ + /usr/include/boost/beast/core/buffers_prefix.hpp \ + /usr/include/boost/beast/core/impl/buffers_prefix.hpp \ + /usr/include/boost/beast/websocket/teardown.hpp \ + /usr/include/boost/beast/websocket/impl/teardown.hpp \ + /usr/include/boost/beast/core/detail/bind_continuation.hpp \ + /usr/include/boost/beast/core/detail/remap_post_to_defer.hpp \ + /usr/include/boost/beast/core/detail/is_invocable.hpp \ + /usr/include/boost/make_shared.hpp \ + /usr/include/boost/smart_ptr/make_shared.hpp \ + /usr/include/boost/smart_ptr/make_shared_object.hpp \ + /usr/include/boost/smart_ptr/detail/sp_forward.hpp \ + /usr/include/boost/smart_ptr/make_shared_array.hpp \ + /usr/include/boost/core/default_allocator.hpp \ + /usr/include/boost/smart_ptr/allocate_shared_array.hpp \ + /usr/include/boost/core/allocator_access.hpp \ + /usr/include/boost/core/pointer_traits.hpp \ + /usr/include/boost/core/alloc_construct.hpp \ + /usr/include/boost/core/noinit_adaptor.hpp \ + /usr/include/boost/core/first_scalar.hpp \ + /usr/include/boost/type_traits/extent.hpp \ + /usr/include/boost/type_traits/is_bounded_array.hpp \ + /usr/include/boost/type_traits/is_unbounded_array.hpp \ + /usr/include/boost/beast/websocket/stream.hpp \ + /usr/include/boost/beast/websocket/error.hpp \ + /usr/include/boost/beast/websocket/impl/error.hpp \ + /usr/include/boost/beast/websocket/impl/error.ipp \ + /usr/include/boost/beast/websocket/option.hpp \ + /usr/include/boost/beast/websocket/rfc6455.hpp \ + /usr/include/boost/beast/core/static_string.hpp \ + /usr/include/boost/beast/core/string.hpp \ + /usr/include/boost/beast/core/string_type.hpp \ + /usr/include/boost/utility/string_view.hpp \ + /usr/include/boost/io/ostream_put.hpp \ + /usr/include/boost/io/detail/buffer_fill.hpp \ + /usr/include/boost/io/detail/ostream_guard.hpp \ + /usr/include/boost/utility/string_view_fwd.hpp \ + /usr/include/boost/container_hash/hash_fwd.hpp \ + /usr/include/boost/beast/core/impl/string.ipp \ + /usr/include/boost/beast/core/detail/string.hpp \ + /usr/include/boost/beast/core/detail/static_string.hpp \ + /usr/include/boost/beast/core/impl/static_string.hpp \ + /usr/include/boost/beast/http/empty_body.hpp \ + /usr/include/boost/beast/http/error.hpp \ + /usr/include/boost/beast/http/impl/error.hpp \ + /usr/include/boost/beast/http/impl/error.ipp \ + /usr/include/boost/beast/http/message.hpp \ + /usr/include/boost/beast/http/fields.hpp \ + /usr/include/boost/beast/http/field.hpp \ + /usr/include/boost/beast/http/impl/field.ipp \ + /usr/include/boost/intrusive/list.hpp \ + /usr/include/boost/intrusive/detail/config_begin.hpp \ + /usr/include/boost/intrusive/intrusive_fwd.hpp \ + /usr/include/boost/intrusive/link_mode.hpp \ + /usr/include/boost/intrusive/detail/workaround.hpp \ + /usr/include/boost/intrusive/detail/assert.hpp \ + /usr/include/boost/intrusive/list_hook.hpp \ + /usr/include/boost/intrusive/detail/list_node.hpp \ + /usr/include/boost/intrusive/pointer_rebind.hpp \ + /usr/include/boost/intrusive/circular_list_algorithms.hpp \ + /usr/include/boost/intrusive/detail/algo_type.hpp \ + /usr/include/boost/core/no_exceptions_support.hpp \ + /usr/include/boost/intrusive/detail/config_end.hpp \ + /usr/include/boost/intrusive/options.hpp \ + /usr/include/boost/intrusive/pack_options.hpp \ + /usr/include/boost/intrusive/detail/generic_hook.hpp \ + /usr/include/boost/intrusive/pointer_traits.hpp \ + /usr/include/boost/move/detail/pointer_element.hpp \ + /usr/include/boost/intrusive/detail/mpl.hpp \ + /usr/include/boost/intrusive/detail/node_holder.hpp \ + /usr/include/boost/intrusive/detail/get_value_traits.hpp \ + /usr/include/boost/intrusive/detail/hook_traits.hpp \ + /usr/include/boost/intrusive/detail/parent_from_member.hpp \ + /usr/include/boost/move/detail/to_raw_pointer.hpp \ + /usr/include/boost/intrusive/detail/is_stateful_value_traits.hpp \ + /usr/include/boost/intrusive/detail/function_detector.hpp \ + /usr/include/boost/intrusive/detail/default_header_holder.hpp \ + /usr/include/boost/intrusive/detail/reverse_iterator.hpp \ + /usr/include/boost/intrusive/detail/iterator.hpp \ + /usr/include/boost/intrusive/detail/std_fwd.hpp \ + /usr/include/boost/move/detail/std_ns_begin.hpp \ + /usr/include/boost/move/detail/std_ns_end.hpp \ + /usr/include/boost/move/detail/iterator_traits.hpp \ + /usr/include/boost/intrusive/detail/uncast.hpp \ + /usr/include/boost/intrusive/detail/list_iterator.hpp \ + /usr/include/boost/intrusive/detail/iiterator.hpp \ + /usr/include/boost/intrusive/detail/array_initializer.hpp \ + /usr/include/boost/move/detail/placement_new.hpp \ + /usr/include/boost/intrusive/detail/exception_disposer.hpp \ + /usr/include/boost/intrusive/detail/equal_to_value.hpp \ + /usr/include/boost/intrusive/detail/key_nodeptr_comp.hpp \ + /usr/include/boost/intrusive/detail/ebo_functor_holder.hpp \ + /usr/include/boost/intrusive/detail/tree_value_compare.hpp \ + /usr/include/boost/intrusive/detail/simple_disposers.hpp \ + /usr/include/boost/intrusive/detail/size_holder.hpp \ + /usr/include/boost/intrusive/detail/algorithm.hpp \ + /usr/include/boost/intrusive/detail/minimal_less_equal_header.hpp \ + /usr/include/boost/intrusive/set.hpp \ + /usr/include/boost/intrusive/rbtree.hpp \ + /usr/include/boost/intrusive/detail/minimal_pair_header.hpp \ + /usr/include/boost/intrusive/set_hook.hpp \ + /usr/include/boost/intrusive/detail/rbtree_node.hpp \ + /usr/include/boost/intrusive/rbtree_algorithms.hpp \ + /usr/include/boost/intrusive/bstree_algorithms.hpp \ + /usr/include/boost/intrusive/detail/bstree_algorithms_base.hpp \ + /usr/include/boost/intrusive/detail/math.hpp \ + /usr/include/boost/intrusive/pointer_plus_bits.hpp \ + /usr/include/boost/intrusive/detail/tree_node.hpp \ + /usr/include/boost/intrusive/bstree.hpp \ + /usr/include/boost/intrusive/bs_set_hook.hpp \ + /usr/include/boost/intrusive/detail/tree_iterator.hpp \ + /usr/include/boost/intrusive/detail/empty_node_checker.hpp \ + /usr/include/boost/intrusive/detail/node_cloner_disposer.hpp \ + /usr/include/boost/intrusive/parent_from_member.hpp \ + /usr/include/boost/move/adl_move_swap.hpp \ + /usr/include/boost/beast/http/impl/fields.hpp \ + /usr/include/boost/beast/core/buffers_cat.hpp \ + /usr/include/boost/beast/core/detail/type_traits.hpp \ + /usr/include/boost/beast/core/impl/buffers_cat.hpp \ + /usr/include/boost/beast/core/detail/variant.hpp \ + /usr/include/boost/beast/core/detail/buffers_ref.hpp \ + /usr/include/boost/beast/core/detail/clamp.hpp \ + /usr/include/boost/beast/core/detail/temporary_buffer.hpp \ + /usr/include/boost/beast/core/detail/impl/temporary_buffer.ipp \ + /usr/include/boost/beast/http/verb.hpp \ + /usr/include/boost/beast/http/impl/verb.ipp \ + /usr/include/boost/beast/http/rfc7230.hpp \ + /usr/include/boost/beast/http/detail/rfc7230.hpp \ + /usr/include/boost/beast/http/detail/rfc7230.ipp \ + /usr/include/boost/beast/http/detail/basic_parsed_list.hpp \ + /usr/include/boost/beast/http/impl/rfc7230.hpp \ + /usr/include/boost/beast/http/impl/rfc7230.ipp \ + /usr/include/boost/beast/http/status.hpp \ + /usr/include/boost/beast/http/impl/status.ipp \ + /usr/include/boost/beast/http/chunk_encode.hpp \ + /usr/include/boost/beast/http/type_traits.hpp \ + /usr/include/boost/beast/http/detail/type_traits.hpp \ + /usr/include/boost/beast/http/detail/chunk_encode.hpp \ + /usr/include/boost/beast/http/impl/chunk_encode.hpp \ + /usr/include/boost/beast/core/detail/varint.hpp \ + /usr/include/boost/beast/http/impl/fields.ipp \ + /usr/include/boost/beast/http/impl/message.hpp \ + /usr/include/boost/beast/http/string_body.hpp \ + /usr/include/boost/beast/core/buffers_range.hpp \ + /usr/include/boost/beast/core/detail/buffers_range_adaptor.hpp \ + /usr/include/boost/beast/websocket/impl/rfc6455.hpp \ + /usr/include/boost/beast/websocket/stream_base.hpp \ + /usr/include/boost/beast/websocket/detail/decorator.hpp \ + /usr/include/boost/beast/websocket/stream_fwd.hpp \ + /usr/include/boost/beast/websocket/detail/hybi13.hpp \ + /usr/include/boost/beast/core/detail/base64.hpp \ + /usr/include/boost/beast/core/detail/base64.ipp \ + /usr/include/boost/beast/websocket/detail/hybi13.ipp \ + /usr/include/boost/beast/core/detail/sha1.hpp \ + /usr/include/boost/beast/core/detail/sha1.ipp \ + /usr/include/boost/beast/websocket/detail/prng.hpp \ + /usr/include/c++/11/random \ + /usr/include/c++/11/bits/random.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/opt_random.h \ + /usr/include/c++/11/bits/random.tcc \ + /usr/include/c++/11/numeric \ + /usr/include/c++/11/bits/stl_numeric.h \ + /usr/include/boost/beast/websocket/detail/prng.ipp \ + /usr/include/boost/beast/core/detail/chacha.hpp \ + /usr/include/boost/beast/core/detail/pcg.hpp \ + /usr/include/boost/beast/websocket/detail/impl_base.hpp \ + /usr/include/boost/beast/websocket/detail/frame.hpp \ + /usr/include/boost/beast/websocket/detail/utf8_checker.hpp \ + /usr/include/boost/beast/websocket/detail/utf8_checker.ipp \ + /usr/include/boost/beast/core/flat_static_buffer.hpp \ + /usr/include/boost/beast/core/impl/flat_static_buffer.hpp \ + /usr/include/boost/beast/core/impl/flat_static_buffer.ipp \ + /usr/include/boost/endian/conversion.hpp \ + /usr/include/boost/endian/detail/endian_reverse.hpp \ + /usr/include/boost/endian/detail/integral_by_size.hpp \ + /usr/include/boost/endian/detail/intrinsic.hpp \ + /usr/include/boost/endian/detail/is_scoped_enum.hpp \ + /usr/include/boost/type_traits/is_convertible.hpp \ + /usr/include/boost/type_traits/is_abstract.hpp \ + /usr/include/boost/type_traits/add_lvalue_reference.hpp \ + /usr/include/boost/type_traits/add_reference.hpp \ + /usr/include/boost/endian/detail/endian_load.hpp \ + /usr/include/boost/endian/detail/order.hpp \ + /usr/include/boost/core/scoped_enum.hpp \ + /usr/include/boost/endian/detail/is_trivially_copyable.hpp \ + /usr/include/boost/type_traits/has_trivial_copy.hpp \ + /usr/include/boost/type_traits/is_copy_constructible.hpp \ + /usr/include/boost/type_traits/has_trivial_assign.hpp \ + /usr/include/boost/type_traits/has_trivial_destructor.hpp \ + /usr/include/boost/type_traits/is_signed.hpp \ + /usr/include/boost/endian/detail/endian_store.hpp \ + /usr/include/boost/beast/websocket/detail/pmd_extension.hpp \ + /usr/include/boost/beast/websocket/detail/pmd_extension.ipp \ + /usr/include/boost/beast/zlib/deflate_stream.hpp \ + /usr/include/boost/beast/zlib/error.hpp \ + /usr/include/boost/beast/zlib/impl/error.hpp \ + /usr/include/boost/beast/zlib/impl/error.ipp \ + /usr/include/boost/beast/zlib/zlib.hpp \ + /usr/include/boost/beast/zlib/detail/deflate_stream.hpp \ + /usr/include/boost/beast/zlib/detail/ranges.hpp \ + /usr/include/boost/beast/zlib/detail/deflate_stream.ipp \ + /usr/include/boost/make_unique.hpp \ + /usr/include/boost/smart_ptr/make_unique.hpp \ + /usr/include/boost/beast/zlib/inflate_stream.hpp \ + /usr/include/boost/beast/zlib/detail/inflate_stream.hpp \ + /usr/include/boost/beast/zlib/detail/bitstream.hpp \ + /usr/include/boost/beast/zlib/detail/window.hpp \ + /usr/include/boost/beast/zlib/detail/inflate_stream.ipp \ + /usr/include/boost/beast/core/buffers_suffix.hpp \ + /usr/include/boost/beast/core/impl/buffers_suffix.hpp \ + /usr/include/boost/type_traits.hpp \ + /usr/include/boost/type_traits/add_cv.hpp \ + /usr/include/boost/type_traits/aligned_storage.hpp \ + /usr/include/boost/type_traits/common_type.hpp \ + /usr/include/boost/type_traits/detail/mp_defer.hpp \ + /usr/include/boost/type_traits/conjunction.hpp \ + /usr/include/boost/type_traits/copy_cv_ref.hpp \ + /usr/include/boost/type_traits/copy_reference.hpp \ + /usr/include/boost/type_traits/disjunction.hpp \ + /usr/include/boost/type_traits/floating_point_promotion.hpp \ + /usr/include/boost/type_traits/function_traits.hpp \ + /usr/include/boost/type_traits/has_bit_and.hpp \ + /usr/include/boost/type_traits/detail/has_binary_operator.hpp \ + /usr/include/boost/type_traits/has_bit_and_assign.hpp \ + /usr/include/boost/type_traits/has_bit_or.hpp \ + /usr/include/boost/type_traits/has_bit_or_assign.hpp \ + /usr/include/boost/type_traits/has_bit_xor.hpp \ + /usr/include/boost/type_traits/has_bit_xor_assign.hpp \ + /usr/include/boost/type_traits/has_complement.hpp \ + /usr/include/boost/type_traits/detail/has_prefix_operator.hpp \ + /usr/include/boost/type_traits/has_dereference.hpp \ + /usr/include/boost/type_traits/has_divides.hpp \ + /usr/include/boost/type_traits/has_divides_assign.hpp \ + /usr/include/boost/type_traits/has_equal_to.hpp \ + /usr/include/boost/type_traits/has_greater.hpp \ + /usr/include/boost/type_traits/has_greater_equal.hpp \ + /usr/include/boost/type_traits/has_left_shift.hpp \ + /usr/include/boost/type_traits/has_left_shift_assign.hpp \ + /usr/include/boost/type_traits/has_less.hpp \ + /usr/include/boost/type_traits/has_less_equal.hpp \ + /usr/include/boost/type_traits/has_logical_and.hpp \ + /usr/include/boost/type_traits/has_logical_not.hpp \ + /usr/include/boost/type_traits/has_logical_or.hpp \ + /usr/include/boost/type_traits/has_minus.hpp \ + /usr/include/boost/type_traits/remove_pointer.hpp \ + /usr/include/boost/type_traits/has_minus_assign.hpp \ + /usr/include/boost/type_traits/has_modulus.hpp \ + /usr/include/boost/type_traits/has_modulus_assign.hpp \ + /usr/include/boost/type_traits/has_multiplies.hpp \ + /usr/include/boost/type_traits/has_multiplies_assign.hpp \ + /usr/include/boost/type_traits/has_negate.hpp \ + /usr/include/boost/type_traits/has_new_operator.hpp \ + /usr/include/boost/type_traits/has_not_equal_to.hpp \ + /usr/include/boost/type_traits/has_nothrow_copy.hpp \ + /usr/include/boost/type_traits/has_nothrow_destructor.hpp \ + /usr/include/boost/type_traits/has_plus.hpp \ + /usr/include/boost/type_traits/has_plus_assign.hpp \ + /usr/include/boost/type_traits/has_post_decrement.hpp \ + /usr/include/boost/type_traits/detail/has_postfix_operator.hpp \ + /usr/include/boost/type_traits/has_post_increment.hpp \ + /usr/include/boost/type_traits/has_pre_decrement.hpp \ + /usr/include/boost/type_traits/has_pre_increment.hpp \ + /usr/include/boost/type_traits/has_right_shift.hpp \ + /usr/include/boost/type_traits/has_right_shift_assign.hpp \ + /usr/include/boost/type_traits/has_trivial_constructor.hpp \ + /usr/include/boost/type_traits/has_trivial_move_constructor.hpp \ + /usr/include/boost/type_traits/has_unary_minus.hpp \ + /usr/include/boost/type_traits/has_unary_plus.hpp \ + /usr/include/boost/type_traits/has_virtual_destructor.hpp \ + /usr/include/boost/type_traits/is_complex.hpp \ + /usr/include/c++/11/complex \ + /usr/include/boost/type_traits/is_compound.hpp \ + /usr/include/boost/type_traits/is_fundamental.hpp \ + /usr/include/boost/type_traits/is_copy_assignable.hpp \ + /usr/include/boost/type_traits/is_noncopyable.hpp \ + /usr/include/boost/type_traits/is_empty.hpp \ + /usr/include/boost/type_traits/is_final.hpp \ + /usr/include/boost/type_traits/is_float.hpp \ + /usr/include/boost/type_traits/is_list_constructible.hpp \ + /usr/include/boost/type_traits/is_member_object_pointer.hpp \ + /usr/include/boost/type_traits/is_nothrow_swappable.hpp \ + /usr/include/boost/type_traits/is_object.hpp \ + /usr/include/boost/type_traits/is_polymorphic.hpp \ + /usr/include/boost/type_traits/is_scoped_enum.hpp \ + /usr/include/boost/type_traits/negation.hpp \ + /usr/include/boost/type_traits/is_stateless.hpp \ + /usr/include/boost/type_traits/is_trivially_copyable.hpp \ + /usr/include/boost/type_traits/is_union.hpp \ + /usr/include/boost/type_traits/is_unscoped_enum.hpp \ + /usr/include/boost/type_traits/is_unsigned.hpp \ + /usr/include/boost/type_traits/is_virtual_base_of.hpp \ + /usr/include/boost/type_traits/make_signed.hpp \ + /usr/include/boost/type_traits/make_unsigned.hpp \ + /usr/include/boost/type_traits/rank.hpp \ + /usr/include/boost/type_traits/remove_all_extents.hpp \ + /usr/include/boost/type_traits/remove_cv_ref.hpp \ + /usr/include/boost/type_traits/remove_volatile.hpp \ + /usr/include/boost/type_traits/integral_promotion.hpp \ + /usr/include/boost/type_traits/promote.hpp \ + /usr/include/boost/beast/websocket/impl/stream_impl.hpp \ + /usr/include/boost/beast/websocket/detail/mask.hpp \ + /usr/include/boost/beast/websocket/detail/mask.ipp \ + /usr/include/boost/beast/websocket/detail/service.hpp \ + /usr/include/boost/beast/core/detail/service_base.hpp \ + /usr/include/boost/beast/websocket/detail/service.ipp \ + /usr/include/boost/beast/websocket/detail/soft_mutex.hpp \ + /usr/include/boost/beast/http/read.hpp \ + /usr/include/boost/beast/http/basic_parser.hpp \ + /usr/include/boost/beast/http/detail/basic_parser.hpp \ + /usr/include/boost/beast/core/detail/char_buffer.hpp \ + /usr/include/boost/beast/http/detail/basic_parser.ipp \ + /usr/include/boost/beast/http/impl/basic_parser.hpp \ + /usr/include/boost/beast/http/impl/basic_parser.ipp \ + /usr/include/boost/beast/http/impl/read.hpp \ + /usr/include/boost/beast/http/parser.hpp \ + /usr/include/boost/beast/http/impl/parser.hpp \ + /usr/include/boost/beast/core/detail/buffer.hpp \ + /usr/include/boost/beast/core/detail/read.hpp \ + /usr/include/boost/beast/core/detail/impl/read.hpp \ + /usr/include/boost/beast/core/read_size.hpp \ + /usr/include/boost/beast/core/impl/read_size.hpp \ + /usr/include/boost/beast/http/write.hpp \ + /usr/include/boost/beast/http/serializer.hpp \ + /usr/include/boost/beast/http/impl/serializer.hpp \ + /usr/include/boost/beast/http/impl/write.hpp \ + /usr/include/boost/beast/core/make_printable.hpp \ + /usr/include/boost/beast/core/saved_handler.hpp \ + /usr/include/boost/beast/core/impl/saved_handler.hpp \ + /usr/include/boost/beast/core/impl/saved_handler.ipp \ + /usr/include/boost/beast/core/static_buffer.hpp \ + /usr/include/boost/beast/core/detail/buffers_pair.hpp \ + /usr/include/boost/beast/core/impl/static_buffer.hpp \ + /usr/include/boost/beast/core/impl/static_buffer.ipp \ + /usr/include/boost/beast/websocket/impl/accept.hpp \ + /usr/include/boost/beast/websocket/detail/type_traits.hpp \ + /usr/include/boost/beast/version.hpp \ + /usr/include/boost/beast/websocket/impl/close.hpp \ + /usr/include/boost/beast/websocket/impl/handshake.hpp \ + /usr/include/boost/beast/core/flat_buffer.hpp \ + /usr/include/boost/beast/core/impl/flat_buffer.hpp \ + /usr/include/boost/beast/websocket/impl/ping.hpp \ + /usr/include/boost/beast/websocket/impl/read.hpp \ + /usr/include/boost/beast/websocket/impl/stream.hpp \ + /usr/include/boost/beast/websocket/impl/write.hpp \ + include/LibLsp/JsonRpc/RemoteEndPoint.h \ + include/LibLsp/lsp/lsp_diagnostic.h \ + include/LibLsp/lsp/lsRange.h \ + include/LibLsp/JsonRpc/serializer.h \ + include/LibLsp/JsonRpc/macro_map.h \ + include/LibLsp/lsp/lsPosition.h \ + include/LibLsp/lsp/lsTextEdit.h \ + include/LibLsp/lsp/lsDocumentUri.h \ + include/LibLsp/lsp/lsResponseError.h \ + include/LibLsp/lsp/lsAny.h \ + include/LibLsp/JsonRpc/message.h \ + /usr/include/c++/11/iostream \ + include/LibLsp/lsp/method_type.h \ + include/LibLsp/lsp/location_type.h \ + include/LibLsp/JsonRpc/RequestInMessage.h \ + include/LibLsp/JsonRpc/lsRequestId.h \ + include/LibLsp/JsonRpc/lsResponseMessage.h \ + include/LibLsp/JsonRpc/Cancellation.h \ + include/LibLsp/JsonRpc/NotificationInMessage.h \ + include/LibLsp/JsonRpc/traits.h \ + include/LibLsp/JsonRpc/threaded_queue.h \ + /usr/include/c++/11/deque \ + /usr/include/c++/11/bits/stl_deque.h \ + /usr/include/c++/11/bits/deque.tcc \ + /usr/include/c++/11/unordered_map \ + /usr/include/c++/11/bits/hashtable.h \ + /usr/include/c++/11/bits/hashtable_policy.h \ + /usr/include/c++/11/bits/unordered_map.h \ + include/LibLsp/JsonRpc/MessageJsonHandler.h \ + include/LibLsp/JsonRpc/Endpoint.h \ + include/LibLsp/JsonRpc/stream.h \ + /usr/include/boost/beast/core.hpp \ + /usr/include/boost/beast/core/buffered_read_stream.hpp \ + /usr/include/boost/beast/core/multi_buffer.hpp \ + /usr/include/boost/beast/core/impl/multi_buffer.hpp \ + /usr/include/boost/beast/core/impl/buffered_read_stream.hpp \ + /usr/include/boost/beast/core/buffers_adaptor.hpp \ + /usr/include/boost/beast/core/impl/buffers_adaptor.hpp \ + /usr/include/boost/beast/core/buffers_to_string.hpp \ + /usr/include/boost/beast/core/detect_ssl.hpp \ + /usr/include/boost/logic/tribool.hpp \ + /usr/include/boost/logic/tribool_fwd.hpp \ + /usr/include/boost/asio/yield.hpp \ + /usr/include/boost/asio/coroutine.hpp \ + /usr/include/boost/asio/unyield.hpp \ + /usr/include/boost/beast/core/file.hpp \ + /usr/include/boost/beast/core/file_base.hpp \ + /usr/include/boost/beast/core/file_posix.hpp \ + /usr/include/boost/beast/core/impl/file_posix.ipp \ + /usr/include/boost/beast/core/file_stdio.hpp \ + /usr/include/boost/beast/core/impl/file_stdio.ipp \ + /usr/include/boost/beast/core/detail/win32_unicode_path.hpp \ + /usr/include/boost/beast/core/file_win32.hpp \ + /usr/include/boost/beast/core/flat_stream.hpp \ + /usr/include/boost/beast/core/detail/flat_stream.hpp \ + /usr/include/boost/beast/core/impl/flat_stream.hpp \ + /usr/include/boost/beast/core/ostream.hpp \ + /usr/include/boost/beast/core/detail/ostream.hpp \ + /usr/include/boost/beast/core/span.hpp \ + /usr/include/boost/beast/websocket.hpp + +CMakeFiles/lspcpp.dir/src/jsonrpc/message.cpp.o: src/jsonrpc/message.cpp \ + /usr/include/stdc-predef.h \ + include/LibLsp/JsonRpc/message.h \ + /usr/include/c++/11/atomic \ + /usr/include/c++/11/bits/atomic_base.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/c++config.h \ + /usr/include/bits/wordsize.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/os_defines.h \ + /usr/include/features.h \ + /usr/include/sys/cdefs.h \ + /usr/include/bits/long-double.h \ + /usr/include/gnu/stubs.h \ + /usr/include/gnu/stubs-64.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/cpu_defines.h \ + /usr/lib/gcc/x86_64-redhat-linux/11/include/stdint.h \ + /usr/include/stdint.h \ + /usr/include/bits/libc-header-start.h \ + /usr/include/bits/types.h \ + /usr/include/bits/timesize.h \ + /usr/include/bits/typesizes.h \ + /usr/include/bits/time64.h \ + /usr/include/bits/wchar.h \ + /usr/include/bits/stdint-intn.h \ + /usr/include/bits/stdint-uintn.h \ + /usr/include/c++/11/bits/atomic_lockfree_defines.h \ + /usr/include/c++/11/bits/move.h \ + /usr/include/c++/11/type_traits \ + /usr/include/c++/11/string \ + /usr/include/c++/11/bits/stringfwd.h \ + /usr/include/c++/11/bits/memoryfwd.h \ + /usr/include/c++/11/bits/char_traits.h \ + /usr/include/c++/11/bits/stl_algobase.h \ + /usr/include/c++/11/bits/functexcept.h \ + /usr/include/c++/11/bits/exception_defines.h \ + /usr/include/c++/11/bits/cpp_type_traits.h \ + /usr/include/c++/11/ext/type_traits.h \ + /usr/include/c++/11/ext/numeric_traits.h \ + /usr/include/c++/11/bits/stl_pair.h \ + /usr/include/c++/11/bits/stl_iterator_base_types.h \ + /usr/include/c++/11/bits/stl_iterator_base_funcs.h \ + /usr/include/c++/11/bits/concept_check.h \ + /usr/include/c++/11/debug/assertions.h \ + /usr/include/c++/11/bits/stl_iterator.h \ + /usr/include/c++/11/bits/ptr_traits.h \ + /usr/include/c++/11/debug/debug.h \ + /usr/include/c++/11/bits/predefined_ops.h \ + /usr/include/c++/11/bits/postypes.h \ + /usr/include/c++/11/cwchar \ + /usr/include/wchar.h \ + /usr/include/bits/floatn.h \ + /usr/include/bits/floatn-common.h \ + /usr/lib/gcc/x86_64-redhat-linux/11/include/stddef.h \ + /usr/lib/gcc/x86_64-redhat-linux/11/include/stdarg.h \ + /usr/include/bits/types/wint_t.h \ + /usr/include/bits/types/mbstate_t.h \ + /usr/include/bits/types/__mbstate_t.h \ + /usr/include/bits/types/__FILE.h \ + /usr/include/bits/types/FILE.h \ + /usr/include/bits/types/locale_t.h \ + /usr/include/bits/types/__locale_t.h \ + /usr/include/c++/11/cstdint \ + /usr/include/c++/11/bits/allocator.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/c++allocator.h \ + /usr/include/c++/11/ext/new_allocator.h \ + /usr/include/c++/11/new \ + /usr/include/c++/11/bits/exception.h \ + /usr/include/c++/11/bits/localefwd.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/c++locale.h \ + /usr/include/c++/11/clocale \ + /usr/include/locale.h \ + /usr/include/bits/locale.h \ + /usr/include/c++/11/iosfwd \ + /usr/include/c++/11/cctype \ + /usr/include/ctype.h \ + /usr/include/bits/endian.h \ + /usr/include/bits/endianness.h \ + /usr/include/c++/11/bits/ostream_insert.h \ + /usr/include/c++/11/bits/cxxabi_forced.h \ + /usr/include/c++/11/bits/stl_function.h \ + /usr/include/c++/11/backward/binders.h \ + /usr/include/c++/11/bits/range_access.h \ + /usr/include/c++/11/initializer_list \ + /usr/include/c++/11/bits/basic_string.h \ + /usr/include/c++/11/ext/atomicity.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/gthr.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/gthr-default.h \ + /usr/include/pthread.h \ + /usr/include/sched.h \ + /usr/include/bits/types/time_t.h \ + /usr/include/bits/types/struct_timespec.h \ + /usr/include/bits/sched.h \ + /usr/include/bits/types/struct_sched_param.h \ + /usr/include/bits/cpu-set.h \ + /usr/include/time.h \ + /usr/include/bits/time.h \ + /usr/include/bits/timex.h \ + /usr/include/bits/types/struct_timeval.h \ + /usr/include/bits/types/clock_t.h \ + /usr/include/bits/types/struct_tm.h \ + /usr/include/bits/types/clockid_t.h \ + /usr/include/bits/types/timer_t.h \ + /usr/include/bits/types/struct_itimerspec.h \ + /usr/include/bits/pthreadtypes.h \ + /usr/include/bits/thread-shared-types.h \ + /usr/include/bits/pthreadtypes-arch.h \ + /usr/include/bits/struct_mutex.h \ + /usr/include/bits/struct_rwlock.h \ + /usr/include/bits/setjmp.h \ + /usr/include/bits/types/__sigset_t.h \ + /usr/include/bits/types/struct___jmp_buf_tag.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/atomic_word.h \ + /usr/include/sys/single_threaded.h \ + /usr/include/c++/11/ext/alloc_traits.h \ + /usr/include/c++/11/bits/alloc_traits.h \ + /usr/include/c++/11/bits/stl_construct.h \ + /usr/include/c++/11/ext/string_conversions.h \ + /usr/include/c++/11/cstdlib \ + /usr/include/stdlib.h \ + /usr/include/bits/waitflags.h \ + /usr/include/bits/waitstatus.h \ + /usr/include/sys/types.h \ + /usr/include/endian.h \ + /usr/include/bits/byteswap.h \ + /usr/include/bits/uintn-identity.h \ + /usr/include/sys/select.h \ + /usr/include/bits/select.h \ + /usr/include/bits/types/sigset_t.h \ + /usr/include/alloca.h \ + /usr/include/bits/stdlib-bsearch.h \ + /usr/include/bits/stdlib-float.h \ + /usr/include/c++/11/bits/std_abs.h \ + /usr/include/c++/11/cstdio \ + /usr/include/stdio.h \ + /usr/include/bits/types/__fpos_t.h \ + /usr/include/bits/types/__fpos64_t.h \ + /usr/include/bits/types/struct_FILE.h \ + /usr/include/bits/types/cookie_io_functions_t.h \ + /usr/include/bits/stdio_lim.h \ + /usr/include/bits/stdio.h \ + /usr/include/c++/11/cerrno \ + /usr/include/errno.h \ + /usr/include/bits/errno.h \ + /usr/include/linux/errno.h \ + /usr/include/asm/errno.h \ + /usr/include/asm-generic/errno.h \ + /usr/include/asm-generic/errno-base.h \ + /usr/include/bits/types/error_t.h \ + /usr/include/c++/11/bits/charconv.h \ + /usr/include/c++/11/bits/functional_hash.h \ + /usr/include/c++/11/bits/hash_bytes.h \ + /usr/include/c++/11/bits/basic_string.tcc \ + /usr/include/c++/11/iostream \ + /usr/include/c++/11/ostream \ + /usr/include/c++/11/ios \ + /usr/include/c++/11/exception \ + /usr/include/c++/11/bits/exception_ptr.h \ + /usr/include/c++/11/bits/cxxabi_init_exception.h \ + /usr/include/c++/11/typeinfo \ + /usr/include/c++/11/bits/nested_exception.h \ + /usr/include/c++/11/bits/ios_base.h \ + /usr/include/c++/11/bits/locale_classes.h \ + /usr/include/c++/11/bits/locale_classes.tcc \ + /usr/include/c++/11/system_error \ + /usr/include/c++/11/x86_64-redhat-linux/bits/error_constants.h \ + /usr/include/c++/11/stdexcept \ + /usr/include/c++/11/streambuf \ + /usr/include/c++/11/bits/streambuf.tcc \ + /usr/include/c++/11/bits/basic_ios.h \ + /usr/include/c++/11/bits/locale_facets.h \ + /usr/include/c++/11/cwctype \ + /usr/include/wctype.h \ + /usr/include/bits/wctype-wchar.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/ctype_base.h \ + /usr/include/c++/11/bits/streambuf_iterator.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/ctype_inline.h \ + /usr/include/c++/11/bits/locale_facets.tcc \ + /usr/include/c++/11/bits/basic_ios.tcc \ + /usr/include/c++/11/bits/ostream.tcc \ + /usr/include/c++/11/istream \ + /usr/include/c++/11/bits/istream.tcc \ + include/LibLsp/JsonRpc/serializer.h \ + include/LibLsp/JsonRpc/macro_map.h \ + /usr/include/boost/optional.hpp \ + /usr/include/boost/optional/optional.hpp \ + /usr/include/boost/assert.hpp \ + /usr/include/assert.h \ + /usr/include/boost/core/addressof.hpp \ + /usr/include/boost/config.hpp \ + /usr/include/boost/config/user.hpp \ + /usr/include/boost/config/detail/select_compiler_config.hpp \ + /usr/include/boost/config/compiler/gcc.hpp \ + /usr/include/c++/11/cstddef \ + /usr/include/boost/config/detail/select_stdlib_config.hpp \ + /usr/include/c++/11/version \ + /usr/include/boost/config/stdlib/libstdcpp3.hpp \ + /usr/include/unistd.h \ + /usr/include/bits/posix_opt.h \ + /usr/include/bits/environments.h \ + /usr/include/bits/confname.h \ + /usr/include/bits/getopt_posix.h \ + /usr/include/bits/getopt_core.h \ + /usr/include/bits/unistd_ext.h \ + /usr/include/boost/config/detail/select_platform_config.hpp \ + /usr/include/boost/config/platform/linux.hpp \ + /usr/include/boost/config/detail/posix_features.hpp \ + /usr/include/boost/config/detail/suffix.hpp \ + /usr/include/boost/config/helper_macros.hpp \ + /usr/include/boost/core/enable_if.hpp \ + /usr/include/boost/core/explicit_operator_bool.hpp \ + /usr/include/boost/config/workaround.hpp \ + /usr/include/boost/core/swap.hpp \ + /usr/include/c++/11/utility \ + /usr/include/c++/11/bits/stl_relops.h \ + /usr/include/boost/optional/bad_optional_access.hpp \ + /usr/include/boost/static_assert.hpp \ + /usr/include/boost/detail/workaround.hpp \ + /usr/include/boost/throw_exception.hpp \ + /usr/include/boost/assert/source_location.hpp \ + /usr/include/boost/current_function.hpp \ + /usr/include/boost/cstdint.hpp \ + /usr/include/boost/exception/exception.hpp \ + /usr/include/boost/type.hpp \ + /usr/include/boost/type_traits/alignment_of.hpp \ + /usr/include/boost/type_traits/intrinsics.hpp \ + /usr/include/boost/type_traits/detail/config.hpp \ + /usr/include/boost/version.hpp \ + /usr/include/boost/type_traits/integral_constant.hpp \ + /usr/include/boost/type_traits/conditional.hpp \ + /usr/include/boost/type_traits/has_nothrow_constructor.hpp \ + /usr/include/boost/type_traits/is_default_constructible.hpp \ + /usr/include/boost/type_traits/is_complete.hpp \ + /usr/include/boost/type_traits/declval.hpp \ + /usr/include/boost/type_traits/add_rvalue_reference.hpp \ + /usr/include/boost/type_traits/is_void.hpp \ + /usr/include/boost/type_traits/is_reference.hpp \ + /usr/include/boost/type_traits/is_lvalue_reference.hpp \ + /usr/include/boost/type_traits/is_rvalue_reference.hpp \ + /usr/include/boost/type_traits/remove_reference.hpp \ + /usr/include/boost/type_traits/is_function.hpp \ + /usr/include/boost/type_traits/detail/is_function_cxx_11.hpp \ + /usr/include/boost/type_traits/detail/yes_no_type.hpp \ + /usr/include/boost/type_traits/type_with_alignment.hpp \ + /usr/include/boost/type_traits/is_pod.hpp \ + /usr/include/boost/type_traits/is_scalar.hpp \ + /usr/include/boost/type_traits/is_arithmetic.hpp \ + /usr/include/boost/type_traits/is_integral.hpp \ + /usr/include/boost/type_traits/is_floating_point.hpp \ + /usr/include/boost/type_traits/is_enum.hpp \ + /usr/include/boost/type_traits/is_pointer.hpp \ + /usr/include/boost/type_traits/is_member_pointer.hpp \ + /usr/include/boost/type_traits/is_member_function_pointer.hpp \ + /usr/include/boost/type_traits/detail/is_member_function_pointer_cxx_11.hpp \ + /usr/include/boost/type_traits/remove_const.hpp \ + /usr/include/boost/type_traits/decay.hpp \ + /usr/include/boost/type_traits/is_array.hpp \ + /usr/include/boost/type_traits/remove_bounds.hpp \ + /usr/include/boost/type_traits/remove_extent.hpp \ + /usr/include/boost/type_traits/add_pointer.hpp \ + /usr/include/boost/type_traits/remove_cv.hpp \ + /usr/include/boost/type_traits/is_base_of.hpp \ + /usr/include/boost/type_traits/is_base_and_derived.hpp \ + /usr/include/boost/type_traits/is_same.hpp \ + /usr/include/boost/type_traits/is_class.hpp \ + /usr/include/boost/type_traits/is_const.hpp \ + /usr/include/boost/type_traits/is_constructible.hpp \ + /usr/include/boost/type_traits/is_destructible.hpp \ + /usr/include/boost/type_traits/is_nothrow_move_assignable.hpp \ + /usr/include/boost/type_traits/has_trivial_move_assign.hpp \ + /usr/include/boost/type_traits/is_assignable.hpp \ + /usr/include/boost/type_traits/is_volatile.hpp \ + /usr/include/boost/type_traits/has_nothrow_assign.hpp \ + /usr/include/boost/type_traits/enable_if.hpp \ + /usr/include/boost/type_traits/is_nothrow_move_constructible.hpp \ + /usr/include/boost/move/utility.hpp \ + /usr/include/boost/move/detail/config_begin.hpp \ + /usr/include/boost/move/detail/workaround.hpp \ + /usr/include/boost/move/utility_core.hpp \ + /usr/include/boost/move/core.hpp \ + /usr/include/boost/move/detail/config_end.hpp \ + /usr/include/boost/move/detail/meta_utils.hpp \ + /usr/include/boost/move/detail/meta_utils_core.hpp \ + /usr/include/boost/move/traits.hpp \ + /usr/include/boost/move/detail/type_traits.hpp \ + /usr/include/boost/none.hpp \ + /usr/include/boost/none_t.hpp \ + /usr/include/boost/utility/compare_pointees.hpp \ + /usr/include/c++/11/functional \ + /usr/include/c++/11/tuple \ + /usr/include/c++/11/array \ + /usr/include/c++/11/bits/uses_allocator.h \ + /usr/include/c++/11/bits/invoke.h \ + /usr/include/c++/11/bits/refwrap.h \ + /usr/include/c++/11/bits/std_function.h \ + /usr/include/boost/utility/result_of.hpp \ + /usr/include/boost/preprocessor/cat.hpp \ + /usr/include/boost/preprocessor/config/config.hpp \ + /usr/include/boost/preprocessor/iteration/iterate.hpp \ + /usr/include/boost/preprocessor/arithmetic/dec.hpp \ + /usr/include/boost/preprocessor/config/limits.hpp \ + /usr/include/boost/preprocessor/arithmetic/limits/dec_256.hpp \ + /usr/include/boost/preprocessor/arithmetic/inc.hpp \ + /usr/include/boost/preprocessor/arithmetic/limits/inc_256.hpp \ + /usr/include/boost/preprocessor/array/elem.hpp \ + /usr/include/boost/preprocessor/array/data.hpp \ + /usr/include/boost/preprocessor/tuple/elem.hpp \ + /usr/include/boost/preprocessor/facilities/expand.hpp \ + /usr/include/boost/preprocessor/facilities/overload.hpp \ + /usr/include/boost/preprocessor/variadic/size.hpp \ + /usr/include/boost/preprocessor/control/iif.hpp \ + /usr/include/boost/preprocessor/facilities/check_empty.hpp \ + /usr/include/boost/preprocessor/variadic/has_opt.hpp \ + /usr/include/boost/preprocessor/variadic/limits/size_64.hpp \ + /usr/include/boost/preprocessor/tuple/rem.hpp \ + /usr/include/boost/preprocessor/tuple/detail/is_single_return.hpp \ + /usr/include/boost/preprocessor/variadic/elem.hpp \ + /usr/include/boost/preprocessor/variadic/limits/elem_64.hpp \ + /usr/include/boost/preprocessor/array/size.hpp \ + /usr/include/boost/preprocessor/slot/slot.hpp \ + /usr/include/boost/preprocessor/slot/detail/def.hpp \ + /usr/include/boost/preprocessor/repetition/enum_params.hpp \ + /usr/include/boost/preprocessor/punctuation/comma_if.hpp \ + /usr/include/boost/preprocessor/control/if.hpp \ + /usr/include/boost/preprocessor/logical/bool.hpp \ + /usr/include/boost/preprocessor/logical/limits/bool_256.hpp \ + /usr/include/boost/preprocessor/facilities/empty.hpp \ + /usr/include/boost/preprocessor/punctuation/comma.hpp \ + /usr/include/boost/preprocessor/repetition/repeat.hpp \ + /usr/include/boost/preprocessor/debug/error.hpp \ + /usr/include/boost/preprocessor/detail/auto_rec.hpp \ + /usr/include/boost/preprocessor/detail/limits/auto_rec_256.hpp \ + /usr/include/boost/preprocessor/tuple/eat.hpp \ + /usr/include/boost/preprocessor/repetition/limits/repeat_256.hpp \ + /usr/include/boost/preprocessor/repetition/enum_trailing_params.hpp \ + /usr/include/boost/preprocessor/repetition/enum_binary_params.hpp \ + /usr/include/boost/preprocessor/repetition/enum_shifted_params.hpp \ + /usr/include/boost/preprocessor/facilities/intercept.hpp \ + /usr/include/boost/preprocessor/facilities/limits/intercept_256.hpp \ + /usr/include/boost/type_traits/type_identity.hpp \ + /usr/include/boost/preprocessor/iteration/detail/iter/forward1.hpp \ + /usr/include/boost/preprocessor/iteration/detail/bounds/lower1.hpp \ + /usr/include/boost/preprocessor/slot/detail/shared.hpp \ + /usr/include/boost/preprocessor/iteration/detail/bounds/upper1.hpp \ + /usr/include/boost/preprocessor/iteration/detail/iter/limits/forward1_256.hpp \ + /usr/include/boost/utility/detail/result_of_iterate.hpp \ + /usr/include/boost/optional/optional_fwd.hpp \ + /usr/include/boost/optional/detail/optional_config.hpp \ + /usr/include/boost/optional/detail/optional_factory_support.hpp \ + /usr/include/boost/optional/detail/optional_aligned_storage.hpp \ + /usr/include/boost/optional/detail/optional_trivially_copyable_base.hpp \ + /usr/include/boost/optional/detail/optional_reference_spec.hpp \ + /usr/include/boost/optional/detail/optional_relops.hpp \ + /usr/include/boost/optional/detail/optional_swap.hpp \ + /usr/include/c++/11/cassert \ + /usr/include/c++/11/memory \ + /usr/include/c++/11/bits/stl_uninitialized.h \ + /usr/include/c++/11/bits/stl_tempbuf.h \ + /usr/include/c++/11/bits/stl_raw_storage_iter.h \ + /usr/include/c++/11/bits/align.h \ + /usr/include/c++/11/bit \ + /usr/include/c++/11/bits/unique_ptr.h \ + /usr/include/c++/11/bits/shared_ptr.h \ + /usr/include/c++/11/bits/shared_ptr_base.h \ + /usr/include/c++/11/bits/allocated_ptr.h \ + /usr/include/c++/11/ext/aligned_buffer.h \ + /usr/include/c++/11/ext/concurrence.h \ + /usr/include/c++/11/bits/shared_ptr_atomic.h \ + /usr/include/c++/11/backward/auto_ptr.h \ + /usr/include/c++/11/vector \ + /usr/include/c++/11/bits/stl_vector.h \ + /usr/include/c++/11/bits/stl_bvector.h \ + /usr/include/c++/11/bits/vector.tcc \ + /usr/include/c++/11/map \ + /usr/include/c++/11/bits/stl_tree.h \ + /usr/include/c++/11/bits/stl_map.h \ + /usr/include/c++/11/bits/stl_multimap.h \ + /usr/include/c++/11/bits/erase_if.h \ + /usr/include/c++/11/algorithm \ + /usr/include/c++/11/bits/stl_algo.h \ + /usr/include/c++/11/bits/algorithmfwd.h \ + /usr/include/c++/11/bits/stl_heap.h \ + /usr/include/c++/11/bits/uniform_int_dist.h \ + include/LibLsp/lsp/method_type.h \ + third_party/rapidjson/include/rapidjson/stringbuffer.h \ + third_party/rapidjson/include/rapidjson/stream.h \ + third_party/rapidjson/include/rapidjson/rapidjson.h \ + /usr/include/c++/11/cstring \ + /usr/include/string.h \ + /usr/include/strings.h \ + /usr/include/inttypes.h \ + third_party/rapidjson/include/rapidjson/encodings.h \ + third_party/rapidjson/include/rapidjson/internal/stack.h \ + third_party/rapidjson/include/rapidjson/allocators.h \ + third_party/rapidjson/include/rapidjson/rapidjson.h \ + third_party/rapidjson/include/rapidjson/internal/meta.h \ + third_party/rapidjson/include/rapidjson/rapidjson.h \ + third_party/rapidjson/include/rapidjson/internal/swap.h \ + third_party/rapidjson/include/rapidjson/rapidjson.h \ + third_party/rapidjson/include/rapidjson/writer.h \ + third_party/rapidjson/include/rapidjson/internal/clzll.h \ + third_party/rapidjson/include/rapidjson/internal/meta.h \ + third_party/rapidjson/include/rapidjson/internal/strfunc.h \ + third_party/rapidjson/include/rapidjson/stream.h \ + third_party/rapidjson/include/rapidjson/internal/dtoa.h \ + third_party/rapidjson/include/rapidjson/internal/itoa.h \ + third_party/rapidjson/include/rapidjson/internal/diyfp.h \ + third_party/rapidjson/include/rapidjson/internal/clzll.h \ + /usr/include/c++/11/limits \ + third_party/rapidjson/include/rapidjson/internal/ieee754.h \ + third_party/rapidjson/include/rapidjson/internal/itoa.h \ + third_party/rapidjson/include/rapidjson/stringbuffer.h \ + include/LibLsp/JsonRpc/lsRequestId.h \ + include/LibLsp/JsonRpc/RequestInMessage.h \ + /usr/include/c++/11/mutex \ + /usr/include/c++/11/chrono \ + /usr/include/c++/11/ratio \ + /usr/include/c++/11/ctime \ + /usr/include/c++/11/bits/parse_numbers.h \ + /usr/include/c++/11/bits/std_mutex.h \ + /usr/include/c++/11/bits/unique_lock.h \ + include/LibLsp/JsonRpc/lsResponseMessage.h \ + include/LibLsp/JsonRpc/Condition.h \ + /usr/include/c++/11/condition_variable \ + include/LibLsp/JsonRpc/json.h \ + third_party/rapidjson/include/rapidjson/document.h \ + third_party/rapidjson/include/rapidjson/reader.h \ + third_party/rapidjson/include/rapidjson/allocators.h \ + third_party/rapidjson/include/rapidjson/encodedstream.h \ + third_party/rapidjson/include/rapidjson/memorystream.h \ + third_party/rapidjson/include/rapidjson/internal/strtod.h \ + third_party/rapidjson/include/rapidjson/internal/biginteger.h \ + third_party/rapidjson/include/rapidjson/internal/pow10.h \ + /usr/include/c++/11/climits \ + /usr/lib/gcc/x86_64-redhat-linux/11/include/limits.h \ + /usr/lib/gcc/x86_64-redhat-linux/11/include/syslimits.h \ + /usr/include/limits.h \ + /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h \ + /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h \ + /usr/include/bits/xopen_lim.h \ + /usr/include/bits/uio_lim.h \ + third_party/rapidjson/include/rapidjson/error/error.h \ + third_party/rapidjson/include/rapidjson/rapidjson.h \ + /usr/include/c++/11/iterator \ + /usr/include/c++/11/bits/stream_iterator.h \ + third_party/rapidjson/include/rapidjson/prettywriter.h \ + third_party/rapidjson/include/rapidjson/writer.h + +CMakeFiles/lspcpp.dir/src/jsonrpc/serializer.cpp.o: src/jsonrpc/serializer.cpp \ + /usr/include/stdc-predef.h \ + include/LibLsp/JsonRpc/serializer.h \ + include/LibLsp/JsonRpc/macro_map.h \ + /usr/include/boost/optional.hpp \ + /usr/include/boost/optional/optional.hpp \ + /usr/include/c++/11/new \ + /usr/include/c++/11/x86_64-redhat-linux/bits/c++config.h \ + /usr/include/bits/wordsize.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/os_defines.h \ + /usr/include/features.h \ + /usr/include/sys/cdefs.h \ + /usr/include/bits/long-double.h \ + /usr/include/gnu/stubs.h \ + /usr/include/gnu/stubs-64.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/cpu_defines.h \ + /usr/include/c++/11/bits/exception.h \ + /usr/include/c++/11/iosfwd \ + /usr/include/c++/11/bits/stringfwd.h \ + /usr/include/c++/11/bits/memoryfwd.h \ + /usr/include/c++/11/bits/postypes.h \ + /usr/include/c++/11/cwchar \ + /usr/include/wchar.h \ + /usr/include/bits/libc-header-start.h \ + /usr/include/bits/floatn.h \ + /usr/include/bits/floatn-common.h \ + /usr/lib/gcc/x86_64-redhat-linux/11/include/stddef.h \ + /usr/lib/gcc/x86_64-redhat-linux/11/include/stdarg.h \ + /usr/include/bits/wchar.h \ + /usr/include/bits/types/wint_t.h \ + /usr/include/bits/types/mbstate_t.h \ + /usr/include/bits/types/__mbstate_t.h \ + /usr/include/bits/types/__FILE.h \ + /usr/include/bits/types/FILE.h \ + /usr/include/bits/types/locale_t.h \ + /usr/include/bits/types/__locale_t.h \ + /usr/include/boost/assert.hpp \ + /usr/include/assert.h \ + /usr/include/boost/core/addressof.hpp \ + /usr/include/boost/config.hpp \ + /usr/include/boost/config/user.hpp \ + /usr/include/boost/config/detail/select_compiler_config.hpp \ + /usr/include/boost/config/compiler/gcc.hpp \ + /usr/include/c++/11/cstddef \ + /usr/include/boost/config/detail/select_stdlib_config.hpp \ + /usr/include/c++/11/version \ + /usr/include/boost/config/stdlib/libstdcpp3.hpp \ + /usr/include/unistd.h \ + /usr/include/bits/posix_opt.h \ + /usr/include/bits/environments.h \ + /usr/include/bits/types.h \ + /usr/include/bits/timesize.h \ + /usr/include/bits/typesizes.h \ + /usr/include/bits/time64.h \ + /usr/include/bits/confname.h \ + /usr/include/bits/getopt_posix.h \ + /usr/include/bits/getopt_core.h \ + /usr/include/bits/unistd_ext.h \ + /usr/include/boost/config/detail/select_platform_config.hpp \ + /usr/include/boost/config/platform/linux.hpp \ + /usr/include/c++/11/cstdlib \ + /usr/include/stdlib.h \ + /usr/include/bits/waitflags.h \ + /usr/include/bits/waitstatus.h \ + /usr/include/sys/types.h \ + /usr/include/bits/types/clock_t.h \ + /usr/include/bits/types/clockid_t.h \ + /usr/include/bits/types/time_t.h \ + /usr/include/bits/types/timer_t.h \ + /usr/include/bits/stdint-intn.h \ + /usr/include/endian.h \ + /usr/include/bits/endian.h \ + /usr/include/bits/endianness.h \ + /usr/include/bits/byteswap.h \ + /usr/include/bits/uintn-identity.h \ + /usr/include/sys/select.h \ + /usr/include/bits/select.h \ + /usr/include/bits/types/sigset_t.h \ + /usr/include/bits/types/__sigset_t.h \ + /usr/include/bits/types/struct_timeval.h \ + /usr/include/bits/types/struct_timespec.h \ + /usr/include/bits/pthreadtypes.h \ + /usr/include/bits/thread-shared-types.h \ + /usr/include/bits/pthreadtypes-arch.h \ + /usr/include/bits/struct_mutex.h \ + /usr/include/bits/struct_rwlock.h \ + /usr/include/alloca.h \ + /usr/include/bits/stdlib-bsearch.h \ + /usr/include/bits/stdlib-float.h \ + /usr/include/c++/11/bits/std_abs.h \ + /usr/include/boost/config/detail/posix_features.hpp \ + /usr/include/boost/config/detail/suffix.hpp \ + /usr/include/boost/config/helper_macros.hpp \ + /usr/include/boost/core/enable_if.hpp \ + /usr/include/boost/core/explicit_operator_bool.hpp \ + /usr/include/boost/config/workaround.hpp \ + /usr/include/boost/core/swap.hpp \ + /usr/include/c++/11/utility \ + /usr/include/c++/11/bits/stl_relops.h \ + /usr/include/c++/11/bits/stl_pair.h \ + /usr/include/c++/11/bits/move.h \ + /usr/include/c++/11/type_traits \ + /usr/include/c++/11/initializer_list \ + /usr/include/boost/optional/bad_optional_access.hpp \ + /usr/include/c++/11/stdexcept \ + /usr/include/c++/11/exception \ + /usr/include/c++/11/bits/exception_ptr.h \ + /usr/include/c++/11/bits/exception_defines.h \ + /usr/include/c++/11/bits/cxxabi_init_exception.h \ + /usr/include/c++/11/typeinfo \ + /usr/include/c++/11/bits/hash_bytes.h \ + /usr/include/c++/11/bits/nested_exception.h \ + /usr/include/c++/11/string \ + /usr/include/c++/11/bits/char_traits.h \ + /usr/include/c++/11/bits/stl_algobase.h \ + /usr/include/c++/11/bits/functexcept.h \ + /usr/include/c++/11/bits/cpp_type_traits.h \ + /usr/include/c++/11/ext/type_traits.h \ + /usr/include/c++/11/ext/numeric_traits.h \ + /usr/include/c++/11/bits/stl_iterator_base_types.h \ + /usr/include/c++/11/bits/stl_iterator_base_funcs.h \ + /usr/include/c++/11/bits/concept_check.h \ + /usr/include/c++/11/debug/assertions.h \ + /usr/include/c++/11/bits/stl_iterator.h \ + /usr/include/c++/11/bits/ptr_traits.h \ + /usr/include/c++/11/debug/debug.h \ + /usr/include/c++/11/bits/predefined_ops.h \ + /usr/include/c++/11/cstdint \ + /usr/lib/gcc/x86_64-redhat-linux/11/include/stdint.h \ + /usr/include/stdint.h \ + /usr/include/bits/stdint-uintn.h \ + /usr/include/c++/11/bits/allocator.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/c++allocator.h \ + /usr/include/c++/11/ext/new_allocator.h \ + /usr/include/c++/11/bits/localefwd.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/c++locale.h \ + /usr/include/c++/11/clocale \ + /usr/include/locale.h \ + /usr/include/bits/locale.h \ + /usr/include/c++/11/cctype \ + /usr/include/ctype.h \ + /usr/include/c++/11/bits/ostream_insert.h \ + /usr/include/c++/11/bits/cxxabi_forced.h \ + /usr/include/c++/11/bits/stl_function.h \ + /usr/include/c++/11/backward/binders.h \ + /usr/include/c++/11/bits/range_access.h \ + /usr/include/c++/11/bits/basic_string.h \ + /usr/include/c++/11/ext/atomicity.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/gthr.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/gthr-default.h \ + /usr/include/pthread.h \ + /usr/include/sched.h \ + /usr/include/bits/sched.h \ + /usr/include/bits/types/struct_sched_param.h \ + /usr/include/bits/cpu-set.h \ + /usr/include/time.h \ + /usr/include/bits/time.h \ + /usr/include/bits/timex.h \ + /usr/include/bits/types/struct_tm.h \ + /usr/include/bits/types/struct_itimerspec.h \ + /usr/include/bits/setjmp.h \ + /usr/include/bits/types/struct___jmp_buf_tag.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/atomic_word.h \ + /usr/include/sys/single_threaded.h \ + /usr/include/c++/11/ext/alloc_traits.h \ + /usr/include/c++/11/bits/alloc_traits.h \ + /usr/include/c++/11/bits/stl_construct.h \ + /usr/include/c++/11/ext/string_conversions.h \ + /usr/include/c++/11/cstdio \ + /usr/include/stdio.h \ + /usr/include/bits/types/__fpos_t.h \ + /usr/include/bits/types/__fpos64_t.h \ + /usr/include/bits/types/struct_FILE.h \ + /usr/include/bits/types/cookie_io_functions_t.h \ + /usr/include/bits/stdio_lim.h \ + /usr/include/bits/stdio.h \ + /usr/include/c++/11/cerrno \ + /usr/include/errno.h \ + /usr/include/bits/errno.h \ + /usr/include/linux/errno.h \ + /usr/include/asm/errno.h \ + /usr/include/asm-generic/errno.h \ + /usr/include/asm-generic/errno-base.h \ + /usr/include/bits/types/error_t.h \ + /usr/include/c++/11/bits/charconv.h \ + /usr/include/c++/11/bits/functional_hash.h \ + /usr/include/c++/11/bits/basic_string.tcc \ + /usr/include/boost/static_assert.hpp \ + /usr/include/boost/detail/workaround.hpp \ + /usr/include/boost/throw_exception.hpp \ + /usr/include/boost/assert/source_location.hpp \ + /usr/include/boost/current_function.hpp \ + /usr/include/boost/cstdint.hpp \ + /usr/include/boost/exception/exception.hpp \ + /usr/include/boost/type.hpp \ + /usr/include/boost/type_traits/alignment_of.hpp \ + /usr/include/boost/type_traits/intrinsics.hpp \ + /usr/include/boost/type_traits/detail/config.hpp \ + /usr/include/boost/version.hpp \ + /usr/include/boost/type_traits/integral_constant.hpp \ + /usr/include/boost/type_traits/conditional.hpp \ + /usr/include/boost/type_traits/has_nothrow_constructor.hpp \ + /usr/include/boost/type_traits/is_default_constructible.hpp \ + /usr/include/boost/type_traits/is_complete.hpp \ + /usr/include/boost/type_traits/declval.hpp \ + /usr/include/boost/type_traits/add_rvalue_reference.hpp \ + /usr/include/boost/type_traits/is_void.hpp \ + /usr/include/boost/type_traits/is_reference.hpp \ + /usr/include/boost/type_traits/is_lvalue_reference.hpp \ + /usr/include/boost/type_traits/is_rvalue_reference.hpp \ + /usr/include/boost/type_traits/remove_reference.hpp \ + /usr/include/boost/type_traits/is_function.hpp \ + /usr/include/boost/type_traits/detail/is_function_cxx_11.hpp \ + /usr/include/boost/type_traits/detail/yes_no_type.hpp \ + /usr/include/boost/type_traits/type_with_alignment.hpp \ + /usr/include/boost/type_traits/is_pod.hpp \ + /usr/include/boost/type_traits/is_scalar.hpp \ + /usr/include/boost/type_traits/is_arithmetic.hpp \ + /usr/include/boost/type_traits/is_integral.hpp \ + /usr/include/boost/type_traits/is_floating_point.hpp \ + /usr/include/boost/type_traits/is_enum.hpp \ + /usr/include/boost/type_traits/is_pointer.hpp \ + /usr/include/boost/type_traits/is_member_pointer.hpp \ + /usr/include/boost/type_traits/is_member_function_pointer.hpp \ + /usr/include/boost/type_traits/detail/is_member_function_pointer_cxx_11.hpp \ + /usr/include/boost/type_traits/remove_const.hpp \ + /usr/include/boost/type_traits/decay.hpp \ + /usr/include/boost/type_traits/is_array.hpp \ + /usr/include/boost/type_traits/remove_bounds.hpp \ + /usr/include/boost/type_traits/remove_extent.hpp \ + /usr/include/boost/type_traits/add_pointer.hpp \ + /usr/include/boost/type_traits/remove_cv.hpp \ + /usr/include/boost/type_traits/is_base_of.hpp \ + /usr/include/boost/type_traits/is_base_and_derived.hpp \ + /usr/include/boost/type_traits/is_same.hpp \ + /usr/include/boost/type_traits/is_class.hpp \ + /usr/include/boost/type_traits/is_const.hpp \ + /usr/include/boost/type_traits/is_constructible.hpp \ + /usr/include/boost/type_traits/is_destructible.hpp \ + /usr/include/boost/type_traits/is_nothrow_move_assignable.hpp \ + /usr/include/boost/type_traits/has_trivial_move_assign.hpp \ + /usr/include/boost/type_traits/is_assignable.hpp \ + /usr/include/boost/type_traits/is_volatile.hpp \ + /usr/include/boost/type_traits/has_nothrow_assign.hpp \ + /usr/include/boost/type_traits/enable_if.hpp \ + /usr/include/boost/type_traits/is_nothrow_move_constructible.hpp \ + /usr/include/boost/move/utility.hpp \ + /usr/include/boost/move/detail/config_begin.hpp \ + /usr/include/boost/move/detail/workaround.hpp \ + /usr/include/boost/move/utility_core.hpp \ + /usr/include/boost/move/core.hpp \ + /usr/include/boost/move/detail/config_end.hpp \ + /usr/include/boost/move/detail/meta_utils.hpp \ + /usr/include/boost/move/detail/meta_utils_core.hpp \ + /usr/include/boost/move/traits.hpp \ + /usr/include/boost/move/detail/type_traits.hpp \ + /usr/include/boost/none.hpp \ + /usr/include/boost/none_t.hpp \ + /usr/include/boost/utility/compare_pointees.hpp \ + /usr/include/c++/11/functional \ + /usr/include/c++/11/tuple \ + /usr/include/c++/11/array \ + /usr/include/c++/11/bits/uses_allocator.h \ + /usr/include/c++/11/bits/invoke.h \ + /usr/include/c++/11/bits/refwrap.h \ + /usr/include/c++/11/bits/std_function.h \ + /usr/include/boost/utility/result_of.hpp \ + /usr/include/boost/preprocessor/cat.hpp \ + /usr/include/boost/preprocessor/config/config.hpp \ + /usr/include/boost/preprocessor/iteration/iterate.hpp \ + /usr/include/boost/preprocessor/arithmetic/dec.hpp \ + /usr/include/boost/preprocessor/config/limits.hpp \ + /usr/include/boost/preprocessor/arithmetic/limits/dec_256.hpp \ + /usr/include/boost/preprocessor/arithmetic/inc.hpp \ + /usr/include/boost/preprocessor/arithmetic/limits/inc_256.hpp \ + /usr/include/boost/preprocessor/array/elem.hpp \ + /usr/include/boost/preprocessor/array/data.hpp \ + /usr/include/boost/preprocessor/tuple/elem.hpp \ + /usr/include/boost/preprocessor/facilities/expand.hpp \ + /usr/include/boost/preprocessor/facilities/overload.hpp \ + /usr/include/boost/preprocessor/variadic/size.hpp \ + /usr/include/boost/preprocessor/control/iif.hpp \ + /usr/include/boost/preprocessor/facilities/check_empty.hpp \ + /usr/include/boost/preprocessor/variadic/has_opt.hpp \ + /usr/include/boost/preprocessor/variadic/limits/size_64.hpp \ + /usr/include/boost/preprocessor/tuple/rem.hpp \ + /usr/include/boost/preprocessor/tuple/detail/is_single_return.hpp \ + /usr/include/boost/preprocessor/variadic/elem.hpp \ + /usr/include/boost/preprocessor/variadic/limits/elem_64.hpp \ + /usr/include/boost/preprocessor/array/size.hpp \ + /usr/include/boost/preprocessor/slot/slot.hpp \ + /usr/include/boost/preprocessor/slot/detail/def.hpp \ + /usr/include/boost/preprocessor/repetition/enum_params.hpp \ + /usr/include/boost/preprocessor/punctuation/comma_if.hpp \ + /usr/include/boost/preprocessor/control/if.hpp \ + /usr/include/boost/preprocessor/logical/bool.hpp \ + /usr/include/boost/preprocessor/logical/limits/bool_256.hpp \ + /usr/include/boost/preprocessor/facilities/empty.hpp \ + /usr/include/boost/preprocessor/punctuation/comma.hpp \ + /usr/include/boost/preprocessor/repetition/repeat.hpp \ + /usr/include/boost/preprocessor/debug/error.hpp \ + /usr/include/boost/preprocessor/detail/auto_rec.hpp \ + /usr/include/boost/preprocessor/detail/limits/auto_rec_256.hpp \ + /usr/include/boost/preprocessor/tuple/eat.hpp \ + /usr/include/boost/preprocessor/repetition/limits/repeat_256.hpp \ + /usr/include/boost/preprocessor/repetition/enum_trailing_params.hpp \ + /usr/include/boost/preprocessor/repetition/enum_binary_params.hpp \ + /usr/include/boost/preprocessor/repetition/enum_shifted_params.hpp \ + /usr/include/boost/preprocessor/facilities/intercept.hpp \ + /usr/include/boost/preprocessor/facilities/limits/intercept_256.hpp \ + /usr/include/boost/type_traits/type_identity.hpp \ + /usr/include/boost/preprocessor/iteration/detail/iter/forward1.hpp \ + /usr/include/boost/preprocessor/iteration/detail/bounds/lower1.hpp \ + /usr/include/boost/preprocessor/slot/detail/shared.hpp \ + /usr/include/boost/preprocessor/iteration/detail/bounds/upper1.hpp \ + /usr/include/boost/preprocessor/iteration/detail/iter/limits/forward1_256.hpp \ + /usr/include/boost/utility/detail/result_of_iterate.hpp \ + /usr/include/boost/optional/optional_fwd.hpp \ + /usr/include/boost/optional/detail/optional_config.hpp \ + /usr/include/boost/optional/detail/optional_factory_support.hpp \ + /usr/include/boost/optional/detail/optional_aligned_storage.hpp \ + /usr/include/boost/optional/detail/optional_trivially_copyable_base.hpp \ + /usr/include/boost/optional/detail/optional_reference_spec.hpp \ + /usr/include/boost/optional/detail/optional_relops.hpp \ + /usr/include/boost/optional/detail/optional_swap.hpp \ + /usr/include/c++/11/cassert \ + /usr/include/c++/11/memory \ + /usr/include/c++/11/bits/stl_uninitialized.h \ + /usr/include/c++/11/bits/stl_tempbuf.h \ + /usr/include/c++/11/bits/stl_raw_storage_iter.h \ + /usr/include/c++/11/bits/align.h \ + /usr/include/c++/11/bit \ + /usr/include/c++/11/bits/unique_ptr.h \ + /usr/include/c++/11/bits/shared_ptr.h \ + /usr/include/c++/11/bits/shared_ptr_base.h \ + /usr/include/c++/11/bits/allocated_ptr.h \ + /usr/include/c++/11/ext/aligned_buffer.h \ + /usr/include/c++/11/ext/concurrence.h \ + /usr/include/c++/11/bits/shared_ptr_atomic.h \ + /usr/include/c++/11/bits/atomic_base.h \ + /usr/include/c++/11/bits/atomic_lockfree_defines.h \ + /usr/include/c++/11/backward/auto_ptr.h \ + /usr/include/c++/11/vector \ + /usr/include/c++/11/bits/stl_vector.h \ + /usr/include/c++/11/bits/stl_bvector.h \ + /usr/include/c++/11/bits/vector.tcc \ + /usr/include/c++/11/map \ + /usr/include/c++/11/bits/stl_tree.h \ + /usr/include/c++/11/bits/stl_map.h \ + /usr/include/c++/11/bits/stl_multimap.h \ + /usr/include/c++/11/bits/erase_if.h \ + /usr/include/c++/11/algorithm \ + /usr/include/c++/11/bits/stl_algo.h \ + /usr/include/c++/11/bits/algorithmfwd.h \ + /usr/include/c++/11/bits/stl_heap.h \ + /usr/include/c++/11/bits/uniform_int_dist.h \ + third_party/rapidjson/include/rapidjson/allocators.h \ + third_party/rapidjson/include/rapidjson/rapidjson.h \ + /usr/include/c++/11/cstring \ + /usr/include/string.h \ + /usr/include/strings.h \ + /usr/include/inttypes.h \ + third_party/rapidjson/include/rapidjson/internal/meta.h \ + third_party/rapidjson/include/rapidjson/rapidjson.h \ + include/LibLsp/JsonRpc/json.h \ + third_party/rapidjson/include/rapidjson/document.h \ + third_party/rapidjson/include/rapidjson/reader.h \ + third_party/rapidjson/include/rapidjson/allocators.h \ + third_party/rapidjson/include/rapidjson/stream.h \ + third_party/rapidjson/include/rapidjson/encodings.h \ + third_party/rapidjson/include/rapidjson/encodedstream.h \ + third_party/rapidjson/include/rapidjson/memorystream.h \ + third_party/rapidjson/include/rapidjson/internal/clzll.h \ + third_party/rapidjson/include/rapidjson/internal/stack.h \ + third_party/rapidjson/include/rapidjson/allocators.h \ + third_party/rapidjson/include/rapidjson/internal/swap.h \ + third_party/rapidjson/include/rapidjson/internal/strtod.h \ + third_party/rapidjson/include/rapidjson/internal/ieee754.h \ + third_party/rapidjson/include/rapidjson/internal/biginteger.h \ + third_party/rapidjson/include/rapidjson/internal/diyfp.h \ + third_party/rapidjson/include/rapidjson/internal/clzll.h \ + /usr/include/c++/11/limits \ + third_party/rapidjson/include/rapidjson/internal/pow10.h \ + /usr/include/c++/11/climits \ + /usr/lib/gcc/x86_64-redhat-linux/11/include/limits.h \ + /usr/lib/gcc/x86_64-redhat-linux/11/include/syslimits.h \ + /usr/include/limits.h \ + /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h \ + /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h \ + /usr/include/bits/xopen_lim.h \ + /usr/include/bits/uio_lim.h \ + third_party/rapidjson/include/rapidjson/error/error.h \ + third_party/rapidjson/include/rapidjson/rapidjson.h \ + third_party/rapidjson/include/rapidjson/internal/strfunc.h \ + third_party/rapidjson/include/rapidjson/stream.h \ + third_party/rapidjson/include/rapidjson/rapidjson.h \ + /usr/include/c++/11/iterator \ + /usr/include/c++/11/bits/stream_iterator.h \ + /usr/include/c++/11/bits/streambuf_iterator.h \ + /usr/include/c++/11/streambuf \ + /usr/include/c++/11/bits/ios_base.h \ + /usr/include/c++/11/bits/locale_classes.h \ + /usr/include/c++/11/bits/locale_classes.tcc \ + /usr/include/c++/11/system_error \ + /usr/include/c++/11/x86_64-redhat-linux/bits/error_constants.h \ + /usr/include/c++/11/bits/streambuf.tcc \ + third_party/rapidjson/include/rapidjson/prettywriter.h \ + third_party/rapidjson/include/rapidjson/writer.h \ + third_party/rapidjson/include/rapidjson/internal/dtoa.h \ + third_party/rapidjson/include/rapidjson/internal/itoa.h \ + third_party/rapidjson/include/rapidjson/internal/itoa.h \ + third_party/rapidjson/include/rapidjson/stringbuffer.h + +CMakeFiles/lspcpp.dir/src/jsonrpc/threaded_queue.cpp.o: src/jsonrpc/threaded_queue.cpp \ + /usr/include/stdc-predef.h \ + include/LibLsp/JsonRpc/threaded_queue.h \ + /usr/include/boost/optional/optional.hpp \ + /usr/include/c++/11/new \ + /usr/include/c++/11/x86_64-redhat-linux/bits/c++config.h \ + /usr/include/bits/wordsize.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/os_defines.h \ + /usr/include/features.h \ + /usr/include/sys/cdefs.h \ + /usr/include/bits/long-double.h \ + /usr/include/gnu/stubs.h \ + /usr/include/gnu/stubs-64.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/cpu_defines.h \ + /usr/include/c++/11/bits/exception.h \ + /usr/include/c++/11/iosfwd \ + /usr/include/c++/11/bits/stringfwd.h \ + /usr/include/c++/11/bits/memoryfwd.h \ + /usr/include/c++/11/bits/postypes.h \ + /usr/include/c++/11/cwchar \ + /usr/include/wchar.h \ + /usr/include/bits/libc-header-start.h \ + /usr/include/bits/floatn.h \ + /usr/include/bits/floatn-common.h \ + /usr/lib/gcc/x86_64-redhat-linux/11/include/stddef.h \ + /usr/lib/gcc/x86_64-redhat-linux/11/include/stdarg.h \ + /usr/include/bits/wchar.h \ + /usr/include/bits/types/wint_t.h \ + /usr/include/bits/types/mbstate_t.h \ + /usr/include/bits/types/__mbstate_t.h \ + /usr/include/bits/types/__FILE.h \ + /usr/include/bits/types/FILE.h \ + /usr/include/bits/types/locale_t.h \ + /usr/include/bits/types/__locale_t.h \ + /usr/include/boost/assert.hpp \ + /usr/include/assert.h \ + /usr/include/boost/core/addressof.hpp \ + /usr/include/boost/config.hpp \ + /usr/include/boost/config/user.hpp \ + /usr/include/boost/config/detail/select_compiler_config.hpp \ + /usr/include/boost/config/compiler/gcc.hpp \ + /usr/include/c++/11/cstddef \ + /usr/include/boost/config/detail/select_stdlib_config.hpp \ + /usr/include/c++/11/version \ + /usr/include/boost/config/stdlib/libstdcpp3.hpp \ + /usr/include/unistd.h \ + /usr/include/bits/posix_opt.h \ + /usr/include/bits/environments.h \ + /usr/include/bits/types.h \ + /usr/include/bits/timesize.h \ + /usr/include/bits/typesizes.h \ + /usr/include/bits/time64.h \ + /usr/include/bits/confname.h \ + /usr/include/bits/getopt_posix.h \ + /usr/include/bits/getopt_core.h \ + /usr/include/bits/unistd_ext.h \ + /usr/include/boost/config/detail/select_platform_config.hpp \ + /usr/include/boost/config/platform/linux.hpp \ + /usr/include/c++/11/cstdlib \ + /usr/include/stdlib.h \ + /usr/include/bits/waitflags.h \ + /usr/include/bits/waitstatus.h \ + /usr/include/sys/types.h \ + /usr/include/bits/types/clock_t.h \ + /usr/include/bits/types/clockid_t.h \ + /usr/include/bits/types/time_t.h \ + /usr/include/bits/types/timer_t.h \ + /usr/include/bits/stdint-intn.h \ + /usr/include/endian.h \ + /usr/include/bits/endian.h \ + /usr/include/bits/endianness.h \ + /usr/include/bits/byteswap.h \ + /usr/include/bits/uintn-identity.h \ + /usr/include/sys/select.h \ + /usr/include/bits/select.h \ + /usr/include/bits/types/sigset_t.h \ + /usr/include/bits/types/__sigset_t.h \ + /usr/include/bits/types/struct_timeval.h \ + /usr/include/bits/types/struct_timespec.h \ + /usr/include/bits/pthreadtypes.h \ + /usr/include/bits/thread-shared-types.h \ + /usr/include/bits/pthreadtypes-arch.h \ + /usr/include/bits/struct_mutex.h \ + /usr/include/bits/struct_rwlock.h \ + /usr/include/alloca.h \ + /usr/include/bits/stdlib-bsearch.h \ + /usr/include/bits/stdlib-float.h \ + /usr/include/c++/11/bits/std_abs.h \ + /usr/include/boost/config/detail/posix_features.hpp \ + /usr/include/boost/config/detail/suffix.hpp \ + /usr/include/boost/config/helper_macros.hpp \ + /usr/include/boost/core/enable_if.hpp \ + /usr/include/boost/core/explicit_operator_bool.hpp \ + /usr/include/boost/config/workaround.hpp \ + /usr/include/boost/core/swap.hpp \ + /usr/include/c++/11/utility \ + /usr/include/c++/11/bits/stl_relops.h \ + /usr/include/c++/11/bits/stl_pair.h \ + /usr/include/c++/11/bits/move.h \ + /usr/include/c++/11/type_traits \ + /usr/include/c++/11/initializer_list \ + /usr/include/boost/optional/bad_optional_access.hpp \ + /usr/include/c++/11/stdexcept \ + /usr/include/c++/11/exception \ + /usr/include/c++/11/bits/exception_ptr.h \ + /usr/include/c++/11/bits/exception_defines.h \ + /usr/include/c++/11/bits/cxxabi_init_exception.h \ + /usr/include/c++/11/typeinfo \ + /usr/include/c++/11/bits/hash_bytes.h \ + /usr/include/c++/11/bits/nested_exception.h \ + /usr/include/c++/11/string \ + /usr/include/c++/11/bits/char_traits.h \ + /usr/include/c++/11/bits/stl_algobase.h \ + /usr/include/c++/11/bits/functexcept.h \ + /usr/include/c++/11/bits/cpp_type_traits.h \ + /usr/include/c++/11/ext/type_traits.h \ + /usr/include/c++/11/ext/numeric_traits.h \ + /usr/include/c++/11/bits/stl_iterator_base_types.h \ + /usr/include/c++/11/bits/stl_iterator_base_funcs.h \ + /usr/include/c++/11/bits/concept_check.h \ + /usr/include/c++/11/debug/assertions.h \ + /usr/include/c++/11/bits/stl_iterator.h \ + /usr/include/c++/11/bits/ptr_traits.h \ + /usr/include/c++/11/debug/debug.h \ + /usr/include/c++/11/bits/predefined_ops.h \ + /usr/include/c++/11/cstdint \ + /usr/lib/gcc/x86_64-redhat-linux/11/include/stdint.h \ + /usr/include/stdint.h \ + /usr/include/bits/stdint-uintn.h \ + /usr/include/c++/11/bits/allocator.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/c++allocator.h \ + /usr/include/c++/11/ext/new_allocator.h \ + /usr/include/c++/11/bits/localefwd.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/c++locale.h \ + /usr/include/c++/11/clocale \ + /usr/include/locale.h \ + /usr/include/bits/locale.h \ + /usr/include/c++/11/cctype \ + /usr/include/ctype.h \ + /usr/include/c++/11/bits/ostream_insert.h \ + /usr/include/c++/11/bits/cxxabi_forced.h \ + /usr/include/c++/11/bits/stl_function.h \ + /usr/include/c++/11/backward/binders.h \ + /usr/include/c++/11/bits/range_access.h \ + /usr/include/c++/11/bits/basic_string.h \ + /usr/include/c++/11/ext/atomicity.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/gthr.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/gthr-default.h \ + /usr/include/pthread.h \ + /usr/include/sched.h \ + /usr/include/bits/sched.h \ + /usr/include/bits/types/struct_sched_param.h \ + /usr/include/bits/cpu-set.h \ + /usr/include/time.h \ + /usr/include/bits/time.h \ + /usr/include/bits/timex.h \ + /usr/include/bits/types/struct_tm.h \ + /usr/include/bits/types/struct_itimerspec.h \ + /usr/include/bits/setjmp.h \ + /usr/include/bits/types/struct___jmp_buf_tag.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/atomic_word.h \ + /usr/include/sys/single_threaded.h \ + /usr/include/c++/11/ext/alloc_traits.h \ + /usr/include/c++/11/bits/alloc_traits.h \ + /usr/include/c++/11/bits/stl_construct.h \ + /usr/include/c++/11/ext/string_conversions.h \ + /usr/include/c++/11/cstdio \ + /usr/include/stdio.h \ + /usr/include/bits/types/__fpos_t.h \ + /usr/include/bits/types/__fpos64_t.h \ + /usr/include/bits/types/struct_FILE.h \ + /usr/include/bits/types/cookie_io_functions_t.h \ + /usr/include/bits/stdio_lim.h \ + /usr/include/bits/stdio.h \ + /usr/include/c++/11/cerrno \ + /usr/include/errno.h \ + /usr/include/bits/errno.h \ + /usr/include/linux/errno.h \ + /usr/include/asm/errno.h \ + /usr/include/asm-generic/errno.h \ + /usr/include/asm-generic/errno-base.h \ + /usr/include/bits/types/error_t.h \ + /usr/include/c++/11/bits/charconv.h \ + /usr/include/c++/11/bits/functional_hash.h \ + /usr/include/c++/11/bits/basic_string.tcc \ + /usr/include/boost/static_assert.hpp \ + /usr/include/boost/detail/workaround.hpp \ + /usr/include/boost/throw_exception.hpp \ + /usr/include/boost/assert/source_location.hpp \ + /usr/include/boost/current_function.hpp \ + /usr/include/boost/cstdint.hpp \ + /usr/include/boost/exception/exception.hpp \ + /usr/include/boost/type.hpp \ + /usr/include/boost/type_traits/alignment_of.hpp \ + /usr/include/boost/type_traits/intrinsics.hpp \ + /usr/include/boost/type_traits/detail/config.hpp \ + /usr/include/boost/version.hpp \ + /usr/include/boost/type_traits/integral_constant.hpp \ + /usr/include/boost/type_traits/conditional.hpp \ + /usr/include/boost/type_traits/has_nothrow_constructor.hpp \ + /usr/include/boost/type_traits/is_default_constructible.hpp \ + /usr/include/boost/type_traits/is_complete.hpp \ + /usr/include/boost/type_traits/declval.hpp \ + /usr/include/boost/type_traits/add_rvalue_reference.hpp \ + /usr/include/boost/type_traits/is_void.hpp \ + /usr/include/boost/type_traits/is_reference.hpp \ + /usr/include/boost/type_traits/is_lvalue_reference.hpp \ + /usr/include/boost/type_traits/is_rvalue_reference.hpp \ + /usr/include/boost/type_traits/remove_reference.hpp \ + /usr/include/boost/type_traits/is_function.hpp \ + /usr/include/boost/type_traits/detail/is_function_cxx_11.hpp \ + /usr/include/boost/type_traits/detail/yes_no_type.hpp \ + /usr/include/boost/type_traits/type_with_alignment.hpp \ + /usr/include/boost/type_traits/is_pod.hpp \ + /usr/include/boost/type_traits/is_scalar.hpp \ + /usr/include/boost/type_traits/is_arithmetic.hpp \ + /usr/include/boost/type_traits/is_integral.hpp \ + /usr/include/boost/type_traits/is_floating_point.hpp \ + /usr/include/boost/type_traits/is_enum.hpp \ + /usr/include/boost/type_traits/is_pointer.hpp \ + /usr/include/boost/type_traits/is_member_pointer.hpp \ + /usr/include/boost/type_traits/is_member_function_pointer.hpp \ + /usr/include/boost/type_traits/detail/is_member_function_pointer_cxx_11.hpp \ + /usr/include/boost/type_traits/remove_const.hpp \ + /usr/include/boost/type_traits/decay.hpp \ + /usr/include/boost/type_traits/is_array.hpp \ + /usr/include/boost/type_traits/remove_bounds.hpp \ + /usr/include/boost/type_traits/remove_extent.hpp \ + /usr/include/boost/type_traits/add_pointer.hpp \ + /usr/include/boost/type_traits/remove_cv.hpp \ + /usr/include/boost/type_traits/is_base_of.hpp \ + /usr/include/boost/type_traits/is_base_and_derived.hpp \ + /usr/include/boost/type_traits/is_same.hpp \ + /usr/include/boost/type_traits/is_class.hpp \ + /usr/include/boost/type_traits/is_const.hpp \ + /usr/include/boost/type_traits/is_constructible.hpp \ + /usr/include/boost/type_traits/is_destructible.hpp \ + /usr/include/boost/type_traits/is_nothrow_move_assignable.hpp \ + /usr/include/boost/type_traits/has_trivial_move_assign.hpp \ + /usr/include/boost/type_traits/is_assignable.hpp \ + /usr/include/boost/type_traits/is_volatile.hpp \ + /usr/include/boost/type_traits/has_nothrow_assign.hpp \ + /usr/include/boost/type_traits/enable_if.hpp \ + /usr/include/boost/type_traits/is_nothrow_move_constructible.hpp \ + /usr/include/boost/move/utility.hpp \ + /usr/include/boost/move/detail/config_begin.hpp \ + /usr/include/boost/move/detail/workaround.hpp \ + /usr/include/boost/move/utility_core.hpp \ + /usr/include/boost/move/core.hpp \ + /usr/include/boost/move/detail/config_end.hpp \ + /usr/include/boost/move/detail/meta_utils.hpp \ + /usr/include/boost/move/detail/meta_utils_core.hpp \ + /usr/include/boost/move/traits.hpp \ + /usr/include/boost/move/detail/type_traits.hpp \ + /usr/include/boost/none.hpp \ + /usr/include/boost/none_t.hpp \ + /usr/include/boost/utility/compare_pointees.hpp \ + /usr/include/c++/11/functional \ + /usr/include/c++/11/tuple \ + /usr/include/c++/11/array \ + /usr/include/c++/11/bits/uses_allocator.h \ + /usr/include/c++/11/bits/invoke.h \ + /usr/include/c++/11/bits/refwrap.h \ + /usr/include/c++/11/bits/std_function.h \ + /usr/include/boost/utility/result_of.hpp \ + /usr/include/boost/preprocessor/cat.hpp \ + /usr/include/boost/preprocessor/config/config.hpp \ + /usr/include/boost/preprocessor/iteration/iterate.hpp \ + /usr/include/boost/preprocessor/arithmetic/dec.hpp \ + /usr/include/boost/preprocessor/config/limits.hpp \ + /usr/include/boost/preprocessor/arithmetic/limits/dec_256.hpp \ + /usr/include/boost/preprocessor/arithmetic/inc.hpp \ + /usr/include/boost/preprocessor/arithmetic/limits/inc_256.hpp \ + /usr/include/boost/preprocessor/array/elem.hpp \ + /usr/include/boost/preprocessor/array/data.hpp \ + /usr/include/boost/preprocessor/tuple/elem.hpp \ + /usr/include/boost/preprocessor/facilities/expand.hpp \ + /usr/include/boost/preprocessor/facilities/overload.hpp \ + /usr/include/boost/preprocessor/variadic/size.hpp \ + /usr/include/boost/preprocessor/control/iif.hpp \ + /usr/include/boost/preprocessor/facilities/check_empty.hpp \ + /usr/include/boost/preprocessor/variadic/has_opt.hpp \ + /usr/include/boost/preprocessor/variadic/limits/size_64.hpp \ + /usr/include/boost/preprocessor/tuple/rem.hpp \ + /usr/include/boost/preprocessor/tuple/detail/is_single_return.hpp \ + /usr/include/boost/preprocessor/variadic/elem.hpp \ + /usr/include/boost/preprocessor/variadic/limits/elem_64.hpp \ + /usr/include/boost/preprocessor/array/size.hpp \ + /usr/include/boost/preprocessor/slot/slot.hpp \ + /usr/include/boost/preprocessor/slot/detail/def.hpp \ + /usr/include/boost/preprocessor/repetition/enum_params.hpp \ + /usr/include/boost/preprocessor/punctuation/comma_if.hpp \ + /usr/include/boost/preprocessor/control/if.hpp \ + /usr/include/boost/preprocessor/logical/bool.hpp \ + /usr/include/boost/preprocessor/logical/limits/bool_256.hpp \ + /usr/include/boost/preprocessor/facilities/empty.hpp \ + /usr/include/boost/preprocessor/punctuation/comma.hpp \ + /usr/include/boost/preprocessor/repetition/repeat.hpp \ + /usr/include/boost/preprocessor/debug/error.hpp \ + /usr/include/boost/preprocessor/detail/auto_rec.hpp \ + /usr/include/boost/preprocessor/detail/limits/auto_rec_256.hpp \ + /usr/include/boost/preprocessor/tuple/eat.hpp \ + /usr/include/boost/preprocessor/repetition/limits/repeat_256.hpp \ + /usr/include/boost/preprocessor/repetition/enum_trailing_params.hpp \ + /usr/include/boost/preprocessor/repetition/enum_binary_params.hpp \ + /usr/include/boost/preprocessor/repetition/enum_shifted_params.hpp \ + /usr/include/boost/preprocessor/facilities/intercept.hpp \ + /usr/include/boost/preprocessor/facilities/limits/intercept_256.hpp \ + /usr/include/boost/type_traits/type_identity.hpp \ + /usr/include/boost/preprocessor/iteration/detail/iter/forward1.hpp \ + /usr/include/boost/preprocessor/iteration/detail/bounds/lower1.hpp \ + /usr/include/boost/preprocessor/slot/detail/shared.hpp \ + /usr/include/boost/preprocessor/iteration/detail/bounds/upper1.hpp \ + /usr/include/boost/preprocessor/iteration/detail/iter/limits/forward1_256.hpp \ + /usr/include/boost/utility/detail/result_of_iterate.hpp \ + /usr/include/boost/optional/optional_fwd.hpp \ + /usr/include/boost/optional/detail/optional_config.hpp \ + /usr/include/boost/optional/detail/optional_factory_support.hpp \ + /usr/include/boost/optional/detail/optional_aligned_storage.hpp \ + /usr/include/boost/optional/detail/optional_trivially_copyable_base.hpp \ + /usr/include/boost/optional/detail/optional_reference_spec.hpp \ + /usr/include/boost/optional/detail/optional_relops.hpp \ + /usr/include/boost/optional/detail/optional_swap.hpp \ + /usr/include/c++/11/algorithm \ + /usr/include/c++/11/bits/stl_algo.h \ + /usr/include/c++/11/bits/algorithmfwd.h \ + /usr/include/c++/11/bits/stl_heap.h \ + /usr/include/c++/11/bits/stl_tempbuf.h \ + /usr/include/c++/11/bits/uniform_int_dist.h \ + /usr/include/c++/11/atomic \ + /usr/include/c++/11/bits/atomic_base.h \ + /usr/include/c++/11/bits/atomic_lockfree_defines.h \ + /usr/include/c++/11/condition_variable \ + /usr/include/c++/11/chrono \ + /usr/include/c++/11/ratio \ + /usr/include/c++/11/limits \ + /usr/include/c++/11/ctime \ + /usr/include/c++/11/bits/parse_numbers.h \ + /usr/include/c++/11/bits/std_mutex.h \ + /usr/include/c++/11/system_error \ + /usr/include/c++/11/x86_64-redhat-linux/bits/error_constants.h \ + /usr/include/c++/11/bits/unique_lock.h \ + /usr/include/c++/11/bits/shared_ptr.h \ + /usr/include/c++/11/bits/shared_ptr_base.h \ + /usr/include/c++/11/bits/allocated_ptr.h \ + /usr/include/c++/11/bits/unique_ptr.h \ + /usr/include/c++/11/ext/aligned_buffer.h \ + /usr/include/c++/11/ext/concurrence.h \ + /usr/include/c++/11/deque \ + /usr/include/c++/11/bits/stl_uninitialized.h \ + /usr/include/c++/11/bits/stl_deque.h \ + /usr/include/c++/11/bits/deque.tcc \ + /usr/include/c++/11/memory \ + /usr/include/c++/11/bits/stl_raw_storage_iter.h \ + /usr/include/c++/11/bits/align.h \ + /usr/include/c++/11/bit \ + /usr/include/c++/11/bits/shared_ptr_atomic.h \ + /usr/include/c++/11/backward/auto_ptr.h \ + /usr/include/c++/11/mutex \ + /usr/include/c++/11/vector \ + /usr/include/c++/11/bits/stl_vector.h \ + /usr/include/c++/11/bits/stl_bvector.h \ + /usr/include/c++/11/bits/vector.tcc + +CMakeFiles/lspcpp.dir/src/lsp/Markup.cpp.o: src/lsp/Markup.cpp \ + /usr/include/stdc-predef.h \ + include/LibLsp/lsp/Markup/Markup.h \ + /usr/include/c++/11/cctype \ + /usr/include/c++/11/x86_64-redhat-linux/bits/c++config.h \ + /usr/include/bits/wordsize.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/os_defines.h \ + /usr/include/features.h \ + /usr/include/sys/cdefs.h \ + /usr/include/bits/long-double.h \ + /usr/include/gnu/stubs.h \ + /usr/include/gnu/stubs-64.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/cpu_defines.h \ + /usr/include/ctype.h \ + /usr/include/bits/types.h \ + /usr/include/bits/timesize.h \ + /usr/include/bits/typesizes.h \ + /usr/include/bits/time64.h \ + /usr/include/bits/endian.h \ + /usr/include/bits/endianness.h \ + /usr/include/bits/types/locale_t.h \ + /usr/include/bits/types/__locale_t.h \ + /usr/include/c++/11/clocale \ + /usr/include/locale.h \ + /usr/lib/gcc/x86_64-redhat-linux/11/include/stddef.h \ + /usr/include/bits/locale.h \ + /usr/include/c++/11/cstddef \ + /usr/include/c++/11/memory \ + /usr/include/c++/11/bits/stl_algobase.h \ + /usr/include/c++/11/bits/functexcept.h \ + /usr/include/c++/11/bits/exception_defines.h \ + /usr/include/c++/11/bits/cpp_type_traits.h \ + /usr/include/c++/11/ext/type_traits.h \ + /usr/include/c++/11/ext/numeric_traits.h \ + /usr/include/c++/11/bits/stl_pair.h \ + /usr/include/c++/11/bits/move.h \ + /usr/include/c++/11/type_traits \ + /usr/include/c++/11/bits/stl_iterator_base_types.h \ + /usr/include/c++/11/bits/stl_iterator_base_funcs.h \ + /usr/include/c++/11/bits/concept_check.h \ + /usr/include/c++/11/debug/assertions.h \ + /usr/include/c++/11/bits/stl_iterator.h \ + /usr/include/c++/11/bits/ptr_traits.h \ + /usr/include/c++/11/debug/debug.h \ + /usr/include/c++/11/bits/predefined_ops.h \ + /usr/include/c++/11/bits/allocator.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/c++allocator.h \ + /usr/include/c++/11/ext/new_allocator.h \ + /usr/include/c++/11/new \ + /usr/include/c++/11/bits/exception.h \ + /usr/include/c++/11/bits/memoryfwd.h \ + /usr/include/c++/11/bits/stl_construct.h \ + /usr/include/c++/11/bits/stl_uninitialized.h \ + /usr/include/c++/11/ext/alloc_traits.h \ + /usr/include/c++/11/bits/alloc_traits.h \ + /usr/include/c++/11/bits/stl_tempbuf.h \ + /usr/include/c++/11/bits/stl_raw_storage_iter.h \ + /usr/include/c++/11/bits/align.h \ + /usr/include/c++/11/bit \ + /usr/lib/gcc/x86_64-redhat-linux/11/include/stdint.h \ + /usr/include/stdint.h \ + /usr/include/bits/libc-header-start.h \ + /usr/include/bits/wchar.h \ + /usr/include/bits/stdint-intn.h \ + /usr/include/bits/stdint-uintn.h \ + /usr/include/c++/11/bits/uses_allocator.h \ + /usr/include/c++/11/bits/unique_ptr.h \ + /usr/include/c++/11/utility \ + /usr/include/c++/11/bits/stl_relops.h \ + /usr/include/c++/11/initializer_list \ + /usr/include/c++/11/tuple \ + /usr/include/c++/11/array \ + /usr/include/c++/11/bits/range_access.h \ + /usr/include/c++/11/bits/invoke.h \ + /usr/include/c++/11/bits/stl_function.h \ + /usr/include/c++/11/backward/binders.h \ + /usr/include/c++/11/bits/functional_hash.h \ + /usr/include/c++/11/bits/hash_bytes.h \ + /usr/include/c++/11/bits/shared_ptr.h \ + /usr/include/c++/11/iosfwd \ + /usr/include/c++/11/bits/stringfwd.h \ + /usr/include/c++/11/bits/postypes.h \ + /usr/include/c++/11/cwchar \ + /usr/include/wchar.h \ + /usr/include/bits/floatn.h \ + /usr/include/bits/floatn-common.h \ + /usr/lib/gcc/x86_64-redhat-linux/11/include/stdarg.h \ + /usr/include/bits/types/wint_t.h \ + /usr/include/bits/types/mbstate_t.h \ + /usr/include/bits/types/__mbstate_t.h \ + /usr/include/bits/types/__FILE.h \ + /usr/include/bits/types/FILE.h \ + /usr/include/c++/11/bits/shared_ptr_base.h \ + /usr/include/c++/11/typeinfo \ + /usr/include/c++/11/bits/allocated_ptr.h \ + /usr/include/c++/11/bits/refwrap.h \ + /usr/include/c++/11/ext/aligned_buffer.h \ + /usr/include/c++/11/ext/atomicity.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/gthr.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/gthr-default.h \ + /usr/include/pthread.h \ + /usr/include/sched.h \ + /usr/include/bits/types/time_t.h \ + /usr/include/bits/types/struct_timespec.h \ + /usr/include/bits/sched.h \ + /usr/include/bits/types/struct_sched_param.h \ + /usr/include/bits/cpu-set.h \ + /usr/include/time.h \ + /usr/include/bits/time.h \ + /usr/include/bits/timex.h \ + /usr/include/bits/types/struct_timeval.h \ + /usr/include/bits/types/clock_t.h \ + /usr/include/bits/types/struct_tm.h \ + /usr/include/bits/types/clockid_t.h \ + /usr/include/bits/types/timer_t.h \ + /usr/include/bits/types/struct_itimerspec.h \ + /usr/include/bits/pthreadtypes.h \ + /usr/include/bits/thread-shared-types.h \ + /usr/include/bits/pthreadtypes-arch.h \ + /usr/include/bits/struct_mutex.h \ + /usr/include/bits/struct_rwlock.h \ + /usr/include/bits/setjmp.h \ + /usr/include/bits/types/__sigset_t.h \ + /usr/include/bits/types/struct___jmp_buf_tag.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/atomic_word.h \ + /usr/include/sys/single_threaded.h \ + /usr/include/c++/11/ext/concurrence.h \ + /usr/include/c++/11/exception \ + /usr/include/c++/11/bits/exception_ptr.h \ + /usr/include/c++/11/bits/cxxabi_init_exception.h \ + /usr/include/c++/11/bits/nested_exception.h \ + /usr/include/c++/11/bits/shared_ptr_atomic.h \ + /usr/include/c++/11/bits/atomic_base.h \ + /usr/include/c++/11/bits/atomic_lockfree_defines.h \ + /usr/include/c++/11/backward/auto_ptr.h \ + /usr/include/c++/11/string \ + /usr/include/c++/11/bits/char_traits.h \ + /usr/include/c++/11/cstdint \ + /usr/include/c++/11/bits/localefwd.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/c++locale.h \ + /usr/include/c++/11/bits/ostream_insert.h \ + /usr/include/c++/11/bits/cxxabi_forced.h \ + /usr/include/c++/11/bits/basic_string.h \ + /usr/include/c++/11/ext/string_conversions.h \ + /usr/include/c++/11/cstdlib \ + /usr/include/stdlib.h \ + /usr/include/bits/waitflags.h \ + /usr/include/bits/waitstatus.h \ + /usr/include/sys/types.h \ + /usr/include/endian.h \ + /usr/include/bits/byteswap.h \ + /usr/include/bits/uintn-identity.h \ + /usr/include/sys/select.h \ + /usr/include/bits/select.h \ + /usr/include/bits/types/sigset_t.h \ + /usr/include/alloca.h \ + /usr/include/bits/stdlib-bsearch.h \ + /usr/include/bits/stdlib-float.h \ + /usr/include/c++/11/bits/std_abs.h \ + /usr/include/c++/11/cstdio \ + /usr/include/stdio.h \ + /usr/include/bits/types/__fpos_t.h \ + /usr/include/bits/types/__fpos64_t.h \ + /usr/include/bits/types/struct_FILE.h \ + /usr/include/bits/types/cookie_io_functions_t.h \ + /usr/include/bits/stdio_lim.h \ + /usr/include/bits/stdio.h \ + /usr/include/c++/11/cerrno \ + /usr/include/errno.h \ + /usr/include/bits/errno.h \ + /usr/include/linux/errno.h \ + /usr/include/asm/errno.h \ + /usr/include/asm-generic/errno.h \ + /usr/include/asm-generic/errno-base.h \ + /usr/include/bits/types/error_t.h \ + /usr/include/c++/11/bits/charconv.h \ + /usr/include/c++/11/bits/basic_string.tcc \ + /usr/include/c++/11/vector \ + /usr/include/c++/11/bits/stl_vector.h \ + /usr/include/c++/11/bits/stl_bvector.h \ + /usr/include/c++/11/bits/vector.tcc \ + /usr/include/c++/11/sstream \ + /usr/include/c++/11/istream \ + /usr/include/c++/11/ios \ + /usr/include/c++/11/bits/ios_base.h \ + /usr/include/c++/11/bits/locale_classes.h \ + /usr/include/c++/11/bits/locale_classes.tcc \ + /usr/include/c++/11/system_error \ + /usr/include/c++/11/x86_64-redhat-linux/bits/error_constants.h \ + /usr/include/c++/11/stdexcept \ + /usr/include/c++/11/streambuf \ + /usr/include/c++/11/bits/streambuf.tcc \ + /usr/include/c++/11/bits/basic_ios.h \ + /usr/include/c++/11/bits/locale_facets.h \ + /usr/include/c++/11/cwctype \ + /usr/include/wctype.h \ + /usr/include/bits/wctype-wchar.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/ctype_base.h \ + /usr/include/c++/11/bits/streambuf_iterator.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/ctype_inline.h \ + /usr/include/c++/11/bits/locale_facets.tcc \ + /usr/include/c++/11/bits/basic_ios.tcc \ + /usr/include/c++/11/ostream \ + /usr/include/c++/11/bits/ostream.tcc \ + /usr/include/c++/11/bits/istream.tcc \ + /usr/include/c++/11/bits/sstream.tcc \ + include/LibLsp/lsp/Markup/string_ref.h \ + /usr/include/c++/11/algorithm \ + /usr/include/c++/11/bits/stl_algo.h \ + /usr/include/c++/11/bits/algorithmfwd.h \ + /usr/include/c++/11/bits/stl_heap.h \ + /usr/include/c++/11/bits/uniform_int_dist.h \ + /usr/include/c++/11/functional \ + /usr/include/c++/11/bits/std_function.h \ + /usr/include/c++/11/cstring \ + /usr/include/string.h \ + /usr/include/strings.h \ + /usr/include/c++/11/cassert \ + /usr/include/assert.h \ + /usr/include/c++/11/iterator \ + /usr/include/c++/11/bits/stream_iterator.h \ + /usr/include/boost/algorithm/string.hpp \ + /usr/include/boost/algorithm/string/std_containers_traits.hpp \ + /usr/include/boost/config.hpp \ + /usr/include/boost/config/user.hpp \ + /usr/include/boost/config/detail/select_compiler_config.hpp \ + /usr/include/boost/config/compiler/gcc.hpp \ + /usr/include/boost/config/detail/select_stdlib_config.hpp \ + /usr/include/c++/11/version \ + /usr/include/boost/config/stdlib/libstdcpp3.hpp \ + /usr/include/unistd.h \ + /usr/include/bits/posix_opt.h \ + /usr/include/bits/environments.h \ + /usr/include/bits/confname.h \ + /usr/include/bits/getopt_posix.h \ + /usr/include/bits/getopt_core.h \ + /usr/include/bits/unistd_ext.h \ + /usr/include/boost/config/detail/select_platform_config.hpp \ + /usr/include/boost/config/platform/linux.hpp \ + /usr/include/boost/config/detail/posix_features.hpp \ + /usr/include/boost/config/detail/suffix.hpp \ + /usr/include/boost/config/helper_macros.hpp \ + /usr/include/boost/algorithm/string/std/string_traits.hpp \ + /usr/include/boost/algorithm/string/yes_no_type.hpp \ + /usr/include/boost/algorithm/string/sequence_traits.hpp \ + /usr/include/boost/mpl/bool.hpp \ + /usr/include/boost/mpl/bool_fwd.hpp \ + /usr/include/boost/mpl/aux_/adl_barrier.hpp \ + /usr/include/boost/mpl/aux_/config/adl.hpp \ + /usr/include/boost/mpl/aux_/config/msvc.hpp \ + /usr/include/boost/mpl/aux_/config/intel.hpp \ + /usr/include/boost/mpl/aux_/config/gcc.hpp \ + /usr/include/boost/mpl/aux_/config/workaround.hpp \ + /usr/include/boost/detail/workaround.hpp \ + /usr/include/boost/config/workaround.hpp \ + /usr/include/boost/mpl/integral_c_tag.hpp \ + /usr/include/boost/mpl/aux_/config/static_constant.hpp \ + /usr/include/boost/algorithm/string/std/list_traits.hpp \ + /usr/include/c++/11/list \ + /usr/include/c++/11/bits/stl_list.h \ + /usr/include/c++/11/bits/list.tcc \ + /usr/include/boost/algorithm/string/std/slist_traits.hpp \ + /usr/include/boost/algorithm/string/config.hpp \ + /usr/include/c++/11/ext/slist \ + /usr/include/boost/algorithm/string/trim.hpp \ + /usr/include/boost/range/begin.hpp \ + /usr/include/boost/range/config.hpp \ + /usr/include/boost/range/iterator.hpp \ + /usr/include/boost/range/range_fwd.hpp \ + /usr/include/boost/range/mutable_iterator.hpp \ + /usr/include/boost/range/detail/extract_optional_type.hpp \ + /usr/include/boost/preprocessor/cat.hpp \ + /usr/include/boost/preprocessor/config/config.hpp \ + /usr/include/boost/mpl/has_xxx.hpp \ + /usr/include/boost/mpl/aux_/na_spec.hpp \ + /usr/include/boost/mpl/lambda_fwd.hpp \ + /usr/include/boost/mpl/void_fwd.hpp \ + /usr/include/boost/mpl/aux_/na.hpp \ + /usr/include/boost/mpl/aux_/na_fwd.hpp \ + /usr/include/boost/mpl/aux_/config/ctps.hpp \ + /usr/include/boost/mpl/aux_/config/lambda.hpp \ + /usr/include/boost/mpl/aux_/config/ttp.hpp \ + /usr/include/boost/mpl/int.hpp \ + /usr/include/boost/mpl/int_fwd.hpp \ + /usr/include/boost/mpl/aux_/nttp_decl.hpp \ + /usr/include/boost/mpl/aux_/config/nttp.hpp \ + /usr/include/boost/mpl/aux_/integral_wrapper.hpp \ + /usr/include/boost/mpl/aux_/static_cast.hpp \ + /usr/include/boost/mpl/aux_/lambda_arity_param.hpp \ + /usr/include/boost/mpl/aux_/template_arity_fwd.hpp \ + /usr/include/boost/mpl/aux_/arity.hpp \ + /usr/include/boost/mpl/aux_/config/dtp.hpp \ + /usr/include/boost/mpl/aux_/preprocessor/params.hpp \ + /usr/include/boost/mpl/aux_/config/preprocessor.hpp \ + /usr/include/boost/preprocessor/comma_if.hpp \ + /usr/include/boost/preprocessor/punctuation/comma_if.hpp \ + /usr/include/boost/preprocessor/control/if.hpp \ + /usr/include/boost/preprocessor/control/iif.hpp \ + /usr/include/boost/preprocessor/logical/bool.hpp \ + /usr/include/boost/preprocessor/config/limits.hpp \ + /usr/include/boost/preprocessor/logical/limits/bool_256.hpp \ + /usr/include/boost/preprocessor/facilities/empty.hpp \ + /usr/include/boost/preprocessor/punctuation/comma.hpp \ + /usr/include/boost/preprocessor/repeat.hpp \ + /usr/include/boost/preprocessor/repetition/repeat.hpp \ + /usr/include/boost/preprocessor/debug/error.hpp \ + /usr/include/boost/preprocessor/detail/auto_rec.hpp \ + /usr/include/boost/preprocessor/detail/limits/auto_rec_256.hpp \ + /usr/include/boost/preprocessor/tuple/eat.hpp \ + /usr/include/boost/preprocessor/repetition/limits/repeat_256.hpp \ + /usr/include/boost/preprocessor/inc.hpp \ + /usr/include/boost/preprocessor/arithmetic/inc.hpp \ + /usr/include/boost/preprocessor/arithmetic/limits/inc_256.hpp \ + /usr/include/boost/mpl/aux_/preprocessor/enum.hpp \ + /usr/include/boost/mpl/aux_/preprocessor/def_params_tail.hpp \ + /usr/include/boost/mpl/limits/arity.hpp \ + /usr/include/boost/preprocessor/logical/and.hpp \ + /usr/include/boost/preprocessor/logical/bitand.hpp \ + /usr/include/boost/preprocessor/identity.hpp \ + /usr/include/boost/preprocessor/facilities/identity.hpp \ + /usr/include/boost/preprocessor/empty.hpp \ + /usr/include/boost/preprocessor/arithmetic/add.hpp \ + /usr/include/boost/preprocessor/arithmetic/dec.hpp \ + /usr/include/boost/preprocessor/arithmetic/limits/dec_256.hpp \ + /usr/include/boost/preprocessor/control/while.hpp \ + /usr/include/boost/preprocessor/list/fold_left.hpp \ + /usr/include/boost/preprocessor/list/detail/fold_left.hpp \ + /usr/include/boost/preprocessor/control/expr_iif.hpp \ + /usr/include/boost/preprocessor/list/adt.hpp \ + /usr/include/boost/preprocessor/detail/is_binary.hpp \ + /usr/include/boost/preprocessor/detail/check.hpp \ + /usr/include/boost/preprocessor/logical/compl.hpp \ + /usr/include/boost/preprocessor/list/detail/limits/fold_left_256.hpp \ + /usr/include/boost/preprocessor/list/limits/fold_left_256.hpp \ + /usr/include/boost/preprocessor/list/fold_right.hpp \ + /usr/include/boost/preprocessor/list/detail/fold_right.hpp \ + /usr/include/boost/preprocessor/list/reverse.hpp \ + /usr/include/boost/preprocessor/list/detail/limits/fold_right_256.hpp \ + /usr/include/boost/preprocessor/control/detail/while.hpp \ + /usr/include/boost/preprocessor/control/detail/limits/while_256.hpp \ + /usr/include/boost/preprocessor/control/limits/while_256.hpp \ + /usr/include/boost/preprocessor/logical/bitor.hpp \ + /usr/include/boost/preprocessor/tuple/elem.hpp \ + /usr/include/boost/preprocessor/facilities/expand.hpp \ + /usr/include/boost/preprocessor/facilities/overload.hpp \ + /usr/include/boost/preprocessor/variadic/size.hpp \ + /usr/include/boost/preprocessor/facilities/check_empty.hpp \ + /usr/include/boost/preprocessor/variadic/has_opt.hpp \ + /usr/include/boost/preprocessor/variadic/limits/size_64.hpp \ + /usr/include/boost/preprocessor/tuple/rem.hpp \ + /usr/include/boost/preprocessor/tuple/detail/is_single_return.hpp \ + /usr/include/boost/preprocessor/variadic/elem.hpp \ + /usr/include/boost/preprocessor/variadic/limits/elem_64.hpp \ + /usr/include/boost/preprocessor/arithmetic/detail/is_maximum_number.hpp \ + /usr/include/boost/preprocessor/comparison/equal.hpp \ + /usr/include/boost/preprocessor/comparison/not_equal.hpp \ + /usr/include/boost/preprocessor/comparison/limits/not_equal_256.hpp \ + /usr/include/boost/preprocessor/arithmetic/detail/maximum_number.hpp \ + /usr/include/boost/preprocessor/arithmetic/detail/is_minimum_number.hpp \ + /usr/include/boost/preprocessor/logical/not.hpp \ + /usr/include/boost/preprocessor/arithmetic/sub.hpp \ + /usr/include/boost/mpl/aux_/config/eti.hpp \ + /usr/include/boost/mpl/aux_/config/overload_resolution.hpp \ + /usr/include/boost/mpl/aux_/type_wrapper.hpp \ + /usr/include/boost/mpl/aux_/yes_no.hpp \ + /usr/include/boost/mpl/aux_/config/arrays.hpp \ + /usr/include/boost/mpl/aux_/config/has_xxx.hpp \ + /usr/include/boost/mpl/aux_/config/msvc_typename.hpp \ + /usr/include/boost/preprocessor/array/elem.hpp \ + /usr/include/boost/preprocessor/array/data.hpp \ + /usr/include/boost/preprocessor/array/size.hpp \ + /usr/include/boost/preprocessor/repetition/enum_params.hpp \ + /usr/include/boost/preprocessor/repetition/enum_trailing_params.hpp \ + /usr/include/boost/type_traits/remove_reference.hpp \ + /usr/include/boost/iterator/iterator_traits.hpp \ + /usr/include/boost/range/detail/msvc_has_iterator_workaround.hpp \ + /usr/include/boost/range/const_iterator.hpp \ + /usr/include/boost/type_traits/remove_const.hpp \ + /usr/include/boost/type_traits/is_const.hpp \ + /usr/include/boost/type_traits/integral_constant.hpp \ + /usr/include/boost/mpl/eval_if.hpp \ + /usr/include/boost/mpl/if.hpp \ + /usr/include/boost/mpl/aux_/value_wknd.hpp \ + /usr/include/boost/mpl/aux_/config/integral.hpp \ + /usr/include/boost/mpl/aux_/lambda_support.hpp \ + /usr/include/boost/range/end.hpp \ + /usr/include/boost/range/detail/implementation_help.hpp \ + /usr/include/boost/range/detail/common.hpp \ + /usr/include/boost/range/detail/sfinae.hpp \ + /usr/include/boost/type_traits/is_array.hpp \ + /usr/include/boost/type_traits/detail/yes_no_type.hpp \ + /usr/include/boost/type_traits/is_void.hpp \ + /usr/include/boost/type_traits/is_same.hpp \ + /usr/include/boost/range/as_literal.hpp \ + /usr/include/boost/range/iterator_range.hpp \ + /usr/include/boost/range/iterator_range_core.hpp \ + /usr/include/boost/assert.hpp \ + /usr/include/boost/iterator/iterator_facade.hpp \ + /usr/include/boost/iterator/interoperable.hpp \ + /usr/include/boost/mpl/or.hpp \ + /usr/include/boost/mpl/aux_/config/use_preprocessed.hpp \ + /usr/include/boost/mpl/aux_/nested_type_wknd.hpp \ + /usr/include/boost/mpl/aux_/include_preprocessed.hpp \ + /usr/include/boost/mpl/aux_/config/compiler.hpp \ + /usr/include/boost/preprocessor/stringize.hpp \ + /usr/include/boost/mpl/aux_/preprocessed/gcc/or.hpp \ + /usr/include/boost/type_traits/is_convertible.hpp \ + /usr/include/boost/type_traits/intrinsics.hpp \ + /usr/include/boost/type_traits/detail/config.hpp \ + /usr/include/boost/version.hpp \ + /usr/include/boost/type_traits/is_complete.hpp \ + /usr/include/boost/type_traits/declval.hpp \ + /usr/include/boost/type_traits/add_rvalue_reference.hpp \ + /usr/include/boost/type_traits/is_reference.hpp \ + /usr/include/boost/type_traits/is_lvalue_reference.hpp \ + /usr/include/boost/type_traits/is_rvalue_reference.hpp \ + /usr/include/boost/type_traits/is_function.hpp \ + /usr/include/boost/type_traits/detail/is_function_cxx_11.hpp \ + /usr/include/boost/static_assert.hpp \ + /usr/include/boost/type_traits/is_arithmetic.hpp \ + /usr/include/boost/type_traits/is_integral.hpp \ + /usr/include/boost/type_traits/is_floating_point.hpp \ + /usr/include/boost/type_traits/is_abstract.hpp \ + /usr/include/boost/type_traits/add_lvalue_reference.hpp \ + /usr/include/boost/type_traits/add_reference.hpp \ + /usr/include/boost/iterator/detail/config_def.hpp \ + /usr/include/boost/iterator/detail/config_undef.hpp \ + /usr/include/boost/iterator/iterator_categories.hpp \ + /usr/include/boost/mpl/identity.hpp \ + /usr/include/boost/mpl/placeholders.hpp \ + /usr/include/boost/mpl/arg.hpp \ + /usr/include/boost/mpl/arg_fwd.hpp \ + /usr/include/boost/mpl/aux_/na_assert.hpp \ + /usr/include/boost/mpl/assert.hpp \ + /usr/include/boost/mpl/not.hpp \ + /usr/include/boost/mpl/aux_/config/gpu.hpp \ + /usr/include/boost/mpl/aux_/config/pp_counter.hpp \ + /usr/include/boost/mpl/aux_/arity_spec.hpp \ + /usr/include/boost/mpl/aux_/arg_typedef.hpp \ + /usr/include/boost/mpl/aux_/preprocessed/gcc/arg.hpp \ + /usr/include/boost/mpl/aux_/preprocessed/gcc/placeholders.hpp \ + /usr/include/boost/iterator/detail/facade_iterator_category.hpp \ + /usr/include/boost/core/use_default.hpp \ + /usr/include/boost/mpl/and.hpp \ + /usr/include/boost/mpl/aux_/preprocessed/gcc/and.hpp \ + /usr/include/boost/detail/indirect_traits.hpp \ + /usr/include/boost/type_traits/is_pointer.hpp \ + /usr/include/boost/type_traits/is_class.hpp \ + /usr/include/boost/type_traits/is_volatile.hpp \ + /usr/include/boost/type_traits/is_member_function_pointer.hpp \ + /usr/include/boost/type_traits/detail/is_member_function_pointer_cxx_11.hpp \ + /usr/include/boost/type_traits/is_member_pointer.hpp \ + /usr/include/boost/type_traits/remove_cv.hpp \ + /usr/include/boost/type_traits/remove_pointer.hpp \ + /usr/include/boost/detail/select_type.hpp \ + /usr/include/boost/iterator/detail/enable_if.hpp \ + /usr/include/boost/core/addressof.hpp \ + /usr/include/boost/type_traits/add_const.hpp \ + /usr/include/boost/type_traits/add_pointer.hpp \ + /usr/include/boost/type_traits/is_pod.hpp \ + /usr/include/boost/type_traits/is_scalar.hpp \ + /usr/include/boost/type_traits/is_enum.hpp \ + /usr/include/boost/mpl/always.hpp \ + /usr/include/boost/mpl/aux_/preprocessor/default_params.hpp \ + /usr/include/boost/mpl/apply.hpp \ + /usr/include/boost/mpl/apply_fwd.hpp \ + /usr/include/boost/mpl/aux_/preprocessed/gcc/apply_fwd.hpp \ + /usr/include/boost/mpl/apply_wrap.hpp \ + /usr/include/boost/mpl/aux_/has_apply.hpp \ + /usr/include/boost/mpl/aux_/config/has_apply.hpp \ + /usr/include/boost/mpl/aux_/msvc_never_true.hpp \ + /usr/include/boost/mpl/aux_/preprocessed/gcc/apply_wrap.hpp \ + /usr/include/boost/mpl/lambda.hpp \ + /usr/include/boost/mpl/bind.hpp \ + /usr/include/boost/mpl/bind_fwd.hpp \ + /usr/include/boost/mpl/aux_/config/bind.hpp \ + /usr/include/boost/mpl/aux_/preprocessed/gcc/bind_fwd.hpp \ + /usr/include/boost/mpl/next.hpp \ + /usr/include/boost/mpl/next_prior.hpp \ + /usr/include/boost/mpl/aux_/common_name_wknd.hpp \ + /usr/include/boost/mpl/protect.hpp \ + /usr/include/boost/mpl/aux_/preprocessed/gcc/bind.hpp \ + /usr/include/boost/mpl/aux_/full_lambda.hpp \ + /usr/include/boost/mpl/quote.hpp \ + /usr/include/boost/mpl/void.hpp \ + /usr/include/boost/mpl/aux_/has_type.hpp \ + /usr/include/boost/mpl/aux_/config/bcc.hpp \ + /usr/include/boost/mpl/aux_/preprocessed/gcc/quote.hpp \ + /usr/include/boost/mpl/aux_/template_arity.hpp \ + /usr/include/boost/mpl/aux_/preprocessed/gcc/template_arity.hpp \ + /usr/include/boost/mpl/aux_/preprocessed/gcc/full_lambda.hpp \ + /usr/include/boost/mpl/aux_/preprocessed/gcc/apply.hpp \ + /usr/include/boost/type_traits/is_base_and_derived.hpp \ + /usr/include/boost/range/functions.hpp \ + /usr/include/boost/range/size.hpp \ + /usr/include/boost/range/size_type.hpp \ + /usr/include/boost/range/difference_type.hpp \ + /usr/include/boost/range/has_range_iterator.hpp \ + /usr/include/boost/utility/enable_if.hpp \ + /usr/include/boost/core/enable_if.hpp \ + /usr/include/boost/range/concepts.hpp \ + /usr/include/boost/concept_check.hpp \ + /usr/include/boost/concept/assert.hpp \ + /usr/include/boost/concept/detail/general.hpp \ + /usr/include/boost/concept/detail/backward_compatibility.hpp \ + /usr/include/boost/concept/detail/has_constraints.hpp \ + /usr/include/boost/type_traits/conditional.hpp \ + /usr/include/boost/type_traits/conversion_traits.hpp \ + /usr/include/boost/concept/usage.hpp \ + /usr/include/boost/concept/detail/concept_def.hpp \ + /usr/include/boost/preprocessor/seq/for_each_i.hpp \ + /usr/include/boost/preprocessor/repetition/for.hpp \ + /usr/include/boost/preprocessor/repetition/detail/for.hpp \ + /usr/include/boost/preprocessor/repetition/detail/limits/for_256.hpp \ + /usr/include/boost/preprocessor/repetition/limits/for_256.hpp \ + /usr/include/boost/preprocessor/seq/seq.hpp \ + /usr/include/boost/preprocessor/seq/elem.hpp \ + /usr/include/boost/preprocessor/seq/limits/elem_256.hpp \ + /usr/include/boost/preprocessor/seq/size.hpp \ + /usr/include/boost/preprocessor/seq/limits/size_256.hpp \ + /usr/include/boost/preprocessor/seq/detail/is_empty.hpp \ + /usr/include/boost/preprocessor/seq/enum.hpp \ + /usr/include/boost/preprocessor/seq/limits/enum_256.hpp \ + /usr/include/boost/concept/detail/concept_undef.hpp \ + /usr/include/boost/iterator/iterator_concepts.hpp \ + /usr/include/boost/limits.hpp \ + /usr/include/c++/11/limits \ + /usr/include/boost/range/value_type.hpp \ + /usr/include/boost/range/detail/misc_concept.hpp \ + /usr/include/boost/type_traits/make_unsigned.hpp \ + /usr/include/boost/type_traits/is_signed.hpp \ + /usr/include/c++/11/climits \ + /usr/lib/gcc/x86_64-redhat-linux/11/include/limits.h \ + /usr/lib/gcc/x86_64-redhat-linux/11/include/syslimits.h \ + /usr/include/limits.h \ + /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h \ + /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h \ + /usr/include/bits/xopen_lim.h \ + /usr/include/bits/uio_lim.h \ + /usr/include/boost/type_traits/is_unsigned.hpp \ + /usr/include/boost/type_traits/add_volatile.hpp \ + /usr/include/boost/range/detail/has_member_size.hpp \ + /usr/include/boost/cstdint.hpp \ + /usr/include/boost/utility.hpp \ + /usr/include/boost/utility/base_from_member.hpp \ + /usr/include/boost/preprocessor/repetition/enum_binary_params.hpp \ + /usr/include/boost/preprocessor/repetition/repeat_from_to.hpp \ + /usr/include/boost/utility/binary.hpp \ + /usr/include/boost/preprocessor/control/deduce_d.hpp \ + /usr/include/boost/preprocessor/seq/cat.hpp \ + /usr/include/boost/preprocessor/seq/fold_left.hpp \ + /usr/include/boost/preprocessor/seq/limits/fold_left_256.hpp \ + /usr/include/boost/preprocessor/seq/transform.hpp \ + /usr/include/boost/preprocessor/arithmetic/mod.hpp \ + /usr/include/boost/preprocessor/arithmetic/detail/div_base.hpp \ + /usr/include/boost/preprocessor/comparison/less_equal.hpp \ + /usr/include/boost/preprocessor/arithmetic/detail/is_1_number.hpp \ + /usr/include/boost/utility/identity_type.hpp \ + /usr/include/boost/type_traits/function_traits.hpp \ + /usr/include/boost/core/checked_delete.hpp \ + /usr/include/boost/core/noncopyable.hpp \ + /usr/include/boost/range/distance.hpp \ + /usr/include/boost/iterator/distance.hpp \ + /usr/include/boost/range/empty.hpp \ + /usr/include/boost/range/rbegin.hpp \ + /usr/include/boost/range/reverse_iterator.hpp \ + /usr/include/boost/iterator/reverse_iterator.hpp \ + /usr/include/boost/iterator/iterator_adaptor.hpp \ + /usr/include/boost/range/rend.hpp \ + /usr/include/boost/range/algorithm/equal.hpp \ + /usr/include/boost/range/detail/safe_bool.hpp \ + /usr/include/boost/next_prior.hpp \ + /usr/include/boost/type_traits/has_plus.hpp \ + /usr/include/boost/type_traits/detail/has_binary_operator.hpp \ + /usr/include/boost/type_traits/make_void.hpp \ + /usr/include/boost/type_traits/has_plus_assign.hpp \ + /usr/include/boost/type_traits/has_minus.hpp \ + /usr/include/boost/type_traits/has_minus_assign.hpp \ + /usr/include/boost/iterator/advance.hpp \ + /usr/include/boost/range/iterator_range_io.hpp \ + /usr/include/boost/range/detail/str_types.hpp \ + /usr/include/boost/algorithm/string/detail/trim.hpp \ + /usr/include/boost/algorithm/string/classification.hpp \ + /usr/include/c++/11/locale \ + /usr/include/c++/11/bits/locale_facets_nonio.h \ + /usr/include/c++/11/ctime \ + /usr/include/c++/11/x86_64-redhat-linux/bits/time_members.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/messages_members.h \ + /usr/include/libintl.h \ + /usr/include/c++/11/bits/codecvt.h \ + /usr/include/c++/11/bits/locale_facets_nonio.tcc \ + /usr/include/c++/11/bits/locale_conv.h \ + /usr/include/boost/algorithm/string/detail/classification.hpp \ + /usr/include/boost/algorithm/string/predicate_facade.hpp \ + /usr/include/boost/algorithm/string/case_conv.hpp \ + /usr/include/boost/iterator/transform_iterator.hpp \ + /usr/include/boost/utility/result_of.hpp \ + /usr/include/boost/preprocessor/iteration/iterate.hpp \ + /usr/include/boost/preprocessor/slot/slot.hpp \ + /usr/include/boost/preprocessor/slot/detail/def.hpp \ + /usr/include/boost/preprocessor/repetition/enum_shifted_params.hpp \ + /usr/include/boost/preprocessor/facilities/intercept.hpp \ + /usr/include/boost/preprocessor/facilities/limits/intercept_256.hpp \ + /usr/include/boost/type_traits/type_identity.hpp \ + /usr/include/boost/preprocessor/iteration/detail/iter/forward1.hpp \ + /usr/include/boost/preprocessor/iteration/detail/bounds/lower1.hpp \ + /usr/include/boost/preprocessor/slot/detail/shared.hpp \ + /usr/include/boost/preprocessor/iteration/detail/bounds/upper1.hpp \ + /usr/include/boost/preprocessor/iteration/detail/iter/limits/forward1_256.hpp \ + /usr/include/boost/utility/detail/result_of_iterate.hpp \ + /usr/include/boost/algorithm/string/detail/case_conv.hpp \ + /usr/include/boost/algorithm/string/predicate.hpp \ + /usr/include/boost/algorithm/string/compare.hpp \ + /usr/include/boost/algorithm/string/find.hpp \ + /usr/include/boost/algorithm/string/finder.hpp \ + /usr/include/boost/algorithm/string/constants.hpp \ + /usr/include/boost/algorithm/string/detail/finder.hpp \ + /usr/include/boost/algorithm/string/detail/predicate.hpp \ + /usr/include/boost/algorithm/string/split.hpp \ + /usr/include/boost/algorithm/string/iter_find.hpp \ + /usr/include/boost/algorithm/string/concept.hpp \ + /usr/include/boost/algorithm/string/find_iterator.hpp \ + /usr/include/boost/algorithm/string/detail/find_iterator.hpp \ + /usr/include/boost/function.hpp \ + /usr/include/boost/preprocessor/iterate.hpp \ + /usr/include/boost/function/detail/prologue.hpp \ + /usr/include/boost/config/no_tr1/functional.hpp \ + /usr/include/boost/throw_exception.hpp \ + /usr/include/boost/assert/source_location.hpp \ + /usr/include/boost/current_function.hpp \ + /usr/include/boost/exception/exception.hpp \ + /usr/include/boost/function/function_base.hpp \ + /usr/include/boost/integer.hpp \ + /usr/include/boost/integer_fwd.hpp \ + /usr/include/boost/integer_traits.hpp \ + /usr/include/boost/type_index.hpp \ + /usr/include/boost/type_index/stl_type_index.hpp \ + /usr/include/boost/type_index/type_index_facade.hpp \ + /usr/include/boost/container_hash/hash_fwd.hpp \ + /usr/include/boost/core/demangle.hpp \ + /usr/include/c++/11/cxxabi.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/cxxabi_tweaks.h \ + /usr/include/boost/type_traits/has_trivial_copy.hpp \ + /usr/include/boost/type_traits/is_copy_constructible.hpp \ + /usr/include/boost/type_traits/is_constructible.hpp \ + /usr/include/boost/type_traits/is_destructible.hpp \ + /usr/include/boost/type_traits/is_default_constructible.hpp \ + /usr/include/boost/type_traits/has_trivial_destructor.hpp \ + /usr/include/boost/type_traits/composite_traits.hpp \ + /usr/include/boost/type_traits/is_union.hpp \ + /usr/include/boost/ref.hpp \ + /usr/include/boost/core/ref.hpp \ + /usr/include/boost/type_traits/alignment_of.hpp \ + /usr/include/boost/type_traits/enable_if.hpp \ + /usr/include/boost/function_equal.hpp \ + /usr/include/boost/function/function_fwd.hpp \ + /usr/include/boost/mem_fn.hpp \ + /usr/include/boost/bind/mem_fn.hpp \ + /usr/include/boost/get_pointer.hpp \ + /usr/include/boost/config/no_tr1/memory.hpp \ + /usr/include/boost/bind/mem_fn_template.hpp \ + /usr/include/boost/bind/mem_fn_cc.hpp \ + /usr/include/boost/preprocessor/enum.hpp \ + /usr/include/boost/preprocessor/repetition/enum.hpp \ + /usr/include/boost/preprocessor/enum_params.hpp \ + /usr/include/boost/function/detail/function_iterate.hpp \ + /usr/include/boost/function/detail/maybe_include.hpp \ + /usr/include/boost/function/function_template.hpp \ + /usr/include/boost/core/no_exceptions_support.hpp \ + /usr/include/boost/algorithm/string/detail/util.hpp \ + /usr/include/boost/algorithm/string/join.hpp \ + /usr/include/boost/algorithm/string/detail/sequence.hpp \ + /usr/include/boost/mpl/logical.hpp \ + /usr/include/boost/algorithm/string/replace.hpp \ + /usr/include/boost/algorithm/string/find_format.hpp \ + /usr/include/c++/11/deque \ + /usr/include/c++/11/bits/stl_deque.h \ + /usr/include/c++/11/bits/deque.tcc \ + /usr/include/boost/algorithm/string/detail/find_format.hpp \ + /usr/include/boost/algorithm/string/detail/find_format_store.hpp \ + /usr/include/boost/algorithm/string/detail/replace_storage.hpp \ + /usr/include/boost/algorithm/string/detail/find_format_all.hpp \ + /usr/include/boost/algorithm/string/formatter.hpp \ + /usr/include/boost/algorithm/string/detail/formatter.hpp \ + /usr/include/boost/algorithm/string/erase.hpp + +CMakeFiles/lspcpp.dir/src/lsp/ParentProcessWatcher.cpp.o: src/lsp/ParentProcessWatcher.cpp \ + /usr/include/stdc-predef.h \ + include/LibLsp/lsp/ParentProcessWatcher.h \ + include/LibLsp/JsonRpc/MessageIssue.h \ + /usr/include/c++/11/string \ + /usr/include/c++/11/x86_64-redhat-linux/bits/c++config.h \ + /usr/include/bits/wordsize.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/os_defines.h \ + /usr/include/features.h \ + /usr/include/sys/cdefs.h \ + /usr/include/bits/long-double.h \ + /usr/include/gnu/stubs.h \ + /usr/include/gnu/stubs-64.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/cpu_defines.h \ + /usr/include/c++/11/bits/stringfwd.h \ + /usr/include/c++/11/bits/memoryfwd.h \ + /usr/include/c++/11/bits/char_traits.h \ + /usr/include/c++/11/bits/stl_algobase.h \ + /usr/include/c++/11/bits/functexcept.h \ + /usr/include/c++/11/bits/exception_defines.h \ + /usr/include/c++/11/bits/cpp_type_traits.h \ + /usr/include/c++/11/ext/type_traits.h \ + /usr/include/c++/11/ext/numeric_traits.h \ + /usr/include/c++/11/bits/stl_pair.h \ + /usr/include/c++/11/bits/move.h \ + /usr/include/c++/11/type_traits \ + /usr/include/c++/11/bits/stl_iterator_base_types.h \ + /usr/include/c++/11/bits/stl_iterator_base_funcs.h \ + /usr/include/c++/11/bits/concept_check.h \ + /usr/include/c++/11/debug/assertions.h \ + /usr/include/c++/11/bits/stl_iterator.h \ + /usr/include/c++/11/bits/ptr_traits.h \ + /usr/include/c++/11/debug/debug.h \ + /usr/include/c++/11/bits/predefined_ops.h \ + /usr/include/c++/11/bits/postypes.h \ + /usr/include/c++/11/cwchar \ + /usr/include/wchar.h \ + /usr/include/bits/libc-header-start.h \ + /usr/include/bits/floatn.h \ + /usr/include/bits/floatn-common.h \ + /usr/lib/gcc/x86_64-redhat-linux/11/include/stddef.h \ + /usr/lib/gcc/x86_64-redhat-linux/11/include/stdarg.h \ + /usr/include/bits/wchar.h \ + /usr/include/bits/types/wint_t.h \ + /usr/include/bits/types/mbstate_t.h \ + /usr/include/bits/types/__mbstate_t.h \ + /usr/include/bits/types/__FILE.h \ + /usr/include/bits/types/FILE.h \ + /usr/include/bits/types/locale_t.h \ + /usr/include/bits/types/__locale_t.h \ + /usr/include/c++/11/cstdint \ + /usr/lib/gcc/x86_64-redhat-linux/11/include/stdint.h \ + /usr/include/stdint.h \ + /usr/include/bits/types.h \ + /usr/include/bits/timesize.h \ + /usr/include/bits/typesizes.h \ + /usr/include/bits/time64.h \ + /usr/include/bits/stdint-intn.h \ + /usr/include/bits/stdint-uintn.h \ + /usr/include/c++/11/bits/allocator.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/c++allocator.h \ + /usr/include/c++/11/ext/new_allocator.h \ + /usr/include/c++/11/new \ + /usr/include/c++/11/bits/exception.h \ + /usr/include/c++/11/bits/localefwd.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/c++locale.h \ + /usr/include/c++/11/clocale \ + /usr/include/locale.h \ + /usr/include/bits/locale.h \ + /usr/include/c++/11/iosfwd \ + /usr/include/c++/11/cctype \ + /usr/include/ctype.h \ + /usr/include/bits/endian.h \ + /usr/include/bits/endianness.h \ + /usr/include/c++/11/bits/ostream_insert.h \ + /usr/include/c++/11/bits/cxxabi_forced.h \ + /usr/include/c++/11/bits/stl_function.h \ + /usr/include/c++/11/backward/binders.h \ + /usr/include/c++/11/bits/range_access.h \ + /usr/include/c++/11/initializer_list \ + /usr/include/c++/11/bits/basic_string.h \ + /usr/include/c++/11/ext/atomicity.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/gthr.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/gthr-default.h \ + /usr/include/pthread.h \ + /usr/include/sched.h \ + /usr/include/bits/types/time_t.h \ + /usr/include/bits/types/struct_timespec.h \ + /usr/include/bits/sched.h \ + /usr/include/bits/types/struct_sched_param.h \ + /usr/include/bits/cpu-set.h \ + /usr/include/time.h \ + /usr/include/bits/time.h \ + /usr/include/bits/timex.h \ + /usr/include/bits/types/struct_timeval.h \ + /usr/include/bits/types/clock_t.h \ + /usr/include/bits/types/struct_tm.h \ + /usr/include/bits/types/clockid_t.h \ + /usr/include/bits/types/timer_t.h \ + /usr/include/bits/types/struct_itimerspec.h \ + /usr/include/bits/pthreadtypes.h \ + /usr/include/bits/thread-shared-types.h \ + /usr/include/bits/pthreadtypes-arch.h \ + /usr/include/bits/struct_mutex.h \ + /usr/include/bits/struct_rwlock.h \ + /usr/include/bits/setjmp.h \ + /usr/include/bits/types/__sigset_t.h \ + /usr/include/bits/types/struct___jmp_buf_tag.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/atomic_word.h \ + /usr/include/sys/single_threaded.h \ + /usr/include/c++/11/ext/alloc_traits.h \ + /usr/include/c++/11/bits/alloc_traits.h \ + /usr/include/c++/11/bits/stl_construct.h \ + /usr/include/c++/11/ext/string_conversions.h \ + /usr/include/c++/11/cstdlib \ + /usr/include/stdlib.h \ + /usr/include/bits/waitflags.h \ + /usr/include/bits/waitstatus.h \ + /usr/include/sys/types.h \ + /usr/include/endian.h \ + /usr/include/bits/byteswap.h \ + /usr/include/bits/uintn-identity.h \ + /usr/include/sys/select.h \ + /usr/include/bits/select.h \ + /usr/include/bits/types/sigset_t.h \ + /usr/include/alloca.h \ + /usr/include/bits/stdlib-bsearch.h \ + /usr/include/bits/stdlib-float.h \ + /usr/include/c++/11/bits/std_abs.h \ + /usr/include/c++/11/cstdio \ + /usr/include/stdio.h \ + /usr/include/bits/types/__fpos_t.h \ + /usr/include/bits/types/__fpos64_t.h \ + /usr/include/bits/types/struct_FILE.h \ + /usr/include/bits/types/cookie_io_functions_t.h \ + /usr/include/bits/stdio_lim.h \ + /usr/include/bits/stdio.h \ + /usr/include/c++/11/cerrno \ + /usr/include/errno.h \ + /usr/include/bits/errno.h \ + /usr/include/linux/errno.h \ + /usr/include/asm/errno.h \ + /usr/include/asm-generic/errno.h \ + /usr/include/asm-generic/errno-base.h \ + /usr/include/bits/types/error_t.h \ + /usr/include/c++/11/bits/charconv.h \ + /usr/include/c++/11/bits/functional_hash.h \ + /usr/include/c++/11/bits/hash_bytes.h \ + /usr/include/c++/11/bits/basic_string.tcc \ + /usr/include/c++/11/functional \ + /usr/include/c++/11/tuple \ + /usr/include/c++/11/utility \ + /usr/include/c++/11/bits/stl_relops.h \ + /usr/include/c++/11/array \ + /usr/include/c++/11/bits/uses_allocator.h \ + /usr/include/c++/11/bits/invoke.h \ + /usr/include/c++/11/bits/refwrap.h \ + /usr/include/c++/11/bits/std_function.h \ + /usr/include/c++/11/typeinfo \ + /usr/include/c++/11/vector \ + /usr/include/c++/11/bits/stl_uninitialized.h \ + /usr/include/c++/11/bits/stl_vector.h \ + /usr/include/c++/11/bits/stl_bvector.h \ + /usr/include/c++/11/bits/vector.tcc \ + /usr/include/c++/11/memory \ + /usr/include/c++/11/bits/stl_tempbuf.h \ + /usr/include/c++/11/bits/stl_raw_storage_iter.h \ + /usr/include/c++/11/bits/align.h \ + /usr/include/c++/11/bit \ + /usr/include/c++/11/bits/unique_ptr.h \ + /usr/include/c++/11/bits/shared_ptr.h \ + /usr/include/c++/11/bits/shared_ptr_base.h \ + /usr/include/c++/11/bits/allocated_ptr.h \ + /usr/include/c++/11/ext/aligned_buffer.h \ + /usr/include/c++/11/ext/concurrence.h \ + /usr/include/c++/11/exception \ + /usr/include/c++/11/bits/exception_ptr.h \ + /usr/include/c++/11/bits/cxxabi_init_exception.h \ + /usr/include/c++/11/bits/nested_exception.h \ + /usr/include/c++/11/bits/shared_ptr_atomic.h \ + /usr/include/c++/11/bits/atomic_base.h \ + /usr/include/c++/11/bits/atomic_lockfree_defines.h \ + /usr/include/c++/11/backward/auto_ptr.h \ + /usr/include/boost/process.hpp \ + /usr/include/boost/process/args.hpp \ + /usr/include/boost/process/detail/basic_cmd.hpp \ + /usr/include/boost/process/detail/config.hpp \ + /usr/include/boost/config.hpp \ + /usr/include/boost/config/user.hpp \ + /usr/include/boost/config/detail/select_compiler_config.hpp \ + /usr/include/boost/config/compiler/gcc.hpp \ + /usr/include/c++/11/cstddef \ + /usr/include/boost/config/detail/select_stdlib_config.hpp \ + /usr/include/c++/11/version \ + /usr/include/boost/config/stdlib/libstdcpp3.hpp \ + /usr/include/unistd.h \ + /usr/include/bits/posix_opt.h \ + /usr/include/bits/environments.h \ + /usr/include/bits/confname.h \ + /usr/include/bits/getopt_posix.h \ + /usr/include/bits/getopt_core.h \ + /usr/include/bits/unistd_ext.h \ + /usr/include/boost/config/detail/select_platform_config.hpp \ + /usr/include/boost/config/platform/linux.hpp \ + /usr/include/boost/config/detail/posix_features.hpp \ + /usr/include/boost/config/detail/suffix.hpp \ + /usr/include/boost/config/helper_macros.hpp \ + /usr/include/c++/11/system_error \ + /usr/include/c++/11/x86_64-redhat-linux/bits/error_constants.h \ + /usr/include/c++/11/stdexcept \ + /usr/include/boost/system/api_config.hpp \ + /usr/include/boost/process/exception.hpp \ + /usr/include/boost/process/detail/handler_base.hpp \ + /usr/include/boost/process/detail/traits/cmd_or_exe.hpp \ + /usr/include/boost/filesystem/path.hpp \ + /usr/include/boost/assert.hpp \ + /usr/include/assert.h \ + /usr/include/boost/filesystem/config.hpp \ + /usr/include/boost/detail/workaround.hpp \ + /usr/include/boost/config/workaround.hpp \ + /usr/include/boost/config/auto_link.hpp \ + /usr/include/boost/filesystem/path_traits.hpp \ + /usr/include/boost/type_traits/is_array.hpp \ + /usr/include/boost/type_traits/integral_constant.hpp \ + /usr/include/boost/type_traits/decay.hpp \ + /usr/include/boost/type_traits/is_function.hpp \ + /usr/include/boost/type_traits/detail/config.hpp \ + /usr/include/boost/version.hpp \ + /usr/include/boost/type_traits/detail/is_function_cxx_11.hpp \ + /usr/include/boost/type_traits/remove_bounds.hpp \ + /usr/include/boost/type_traits/remove_extent.hpp \ + /usr/include/boost/type_traits/add_pointer.hpp \ + /usr/include/boost/type_traits/remove_reference.hpp \ + /usr/include/boost/type_traits/remove_cv.hpp \ + /usr/include/boost/system/error_code.hpp \ + /usr/include/boost/system/detail/error_code.hpp \ + /usr/include/boost/system/detail/error_category.hpp \ + /usr/include/boost/system/detail/config.hpp \ + /usr/include/boost/cstdint.hpp \ + /usr/include/boost/system/detail/error_condition.hpp \ + /usr/include/boost/system/detail/generic_category.hpp \ + /usr/include/boost/system/detail/generic_category_message.hpp \ + /usr/include/c++/11/cstring \ + /usr/include/string.h \ + /usr/include/strings.h \ + /usr/include/boost/system/detail/enable_if.hpp \ + /usr/include/boost/system/is_error_condition_enum.hpp \ + /usr/include/boost/system/detail/system_category.hpp \ + /usr/include/boost/system/is_error_code_enum.hpp \ + /usr/include/c++/11/ostream \ + /usr/include/c++/11/ios \ + /usr/include/c++/11/bits/ios_base.h \ + /usr/include/c++/11/bits/locale_classes.h \ + /usr/include/c++/11/bits/locale_classes.tcc \ + /usr/include/c++/11/streambuf \ + /usr/include/c++/11/bits/streambuf.tcc \ + /usr/include/c++/11/bits/basic_ios.h \ + /usr/include/c++/11/bits/locale_facets.h \ + /usr/include/c++/11/cwctype \ + /usr/include/wctype.h \ + /usr/include/bits/wctype-wchar.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/ctype_base.h \ + /usr/include/c++/11/bits/streambuf_iterator.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/ctype_inline.h \ + /usr/include/c++/11/bits/locale_facets.tcc \ + /usr/include/c++/11/bits/basic_ios.tcc \ + /usr/include/c++/11/bits/ostream.tcc \ + /usr/include/boost/system/error_category.hpp \ + /usr/include/boost/system/detail/error_category_impl.hpp \ + /usr/include/boost/system/detail/to_std_category.hpp \ + /usr/include/c++/11/map \ + /usr/include/c++/11/bits/stl_tree.h \ + /usr/include/c++/11/bits/stl_map.h \ + /usr/include/c++/11/bits/stl_multimap.h \ + /usr/include/c++/11/bits/erase_if.h \ + /usr/include/c++/11/mutex \ + /usr/include/c++/11/chrono \ + /usr/include/c++/11/ratio \ + /usr/include/c++/11/limits \ + /usr/include/c++/11/ctime \ + /usr/include/c++/11/bits/parse_numbers.h \ + /usr/include/c++/11/bits/std_mutex.h \ + /usr/include/c++/11/bits/unique_lock.h \ + /usr/include/boost/system/error_condition.hpp \ + /usr/include/boost/system/errc.hpp \ + /usr/include/boost/system/detail/errc.hpp \ + /usr/include/boost/system/detail/cerrno.hpp \ + /usr/include/boost/system/generic_category.hpp \ + /usr/include/boost/system/system_category.hpp \ + /usr/include/boost/system/detail/system_category_impl.hpp \ + /usr/include/boost/system/detail/is_generic_value.hpp \ + /usr/include/boost/system/detail/throws.hpp \ + /usr/include/boost/core/enable_if.hpp \ + /usr/include/c++/11/list \ + /usr/include/c++/11/bits/stl_list.h \ + /usr/include/c++/11/bits/list.tcc \ + /usr/include/c++/11/iterator \ + /usr/include/c++/11/bits/stream_iterator.h \ + /usr/include/c++/11/locale \ + /usr/include/c++/11/bits/locale_facets_nonio.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/time_members.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/messages_members.h \ + /usr/include/libintl.h \ + /usr/include/c++/11/bits/codecvt.h \ + /usr/include/c++/11/bits/locale_facets_nonio.tcc \ + /usr/include/c++/11/bits/locale_conv.h \ + /usr/include/boost/config/abi_prefix.hpp \ + /usr/include/boost/config/abi_suffix.hpp \ + /usr/include/boost/system/system_error.hpp \ + /usr/include/c++/11/cassert \ + /usr/include/boost/iterator/iterator_facade.hpp \ + /usr/include/boost/iterator/interoperable.hpp \ + /usr/include/boost/mpl/bool.hpp \ + /usr/include/boost/mpl/bool_fwd.hpp \ + /usr/include/boost/mpl/aux_/adl_barrier.hpp \ + /usr/include/boost/mpl/aux_/config/adl.hpp \ + /usr/include/boost/mpl/aux_/config/msvc.hpp \ + /usr/include/boost/mpl/aux_/config/intel.hpp \ + /usr/include/boost/mpl/aux_/config/gcc.hpp \ + /usr/include/boost/mpl/aux_/config/workaround.hpp \ + /usr/include/boost/mpl/integral_c_tag.hpp \ + /usr/include/boost/mpl/aux_/config/static_constant.hpp \ + /usr/include/boost/mpl/or.hpp \ + /usr/include/boost/mpl/aux_/config/use_preprocessed.hpp \ + /usr/include/boost/mpl/aux_/nested_type_wknd.hpp \ + /usr/include/boost/mpl/aux_/na_spec.hpp \ + /usr/include/boost/mpl/lambda_fwd.hpp \ + /usr/include/boost/mpl/void_fwd.hpp \ + /usr/include/boost/mpl/aux_/na.hpp \ + /usr/include/boost/mpl/aux_/na_fwd.hpp \ + /usr/include/boost/mpl/aux_/config/ctps.hpp \ + /usr/include/boost/mpl/aux_/config/lambda.hpp \ + /usr/include/boost/mpl/aux_/config/ttp.hpp \ + /usr/include/boost/mpl/int.hpp \ + /usr/include/boost/mpl/int_fwd.hpp \ + /usr/include/boost/mpl/aux_/nttp_decl.hpp \ + /usr/include/boost/mpl/aux_/config/nttp.hpp \ + /usr/include/boost/mpl/aux_/integral_wrapper.hpp \ + /usr/include/boost/mpl/aux_/static_cast.hpp \ + /usr/include/boost/preprocessor/cat.hpp \ + /usr/include/boost/preprocessor/config/config.hpp \ + /usr/include/boost/mpl/aux_/lambda_arity_param.hpp \ + /usr/include/boost/mpl/aux_/template_arity_fwd.hpp \ + /usr/include/boost/mpl/aux_/arity.hpp \ + /usr/include/boost/mpl/aux_/config/dtp.hpp \ + /usr/include/boost/mpl/aux_/preprocessor/params.hpp \ + /usr/include/boost/mpl/aux_/config/preprocessor.hpp \ + /usr/include/boost/preprocessor/comma_if.hpp \ + /usr/include/boost/preprocessor/punctuation/comma_if.hpp \ + /usr/include/boost/preprocessor/control/if.hpp \ + /usr/include/boost/preprocessor/control/iif.hpp \ + /usr/include/boost/preprocessor/logical/bool.hpp \ + /usr/include/boost/preprocessor/config/limits.hpp \ + /usr/include/boost/preprocessor/logical/limits/bool_256.hpp \ + /usr/include/boost/preprocessor/facilities/empty.hpp \ + /usr/include/boost/preprocessor/punctuation/comma.hpp \ + /usr/include/boost/preprocessor/repeat.hpp \ + /usr/include/boost/preprocessor/repetition/repeat.hpp \ + /usr/include/boost/preprocessor/debug/error.hpp \ + /usr/include/boost/preprocessor/detail/auto_rec.hpp \ + /usr/include/boost/preprocessor/detail/limits/auto_rec_256.hpp \ + /usr/include/boost/preprocessor/tuple/eat.hpp \ + /usr/include/boost/preprocessor/repetition/limits/repeat_256.hpp \ + /usr/include/boost/preprocessor/inc.hpp \ + /usr/include/boost/preprocessor/arithmetic/inc.hpp \ + /usr/include/boost/preprocessor/arithmetic/limits/inc_256.hpp \ + /usr/include/boost/mpl/aux_/preprocessor/enum.hpp \ + /usr/include/boost/mpl/aux_/preprocessor/def_params_tail.hpp \ + /usr/include/boost/mpl/limits/arity.hpp \ + /usr/include/boost/preprocessor/logical/and.hpp \ + /usr/include/boost/preprocessor/logical/bitand.hpp \ + /usr/include/boost/preprocessor/identity.hpp \ + /usr/include/boost/preprocessor/facilities/identity.hpp \ + /usr/include/boost/preprocessor/empty.hpp \ + /usr/include/boost/preprocessor/arithmetic/add.hpp \ + /usr/include/boost/preprocessor/arithmetic/dec.hpp \ + /usr/include/boost/preprocessor/arithmetic/limits/dec_256.hpp \ + /usr/include/boost/preprocessor/control/while.hpp \ + /usr/include/boost/preprocessor/list/fold_left.hpp \ + /usr/include/boost/preprocessor/list/detail/fold_left.hpp \ + /usr/include/boost/preprocessor/control/expr_iif.hpp \ + /usr/include/boost/preprocessor/list/adt.hpp \ + /usr/include/boost/preprocessor/detail/is_binary.hpp \ + /usr/include/boost/preprocessor/detail/check.hpp \ + /usr/include/boost/preprocessor/logical/compl.hpp \ + /usr/include/boost/preprocessor/list/detail/limits/fold_left_256.hpp \ + /usr/include/boost/preprocessor/list/limits/fold_left_256.hpp \ + /usr/include/boost/preprocessor/list/fold_right.hpp \ + /usr/include/boost/preprocessor/list/detail/fold_right.hpp \ + /usr/include/boost/preprocessor/list/reverse.hpp \ + /usr/include/boost/preprocessor/list/detail/limits/fold_right_256.hpp \ + /usr/include/boost/preprocessor/control/detail/while.hpp \ + /usr/include/boost/preprocessor/control/detail/limits/while_256.hpp \ + /usr/include/boost/preprocessor/control/limits/while_256.hpp \ + /usr/include/boost/preprocessor/logical/bitor.hpp \ + /usr/include/boost/preprocessor/tuple/elem.hpp \ + /usr/include/boost/preprocessor/facilities/expand.hpp \ + /usr/include/boost/preprocessor/facilities/overload.hpp \ + /usr/include/boost/preprocessor/variadic/size.hpp \ + /usr/include/boost/preprocessor/facilities/check_empty.hpp \ + /usr/include/boost/preprocessor/variadic/has_opt.hpp \ + /usr/include/boost/preprocessor/variadic/limits/size_64.hpp \ + /usr/include/boost/preprocessor/tuple/rem.hpp \ + /usr/include/boost/preprocessor/tuple/detail/is_single_return.hpp \ + /usr/include/boost/preprocessor/variadic/elem.hpp \ + /usr/include/boost/preprocessor/variadic/limits/elem_64.hpp \ + /usr/include/boost/preprocessor/arithmetic/detail/is_maximum_number.hpp \ + /usr/include/boost/preprocessor/comparison/equal.hpp \ + /usr/include/boost/preprocessor/comparison/not_equal.hpp \ + /usr/include/boost/preprocessor/comparison/limits/not_equal_256.hpp \ + /usr/include/boost/preprocessor/arithmetic/detail/maximum_number.hpp \ + /usr/include/boost/preprocessor/arithmetic/detail/is_minimum_number.hpp \ + /usr/include/boost/preprocessor/logical/not.hpp \ + /usr/include/boost/preprocessor/arithmetic/sub.hpp \ + /usr/include/boost/mpl/aux_/config/eti.hpp \ + /usr/include/boost/mpl/aux_/config/overload_resolution.hpp \ + /usr/include/boost/mpl/aux_/lambda_support.hpp \ + /usr/include/boost/mpl/aux_/include_preprocessed.hpp \ + /usr/include/boost/mpl/aux_/config/compiler.hpp \ + /usr/include/boost/preprocessor/stringize.hpp \ + /usr/include/boost/mpl/aux_/preprocessed/gcc/or.hpp \ + /usr/include/boost/type_traits/is_convertible.hpp \ + /usr/include/boost/type_traits/intrinsics.hpp \ + /usr/include/boost/type_traits/is_complete.hpp \ + /usr/include/boost/type_traits/declval.hpp \ + /usr/include/boost/type_traits/add_rvalue_reference.hpp \ + /usr/include/boost/type_traits/is_void.hpp \ + /usr/include/boost/type_traits/is_reference.hpp \ + /usr/include/boost/type_traits/is_lvalue_reference.hpp \ + /usr/include/boost/type_traits/is_rvalue_reference.hpp \ + /usr/include/boost/type_traits/detail/yes_no_type.hpp \ + /usr/include/boost/static_assert.hpp \ + /usr/include/boost/type_traits/is_arithmetic.hpp \ + /usr/include/boost/type_traits/is_integral.hpp \ + /usr/include/boost/type_traits/is_floating_point.hpp \ + /usr/include/boost/type_traits/is_abstract.hpp \ + /usr/include/boost/type_traits/add_lvalue_reference.hpp \ + /usr/include/boost/type_traits/add_reference.hpp \ + /usr/include/boost/iterator/detail/config_def.hpp \ + /usr/include/boost/iterator/detail/config_undef.hpp \ + /usr/include/boost/iterator/iterator_traits.hpp \ + /usr/include/boost/iterator/iterator_categories.hpp \ + /usr/include/boost/mpl/eval_if.hpp \ + /usr/include/boost/mpl/if.hpp \ + /usr/include/boost/mpl/aux_/value_wknd.hpp \ + /usr/include/boost/mpl/aux_/config/integral.hpp \ + /usr/include/boost/mpl/identity.hpp \ + /usr/include/boost/mpl/placeholders.hpp \ + /usr/include/boost/mpl/arg.hpp \ + /usr/include/boost/mpl/arg_fwd.hpp \ + /usr/include/boost/mpl/aux_/na_assert.hpp \ + /usr/include/boost/mpl/assert.hpp \ + /usr/include/boost/mpl/not.hpp \ + /usr/include/boost/mpl/aux_/yes_no.hpp \ + /usr/include/boost/mpl/aux_/config/arrays.hpp \ + /usr/include/boost/mpl/aux_/config/gpu.hpp \ + /usr/include/boost/mpl/aux_/config/pp_counter.hpp \ + /usr/include/boost/mpl/aux_/arity_spec.hpp \ + /usr/include/boost/mpl/aux_/arg_typedef.hpp \ + /usr/include/boost/mpl/aux_/preprocessed/gcc/arg.hpp \ + /usr/include/boost/mpl/aux_/preprocessed/gcc/placeholders.hpp \ + /usr/include/boost/iterator/detail/facade_iterator_category.hpp \ + /usr/include/boost/core/use_default.hpp \ + /usr/include/boost/mpl/and.hpp \ + /usr/include/boost/mpl/aux_/preprocessed/gcc/and.hpp \ + /usr/include/boost/type_traits/is_same.hpp \ + /usr/include/boost/type_traits/is_const.hpp \ + /usr/include/boost/detail/indirect_traits.hpp \ + /usr/include/boost/type_traits/is_pointer.hpp \ + /usr/include/boost/type_traits/is_class.hpp \ + /usr/include/boost/type_traits/is_volatile.hpp \ + /usr/include/boost/type_traits/is_member_function_pointer.hpp \ + /usr/include/boost/type_traits/detail/is_member_function_pointer_cxx_11.hpp \ + /usr/include/boost/type_traits/is_member_pointer.hpp \ + /usr/include/boost/type_traits/remove_pointer.hpp \ + /usr/include/boost/detail/select_type.hpp \ + /usr/include/boost/iterator/detail/enable_if.hpp \ + /usr/include/boost/core/addressof.hpp \ + /usr/include/boost/type_traits/add_const.hpp \ + /usr/include/boost/type_traits/remove_const.hpp \ + /usr/include/boost/type_traits/is_pod.hpp \ + /usr/include/boost/type_traits/is_scalar.hpp \ + /usr/include/boost/type_traits/is_enum.hpp \ + /usr/include/boost/mpl/always.hpp \ + /usr/include/boost/mpl/aux_/preprocessor/default_params.hpp \ + /usr/include/boost/mpl/apply.hpp \ + /usr/include/boost/mpl/apply_fwd.hpp \ + /usr/include/boost/mpl/aux_/preprocessed/gcc/apply_fwd.hpp \ + /usr/include/boost/mpl/apply_wrap.hpp \ + /usr/include/boost/mpl/aux_/has_apply.hpp \ + /usr/include/boost/mpl/has_xxx.hpp \ + /usr/include/boost/mpl/aux_/type_wrapper.hpp \ + /usr/include/boost/mpl/aux_/config/has_xxx.hpp \ + /usr/include/boost/mpl/aux_/config/msvc_typename.hpp \ + /usr/include/boost/preprocessor/array/elem.hpp \ + /usr/include/boost/preprocessor/array/data.hpp \ + /usr/include/boost/preprocessor/array/size.hpp \ + /usr/include/boost/preprocessor/repetition/enum_params.hpp \ + /usr/include/boost/preprocessor/repetition/enum_trailing_params.hpp \ + /usr/include/boost/mpl/aux_/config/has_apply.hpp \ + /usr/include/boost/mpl/aux_/msvc_never_true.hpp \ + /usr/include/boost/mpl/aux_/preprocessed/gcc/apply_wrap.hpp \ + /usr/include/boost/mpl/lambda.hpp \ + /usr/include/boost/mpl/bind.hpp \ + /usr/include/boost/mpl/bind_fwd.hpp \ + /usr/include/boost/mpl/aux_/config/bind.hpp \ + /usr/include/boost/mpl/aux_/preprocessed/gcc/bind_fwd.hpp \ + /usr/include/boost/mpl/next.hpp \ + /usr/include/boost/mpl/next_prior.hpp \ + /usr/include/boost/mpl/aux_/common_name_wknd.hpp \ + /usr/include/boost/mpl/protect.hpp \ + /usr/include/boost/mpl/aux_/preprocessed/gcc/bind.hpp \ + /usr/include/boost/mpl/aux_/full_lambda.hpp \ + /usr/include/boost/mpl/quote.hpp \ + /usr/include/boost/mpl/void.hpp \ + /usr/include/boost/mpl/aux_/has_type.hpp \ + /usr/include/boost/mpl/aux_/config/bcc.hpp \ + /usr/include/boost/mpl/aux_/preprocessed/gcc/quote.hpp \ + /usr/include/boost/mpl/aux_/template_arity.hpp \ + /usr/include/boost/mpl/aux_/preprocessed/gcc/template_arity.hpp \ + /usr/include/boost/mpl/aux_/preprocessed/gcc/full_lambda.hpp \ + /usr/include/boost/mpl/aux_/preprocessed/gcc/apply.hpp \ + /usr/include/boost/io/quoted.hpp \ + /usr/include/boost/io/detail/buffer_fill.hpp \ + /usr/include/boost/io/detail/ostream_guard.hpp \ + /usr/include/boost/io/ios_state.hpp \ + /usr/include/boost/io_fwd.hpp \ + /usr/include/boost/functional/hash_fwd.hpp \ + /usr/include/boost/container_hash/hash_fwd.hpp \ + /usr/include/c++/11/algorithm \ + /usr/include/c++/11/bits/stl_algo.h \ + /usr/include/c++/11/bits/algorithmfwd.h \ + /usr/include/c++/11/bits/stl_heap.h \ + /usr/include/c++/11/bits/uniform_int_dist.h \ + /usr/include/boost/process/detail/traits/decl.hpp \ + /usr/include/boost/none.hpp \ + /usr/include/boost/none_t.hpp \ + /usr/include/boost/process/detail/posix/handler.hpp \ + /usr/include/boost/process/detail/traits/wchar_t.hpp \ + /usr/include/boost/process/detail/traits/env.hpp \ + /usr/include/boost/process/locale.hpp \ + /usr/include/boost/process/detail/posix/basic_cmd.hpp \ + /usr/include/boost/process/detail/posix/cmd.hpp \ + /usr/include/boost/algorithm/string/replace.hpp \ + /usr/include/boost/algorithm/string/config.hpp \ + /usr/include/boost/range/iterator_range_core.hpp \ + /usr/include/boost/type_traits/is_base_and_derived.hpp \ + /usr/include/boost/range/functions.hpp \ + /usr/include/boost/range/begin.hpp \ + /usr/include/boost/range/config.hpp \ + /usr/include/boost/range/iterator.hpp \ + /usr/include/boost/range/range_fwd.hpp \ + /usr/include/boost/range/mutable_iterator.hpp \ + /usr/include/boost/range/detail/extract_optional_type.hpp \ + /usr/include/boost/range/detail/msvc_has_iterator_workaround.hpp \ + /usr/include/boost/range/const_iterator.hpp \ + /usr/include/boost/range/end.hpp \ + /usr/include/boost/range/detail/implementation_help.hpp \ + /usr/include/boost/range/detail/common.hpp \ + /usr/include/boost/range/detail/sfinae.hpp \ + /usr/include/boost/range/size.hpp \ + /usr/include/boost/range/size_type.hpp \ + /usr/include/boost/range/difference_type.hpp \ + /usr/include/boost/range/has_range_iterator.hpp \ + /usr/include/boost/utility/enable_if.hpp \ + /usr/include/boost/range/concepts.hpp \ + /usr/include/boost/concept_check.hpp \ + /usr/include/boost/concept/assert.hpp \ + /usr/include/boost/concept/detail/general.hpp \ + /usr/include/boost/concept/detail/backward_compatibility.hpp \ + /usr/include/boost/concept/detail/has_constraints.hpp \ + /usr/include/boost/type_traits/conditional.hpp \ + /usr/include/boost/type_traits/conversion_traits.hpp \ + /usr/include/boost/concept/usage.hpp \ + /usr/include/boost/concept/detail/concept_def.hpp \ + /usr/include/boost/preprocessor/seq/for_each_i.hpp \ + /usr/include/boost/preprocessor/repetition/for.hpp \ + /usr/include/boost/preprocessor/repetition/detail/for.hpp \ + /usr/include/boost/preprocessor/repetition/detail/limits/for_256.hpp \ + /usr/include/boost/preprocessor/repetition/limits/for_256.hpp \ + /usr/include/boost/preprocessor/seq/seq.hpp \ + /usr/include/boost/preprocessor/seq/elem.hpp \ + /usr/include/boost/preprocessor/seq/limits/elem_256.hpp \ + /usr/include/boost/preprocessor/seq/size.hpp \ + /usr/include/boost/preprocessor/seq/limits/size_256.hpp \ + /usr/include/boost/preprocessor/seq/detail/is_empty.hpp \ + /usr/include/boost/preprocessor/seq/enum.hpp \ + /usr/include/boost/preprocessor/seq/limits/enum_256.hpp \ + /usr/include/boost/concept/detail/concept_undef.hpp \ + /usr/include/boost/iterator/iterator_concepts.hpp \ + /usr/include/boost/limits.hpp \ + /usr/include/boost/range/value_type.hpp \ + /usr/include/boost/range/detail/misc_concept.hpp \ + /usr/include/boost/type_traits/make_unsigned.hpp \ + /usr/include/boost/type_traits/is_signed.hpp \ + /usr/include/c++/11/climits \ + /usr/lib/gcc/x86_64-redhat-linux/11/include/limits.h \ + /usr/lib/gcc/x86_64-redhat-linux/11/include/syslimits.h \ + /usr/include/limits.h \ + /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h \ + /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h \ + /usr/include/bits/xopen_lim.h \ + /usr/include/bits/uio_lim.h \ + /usr/include/boost/type_traits/is_unsigned.hpp \ + /usr/include/boost/type_traits/add_volatile.hpp \ + /usr/include/boost/range/detail/has_member_size.hpp \ + /usr/include/boost/utility.hpp \ + /usr/include/boost/utility/base_from_member.hpp \ + /usr/include/boost/preprocessor/repetition/enum_binary_params.hpp \ + /usr/include/boost/preprocessor/repetition/repeat_from_to.hpp \ + /usr/include/boost/utility/binary.hpp \ + /usr/include/boost/preprocessor/control/deduce_d.hpp \ + /usr/include/boost/preprocessor/seq/cat.hpp \ + /usr/include/boost/preprocessor/seq/fold_left.hpp \ + /usr/include/boost/preprocessor/seq/limits/fold_left_256.hpp \ + /usr/include/boost/preprocessor/seq/transform.hpp \ + /usr/include/boost/preprocessor/arithmetic/mod.hpp \ + /usr/include/boost/preprocessor/arithmetic/detail/div_base.hpp \ + /usr/include/boost/preprocessor/comparison/less_equal.hpp \ + /usr/include/boost/preprocessor/arithmetic/detail/is_1_number.hpp \ + /usr/include/boost/utility/identity_type.hpp \ + /usr/include/boost/type_traits/function_traits.hpp \ + /usr/include/boost/core/checked_delete.hpp \ + /usr/include/boost/core/noncopyable.hpp \ + /usr/include/boost/range/distance.hpp \ + /usr/include/boost/iterator/distance.hpp \ + /usr/include/boost/range/empty.hpp \ + /usr/include/boost/range/rbegin.hpp \ + /usr/include/boost/range/reverse_iterator.hpp \ + /usr/include/boost/iterator/reverse_iterator.hpp \ + /usr/include/boost/iterator/iterator_adaptor.hpp \ + /usr/include/boost/range/rend.hpp \ + /usr/include/boost/range/algorithm/equal.hpp \ + /usr/include/boost/range/detail/safe_bool.hpp \ + /usr/include/boost/next_prior.hpp \ + /usr/include/boost/type_traits/has_plus.hpp \ + /usr/include/boost/type_traits/detail/has_binary_operator.hpp \ + /usr/include/boost/type_traits/make_void.hpp \ + /usr/include/boost/type_traits/has_plus_assign.hpp \ + /usr/include/boost/type_traits/has_minus.hpp \ + /usr/include/boost/type_traits/has_minus_assign.hpp \ + /usr/include/boost/iterator/advance.hpp \ + /usr/include/boost/algorithm/string/find_format.hpp \ + /usr/include/c++/11/deque \ + /usr/include/c++/11/bits/stl_deque.h \ + /usr/include/c++/11/bits/deque.tcc \ + /usr/include/boost/range/as_literal.hpp \ + /usr/include/boost/range/iterator_range.hpp \ + /usr/include/boost/range/iterator_range_io.hpp \ + /usr/include/boost/range/detail/str_types.hpp \ + /usr/include/boost/algorithm/string/concept.hpp \ + /usr/include/boost/algorithm/string/detail/find_format.hpp \ + /usr/include/boost/algorithm/string/detail/find_format_store.hpp \ + /usr/include/boost/algorithm/string/detail/replace_storage.hpp \ + /usr/include/boost/algorithm/string/sequence_traits.hpp \ + /usr/include/boost/algorithm/string/yes_no_type.hpp \ + /usr/include/boost/algorithm/string/detail/sequence.hpp \ + /usr/include/boost/mpl/logical.hpp \ + /usr/include/boost/algorithm/string/detail/find_format_all.hpp \ + /usr/include/boost/algorithm/string/finder.hpp \ + /usr/include/boost/algorithm/string/constants.hpp \ + /usr/include/boost/algorithm/string/detail/finder.hpp \ + /usr/include/boost/algorithm/string/compare.hpp \ + /usr/include/boost/algorithm/string/formatter.hpp \ + /usr/include/boost/algorithm/string/detail/formatter.hpp \ + /usr/include/boost/algorithm/string/detail/util.hpp \ + /usr/include/boost/process/shell.hpp \ + /usr/include/boost/process/detail/posix/shell_path.hpp \ + /usr/include/boost/algorithm/string/trim.hpp \ + /usr/include/boost/algorithm/string/detail/trim.hpp \ + /usr/include/boost/algorithm/string/classification.hpp \ + /usr/include/boost/algorithm/string/detail/classification.hpp \ + /usr/include/boost/algorithm/string/predicate_facade.hpp \ + /usr/include/boost/algorithm/string/join.hpp \ + /usr/include/boost/process/async.hpp \ + /usr/include/boost/process/detail/traits.hpp \ + /usr/include/boost/process/detail/traits/async.hpp \ + /usr/include/boost/process/detail/traits/error.hpp \ + /usr/include/boost/process/detail/on_exit.hpp \ + /usr/include/boost/process/detail/posix/on_exit.hpp \ + /usr/include/boost/process/detail/posix/async_handler.hpp \ + /usr/include/c++/11/future \ + /usr/include/c++/11/condition_variable \ + /usr/include/c++/11/atomic \ + /usr/include/c++/11/bits/atomic_futex.h \ + /usr/include/c++/11/bits/std_thread.h \ + /usr/include/boost/asio/io_context.hpp \ + /usr/include/boost/asio/detail/config.hpp \ + /usr/include/linux/version.h \ + /usr/include/boost/asio/async_result.hpp \ + /usr/include/boost/asio/detail/type_traits.hpp \ + /usr/include/boost/asio/detail/variadic_templates.hpp \ + /usr/include/boost/asio/detail/push_options.hpp \ + /usr/include/boost/asio/detail/pop_options.hpp \ + /usr/include/boost/asio/detail/wrapped_handler.hpp \ + /usr/include/boost/asio/detail/bind_handler.hpp \ + /usr/include/boost/asio/associated_allocator.hpp \ + /usr/include/boost/asio/associated_executor.hpp \ + /usr/include/boost/asio/execution/executor.hpp \ + /usr/include/boost/asio/execution/execute.hpp \ + /usr/include/boost/asio/execution/detail/as_invocable.hpp \ + /usr/include/boost/asio/detail/atomic_count.hpp \ + /usr/include/boost/asio/detail/memory.hpp \ + /usr/include/boost/asio/execution/receiver_invocation_error.hpp \ + /usr/include/boost/asio/execution/impl/receiver_invocation_error.ipp \ + /usr/include/boost/asio/execution/set_done.hpp \ + /usr/include/boost/asio/traits/set_done_member.hpp \ + /usr/include/boost/asio/traits/set_done_free.hpp \ + /usr/include/boost/asio/execution/set_error.hpp \ + /usr/include/boost/asio/traits/set_error_member.hpp \ + /usr/include/boost/asio/traits/set_error_free.hpp \ + /usr/include/boost/asio/execution/set_value.hpp \ + /usr/include/boost/asio/traits/set_value_member.hpp \ + /usr/include/boost/asio/traits/set_value_free.hpp \ + /usr/include/boost/asio/execution/detail/as_receiver.hpp \ + /usr/include/boost/asio/traits/execute_member.hpp \ + /usr/include/boost/asio/traits/execute_free.hpp \ + /usr/include/boost/asio/execution/invocable_archetype.hpp \ + /usr/include/boost/asio/traits/equality_comparable.hpp \ + /usr/include/boost/asio/is_executor.hpp \ + /usr/include/boost/asio/detail/is_executor.hpp \ + /usr/include/boost/asio/system_executor.hpp \ + /usr/include/boost/asio/execution.hpp \ + /usr/include/boost/asio/execution/allocator.hpp \ + /usr/include/boost/asio/execution/scheduler.hpp \ + /usr/include/boost/asio/execution/schedule.hpp \ + /usr/include/boost/asio/traits/schedule_member.hpp \ + /usr/include/boost/asio/traits/schedule_free.hpp \ + /usr/include/boost/asio/execution/sender.hpp \ + /usr/include/boost/asio/execution/detail/void_receiver.hpp \ + /usr/include/boost/asio/execution/receiver.hpp \ + /usr/include/boost/asio/execution/connect.hpp \ + /usr/include/boost/asio/execution/detail/as_operation.hpp \ + /usr/include/boost/asio/traits/start_member.hpp \ + /usr/include/boost/asio/execution/operation_state.hpp \ + /usr/include/boost/asio/execution/start.hpp \ + /usr/include/boost/asio/traits/start_free.hpp \ + /usr/include/boost/asio/traits/connect_member.hpp \ + /usr/include/boost/asio/traits/connect_free.hpp \ + /usr/include/boost/asio/is_applicable_property.hpp \ + /usr/include/boost/asio/traits/query_static_constexpr_member.hpp \ + /usr/include/boost/asio/traits/static_query.hpp \ + /usr/include/boost/asio/execution/any_executor.hpp \ + /usr/include/boost/asio/detail/assert.hpp \ + /usr/include/boost/asio/detail/cstddef.hpp \ + /usr/include/boost/asio/detail/executor_function.hpp \ + /usr/include/boost/asio/detail/handler_alloc_helpers.hpp \ + /usr/include/boost/asio/detail/noncopyable.hpp \ + /usr/include/boost/asio/detail/recycling_allocator.hpp \ + /usr/include/boost/asio/detail/thread_context.hpp \ + /usr/include/boost/asio/detail/call_stack.hpp \ + /usr/include/boost/asio/detail/tss_ptr.hpp \ + /usr/include/boost/asio/detail/keyword_tss_ptr.hpp \ + /usr/include/boost/asio/detail/thread_info_base.hpp \ + /usr/include/boost/asio/multiple_exceptions.hpp \ + /usr/include/boost/asio/impl/multiple_exceptions.ipp \ + /usr/include/boost/asio/handler_alloc_hook.hpp \ + /usr/include/boost/asio/impl/handler_alloc_hook.ipp \ + /usr/include/boost/asio/detail/handler_invoke_helpers.hpp \ + /usr/include/boost/asio/handler_invoke_hook.hpp \ + /usr/include/boost/asio/detail/non_const_lvalue.hpp \ + /usr/include/boost/asio/detail/scoped_ptr.hpp \ + /usr/include/boost/asio/detail/throw_exception.hpp \ + /usr/include/boost/throw_exception.hpp \ + /usr/include/boost/assert/source_location.hpp \ + /usr/include/boost/current_function.hpp \ + /usr/include/boost/exception/exception.hpp \ + /usr/include/boost/asio/execution/bad_executor.hpp \ + /usr/include/boost/asio/execution/impl/bad_executor.ipp \ + /usr/include/boost/asio/execution/blocking.hpp \ + /usr/include/boost/asio/prefer.hpp \ + /usr/include/boost/asio/traits/prefer_free.hpp \ + /usr/include/boost/asio/traits/prefer_member.hpp \ + /usr/include/boost/asio/traits/require_free.hpp \ + /usr/include/boost/asio/traits/require_member.hpp \ + /usr/include/boost/asio/traits/static_require.hpp \ + /usr/include/boost/asio/query.hpp \ + /usr/include/boost/asio/traits/query_member.hpp \ + /usr/include/boost/asio/traits/query_free.hpp \ + /usr/include/boost/asio/require.hpp \ + /usr/include/boost/asio/execution/blocking_adaptation.hpp \ + /usr/include/boost/asio/detail/event.hpp \ + /usr/include/boost/asio/detail/posix_event.hpp \ + /usr/include/boost/asio/detail/impl/posix_event.ipp \ + /usr/include/boost/asio/detail/throw_error.hpp \ + /usr/include/boost/asio/detail/impl/throw_error.ipp \ + /usr/include/boost/asio/error.hpp \ + /usr/include/boost/cerrno.hpp \ + /usr/include/netdb.h \ + /usr/include/netinet/in.h \ + /usr/include/sys/socket.h \ + /usr/include/bits/types/struct_iovec.h \ + /usr/include/bits/socket.h \ + /usr/include/bits/socket_type.h \ + /usr/include/bits/sockaddr.h \ + /usr/include/asm/socket.h \ + /usr/include/asm-generic/socket.h \ + /usr/include/linux/posix_types.h \ + /usr/include/linux/stddef.h \ + /usr/include/asm/posix_types.h \ + /usr/include/asm/posix_types_64.h \ + /usr/include/asm-generic/posix_types.h \ + /usr/include/asm/bitsperlong.h \ + /usr/include/asm-generic/bitsperlong.h \ + /usr/include/asm/sockios.h \ + /usr/include/asm-generic/sockios.h \ + /usr/include/bits/types/struct_osockaddr.h \ + /usr/include/bits/in.h \ + /usr/include/rpc/netdb.h \ + /usr/include/bits/types/sigevent_t.h \ + /usr/include/bits/types/__sigval_t.h \ + /usr/include/bits/netdb.h \ + /usr/include/boost/asio/impl/error.ipp \ + /usr/include/boost/asio/detail/mutex.hpp \ + /usr/include/boost/asio/detail/posix_mutex.hpp \ + /usr/include/boost/asio/detail/scoped_lock.hpp \ + /usr/include/boost/asio/detail/impl/posix_mutex.ipp \ + /usr/include/boost/asio/execution/bulk_execute.hpp \ + /usr/include/boost/asio/execution/bulk_guarantee.hpp \ + /usr/include/boost/asio/execution/detail/bulk_sender.hpp \ + /usr/include/boost/asio/traits/bulk_execute_member.hpp \ + /usr/include/boost/asio/traits/bulk_execute_free.hpp \ + /usr/include/boost/asio/execution/context.hpp \ + /usr/include/boost/asio/execution/context_as.hpp \ + /usr/include/boost/asio/execution/mapping.hpp \ + /usr/include/boost/asio/execution/occupancy.hpp \ + /usr/include/boost/asio/execution/outstanding_work.hpp \ + /usr/include/boost/asio/execution/prefer_only.hpp \ + /usr/include/boost/asio/execution/relationship.hpp \ + /usr/include/boost/asio/execution/submit.hpp \ + /usr/include/boost/asio/execution/detail/submit_receiver.hpp \ + /usr/include/boost/asio/traits/submit_member.hpp \ + /usr/include/boost/asio/traits/submit_free.hpp \ + /usr/include/boost/asio/impl/system_executor.hpp \ + /usr/include/boost/asio/detail/executor_op.hpp \ + /usr/include/boost/asio/detail/fenced_block.hpp \ + /usr/include/boost/asio/detail/std_fenced_block.hpp \ + /usr/include/boost/asio/detail/scheduler_operation.hpp \ + /usr/include/boost/asio/detail/handler_tracking.hpp \ + /usr/include/boost/asio/detail/impl/handler_tracking.ipp \ + /usr/include/boost/asio/detail/op_queue.hpp \ + /usr/include/boost/asio/detail/global.hpp \ + /usr/include/boost/asio/detail/posix_global.hpp \ + /usr/include/boost/asio/system_context.hpp \ + /usr/include/boost/asio/detail/scheduler.hpp \ + /usr/include/boost/asio/execution_context.hpp \ + /usr/include/boost/asio/impl/execution_context.hpp \ + /usr/include/boost/asio/detail/handler_type_requirements.hpp \ + /usr/include/boost/asio/detail/service_registry.hpp \ + /usr/include/boost/asio/detail/impl/service_registry.hpp \ + /usr/include/boost/asio/detail/impl/service_registry.ipp \ + /usr/include/boost/asio/impl/execution_context.ipp \ + /usr/include/boost/asio/detail/conditionally_enabled_event.hpp \ + /usr/include/boost/asio/detail/conditionally_enabled_mutex.hpp \ + /usr/include/boost/asio/detail/null_event.hpp \ + /usr/include/boost/asio/detail/impl/null_event.ipp \ + /usr/include/boost/asio/detail/reactor_fwd.hpp \ + /usr/include/boost/asio/detail/thread.hpp \ + /usr/include/boost/asio/detail/posix_thread.hpp \ + /usr/include/boost/asio/detail/impl/posix_thread.ipp \ + /usr/include/boost/asio/detail/impl/scheduler.ipp \ + /usr/include/boost/asio/detail/concurrency_hint.hpp \ + /usr/include/boost/asio/detail/limits.hpp \ + /usr/include/boost/asio/detail/reactor.hpp \ + /usr/include/boost/asio/detail/epoll_reactor.hpp \ + /usr/include/boost/asio/detail/object_pool.hpp \ + /usr/include/boost/asio/detail/reactor_op.hpp \ + /usr/include/boost/asio/detail/operation.hpp \ + /usr/include/boost/asio/detail/select_interrupter.hpp \ + /usr/include/boost/asio/detail/eventfd_select_interrupter.hpp \ + /usr/include/boost/asio/detail/impl/eventfd_select_interrupter.ipp \ + /usr/include/sys/stat.h \ + /usr/include/bits/stat.h \ + /usr/include/bits/struct_stat.h \ + /usr/include/bits/statx.h \ + /usr/include/linux/stat.h \ + /usr/include/linux/types.h \ + /usr/include/asm/types.h \ + /usr/include/asm-generic/types.h \ + /usr/include/asm-generic/int-ll64.h \ + /usr/include/bits/statx-generic.h \ + /usr/include/bits/types/struct_statx_timestamp.h \ + /usr/include/bits/types/struct_statx.h \ + /usr/include/fcntl.h \ + /usr/include/bits/fcntl.h \ + /usr/include/bits/fcntl-linux.h \ + /usr/include/linux/falloc.h \ + /usr/include/sys/eventfd.h \ + /usr/include/bits/eventfd.h \ + /usr/include/boost/asio/detail/cstdint.hpp \ + /usr/include/boost/asio/detail/socket_types.hpp \ + /usr/include/sys/ioctl.h \ + /usr/include/bits/ioctls.h \ + /usr/include/asm/ioctls.h \ + /usr/include/asm-generic/ioctls.h \ + /usr/include/linux/ioctl.h \ + /usr/include/asm/ioctl.h \ + /usr/include/asm-generic/ioctl.h \ + /usr/include/bits/ioctl-types.h \ + /usr/include/sys/ttydefaults.h \ + /usr/include/poll.h \ + /usr/include/sys/poll.h \ + /usr/include/bits/poll.h \ + /usr/include/sys/uio.h \ + /usr/include/bits/uio-ext.h \ + /usr/include/sys/un.h \ + /usr/include/netinet/tcp.h \ + /usr/include/arpa/inet.h \ + /usr/include/net/if.h \ + /usr/include/boost/asio/detail/timer_queue_base.hpp \ + /usr/include/boost/asio/detail/timer_queue_set.hpp \ + /usr/include/boost/asio/detail/impl/timer_queue_set.ipp \ + /usr/include/boost/asio/detail/wait_op.hpp \ + /usr/include/sys/timerfd.h \ + /usr/include/bits/timerfd.h \ + /usr/include/boost/asio/detail/impl/epoll_reactor.hpp \ + /usr/include/boost/asio/detail/impl/epoll_reactor.ipp \ + /usr/include/sys/epoll.h \ + /usr/include/bits/epoll.h \ + /usr/include/boost/asio/detail/scheduler_thread_info.hpp \ + /usr/include/boost/asio/detail/signal_blocker.hpp \ + /usr/include/boost/asio/detail/posix_signal_blocker.hpp \ + /usr/include/c++/11/csignal \ + /usr/include/signal.h \ + /usr/include/bits/signum-generic.h \ + /usr/include/bits/signum-arch.h \ + /usr/include/bits/types/sig_atomic_t.h \ + /usr/include/bits/types/siginfo_t.h \ + /usr/include/bits/siginfo-arch.h \ + /usr/include/bits/siginfo-consts.h \ + /usr/include/bits/siginfo-consts-arch.h \ + /usr/include/bits/types/sigval_t.h \ + /usr/include/bits/sigevent-consts.h \ + /usr/include/bits/sigaction.h \ + /usr/include/bits/sigcontext.h \ + /usr/include/bits/types/stack_t.h \ + /usr/include/sys/ucontext.h \ + /usr/include/bits/sigstack.h \ + /usr/include/bits/ss_flags.h \ + /usr/include/bits/types/struct_sigstack.h \ + /usr/include/bits/sigthread.h \ + /usr/include/bits/signal_ext.h \ + /usr/include/boost/asio/detail/thread_group.hpp \ + /usr/include/boost/asio/impl/system_context.hpp \ + /usr/include/boost/asio/impl/system_context.ipp \ + /usr/include/boost/asio/detail/handler_cont_helpers.hpp \ + /usr/include/boost/asio/handler_continuation_hook.hpp \ + /usr/include/boost/asio/detail/chrono.hpp \ + /usr/include/boost/asio/impl/io_context.hpp \ + /usr/include/boost/asio/detail/completion_handler.hpp \ + /usr/include/boost/asio/detail/handler_work.hpp \ + /usr/include/boost/asio/executor_work_guard.hpp \ + /usr/include/boost/asio/impl/io_context.ipp \ + /usr/include/boost/asio/streambuf.hpp \ + /usr/include/boost/asio/basic_streambuf.hpp \ + /usr/include/boost/asio/basic_streambuf_fwd.hpp \ + /usr/include/boost/asio/buffer.hpp \ + /usr/include/boost/asio/detail/array_fwd.hpp \ + /usr/include/boost/asio/detail/string_view.hpp \ + /usr/include/c++/11/experimental/string_view \ + /usr/include/c++/11/bits/ranges_base.h \ + /usr/include/c++/11/experimental/bits/lfts_config.h \ + /usr/include/c++/11/experimental/bits/string_view.tcc \ + /usr/include/boost/asio/detail/is_buffer_sequence.hpp \ + /usr/include/boost/fusion/iterator/deref.hpp \ + /usr/include/boost/fusion/support/config.hpp \ + /usr/include/boost/fusion/support/iterator_base.hpp \ + /usr/include/boost/fusion/support/tag_of.hpp \ + /usr/include/boost/fusion/support/tag_of_fwd.hpp \ + /usr/include/boost/fusion/support/detail/is_mpl_sequence.hpp \ + /usr/include/boost/fusion/support/detail/is_native_fusion_sequence.hpp \ + /usr/include/boost/fusion/support/sequence_base.hpp \ + /usr/include/boost/mpl/begin_end_fwd.hpp \ + /usr/include/boost/mpl/is_sequence.hpp \ + /usr/include/boost/mpl/begin_end.hpp \ + /usr/include/boost/mpl/aux_/begin_end_impl.hpp \ + /usr/include/boost/mpl/sequence_tag_fwd.hpp \ + /usr/include/boost/mpl/aux_/has_begin.hpp \ + /usr/include/boost/mpl/aux_/traits_lambda_spec.hpp \ + /usr/include/boost/mpl/sequence_tag.hpp \ + /usr/include/boost/mpl/aux_/has_tag.hpp \ + /usr/include/boost/mpl/aux_/is_msvc_eti_arg.hpp \ + /usr/include/boost/config/no_tr1/utility.hpp \ + /usr/include/boost/process/detail/posix/io_context_ref.hpp \ + /usr/include/boost/fusion/algorithm/iteration/for_each.hpp \ + /usr/include/boost/fusion/algorithm/iteration/detail/for_each.hpp \ + /usr/include/boost/fusion/sequence/intrinsic/begin.hpp \ + /usr/include/boost/mpl/empty_base.hpp \ + /usr/include/boost/type_traits/is_empty.hpp \ + /usr/include/boost/fusion/sequence/intrinsic_fwd.hpp \ + /usr/include/boost/fusion/support/is_sequence.hpp \ + /usr/include/boost/fusion/support/is_segmented.hpp \ + /usr/include/boost/fusion/sequence/intrinsic/detail/segmented_begin.hpp \ + /usr/include/boost/fusion/sequence/intrinsic/detail/segmented_begin_impl.hpp \ + /usr/include/boost/fusion/container/list/cons_fwd.hpp \ + /usr/include/boost/fusion/sequence/intrinsic/detail/segmented_end_impl.hpp \ + /usr/include/boost/fusion/support/detail/segmented_fold_until_impl.hpp \ + /usr/include/boost/utility/result_of.hpp \ + /usr/include/boost/preprocessor/iteration/iterate.hpp \ + /usr/include/boost/preprocessor/slot/slot.hpp \ + /usr/include/boost/preprocessor/slot/detail/def.hpp \ + /usr/include/boost/preprocessor/repetition/enum_shifted_params.hpp \ + /usr/include/boost/preprocessor/facilities/intercept.hpp \ + /usr/include/boost/preprocessor/facilities/limits/intercept_256.hpp \ + /usr/include/boost/type_traits/type_identity.hpp \ + /usr/include/boost/preprocessor/iteration/detail/iter/forward1.hpp \ + /usr/include/boost/preprocessor/iteration/detail/bounds/lower1.hpp \ + /usr/include/boost/preprocessor/slot/detail/shared.hpp \ + /usr/include/boost/preprocessor/iteration/detail/bounds/upper1.hpp \ + /usr/include/boost/preprocessor/iteration/detail/iter/limits/forward1_256.hpp \ + /usr/include/boost/utility/detail/result_of_iterate.hpp \ + /usr/include/boost/fusion/support/void.hpp \ + /usr/include/boost/fusion/iterator/equal_to.hpp \ + /usr/include/boost/fusion/support/is_iterator.hpp \ + /usr/include/boost/type_traits/is_base_of.hpp \ + /usr/include/boost/fusion/iterator/next.hpp \ + /usr/include/boost/fusion/sequence/intrinsic/segments.hpp \ + /usr/include/boost/fusion/iterator/segmented_iterator.hpp \ + /usr/include/boost/fusion/iterator/detail/segmented_iterator.hpp \ + /usr/include/boost/fusion/iterator/iterator_facade.hpp \ + /usr/include/boost/fusion/iterator/detail/advance.hpp \ + /usr/include/boost/fusion/iterator/prior.hpp \ + /usr/include/boost/fusion/iterator/detail/distance.hpp \ + /usr/include/boost/fusion/support/category_of.hpp \ + /usr/include/boost/fusion/iterator/deref_data.hpp \ + /usr/include/boost/fusion/iterator/key_of.hpp \ + /usr/include/boost/fusion/iterator/value_of.hpp \ + /usr/include/boost/fusion/iterator/value_of_data.hpp \ + /usr/include/boost/fusion/iterator/detail/segmented_equal_to.hpp \ + /usr/include/boost/fusion/iterator/detail/segmented_next_impl.hpp \ + /usr/include/boost/fusion/container/list/cons.hpp \ + /usr/include/boost/fusion/support/detail/enabler.hpp \ + /usr/include/boost/fusion/support/detail/access.hpp \ + /usr/include/boost/fusion/sequence/intrinsic/end.hpp \ + /usr/include/boost/fusion/sequence/intrinsic/detail/segmented_end.hpp \ + /usr/include/boost/fusion/container/list/nil.hpp \ + /usr/include/boost/fusion/container/list/cons_iterator.hpp \ + /usr/include/boost/fusion/container/list/detail/deref_impl.hpp \ + /usr/include/boost/fusion/container/list/detail/next_impl.hpp \ + /usr/include/boost/fusion/container/list/detail/value_of_impl.hpp \ + /usr/include/boost/fusion/container/list/detail/equal_to_impl.hpp \ + /usr/include/boost/mpl/equal_to.hpp \ + /usr/include/boost/mpl/aux_/comparison_op.hpp \ + /usr/include/boost/mpl/aux_/numeric_op.hpp \ + /usr/include/boost/mpl/numeric_cast.hpp \ + /usr/include/boost/mpl/tag.hpp \ + /usr/include/boost/mpl/aux_/numeric_cast_utils.hpp \ + /usr/include/boost/mpl/aux_/config/forwarding.hpp \ + /usr/include/boost/mpl/aux_/msvc_eti_base.hpp \ + /usr/include/boost/mpl/aux_/preprocessed/gcc/equal_to.hpp \ + /usr/include/boost/fusion/container/list/list_fwd.hpp \ + /usr/include/boost/fusion/container/list/detail/begin_impl.hpp \ + /usr/include/boost/fusion/container/list/detail/end_impl.hpp \ + /usr/include/boost/fusion/container/list/detail/at_impl.hpp \ + /usr/include/boost/fusion/container/list/detail/value_at_impl.hpp \ + /usr/include/boost/fusion/container/list/detail/empty_impl.hpp \ + /usr/include/boost/fusion/view/iterator_range.hpp \ + /usr/include/boost/fusion/view/iterator_range/iterator_range.hpp \ + /usr/include/boost/fusion/iterator/distance.hpp \ + /usr/include/boost/fusion/iterator/mpl/convert_iterator.hpp \ + /usr/include/boost/fusion/view/iterator_range/detail/begin_impl.hpp \ + /usr/include/boost/fusion/view/iterator_range/detail/end_impl.hpp \ + /usr/include/boost/fusion/view/iterator_range/detail/at_impl.hpp \ + /usr/include/boost/fusion/iterator/advance.hpp \ + /usr/include/boost/fusion/view/iterator_range/detail/size_impl.hpp \ + /usr/include/boost/fusion/view/iterator_range/detail/value_at_impl.hpp \ + /usr/include/boost/fusion/view/iterator_range/detail/is_segmented_impl.hpp \ + /usr/include/boost/fusion/view/iterator_range/detail/segments_impl.hpp \ + /usr/include/boost/fusion/view/iterator_range/detail/segmented_iterator_range.hpp \ + /usr/include/boost/fusion/algorithm/transformation/push_back.hpp \ + /usr/include/boost/fusion/support/detail/as_fusion_element.hpp \ + /usr/include/boost/ref.hpp \ + /usr/include/boost/core/ref.hpp \ + /usr/include/boost/fusion/view/joint_view/joint_view.hpp \ + /usr/include/boost/fusion/view/joint_view/joint_view_fwd.hpp \ + /usr/include/boost/fusion/support/is_view.hpp \ + /usr/include/boost/fusion/sequence/intrinsic/size.hpp \ + /usr/include/boost/fusion/sequence/intrinsic/detail/segmented_size.hpp \ + /usr/include/boost/mpl/fold.hpp \ + /usr/include/boost/mpl/O1_size.hpp \ + /usr/include/boost/mpl/O1_size_fwd.hpp \ + /usr/include/boost/mpl/aux_/O1_size_impl.hpp \ + /usr/include/boost/mpl/long.hpp \ + /usr/include/boost/mpl/long_fwd.hpp \ + /usr/include/boost/mpl/aux_/has_size.hpp \ + /usr/include/boost/mpl/aux_/fold_impl.hpp \ + /usr/include/boost/mpl/deref.hpp \ + /usr/include/boost/mpl/aux_/msvc_type.hpp \ + /usr/include/boost/mpl/aux_/preprocessed/gcc/fold_impl.hpp \ + /usr/include/boost/mpl/plus.hpp \ + /usr/include/boost/mpl/aux_/arithmetic_op.hpp \ + /usr/include/boost/mpl/integral_c.hpp \ + /usr/include/boost/mpl/integral_c_fwd.hpp \ + /usr/include/boost/mpl/aux_/largest_int.hpp \ + /usr/include/boost/mpl/aux_/preprocessed/gcc/plus.hpp \ + /usr/include/boost/mpl/size_t.hpp \ + /usr/include/boost/mpl/size_t_fwd.hpp \ + /usr/include/boost/fusion/mpl/begin.hpp \ + /usr/include/boost/fusion/adapted/mpl/detail/begin_impl.hpp \ + /usr/include/boost/fusion/adapted/mpl/mpl_iterator.hpp \ + /usr/include/boost/fusion/support/detail/mpl_iterator_category.hpp \ + /usr/include/boost/mpl/prior.hpp \ + /usr/include/boost/mpl/advance.hpp \ + /usr/include/boost/mpl/advance_fwd.hpp \ + /usr/include/boost/mpl/less.hpp \ + /usr/include/boost/mpl/aux_/preprocessed/gcc/less.hpp \ + /usr/include/boost/mpl/negate.hpp \ + /usr/include/boost/mpl/aux_/advance_forward.hpp \ + /usr/include/boost/mpl/aux_/preprocessed/gcc/advance_forward.hpp \ + /usr/include/boost/mpl/aux_/advance_backward.hpp \ + /usr/include/boost/mpl/aux_/preprocessed/gcc/advance_backward.hpp \ + /usr/include/boost/mpl/distance.hpp \ + /usr/include/boost/mpl/distance_fwd.hpp \ + /usr/include/boost/mpl/iter_fold.hpp \ + /usr/include/boost/mpl/aux_/iter_fold_impl.hpp \ + /usr/include/boost/mpl/aux_/preprocessed/gcc/iter_fold_impl.hpp \ + /usr/include/boost/mpl/iterator_range.hpp \ + /usr/include/boost/mpl/begin.hpp \ + /usr/include/boost/fusion/iterator/mpl/fusion_iterator.hpp \ + /usr/include/boost/mpl/iterator_tags.hpp \ + /usr/include/boost/fusion/mpl/end.hpp \ + /usr/include/boost/fusion/adapted/mpl/detail/end_impl.hpp \ + /usr/include/boost/mpl/end.hpp \ + /usr/include/boost/fusion/view/joint_view/joint_view_iterator.hpp \ + /usr/include/boost/fusion/view/joint_view/detail/deref_impl.hpp \ + /usr/include/boost/fusion/iterator/detail/adapt_deref_traits.hpp \ + /usr/include/boost/fusion/view/joint_view/detail/next_impl.hpp \ + /usr/include/boost/fusion/view/joint_view/detail/value_of_impl.hpp \ + /usr/include/boost/fusion/iterator/detail/adapt_value_traits.hpp \ + /usr/include/boost/fusion/view/joint_view/detail/deref_data_impl.hpp \ + /usr/include/boost/fusion/view/joint_view/detail/value_of_data_impl.hpp \ + /usr/include/boost/fusion/view/joint_view/detail/key_of_impl.hpp \ + /usr/include/boost/fusion/view/joint_view/detail/begin_impl.hpp \ + /usr/include/boost/fusion/view/joint_view/detail/end_impl.hpp \ + /usr/include/boost/mpl/inherit.hpp \ + /usr/include/boost/mpl/aux_/preprocessed/gcc/inherit.hpp \ + /usr/include/boost/fusion/view/single_view/single_view.hpp \ + /usr/include/boost/fusion/view/single_view/single_view_iterator.hpp \ + /usr/include/boost/fusion/view/single_view/detail/deref_impl.hpp \ + /usr/include/boost/fusion/view/single_view/detail/next_impl.hpp \ + /usr/include/boost/fusion/view/single_view/detail/prior_impl.hpp \ + /usr/include/boost/fusion/view/single_view/detail/advance_impl.hpp \ + /usr/include/boost/fusion/view/single_view/detail/distance_impl.hpp \ + /usr/include/boost/mpl/minus.hpp \ + /usr/include/boost/mpl/aux_/preprocessed/gcc/minus.hpp \ + /usr/include/boost/fusion/view/single_view/detail/equal_to_impl.hpp \ + /usr/include/boost/fusion/view/single_view/detail/value_of_impl.hpp \ + /usr/include/boost/fusion/view/single_view/detail/at_impl.hpp \ + /usr/include/boost/fusion/view/single_view/detail/begin_impl.hpp \ + /usr/include/boost/fusion/view/single_view/detail/end_impl.hpp \ + /usr/include/boost/fusion/view/single_view/detail/size_impl.hpp \ + /usr/include/boost/fusion/view/single_view/detail/value_at_impl.hpp \ + /usr/include/boost/fusion/sequence/intrinsic/value_at.hpp \ + /usr/include/boost/fusion/algorithm/transformation/push_front.hpp \ + /usr/include/boost/fusion/container/list/detail/reverse_cons.hpp \ + /usr/include/boost/fusion/iterator/detail/segment_sequence.hpp \ + /usr/include/boost/fusion/sequence/intrinsic/empty.hpp \ + /usr/include/boost/fusion/algorithm/iteration/detail/segmented_for_each.hpp \ + /usr/include/boost/fusion/algorithm/iteration/for_each_fwd.hpp \ + /usr/include/boost/fusion/support/segmented_fold_until.hpp \ + /usr/include/boost/fusion/algorithm/transformation/filter_if.hpp \ + /usr/include/boost/fusion/view/filter_view/filter_view.hpp \ + /usr/include/boost/fusion/view/filter_view/filter_view_iterator.hpp \ + /usr/include/boost/fusion/algorithm/query/detail/find_if.hpp \ + /usr/include/boost/fusion/view/filter_view/detail/deref_impl.hpp \ + /usr/include/boost/fusion/view/filter_view/detail/next_impl.hpp \ + /usr/include/boost/fusion/view/filter_view/detail/value_of_impl.hpp \ + /usr/include/boost/fusion/view/filter_view/detail/equal_to_impl.hpp \ + /usr/include/boost/fusion/view/filter_view/detail/deref_data_impl.hpp \ + /usr/include/boost/fusion/view/filter_view/detail/value_of_data_impl.hpp \ + /usr/include/boost/fusion/view/filter_view/detail/key_of_impl.hpp \ + /usr/include/boost/fusion/view/filter_view/detail/begin_impl.hpp \ + /usr/include/boost/fusion/view/filter_view/detail/end_impl.hpp \ + /usr/include/boost/fusion/view/filter_view/detail/size_impl.hpp \ + /usr/include/boost/fusion/algorithm/transformation/transform.hpp \ + /usr/include/boost/fusion/view/transform_view/transform_view.hpp \ + /usr/include/boost/fusion/view/transform_view/transform_view_iterator.hpp \ + /usr/include/boost/fusion/view/transform_view/detail/deref_impl.hpp \ + /usr/include/boost/fusion/view/transform_view/detail/next_impl.hpp \ + /usr/include/boost/fusion/view/transform_view/detail/prior_impl.hpp \ + /usr/include/boost/fusion/view/transform_view/detail/value_of_impl.hpp \ + /usr/include/boost/fusion/view/transform_view/detail/advance_impl.hpp \ + /usr/include/boost/fusion/view/transform_view/detail/distance_impl.hpp \ + /usr/include/boost/fusion/view/transform_view/detail/equal_to_impl.hpp \ + /usr/include/boost/fusion/view/transform_view/transform_view_fwd.hpp \ + /usr/include/boost/fusion/view/transform_view/detail/begin_impl.hpp \ + /usr/include/boost/fusion/view/transform_view/detail/end_impl.hpp \ + /usr/include/boost/fusion/view/transform_view/detail/at_impl.hpp \ + /usr/include/boost/fusion/sequence/intrinsic/at.hpp \ + /usr/include/boost/fusion/view/transform_view/detail/value_at_impl.hpp \ + /usr/include/boost/fusion/view/detail/strictest_traversal.hpp \ + /usr/include/boost/fusion/mpl.hpp \ + /usr/include/boost/fusion/iterator/mpl.hpp \ + /usr/include/boost/fusion/adapted/mpl.hpp \ + /usr/include/boost/fusion/adapted/mpl/detail/is_sequence_impl.hpp \ + /usr/include/boost/fusion/adapted/mpl/detail/size_impl.hpp \ + /usr/include/boost/mpl/size.hpp \ + /usr/include/boost/mpl/size_fwd.hpp \ + /usr/include/boost/mpl/aux_/size_impl.hpp \ + /usr/include/boost/fusion/adapted/mpl/detail/value_at_impl.hpp \ + /usr/include/boost/mpl/at.hpp \ + /usr/include/boost/mpl/at_fwd.hpp \ + /usr/include/boost/mpl/aux_/at_impl.hpp \ + /usr/include/boost/fusion/adapted/mpl/detail/at_impl.hpp \ + /usr/include/boost/fusion/adapted/mpl/detail/has_key_impl.hpp \ + /usr/include/boost/mpl/has_key.hpp \ + /usr/include/boost/mpl/has_key_fwd.hpp \ + /usr/include/boost/mpl/aux_/has_key_impl.hpp \ + /usr/include/boost/fusion/adapted/mpl/detail/category_of_impl.hpp \ + /usr/include/boost/fusion/adapted/mpl/detail/is_view_impl.hpp \ + /usr/include/boost/fusion/adapted/mpl/detail/empty_impl.hpp \ + /usr/include/boost/mpl/empty.hpp \ + /usr/include/boost/mpl/empty_fwd.hpp \ + /usr/include/boost/mpl/aux_/empty_impl.hpp \ + /usr/include/boost/fusion/mpl/at.hpp \ + /usr/include/boost/fusion/mpl/back.hpp \ + /usr/include/boost/mpl/back.hpp \ + /usr/include/boost/mpl/back_fwd.hpp \ + /usr/include/boost/mpl/aux_/back_impl.hpp \ + /usr/include/boost/fusion/mpl/clear.hpp \ + /usr/include/boost/mpl/clear.hpp \ + /usr/include/boost/mpl/clear_fwd.hpp \ + /usr/include/boost/mpl/aux_/clear_impl.hpp \ + /usr/include/boost/fusion/mpl/detail/clear.hpp \ + /usr/include/boost/fusion/container/vector/vector_fwd.hpp \ + /usr/include/boost/fusion/container/vector/detail/config.hpp \ + /usr/include/boost/fusion/container/map/map_fwd.hpp \ + /usr/include/boost/fusion/container/set/set_fwd.hpp \ + /usr/include/boost/fusion/container/deque/deque_fwd.hpp \ + /usr/include/boost/fusion/mpl/empty.hpp \ + /usr/include/boost/fusion/mpl/erase.hpp \ + /usr/include/boost/mpl/erase.hpp \ + /usr/include/boost/mpl/erase_fwd.hpp \ + /usr/include/boost/mpl/aux_/erase_impl.hpp \ + /usr/include/boost/mpl/push_front.hpp \ + /usr/include/boost/mpl/push_front_fwd.hpp \ + /usr/include/boost/mpl/aux_/push_front_impl.hpp \ + /usr/include/boost/mpl/reverse_fold.hpp \ + /usr/include/boost/mpl/aux_/reverse_fold_impl.hpp \ + /usr/include/boost/mpl/aux_/preprocessed/gcc/reverse_fold_impl.hpp \ + /usr/include/boost/fusion/algorithm/transformation/erase.hpp \ + /usr/include/boost/fusion/sequence/convert.hpp \ + /usr/include/boost/fusion/mpl/erase_key.hpp \ + /usr/include/boost/mpl/erase_key.hpp \ + /usr/include/boost/mpl/erase_key_fwd.hpp \ + /usr/include/boost/mpl/aux_/erase_key_impl.hpp \ + /usr/include/boost/fusion/algorithm/transformation/erase_key.hpp \ + /usr/include/boost/fusion/algorithm/query/find.hpp \ + /usr/include/boost/fusion/algorithm/query/find_if_fwd.hpp \ + /usr/include/boost/fusion/algorithm/query/detail/segmented_find.hpp \ + /usr/include/boost/fusion/algorithm/query/find_fwd.hpp \ + /usr/include/boost/fusion/mpl/front.hpp \ + /usr/include/boost/mpl/front.hpp \ + /usr/include/boost/mpl/front_fwd.hpp \ + /usr/include/boost/mpl/aux_/front_impl.hpp \ + /usr/include/boost/fusion/mpl/has_key.hpp \ + /usr/include/boost/fusion/sequence/intrinsic/has_key.hpp \ + /usr/include/boost/fusion/mpl/insert.hpp \ + /usr/include/boost/mpl/insert.hpp \ + /usr/include/boost/mpl/insert_fwd.hpp \ + /usr/include/boost/mpl/aux_/insert_impl.hpp \ + /usr/include/boost/fusion/algorithm/transformation/insert.hpp \ + /usr/include/boost/fusion/mpl/insert_range.hpp \ + /usr/include/boost/mpl/insert_range.hpp \ + /usr/include/boost/mpl/insert_range_fwd.hpp \ + /usr/include/boost/mpl/aux_/insert_range_impl.hpp \ + /usr/include/boost/mpl/joint_view.hpp \ + /usr/include/boost/mpl/aux_/joint_iter.hpp \ + /usr/include/boost/mpl/aux_/lambda_spec.hpp \ + /usr/include/boost/mpl/aux_/iter_push_front.hpp \ + /usr/include/boost/type_traits/same_traits.hpp \ + /usr/include/boost/fusion/algorithm/transformation/insert_range.hpp \ + /usr/include/boost/fusion/mpl/pop_back.hpp \ + /usr/include/boost/mpl/pop_back.hpp \ + /usr/include/boost/mpl/pop_back_fwd.hpp \ + /usr/include/boost/mpl/aux_/pop_back_impl.hpp \ + /usr/include/boost/fusion/algorithm/transformation/pop_back.hpp \ + /usr/include/boost/fusion/iterator/iterator_adapter.hpp \ + /usr/include/boost/fusion/mpl/pop_front.hpp \ + /usr/include/boost/mpl/pop_front.hpp \ + /usr/include/boost/mpl/pop_front_fwd.hpp \ + /usr/include/boost/mpl/aux_/pop_front_impl.hpp \ + /usr/include/boost/fusion/algorithm/transformation/pop_front.hpp \ + /usr/include/boost/fusion/mpl/push_back.hpp \ + /usr/include/boost/mpl/push_back.hpp \ + /usr/include/boost/mpl/push_back_fwd.hpp \ + /usr/include/boost/mpl/aux_/push_back_impl.hpp \ + /usr/include/boost/fusion/mpl/push_front.hpp \ + /usr/include/boost/fusion/mpl/size.hpp \ + /usr/include/boost/fusion/algorithm/iteration/fold.hpp \ + /usr/include/boost/fusion/algorithm/iteration/fold_fwd.hpp \ + /usr/include/boost/fusion/algorithm/iteration/detail/preprocessed/fold.hpp \ + /usr/include/boost/fusion/algorithm/iteration/detail/segmented_fold.hpp \ + /usr/include/boost/fusion/container/vector/vector10.hpp \ + /usr/include/boost/fusion/container/vector/vector.hpp \ + /usr/include/boost/fusion/support/detail/and.hpp \ + /usr/include/boost/fusion/support/detail/index_sequence.hpp \ + /usr/include/boost/fusion/container/vector/detail/at_impl.hpp \ + /usr/include/boost/fusion/container/vector/detail/value_at_impl.hpp \ + /usr/include/boost/fusion/container/vector/detail/begin_impl.hpp \ + /usr/include/boost/fusion/container/vector/vector_iterator.hpp \ + /usr/include/boost/fusion/container/vector/detail/deref_impl.hpp \ + /usr/include/boost/fusion/container/vector/detail/value_of_impl.hpp \ + /usr/include/boost/fusion/container/vector/detail/next_impl.hpp \ + /usr/include/boost/fusion/container/vector/detail/prior_impl.hpp \ + /usr/include/boost/fusion/container/vector/detail/equal_to_impl.hpp \ + /usr/include/boost/fusion/container/vector/detail/distance_impl.hpp \ + /usr/include/boost/fusion/container/vector/detail/advance_impl.hpp \ + /usr/include/boost/fusion/container/vector/detail/end_impl.hpp \ + /usr/include/boost/fusion/view/transform_view.hpp \ + /usr/include/boost/fusion/container/vector/convert.hpp \ + /usr/include/boost/fusion/container/vector/detail/as_vector.hpp \ + /usr/include/boost/fusion/container/vector/detail/convert_impl.hpp \ + /usr/include/boost/process/detail/posix/sigchld_service.hpp \ + /usr/include/boost/asio/dispatch.hpp \ + /usr/include/boost/asio/impl/dispatch.hpp \ + /usr/include/boost/asio/detail/work_dispatcher.hpp \ + /usr/include/boost/asio/post.hpp \ + /usr/include/boost/asio/impl/post.hpp \ + /usr/include/boost/asio/signal_set.hpp \ + /usr/include/boost/asio/basic_signal_set.hpp \ + /usr/include/boost/asio/any_io_executor.hpp \ + /usr/include/boost/asio/detail/io_object_impl.hpp \ + /usr/include/boost/asio/detail/signal_set_service.hpp \ + /usr/include/boost/asio/detail/signal_handler.hpp \ + /usr/include/boost/asio/detail/signal_op.hpp \ + /usr/include/boost/asio/detail/impl/signal_set_service.ipp \ + /usr/include/boost/asio/detail/static_mutex.hpp \ + /usr/include/boost/asio/detail/posix_static_mutex.hpp \ + /usr/include/boost/asio/strand.hpp \ + /usr/include/boost/asio/detail/strand_executor_service.hpp \ + /usr/include/boost/asio/detail/impl/strand_executor_service.hpp \ + /usr/include/boost/asio/defer.hpp \ + /usr/include/boost/asio/impl/defer.hpp \ + /usr/include/boost/asio/detail/impl/strand_executor_service.ipp \ + /usr/include/boost/asio/io_context_strand.hpp \ + /usr/include/boost/asio/detail/strand_service.hpp \ + /usr/include/boost/asio/detail/impl/strand_service.hpp \ + /usr/include/boost/asio/detail/impl/strand_service.ipp \ + /usr/include/boost/optional.hpp \ + /usr/include/boost/optional/optional.hpp \ + /usr/include/boost/core/explicit_operator_bool.hpp \ + /usr/include/boost/core/swap.hpp \ + /usr/include/boost/optional/bad_optional_access.hpp \ + /usr/include/boost/type.hpp \ + /usr/include/boost/type_traits/alignment_of.hpp \ + /usr/include/boost/type_traits/has_nothrow_constructor.hpp \ + /usr/include/boost/type_traits/is_default_constructible.hpp \ + /usr/include/boost/type_traits/type_with_alignment.hpp \ + /usr/include/boost/type_traits/is_constructible.hpp \ + /usr/include/boost/type_traits/is_destructible.hpp \ + /usr/include/boost/type_traits/is_nothrow_move_assignable.hpp \ + /usr/include/boost/type_traits/has_trivial_move_assign.hpp \ + /usr/include/boost/type_traits/is_assignable.hpp \ + /usr/include/boost/type_traits/has_nothrow_assign.hpp \ + /usr/include/boost/type_traits/enable_if.hpp \ + /usr/include/boost/type_traits/is_nothrow_move_constructible.hpp \ + /usr/include/boost/move/utility.hpp \ + /usr/include/boost/move/detail/config_begin.hpp \ + /usr/include/boost/move/detail/workaround.hpp \ + /usr/include/boost/move/utility_core.hpp \ + /usr/include/boost/move/core.hpp \ + /usr/include/boost/move/detail/config_end.hpp \ + /usr/include/boost/move/detail/meta_utils.hpp \ + /usr/include/boost/move/detail/meta_utils_core.hpp \ + /usr/include/boost/move/traits.hpp \ + /usr/include/boost/move/detail/type_traits.hpp \ + /usr/include/boost/utility/compare_pointees.hpp \ + /usr/include/boost/optional/optional_fwd.hpp \ + /usr/include/boost/optional/detail/optional_config.hpp \ + /usr/include/boost/optional/detail/optional_factory_support.hpp \ + /usr/include/boost/optional/detail/optional_aligned_storage.hpp \ + /usr/include/boost/optional/detail/optional_trivially_copyable_base.hpp \ + /usr/include/boost/optional/detail/optional_reference_spec.hpp \ + /usr/include/boost/optional/detail/optional_relops.hpp \ + /usr/include/boost/optional/detail/optional_swap.hpp \ + /usr/include/sys/wait.h \ + /usr/include/boost/process/detail/posix/is_running.hpp \ + /usr/include/boost/process/detail/posix/child_handle.hpp \ + /usr/include/boost/process/detail/posix/async_in.hpp \ + /usr/include/boost/asio/write.hpp \ + /usr/include/boost/asio/impl/write.hpp \ + /usr/include/boost/asio/completion_condition.hpp \ + /usr/include/boost/asio/detail/base_from_completion_cond.hpp \ + /usr/include/boost/asio/detail/consuming_buffers.hpp \ + /usr/include/boost/asio/detail/buffer_sequence_adapter.hpp \ + /usr/include/boost/asio/detail/impl/buffer_sequence_adapter.ipp \ + /usr/include/boost/asio/detail/dependent_type.hpp \ + /usr/include/boost/process/async_pipe.hpp \ + /usr/include/boost/process/detail/posix/async_pipe.hpp \ + /usr/include/boost/process/detail/posix/basic_pipe.hpp \ + /usr/include/boost/filesystem.hpp \ + /usr/include/boost/filesystem/exception.hpp \ + /usr/include/boost/smart_ptr/intrusive_ptr.hpp \ + /usr/include/boost/smart_ptr/detail/sp_convertible.hpp \ + /usr/include/boost/smart_ptr/detail/sp_nullptr_t.hpp \ + /usr/include/boost/smart_ptr/detail/sp_noexcept.hpp \ + /usr/include/boost/config/no_tr1/functional.hpp \ + /usr/include/boost/smart_ptr/detail/operator_bool.hpp \ + /usr/include/boost/smart_ptr/intrusive_ref_counter.hpp \ + /usr/include/boost/smart_ptr/detail/atomic_count.hpp \ + /usr/include/boost/smart_ptr/detail/sp_has_gcc_intrinsics.hpp \ + /usr/include/boost/smart_ptr/detail/sp_has_sync_intrinsics.hpp \ + /usr/include/boost/smart_ptr/detail/atomic_count_gcc_atomic.hpp \ + /usr/include/boost/filesystem/directory.hpp \ + /usr/include/boost/filesystem/file_status.hpp \ + /usr/include/boost/detail/bitmask.hpp \ + /usr/include/boost/core/scoped_enum.hpp \ + /usr/include/boost/filesystem/operations.hpp \ + /usr/include/boost/filesystem/convenience.hpp \ + /usr/include/boost/filesystem/string_file.hpp \ + /usr/include/boost/filesystem/fstream.hpp \ + /usr/include/c++/11/fstream \ + /usr/include/c++/11/istream \ + /usr/include/c++/11/bits/istream.tcc \ + /usr/include/c++/11/x86_64-redhat-linux/bits/basic_file.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/c++io.h \ + /usr/include/c++/11/bits/fstream.tcc \ + /usr/include/boost/process/detail/posix/compare_handles.hpp \ + /usr/include/boost/asio/posix/stream_descriptor.hpp \ + /usr/include/boost/asio/posix/basic_stream_descriptor.hpp \ + /usr/include/boost/asio/posix/descriptor.hpp \ + /usr/include/boost/asio/posix/basic_descriptor.hpp \ + /usr/include/boost/asio/detail/reactive_descriptor_service.hpp \ + /usr/include/boost/asio/detail/descriptor_ops.hpp \ + /usr/include/boost/asio/detail/impl/descriptor_ops.ipp \ + /usr/include/boost/asio/detail/descriptor_read_op.hpp \ + /usr/include/boost/asio/detail/descriptor_write_op.hpp \ + /usr/include/boost/asio/detail/reactive_null_buffers_op.hpp \ + /usr/include/boost/asio/detail/reactive_wait_op.hpp \ + /usr/include/boost/asio/posix/descriptor_base.hpp \ + /usr/include/boost/asio/detail/io_control.hpp \ + /usr/include/boost/asio/detail/socket_option.hpp \ + /usr/include/boost/asio/detail/impl/reactive_descriptor_service.ipp \ + /usr/include/boost/process/detail/used_handles.hpp \ + /usr/include/boost/fusion/include/filter_if.hpp \ + /usr/include/boost/fusion/include/for_each.hpp \ + /usr/include/boost/process/detail/posix/handles.hpp \ + /usr/include/dirent.h \ + /usr/include/bits/dirent.h \ + /usr/include/bits/dirent_ext.h \ + /usr/include/boost/process/detail/posix/asio_fwd.hpp \ + /usr/include/boost/asio/ts/netfwd.hpp \ + /usr/include/boost/asio/detail/date_time_fwd.hpp \ + /usr/include/boost/process/detail/posix/async_out.hpp \ + /usr/include/boost/asio/read.hpp \ + /usr/include/boost/asio/impl/read.hpp \ + /usr/include/boost/process/async_system.hpp \ + /usr/include/boost/process/child.hpp \ + /usr/include/boost/process/detail/child_decl.hpp \ + /usr/include/boost/process/detail/posix/terminate.hpp \ + /usr/include/boost/process/detail/posix/wait_for_exit.hpp \ + /usr/include/boost/process/detail/execute_impl.hpp \ + /usr/include/boost/process/detail/posix/executor.hpp \ + /usr/include/boost/process/error.hpp \ + /usr/include/boost/fusion/algorithm/query/find_if.hpp \ + /usr/include/boost/fusion/algorithm/query/detail/segmented_find_if.hpp \ + /usr/include/boost/fusion/sequence/comparison/equal_to.hpp \ + /usr/include/boost/fusion/sequence/comparison/detail/equal_to.hpp \ + /usr/include/boost/fusion/support/as_const.hpp \ + /usr/include/boost/fusion/sequence/comparison/enable_comparison.hpp \ + /usr/include/boost/fusion/container/set/convert.hpp \ + /usr/include/boost/fusion/container/set/detail/as_set.hpp \ + /usr/include/boost/fusion/container/set/set.hpp \ + /usr/include/boost/fusion/support/detail/is_same_size.hpp \ + /usr/include/boost/fusion/container/set/detail/begin_impl.hpp \ + /usr/include/boost/fusion/iterator/basic_iterator.hpp \ + /usr/include/boost/fusion/container/set/detail/end_impl.hpp \ + /usr/include/boost/fusion/container/set/detail/value_of_impl.hpp \ + /usr/include/boost/fusion/container/set/detail/deref_data_impl.hpp \ + /usr/include/boost/fusion/container/set/detail/deref_impl.hpp \ + /usr/include/boost/fusion/container/set/detail/key_of_impl.hpp \ + /usr/include/boost/fusion/container/set/detail/value_of_data_impl.hpp \ + /usr/include/boost/fusion/container/set/detail/convert_impl.hpp \ + /usr/include/boost/type_index.hpp \ + /usr/include/boost/type_index/stl_type_index.hpp \ + /usr/include/boost/type_index/type_index_facade.hpp \ + /usr/include/boost/core/demangle.hpp \ + /usr/include/c++/11/cxxabi.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/cxxabi_tweaks.h \ + /usr/include/boost/process/pipe.hpp \ + /usr/include/boost/process/detail/posix/use_vfork.hpp \ + /usr/include/boost/algorithm/string/predicate.hpp \ + /usr/include/boost/algorithm/string/find.hpp \ + /usr/include/boost/algorithm/string/detail/predicate.hpp \ + /usr/include/boost/algorithm/string/split.hpp \ + /usr/include/boost/algorithm/string/iter_find.hpp \ + /usr/include/boost/iterator/transform_iterator.hpp \ + /usr/include/boost/algorithm/string/find_iterator.hpp \ + /usr/include/boost/algorithm/string/detail/find_iterator.hpp \ + /usr/include/boost/function.hpp \ + /usr/include/boost/preprocessor/iterate.hpp \ + /usr/include/boost/function/detail/prologue.hpp \ + /usr/include/boost/function/function_base.hpp \ + /usr/include/boost/integer.hpp \ + /usr/include/boost/integer_fwd.hpp \ + /usr/include/boost/integer_traits.hpp \ + /usr/include/boost/type_traits/has_trivial_copy.hpp \ + /usr/include/boost/type_traits/is_copy_constructible.hpp \ + /usr/include/boost/type_traits/has_trivial_destructor.hpp \ + /usr/include/boost/type_traits/composite_traits.hpp \ + /usr/include/boost/type_traits/is_union.hpp \ + /usr/include/boost/function_equal.hpp \ + /usr/include/boost/function/function_fwd.hpp \ + /usr/include/boost/mem_fn.hpp \ + /usr/include/boost/bind/mem_fn.hpp \ + /usr/include/boost/get_pointer.hpp \ + /usr/include/boost/config/no_tr1/memory.hpp \ + /usr/include/boost/bind/mem_fn_template.hpp \ + /usr/include/boost/bind/mem_fn_cc.hpp \ + /usr/include/boost/preprocessor/enum.hpp \ + /usr/include/boost/preprocessor/repetition/enum.hpp \ + /usr/include/boost/preprocessor/enum_params.hpp \ + /usr/include/boost/function/detail/function_iterate.hpp \ + /usr/include/boost/function/detail/maybe_include.hpp \ + /usr/include/boost/function/function_template.hpp \ + /usr/include/boost/core/no_exceptions_support.hpp \ + /usr/include/boost/process/detail/handler.hpp \ + /usr/include/boost/fusion/view.hpp \ + /usr/include/boost/fusion/view/filter_view.hpp \ + /usr/include/boost/fusion/view/joint_view.hpp \ + /usr/include/boost/fusion/view/nview.hpp \ + /usr/include/boost/fusion/view/nview/nview.hpp \ + /usr/include/boost/fusion/container/vector.hpp \ + /usr/include/boost/fusion/view/nview/detail/nview_impl.hpp \ + /usr/include/boost/fusion/view/nview/nview_iterator.hpp \ + /usr/include/boost/fusion/view/nview/detail/size_impl.hpp \ + /usr/include/boost/fusion/view/nview/detail/begin_impl.hpp \ + /usr/include/boost/fusion/view/nview/detail/end_impl.hpp \ + /usr/include/boost/fusion/view/nview/detail/deref_impl.hpp \ + /usr/include/boost/fusion/view/nview/detail/value_of_impl.hpp \ + /usr/include/boost/fusion/view/nview/detail/next_impl.hpp \ + /usr/include/boost/fusion/view/nview/detail/prior_impl.hpp \ + /usr/include/boost/fusion/view/nview/detail/at_impl.hpp \ + /usr/include/boost/fusion/view/nview/detail/value_at_impl.hpp \ + /usr/include/boost/fusion/view/nview/detail/advance_impl.hpp \ + /usr/include/boost/fusion/view/nview/detail/distance_impl.hpp \ + /usr/include/boost/fusion/view/nview/detail/equal_to_impl.hpp \ + /usr/include/boost/fusion/view/single_view.hpp \ + /usr/include/boost/fusion/view/reverse_view.hpp \ + /usr/include/boost/fusion/view/reverse_view/reverse_view.hpp \ + /usr/include/boost/fusion/view/reverse_view/reverse_view_iterator.hpp \ + /usr/include/boost/fusion/view/reverse_view/detail/deref_impl.hpp \ + /usr/include/boost/fusion/view/reverse_view/detail/next_impl.hpp \ + /usr/include/boost/fusion/view/reverse_view/detail/prior_impl.hpp \ + /usr/include/boost/fusion/view/reverse_view/detail/advance_impl.hpp \ + /usr/include/boost/fusion/view/reverse_view/detail/distance_impl.hpp \ + /usr/include/boost/fusion/view/reverse_view/detail/value_of_impl.hpp \ + /usr/include/boost/fusion/view/reverse_view/detail/deref_data_impl.hpp \ + /usr/include/boost/fusion/view/reverse_view/detail/value_of_data_impl.hpp \ + /usr/include/boost/fusion/view/reverse_view/detail/key_of_impl.hpp \ + /usr/include/boost/fusion/view/reverse_view/detail/begin_impl.hpp \ + /usr/include/boost/fusion/view/reverse_view/detail/end_impl.hpp \ + /usr/include/boost/fusion/view/reverse_view/detail/at_impl.hpp \ + /usr/include/boost/fusion/view/reverse_view/detail/value_at_impl.hpp \ + /usr/include/boost/fusion/view/zip_view.hpp \ + /usr/include/boost/fusion/view/zip_view/zip_view.hpp \ + /usr/include/boost/fusion/support/unused.hpp \ + /usr/include/boost/fusion/view/zip_view/detail/begin_impl.hpp \ + /usr/include/boost/fusion/view/zip_view/zip_view_iterator_fwd.hpp \ + /usr/include/boost/fusion/view/zip_view/detail/end_impl.hpp \ + /usr/include/boost/fusion/sequence/intrinsic/front.hpp \ + /usr/include/boost/mpl/min.hpp \ + /usr/include/boost/mpl/min_max.hpp \ + /usr/include/boost/fusion/view/zip_view/detail/size_impl.hpp \ + /usr/include/boost/fusion/view/zip_view/detail/at_impl.hpp \ + /usr/include/boost/fusion/view/zip_view/detail/value_at_impl.hpp \ + /usr/include/boost/fusion/algorithm/transformation/remove.hpp \ + /usr/include/boost/mpl/transform_view.hpp \ + /usr/include/boost/mpl/aux_/transform_iter.hpp \ + /usr/include/boost/mpl/find_if.hpp \ + /usr/include/boost/mpl/aux_/find_if_pred.hpp \ + /usr/include/boost/mpl/aux_/iter_apply.hpp \ + /usr/include/boost/mpl/iter_fold_if.hpp \ + /usr/include/boost/mpl/pair.hpp \ + /usr/include/boost/mpl/aux_/iter_fold_if_impl.hpp \ + /usr/include/boost/mpl/aux_/preprocessed/gcc/iter_fold_if_impl.hpp \ + /usr/include/boost/fusion/view/zip_view/zip_view_iterator.hpp \ + /usr/include/boost/fusion/view/zip_view/detail/deref_impl.hpp \ + /usr/include/boost/fusion/view/zip_view/detail/next_impl.hpp \ + /usr/include/boost/fusion/view/zip_view/detail/prior_impl.hpp \ + /usr/include/boost/fusion/view/zip_view/detail/advance_impl.hpp \ + /usr/include/boost/fusion/view/zip_view/detail/distance_impl.hpp \ + /usr/include/boost/fusion/view/zip_view/detail/value_of_impl.hpp \ + /usr/include/boost/fusion/view/zip_view/detail/equal_to_impl.hpp \ + /usr/include/boost/mpl/zip_view.hpp \ + /usr/include/boost/mpl/transform.hpp \ + /usr/include/boost/mpl/pair_view.hpp \ + /usr/include/boost/mpl/iterator_category.hpp \ + /usr/include/boost/mpl/aux_/inserter_algorithm.hpp \ + /usr/include/boost/mpl/back_inserter.hpp \ + /usr/include/boost/mpl/inserter.hpp \ + /usr/include/boost/mpl/front_inserter.hpp \ + /usr/include/boost/mpl/vector.hpp \ + /usr/include/boost/mpl/limits/vector.hpp \ + /usr/include/boost/mpl/vector/vector20.hpp \ + /usr/include/boost/mpl/vector/vector10.hpp \ + /usr/include/boost/mpl/vector/vector0.hpp \ + /usr/include/boost/mpl/vector/aux_/at.hpp \ + /usr/include/boost/mpl/vector/aux_/tag.hpp \ + /usr/include/boost/mpl/aux_/config/typeof.hpp \ + /usr/include/boost/mpl/vector/aux_/front.hpp \ + /usr/include/boost/mpl/vector/aux_/push_front.hpp \ + /usr/include/boost/mpl/vector/aux_/item.hpp \ + /usr/include/boost/mpl/vector/aux_/pop_front.hpp \ + /usr/include/boost/mpl/vector/aux_/push_back.hpp \ + /usr/include/boost/mpl/vector/aux_/pop_back.hpp \ + /usr/include/boost/mpl/vector/aux_/back.hpp \ + /usr/include/boost/mpl/vector/aux_/clear.hpp \ + /usr/include/boost/mpl/vector/aux_/vector0.hpp \ + /usr/include/boost/mpl/vector/aux_/iterator.hpp \ + /usr/include/boost/mpl/vector/aux_/O1_size.hpp \ + /usr/include/boost/mpl/vector/aux_/size.hpp \ + /usr/include/boost/mpl/vector/aux_/empty.hpp \ + /usr/include/boost/mpl/vector/aux_/begin_end.hpp \ + /usr/include/boost/mpl/vector/aux_/include_preprocessed.hpp \ + /usr/include/boost/mpl/vector/aux_/preprocessed/typeof_based/vector10.hpp \ + /usr/include/boost/mpl/vector/aux_/preprocessed/typeof_based/vector20.hpp \ + /usr/include/boost/mpl/aux_/preprocessed/gcc/vector.hpp \ + /usr/include/boost/mpl/unpack_args.hpp \ + /usr/include/boost/mpl/aux_/preprocessed/gcc/unpack_args.hpp \ + /usr/include/boost/fusion/view/flatten_view.hpp \ + /usr/include/boost/fusion/view/flatten_view/flatten_view.hpp \ + /usr/include/boost/mpl/single_view.hpp \ + /usr/include/boost/mpl/aux_/single_element_iter.hpp \ + /usr/include/boost/fusion/view/flatten_view/flatten_view_iterator.hpp \ + /usr/include/boost/fusion/include/equal_to.hpp \ + /usr/include/boost/fusion/container.hpp \ + /usr/include/boost/fusion/container/list.hpp \ + /usr/include/boost/fusion/container/list/list.hpp \ + /usr/include/boost/fusion/container/list/detail/list_to_cons.hpp \ + /usr/include/boost/fusion/container/list/convert.hpp \ + /usr/include/boost/fusion/container/list/detail/build_cons.hpp \ + /usr/include/boost/fusion/container/list/detail/convert_impl.hpp \ + /usr/include/boost/fusion/container/map.hpp \ + /usr/include/boost/fusion/container/map/map.hpp \ + /usr/include/boost/fusion/support/pair.hpp \ + /usr/include/boost/fusion/container/map/detail/map_impl.hpp \ + /usr/include/boost/fusion/container/map/detail/begin_impl.hpp \ + /usr/include/boost/fusion/container/map/map_iterator.hpp \ + /usr/include/boost/utility/declval.hpp \ + /usr/include/boost/fusion/container/map/detail/end_impl.hpp \ + /usr/include/boost/fusion/container/map/detail/at_impl.hpp \ + /usr/include/boost/fusion/container/map/detail/at_key_impl.hpp \ + /usr/include/boost/fusion/container/map/detail/value_at_impl.hpp \ + /usr/include/boost/fusion/container/map/detail/value_at_key_impl.hpp \ + /usr/include/boost/fusion/sequence/intrinsic/at_c.hpp \ + /usr/include/boost/fusion/container/map/convert.hpp \ + /usr/include/boost/fusion/container/map/detail/build_map.hpp \ + /usr/include/boost/fusion/container/set.hpp \ + /usr/include/boost/fusion/container/deque.hpp \ + /usr/include/boost/fusion/container/deque/deque.hpp \ + /usr/include/boost/fusion/container/deque/detail/keyed_element.hpp \ + /usr/include/boost/fusion/container/deque/detail/deque_keyed_values.hpp \ + /usr/include/boost/fusion/container/deque/detail/value_at_impl.hpp \ + /usr/include/boost/fusion/container/deque/detail/at_impl.hpp \ + /usr/include/boost/fusion/container/deque/detail/begin_impl.hpp \ + /usr/include/boost/fusion/container/deque/deque_iterator.hpp \ + /usr/include/boost/fusion/container/deque/detail/end_impl.hpp \ + /usr/include/boost/fusion/container/deque/detail/is_sequence_impl.hpp \ + /usr/include/boost/fusion/container/deque/convert.hpp \ + /usr/include/boost/fusion/container/deque/detail/convert_impl.hpp \ + /usr/include/boost/fusion/container/deque/detail/build_deque.hpp \ + /usr/include/boost/fusion/container/deque/front_extended_deque.hpp \ + /usr/include/boost/fusion/container/generation.hpp \ + /usr/include/boost/fusion/container/generation/make_deque.hpp \ + /usr/include/boost/fusion/container/generation/deque_tie.hpp \ + /usr/include/boost/fusion/container/generation/cons_tie.hpp \ + /usr/include/boost/fusion/container/generation/ignore.hpp \ + /usr/include/boost/fusion/container/generation/list_tie.hpp \ + /usr/include/boost/fusion/container/generation/make_cons.hpp \ + /usr/include/boost/fusion/container/generation/make_list.hpp \ + /usr/include/boost/fusion/container/generation/make_map.hpp \ + /usr/include/boost/fusion/container/generation/map_tie.hpp \ + /usr/include/boost/fusion/container/generation/make_vector.hpp \ + /usr/include/boost/fusion/container/generation/vector_tie.hpp \ + /usr/include/boost/fusion/container/generation/make_set.hpp \ + /usr/include/boost/fusion/sequence.hpp \ + /usr/include/boost/fusion/sequence/sequence_facade.hpp \ + /usr/include/boost/fusion/sequence/comparison.hpp \ + /usr/include/boost/fusion/sequence/comparison/greater.hpp \ + /usr/include/boost/fusion/sequence/comparison/less.hpp \ + /usr/include/boost/fusion/sequence/comparison/detail/less.hpp \ + /usr/include/boost/fusion/sequence/comparison/greater_equal.hpp \ + /usr/include/boost/fusion/sequence/comparison/less_equal.hpp \ + /usr/include/boost/fusion/sequence/comparison/not_equal_to.hpp \ + /usr/include/boost/fusion/sequence/intrinsic.hpp \ + /usr/include/boost/fusion/sequence/intrinsic/back.hpp \ + /usr/include/boost/fusion/sequence/intrinsic/at_key.hpp \ + /usr/include/boost/fusion/sequence/intrinsic/value_at_key.hpp \ + /usr/include/boost/fusion/sequence/intrinsic/swap.hpp \ + /usr/include/boost/fusion/sequence/io.hpp \ + /usr/include/boost/fusion/sequence/io/in.hpp \ + /usr/include/boost/fusion/sequence/io/detail/in.hpp \ + /usr/include/boost/fusion/sequence/io/detail/manip.hpp \ + /usr/include/boost/fusion/sequence/io/out.hpp \ + /usr/include/boost/fusion/sequence/io/detail/out.hpp \ + /usr/include/boost/fusion/tuple.hpp \ + /usr/include/boost/fusion/tuple/tuple.hpp \ + /usr/include/boost/fusion/tuple/tuple_fwd.hpp \ + /usr/include/boost/fusion/tuple/make_tuple.hpp \ + /usr/include/boost/fusion/tuple/tuple_tie.hpp \ + /usr/include/boost/fusion/adapted/std_tuple.hpp \ + /usr/include/boost/fusion/adapted/std_tuple/detail/is_view_impl.hpp \ + /usr/include/boost/fusion/adapted/std_tuple/detail/is_sequence_impl.hpp \ + /usr/include/boost/fusion/adapted/std_tuple/detail/category_of_impl.hpp \ + /usr/include/boost/fusion/adapted/std_tuple/detail/begin_impl.hpp \ + /usr/include/boost/fusion/adapted/std_tuple/std_tuple_iterator.hpp \ + /usr/include/boost/fusion/adapted/std_tuple/detail/end_impl.hpp \ + /usr/include/boost/fusion/adapted/std_tuple/detail/size_impl.hpp \ + /usr/include/boost/fusion/adapted/std_tuple/detail/at_impl.hpp \ + /usr/include/boost/fusion/adapted/std_tuple/detail/value_at_impl.hpp \ + /usr/include/boost/fusion/adapted/std_tuple/detail/convert_impl.hpp \ + /usr/include/boost/fusion/adapted/std_tuple/detail/build_std_tuple.hpp \ + /usr/include/boost/fusion/adapted/std_tuple/tag_of.hpp \ + /usr/include/boost/fusion/adapted/std_tuple/mpl/clear.hpp \ + /usr/include/boost/process/posix.hpp \ + /usr/include/boost/process/detail/posix/fd.hpp \ + /usr/include/boost/process/detail/posix/signal.hpp \ + /usr/include/boost/process/detail/async_handler.hpp \ + /usr/include/boost/process/group.hpp \ + /usr/include/boost/process/detail/posix/group_handle.hpp \ + /usr/include/boost/process/detail/posix/group_ref.hpp \ + /usr/include/boost/process/detail/posix/wait_group.hpp \ + /usr/include/boost/process/cmd.hpp \ + /usr/include/boost/winapi/config.hpp \ + /usr/include/boost/predef/version_number.h \ + /usr/include/boost/predef/platform.h \ + /usr/include/boost/predef/platform/android.h \ + /usr/include/boost/predef/make.h \ + /usr/include/boost/predef/detail/test.h \ + /usr/include/boost/predef/platform/cloudabi.h \ + /usr/include/boost/predef/platform/mingw.h \ + /usr/include/boost/predef/platform/mingw32.h \ + /usr/include/boost/predef/platform/mingw64.h \ + /usr/include/boost/predef/platform/windows_uwp.h \ + /usr/include/boost/predef/os/windows.h \ + /usr/include/boost/predef/platform/windows_desktop.h \ + /usr/include/boost/predef/platform/windows_phone.h \ + /usr/include/boost/predef/platform/windows_server.h \ + /usr/include/boost/predef/platform/windows_store.h \ + /usr/include/boost/predef/platform/windows_system.h \ + /usr/include/boost/predef/platform/windows_runtime.h \ + /usr/include/boost/predef/platform/ios.h \ + /usr/include/boost/predef/os/ios.h \ + /usr/include/boost/process/env.hpp \ + /usr/include/boost/process/environment.hpp \ + /usr/include/boost/algorithm/string/case_conv.hpp \ + /usr/include/boost/algorithm/string/detail/case_conv.hpp \ + /usr/include/boost/process/detail/posix/environment.hpp \ + /usr/include/c++/11/unordered_map \ + /usr/include/c++/11/bits/hashtable.h \ + /usr/include/c++/11/bits/hashtable_policy.h \ + /usr/include/c++/11/bits/unordered_map.h \ + /usr/include/boost/process/detail/posix/env_init.hpp \ + /usr/include/boost/process/exe.hpp \ + /usr/include/boost/process/handles.hpp \ + /usr/include/boost/process/io.hpp \ + /usr/include/boost/process/detail/posix/close_in.hpp \ + /usr/include/boost/process/detail/posix/close_out.hpp \ + /usr/include/boost/process/detail/posix/null_in.hpp \ + /usr/include/boost/process/detail/posix/file_descriptor.hpp \ + /usr/include/boost/process/detail/posix/null_out.hpp \ + /usr/include/boost/process/detail/posix/file_in.hpp \ + /usr/include/boost/process/detail/posix/file_out.hpp \ + /usr/include/boost/process/detail/posix/pipe_in.hpp \ + /usr/include/boost/process/detail/posix/pipe_out.hpp \ + /usr/include/boost/process/search_path.hpp \ + /usr/include/boost/process/detail/posix/search_path.hpp \ + /usr/include/boost/tokenizer.hpp \ + /usr/include/boost/token_iterator.hpp \ + /usr/include/boost/iterator/minimum_category.hpp \ + /usr/include/boost/token_functions.hpp \ + /usr/include/c++/11/stdlib.h \ + /usr/include/boost/process/spawn.hpp \ + /usr/include/boost/process/system.hpp \ + /usr/include/boost/process/start_dir.hpp \ + /usr/include/boost/process/detail/posix/start_dir.hpp \ + /usr/include/boost/asio.hpp \ + /usr/include/boost/asio/awaitable.hpp \ + /usr/include/boost/asio/basic_datagram_socket.hpp \ + /usr/include/boost/asio/basic_socket.hpp \ + /usr/include/boost/asio/socket_base.hpp \ + /usr/include/boost/asio/detail/reactive_socket_service.hpp \ + /usr/include/boost/asio/detail/reactive_socket_accept_op.hpp \ + /usr/include/boost/asio/detail/socket_holder.hpp \ + /usr/include/boost/asio/detail/socket_ops.hpp \ + /usr/include/boost/asio/detail/impl/socket_ops.ipp \ + /usr/include/boost/asio/detail/reactive_socket_connect_op.hpp \ + /usr/include/boost/asio/detail/reactive_socket_recvfrom_op.hpp \ + /usr/include/boost/asio/detail/reactive_socket_sendto_op.hpp \ + /usr/include/boost/asio/detail/reactive_socket_service_base.hpp \ + /usr/include/boost/asio/detail/reactive_socket_recv_op.hpp \ + /usr/include/boost/asio/detail/reactive_socket_recvmsg_op.hpp \ + /usr/include/boost/asio/detail/reactive_socket_send_op.hpp \ + /usr/include/boost/asio/detail/impl/reactive_socket_service_base.ipp \ + /usr/include/boost/asio/basic_deadline_timer.hpp \ + /usr/include/boost/asio/detail/deadline_timer_service.hpp \ + /usr/include/boost/asio/detail/timer_queue.hpp \ + /usr/include/boost/asio/detail/timer_queue_ptime.hpp \ + /usr/include/boost/asio/time_traits.hpp \ + /usr/include/boost/date_time/posix_time/posix_time_types.hpp \ + /usr/include/boost/date_time/time_clock.hpp \ + /usr/include/boost/date_time/c_time.hpp \ + /usr/include/boost/date_time/compiler_config.hpp \ + /usr/include/boost/date_time/locale_config.hpp \ + /usr/include/sys/time.h \ + /usr/include/boost/shared_ptr.hpp \ + /usr/include/boost/smart_ptr/shared_ptr.hpp \ + /usr/include/boost/smart_ptr/detail/shared_count.hpp \ + /usr/include/boost/smart_ptr/bad_weak_ptr.hpp \ + /usr/include/boost/smart_ptr/detail/sp_counted_base.hpp \ + /usr/include/boost/smart_ptr/detail/sp_counted_base_gcc_atomic.hpp \ + /usr/include/boost/smart_ptr/detail/sp_typeinfo_.hpp \ + /usr/include/boost/smart_ptr/detail/sp_counted_impl.hpp \ + /usr/include/boost/checked_delete.hpp \ + /usr/include/boost/smart_ptr/detail/sp_disable_deprecated.hpp \ + /usr/include/boost/smart_ptr/detail/spinlock_pool.hpp \ + /usr/include/boost/smart_ptr/detail/spinlock.hpp \ + /usr/include/boost/smart_ptr/detail/spinlock_gcc_atomic.hpp \ + /usr/include/boost/smart_ptr/detail/yield_k.hpp \ + /usr/include/boost/smart_ptr/detail/sp_thread_pause.hpp \ + /usr/include/boost/smart_ptr/detail/sp_thread_sleep.hpp \ + /usr/include/boost/config/pragma_message.hpp \ + /usr/include/boost/smart_ptr/detail/local_sp_deleter.hpp \ + /usr/include/boost/smart_ptr/detail/local_counted_base.hpp \ + /usr/include/boost/date_time/microsec_time_clock.hpp \ + /usr/include/boost/date_time/posix_time/ptime.hpp \ + /usr/include/boost/date_time/posix_time/posix_time_system.hpp \ + /usr/include/boost/date_time/posix_time/posix_time_config.hpp \ + /usr/include/boost/config/no_tr1/cmath.hpp \ + /usr/include/c++/11/cmath \ + /usr/include/math.h \ + /usr/include/bits/math-vector.h \ + /usr/include/bits/libm-simd-decl-stubs.h \ + /usr/include/bits/flt-eval-method.h \ + /usr/include/bits/fp-logb.h \ + /usr/include/bits/fp-fast.h \ + /usr/include/bits/mathcalls-helper-functions.h \ + /usr/include/bits/mathcalls.h \ + /usr/include/bits/mathcalls-narrow.h \ + /usr/include/bits/iscanonical.h \ + /usr/include/boost/date_time/time_duration.hpp \ + /usr/include/boost/date_time/special_defs.hpp \ + /usr/include/boost/date_time/time_defs.hpp \ + /usr/include/boost/operators.hpp \ + /usr/include/boost/date_time/time_resolution_traits.hpp \ + /usr/include/boost/date_time/int_adapter.hpp \ + /usr/include/boost/date_time/gregorian/gregorian_types.hpp \ + /usr/include/boost/date_time/date.hpp \ + /usr/include/boost/date_time/year_month_day.hpp \ + /usr/include/boost/date_time/period.hpp \ + /usr/include/boost/date_time/gregorian/greg_calendar.hpp \ + /usr/include/boost/date_time/gregorian/greg_weekday.hpp \ + /usr/include/boost/date_time/constrained_value.hpp \ + /usr/include/boost/date_time/date_defs.hpp \ + /usr/include/boost/date_time/gregorian/greg_day_of_year.hpp \ + /usr/include/boost/date_time/gregorian_calendar.hpp \ + /usr/include/boost/date_time/gregorian_calendar.ipp \ + /usr/include/boost/date_time/gregorian/greg_ymd.hpp \ + /usr/include/boost/date_time/gregorian/greg_day.hpp \ + /usr/include/boost/date_time/gregorian/greg_year.hpp \ + /usr/include/boost/date_time/gregorian/greg_month.hpp \ + /usr/include/boost/date_time/gregorian/greg_duration.hpp \ + /usr/include/boost/date_time/date_duration.hpp \ + /usr/include/boost/date_time/date_duration_types.hpp \ + /usr/include/boost/date_time/gregorian/greg_duration_types.hpp \ + /usr/include/boost/date_time/gregorian/greg_date.hpp \ + /usr/include/boost/date_time/adjust_functors.hpp \ + /usr/include/boost/date_time/wrapping_int.hpp \ + /usr/include/boost/date_time/date_generators.hpp \ + /usr/include/c++/11/sstream \ + /usr/include/c++/11/bits/sstream.tcc \ + /usr/include/boost/date_time/date_clock_device.hpp \ + /usr/include/boost/date_time/date_iterator.hpp \ + /usr/include/boost/date_time/time_system_split.hpp \ + /usr/include/boost/date_time/time_system_counted.hpp \ + /usr/include/boost/date_time/time.hpp \ + /usr/include/boost/date_time/posix_time/date_duration_operators.hpp \ + /usr/include/boost/date_time/posix_time/posix_time_duration.hpp \ + /usr/include/boost/numeric/conversion/cast.hpp \ + /usr/include/boost/numeric/conversion/converter.hpp \ + /usr/include/boost/numeric/conversion/conversion_traits.hpp \ + /usr/include/boost/numeric/conversion/detail/conversion_traits.hpp \ + /usr/include/boost/numeric/conversion/detail/meta.hpp \ + /usr/include/boost/numeric/conversion/detail/int_float_mixture.hpp \ + /usr/include/boost/numeric/conversion/int_float_mixture_enum.hpp \ + /usr/include/boost/numeric/conversion/detail/sign_mixture.hpp \ + /usr/include/boost/numeric/conversion/sign_mixture_enum.hpp \ + /usr/include/boost/numeric/conversion/detail/udt_builtin_mixture.hpp \ + /usr/include/boost/numeric/conversion/udt_builtin_mixture_enum.hpp \ + /usr/include/boost/numeric/conversion/detail/is_subranged.hpp \ + /usr/include/boost/mpl/multiplies.hpp \ + /usr/include/boost/mpl/times.hpp \ + /usr/include/boost/mpl/aux_/preprocessed/gcc/times.hpp \ + /usr/include/boost/numeric/conversion/converter_policies.hpp \ + /usr/include/boost/numeric/conversion/detail/converter.hpp \ + /usr/include/boost/numeric/conversion/bounds.hpp \ + /usr/include/boost/numeric/conversion/detail/bounds.hpp \ + /usr/include/boost/numeric/conversion/numeric_cast_traits.hpp \ + /usr/include/boost/numeric/conversion/detail/numeric_cast_traits.hpp \ + /usr/include/boost/numeric/conversion/detail/preprocessed/numeric_cast_traits_common.hpp \ + /usr/include/boost/numeric/conversion/detail/preprocessed/numeric_cast_traits_long_long.hpp \ + /usr/include/boost/date_time/posix_time/time_period.hpp \ + /usr/include/boost/date_time/time_iterator.hpp \ + /usr/include/boost/date_time/dst_rules.hpp \ + /usr/include/boost/asio/detail/impl/timer_queue_ptime.ipp \ + /usr/include/boost/asio/detail/timer_scheduler.hpp \ + /usr/include/boost/asio/detail/timer_scheduler_fwd.hpp \ + /usr/include/boost/asio/detail/wait_handler.hpp \ + /usr/include/boost/asio/basic_io_object.hpp \ + /usr/include/boost/asio/basic_raw_socket.hpp \ + /usr/include/boost/asio/basic_seq_packet_socket.hpp \ + /usr/include/boost/asio/basic_serial_port.hpp \ + /usr/include/boost/asio/serial_port_base.hpp \ + /usr/include/termios.h \ + /usr/include/bits/termios.h \ + /usr/include/bits/termios-struct.h \ + /usr/include/bits/termios-c_cc.h \ + /usr/include/bits/termios-c_iflag.h \ + /usr/include/bits/termios-c_oflag.h \ + /usr/include/bits/termios-baud.h \ + /usr/include/bits/termios-c_cflag.h \ + /usr/include/bits/termios-c_lflag.h \ + /usr/include/bits/termios-tcflow.h \ + /usr/include/bits/termios-misc.h \ + /usr/include/boost/asio/impl/serial_port_base.hpp \ + /usr/include/boost/asio/impl/serial_port_base.ipp \ + /usr/include/boost/asio/detail/reactive_serial_port_service.hpp \ + /usr/include/boost/asio/detail/impl/reactive_serial_port_service.ipp \ + /usr/include/boost/asio/basic_socket_acceptor.hpp \ + /usr/include/boost/asio/basic_socket_iostream.hpp \ + /usr/include/boost/asio/basic_socket_streambuf.hpp \ + /usr/include/boost/asio/basic_stream_socket.hpp \ + /usr/include/boost/asio/steady_timer.hpp \ + /usr/include/boost/asio/basic_waitable_timer.hpp \ + /usr/include/boost/asio/detail/chrono_time_traits.hpp \ + /usr/include/boost/asio/wait_traits.hpp \ + /usr/include/boost/asio/bind_executor.hpp \ + /usr/include/boost/asio/uses_executor.hpp \ + /usr/include/boost/asio/buffered_read_stream_fwd.hpp \ + /usr/include/boost/asio/buffered_read_stream.hpp \ + /usr/include/boost/asio/detail/buffer_resize_guard.hpp \ + /usr/include/boost/asio/detail/buffered_stream_storage.hpp \ + /usr/include/boost/asio/impl/buffered_read_stream.hpp \ + /usr/include/boost/asio/buffered_stream_fwd.hpp \ + /usr/include/boost/asio/buffered_stream.hpp \ + /usr/include/boost/asio/buffered_write_stream.hpp \ + /usr/include/boost/asio/buffered_write_stream_fwd.hpp \ + /usr/include/boost/asio/impl/buffered_write_stream.hpp \ + /usr/include/boost/asio/buffers_iterator.hpp \ + /usr/include/boost/asio/co_spawn.hpp \ + /usr/include/boost/asio/compose.hpp \ + /usr/include/boost/asio/impl/compose.hpp \ + /usr/include/boost/asio/connect.hpp \ + /usr/include/boost/asio/impl/connect.hpp \ + /usr/include/boost/asio/coroutine.hpp \ + /usr/include/boost/asio/deadline_timer.hpp \ + /usr/include/boost/asio/detached.hpp \ + /usr/include/boost/asio/impl/detached.hpp \ + /usr/include/boost/asio/executor.hpp \ + /usr/include/boost/asio/impl/executor.hpp \ + /usr/include/boost/asio/impl/executor.ipp \ + /usr/include/boost/asio/generic/basic_endpoint.hpp \ + /usr/include/boost/asio/generic/detail/endpoint.hpp \ + /usr/include/boost/asio/generic/detail/impl/endpoint.ipp \ + /usr/include/boost/asio/generic/datagram_protocol.hpp \ + /usr/include/boost/asio/generic/raw_protocol.hpp \ + /usr/include/boost/asio/generic/seq_packet_protocol.hpp \ + /usr/include/boost/asio/generic/stream_protocol.hpp \ + /usr/include/boost/asio/high_resolution_timer.hpp \ + /usr/include/boost/asio/io_service.hpp \ + /usr/include/boost/asio/io_service_strand.hpp \ + /usr/include/boost/asio/ip/address.hpp \ + /usr/include/boost/asio/ip/address_v4.hpp \ + /usr/include/boost/asio/detail/array.hpp \ + /usr/include/boost/asio/detail/winsock_init.hpp \ + /usr/include/boost/asio/ip/impl/address_v4.hpp \ + /usr/include/boost/asio/ip/impl/address_v4.ipp \ + /usr/include/boost/asio/ip/address_v6.hpp \ + /usr/include/boost/asio/ip/impl/address_v6.hpp \ + /usr/include/boost/asio/ip/impl/address_v6.ipp \ + /usr/include/boost/asio/ip/bad_address_cast.hpp \ + /usr/include/boost/asio/ip/impl/address.hpp \ + /usr/include/boost/asio/ip/impl/address.ipp \ + /usr/include/boost/asio/ip/address_v4_iterator.hpp \ + /usr/include/boost/asio/ip/address_v4_range.hpp \ + /usr/include/boost/asio/ip/address_v6_iterator.hpp \ + /usr/include/boost/asio/ip/address_v6_range.hpp \ + /usr/include/boost/asio/ip/network_v4.hpp \ + /usr/include/boost/asio/ip/impl/network_v4.hpp \ + /usr/include/boost/asio/ip/impl/network_v4.ipp \ + /usr/include/boost/asio/ip/network_v6.hpp \ + /usr/include/boost/asio/ip/impl/network_v6.hpp \ + /usr/include/boost/asio/ip/impl/network_v6.ipp \ + /usr/include/boost/asio/ip/basic_endpoint.hpp \ + /usr/include/boost/asio/ip/detail/endpoint.hpp \ + /usr/include/boost/asio/ip/detail/impl/endpoint.ipp \ + /usr/include/boost/asio/ip/impl/basic_endpoint.hpp \ + /usr/include/boost/asio/ip/basic_resolver.hpp \ + /usr/include/boost/asio/ip/basic_resolver_iterator.hpp \ + /usr/include/boost/asio/ip/basic_resolver_entry.hpp \ + /usr/include/boost/asio/ip/basic_resolver_query.hpp \ + /usr/include/boost/asio/ip/resolver_query_base.hpp \ + /usr/include/boost/asio/ip/resolver_base.hpp \ + /usr/include/boost/asio/ip/basic_resolver_results.hpp \ + /usr/include/boost/asio/detail/resolver_service.hpp \ + /usr/include/boost/asio/detail/resolve_endpoint_op.hpp \ + /usr/include/boost/asio/detail/resolve_op.hpp \ + /usr/include/boost/asio/detail/resolve_query_op.hpp \ + /usr/include/boost/asio/detail/resolver_service_base.hpp \ + /usr/include/boost/asio/detail/impl/resolver_service_base.ipp \ + /usr/include/boost/asio/ip/host_name.hpp \ + /usr/include/boost/asio/ip/impl/host_name.ipp \ + /usr/include/boost/asio/ip/icmp.hpp \ + /usr/include/boost/asio/ip/multicast.hpp \ + /usr/include/boost/asio/ip/detail/socket_option.hpp \ + /usr/include/boost/asio/ip/tcp.hpp \ + /usr/include/boost/asio/ip/udp.hpp \ + /usr/include/boost/asio/ip/unicast.hpp \ + /usr/include/boost/asio/ip/v6_only.hpp \ + /usr/include/boost/asio/is_read_buffered.hpp \ + /usr/include/boost/asio/is_write_buffered.hpp \ + /usr/include/boost/asio/local/basic_endpoint.hpp \ + /usr/include/boost/asio/local/detail/endpoint.hpp \ + /usr/include/boost/asio/local/detail/impl/endpoint.ipp \ + /usr/include/boost/asio/local/connect_pair.hpp \ + /usr/include/boost/asio/local/datagram_protocol.hpp \ + /usr/include/boost/asio/local/stream_protocol.hpp \ + /usr/include/boost/asio/packaged_task.hpp \ + /usr/include/boost/asio/detail/future.hpp \ + /usr/include/boost/asio/placeholders.hpp \ + /usr/include/boost/bind/arg.hpp \ + /usr/include/boost/is_placeholder.hpp \ + /usr/include/boost/asio/read_at.hpp \ + /usr/include/boost/asio/impl/read_at.hpp \ + /usr/include/boost/asio/read_until.hpp \ + /usr/include/boost/asio/detail/regex_fwd.hpp \ + /usr/include/boost/regex_fwd.hpp \ + /usr/include/boost/regex/config.hpp \ + /usr/include/boost/regex/user.hpp \ + /usr/include/boost/predef.h \ + /usr/include/boost/predef/language.h \ + /usr/include/boost/predef/language/stdc.h \ + /usr/include/boost/predef/language/stdcpp.h \ + /usr/include/boost/predef/language/objc.h \ + /usr/include/boost/predef/language/cuda.h \ + /usr/include/boost/predef/architecture.h \ + /usr/include/boost/predef/architecture/alpha.h \ + /usr/include/boost/predef/architecture/arm.h \ + /usr/include/boost/predef/architecture/blackfin.h \ + /usr/include/boost/predef/architecture/convex.h \ + /usr/include/boost/predef/architecture/ia64.h \ + /usr/include/boost/predef/architecture/m68k.h \ + /usr/include/boost/predef/architecture/mips.h \ + /usr/include/boost/predef/architecture/parisc.h \ + /usr/include/boost/predef/architecture/ppc.h \ + /usr/include/boost/predef/architecture/ptx.h \ + /usr/include/boost/predef/architecture/pyramid.h \ + /usr/include/boost/predef/architecture/riscv.h \ + /usr/include/boost/predef/architecture/rs6k.h \ + /usr/include/boost/predef/architecture/sparc.h \ + /usr/include/boost/predef/architecture/superh.h \ + /usr/include/boost/predef/architecture/sys370.h \ + /usr/include/boost/predef/architecture/sys390.h \ + /usr/include/boost/predef/architecture/x86.h \ + /usr/include/boost/predef/architecture/x86/32.h \ + /usr/include/boost/predef/architecture/x86/64.h \ + /usr/include/boost/predef/architecture/z.h \ + /usr/include/boost/predef/compiler.h \ + /usr/include/boost/predef/compiler/borland.h \ + /usr/include/boost/predef/compiler/clang.h \ + /usr/include/boost/predef/compiler/comeau.h \ + /usr/include/boost/predef/compiler/compaq.h \ + /usr/include/boost/predef/compiler/diab.h \ + /usr/include/boost/predef/compiler/digitalmars.h \ + /usr/include/boost/predef/compiler/dignus.h \ + /usr/include/boost/predef/compiler/edg.h \ + /usr/include/boost/predef/compiler/ekopath.h \ + /usr/include/boost/predef/compiler/gcc_xml.h \ + /usr/include/boost/predef/compiler/gcc.h \ + /usr/include/boost/predef/detail/comp_detected.h \ + /usr/include/boost/predef/compiler/greenhills.h \ + /usr/include/boost/predef/compiler/hp_acc.h \ + /usr/include/boost/predef/compiler/iar.h \ + /usr/include/boost/predef/compiler/ibm.h \ + /usr/include/boost/predef/compiler/intel.h \ + /usr/include/boost/predef/compiler/kai.h \ + /usr/include/boost/predef/compiler/llvm.h \ + /usr/include/boost/predef/compiler/metaware.h \ + /usr/include/boost/predef/compiler/metrowerks.h \ + /usr/include/boost/predef/compiler/microtec.h \ + /usr/include/boost/predef/compiler/mpw.h \ + /usr/include/boost/predef/compiler/nvcc.h \ + /usr/include/boost/predef/compiler/palm.h \ + /usr/include/boost/predef/compiler/pgi.h \ + /usr/include/boost/predef/compiler/sgi_mipspro.h \ + /usr/include/boost/predef/compiler/sunpro.h \ + /usr/include/boost/predef/compiler/tendra.h \ + /usr/include/boost/predef/compiler/visualc.h \ + /usr/include/boost/predef/compiler/watcom.h \ + /usr/include/boost/predef/library.h \ + /usr/include/boost/predef/library/c.h \ + /usr/include/boost/predef/library/c/_prefix.h \ + /usr/include/boost/predef/detail/_cassert.h \ + /usr/include/boost/predef/library/c/cloudabi.h \ + /usr/include/boost/predef/library/c/gnu.h \ + /usr/include/boost/predef/library/c/uc.h \ + /usr/include/boost/predef/library/c/vms.h \ + /usr/include/boost/predef/library/c/zos.h \ + /usr/include/boost/predef/library/std.h \ + /usr/include/boost/predef/library/std/_prefix.h \ + /usr/include/boost/predef/detail/_exception.h \ + /usr/include/boost/predef/library/std/cxx.h \ + /usr/include/boost/predef/library/std/dinkumware.h \ + /usr/include/boost/predef/library/std/libcomo.h \ + /usr/include/boost/predef/library/std/modena.h \ + /usr/include/boost/predef/library/std/msl.h \ + /usr/include/boost/predef/library/std/roguewave.h \ + /usr/include/boost/predef/library/std/sgi.h \ + /usr/include/boost/predef/library/std/stdcpp3.h \ + /usr/include/boost/predef/library/std/stlport.h \ + /usr/include/boost/predef/library/std/vacpp.h \ + /usr/include/boost/predef/os.h \ + /usr/include/boost/predef/os/aix.h \ + /usr/include/boost/predef/os/amigaos.h \ + /usr/include/boost/predef/os/beos.h \ + /usr/include/boost/predef/os/bsd.h \ + /usr/include/boost/predef/os/macos.h \ + /usr/include/boost/predef/os/bsd/bsdi.h \ + /usr/include/boost/predef/os/bsd/dragonfly.h \ + /usr/include/boost/predef/os/bsd/free.h \ + /usr/include/boost/predef/os/bsd/open.h \ + /usr/include/boost/predef/os/bsd/net.h \ + /usr/include/boost/predef/os/cygwin.h \ + /usr/include/boost/predef/os/haiku.h \ + /usr/include/boost/predef/os/hpux.h \ + /usr/include/boost/predef/os/irix.h \ + /usr/include/boost/predef/os/linux.h \ + /usr/include/boost/predef/detail/os_detected.h \ + /usr/include/boost/predef/os/os400.h \ + /usr/include/boost/predef/os/qnxnto.h \ + /usr/include/boost/predef/os/solaris.h \ + /usr/include/boost/predef/os/unix.h \ + /usr/include/boost/predef/os/vms.h \ + /usr/include/boost/predef/other.h \ + /usr/include/boost/predef/other/endian.h \ + /usr/include/boost/predef/hardware.h \ + /usr/include/boost/predef/hardware/simd.h \ + /usr/include/boost/predef/hardware/simd/x86.h \ + /usr/include/boost/predef/hardware/simd/x86/versions.h \ + /usr/include/boost/predef/hardware/simd/x86_amd.h \ + /usr/include/boost/predef/hardware/simd/x86_amd/versions.h \ + /usr/include/boost/predef/hardware/simd/arm.h \ + /usr/include/boost/predef/hardware/simd/arm/versions.h \ + /usr/include/boost/predef/hardware/simd/ppc.h \ + /usr/include/boost/predef/hardware/simd/ppc/versions.h \ + /usr/include/boost/predef/version.h \ + /usr/include/boost/regex/config/cwchar.hpp \ + /usr/include/boost/regex/v4/regex_fwd.hpp \ + /usr/include/boost/regex/v4/match_flags.hpp \ + /usr/include/boost/asio/impl/read_until.hpp \ + /usr/include/boost/asio/redirect_error.hpp \ + /usr/include/boost/asio/impl/redirect_error.hpp \ + /usr/include/boost/asio/require_concept.hpp \ + /usr/include/boost/asio/traits/require_concept_member.hpp \ + /usr/include/boost/asio/traits/require_concept_free.hpp \ + /usr/include/boost/asio/traits/static_require_concept.hpp \ + /usr/include/boost/asio/serial_port.hpp \ + /usr/include/boost/asio/static_thread_pool.hpp \ + /usr/include/boost/asio/thread_pool.hpp \ + /usr/include/boost/asio/impl/thread_pool.hpp \ + /usr/include/boost/asio/detail/blocking_executor_op.hpp \ + /usr/include/boost/asio/detail/bulk_executor_op.hpp \ + /usr/include/boost/asio/impl/thread_pool.ipp \ + /usr/include/boost/asio/system_timer.hpp \ + /usr/include/boost/asio/this_coro.hpp \ + /usr/include/boost/asio/use_awaitable.hpp \ + /usr/include/boost/asio/use_future.hpp \ + /usr/include/boost/asio/impl/use_future.hpp \ + /usr/include/boost/asio/version.hpp \ + /usr/include/boost/asio/windows/basic_object_handle.hpp \ + /usr/include/boost/asio/windows/basic_overlapped_handle.hpp \ + /usr/include/boost/asio/windows/basic_random_access_handle.hpp \ + /usr/include/boost/asio/windows/basic_stream_handle.hpp \ + /usr/include/boost/asio/windows/object_handle.hpp \ + /usr/include/boost/asio/windows/overlapped_handle.hpp \ + /usr/include/boost/asio/windows/overlapped_ptr.hpp \ + /usr/include/boost/asio/windows/random_access_handle.hpp \ + /usr/include/boost/asio/windows/stream_handle.hpp \ + /usr/include/boost/asio/write_at.hpp \ + /usr/include/boost/asio/impl/write_at.hpp \ + /usr/include/c++/11/iostream \ + include/LibLsp/lsp/ProcessIoService.h \ + include/LibLsp/lsp/SimpleTimer.h \ + /usr/include/c++/11/thread \ + /usr/include/c++/11/bits/this_thread_sleep.h + +CMakeFiles/lspcpp.dir/src/lsp/ProtocolJsonHandler.cpp.o: src/lsp/ProtocolJsonHandler.cpp \ + /usr/include/stdc-predef.h \ + include/LibLsp/lsp/ProtocolJsonHandler.h \ + include/LibLsp/JsonRpc/MessageJsonHandler.h \ + /usr/include/c++/11/string \ + /usr/include/c++/11/x86_64-redhat-linux/bits/c++config.h \ + /usr/include/bits/wordsize.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/os_defines.h \ + /usr/include/features.h \ + /usr/include/sys/cdefs.h \ + /usr/include/bits/long-double.h \ + /usr/include/gnu/stubs.h \ + /usr/include/gnu/stubs-64.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/cpu_defines.h \ + /usr/include/c++/11/bits/stringfwd.h \ + /usr/include/c++/11/bits/memoryfwd.h \ + /usr/include/c++/11/bits/char_traits.h \ + /usr/include/c++/11/bits/stl_algobase.h \ + /usr/include/c++/11/bits/functexcept.h \ + /usr/include/c++/11/bits/exception_defines.h \ + /usr/include/c++/11/bits/cpp_type_traits.h \ + /usr/include/c++/11/ext/type_traits.h \ + /usr/include/c++/11/ext/numeric_traits.h \ + /usr/include/c++/11/bits/stl_pair.h \ + /usr/include/c++/11/bits/move.h \ + /usr/include/c++/11/type_traits \ + /usr/include/c++/11/bits/stl_iterator_base_types.h \ + /usr/include/c++/11/bits/stl_iterator_base_funcs.h \ + /usr/include/c++/11/bits/concept_check.h \ + /usr/include/c++/11/debug/assertions.h \ + /usr/include/c++/11/bits/stl_iterator.h \ + /usr/include/c++/11/bits/ptr_traits.h \ + /usr/include/c++/11/debug/debug.h \ + /usr/include/c++/11/bits/predefined_ops.h \ + /usr/include/c++/11/bits/postypes.h \ + /usr/include/c++/11/cwchar \ + /usr/include/wchar.h \ + /usr/include/bits/libc-header-start.h \ + /usr/include/bits/floatn.h \ + /usr/include/bits/floatn-common.h \ + /usr/lib/gcc/x86_64-redhat-linux/11/include/stddef.h \ + /usr/lib/gcc/x86_64-redhat-linux/11/include/stdarg.h \ + /usr/include/bits/wchar.h \ + /usr/include/bits/types/wint_t.h \ + /usr/include/bits/types/mbstate_t.h \ + /usr/include/bits/types/__mbstate_t.h \ + /usr/include/bits/types/__FILE.h \ + /usr/include/bits/types/FILE.h \ + /usr/include/bits/types/locale_t.h \ + /usr/include/bits/types/__locale_t.h \ + /usr/include/c++/11/cstdint \ + /usr/lib/gcc/x86_64-redhat-linux/11/include/stdint.h \ + /usr/include/stdint.h \ + /usr/include/bits/types.h \ + /usr/include/bits/timesize.h \ + /usr/include/bits/typesizes.h \ + /usr/include/bits/time64.h \ + /usr/include/bits/stdint-intn.h \ + /usr/include/bits/stdint-uintn.h \ + /usr/include/c++/11/bits/allocator.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/c++allocator.h \ + /usr/include/c++/11/ext/new_allocator.h \ + /usr/include/c++/11/new \ + /usr/include/c++/11/bits/exception.h \ + /usr/include/c++/11/bits/localefwd.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/c++locale.h \ + /usr/include/c++/11/clocale \ + /usr/include/locale.h \ + /usr/include/bits/locale.h \ + /usr/include/c++/11/iosfwd \ + /usr/include/c++/11/cctype \ + /usr/include/ctype.h \ + /usr/include/bits/endian.h \ + /usr/include/bits/endianness.h \ + /usr/include/c++/11/bits/ostream_insert.h \ + /usr/include/c++/11/bits/cxxabi_forced.h \ + /usr/include/c++/11/bits/stl_function.h \ + /usr/include/c++/11/backward/binders.h \ + /usr/include/c++/11/bits/range_access.h \ + /usr/include/c++/11/initializer_list \ + /usr/include/c++/11/bits/basic_string.h \ + /usr/include/c++/11/ext/atomicity.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/gthr.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/gthr-default.h \ + /usr/include/pthread.h \ + /usr/include/sched.h \ + /usr/include/bits/types/time_t.h \ + /usr/include/bits/types/struct_timespec.h \ + /usr/include/bits/sched.h \ + /usr/include/bits/types/struct_sched_param.h \ + /usr/include/bits/cpu-set.h \ + /usr/include/time.h \ + /usr/include/bits/time.h \ + /usr/include/bits/timex.h \ + /usr/include/bits/types/struct_timeval.h \ + /usr/include/bits/types/clock_t.h \ + /usr/include/bits/types/struct_tm.h \ + /usr/include/bits/types/clockid_t.h \ + /usr/include/bits/types/timer_t.h \ + /usr/include/bits/types/struct_itimerspec.h \ + /usr/include/bits/pthreadtypes.h \ + /usr/include/bits/thread-shared-types.h \ + /usr/include/bits/pthreadtypes-arch.h \ + /usr/include/bits/struct_mutex.h \ + /usr/include/bits/struct_rwlock.h \ + /usr/include/bits/setjmp.h \ + /usr/include/bits/types/__sigset_t.h \ + /usr/include/bits/types/struct___jmp_buf_tag.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/atomic_word.h \ + /usr/include/sys/single_threaded.h \ + /usr/include/c++/11/ext/alloc_traits.h \ + /usr/include/c++/11/bits/alloc_traits.h \ + /usr/include/c++/11/bits/stl_construct.h \ + /usr/include/c++/11/ext/string_conversions.h \ + /usr/include/c++/11/cstdlib \ + /usr/include/stdlib.h \ + /usr/include/bits/waitflags.h \ + /usr/include/bits/waitstatus.h \ + /usr/include/sys/types.h \ + /usr/include/endian.h \ + /usr/include/bits/byteswap.h \ + /usr/include/bits/uintn-identity.h \ + /usr/include/sys/select.h \ + /usr/include/bits/select.h \ + /usr/include/bits/types/sigset_t.h \ + /usr/include/alloca.h \ + /usr/include/bits/stdlib-bsearch.h \ + /usr/include/bits/stdlib-float.h \ + /usr/include/c++/11/bits/std_abs.h \ + /usr/include/c++/11/cstdio \ + /usr/include/stdio.h \ + /usr/include/bits/types/__fpos_t.h \ + /usr/include/bits/types/__fpos64_t.h \ + /usr/include/bits/types/struct_FILE.h \ + /usr/include/bits/types/cookie_io_functions_t.h \ + /usr/include/bits/stdio_lim.h \ + /usr/include/bits/stdio.h \ + /usr/include/c++/11/cerrno \ + /usr/include/errno.h \ + /usr/include/bits/errno.h \ + /usr/include/linux/errno.h \ + /usr/include/asm/errno.h \ + /usr/include/asm-generic/errno.h \ + /usr/include/asm-generic/errno-base.h \ + /usr/include/bits/types/error_t.h \ + /usr/include/c++/11/bits/charconv.h \ + /usr/include/c++/11/bits/functional_hash.h \ + /usr/include/c++/11/bits/hash_bytes.h \ + /usr/include/c++/11/bits/basic_string.tcc \ + /usr/include/c++/11/map \ + /usr/include/c++/11/bits/stl_tree.h \ + /usr/include/c++/11/ext/aligned_buffer.h \ + /usr/include/c++/11/bits/stl_map.h \ + /usr/include/c++/11/tuple \ + /usr/include/c++/11/utility \ + /usr/include/c++/11/bits/stl_relops.h \ + /usr/include/c++/11/array \ + /usr/include/c++/11/bits/uses_allocator.h \ + /usr/include/c++/11/bits/invoke.h \ + /usr/include/c++/11/bits/stl_multimap.h \ + /usr/include/c++/11/bits/erase_if.h \ + /usr/include/c++/11/functional \ + /usr/include/c++/11/bits/refwrap.h \ + /usr/include/c++/11/bits/std_function.h \ + /usr/include/c++/11/typeinfo \ + include/LibLsp/JsonRpc/message.h \ + /usr/include/c++/11/atomic \ + /usr/include/c++/11/bits/atomic_base.h \ + /usr/include/c++/11/bits/atomic_lockfree_defines.h \ + /usr/include/c++/11/iostream \ + /usr/include/c++/11/ostream \ + /usr/include/c++/11/ios \ + /usr/include/c++/11/exception \ + /usr/include/c++/11/bits/exception_ptr.h \ + /usr/include/c++/11/bits/cxxabi_init_exception.h \ + /usr/include/c++/11/bits/nested_exception.h \ + /usr/include/c++/11/bits/ios_base.h \ + /usr/include/c++/11/bits/locale_classes.h \ + /usr/include/c++/11/bits/locale_classes.tcc \ + /usr/include/c++/11/system_error \ + /usr/include/c++/11/x86_64-redhat-linux/bits/error_constants.h \ + /usr/include/c++/11/stdexcept \ + /usr/include/c++/11/streambuf \ + /usr/include/c++/11/bits/streambuf.tcc \ + /usr/include/c++/11/bits/basic_ios.h \ + /usr/include/c++/11/bits/locale_facets.h \ + /usr/include/c++/11/cwctype \ + /usr/include/wctype.h \ + /usr/include/bits/wctype-wchar.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/ctype_base.h \ + /usr/include/c++/11/bits/streambuf_iterator.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/ctype_inline.h \ + /usr/include/c++/11/bits/locale_facets.tcc \ + /usr/include/c++/11/bits/basic_ios.tcc \ + /usr/include/c++/11/bits/ostream.tcc \ + /usr/include/c++/11/istream \ + /usr/include/c++/11/bits/istream.tcc \ + include/LibLsp/JsonRpc/serializer.h \ + include/LibLsp/JsonRpc/macro_map.h \ + /usr/include/boost/optional.hpp \ + /usr/include/boost/optional/optional.hpp \ + /usr/include/boost/assert.hpp \ + /usr/include/assert.h \ + /usr/include/boost/core/addressof.hpp \ + /usr/include/boost/config.hpp \ + /usr/include/boost/config/user.hpp \ + /usr/include/boost/config/detail/select_compiler_config.hpp \ + /usr/include/boost/config/compiler/gcc.hpp \ + /usr/include/c++/11/cstddef \ + /usr/include/boost/config/detail/select_stdlib_config.hpp \ + /usr/include/c++/11/version \ + /usr/include/boost/config/stdlib/libstdcpp3.hpp \ + /usr/include/unistd.h \ + /usr/include/bits/posix_opt.h \ + /usr/include/bits/environments.h \ + /usr/include/bits/confname.h \ + /usr/include/bits/getopt_posix.h \ + /usr/include/bits/getopt_core.h \ + /usr/include/bits/unistd_ext.h \ + /usr/include/boost/config/detail/select_platform_config.hpp \ + /usr/include/boost/config/platform/linux.hpp \ + /usr/include/boost/config/detail/posix_features.hpp \ + /usr/include/boost/config/detail/suffix.hpp \ + /usr/include/boost/config/helper_macros.hpp \ + /usr/include/boost/core/enable_if.hpp \ + /usr/include/boost/core/explicit_operator_bool.hpp \ + /usr/include/boost/config/workaround.hpp \ + /usr/include/boost/core/swap.hpp \ + /usr/include/boost/optional/bad_optional_access.hpp \ + /usr/include/boost/static_assert.hpp \ + /usr/include/boost/detail/workaround.hpp \ + /usr/include/boost/throw_exception.hpp \ + /usr/include/boost/assert/source_location.hpp \ + /usr/include/boost/current_function.hpp \ + /usr/include/boost/cstdint.hpp \ + /usr/include/boost/exception/exception.hpp \ + /usr/include/boost/type.hpp \ + /usr/include/boost/type_traits/alignment_of.hpp \ + /usr/include/boost/type_traits/intrinsics.hpp \ + /usr/include/boost/type_traits/detail/config.hpp \ + /usr/include/boost/version.hpp \ + /usr/include/boost/type_traits/integral_constant.hpp \ + /usr/include/boost/type_traits/conditional.hpp \ + /usr/include/boost/type_traits/has_nothrow_constructor.hpp \ + /usr/include/boost/type_traits/is_default_constructible.hpp \ + /usr/include/boost/type_traits/is_complete.hpp \ + /usr/include/boost/type_traits/declval.hpp \ + /usr/include/boost/type_traits/add_rvalue_reference.hpp \ + /usr/include/boost/type_traits/is_void.hpp \ + /usr/include/boost/type_traits/is_reference.hpp \ + /usr/include/boost/type_traits/is_lvalue_reference.hpp \ + /usr/include/boost/type_traits/is_rvalue_reference.hpp \ + /usr/include/boost/type_traits/remove_reference.hpp \ + /usr/include/boost/type_traits/is_function.hpp \ + /usr/include/boost/type_traits/detail/is_function_cxx_11.hpp \ + /usr/include/boost/type_traits/detail/yes_no_type.hpp \ + /usr/include/boost/type_traits/type_with_alignment.hpp \ + /usr/include/boost/type_traits/is_pod.hpp \ + /usr/include/boost/type_traits/is_scalar.hpp \ + /usr/include/boost/type_traits/is_arithmetic.hpp \ + /usr/include/boost/type_traits/is_integral.hpp \ + /usr/include/boost/type_traits/is_floating_point.hpp \ + /usr/include/boost/type_traits/is_enum.hpp \ + /usr/include/boost/type_traits/is_pointer.hpp \ + /usr/include/boost/type_traits/is_member_pointer.hpp \ + /usr/include/boost/type_traits/is_member_function_pointer.hpp \ + /usr/include/boost/type_traits/detail/is_member_function_pointer_cxx_11.hpp \ + /usr/include/boost/type_traits/remove_const.hpp \ + /usr/include/boost/type_traits/decay.hpp \ + /usr/include/boost/type_traits/is_array.hpp \ + /usr/include/boost/type_traits/remove_bounds.hpp \ + /usr/include/boost/type_traits/remove_extent.hpp \ + /usr/include/boost/type_traits/add_pointer.hpp \ + /usr/include/boost/type_traits/remove_cv.hpp \ + /usr/include/boost/type_traits/is_base_of.hpp \ + /usr/include/boost/type_traits/is_base_and_derived.hpp \ + /usr/include/boost/type_traits/is_same.hpp \ + /usr/include/boost/type_traits/is_class.hpp \ + /usr/include/boost/type_traits/is_const.hpp \ + /usr/include/boost/type_traits/is_constructible.hpp \ + /usr/include/boost/type_traits/is_destructible.hpp \ + /usr/include/boost/type_traits/is_nothrow_move_assignable.hpp \ + /usr/include/boost/type_traits/has_trivial_move_assign.hpp \ + /usr/include/boost/type_traits/is_assignable.hpp \ + /usr/include/boost/type_traits/is_volatile.hpp \ + /usr/include/boost/type_traits/has_nothrow_assign.hpp \ + /usr/include/boost/type_traits/enable_if.hpp \ + /usr/include/boost/type_traits/is_nothrow_move_constructible.hpp \ + /usr/include/boost/move/utility.hpp \ + /usr/include/boost/move/detail/config_begin.hpp \ + /usr/include/boost/move/detail/workaround.hpp \ + /usr/include/boost/move/utility_core.hpp \ + /usr/include/boost/move/core.hpp \ + /usr/include/boost/move/detail/config_end.hpp \ + /usr/include/boost/move/detail/meta_utils.hpp \ + /usr/include/boost/move/detail/meta_utils_core.hpp \ + /usr/include/boost/move/traits.hpp \ + /usr/include/boost/move/detail/type_traits.hpp \ + /usr/include/boost/none.hpp \ + /usr/include/boost/none_t.hpp \ + /usr/include/boost/utility/compare_pointees.hpp \ + /usr/include/boost/utility/result_of.hpp \ + /usr/include/boost/preprocessor/cat.hpp \ + /usr/include/boost/preprocessor/config/config.hpp \ + /usr/include/boost/preprocessor/iteration/iterate.hpp \ + /usr/include/boost/preprocessor/arithmetic/dec.hpp \ + /usr/include/boost/preprocessor/config/limits.hpp \ + /usr/include/boost/preprocessor/arithmetic/limits/dec_256.hpp \ + /usr/include/boost/preprocessor/arithmetic/inc.hpp \ + /usr/include/boost/preprocessor/arithmetic/limits/inc_256.hpp \ + /usr/include/boost/preprocessor/array/elem.hpp \ + /usr/include/boost/preprocessor/array/data.hpp \ + /usr/include/boost/preprocessor/tuple/elem.hpp \ + /usr/include/boost/preprocessor/facilities/expand.hpp \ + /usr/include/boost/preprocessor/facilities/overload.hpp \ + /usr/include/boost/preprocessor/variadic/size.hpp \ + /usr/include/boost/preprocessor/control/iif.hpp \ + /usr/include/boost/preprocessor/facilities/check_empty.hpp \ + /usr/include/boost/preprocessor/variadic/has_opt.hpp \ + /usr/include/boost/preprocessor/variadic/limits/size_64.hpp \ + /usr/include/boost/preprocessor/tuple/rem.hpp \ + /usr/include/boost/preprocessor/tuple/detail/is_single_return.hpp \ + /usr/include/boost/preprocessor/variadic/elem.hpp \ + /usr/include/boost/preprocessor/variadic/limits/elem_64.hpp \ + /usr/include/boost/preprocessor/array/size.hpp \ + /usr/include/boost/preprocessor/slot/slot.hpp \ + /usr/include/boost/preprocessor/slot/detail/def.hpp \ + /usr/include/boost/preprocessor/repetition/enum_params.hpp \ + /usr/include/boost/preprocessor/punctuation/comma_if.hpp \ + /usr/include/boost/preprocessor/control/if.hpp \ + /usr/include/boost/preprocessor/logical/bool.hpp \ + /usr/include/boost/preprocessor/logical/limits/bool_256.hpp \ + /usr/include/boost/preprocessor/facilities/empty.hpp \ + /usr/include/boost/preprocessor/punctuation/comma.hpp \ + /usr/include/boost/preprocessor/repetition/repeat.hpp \ + /usr/include/boost/preprocessor/debug/error.hpp \ + /usr/include/boost/preprocessor/detail/auto_rec.hpp \ + /usr/include/boost/preprocessor/detail/limits/auto_rec_256.hpp \ + /usr/include/boost/preprocessor/tuple/eat.hpp \ + /usr/include/boost/preprocessor/repetition/limits/repeat_256.hpp \ + /usr/include/boost/preprocessor/repetition/enum_trailing_params.hpp \ + /usr/include/boost/preprocessor/repetition/enum_binary_params.hpp \ + /usr/include/boost/preprocessor/repetition/enum_shifted_params.hpp \ + /usr/include/boost/preprocessor/facilities/intercept.hpp \ + /usr/include/boost/preprocessor/facilities/limits/intercept_256.hpp \ + /usr/include/boost/type_traits/type_identity.hpp \ + /usr/include/boost/preprocessor/iteration/detail/iter/forward1.hpp \ + /usr/include/boost/preprocessor/iteration/detail/bounds/lower1.hpp \ + /usr/include/boost/preprocessor/slot/detail/shared.hpp \ + /usr/include/boost/preprocessor/iteration/detail/bounds/upper1.hpp \ + /usr/include/boost/preprocessor/iteration/detail/iter/limits/forward1_256.hpp \ + /usr/include/boost/utility/detail/result_of_iterate.hpp \ + /usr/include/boost/optional/optional_fwd.hpp \ + /usr/include/boost/optional/detail/optional_config.hpp \ + /usr/include/boost/optional/detail/optional_factory_support.hpp \ + /usr/include/boost/optional/detail/optional_aligned_storage.hpp \ + /usr/include/boost/optional/detail/optional_trivially_copyable_base.hpp \ + /usr/include/boost/optional/detail/optional_reference_spec.hpp \ + /usr/include/boost/optional/detail/optional_relops.hpp \ + /usr/include/boost/optional/detail/optional_swap.hpp \ + /usr/include/c++/11/cassert \ + /usr/include/c++/11/memory \ + /usr/include/c++/11/bits/stl_uninitialized.h \ + /usr/include/c++/11/bits/stl_tempbuf.h \ + /usr/include/c++/11/bits/stl_raw_storage_iter.h \ + /usr/include/c++/11/bits/align.h \ + /usr/include/c++/11/bit \ + /usr/include/c++/11/bits/unique_ptr.h \ + /usr/include/c++/11/bits/shared_ptr.h \ + /usr/include/c++/11/bits/shared_ptr_base.h \ + /usr/include/c++/11/bits/allocated_ptr.h \ + /usr/include/c++/11/ext/concurrence.h \ + /usr/include/c++/11/bits/shared_ptr_atomic.h \ + /usr/include/c++/11/backward/auto_ptr.h \ + /usr/include/c++/11/vector \ + /usr/include/c++/11/bits/stl_vector.h \ + /usr/include/c++/11/bits/stl_bvector.h \ + /usr/include/c++/11/bits/vector.tcc \ + /usr/include/c++/11/algorithm \ + /usr/include/c++/11/bits/stl_algo.h \ + /usr/include/c++/11/bits/algorithmfwd.h \ + /usr/include/c++/11/bits/stl_heap.h \ + /usr/include/c++/11/bits/uniform_int_dist.h \ + include/LibLsp/lsp/method_type.h \ + include/LibLsp/lsp/general/initialize.h \ + include/LibLsp/lsp/general/InitializeParams.h \ + include/LibLsp/lsp/lsDocumentUri.h \ + include/LibLsp/lsp/lsAny.h \ + include/LibLsp/lsp/general/lsClientCapabilities.h \ + include/LibLsp/lsp/general/lsWorkspaceClientCapabilites.h \ + include/LibLsp/lsp/extention/jdtls/searchSymbols.h \ + include/LibLsp/JsonRpc/RequestInMessage.h \ + /usr/include/c++/11/mutex \ + /usr/include/c++/11/chrono \ + /usr/include/c++/11/ratio \ + /usr/include/c++/11/limits \ + /usr/include/c++/11/ctime \ + /usr/include/c++/11/bits/parse_numbers.h \ + /usr/include/c++/11/bits/std_mutex.h \ + /usr/include/c++/11/bits/unique_lock.h \ + include/LibLsp/JsonRpc/lsRequestId.h \ + include/LibLsp/JsonRpc/lsResponseMessage.h \ + include/LibLsp/lsp/extention/jdtls/WorkspaceSymbolParams.h \ + include/LibLsp/lsp/symbol.h \ + include/LibLsp/lsp/location_type.h \ + include/LibLsp/lsp/lsRange.h \ + include/LibLsp/lsp/lsPosition.h \ + include/LibLsp/lsp/general/lsTextDocumentClientCapabilities.h \ + include/LibLsp/lsp/lsp_completion.h \ + include/LibLsp/lsp/lsTextEdit.h \ + include/LibLsp/lsp/lsMarkedString.h \ + include/LibLsp/lsp/lsCommand.h \ + include/LibLsp/lsp/lsp_diagnostic.h \ + include/LibLsp/lsp/lsResponseError.h \ + /usr/include/c++/11/sstream \ + /usr/include/c++/11/bits/sstream.tcc \ + include/LibLsp/lsp/workspace/workspaceFolders.h \ + include/LibLsp/lsp/general/lsServerCapabilities.h \ + include/LibLsp/lsp/textDocument/SemanticTokens.h \ + include/LibLsp/lsp/lsTextDocumentIdentifier.h \ + include/LibLsp/lsp/lsVersionedTextDocumentIdentifier.h \ + include/LibLsp/lsp/general/shutdown.h \ + include/LibLsp/lsp/textDocument/code_action.h \ + include/LibLsp/lsp/CodeActionParams.h \ + include/LibLsp/lsp/workspace/execute_command.h \ + include/LibLsp/lsp/ExecuteCommandParams.h \ + include/LibLsp/JsonRpc/NotificationInMessage.h \ + include/LibLsp/lsp/lsCodeAction.h \ + include/LibLsp/lsp/lsWorkspaceEdit.h \ + include/LibLsp/lsp/lsTextDocumentEdit.h \ + include/LibLsp/lsp/ResourceOperation.h \ + include/LibLsp/lsp/textDocument/code_lens.h \ + include/LibLsp/lsp/textDocument/completion.h \ + /usr/include/c++/11/regex \ + /usr/include/c++/11/bitset \ + /usr/include/c++/11/iterator \ + /usr/include/c++/11/bits/stream_iterator.h \ + /usr/include/c++/11/locale \ + /usr/include/c++/11/bits/locale_facets_nonio.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/time_members.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/messages_members.h \ + /usr/include/libintl.h \ + /usr/include/c++/11/bits/codecvt.h \ + /usr/include/c++/11/bits/locale_facets_nonio.tcc \ + /usr/include/c++/11/bits/locale_conv.h \ + /usr/include/c++/11/stack \ + /usr/include/c++/11/deque \ + /usr/include/c++/11/bits/stl_deque.h \ + /usr/include/c++/11/bits/deque.tcc \ + /usr/include/c++/11/bits/stl_stack.h \ + /usr/include/c++/11/cstring \ + /usr/include/string.h \ + /usr/include/strings.h \ + /usr/include/c++/11/bits/regex_constants.h \ + /usr/include/c++/11/bits/regex_error.h \ + /usr/include/c++/11/bits/regex_automaton.h \ + /usr/include/c++/11/bits/regex_automaton.tcc \ + /usr/include/c++/11/bits/regex_scanner.h \ + /usr/include/c++/11/bits/regex_scanner.tcc \ + /usr/include/c++/11/bits/regex_compiler.h \ + /usr/include/c++/11/bits/regex_compiler.tcc \ + /usr/include/c++/11/bits/regex.h \ + /usr/include/c++/11/bits/regex.tcc \ + /usr/include/c++/11/bits/regex_executor.h \ + /usr/include/c++/11/bits/regex_executor.tcc \ + include/LibLsp/lsp/lsTextDocumentPositionParams.h \ + include/LibLsp/lsp/textDocument/did_close.h \ + include/LibLsp/lsp/textDocument/highlight.h \ + include/LibLsp/lsp/textDocument/document_symbol.h \ + include/LibLsp/lsp/textDocument/document_link.h \ + include/LibLsp/lsp/textDocument/formatting.h \ + include/LibLsp/lsp/lsFormattingOptions.h \ + include/LibLsp/lsp/textDocument/hover.h \ + include/LibLsp/lsp/textDocument/implementation.h \ + include/LibLsp/lsp/out_list.h \ + include/LibLsp/lsp/textDocument/range_formatting.h \ + include/LibLsp/lsp/textDocument/references.h \ + include/LibLsp/lsp/textDocument/rename.h \ + include/LibLsp/lsp/textDocument/signature_help.h \ + include/LibLsp/lsp/textDocument/type_definition.h \ + include/LibLsp/lsp/workspace/symbol.h \ + include/LibLsp/lsp/textDocument/typeHierarchy.h \ + include/LibLsp/lsp/extention/jdtls/codeActionResult.h \ + /usr/include/c++/11/set \ + /usr/include/c++/11/bits/stl_set.h \ + /usr/include/c++/11/bits/stl_multiset.h \ + include/LibLsp/lsp/textDocument/declaration_definition.h \ + include/LibLsp/lsp/textDocument/resolveCompletionItem.h \ + include/LibLsp/lsp/textDocument/resolveCodeLens.h \ + include/LibLsp/lsp/textDocument/colorPresentation.h \ + include/LibLsp/lsp/textDocument/documentColor.h \ + include/LibLsp/lsp/textDocument/foldingRange.h \ + include/LibLsp/lsp/textDocument/prepareRename.h \ + include/LibLsp/lsp/textDocument/resolveTypeHierarchy.h \ + include/LibLsp/lsp/textDocument/callHierarchy.h \ + include/LibLsp/lsp/textDocument/selectionRange.h \ + include/LibLsp/lsp/extention/jdtls/classFileContents.h \ + include/LibLsp/lsp/extention/jdtls/buildWorkspace.h \ + include/LibLsp/lsp/extention/jdtls/listOverridableMethods.h \ + include/LibLsp/lsp/extention/jdtls/OverridableMethod.h \ + include/LibLsp/lsp/extention/jdtls/addOverridableMethods.h \ + include/LibLsp/lsp/extention/jdtls/checkHashCodeEqualsStatus.h \ + include/LibLsp/lsp/extention/jdtls/checkConstructorsStatus.h \ + include/LibLsp/lsp/extention/jdtls/checkDelegateMethodsStatus.h \ + include/LibLsp/lsp/extention/jdtls/checkToStringStatus.h \ + include/LibLsp/lsp/extention/jdtls/executeCommand.h \ + include/LibLsp/lsp/extention/jdtls/findLinks.h \ + include/LibLsp/lsp/extention/jdtls/getRefactorEdit.h \ + include/LibLsp/lsp/extention/jdtls/generateAccessors.h \ + include/LibLsp/lsp/extention/jdtls/resolveUnimplementedAccessors.h \ + include/LibLsp/lsp/extention/jdtls/generateConstructors.h \ + include/LibLsp/lsp/extention/jdtls/generateDelegateMethods.h \ + include/LibLsp/lsp/extention/jdtls/generateHashCodeEquals.h \ + include/LibLsp/lsp/extention/jdtls/generateToString.h \ + include/LibLsp/lsp/extention/jdtls/getMoveDestinations.h \ + include/LibLsp/lsp/extention/jdtls/Move.h \ + include/LibLsp/lsp/extention/jdtls/organizeImports.h \ + include/LibLsp/lsp/general/exit.h \ + include/LibLsp/lsp/general/initialized.h \ + include/LibLsp/lsp/extention/jdtls/projectConfigurationUpdate.h \ + include/LibLsp/lsp/textDocument/did_change.h \ + include/LibLsp/lsp/textDocument/did_open.h \ + include/LibLsp/lsp/lsTextDocumentItem.h \ + include/LibLsp/lsp/textDocument/did_save.h \ + include/LibLsp/lsp/textDocument/publishDiagnostics.h \ + include/LibLsp/lsp/textDocument/willSave.h \ + include/LibLsp/lsp/workspace/didChangeWorkspaceFolders.h \ + include/LibLsp/lsp/workspace/did_change_configuration.h \ + include/LibLsp/lsp/workspace/did_change_watched_files.h \ + include/LibLsp/lsp/windows/MessageNotify.h \ + include/LibLsp/lsp/language/language.h \ + include/LibLsp/lsp/client/registerCapability.h \ + include/LibLsp/lsp/client/unregisterCapability.h \ + include/LibLsp/JsonRpc/Cancellation.h \ + include/LibLsp/lsp/textDocument/didRenameFiles.h \ + include/LibLsp/lsp/textDocument/semanticHighlighting.h \ + include/LibLsp/lsp/workspace/configuration.h + +CMakeFiles/lspcpp.dir/src/lsp/initialize.cpp.o: src/lsp/initialize.cpp \ + /usr/include/stdc-predef.h \ + include/LibLsp/lsp/general/initialize.h \ + include/LibLsp/JsonRpc/message.h \ + /usr/include/c++/11/atomic \ + /usr/include/c++/11/bits/atomic_base.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/c++config.h \ + /usr/include/bits/wordsize.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/os_defines.h \ + /usr/include/features.h \ + /usr/include/sys/cdefs.h \ + /usr/include/bits/long-double.h \ + /usr/include/gnu/stubs.h \ + /usr/include/gnu/stubs-64.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/cpu_defines.h \ + /usr/lib/gcc/x86_64-redhat-linux/11/include/stdint.h \ + /usr/include/stdint.h \ + /usr/include/bits/libc-header-start.h \ + /usr/include/bits/types.h \ + /usr/include/bits/timesize.h \ + /usr/include/bits/typesizes.h \ + /usr/include/bits/time64.h \ + /usr/include/bits/wchar.h \ + /usr/include/bits/stdint-intn.h \ + /usr/include/bits/stdint-uintn.h \ + /usr/include/c++/11/bits/atomic_lockfree_defines.h \ + /usr/include/c++/11/bits/move.h \ + /usr/include/c++/11/type_traits \ + /usr/include/c++/11/string \ + /usr/include/c++/11/bits/stringfwd.h \ + /usr/include/c++/11/bits/memoryfwd.h \ + /usr/include/c++/11/bits/char_traits.h \ + /usr/include/c++/11/bits/stl_algobase.h \ + /usr/include/c++/11/bits/functexcept.h \ + /usr/include/c++/11/bits/exception_defines.h \ + /usr/include/c++/11/bits/cpp_type_traits.h \ + /usr/include/c++/11/ext/type_traits.h \ + /usr/include/c++/11/ext/numeric_traits.h \ + /usr/include/c++/11/bits/stl_pair.h \ + /usr/include/c++/11/bits/stl_iterator_base_types.h \ + /usr/include/c++/11/bits/stl_iterator_base_funcs.h \ + /usr/include/c++/11/bits/concept_check.h \ + /usr/include/c++/11/debug/assertions.h \ + /usr/include/c++/11/bits/stl_iterator.h \ + /usr/include/c++/11/bits/ptr_traits.h \ + /usr/include/c++/11/debug/debug.h \ + /usr/include/c++/11/bits/predefined_ops.h \ + /usr/include/c++/11/bits/postypes.h \ + /usr/include/c++/11/cwchar \ + /usr/include/wchar.h \ + /usr/include/bits/floatn.h \ + /usr/include/bits/floatn-common.h \ + /usr/lib/gcc/x86_64-redhat-linux/11/include/stddef.h \ + /usr/lib/gcc/x86_64-redhat-linux/11/include/stdarg.h \ + /usr/include/bits/types/wint_t.h \ + /usr/include/bits/types/mbstate_t.h \ + /usr/include/bits/types/__mbstate_t.h \ + /usr/include/bits/types/__FILE.h \ + /usr/include/bits/types/FILE.h \ + /usr/include/bits/types/locale_t.h \ + /usr/include/bits/types/__locale_t.h \ + /usr/include/c++/11/cstdint \ + /usr/include/c++/11/bits/allocator.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/c++allocator.h \ + /usr/include/c++/11/ext/new_allocator.h \ + /usr/include/c++/11/new \ + /usr/include/c++/11/bits/exception.h \ + /usr/include/c++/11/bits/localefwd.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/c++locale.h \ + /usr/include/c++/11/clocale \ + /usr/include/locale.h \ + /usr/include/bits/locale.h \ + /usr/include/c++/11/iosfwd \ + /usr/include/c++/11/cctype \ + /usr/include/ctype.h \ + /usr/include/bits/endian.h \ + /usr/include/bits/endianness.h \ + /usr/include/c++/11/bits/ostream_insert.h \ + /usr/include/c++/11/bits/cxxabi_forced.h \ + /usr/include/c++/11/bits/stl_function.h \ + /usr/include/c++/11/backward/binders.h \ + /usr/include/c++/11/bits/range_access.h \ + /usr/include/c++/11/initializer_list \ + /usr/include/c++/11/bits/basic_string.h \ + /usr/include/c++/11/ext/atomicity.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/gthr.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/gthr-default.h \ + /usr/include/pthread.h \ + /usr/include/sched.h \ + /usr/include/bits/types/time_t.h \ + /usr/include/bits/types/struct_timespec.h \ + /usr/include/bits/sched.h \ + /usr/include/bits/types/struct_sched_param.h \ + /usr/include/bits/cpu-set.h \ + /usr/include/time.h \ + /usr/include/bits/time.h \ + /usr/include/bits/timex.h \ + /usr/include/bits/types/struct_timeval.h \ + /usr/include/bits/types/clock_t.h \ + /usr/include/bits/types/struct_tm.h \ + /usr/include/bits/types/clockid_t.h \ + /usr/include/bits/types/timer_t.h \ + /usr/include/bits/types/struct_itimerspec.h \ + /usr/include/bits/pthreadtypes.h \ + /usr/include/bits/thread-shared-types.h \ + /usr/include/bits/pthreadtypes-arch.h \ + /usr/include/bits/struct_mutex.h \ + /usr/include/bits/struct_rwlock.h \ + /usr/include/bits/setjmp.h \ + /usr/include/bits/types/__sigset_t.h \ + /usr/include/bits/types/struct___jmp_buf_tag.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/atomic_word.h \ + /usr/include/sys/single_threaded.h \ + /usr/include/c++/11/ext/alloc_traits.h \ + /usr/include/c++/11/bits/alloc_traits.h \ + /usr/include/c++/11/bits/stl_construct.h \ + /usr/include/c++/11/ext/string_conversions.h \ + /usr/include/c++/11/cstdlib \ + /usr/include/stdlib.h \ + /usr/include/bits/waitflags.h \ + /usr/include/bits/waitstatus.h \ + /usr/include/sys/types.h \ + /usr/include/endian.h \ + /usr/include/bits/byteswap.h \ + /usr/include/bits/uintn-identity.h \ + /usr/include/sys/select.h \ + /usr/include/bits/select.h \ + /usr/include/bits/types/sigset_t.h \ + /usr/include/alloca.h \ + /usr/include/bits/stdlib-bsearch.h \ + /usr/include/bits/stdlib-float.h \ + /usr/include/c++/11/bits/std_abs.h \ + /usr/include/c++/11/cstdio \ + /usr/include/stdio.h \ + /usr/include/bits/types/__fpos_t.h \ + /usr/include/bits/types/__fpos64_t.h \ + /usr/include/bits/types/struct_FILE.h \ + /usr/include/bits/types/cookie_io_functions_t.h \ + /usr/include/bits/stdio_lim.h \ + /usr/include/bits/stdio.h \ + /usr/include/c++/11/cerrno \ + /usr/include/errno.h \ + /usr/include/bits/errno.h \ + /usr/include/linux/errno.h \ + /usr/include/asm/errno.h \ + /usr/include/asm-generic/errno.h \ + /usr/include/asm-generic/errno-base.h \ + /usr/include/bits/types/error_t.h \ + /usr/include/c++/11/bits/charconv.h \ + /usr/include/c++/11/bits/functional_hash.h \ + /usr/include/c++/11/bits/hash_bytes.h \ + /usr/include/c++/11/bits/basic_string.tcc \ + /usr/include/c++/11/iostream \ + /usr/include/c++/11/ostream \ + /usr/include/c++/11/ios \ + /usr/include/c++/11/exception \ + /usr/include/c++/11/bits/exception_ptr.h \ + /usr/include/c++/11/bits/cxxabi_init_exception.h \ + /usr/include/c++/11/typeinfo \ + /usr/include/c++/11/bits/nested_exception.h \ + /usr/include/c++/11/bits/ios_base.h \ + /usr/include/c++/11/bits/locale_classes.h \ + /usr/include/c++/11/bits/locale_classes.tcc \ + /usr/include/c++/11/system_error \ + /usr/include/c++/11/x86_64-redhat-linux/bits/error_constants.h \ + /usr/include/c++/11/stdexcept \ + /usr/include/c++/11/streambuf \ + /usr/include/c++/11/bits/streambuf.tcc \ + /usr/include/c++/11/bits/basic_ios.h \ + /usr/include/c++/11/bits/locale_facets.h \ + /usr/include/c++/11/cwctype \ + /usr/include/wctype.h \ + /usr/include/bits/wctype-wchar.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/ctype_base.h \ + /usr/include/c++/11/bits/streambuf_iterator.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/ctype_inline.h \ + /usr/include/c++/11/bits/locale_facets.tcc \ + /usr/include/c++/11/bits/basic_ios.tcc \ + /usr/include/c++/11/bits/ostream.tcc \ + /usr/include/c++/11/istream \ + /usr/include/c++/11/bits/istream.tcc \ + include/LibLsp/JsonRpc/serializer.h \ + include/LibLsp/JsonRpc/macro_map.h \ + /usr/include/boost/optional.hpp \ + /usr/include/boost/optional/optional.hpp \ + /usr/include/boost/assert.hpp \ + /usr/include/assert.h \ + /usr/include/boost/core/addressof.hpp \ + /usr/include/boost/config.hpp \ + /usr/include/boost/config/user.hpp \ + /usr/include/boost/config/detail/select_compiler_config.hpp \ + /usr/include/boost/config/compiler/gcc.hpp \ + /usr/include/c++/11/cstddef \ + /usr/include/boost/config/detail/select_stdlib_config.hpp \ + /usr/include/c++/11/version \ + /usr/include/boost/config/stdlib/libstdcpp3.hpp \ + /usr/include/unistd.h \ + /usr/include/bits/posix_opt.h \ + /usr/include/bits/environments.h \ + /usr/include/bits/confname.h \ + /usr/include/bits/getopt_posix.h \ + /usr/include/bits/getopt_core.h \ + /usr/include/bits/unistd_ext.h \ + /usr/include/boost/config/detail/select_platform_config.hpp \ + /usr/include/boost/config/platform/linux.hpp \ + /usr/include/boost/config/detail/posix_features.hpp \ + /usr/include/boost/config/detail/suffix.hpp \ + /usr/include/boost/config/helper_macros.hpp \ + /usr/include/boost/core/enable_if.hpp \ + /usr/include/boost/core/explicit_operator_bool.hpp \ + /usr/include/boost/config/workaround.hpp \ + /usr/include/boost/core/swap.hpp \ + /usr/include/c++/11/utility \ + /usr/include/c++/11/bits/stl_relops.h \ + /usr/include/boost/optional/bad_optional_access.hpp \ + /usr/include/boost/static_assert.hpp \ + /usr/include/boost/detail/workaround.hpp \ + /usr/include/boost/throw_exception.hpp \ + /usr/include/boost/assert/source_location.hpp \ + /usr/include/boost/current_function.hpp \ + /usr/include/boost/cstdint.hpp \ + /usr/include/boost/exception/exception.hpp \ + /usr/include/boost/type.hpp \ + /usr/include/boost/type_traits/alignment_of.hpp \ + /usr/include/boost/type_traits/intrinsics.hpp \ + /usr/include/boost/type_traits/detail/config.hpp \ + /usr/include/boost/version.hpp \ + /usr/include/boost/type_traits/integral_constant.hpp \ + /usr/include/boost/type_traits/conditional.hpp \ + /usr/include/boost/type_traits/has_nothrow_constructor.hpp \ + /usr/include/boost/type_traits/is_default_constructible.hpp \ + /usr/include/boost/type_traits/is_complete.hpp \ + /usr/include/boost/type_traits/declval.hpp \ + /usr/include/boost/type_traits/add_rvalue_reference.hpp \ + /usr/include/boost/type_traits/is_void.hpp \ + /usr/include/boost/type_traits/is_reference.hpp \ + /usr/include/boost/type_traits/is_lvalue_reference.hpp \ + /usr/include/boost/type_traits/is_rvalue_reference.hpp \ + /usr/include/boost/type_traits/remove_reference.hpp \ + /usr/include/boost/type_traits/is_function.hpp \ + /usr/include/boost/type_traits/detail/is_function_cxx_11.hpp \ + /usr/include/boost/type_traits/detail/yes_no_type.hpp \ + /usr/include/boost/type_traits/type_with_alignment.hpp \ + /usr/include/boost/type_traits/is_pod.hpp \ + /usr/include/boost/type_traits/is_scalar.hpp \ + /usr/include/boost/type_traits/is_arithmetic.hpp \ + /usr/include/boost/type_traits/is_integral.hpp \ + /usr/include/boost/type_traits/is_floating_point.hpp \ + /usr/include/boost/type_traits/is_enum.hpp \ + /usr/include/boost/type_traits/is_pointer.hpp \ + /usr/include/boost/type_traits/is_member_pointer.hpp \ + /usr/include/boost/type_traits/is_member_function_pointer.hpp \ + /usr/include/boost/type_traits/detail/is_member_function_pointer_cxx_11.hpp \ + /usr/include/boost/type_traits/remove_const.hpp \ + /usr/include/boost/type_traits/decay.hpp \ + /usr/include/boost/type_traits/is_array.hpp \ + /usr/include/boost/type_traits/remove_bounds.hpp \ + /usr/include/boost/type_traits/remove_extent.hpp \ + /usr/include/boost/type_traits/add_pointer.hpp \ + /usr/include/boost/type_traits/remove_cv.hpp \ + /usr/include/boost/type_traits/is_base_of.hpp \ + /usr/include/boost/type_traits/is_base_and_derived.hpp \ + /usr/include/boost/type_traits/is_same.hpp \ + /usr/include/boost/type_traits/is_class.hpp \ + /usr/include/boost/type_traits/is_const.hpp \ + /usr/include/boost/type_traits/is_constructible.hpp \ + /usr/include/boost/type_traits/is_destructible.hpp \ + /usr/include/boost/type_traits/is_nothrow_move_assignable.hpp \ + /usr/include/boost/type_traits/has_trivial_move_assign.hpp \ + /usr/include/boost/type_traits/is_assignable.hpp \ + /usr/include/boost/type_traits/is_volatile.hpp \ + /usr/include/boost/type_traits/has_nothrow_assign.hpp \ + /usr/include/boost/type_traits/enable_if.hpp \ + /usr/include/boost/type_traits/is_nothrow_move_constructible.hpp \ + /usr/include/boost/move/utility.hpp \ + /usr/include/boost/move/detail/config_begin.hpp \ + /usr/include/boost/move/detail/workaround.hpp \ + /usr/include/boost/move/utility_core.hpp \ + /usr/include/boost/move/core.hpp \ + /usr/include/boost/move/detail/config_end.hpp \ + /usr/include/boost/move/detail/meta_utils.hpp \ + /usr/include/boost/move/detail/meta_utils_core.hpp \ + /usr/include/boost/move/traits.hpp \ + /usr/include/boost/move/detail/type_traits.hpp \ + /usr/include/boost/none.hpp \ + /usr/include/boost/none_t.hpp \ + /usr/include/boost/utility/compare_pointees.hpp \ + /usr/include/c++/11/functional \ + /usr/include/c++/11/tuple \ + /usr/include/c++/11/array \ + /usr/include/c++/11/bits/uses_allocator.h \ + /usr/include/c++/11/bits/invoke.h \ + /usr/include/c++/11/bits/refwrap.h \ + /usr/include/c++/11/bits/std_function.h \ + /usr/include/boost/utility/result_of.hpp \ + /usr/include/boost/preprocessor/cat.hpp \ + /usr/include/boost/preprocessor/config/config.hpp \ + /usr/include/boost/preprocessor/iteration/iterate.hpp \ + /usr/include/boost/preprocessor/arithmetic/dec.hpp \ + /usr/include/boost/preprocessor/config/limits.hpp \ + /usr/include/boost/preprocessor/arithmetic/limits/dec_256.hpp \ + /usr/include/boost/preprocessor/arithmetic/inc.hpp \ + /usr/include/boost/preprocessor/arithmetic/limits/inc_256.hpp \ + /usr/include/boost/preprocessor/array/elem.hpp \ + /usr/include/boost/preprocessor/array/data.hpp \ + /usr/include/boost/preprocessor/tuple/elem.hpp \ + /usr/include/boost/preprocessor/facilities/expand.hpp \ + /usr/include/boost/preprocessor/facilities/overload.hpp \ + /usr/include/boost/preprocessor/variadic/size.hpp \ + /usr/include/boost/preprocessor/control/iif.hpp \ + /usr/include/boost/preprocessor/facilities/check_empty.hpp \ + /usr/include/boost/preprocessor/variadic/has_opt.hpp \ + /usr/include/boost/preprocessor/variadic/limits/size_64.hpp \ + /usr/include/boost/preprocessor/tuple/rem.hpp \ + /usr/include/boost/preprocessor/tuple/detail/is_single_return.hpp \ + /usr/include/boost/preprocessor/variadic/elem.hpp \ + /usr/include/boost/preprocessor/variadic/limits/elem_64.hpp \ + /usr/include/boost/preprocessor/array/size.hpp \ + /usr/include/boost/preprocessor/slot/slot.hpp \ + /usr/include/boost/preprocessor/slot/detail/def.hpp \ + /usr/include/boost/preprocessor/repetition/enum_params.hpp \ + /usr/include/boost/preprocessor/punctuation/comma_if.hpp \ + /usr/include/boost/preprocessor/control/if.hpp \ + /usr/include/boost/preprocessor/logical/bool.hpp \ + /usr/include/boost/preprocessor/logical/limits/bool_256.hpp \ + /usr/include/boost/preprocessor/facilities/empty.hpp \ + /usr/include/boost/preprocessor/punctuation/comma.hpp \ + /usr/include/boost/preprocessor/repetition/repeat.hpp \ + /usr/include/boost/preprocessor/debug/error.hpp \ + /usr/include/boost/preprocessor/detail/auto_rec.hpp \ + /usr/include/boost/preprocessor/detail/limits/auto_rec_256.hpp \ + /usr/include/boost/preprocessor/tuple/eat.hpp \ + /usr/include/boost/preprocessor/repetition/limits/repeat_256.hpp \ + /usr/include/boost/preprocessor/repetition/enum_trailing_params.hpp \ + /usr/include/boost/preprocessor/repetition/enum_binary_params.hpp \ + /usr/include/boost/preprocessor/repetition/enum_shifted_params.hpp \ + /usr/include/boost/preprocessor/facilities/intercept.hpp \ + /usr/include/boost/preprocessor/facilities/limits/intercept_256.hpp \ + /usr/include/boost/type_traits/type_identity.hpp \ + /usr/include/boost/preprocessor/iteration/detail/iter/forward1.hpp \ + /usr/include/boost/preprocessor/iteration/detail/bounds/lower1.hpp \ + /usr/include/boost/preprocessor/slot/detail/shared.hpp \ + /usr/include/boost/preprocessor/iteration/detail/bounds/upper1.hpp \ + /usr/include/boost/preprocessor/iteration/detail/iter/limits/forward1_256.hpp \ + /usr/include/boost/utility/detail/result_of_iterate.hpp \ + /usr/include/boost/optional/optional_fwd.hpp \ + /usr/include/boost/optional/detail/optional_config.hpp \ + /usr/include/boost/optional/detail/optional_factory_support.hpp \ + /usr/include/boost/optional/detail/optional_aligned_storage.hpp \ + /usr/include/boost/optional/detail/optional_trivially_copyable_base.hpp \ + /usr/include/boost/optional/detail/optional_reference_spec.hpp \ + /usr/include/boost/optional/detail/optional_relops.hpp \ + /usr/include/boost/optional/detail/optional_swap.hpp \ + /usr/include/c++/11/cassert \ + /usr/include/c++/11/memory \ + /usr/include/c++/11/bits/stl_uninitialized.h \ + /usr/include/c++/11/bits/stl_tempbuf.h \ + /usr/include/c++/11/bits/stl_raw_storage_iter.h \ + /usr/include/c++/11/bits/align.h \ + /usr/include/c++/11/bit \ + /usr/include/c++/11/bits/unique_ptr.h \ + /usr/include/c++/11/bits/shared_ptr.h \ + /usr/include/c++/11/bits/shared_ptr_base.h \ + /usr/include/c++/11/bits/allocated_ptr.h \ + /usr/include/c++/11/ext/aligned_buffer.h \ + /usr/include/c++/11/ext/concurrence.h \ + /usr/include/c++/11/bits/shared_ptr_atomic.h \ + /usr/include/c++/11/backward/auto_ptr.h \ + /usr/include/c++/11/vector \ + /usr/include/c++/11/bits/stl_vector.h \ + /usr/include/c++/11/bits/stl_bvector.h \ + /usr/include/c++/11/bits/vector.tcc \ + /usr/include/c++/11/map \ + /usr/include/c++/11/bits/stl_tree.h \ + /usr/include/c++/11/bits/stl_map.h \ + /usr/include/c++/11/bits/stl_multimap.h \ + /usr/include/c++/11/bits/erase_if.h \ + /usr/include/c++/11/algorithm \ + /usr/include/c++/11/bits/stl_algo.h \ + /usr/include/c++/11/bits/algorithmfwd.h \ + /usr/include/c++/11/bits/stl_heap.h \ + /usr/include/c++/11/bits/uniform_int_dist.h \ + include/LibLsp/lsp/method_type.h \ + include/LibLsp/lsp/general/InitializeParams.h \ + include/LibLsp/lsp/lsDocumentUri.h \ + include/LibLsp/lsp/lsAny.h \ + include/LibLsp/lsp/general/lsClientCapabilities.h \ + include/LibLsp/lsp/general/lsWorkspaceClientCapabilites.h \ + include/LibLsp/lsp/extention/jdtls/searchSymbols.h \ + include/LibLsp/JsonRpc/RequestInMessage.h \ + /usr/include/c++/11/mutex \ + /usr/include/c++/11/chrono \ + /usr/include/c++/11/ratio \ + /usr/include/c++/11/limits \ + /usr/include/c++/11/ctime \ + /usr/include/c++/11/bits/parse_numbers.h \ + /usr/include/c++/11/bits/std_mutex.h \ + /usr/include/c++/11/bits/unique_lock.h \ + include/LibLsp/JsonRpc/lsRequestId.h \ + include/LibLsp/JsonRpc/lsResponseMessage.h \ + include/LibLsp/lsp/extention/jdtls/WorkspaceSymbolParams.h \ + include/LibLsp/lsp/symbol.h \ + include/LibLsp/lsp/location_type.h \ + include/LibLsp/lsp/lsRange.h \ + include/LibLsp/lsp/lsPosition.h \ + include/LibLsp/lsp/general/lsTextDocumentClientCapabilities.h \ + include/LibLsp/lsp/lsp_completion.h \ + include/LibLsp/lsp/lsTextEdit.h \ + include/LibLsp/lsp/lsMarkedString.h \ + include/LibLsp/lsp/lsCommand.h \ + include/LibLsp/lsp/lsp_diagnostic.h \ + include/LibLsp/lsp/lsResponseError.h \ + /usr/include/c++/11/sstream \ + /usr/include/c++/11/bits/sstream.tcc \ + include/LibLsp/lsp/workspace/workspaceFolders.h \ + include/LibLsp/lsp/general/lsServerCapabilities.h \ + include/LibLsp/lsp/textDocument/SemanticTokens.h \ + include/LibLsp/lsp/lsTextDocumentIdentifier.h \ + include/LibLsp/lsp/lsVersionedTextDocumentIdentifier.h \ + include/LibLsp/JsonRpc/json.h \ + third_party/rapidjson/include/rapidjson/document.h \ + third_party/rapidjson/include/rapidjson/reader.h \ + third_party/rapidjson/include/rapidjson/allocators.h \ + third_party/rapidjson/include/rapidjson/rapidjson.h \ + /usr/include/c++/11/cstring \ + /usr/include/string.h \ + /usr/include/strings.h \ + /usr/include/inttypes.h \ + third_party/rapidjson/include/rapidjson/internal/meta.h \ + third_party/rapidjson/include/rapidjson/rapidjson.h \ + third_party/rapidjson/include/rapidjson/stream.h \ + third_party/rapidjson/include/rapidjson/encodings.h \ + third_party/rapidjson/include/rapidjson/encodedstream.h \ + third_party/rapidjson/include/rapidjson/memorystream.h \ + third_party/rapidjson/include/rapidjson/internal/clzll.h \ + third_party/rapidjson/include/rapidjson/internal/stack.h \ + third_party/rapidjson/include/rapidjson/allocators.h \ + third_party/rapidjson/include/rapidjson/internal/swap.h \ + third_party/rapidjson/include/rapidjson/internal/strtod.h \ + third_party/rapidjson/include/rapidjson/internal/ieee754.h \ + third_party/rapidjson/include/rapidjson/internal/biginteger.h \ + third_party/rapidjson/include/rapidjson/internal/diyfp.h \ + third_party/rapidjson/include/rapidjson/internal/clzll.h \ + third_party/rapidjson/include/rapidjson/internal/pow10.h \ + /usr/include/c++/11/climits \ + /usr/lib/gcc/x86_64-redhat-linux/11/include/limits.h \ + /usr/lib/gcc/x86_64-redhat-linux/11/include/syslimits.h \ + /usr/include/limits.h \ + /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h \ + /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h \ + /usr/include/bits/xopen_lim.h \ + /usr/include/bits/uio_lim.h \ + third_party/rapidjson/include/rapidjson/error/error.h \ + third_party/rapidjson/include/rapidjson/rapidjson.h \ + third_party/rapidjson/include/rapidjson/internal/strfunc.h \ + third_party/rapidjson/include/rapidjson/stream.h \ + third_party/rapidjson/include/rapidjson/rapidjson.h \ + /usr/include/c++/11/iterator \ + /usr/include/c++/11/bits/stream_iterator.h \ + third_party/rapidjson/include/rapidjson/prettywriter.h \ + third_party/rapidjson/include/rapidjson/writer.h \ + third_party/rapidjson/include/rapidjson/internal/dtoa.h \ + third_party/rapidjson/include/rapidjson/internal/itoa.h \ + third_party/rapidjson/include/rapidjson/internal/itoa.h \ + third_party/rapidjson/include/rapidjson/stringbuffer.h + +CMakeFiles/lspcpp.dir/src/lsp/lsp.cpp.o: src/lsp/lsp.cpp \ + /usr/include/stdc-predef.h \ + include/LibLsp/lsp/lru_cache.h \ + /usr/include/c++/11/algorithm \ + /usr/include/c++/11/utility \ + /usr/include/c++/11/x86_64-redhat-linux/bits/c++config.h \ + /usr/include/bits/wordsize.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/os_defines.h \ + /usr/include/features.h \ + /usr/include/sys/cdefs.h \ + /usr/include/bits/long-double.h \ + /usr/include/gnu/stubs.h \ + /usr/include/gnu/stubs-64.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/cpu_defines.h \ + /usr/include/c++/11/bits/stl_relops.h \ + /usr/include/c++/11/bits/stl_pair.h \ + /usr/include/c++/11/bits/move.h \ + /usr/include/c++/11/type_traits \ + /usr/include/c++/11/initializer_list \ + /usr/include/c++/11/bits/stl_algobase.h \ + /usr/include/c++/11/bits/functexcept.h \ + /usr/include/c++/11/bits/exception_defines.h \ + /usr/include/c++/11/bits/cpp_type_traits.h \ + /usr/include/c++/11/ext/type_traits.h \ + /usr/include/c++/11/ext/numeric_traits.h \ + /usr/include/c++/11/bits/stl_iterator_base_types.h \ + /usr/include/c++/11/bits/stl_iterator_base_funcs.h \ + /usr/include/c++/11/bits/concept_check.h \ + /usr/include/c++/11/debug/assertions.h \ + /usr/include/c++/11/bits/stl_iterator.h \ + /usr/include/c++/11/bits/ptr_traits.h \ + /usr/include/c++/11/debug/debug.h \ + /usr/include/c++/11/bits/predefined_ops.h \ + /usr/include/c++/11/bits/stl_algo.h \ + /usr/include/c++/11/cstdlib \ + /usr/include/stdlib.h \ + /usr/include/bits/libc-header-start.h \ + /usr/lib/gcc/x86_64-redhat-linux/11/include/stddef.h \ + /usr/include/bits/waitflags.h \ + /usr/include/bits/waitstatus.h \ + /usr/include/bits/floatn.h \ + /usr/include/bits/floatn-common.h \ + /usr/include/bits/types/locale_t.h \ + /usr/include/bits/types/__locale_t.h \ + /usr/include/sys/types.h \ + /usr/include/bits/types.h \ + /usr/include/bits/timesize.h \ + /usr/include/bits/typesizes.h \ + /usr/include/bits/time64.h \ + /usr/include/bits/types/clock_t.h \ + /usr/include/bits/types/clockid_t.h \ + /usr/include/bits/types/time_t.h \ + /usr/include/bits/types/timer_t.h \ + /usr/include/bits/stdint-intn.h \ + /usr/include/endian.h \ + /usr/include/bits/endian.h \ + /usr/include/bits/endianness.h \ + /usr/include/bits/byteswap.h \ + /usr/include/bits/uintn-identity.h \ + /usr/include/sys/select.h \ + /usr/include/bits/select.h \ + /usr/include/bits/types/sigset_t.h \ + /usr/include/bits/types/__sigset_t.h \ + /usr/include/bits/types/struct_timeval.h \ + /usr/include/bits/types/struct_timespec.h \ + /usr/include/bits/pthreadtypes.h \ + /usr/include/bits/thread-shared-types.h \ + /usr/include/bits/pthreadtypes-arch.h \ + /usr/include/bits/struct_mutex.h \ + /usr/include/bits/struct_rwlock.h \ + /usr/include/alloca.h \ + /usr/include/bits/stdlib-bsearch.h \ + /usr/include/bits/stdlib-float.h \ + /usr/include/c++/11/bits/std_abs.h \ + /usr/include/c++/11/bits/algorithmfwd.h \ + /usr/include/c++/11/bits/stl_heap.h \ + /usr/include/c++/11/bits/stl_tempbuf.h \ + /usr/include/c++/11/bits/stl_construct.h \ + /usr/include/c++/11/new \ + /usr/include/c++/11/bits/exception.h \ + /usr/include/c++/11/bits/uniform_int_dist.h \ + /usr/include/c++/11/cassert \ + /usr/include/assert.h \ + /usr/include/c++/11/limits \ + /usr/include/c++/11/memory \ + /usr/include/c++/11/bits/allocator.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/c++allocator.h \ + /usr/include/c++/11/ext/new_allocator.h \ + /usr/include/c++/11/bits/memoryfwd.h \ + /usr/include/c++/11/bits/stl_uninitialized.h \ + /usr/include/c++/11/ext/alloc_traits.h \ + /usr/include/c++/11/bits/alloc_traits.h \ + /usr/include/c++/11/bits/stl_raw_storage_iter.h \ + /usr/include/c++/11/bits/align.h \ + /usr/include/c++/11/bit \ + /usr/lib/gcc/x86_64-redhat-linux/11/include/stdint.h \ + /usr/include/stdint.h \ + /usr/include/bits/wchar.h \ + /usr/include/bits/stdint-uintn.h \ + /usr/include/c++/11/bits/uses_allocator.h \ + /usr/include/c++/11/bits/unique_ptr.h \ + /usr/include/c++/11/tuple \ + /usr/include/c++/11/array \ + /usr/include/c++/11/bits/range_access.h \ + /usr/include/c++/11/bits/invoke.h \ + /usr/include/c++/11/bits/stl_function.h \ + /usr/include/c++/11/backward/binders.h \ + /usr/include/c++/11/bits/functional_hash.h \ + /usr/include/c++/11/bits/hash_bytes.h \ + /usr/include/c++/11/bits/shared_ptr.h \ + /usr/include/c++/11/iosfwd \ + /usr/include/c++/11/bits/stringfwd.h \ + /usr/include/c++/11/bits/postypes.h \ + /usr/include/c++/11/cwchar \ + /usr/include/wchar.h \ + /usr/lib/gcc/x86_64-redhat-linux/11/include/stdarg.h \ + /usr/include/bits/types/wint_t.h \ + /usr/include/bits/types/mbstate_t.h \ + /usr/include/bits/types/__mbstate_t.h \ + /usr/include/bits/types/__FILE.h \ + /usr/include/bits/types/FILE.h \ + /usr/include/c++/11/bits/shared_ptr_base.h \ + /usr/include/c++/11/typeinfo \ + /usr/include/c++/11/bits/allocated_ptr.h \ + /usr/include/c++/11/bits/refwrap.h \ + /usr/include/c++/11/ext/aligned_buffer.h \ + /usr/include/c++/11/ext/atomicity.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/gthr.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/gthr-default.h \ + /usr/include/pthread.h \ + /usr/include/sched.h \ + /usr/include/bits/sched.h \ + /usr/include/bits/types/struct_sched_param.h \ + /usr/include/bits/cpu-set.h \ + /usr/include/time.h \ + /usr/include/bits/time.h \ + /usr/include/bits/timex.h \ + /usr/include/bits/types/struct_tm.h \ + /usr/include/bits/types/struct_itimerspec.h \ + /usr/include/bits/setjmp.h \ + /usr/include/bits/types/struct___jmp_buf_tag.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/atomic_word.h \ + /usr/include/sys/single_threaded.h \ + /usr/include/c++/11/ext/concurrence.h \ + /usr/include/c++/11/exception \ + /usr/include/c++/11/bits/exception_ptr.h \ + /usr/include/c++/11/bits/cxxabi_init_exception.h \ + /usr/include/c++/11/bits/nested_exception.h \ + /usr/include/c++/11/bits/shared_ptr_atomic.h \ + /usr/include/c++/11/bits/atomic_base.h \ + /usr/include/c++/11/bits/atomic_lockfree_defines.h \ + /usr/include/c++/11/backward/auto_ptr.h \ + /usr/include/c++/11/vector \ + /usr/include/c++/11/bits/stl_vector.h \ + /usr/include/c++/11/bits/stl_bvector.h \ + /usr/include/c++/11/bits/vector.tcc \ + third_party/rapidjson/include/rapidjson/writer.h \ + third_party/rapidjson/include/rapidjson/stream.h \ + third_party/rapidjson/include/rapidjson/rapidjson.h \ + /usr/include/c++/11/cstring \ + /usr/include/string.h \ + /usr/include/strings.h \ + /usr/include/inttypes.h \ + third_party/rapidjson/include/rapidjson/encodings.h \ + third_party/rapidjson/include/rapidjson/internal/clzll.h \ + third_party/rapidjson/include/rapidjson/rapidjson.h \ + third_party/rapidjson/include/rapidjson/internal/meta.h \ + third_party/rapidjson/include/rapidjson/internal/stack.h \ + third_party/rapidjson/include/rapidjson/allocators.h \ + third_party/rapidjson/include/rapidjson/rapidjson.h \ + third_party/rapidjson/include/rapidjson/internal/meta.h \ + third_party/rapidjson/include/rapidjson/internal/swap.h \ + /usr/include/c++/11/cstddef \ + third_party/rapidjson/include/rapidjson/internal/strfunc.h \ + third_party/rapidjson/include/rapidjson/stream.h \ + third_party/rapidjson/include/rapidjson/internal/dtoa.h \ + third_party/rapidjson/include/rapidjson/internal/itoa.h \ + third_party/rapidjson/include/rapidjson/internal/diyfp.h \ + third_party/rapidjson/include/rapidjson/internal/clzll.h \ + third_party/rapidjson/include/rapidjson/internal/ieee754.h \ + third_party/rapidjson/include/rapidjson/internal/itoa.h \ + third_party/rapidjson/include/rapidjson/stringbuffer.h \ + /usr/include/stdio.h \ + /usr/include/bits/types/__fpos_t.h \ + /usr/include/bits/types/__fpos64_t.h \ + /usr/include/bits/types/struct_FILE.h \ + /usr/include/bits/types/cookie_io_functions_t.h \ + /usr/include/bits/stdio_lim.h \ + /usr/include/bits/stdio.h \ + /usr/include/c++/11/iostream \ + /usr/include/c++/11/ostream \ + /usr/include/c++/11/ios \ + /usr/include/c++/11/bits/char_traits.h \ + /usr/include/c++/11/cstdint \ + /usr/include/c++/11/bits/localefwd.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/c++locale.h \ + /usr/include/c++/11/clocale \ + /usr/include/locale.h \ + /usr/include/bits/locale.h \ + /usr/include/c++/11/cctype \ + /usr/include/ctype.h \ + /usr/include/c++/11/bits/ios_base.h \ + /usr/include/c++/11/bits/locale_classes.h \ + /usr/include/c++/11/string \ + /usr/include/c++/11/bits/ostream_insert.h \ + /usr/include/c++/11/bits/cxxabi_forced.h \ + /usr/include/c++/11/bits/basic_string.h \ + /usr/include/c++/11/ext/string_conversions.h \ + /usr/include/c++/11/cstdio \ + /usr/include/c++/11/cerrno \ + /usr/include/errno.h \ + /usr/include/bits/errno.h \ + /usr/include/linux/errno.h \ + /usr/include/asm/errno.h \ + /usr/include/asm-generic/errno.h \ + /usr/include/asm-generic/errno-base.h \ + /usr/include/bits/types/error_t.h \ + /usr/include/c++/11/bits/charconv.h \ + /usr/include/c++/11/bits/basic_string.tcc \ + /usr/include/c++/11/bits/locale_classes.tcc \ + /usr/include/c++/11/system_error \ + /usr/include/c++/11/x86_64-redhat-linux/bits/error_constants.h \ + /usr/include/c++/11/stdexcept \ + /usr/include/c++/11/streambuf \ + /usr/include/c++/11/bits/streambuf.tcc \ + /usr/include/c++/11/bits/basic_ios.h \ + /usr/include/c++/11/bits/locale_facets.h \ + /usr/include/c++/11/cwctype \ + /usr/include/wctype.h \ + /usr/include/bits/wctype-wchar.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/ctype_base.h \ + /usr/include/c++/11/bits/streambuf_iterator.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/ctype_inline.h \ + /usr/include/c++/11/bits/locale_facets.tcc \ + /usr/include/c++/11/bits/basic_ios.tcc \ + /usr/include/c++/11/bits/ostream.tcc \ + /usr/include/c++/11/istream \ + /usr/include/c++/11/bits/istream.tcc \ + include/LibLsp/lsp/location_type.h \ + include/LibLsp/lsp/lsDocumentUri.h \ + include/LibLsp/JsonRpc/serializer.h \ + include/LibLsp/JsonRpc/macro_map.h \ + /usr/include/boost/optional.hpp \ + /usr/include/boost/optional/optional.hpp \ + /usr/include/boost/assert.hpp \ + /usr/include/boost/core/addressof.hpp \ + /usr/include/boost/config.hpp \ + /usr/include/boost/config/user.hpp \ + /usr/include/boost/config/detail/select_compiler_config.hpp \ + /usr/include/boost/config/compiler/gcc.hpp \ + /usr/include/boost/config/detail/select_stdlib_config.hpp \ + /usr/include/c++/11/version \ + /usr/include/boost/config/stdlib/libstdcpp3.hpp \ + /usr/include/unistd.h \ + /usr/include/bits/posix_opt.h \ + /usr/include/bits/environments.h \ + /usr/include/bits/confname.h \ + /usr/include/bits/getopt_posix.h \ + /usr/include/bits/getopt_core.h \ + /usr/include/bits/unistd_ext.h \ + /usr/include/boost/config/detail/select_platform_config.hpp \ + /usr/include/boost/config/platform/linux.hpp \ + /usr/include/boost/config/detail/posix_features.hpp \ + /usr/include/boost/config/detail/suffix.hpp \ + /usr/include/boost/config/helper_macros.hpp \ + /usr/include/boost/core/enable_if.hpp \ + /usr/include/boost/core/explicit_operator_bool.hpp \ + /usr/include/boost/config/workaround.hpp \ + /usr/include/boost/core/swap.hpp \ + /usr/include/boost/optional/bad_optional_access.hpp \ + /usr/include/boost/static_assert.hpp \ + /usr/include/boost/detail/workaround.hpp \ + /usr/include/boost/throw_exception.hpp \ + /usr/include/boost/assert/source_location.hpp \ + /usr/include/boost/current_function.hpp \ + /usr/include/boost/cstdint.hpp \ + /usr/include/boost/exception/exception.hpp \ + /usr/include/boost/type.hpp \ + /usr/include/boost/type_traits/alignment_of.hpp \ + /usr/include/boost/type_traits/intrinsics.hpp \ + /usr/include/boost/type_traits/detail/config.hpp \ + /usr/include/boost/version.hpp \ + /usr/include/boost/type_traits/integral_constant.hpp \ + /usr/include/boost/type_traits/conditional.hpp \ + /usr/include/boost/type_traits/has_nothrow_constructor.hpp \ + /usr/include/boost/type_traits/is_default_constructible.hpp \ + /usr/include/boost/type_traits/is_complete.hpp \ + /usr/include/boost/type_traits/declval.hpp \ + /usr/include/boost/type_traits/add_rvalue_reference.hpp \ + /usr/include/boost/type_traits/is_void.hpp \ + /usr/include/boost/type_traits/is_reference.hpp \ + /usr/include/boost/type_traits/is_lvalue_reference.hpp \ + /usr/include/boost/type_traits/is_rvalue_reference.hpp \ + /usr/include/boost/type_traits/remove_reference.hpp \ + /usr/include/boost/type_traits/is_function.hpp \ + /usr/include/boost/type_traits/detail/is_function_cxx_11.hpp \ + /usr/include/boost/type_traits/detail/yes_no_type.hpp \ + /usr/include/boost/type_traits/type_with_alignment.hpp \ + /usr/include/boost/type_traits/is_pod.hpp \ + /usr/include/boost/type_traits/is_scalar.hpp \ + /usr/include/boost/type_traits/is_arithmetic.hpp \ + /usr/include/boost/type_traits/is_integral.hpp \ + /usr/include/boost/type_traits/is_floating_point.hpp \ + /usr/include/boost/type_traits/is_enum.hpp \ + /usr/include/boost/type_traits/is_pointer.hpp \ + /usr/include/boost/type_traits/is_member_pointer.hpp \ + /usr/include/boost/type_traits/is_member_function_pointer.hpp \ + /usr/include/boost/type_traits/detail/is_member_function_pointer_cxx_11.hpp \ + /usr/include/boost/type_traits/remove_const.hpp \ + /usr/include/boost/type_traits/decay.hpp \ + /usr/include/boost/type_traits/is_array.hpp \ + /usr/include/boost/type_traits/remove_bounds.hpp \ + /usr/include/boost/type_traits/remove_extent.hpp \ + /usr/include/boost/type_traits/add_pointer.hpp \ + /usr/include/boost/type_traits/remove_cv.hpp \ + /usr/include/boost/type_traits/is_base_of.hpp \ + /usr/include/boost/type_traits/is_base_and_derived.hpp \ + /usr/include/boost/type_traits/is_same.hpp \ + /usr/include/boost/type_traits/is_class.hpp \ + /usr/include/boost/type_traits/is_const.hpp \ + /usr/include/boost/type_traits/is_constructible.hpp \ + /usr/include/boost/type_traits/is_destructible.hpp \ + /usr/include/boost/type_traits/is_nothrow_move_assignable.hpp \ + /usr/include/boost/type_traits/has_trivial_move_assign.hpp \ + /usr/include/boost/type_traits/is_assignable.hpp \ + /usr/include/boost/type_traits/is_volatile.hpp \ + /usr/include/boost/type_traits/has_nothrow_assign.hpp \ + /usr/include/boost/type_traits/enable_if.hpp \ + /usr/include/boost/type_traits/is_nothrow_move_constructible.hpp \ + /usr/include/boost/move/utility.hpp \ + /usr/include/boost/move/detail/config_begin.hpp \ + /usr/include/boost/move/detail/workaround.hpp \ + /usr/include/boost/move/utility_core.hpp \ + /usr/include/boost/move/core.hpp \ + /usr/include/boost/move/detail/config_end.hpp \ + /usr/include/boost/move/detail/meta_utils.hpp \ + /usr/include/boost/move/detail/meta_utils_core.hpp \ + /usr/include/boost/move/traits.hpp \ + /usr/include/boost/move/detail/type_traits.hpp \ + /usr/include/boost/none.hpp \ + /usr/include/boost/none_t.hpp \ + /usr/include/boost/utility/compare_pointees.hpp \ + /usr/include/c++/11/functional \ + /usr/include/c++/11/bits/std_function.h \ + /usr/include/boost/utility/result_of.hpp \ + /usr/include/boost/preprocessor/cat.hpp \ + /usr/include/boost/preprocessor/config/config.hpp \ + /usr/include/boost/preprocessor/iteration/iterate.hpp \ + /usr/include/boost/preprocessor/arithmetic/dec.hpp \ + /usr/include/boost/preprocessor/config/limits.hpp \ + /usr/include/boost/preprocessor/arithmetic/limits/dec_256.hpp \ + /usr/include/boost/preprocessor/arithmetic/inc.hpp \ + /usr/include/boost/preprocessor/arithmetic/limits/inc_256.hpp \ + /usr/include/boost/preprocessor/array/elem.hpp \ + /usr/include/boost/preprocessor/array/data.hpp \ + /usr/include/boost/preprocessor/tuple/elem.hpp \ + /usr/include/boost/preprocessor/facilities/expand.hpp \ + /usr/include/boost/preprocessor/facilities/overload.hpp \ + /usr/include/boost/preprocessor/variadic/size.hpp \ + /usr/include/boost/preprocessor/control/iif.hpp \ + /usr/include/boost/preprocessor/facilities/check_empty.hpp \ + /usr/include/boost/preprocessor/variadic/has_opt.hpp \ + /usr/include/boost/preprocessor/variadic/limits/size_64.hpp \ + /usr/include/boost/preprocessor/tuple/rem.hpp \ + /usr/include/boost/preprocessor/tuple/detail/is_single_return.hpp \ + /usr/include/boost/preprocessor/variadic/elem.hpp \ + /usr/include/boost/preprocessor/variadic/limits/elem_64.hpp \ + /usr/include/boost/preprocessor/array/size.hpp \ + /usr/include/boost/preprocessor/slot/slot.hpp \ + /usr/include/boost/preprocessor/slot/detail/def.hpp \ + /usr/include/boost/preprocessor/repetition/enum_params.hpp \ + /usr/include/boost/preprocessor/punctuation/comma_if.hpp \ + /usr/include/boost/preprocessor/control/if.hpp \ + /usr/include/boost/preprocessor/logical/bool.hpp \ + /usr/include/boost/preprocessor/logical/limits/bool_256.hpp \ + /usr/include/boost/preprocessor/facilities/empty.hpp \ + /usr/include/boost/preprocessor/punctuation/comma.hpp \ + /usr/include/boost/preprocessor/repetition/repeat.hpp \ + /usr/include/boost/preprocessor/debug/error.hpp \ + /usr/include/boost/preprocessor/detail/auto_rec.hpp \ + /usr/include/boost/preprocessor/detail/limits/auto_rec_256.hpp \ + /usr/include/boost/preprocessor/tuple/eat.hpp \ + /usr/include/boost/preprocessor/repetition/limits/repeat_256.hpp \ + /usr/include/boost/preprocessor/repetition/enum_trailing_params.hpp \ + /usr/include/boost/preprocessor/repetition/enum_binary_params.hpp \ + /usr/include/boost/preprocessor/repetition/enum_shifted_params.hpp \ + /usr/include/boost/preprocessor/facilities/intercept.hpp \ + /usr/include/boost/preprocessor/facilities/limits/intercept_256.hpp \ + /usr/include/boost/type_traits/type_identity.hpp \ + /usr/include/boost/preprocessor/iteration/detail/iter/forward1.hpp \ + /usr/include/boost/preprocessor/iteration/detail/bounds/lower1.hpp \ + /usr/include/boost/preprocessor/slot/detail/shared.hpp \ + /usr/include/boost/preprocessor/iteration/detail/bounds/upper1.hpp \ + /usr/include/boost/preprocessor/iteration/detail/iter/limits/forward1_256.hpp \ + /usr/include/boost/utility/detail/result_of_iterate.hpp \ + /usr/include/boost/optional/optional_fwd.hpp \ + /usr/include/boost/optional/detail/optional_config.hpp \ + /usr/include/boost/optional/detail/optional_factory_support.hpp \ + /usr/include/boost/optional/detail/optional_aligned_storage.hpp \ + /usr/include/boost/optional/detail/optional_trivially_copyable_base.hpp \ + /usr/include/boost/optional/detail/optional_reference_spec.hpp \ + /usr/include/boost/optional/detail/optional_relops.hpp \ + /usr/include/boost/optional/detail/optional_swap.hpp \ + /usr/include/c++/11/map \ + /usr/include/c++/11/bits/stl_tree.h \ + /usr/include/c++/11/bits/stl_map.h \ + /usr/include/c++/11/bits/stl_multimap.h \ + /usr/include/c++/11/bits/erase_if.h \ + include/LibLsp/lsp/lsRange.h \ + include/LibLsp/lsp/lsPosition.h \ + include/LibLsp/lsp/out_list.h \ + include/LibLsp/JsonRpc/RequestInMessage.h \ + /usr/include/c++/11/atomic \ + /usr/include/c++/11/mutex \ + /usr/include/c++/11/chrono \ + /usr/include/c++/11/ratio \ + /usr/include/c++/11/ctime \ + /usr/include/c++/11/bits/parse_numbers.h \ + /usr/include/c++/11/bits/std_mutex.h \ + /usr/include/c++/11/bits/unique_lock.h \ + include/LibLsp/JsonRpc/lsRequestId.h \ + include/LibLsp/JsonRpc/message.h \ + include/LibLsp/lsp/method_type.h \ + include/LibLsp/JsonRpc/lsResponseMessage.h \ + include/LibLsp/lsp/lsTextDocumentIdentifier.h \ + include/LibLsp/lsp/lsVersionedTextDocumentIdentifier.h \ + include/LibLsp/lsp/lsResponseError.h \ + /usr/include/c++/11/sstream \ + /usr/include/c++/11/bits/sstream.tcc \ + include/LibLsp/lsp/lsAny.h \ + include/LibLsp/lsp/lsTextEdit.h \ + include/LibLsp/lsp/lsMarkedString.h \ + include/LibLsp/lsp/lsWorkspaceEdit.h \ + include/LibLsp/lsp/lsTextDocumentEdit.h \ + include/LibLsp/lsp/ResourceOperation.h \ + include/LibLsp/lsp/textDocument/code_action.h \ + include/LibLsp/lsp/CodeActionParams.h \ + include/LibLsp/lsp/lsp_diagnostic.h \ + include/LibLsp/lsp/workspace/execute_command.h \ + include/LibLsp/lsp/ExecuteCommandParams.h \ + include/LibLsp/JsonRpc/NotificationInMessage.h \ + include/LibLsp/lsp/lsCodeAction.h \ + include/LibLsp/lsp/lsCommand.h \ + include/LibLsp/lsp/textDocument/document_symbol.h \ + include/LibLsp/lsp/symbol.h \ + include/LibLsp/lsp/extention/jdtls/codeActionResult.h \ + /usr/include/c++/11/set \ + /usr/include/c++/11/bits/stl_set.h \ + /usr/include/c++/11/bits/stl_multiset.h \ + include/LibLsp/lsp/textDocument/selectionRange.h \ + include/LibLsp/lsp/AbsolutePath.h \ + /usr/include/c++/11/climits \ + /usr/lib/gcc/x86_64-redhat-linux/11/include/limits.h \ + /usr/lib/gcc/x86_64-redhat-linux/11/include/syslimits.h \ + /usr/include/limits.h \ + /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h \ + /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h \ + /usr/include/bits/xopen_lim.h \ + /usr/include/bits/uio_lim.h \ + include/LibLsp/lsp/Directory.h \ + include/LibLsp/lsp/lsFormattingOptions.h \ + include/LibLsp/JsonRpc/json.h \ + third_party/rapidjson/include/rapidjson/document.h \ + third_party/rapidjson/include/rapidjson/reader.h \ + third_party/rapidjson/include/rapidjson/allocators.h \ + third_party/rapidjson/include/rapidjson/encodedstream.h \ + third_party/rapidjson/include/rapidjson/memorystream.h \ + third_party/rapidjson/include/rapidjson/internal/strtod.h \ + third_party/rapidjson/include/rapidjson/internal/biginteger.h \ + third_party/rapidjson/include/rapidjson/internal/pow10.h \ + third_party/rapidjson/include/rapidjson/error/error.h \ + third_party/rapidjson/include/rapidjson/rapidjson.h \ + /usr/include/c++/11/iterator \ + /usr/include/c++/11/bits/stream_iterator.h \ + third_party/rapidjson/include/rapidjson/prettywriter.h \ + third_party/rapidjson/include/rapidjson/writer.h \ + include/LibLsp/lsp/language/language.h \ + third_party/uri/include/network/uri/uri_builder.hpp \ + third_party/uri/include/network/uri/uri.hpp \ + third_party/uri/include/network/string_view.hpp \ + third_party/uri/include/network/optional.hpp \ + third_party/uri/include/network/uri/config.hpp \ + third_party/uri/include/network/uri/uri_errors.hpp \ + third_party/uri/include/network/uri/detail/uri_parts.hpp \ + third_party/uri/include/network/uri/detail/encode.hpp \ + third_party/uri/include/network/uri/detail/decode.hpp \ + third_party/uri/include/network/uri/detail/translate.hpp \ + include/LibLsp/lsp/lsp_completion.h \ + include/LibLsp/lsp/utils.h \ + /usr/include/c++/11/codecvt \ + /usr/include/c++/11/bits/codecvt.h \ + /usr/include/c++/11/locale \ + /usr/include/c++/11/bits/locale_facets_nonio.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/time_members.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/messages_members.h \ + /usr/include/libintl.h \ + /usr/include/c++/11/bits/locale_facets_nonio.tcc \ + /usr/include/c++/11/bits/locale_conv.h \ + include/LibLsp/lsp/client/registerCapability.h \ + /usr/include/boost/uuid/uuid.hpp \ + /usr/include/boost/uuid/detail/config.hpp \ + /usr/include/boost/uuid/detail/uuid_x86.ipp \ + /usr/lib/gcc/x86_64-redhat-linux/11/include/emmintrin.h \ + /usr/lib/gcc/x86_64-redhat-linux/11/include/xmmintrin.h \ + /usr/lib/gcc/x86_64-redhat-linux/11/include/mmintrin.h \ + /usr/lib/gcc/x86_64-redhat-linux/11/include/mm_malloc.h \ + /usr/include/c++/11/stdlib.h \ + /usr/include/boost/uuid/uuid_io.hpp \ + /usr/include/boost/io/ios_state.hpp \ + /usr/include/boost/io_fwd.hpp \ + /usr/include/boost/uuid/uuid_generators.hpp \ + /usr/include/boost/uuid/nil_generator.hpp \ + /usr/include/boost/uuid/string_generator.hpp \ + /usr/include/boost/uuid/name_generator.hpp \ + /usr/include/boost/uuid/name_generator_sha1.hpp \ + /usr/include/boost/uuid/basic_name_generator.hpp \ + /usr/include/boost/uuid/detail/sha1.hpp \ + /usr/include/boost/uuid/random_generator.hpp \ + /usr/include/boost/random/mersenne_twister.hpp \ + /usr/include/boost/integer/integer_mask.hpp \ + /usr/include/boost/integer_fwd.hpp \ + /usr/include/boost/limits.hpp \ + /usr/include/boost/integer.hpp \ + /usr/include/boost/integer_traits.hpp \ + /usr/include/boost/random/detail/config.hpp \ + /usr/include/boost/random/detail/ptr_helper.hpp \ + /usr/include/boost/random/detail/seed.hpp \ + /usr/include/boost/utility/enable_if.hpp \ + /usr/include/boost/random/detail/seed_impl.hpp \ + /usr/include/boost/config/no_tr1/cmath.hpp \ + /usr/include/c++/11/cmath \ + /usr/include/math.h \ + /usr/include/bits/math-vector.h \ + /usr/include/bits/libm-simd-decl-stubs.h \ + /usr/include/bits/flt-eval-method.h \ + /usr/include/bits/fp-logb.h \ + /usr/include/bits/fp-fast.h \ + /usr/include/bits/mathcalls-helper-functions.h \ + /usr/include/bits/mathcalls.h \ + /usr/include/bits/mathcalls-narrow.h \ + /usr/include/bits/iscanonical.h \ + /usr/include/boost/integer/static_log2.hpp \ + /usr/include/boost/random/traits.hpp \ + /usr/include/boost/type_traits/is_signed.hpp \ + /usr/include/boost/type_traits/make_unsigned.hpp \ + /usr/include/boost/type_traits/is_unsigned.hpp \ + /usr/include/boost/type_traits/add_const.hpp \ + /usr/include/boost/type_traits/add_volatile.hpp \ + /usr/include/boost/random/detail/const_mod.hpp \ + /usr/include/boost/random/detail/large_arithmetic.hpp \ + /usr/include/boost/random/detail/integer_log2.hpp \ + /usr/include/boost/integer/integer_log2.hpp \ + /usr/include/boost/random/detail/disable_warnings.hpp \ + /usr/include/boost/random/detail/enable_warnings.hpp \ + /usr/include/boost/random/detail/signed_unsigned_tools.hpp \ + /usr/include/boost/random/detail/generator_bits.hpp \ + /usr/include/boost/random/detail/generator_seed_seq.hpp \ + /usr/include/boost/random/detail/polynomial.hpp \ + /usr/include/boost/random/uniform_int.hpp \ + /usr/include/boost/random/uniform_int_distribution.hpp \ + /usr/include/boost/random/detail/operators.hpp \ + /usr/include/boost/random/detail/uniform_int_float.hpp \ + /usr/include/boost/random/variate_generator.hpp \ + /usr/include/boost/tti/has_member_function.hpp \ + /usr/include/boost/function_types/property_tags.hpp \ + /usr/include/boost/mpl/bitxor.hpp \ + /usr/include/boost/mpl/aux_/arithmetic_op.hpp \ + /usr/include/boost/mpl/integral_c.hpp \ + /usr/include/boost/mpl/integral_c_fwd.hpp \ + /usr/include/boost/mpl/aux_/config/workaround.hpp \ + /usr/include/boost/mpl/aux_/adl_barrier.hpp \ + /usr/include/boost/mpl/aux_/config/adl.hpp \ + /usr/include/boost/mpl/aux_/config/msvc.hpp \ + /usr/include/boost/mpl/aux_/config/intel.hpp \ + /usr/include/boost/mpl/aux_/config/gcc.hpp \ + /usr/include/boost/mpl/aux_/config/ctps.hpp \ + /usr/include/boost/mpl/aux_/config/static_constant.hpp \ + /usr/include/boost/mpl/aux_/integral_wrapper.hpp \ + /usr/include/boost/mpl/integral_c_tag.hpp \ + /usr/include/boost/mpl/aux_/static_cast.hpp \ + /usr/include/boost/mpl/aux_/nttp_decl.hpp \ + /usr/include/boost/mpl/aux_/config/nttp.hpp \ + /usr/include/boost/mpl/aux_/largest_int.hpp \ + /usr/include/boost/mpl/if.hpp \ + /usr/include/boost/mpl/aux_/value_wknd.hpp \ + /usr/include/boost/mpl/aux_/config/integral.hpp \ + /usr/include/boost/mpl/aux_/config/eti.hpp \ + /usr/include/boost/mpl/aux_/na_spec.hpp \ + /usr/include/boost/mpl/lambda_fwd.hpp \ + /usr/include/boost/mpl/void_fwd.hpp \ + /usr/include/boost/mpl/aux_/na.hpp \ + /usr/include/boost/mpl/bool.hpp \ + /usr/include/boost/mpl/bool_fwd.hpp \ + /usr/include/boost/mpl/aux_/na_fwd.hpp \ + /usr/include/boost/mpl/aux_/config/lambda.hpp \ + /usr/include/boost/mpl/aux_/config/ttp.hpp \ + /usr/include/boost/mpl/int.hpp \ + /usr/include/boost/mpl/int_fwd.hpp \ + /usr/include/boost/mpl/aux_/lambda_arity_param.hpp \ + /usr/include/boost/mpl/aux_/template_arity_fwd.hpp \ + /usr/include/boost/mpl/aux_/arity.hpp \ + /usr/include/boost/mpl/aux_/config/dtp.hpp \ + /usr/include/boost/mpl/aux_/preprocessor/params.hpp \ + /usr/include/boost/mpl/aux_/config/preprocessor.hpp \ + /usr/include/boost/preprocessor/comma_if.hpp \ + /usr/include/boost/preprocessor/repeat.hpp \ + /usr/include/boost/preprocessor/inc.hpp \ + /usr/include/boost/mpl/aux_/preprocessor/enum.hpp \ + /usr/include/boost/mpl/aux_/preprocessor/def_params_tail.hpp \ + /usr/include/boost/mpl/limits/arity.hpp \ + /usr/include/boost/preprocessor/logical/and.hpp \ + /usr/include/boost/preprocessor/logical/bitand.hpp \ + /usr/include/boost/preprocessor/identity.hpp \ + /usr/include/boost/preprocessor/facilities/identity.hpp \ + /usr/include/boost/preprocessor/empty.hpp \ + /usr/include/boost/preprocessor/arithmetic/add.hpp \ + /usr/include/boost/preprocessor/control/while.hpp \ + /usr/include/boost/preprocessor/list/fold_left.hpp \ + /usr/include/boost/preprocessor/list/detail/fold_left.hpp \ + /usr/include/boost/preprocessor/control/expr_iif.hpp \ + /usr/include/boost/preprocessor/list/adt.hpp \ + /usr/include/boost/preprocessor/detail/is_binary.hpp \ + /usr/include/boost/preprocessor/detail/check.hpp \ + /usr/include/boost/preprocessor/logical/compl.hpp \ + /usr/include/boost/preprocessor/list/detail/limits/fold_left_256.hpp \ + /usr/include/boost/preprocessor/list/limits/fold_left_256.hpp \ + /usr/include/boost/preprocessor/list/fold_right.hpp \ + /usr/include/boost/preprocessor/list/detail/fold_right.hpp \ + /usr/include/boost/preprocessor/list/reverse.hpp \ + /usr/include/boost/preprocessor/list/detail/limits/fold_right_256.hpp \ + /usr/include/boost/preprocessor/control/detail/while.hpp \ + /usr/include/boost/preprocessor/control/detail/limits/while_256.hpp \ + /usr/include/boost/preprocessor/control/limits/while_256.hpp \ + /usr/include/boost/preprocessor/logical/bitor.hpp \ + /usr/include/boost/preprocessor/arithmetic/detail/is_maximum_number.hpp \ + /usr/include/boost/preprocessor/comparison/equal.hpp \ + /usr/include/boost/preprocessor/comparison/not_equal.hpp \ + /usr/include/boost/preprocessor/comparison/limits/not_equal_256.hpp \ + /usr/include/boost/preprocessor/arithmetic/detail/maximum_number.hpp \ + /usr/include/boost/preprocessor/arithmetic/detail/is_minimum_number.hpp \ + /usr/include/boost/preprocessor/logical/not.hpp \ + /usr/include/boost/preprocessor/arithmetic/sub.hpp \ + /usr/include/boost/mpl/aux_/config/overload_resolution.hpp \ + /usr/include/boost/mpl/aux_/lambda_support.hpp \ + /usr/include/boost/mpl/aux_/numeric_op.hpp \ + /usr/include/boost/mpl/numeric_cast.hpp \ + /usr/include/boost/mpl/apply_wrap.hpp \ + /usr/include/boost/mpl/aux_/has_apply.hpp \ + /usr/include/boost/mpl/has_xxx.hpp \ + /usr/include/boost/mpl/aux_/type_wrapper.hpp \ + /usr/include/boost/mpl/aux_/yes_no.hpp \ + /usr/include/boost/mpl/aux_/config/arrays.hpp \ + /usr/include/boost/mpl/aux_/config/has_xxx.hpp \ + /usr/include/boost/mpl/aux_/config/msvc_typename.hpp \ + /usr/include/boost/mpl/aux_/config/has_apply.hpp \ + /usr/include/boost/mpl/aux_/msvc_never_true.hpp \ + /usr/include/boost/mpl/aux_/config/use_preprocessed.hpp \ + /usr/include/boost/mpl/aux_/include_preprocessed.hpp \ + /usr/include/boost/mpl/aux_/config/compiler.hpp \ + /usr/include/boost/preprocessor/stringize.hpp \ + /usr/include/boost/mpl/aux_/preprocessed/gcc/apply_wrap.hpp \ + /usr/include/boost/mpl/tag.hpp \ + /usr/include/boost/mpl/eval_if.hpp \ + /usr/include/boost/mpl/void.hpp \ + /usr/include/boost/mpl/aux_/has_tag.hpp \ + /usr/include/boost/mpl/aux_/numeric_cast_utils.hpp \ + /usr/include/boost/mpl/aux_/config/forwarding.hpp \ + /usr/include/boost/mpl/aux_/msvc_eti_base.hpp \ + /usr/include/boost/mpl/aux_/is_msvc_eti_arg.hpp \ + /usr/include/boost/mpl/aux_/preprocessed/gcc/bitxor.hpp \ + /usr/include/boost/function_types/detail/pp_tags/preprocessed.hpp \ + /usr/include/boost/function_types/detail/pp_loop.hpp \ + /usr/include/boost/preprocessor/punctuation/paren.hpp \ + /usr/include/boost/function_types/detail/encoding/def.hpp \ + /usr/include/boost/function_types/detail/encoding/aliases_def.hpp \ + /usr/include/boost/function_types/detail/pp_cc_loop/preprocessed.hpp \ + /usr/include/boost/function_types/detail/pp_tags/cc_tag.hpp \ + /usr/include/boost/function_types/detail/encoding/aliases_undef.hpp \ + /usr/include/boost/function_types/detail/encoding/undef.hpp \ + /usr/include/boost/mpl/vector.hpp \ + /usr/include/boost/mpl/limits/vector.hpp \ + /usr/include/boost/mpl/vector/vector20.hpp \ + /usr/include/boost/mpl/vector/vector10.hpp \ + /usr/include/boost/mpl/vector/vector0.hpp \ + /usr/include/boost/mpl/vector/aux_/at.hpp \ + /usr/include/boost/mpl/at_fwd.hpp \ + /usr/include/boost/mpl/vector/aux_/tag.hpp \ + /usr/include/boost/mpl/aux_/config/typeof.hpp \ + /usr/include/boost/mpl/long.hpp \ + /usr/include/boost/mpl/long_fwd.hpp \ + /usr/include/boost/mpl/vector/aux_/front.hpp \ + /usr/include/boost/mpl/front_fwd.hpp \ + /usr/include/boost/mpl/vector/aux_/push_front.hpp \ + /usr/include/boost/mpl/push_front_fwd.hpp \ + /usr/include/boost/mpl/vector/aux_/item.hpp \ + /usr/include/boost/mpl/next_prior.hpp \ + /usr/include/boost/mpl/aux_/common_name_wknd.hpp \ + /usr/include/boost/mpl/vector/aux_/pop_front.hpp \ + /usr/include/boost/mpl/pop_front_fwd.hpp \ + /usr/include/boost/mpl/vector/aux_/push_back.hpp \ + /usr/include/boost/mpl/push_back_fwd.hpp \ + /usr/include/boost/mpl/vector/aux_/pop_back.hpp \ + /usr/include/boost/mpl/pop_back_fwd.hpp \ + /usr/include/boost/mpl/vector/aux_/back.hpp \ + /usr/include/boost/mpl/back_fwd.hpp \ + /usr/include/boost/mpl/vector/aux_/clear.hpp \ + /usr/include/boost/mpl/clear_fwd.hpp \ + /usr/include/boost/mpl/vector/aux_/vector0.hpp \ + /usr/include/boost/mpl/vector/aux_/iterator.hpp \ + /usr/include/boost/mpl/iterator_tags.hpp \ + /usr/include/boost/mpl/plus.hpp \ + /usr/include/boost/mpl/aux_/preprocessed/gcc/plus.hpp \ + /usr/include/boost/mpl/minus.hpp \ + /usr/include/boost/mpl/aux_/preprocessed/gcc/minus.hpp \ + /usr/include/boost/mpl/advance_fwd.hpp \ + /usr/include/boost/mpl/distance_fwd.hpp \ + /usr/include/boost/mpl/next.hpp \ + /usr/include/boost/mpl/prior.hpp \ + /usr/include/boost/mpl/vector/aux_/O1_size.hpp \ + /usr/include/boost/mpl/O1_size_fwd.hpp \ + /usr/include/boost/mpl/vector/aux_/size.hpp \ + /usr/include/boost/mpl/size_fwd.hpp \ + /usr/include/boost/mpl/vector/aux_/empty.hpp \ + /usr/include/boost/mpl/empty_fwd.hpp \ + /usr/include/boost/mpl/vector/aux_/begin_end.hpp \ + /usr/include/boost/mpl/begin_end_fwd.hpp \ + /usr/include/boost/mpl/vector/aux_/include_preprocessed.hpp \ + /usr/include/boost/mpl/vector/aux_/preprocessed/typeof_based/vector10.hpp \ + /usr/include/boost/mpl/vector/aux_/preprocessed/typeof_based/vector20.hpp \ + /usr/include/boost/mpl/aux_/preprocessed/gcc/vector.hpp \ + /usr/include/boost/tti/detail/ddeftype.hpp \ + /usr/include/boost/tti/detail/dmem_fun.hpp \ + /usr/include/boost/function_types/is_member_function_pointer.hpp \ + /usr/include/boost/function_types/components.hpp \ + /usr/include/boost/mpl/remove.hpp \ + /usr/include/boost/mpl/remove_if.hpp \ + /usr/include/boost/mpl/fold.hpp \ + /usr/include/boost/mpl/begin_end.hpp \ + /usr/include/boost/mpl/aux_/begin_end_impl.hpp \ + /usr/include/boost/mpl/sequence_tag_fwd.hpp \ + /usr/include/boost/mpl/aux_/has_begin.hpp \ + /usr/include/boost/mpl/aux_/traits_lambda_spec.hpp \ + /usr/include/boost/mpl/sequence_tag.hpp \ + /usr/include/boost/mpl/O1_size.hpp \ + /usr/include/boost/mpl/aux_/O1_size_impl.hpp \ + /usr/include/boost/mpl/aux_/has_size.hpp \ + /usr/include/boost/mpl/aux_/fold_impl.hpp \ + /usr/include/boost/mpl/apply.hpp \ + /usr/include/boost/mpl/apply_fwd.hpp \ + /usr/include/boost/mpl/aux_/preprocessed/gcc/apply_fwd.hpp \ + /usr/include/boost/mpl/placeholders.hpp \ + /usr/include/boost/mpl/arg.hpp \ + /usr/include/boost/mpl/arg_fwd.hpp \ + /usr/include/boost/mpl/aux_/na_assert.hpp \ + /usr/include/boost/mpl/assert.hpp \ + /usr/include/boost/mpl/not.hpp \ + /usr/include/boost/mpl/aux_/nested_type_wknd.hpp \ + /usr/include/boost/mpl/aux_/config/gpu.hpp \ + /usr/include/boost/mpl/aux_/config/pp_counter.hpp \ + /usr/include/boost/mpl/aux_/arity_spec.hpp \ + /usr/include/boost/mpl/aux_/arg_typedef.hpp \ + /usr/include/boost/mpl/aux_/preprocessed/gcc/arg.hpp \ + /usr/include/boost/mpl/aux_/preprocessed/gcc/placeholders.hpp \ + /usr/include/boost/mpl/lambda.hpp \ + /usr/include/boost/mpl/bind.hpp \ + /usr/include/boost/mpl/bind_fwd.hpp \ + /usr/include/boost/mpl/aux_/config/bind.hpp \ + /usr/include/boost/mpl/aux_/preprocessed/gcc/bind_fwd.hpp \ + /usr/include/boost/mpl/protect.hpp \ + /usr/include/boost/mpl/aux_/preprocessed/gcc/bind.hpp \ + /usr/include/boost/mpl/aux_/full_lambda.hpp \ + /usr/include/boost/mpl/quote.hpp \ + /usr/include/boost/mpl/aux_/has_type.hpp \ + /usr/include/boost/mpl/aux_/config/bcc.hpp \ + /usr/include/boost/mpl/aux_/preprocessed/gcc/quote.hpp \ + /usr/include/boost/mpl/aux_/template_arity.hpp \ + /usr/include/boost/mpl/aux_/preprocessed/gcc/template_arity.hpp \ + /usr/include/boost/mpl/aux_/preprocessed/gcc/full_lambda.hpp \ + /usr/include/boost/mpl/aux_/preprocessed/gcc/apply.hpp \ + /usr/include/boost/mpl/deref.hpp \ + /usr/include/boost/mpl/aux_/msvc_type.hpp \ + /usr/include/boost/mpl/aux_/preprocessed/gcc/fold_impl.hpp \ + /usr/include/boost/mpl/reverse_fold.hpp \ + /usr/include/boost/mpl/aux_/reverse_fold_impl.hpp \ + /usr/include/boost/mpl/aux_/preprocessed/gcc/reverse_fold_impl.hpp \ + /usr/include/boost/mpl/identity.hpp \ + /usr/include/boost/mpl/aux_/inserter_algorithm.hpp \ + /usr/include/boost/mpl/back_inserter.hpp \ + /usr/include/boost/mpl/push_back.hpp \ + /usr/include/boost/mpl/aux_/push_back_impl.hpp \ + /usr/include/boost/mpl/inserter.hpp \ + /usr/include/boost/mpl/front_inserter.hpp \ + /usr/include/boost/mpl/push_front.hpp \ + /usr/include/boost/mpl/aux_/push_front_impl.hpp \ + /usr/include/boost/mpl/clear.hpp \ + /usr/include/boost/mpl/aux_/clear_impl.hpp \ + /usr/include/boost/mpl/aux_/preprocessor/default_params.hpp \ + /usr/include/boost/mpl/same_as.hpp \ + /usr/include/boost/mpl/aux_/lambda_spec.hpp \ + /usr/include/boost/function_types/config/config.hpp \ + /usr/include/boost/function_types/config/compiler.hpp \ + /usr/include/boost/function_types/config/cc_names.hpp \ + /usr/include/boost/mpl/vector/vector30.hpp \ + /usr/include/boost/mpl/vector/aux_/preprocessed/typeof_based/vector30.hpp \ + /usr/include/boost/function_types/detail/class_transform.hpp \ + /usr/include/boost/mpl/always.hpp \ + /usr/include/boost/type_traits/add_reference.hpp \ + /usr/include/boost/function_types/detail/pp_variate_loop/preprocessed.hpp \ + /usr/include/boost/function_types/detail/pp_arity_loop.hpp \ + /usr/include/boost/function_types/detail/components_impl/arity20_0.hpp \ + /usr/include/boost/function_types/detail/components_impl/arity10_0.hpp \ + /usr/include/boost/function_types/detail/components_impl/arity20_1.hpp \ + /usr/include/boost/function_types/detail/components_impl/arity10_1.hpp \ + /usr/include/boost/function_types/detail/components_as_mpl_sequence.hpp \ + /usr/include/boost/function_types/detail/retag_default_cc.hpp \ + /usr/include/boost/mpl/bitand.hpp \ + /usr/include/boost/mpl/aux_/preprocessed/gcc/bitand.hpp \ + /usr/include/boost/function_types/detail/pp_retag_default_cc/preprocessed.hpp \ + /usr/include/boost/mpl/and.hpp \ + /usr/include/boost/mpl/aux_/preprocessed/gcc/and.hpp \ + /usr/include/boost/mpl/logical.hpp \ + /usr/include/boost/mpl/or.hpp \ + /usr/include/boost/mpl/aux_/preprocessed/gcc/or.hpp \ + /usr/include/boost/tti/detail/dcomp_mem_fun.hpp \ + /usr/include/boost/tti/detail/dftclass.hpp \ + /usr/include/boost/function_types/parameter_types.hpp \ + /usr/include/boost/blank.hpp \ + /usr/include/boost/blank_fwd.hpp \ + /usr/include/boost/detail/templated_streams.hpp \ + /usr/include/boost/type_traits/is_empty.hpp \ + /usr/include/boost/type_traits/is_convertible.hpp \ + /usr/include/boost/type_traits/is_abstract.hpp \ + /usr/include/boost/type_traits/add_lvalue_reference.hpp \ + /usr/include/boost/type_traits/is_stateless.hpp \ + /usr/include/boost/type_traits/has_trivial_constructor.hpp \ + /usr/include/boost/type_traits/has_trivial_copy.hpp \ + /usr/include/boost/type_traits/is_copy_constructible.hpp \ + /usr/include/boost/type_traits/has_trivial_destructor.hpp \ + /usr/include/boost/mpl/pop_front.hpp \ + /usr/include/boost/mpl/aux_/pop_front_impl.hpp \ + /usr/include/boost/function_types/is_callable_builtin.hpp \ + /usr/include/boost/mpl/at.hpp \ + /usr/include/boost/mpl/aux_/at_impl.hpp \ + /usr/include/boost/mpl/advance.hpp \ + /usr/include/boost/mpl/less.hpp \ + /usr/include/boost/mpl/aux_/comparison_op.hpp \ + /usr/include/boost/mpl/aux_/preprocessed/gcc/less.hpp \ + /usr/include/boost/mpl/negate.hpp \ + /usr/include/boost/mpl/aux_/advance_forward.hpp \ + /usr/include/boost/mpl/aux_/preprocessed/gcc/advance_forward.hpp \ + /usr/include/boost/mpl/aux_/advance_backward.hpp \ + /usr/include/boost/mpl/aux_/preprocessed/gcc/advance_backward.hpp \ + /usr/include/boost/tti/detail/dmacro_sunfix.hpp \ + /usr/include/boost/tti/detail/dnullptr.hpp \ + /usr/include/boost/tti/gen/namespace_gen.hpp \ + /usr/include/boost/tti/detail/denclosing_type.hpp \ + /usr/include/boost/type_traits/is_union.hpp \ + /usr/include/boost/tti/detail/dptmf.hpp \ + /usr/include/boost/function_types/member_function_pointer.hpp \ + /usr/include/boost/function_types/detail/synthesize.hpp \ + /usr/include/boost/mpl/size.hpp \ + /usr/include/boost/mpl/aux_/size_impl.hpp \ + /usr/include/boost/mpl/distance.hpp \ + /usr/include/boost/mpl/iter_fold.hpp \ + /usr/include/boost/mpl/aux_/iter_fold_impl.hpp \ + /usr/include/boost/mpl/aux_/preprocessed/gcc/iter_fold_impl.hpp \ + /usr/include/boost/mpl/iterator_range.hpp \ + /usr/include/boost/function_types/detail/cv_traits.hpp \ + /usr/include/boost/function_types/detail/synthesize_impl/arity20_0.hpp \ + /usr/include/boost/function_types/detail/synthesize_impl/arity10_0.hpp \ + /usr/include/boost/function_types/detail/synthesize_impl/arity20_1.hpp \ + /usr/include/boost/function_types/detail/synthesize_impl/arity10_1.hpp \ + /usr/include/boost/function_types/detail/to_sequence.hpp \ + /usr/include/boost/mpl/is_sequence.hpp \ + /usr/include/boost/tti/gen/has_member_function_gen.hpp \ + /usr/include/boost/uuid/detail/random_provider.hpp \ + /usr/include/boost/uuid/entropy_error.hpp \ + /usr/include/boost/uuid/detail/random_provider_detect_platform.hpp \ + /usr/include/boost/predef/library/c/cloudabi.h \ + /usr/include/boost/predef/version_number.h \ + /usr/include/boost/predef/make.h \ + /usr/include/boost/predef/detail/test.h \ + /usr/include/boost/predef/library/c/_prefix.h \ + /usr/include/boost/predef/detail/_cassert.h \ + /usr/include/boost/predef/library/c/gnu.h \ + /usr/include/boost/predef/os/bsd/open.h \ + /usr/include/boost/predef/os/bsd.h \ + /usr/include/boost/predef/os/macos.h \ + /usr/include/boost/predef/os/ios.h \ + /usr/include/boost/predef/os/bsd/bsdi.h \ + /usr/include/boost/predef/os/bsd/dragonfly.h \ + /usr/include/boost/predef/os/bsd/free.h \ + /usr/include/boost/predef/os/bsd/net.h \ + /usr/include/boost/predef/os/windows.h \ + /usr/include/sys/syscall.h \ + /usr/include/asm/unistd.h \ + /usr/include/asm/unistd_64.h \ + /usr/include/bits/syscall.h \ + /usr/include/boost/uuid/detail/random_provider_include_platform.hpp \ + /usr/include/boost/uuid/detail/random_provider_getrandom.ipp \ + /usr/include/sys/random.h + +CMakeFiles/lspcpp.dir/src/lsp/lsp_diagnostic.cpp.o: src/lsp/lsp_diagnostic.cpp \ + /usr/include/stdc-predef.h \ + include/LibLsp/lsp/lsp_diagnostic.h \ + include/LibLsp/lsp/lsRange.h \ + include/LibLsp/JsonRpc/serializer.h \ + include/LibLsp/JsonRpc/macro_map.h \ + /usr/include/boost/optional.hpp \ + /usr/include/boost/optional/optional.hpp \ + /usr/include/c++/11/new \ + /usr/include/c++/11/x86_64-redhat-linux/bits/c++config.h \ + /usr/include/bits/wordsize.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/os_defines.h \ + /usr/include/features.h \ + /usr/include/sys/cdefs.h \ + /usr/include/bits/long-double.h \ + /usr/include/gnu/stubs.h \ + /usr/include/gnu/stubs-64.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/cpu_defines.h \ + /usr/include/c++/11/bits/exception.h \ + /usr/include/c++/11/iosfwd \ + /usr/include/c++/11/bits/stringfwd.h \ + /usr/include/c++/11/bits/memoryfwd.h \ + /usr/include/c++/11/bits/postypes.h \ + /usr/include/c++/11/cwchar \ + /usr/include/wchar.h \ + /usr/include/bits/libc-header-start.h \ + /usr/include/bits/floatn.h \ + /usr/include/bits/floatn-common.h \ + /usr/lib/gcc/x86_64-redhat-linux/11/include/stddef.h \ + /usr/lib/gcc/x86_64-redhat-linux/11/include/stdarg.h \ + /usr/include/bits/wchar.h \ + /usr/include/bits/types/wint_t.h \ + /usr/include/bits/types/mbstate_t.h \ + /usr/include/bits/types/__mbstate_t.h \ + /usr/include/bits/types/__FILE.h \ + /usr/include/bits/types/FILE.h \ + /usr/include/bits/types/locale_t.h \ + /usr/include/bits/types/__locale_t.h \ + /usr/include/boost/assert.hpp \ + /usr/include/assert.h \ + /usr/include/boost/core/addressof.hpp \ + /usr/include/boost/config.hpp \ + /usr/include/boost/config/user.hpp \ + /usr/include/boost/config/detail/select_compiler_config.hpp \ + /usr/include/boost/config/compiler/gcc.hpp \ + /usr/include/c++/11/cstddef \ + /usr/include/boost/config/detail/select_stdlib_config.hpp \ + /usr/include/c++/11/version \ + /usr/include/boost/config/stdlib/libstdcpp3.hpp \ + /usr/include/unistd.h \ + /usr/include/bits/posix_opt.h \ + /usr/include/bits/environments.h \ + /usr/include/bits/types.h \ + /usr/include/bits/timesize.h \ + /usr/include/bits/typesizes.h \ + /usr/include/bits/time64.h \ + /usr/include/bits/confname.h \ + /usr/include/bits/getopt_posix.h \ + /usr/include/bits/getopt_core.h \ + /usr/include/bits/unistd_ext.h \ + /usr/include/boost/config/detail/select_platform_config.hpp \ + /usr/include/boost/config/platform/linux.hpp \ + /usr/include/c++/11/cstdlib \ + /usr/include/stdlib.h \ + /usr/include/bits/waitflags.h \ + /usr/include/bits/waitstatus.h \ + /usr/include/sys/types.h \ + /usr/include/bits/types/clock_t.h \ + /usr/include/bits/types/clockid_t.h \ + /usr/include/bits/types/time_t.h \ + /usr/include/bits/types/timer_t.h \ + /usr/include/bits/stdint-intn.h \ + /usr/include/endian.h \ + /usr/include/bits/endian.h \ + /usr/include/bits/endianness.h \ + /usr/include/bits/byteswap.h \ + /usr/include/bits/uintn-identity.h \ + /usr/include/sys/select.h \ + /usr/include/bits/select.h \ + /usr/include/bits/types/sigset_t.h \ + /usr/include/bits/types/__sigset_t.h \ + /usr/include/bits/types/struct_timeval.h \ + /usr/include/bits/types/struct_timespec.h \ + /usr/include/bits/pthreadtypes.h \ + /usr/include/bits/thread-shared-types.h \ + /usr/include/bits/pthreadtypes-arch.h \ + /usr/include/bits/struct_mutex.h \ + /usr/include/bits/struct_rwlock.h \ + /usr/include/alloca.h \ + /usr/include/bits/stdlib-bsearch.h \ + /usr/include/bits/stdlib-float.h \ + /usr/include/c++/11/bits/std_abs.h \ + /usr/include/boost/config/detail/posix_features.hpp \ + /usr/include/boost/config/detail/suffix.hpp \ + /usr/include/boost/config/helper_macros.hpp \ + /usr/include/boost/core/enable_if.hpp \ + /usr/include/boost/core/explicit_operator_bool.hpp \ + /usr/include/boost/config/workaround.hpp \ + /usr/include/boost/core/swap.hpp \ + /usr/include/c++/11/utility \ + /usr/include/c++/11/bits/stl_relops.h \ + /usr/include/c++/11/bits/stl_pair.h \ + /usr/include/c++/11/bits/move.h \ + /usr/include/c++/11/type_traits \ + /usr/include/c++/11/initializer_list \ + /usr/include/boost/optional/bad_optional_access.hpp \ + /usr/include/c++/11/stdexcept \ + /usr/include/c++/11/exception \ + /usr/include/c++/11/bits/exception_ptr.h \ + /usr/include/c++/11/bits/exception_defines.h \ + /usr/include/c++/11/bits/cxxabi_init_exception.h \ + /usr/include/c++/11/typeinfo \ + /usr/include/c++/11/bits/hash_bytes.h \ + /usr/include/c++/11/bits/nested_exception.h \ + /usr/include/c++/11/string \ + /usr/include/c++/11/bits/char_traits.h \ + /usr/include/c++/11/bits/stl_algobase.h \ + /usr/include/c++/11/bits/functexcept.h \ + /usr/include/c++/11/bits/cpp_type_traits.h \ + /usr/include/c++/11/ext/type_traits.h \ + /usr/include/c++/11/ext/numeric_traits.h \ + /usr/include/c++/11/bits/stl_iterator_base_types.h \ + /usr/include/c++/11/bits/stl_iterator_base_funcs.h \ + /usr/include/c++/11/bits/concept_check.h \ + /usr/include/c++/11/debug/assertions.h \ + /usr/include/c++/11/bits/stl_iterator.h \ + /usr/include/c++/11/bits/ptr_traits.h \ + /usr/include/c++/11/debug/debug.h \ + /usr/include/c++/11/bits/predefined_ops.h \ + /usr/include/c++/11/cstdint \ + /usr/lib/gcc/x86_64-redhat-linux/11/include/stdint.h \ + /usr/include/stdint.h \ + /usr/include/bits/stdint-uintn.h \ + /usr/include/c++/11/bits/allocator.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/c++allocator.h \ + /usr/include/c++/11/ext/new_allocator.h \ + /usr/include/c++/11/bits/localefwd.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/c++locale.h \ + /usr/include/c++/11/clocale \ + /usr/include/locale.h \ + /usr/include/bits/locale.h \ + /usr/include/c++/11/cctype \ + /usr/include/ctype.h \ + /usr/include/c++/11/bits/ostream_insert.h \ + /usr/include/c++/11/bits/cxxabi_forced.h \ + /usr/include/c++/11/bits/stl_function.h \ + /usr/include/c++/11/backward/binders.h \ + /usr/include/c++/11/bits/range_access.h \ + /usr/include/c++/11/bits/basic_string.h \ + /usr/include/c++/11/ext/atomicity.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/gthr.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/gthr-default.h \ + /usr/include/pthread.h \ + /usr/include/sched.h \ + /usr/include/bits/sched.h \ + /usr/include/bits/types/struct_sched_param.h \ + /usr/include/bits/cpu-set.h \ + /usr/include/time.h \ + /usr/include/bits/time.h \ + /usr/include/bits/timex.h \ + /usr/include/bits/types/struct_tm.h \ + /usr/include/bits/types/struct_itimerspec.h \ + /usr/include/bits/setjmp.h \ + /usr/include/bits/types/struct___jmp_buf_tag.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/atomic_word.h \ + /usr/include/sys/single_threaded.h \ + /usr/include/c++/11/ext/alloc_traits.h \ + /usr/include/c++/11/bits/alloc_traits.h \ + /usr/include/c++/11/bits/stl_construct.h \ + /usr/include/c++/11/ext/string_conversions.h \ + /usr/include/c++/11/cstdio \ + /usr/include/stdio.h \ + /usr/include/bits/types/__fpos_t.h \ + /usr/include/bits/types/__fpos64_t.h \ + /usr/include/bits/types/struct_FILE.h \ + /usr/include/bits/types/cookie_io_functions_t.h \ + /usr/include/bits/stdio_lim.h \ + /usr/include/bits/stdio.h \ + /usr/include/c++/11/cerrno \ + /usr/include/errno.h \ + /usr/include/bits/errno.h \ + /usr/include/linux/errno.h \ + /usr/include/asm/errno.h \ + /usr/include/asm-generic/errno.h \ + /usr/include/asm-generic/errno-base.h \ + /usr/include/bits/types/error_t.h \ + /usr/include/c++/11/bits/charconv.h \ + /usr/include/c++/11/bits/functional_hash.h \ + /usr/include/c++/11/bits/basic_string.tcc \ + /usr/include/boost/static_assert.hpp \ + /usr/include/boost/detail/workaround.hpp \ + /usr/include/boost/throw_exception.hpp \ + /usr/include/boost/assert/source_location.hpp \ + /usr/include/boost/current_function.hpp \ + /usr/include/boost/cstdint.hpp \ + /usr/include/boost/exception/exception.hpp \ + /usr/include/boost/type.hpp \ + /usr/include/boost/type_traits/alignment_of.hpp \ + /usr/include/boost/type_traits/intrinsics.hpp \ + /usr/include/boost/type_traits/detail/config.hpp \ + /usr/include/boost/version.hpp \ + /usr/include/boost/type_traits/integral_constant.hpp \ + /usr/include/boost/type_traits/conditional.hpp \ + /usr/include/boost/type_traits/has_nothrow_constructor.hpp \ + /usr/include/boost/type_traits/is_default_constructible.hpp \ + /usr/include/boost/type_traits/is_complete.hpp \ + /usr/include/boost/type_traits/declval.hpp \ + /usr/include/boost/type_traits/add_rvalue_reference.hpp \ + /usr/include/boost/type_traits/is_void.hpp \ + /usr/include/boost/type_traits/is_reference.hpp \ + /usr/include/boost/type_traits/is_lvalue_reference.hpp \ + /usr/include/boost/type_traits/is_rvalue_reference.hpp \ + /usr/include/boost/type_traits/remove_reference.hpp \ + /usr/include/boost/type_traits/is_function.hpp \ + /usr/include/boost/type_traits/detail/is_function_cxx_11.hpp \ + /usr/include/boost/type_traits/detail/yes_no_type.hpp \ + /usr/include/boost/type_traits/type_with_alignment.hpp \ + /usr/include/boost/type_traits/is_pod.hpp \ + /usr/include/boost/type_traits/is_scalar.hpp \ + /usr/include/boost/type_traits/is_arithmetic.hpp \ + /usr/include/boost/type_traits/is_integral.hpp \ + /usr/include/boost/type_traits/is_floating_point.hpp \ + /usr/include/boost/type_traits/is_enum.hpp \ + /usr/include/boost/type_traits/is_pointer.hpp \ + /usr/include/boost/type_traits/is_member_pointer.hpp \ + /usr/include/boost/type_traits/is_member_function_pointer.hpp \ + /usr/include/boost/type_traits/detail/is_member_function_pointer_cxx_11.hpp \ + /usr/include/boost/type_traits/remove_const.hpp \ + /usr/include/boost/type_traits/decay.hpp \ + /usr/include/boost/type_traits/is_array.hpp \ + /usr/include/boost/type_traits/remove_bounds.hpp \ + /usr/include/boost/type_traits/remove_extent.hpp \ + /usr/include/boost/type_traits/add_pointer.hpp \ + /usr/include/boost/type_traits/remove_cv.hpp \ + /usr/include/boost/type_traits/is_base_of.hpp \ + /usr/include/boost/type_traits/is_base_and_derived.hpp \ + /usr/include/boost/type_traits/is_same.hpp \ + /usr/include/boost/type_traits/is_class.hpp \ + /usr/include/boost/type_traits/is_const.hpp \ + /usr/include/boost/type_traits/is_constructible.hpp \ + /usr/include/boost/type_traits/is_destructible.hpp \ + /usr/include/boost/type_traits/is_nothrow_move_assignable.hpp \ + /usr/include/boost/type_traits/has_trivial_move_assign.hpp \ + /usr/include/boost/type_traits/is_assignable.hpp \ + /usr/include/boost/type_traits/is_volatile.hpp \ + /usr/include/boost/type_traits/has_nothrow_assign.hpp \ + /usr/include/boost/type_traits/enable_if.hpp \ + /usr/include/boost/type_traits/is_nothrow_move_constructible.hpp \ + /usr/include/boost/move/utility.hpp \ + /usr/include/boost/move/detail/config_begin.hpp \ + /usr/include/boost/move/detail/workaround.hpp \ + /usr/include/boost/move/utility_core.hpp \ + /usr/include/boost/move/core.hpp \ + /usr/include/boost/move/detail/config_end.hpp \ + /usr/include/boost/move/detail/meta_utils.hpp \ + /usr/include/boost/move/detail/meta_utils_core.hpp \ + /usr/include/boost/move/traits.hpp \ + /usr/include/boost/move/detail/type_traits.hpp \ + /usr/include/boost/none.hpp \ + /usr/include/boost/none_t.hpp \ + /usr/include/boost/utility/compare_pointees.hpp \ + /usr/include/c++/11/functional \ + /usr/include/c++/11/tuple \ + /usr/include/c++/11/array \ + /usr/include/c++/11/bits/uses_allocator.h \ + /usr/include/c++/11/bits/invoke.h \ + /usr/include/c++/11/bits/refwrap.h \ + /usr/include/c++/11/bits/std_function.h \ + /usr/include/boost/utility/result_of.hpp \ + /usr/include/boost/preprocessor/cat.hpp \ + /usr/include/boost/preprocessor/config/config.hpp \ + /usr/include/boost/preprocessor/iteration/iterate.hpp \ + /usr/include/boost/preprocessor/arithmetic/dec.hpp \ + /usr/include/boost/preprocessor/config/limits.hpp \ + /usr/include/boost/preprocessor/arithmetic/limits/dec_256.hpp \ + /usr/include/boost/preprocessor/arithmetic/inc.hpp \ + /usr/include/boost/preprocessor/arithmetic/limits/inc_256.hpp \ + /usr/include/boost/preprocessor/array/elem.hpp \ + /usr/include/boost/preprocessor/array/data.hpp \ + /usr/include/boost/preprocessor/tuple/elem.hpp \ + /usr/include/boost/preprocessor/facilities/expand.hpp \ + /usr/include/boost/preprocessor/facilities/overload.hpp \ + /usr/include/boost/preprocessor/variadic/size.hpp \ + /usr/include/boost/preprocessor/control/iif.hpp \ + /usr/include/boost/preprocessor/facilities/check_empty.hpp \ + /usr/include/boost/preprocessor/variadic/has_opt.hpp \ + /usr/include/boost/preprocessor/variadic/limits/size_64.hpp \ + /usr/include/boost/preprocessor/tuple/rem.hpp \ + /usr/include/boost/preprocessor/tuple/detail/is_single_return.hpp \ + /usr/include/boost/preprocessor/variadic/elem.hpp \ + /usr/include/boost/preprocessor/variadic/limits/elem_64.hpp \ + /usr/include/boost/preprocessor/array/size.hpp \ + /usr/include/boost/preprocessor/slot/slot.hpp \ + /usr/include/boost/preprocessor/slot/detail/def.hpp \ + /usr/include/boost/preprocessor/repetition/enum_params.hpp \ + /usr/include/boost/preprocessor/punctuation/comma_if.hpp \ + /usr/include/boost/preprocessor/control/if.hpp \ + /usr/include/boost/preprocessor/logical/bool.hpp \ + /usr/include/boost/preprocessor/logical/limits/bool_256.hpp \ + /usr/include/boost/preprocessor/facilities/empty.hpp \ + /usr/include/boost/preprocessor/punctuation/comma.hpp \ + /usr/include/boost/preprocessor/repetition/repeat.hpp \ + /usr/include/boost/preprocessor/debug/error.hpp \ + /usr/include/boost/preprocessor/detail/auto_rec.hpp \ + /usr/include/boost/preprocessor/detail/limits/auto_rec_256.hpp \ + /usr/include/boost/preprocessor/tuple/eat.hpp \ + /usr/include/boost/preprocessor/repetition/limits/repeat_256.hpp \ + /usr/include/boost/preprocessor/repetition/enum_trailing_params.hpp \ + /usr/include/boost/preprocessor/repetition/enum_binary_params.hpp \ + /usr/include/boost/preprocessor/repetition/enum_shifted_params.hpp \ + /usr/include/boost/preprocessor/facilities/intercept.hpp \ + /usr/include/boost/preprocessor/facilities/limits/intercept_256.hpp \ + /usr/include/boost/type_traits/type_identity.hpp \ + /usr/include/boost/preprocessor/iteration/detail/iter/forward1.hpp \ + /usr/include/boost/preprocessor/iteration/detail/bounds/lower1.hpp \ + /usr/include/boost/preprocessor/slot/detail/shared.hpp \ + /usr/include/boost/preprocessor/iteration/detail/bounds/upper1.hpp \ + /usr/include/boost/preprocessor/iteration/detail/iter/limits/forward1_256.hpp \ + /usr/include/boost/utility/detail/result_of_iterate.hpp \ + /usr/include/boost/optional/optional_fwd.hpp \ + /usr/include/boost/optional/detail/optional_config.hpp \ + /usr/include/boost/optional/detail/optional_factory_support.hpp \ + /usr/include/boost/optional/detail/optional_aligned_storage.hpp \ + /usr/include/boost/optional/detail/optional_trivially_copyable_base.hpp \ + /usr/include/boost/optional/detail/optional_reference_spec.hpp \ + /usr/include/boost/optional/detail/optional_relops.hpp \ + /usr/include/boost/optional/detail/optional_swap.hpp \ + /usr/include/c++/11/cassert \ + /usr/include/c++/11/memory \ + /usr/include/c++/11/bits/stl_uninitialized.h \ + /usr/include/c++/11/bits/stl_tempbuf.h \ + /usr/include/c++/11/bits/stl_raw_storage_iter.h \ + /usr/include/c++/11/bits/align.h \ + /usr/include/c++/11/bit \ + /usr/include/c++/11/bits/unique_ptr.h \ + /usr/include/c++/11/bits/shared_ptr.h \ + /usr/include/c++/11/bits/shared_ptr_base.h \ + /usr/include/c++/11/bits/allocated_ptr.h \ + /usr/include/c++/11/ext/aligned_buffer.h \ + /usr/include/c++/11/ext/concurrence.h \ + /usr/include/c++/11/bits/shared_ptr_atomic.h \ + /usr/include/c++/11/bits/atomic_base.h \ + /usr/include/c++/11/bits/atomic_lockfree_defines.h \ + /usr/include/c++/11/backward/auto_ptr.h \ + /usr/include/c++/11/vector \ + /usr/include/c++/11/bits/stl_vector.h \ + /usr/include/c++/11/bits/stl_bvector.h \ + /usr/include/c++/11/bits/vector.tcc \ + /usr/include/c++/11/map \ + /usr/include/c++/11/bits/stl_tree.h \ + /usr/include/c++/11/bits/stl_map.h \ + /usr/include/c++/11/bits/stl_multimap.h \ + /usr/include/c++/11/bits/erase_if.h \ + /usr/include/c++/11/algorithm \ + /usr/include/c++/11/bits/stl_algo.h \ + /usr/include/c++/11/bits/algorithmfwd.h \ + /usr/include/c++/11/bits/stl_heap.h \ + /usr/include/c++/11/bits/uniform_int_dist.h \ + include/LibLsp/lsp/lsPosition.h \ + include/LibLsp/lsp/lsTextEdit.h \ + include/LibLsp/lsp/lsDocumentUri.h \ + include/LibLsp/lsp/lsResponseError.h \ + /usr/include/c++/11/sstream \ + /usr/include/c++/11/istream \ + /usr/include/c++/11/ios \ + /usr/include/c++/11/bits/ios_base.h \ + /usr/include/c++/11/bits/locale_classes.h \ + /usr/include/c++/11/bits/locale_classes.tcc \ + /usr/include/c++/11/system_error \ + /usr/include/c++/11/x86_64-redhat-linux/bits/error_constants.h \ + /usr/include/c++/11/streambuf \ + /usr/include/c++/11/bits/streambuf.tcc \ + /usr/include/c++/11/bits/basic_ios.h \ + /usr/include/c++/11/bits/locale_facets.h \ + /usr/include/c++/11/cwctype \ + /usr/include/wctype.h \ + /usr/include/bits/wctype-wchar.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/ctype_base.h \ + /usr/include/c++/11/bits/streambuf_iterator.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/ctype_inline.h \ + /usr/include/c++/11/bits/locale_facets.tcc \ + /usr/include/c++/11/bits/basic_ios.tcc \ + /usr/include/c++/11/ostream \ + /usr/include/c++/11/bits/ostream.tcc \ + /usr/include/c++/11/bits/istream.tcc \ + /usr/include/c++/11/bits/sstream.tcc \ + include/LibLsp/lsp/lsAny.h \ + include/LibLsp/JsonRpc/message.h \ + /usr/include/c++/11/atomic \ + /usr/include/c++/11/iostream \ + include/LibLsp/lsp/method_type.h \ + include/LibLsp/lsp/location_type.h \ + include/LibLsp/JsonRpc/RequestInMessage.h \ + /usr/include/c++/11/mutex \ + /usr/include/c++/11/chrono \ + /usr/include/c++/11/ratio \ + /usr/include/c++/11/limits \ + /usr/include/c++/11/ctime \ + /usr/include/c++/11/bits/parse_numbers.h \ + /usr/include/c++/11/bits/std_mutex.h \ + /usr/include/c++/11/bits/unique_lock.h \ + include/LibLsp/JsonRpc/lsRequestId.h \ + include/LibLsp/JsonRpc/lsResponseMessage.h + +CMakeFiles/lspcpp.dir/src/lsp/textDocument.cpp.o: src/lsp/textDocument.cpp \ + /usr/include/stdc-predef.h \ + include/LibLsp/lsp/textDocument/completion.h \ + include/LibLsp/JsonRpc/RequestInMessage.h \ + include/LibLsp/JsonRpc/serializer.h \ + include/LibLsp/JsonRpc/macro_map.h \ + /usr/include/boost/optional.hpp \ + /usr/include/boost/optional/optional.hpp \ + /usr/include/c++/11/new \ + /usr/include/c++/11/x86_64-redhat-linux/bits/c++config.h \ + /usr/include/bits/wordsize.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/os_defines.h \ + /usr/include/features.h \ + /usr/include/sys/cdefs.h \ + /usr/include/bits/long-double.h \ + /usr/include/gnu/stubs.h \ + /usr/include/gnu/stubs-64.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/cpu_defines.h \ + /usr/include/c++/11/bits/exception.h \ + /usr/include/c++/11/iosfwd \ + /usr/include/c++/11/bits/stringfwd.h \ + /usr/include/c++/11/bits/memoryfwd.h \ + /usr/include/c++/11/bits/postypes.h \ + /usr/include/c++/11/cwchar \ + /usr/include/wchar.h \ + /usr/include/bits/libc-header-start.h \ + /usr/include/bits/floatn.h \ + /usr/include/bits/floatn-common.h \ + /usr/lib/gcc/x86_64-redhat-linux/11/include/stddef.h \ + /usr/lib/gcc/x86_64-redhat-linux/11/include/stdarg.h \ + /usr/include/bits/wchar.h \ + /usr/include/bits/types/wint_t.h \ + /usr/include/bits/types/mbstate_t.h \ + /usr/include/bits/types/__mbstate_t.h \ + /usr/include/bits/types/__FILE.h \ + /usr/include/bits/types/FILE.h \ + /usr/include/bits/types/locale_t.h \ + /usr/include/bits/types/__locale_t.h \ + /usr/include/boost/assert.hpp \ + /usr/include/assert.h \ + /usr/include/boost/core/addressof.hpp \ + /usr/include/boost/config.hpp \ + /usr/include/boost/config/user.hpp \ + /usr/include/boost/config/detail/select_compiler_config.hpp \ + /usr/include/boost/config/compiler/gcc.hpp \ + /usr/include/c++/11/cstddef \ + /usr/include/boost/config/detail/select_stdlib_config.hpp \ + /usr/include/c++/11/version \ + /usr/include/boost/config/stdlib/libstdcpp3.hpp \ + /usr/include/unistd.h \ + /usr/include/bits/posix_opt.h \ + /usr/include/bits/environments.h \ + /usr/include/bits/types.h \ + /usr/include/bits/timesize.h \ + /usr/include/bits/typesizes.h \ + /usr/include/bits/time64.h \ + /usr/include/bits/confname.h \ + /usr/include/bits/getopt_posix.h \ + /usr/include/bits/getopt_core.h \ + /usr/include/bits/unistd_ext.h \ + /usr/include/boost/config/detail/select_platform_config.hpp \ + /usr/include/boost/config/platform/linux.hpp \ + /usr/include/c++/11/cstdlib \ + /usr/include/stdlib.h \ + /usr/include/bits/waitflags.h \ + /usr/include/bits/waitstatus.h \ + /usr/include/sys/types.h \ + /usr/include/bits/types/clock_t.h \ + /usr/include/bits/types/clockid_t.h \ + /usr/include/bits/types/time_t.h \ + /usr/include/bits/types/timer_t.h \ + /usr/include/bits/stdint-intn.h \ + /usr/include/endian.h \ + /usr/include/bits/endian.h \ + /usr/include/bits/endianness.h \ + /usr/include/bits/byteswap.h \ + /usr/include/bits/uintn-identity.h \ + /usr/include/sys/select.h \ + /usr/include/bits/select.h \ + /usr/include/bits/types/sigset_t.h \ + /usr/include/bits/types/__sigset_t.h \ + /usr/include/bits/types/struct_timeval.h \ + /usr/include/bits/types/struct_timespec.h \ + /usr/include/bits/pthreadtypes.h \ + /usr/include/bits/thread-shared-types.h \ + /usr/include/bits/pthreadtypes-arch.h \ + /usr/include/bits/struct_mutex.h \ + /usr/include/bits/struct_rwlock.h \ + /usr/include/alloca.h \ + /usr/include/bits/stdlib-bsearch.h \ + /usr/include/bits/stdlib-float.h \ + /usr/include/c++/11/bits/std_abs.h \ + /usr/include/boost/config/detail/posix_features.hpp \ + /usr/include/boost/config/detail/suffix.hpp \ + /usr/include/boost/config/helper_macros.hpp \ + /usr/include/boost/core/enable_if.hpp \ + /usr/include/boost/core/explicit_operator_bool.hpp \ + /usr/include/boost/config/workaround.hpp \ + /usr/include/boost/core/swap.hpp \ + /usr/include/c++/11/utility \ + /usr/include/c++/11/bits/stl_relops.h \ + /usr/include/c++/11/bits/stl_pair.h \ + /usr/include/c++/11/bits/move.h \ + /usr/include/c++/11/type_traits \ + /usr/include/c++/11/initializer_list \ + /usr/include/boost/optional/bad_optional_access.hpp \ + /usr/include/c++/11/stdexcept \ + /usr/include/c++/11/exception \ + /usr/include/c++/11/bits/exception_ptr.h \ + /usr/include/c++/11/bits/exception_defines.h \ + /usr/include/c++/11/bits/cxxabi_init_exception.h \ + /usr/include/c++/11/typeinfo \ + /usr/include/c++/11/bits/hash_bytes.h \ + /usr/include/c++/11/bits/nested_exception.h \ + /usr/include/c++/11/string \ + /usr/include/c++/11/bits/char_traits.h \ + /usr/include/c++/11/bits/stl_algobase.h \ + /usr/include/c++/11/bits/functexcept.h \ + /usr/include/c++/11/bits/cpp_type_traits.h \ + /usr/include/c++/11/ext/type_traits.h \ + /usr/include/c++/11/ext/numeric_traits.h \ + /usr/include/c++/11/bits/stl_iterator_base_types.h \ + /usr/include/c++/11/bits/stl_iterator_base_funcs.h \ + /usr/include/c++/11/bits/concept_check.h \ + /usr/include/c++/11/debug/assertions.h \ + /usr/include/c++/11/bits/stl_iterator.h \ + /usr/include/c++/11/bits/ptr_traits.h \ + /usr/include/c++/11/debug/debug.h \ + /usr/include/c++/11/bits/predefined_ops.h \ + /usr/include/c++/11/cstdint \ + /usr/lib/gcc/x86_64-redhat-linux/11/include/stdint.h \ + /usr/include/stdint.h \ + /usr/include/bits/stdint-uintn.h \ + /usr/include/c++/11/bits/allocator.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/c++allocator.h \ + /usr/include/c++/11/ext/new_allocator.h \ + /usr/include/c++/11/bits/localefwd.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/c++locale.h \ + /usr/include/c++/11/clocale \ + /usr/include/locale.h \ + /usr/include/bits/locale.h \ + /usr/include/c++/11/cctype \ + /usr/include/ctype.h \ + /usr/include/c++/11/bits/ostream_insert.h \ + /usr/include/c++/11/bits/cxxabi_forced.h \ + /usr/include/c++/11/bits/stl_function.h \ + /usr/include/c++/11/backward/binders.h \ + /usr/include/c++/11/bits/range_access.h \ + /usr/include/c++/11/bits/basic_string.h \ + /usr/include/c++/11/ext/atomicity.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/gthr.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/gthr-default.h \ + /usr/include/pthread.h \ + /usr/include/sched.h \ + /usr/include/bits/sched.h \ + /usr/include/bits/types/struct_sched_param.h \ + /usr/include/bits/cpu-set.h \ + /usr/include/time.h \ + /usr/include/bits/time.h \ + /usr/include/bits/timex.h \ + /usr/include/bits/types/struct_tm.h \ + /usr/include/bits/types/struct_itimerspec.h \ + /usr/include/bits/setjmp.h \ + /usr/include/bits/types/struct___jmp_buf_tag.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/atomic_word.h \ + /usr/include/sys/single_threaded.h \ + /usr/include/c++/11/ext/alloc_traits.h \ + /usr/include/c++/11/bits/alloc_traits.h \ + /usr/include/c++/11/bits/stl_construct.h \ + /usr/include/c++/11/ext/string_conversions.h \ + /usr/include/c++/11/cstdio \ + /usr/include/stdio.h \ + /usr/include/bits/types/__fpos_t.h \ + /usr/include/bits/types/__fpos64_t.h \ + /usr/include/bits/types/struct_FILE.h \ + /usr/include/bits/types/cookie_io_functions_t.h \ + /usr/include/bits/stdio_lim.h \ + /usr/include/bits/stdio.h \ + /usr/include/c++/11/cerrno \ + /usr/include/errno.h \ + /usr/include/bits/errno.h \ + /usr/include/linux/errno.h \ + /usr/include/asm/errno.h \ + /usr/include/asm-generic/errno.h \ + /usr/include/asm-generic/errno-base.h \ + /usr/include/bits/types/error_t.h \ + /usr/include/c++/11/bits/charconv.h \ + /usr/include/c++/11/bits/functional_hash.h \ + /usr/include/c++/11/bits/basic_string.tcc \ + /usr/include/boost/static_assert.hpp \ + /usr/include/boost/detail/workaround.hpp \ + /usr/include/boost/throw_exception.hpp \ + /usr/include/boost/assert/source_location.hpp \ + /usr/include/boost/current_function.hpp \ + /usr/include/boost/cstdint.hpp \ + /usr/include/boost/exception/exception.hpp \ + /usr/include/boost/type.hpp \ + /usr/include/boost/type_traits/alignment_of.hpp \ + /usr/include/boost/type_traits/intrinsics.hpp \ + /usr/include/boost/type_traits/detail/config.hpp \ + /usr/include/boost/version.hpp \ + /usr/include/boost/type_traits/integral_constant.hpp \ + /usr/include/boost/type_traits/conditional.hpp \ + /usr/include/boost/type_traits/has_nothrow_constructor.hpp \ + /usr/include/boost/type_traits/is_default_constructible.hpp \ + /usr/include/boost/type_traits/is_complete.hpp \ + /usr/include/boost/type_traits/declval.hpp \ + /usr/include/boost/type_traits/add_rvalue_reference.hpp \ + /usr/include/boost/type_traits/is_void.hpp \ + /usr/include/boost/type_traits/is_reference.hpp \ + /usr/include/boost/type_traits/is_lvalue_reference.hpp \ + /usr/include/boost/type_traits/is_rvalue_reference.hpp \ + /usr/include/boost/type_traits/remove_reference.hpp \ + /usr/include/boost/type_traits/is_function.hpp \ + /usr/include/boost/type_traits/detail/is_function_cxx_11.hpp \ + /usr/include/boost/type_traits/detail/yes_no_type.hpp \ + /usr/include/boost/type_traits/type_with_alignment.hpp \ + /usr/include/boost/type_traits/is_pod.hpp \ + /usr/include/boost/type_traits/is_scalar.hpp \ + /usr/include/boost/type_traits/is_arithmetic.hpp \ + /usr/include/boost/type_traits/is_integral.hpp \ + /usr/include/boost/type_traits/is_floating_point.hpp \ + /usr/include/boost/type_traits/is_enum.hpp \ + /usr/include/boost/type_traits/is_pointer.hpp \ + /usr/include/boost/type_traits/is_member_pointer.hpp \ + /usr/include/boost/type_traits/is_member_function_pointer.hpp \ + /usr/include/boost/type_traits/detail/is_member_function_pointer_cxx_11.hpp \ + /usr/include/boost/type_traits/remove_const.hpp \ + /usr/include/boost/type_traits/decay.hpp \ + /usr/include/boost/type_traits/is_array.hpp \ + /usr/include/boost/type_traits/remove_bounds.hpp \ + /usr/include/boost/type_traits/remove_extent.hpp \ + /usr/include/boost/type_traits/add_pointer.hpp \ + /usr/include/boost/type_traits/remove_cv.hpp \ + /usr/include/boost/type_traits/is_base_of.hpp \ + /usr/include/boost/type_traits/is_base_and_derived.hpp \ + /usr/include/boost/type_traits/is_same.hpp \ + /usr/include/boost/type_traits/is_class.hpp \ + /usr/include/boost/type_traits/is_const.hpp \ + /usr/include/boost/type_traits/is_constructible.hpp \ + /usr/include/boost/type_traits/is_destructible.hpp \ + /usr/include/boost/type_traits/is_nothrow_move_assignable.hpp \ + /usr/include/boost/type_traits/has_trivial_move_assign.hpp \ + /usr/include/boost/type_traits/is_assignable.hpp \ + /usr/include/boost/type_traits/is_volatile.hpp \ + /usr/include/boost/type_traits/has_nothrow_assign.hpp \ + /usr/include/boost/type_traits/enable_if.hpp \ + /usr/include/boost/type_traits/is_nothrow_move_constructible.hpp \ + /usr/include/boost/move/utility.hpp \ + /usr/include/boost/move/detail/config_begin.hpp \ + /usr/include/boost/move/detail/workaround.hpp \ + /usr/include/boost/move/utility_core.hpp \ + /usr/include/boost/move/core.hpp \ + /usr/include/boost/move/detail/config_end.hpp \ + /usr/include/boost/move/detail/meta_utils.hpp \ + /usr/include/boost/move/detail/meta_utils_core.hpp \ + /usr/include/boost/move/traits.hpp \ + /usr/include/boost/move/detail/type_traits.hpp \ + /usr/include/boost/none.hpp \ + /usr/include/boost/none_t.hpp \ + /usr/include/boost/utility/compare_pointees.hpp \ + /usr/include/c++/11/functional \ + /usr/include/c++/11/tuple \ + /usr/include/c++/11/array \ + /usr/include/c++/11/bits/uses_allocator.h \ + /usr/include/c++/11/bits/invoke.h \ + /usr/include/c++/11/bits/refwrap.h \ + /usr/include/c++/11/bits/std_function.h \ + /usr/include/boost/utility/result_of.hpp \ + /usr/include/boost/preprocessor/cat.hpp \ + /usr/include/boost/preprocessor/config/config.hpp \ + /usr/include/boost/preprocessor/iteration/iterate.hpp \ + /usr/include/boost/preprocessor/arithmetic/dec.hpp \ + /usr/include/boost/preprocessor/config/limits.hpp \ + /usr/include/boost/preprocessor/arithmetic/limits/dec_256.hpp \ + /usr/include/boost/preprocessor/arithmetic/inc.hpp \ + /usr/include/boost/preprocessor/arithmetic/limits/inc_256.hpp \ + /usr/include/boost/preprocessor/array/elem.hpp \ + /usr/include/boost/preprocessor/array/data.hpp \ + /usr/include/boost/preprocessor/tuple/elem.hpp \ + /usr/include/boost/preprocessor/facilities/expand.hpp \ + /usr/include/boost/preprocessor/facilities/overload.hpp \ + /usr/include/boost/preprocessor/variadic/size.hpp \ + /usr/include/boost/preprocessor/control/iif.hpp \ + /usr/include/boost/preprocessor/facilities/check_empty.hpp \ + /usr/include/boost/preprocessor/variadic/has_opt.hpp \ + /usr/include/boost/preprocessor/variadic/limits/size_64.hpp \ + /usr/include/boost/preprocessor/tuple/rem.hpp \ + /usr/include/boost/preprocessor/tuple/detail/is_single_return.hpp \ + /usr/include/boost/preprocessor/variadic/elem.hpp \ + /usr/include/boost/preprocessor/variadic/limits/elem_64.hpp \ + /usr/include/boost/preprocessor/array/size.hpp \ + /usr/include/boost/preprocessor/slot/slot.hpp \ + /usr/include/boost/preprocessor/slot/detail/def.hpp \ + /usr/include/boost/preprocessor/repetition/enum_params.hpp \ + /usr/include/boost/preprocessor/punctuation/comma_if.hpp \ + /usr/include/boost/preprocessor/control/if.hpp \ + /usr/include/boost/preprocessor/logical/bool.hpp \ + /usr/include/boost/preprocessor/logical/limits/bool_256.hpp \ + /usr/include/boost/preprocessor/facilities/empty.hpp \ + /usr/include/boost/preprocessor/punctuation/comma.hpp \ + /usr/include/boost/preprocessor/repetition/repeat.hpp \ + /usr/include/boost/preprocessor/debug/error.hpp \ + /usr/include/boost/preprocessor/detail/auto_rec.hpp \ + /usr/include/boost/preprocessor/detail/limits/auto_rec_256.hpp \ + /usr/include/boost/preprocessor/tuple/eat.hpp \ + /usr/include/boost/preprocessor/repetition/limits/repeat_256.hpp \ + /usr/include/boost/preprocessor/repetition/enum_trailing_params.hpp \ + /usr/include/boost/preprocessor/repetition/enum_binary_params.hpp \ + /usr/include/boost/preprocessor/repetition/enum_shifted_params.hpp \ + /usr/include/boost/preprocessor/facilities/intercept.hpp \ + /usr/include/boost/preprocessor/facilities/limits/intercept_256.hpp \ + /usr/include/boost/type_traits/type_identity.hpp \ + /usr/include/boost/preprocessor/iteration/detail/iter/forward1.hpp \ + /usr/include/boost/preprocessor/iteration/detail/bounds/lower1.hpp \ + /usr/include/boost/preprocessor/slot/detail/shared.hpp \ + /usr/include/boost/preprocessor/iteration/detail/bounds/upper1.hpp \ + /usr/include/boost/preprocessor/iteration/detail/iter/limits/forward1_256.hpp \ + /usr/include/boost/utility/detail/result_of_iterate.hpp \ + /usr/include/boost/optional/optional_fwd.hpp \ + /usr/include/boost/optional/detail/optional_config.hpp \ + /usr/include/boost/optional/detail/optional_factory_support.hpp \ + /usr/include/boost/optional/detail/optional_aligned_storage.hpp \ + /usr/include/boost/optional/detail/optional_trivially_copyable_base.hpp \ + /usr/include/boost/optional/detail/optional_reference_spec.hpp \ + /usr/include/boost/optional/detail/optional_relops.hpp \ + /usr/include/boost/optional/detail/optional_swap.hpp \ + /usr/include/c++/11/cassert \ + /usr/include/c++/11/memory \ + /usr/include/c++/11/bits/stl_uninitialized.h \ + /usr/include/c++/11/bits/stl_tempbuf.h \ + /usr/include/c++/11/bits/stl_raw_storage_iter.h \ + /usr/include/c++/11/bits/align.h \ + /usr/include/c++/11/bit \ + /usr/include/c++/11/bits/unique_ptr.h \ + /usr/include/c++/11/bits/shared_ptr.h \ + /usr/include/c++/11/bits/shared_ptr_base.h \ + /usr/include/c++/11/bits/allocated_ptr.h \ + /usr/include/c++/11/ext/aligned_buffer.h \ + /usr/include/c++/11/ext/concurrence.h \ + /usr/include/c++/11/bits/shared_ptr_atomic.h \ + /usr/include/c++/11/bits/atomic_base.h \ + /usr/include/c++/11/bits/atomic_lockfree_defines.h \ + /usr/include/c++/11/backward/auto_ptr.h \ + /usr/include/c++/11/vector \ + /usr/include/c++/11/bits/stl_vector.h \ + /usr/include/c++/11/bits/stl_bvector.h \ + /usr/include/c++/11/bits/vector.tcc \ + /usr/include/c++/11/map \ + /usr/include/c++/11/bits/stl_tree.h \ + /usr/include/c++/11/bits/stl_map.h \ + /usr/include/c++/11/bits/stl_multimap.h \ + /usr/include/c++/11/bits/erase_if.h \ + /usr/include/c++/11/algorithm \ + /usr/include/c++/11/bits/stl_algo.h \ + /usr/include/c++/11/bits/algorithmfwd.h \ + /usr/include/c++/11/bits/stl_heap.h \ + /usr/include/c++/11/bits/uniform_int_dist.h \ + /usr/include/c++/11/atomic \ + /usr/include/c++/11/mutex \ + /usr/include/c++/11/chrono \ + /usr/include/c++/11/ratio \ + /usr/include/c++/11/limits \ + /usr/include/c++/11/ctime \ + /usr/include/c++/11/bits/parse_numbers.h \ + /usr/include/c++/11/system_error \ + /usr/include/c++/11/x86_64-redhat-linux/bits/error_constants.h \ + /usr/include/c++/11/bits/std_mutex.h \ + /usr/include/c++/11/bits/unique_lock.h \ + include/LibLsp/JsonRpc/lsRequestId.h \ + include/LibLsp/JsonRpc/message.h \ + /usr/include/c++/11/iostream \ + /usr/include/c++/11/ostream \ + /usr/include/c++/11/ios \ + /usr/include/c++/11/bits/ios_base.h \ + /usr/include/c++/11/bits/locale_classes.h \ + /usr/include/c++/11/bits/locale_classes.tcc \ + /usr/include/c++/11/streambuf \ + /usr/include/c++/11/bits/streambuf.tcc \ + /usr/include/c++/11/bits/basic_ios.h \ + /usr/include/c++/11/bits/locale_facets.h \ + /usr/include/c++/11/cwctype \ + /usr/include/wctype.h \ + /usr/include/bits/wctype-wchar.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/ctype_base.h \ + /usr/include/c++/11/bits/streambuf_iterator.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/ctype_inline.h \ + /usr/include/c++/11/bits/locale_facets.tcc \ + /usr/include/c++/11/bits/basic_ios.tcc \ + /usr/include/c++/11/bits/ostream.tcc \ + /usr/include/c++/11/istream \ + /usr/include/c++/11/bits/istream.tcc \ + include/LibLsp/lsp/method_type.h \ + include/LibLsp/JsonRpc/lsResponseMessage.h \ + /usr/include/c++/11/regex \ + /usr/include/c++/11/bitset \ + /usr/include/c++/11/iterator \ + /usr/include/c++/11/bits/stream_iterator.h \ + /usr/include/c++/11/locale \ + /usr/include/c++/11/bits/locale_facets_nonio.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/time_members.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/messages_members.h \ + /usr/include/libintl.h \ + /usr/include/c++/11/bits/codecvt.h \ + /usr/include/c++/11/bits/locale_facets_nonio.tcc \ + /usr/include/c++/11/bits/locale_conv.h \ + /usr/include/c++/11/sstream \ + /usr/include/c++/11/bits/sstream.tcc \ + /usr/include/c++/11/stack \ + /usr/include/c++/11/deque \ + /usr/include/c++/11/bits/stl_deque.h \ + /usr/include/c++/11/bits/deque.tcc \ + /usr/include/c++/11/bits/stl_stack.h \ + /usr/include/c++/11/cstring \ + /usr/include/string.h \ + /usr/include/strings.h \ + /usr/include/c++/11/bits/regex_constants.h \ + /usr/include/c++/11/bits/regex_error.h \ + /usr/include/c++/11/bits/regex_automaton.h \ + /usr/include/c++/11/bits/regex_automaton.tcc \ + /usr/include/c++/11/bits/regex_scanner.h \ + /usr/include/c++/11/bits/regex_scanner.tcc \ + /usr/include/c++/11/bits/regex_compiler.h \ + /usr/include/c++/11/bits/regex_compiler.tcc \ + /usr/include/c++/11/bits/regex.h \ + /usr/include/c++/11/bits/regex.tcc \ + /usr/include/c++/11/bits/regex_executor.h \ + /usr/include/c++/11/bits/regex_executor.tcc \ + include/LibLsp/lsp/lsp_completion.h \ + include/LibLsp/lsp/lsTextEdit.h \ + include/LibLsp/lsp/lsRange.h \ + include/LibLsp/lsp/lsPosition.h \ + include/LibLsp/lsp/lsMarkedString.h \ + include/LibLsp/lsp/lsCommand.h \ + include/LibLsp/lsp/lsAny.h \ + include/LibLsp/lsp/lsTextDocumentPositionParams.h \ + include/LibLsp/lsp/lsTextDocumentIdentifier.h \ + include/LibLsp/lsp/lsDocumentUri.h \ + include/LibLsp/lsp/textDocument/document_symbol.h \ + include/LibLsp/lsp/symbol.h \ + include/LibLsp/lsp/location_type.h \ + include/LibLsp/lsp/textDocument/hover.h \ + include/LibLsp/lsp/textDocument/prepareRename.h \ + include/LibLsp/lsp/lsWorkspaceEdit.h \ + include/LibLsp/lsp/lsTextDocumentEdit.h \ + include/LibLsp/lsp/lsVersionedTextDocumentIdentifier.h \ + include/LibLsp/lsp/ResourceOperation.h \ + include/LibLsp/lsp/textDocument/typeHierarchy.h \ + include/LibLsp/lsp/textDocument/semanticHighlighting.h \ + include/LibLsp/JsonRpc/NotificationInMessage.h \ + include/LibLsp/lsp/textDocument/SemanticTokens.h \ + include/LibLsp/JsonRpc/json.h \ + third_party/rapidjson/include/rapidjson/document.h \ + third_party/rapidjson/include/rapidjson/reader.h \ + third_party/rapidjson/include/rapidjson/allocators.h \ + third_party/rapidjson/include/rapidjson/rapidjson.h \ + /usr/include/inttypes.h \ + third_party/rapidjson/include/rapidjson/internal/meta.h \ + third_party/rapidjson/include/rapidjson/rapidjson.h \ + third_party/rapidjson/include/rapidjson/stream.h \ + third_party/rapidjson/include/rapidjson/encodings.h \ + third_party/rapidjson/include/rapidjson/encodedstream.h \ + third_party/rapidjson/include/rapidjson/memorystream.h \ + third_party/rapidjson/include/rapidjson/internal/clzll.h \ + third_party/rapidjson/include/rapidjson/internal/stack.h \ + third_party/rapidjson/include/rapidjson/allocators.h \ + third_party/rapidjson/include/rapidjson/internal/swap.h \ + third_party/rapidjson/include/rapidjson/internal/strtod.h \ + third_party/rapidjson/include/rapidjson/internal/ieee754.h \ + third_party/rapidjson/include/rapidjson/internal/biginteger.h \ + third_party/rapidjson/include/rapidjson/internal/diyfp.h \ + third_party/rapidjson/include/rapidjson/internal/clzll.h \ + third_party/rapidjson/include/rapidjson/internal/pow10.h \ + /usr/include/c++/11/climits \ + /usr/lib/gcc/x86_64-redhat-linux/11/include/limits.h \ + /usr/lib/gcc/x86_64-redhat-linux/11/include/syslimits.h \ + /usr/include/limits.h \ + /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h \ + /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h \ + /usr/include/bits/xopen_lim.h \ + /usr/include/bits/uio_lim.h \ + third_party/rapidjson/include/rapidjson/error/error.h \ + third_party/rapidjson/include/rapidjson/rapidjson.h \ + third_party/rapidjson/include/rapidjson/internal/strfunc.h \ + third_party/rapidjson/include/rapidjson/stream.h \ + third_party/rapidjson/include/rapidjson/rapidjson.h \ + third_party/rapidjson/include/rapidjson/prettywriter.h \ + third_party/rapidjson/include/rapidjson/writer.h \ + third_party/rapidjson/include/rapidjson/internal/dtoa.h \ + third_party/rapidjson/include/rapidjson/internal/itoa.h \ + third_party/rapidjson/include/rapidjson/internal/itoa.h \ + third_party/rapidjson/include/rapidjson/stringbuffer.h + +CMakeFiles/lspcpp.dir/src/lsp/utils.cpp.o: src/lsp/utils.cpp \ + /usr/include/stdc-predef.h \ + include/LibLsp/lsp/utils.h \ + /usr/include/c++/11/algorithm \ + /usr/include/c++/11/utility \ + /usr/include/c++/11/x86_64-redhat-linux/bits/c++config.h \ + /usr/include/bits/wordsize.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/os_defines.h \ + /usr/include/features.h \ + /usr/include/sys/cdefs.h \ + /usr/include/bits/long-double.h \ + /usr/include/gnu/stubs.h \ + /usr/include/gnu/stubs-64.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/cpu_defines.h \ + /usr/include/c++/11/bits/stl_relops.h \ + /usr/include/c++/11/bits/stl_pair.h \ + /usr/include/c++/11/bits/move.h \ + /usr/include/c++/11/type_traits \ + /usr/include/c++/11/initializer_list \ + /usr/include/c++/11/bits/stl_algobase.h \ + /usr/include/c++/11/bits/functexcept.h \ + /usr/include/c++/11/bits/exception_defines.h \ + /usr/include/c++/11/bits/cpp_type_traits.h \ + /usr/include/c++/11/ext/type_traits.h \ + /usr/include/c++/11/ext/numeric_traits.h \ + /usr/include/c++/11/bits/stl_iterator_base_types.h \ + /usr/include/c++/11/bits/stl_iterator_base_funcs.h \ + /usr/include/c++/11/bits/concept_check.h \ + /usr/include/c++/11/debug/assertions.h \ + /usr/include/c++/11/bits/stl_iterator.h \ + /usr/include/c++/11/bits/ptr_traits.h \ + /usr/include/c++/11/debug/debug.h \ + /usr/include/c++/11/bits/predefined_ops.h \ + /usr/include/c++/11/bits/stl_algo.h \ + /usr/include/c++/11/cstdlib \ + /usr/include/stdlib.h \ + /usr/include/bits/libc-header-start.h \ + /usr/lib/gcc/x86_64-redhat-linux/11/include/stddef.h \ + /usr/include/bits/waitflags.h \ + /usr/include/bits/waitstatus.h \ + /usr/include/bits/floatn.h \ + /usr/include/bits/floatn-common.h \ + /usr/include/bits/types/locale_t.h \ + /usr/include/bits/types/__locale_t.h \ + /usr/include/sys/types.h \ + /usr/include/bits/types.h \ + /usr/include/bits/timesize.h \ + /usr/include/bits/typesizes.h \ + /usr/include/bits/time64.h \ + /usr/include/bits/types/clock_t.h \ + /usr/include/bits/types/clockid_t.h \ + /usr/include/bits/types/time_t.h \ + /usr/include/bits/types/timer_t.h \ + /usr/include/bits/stdint-intn.h \ + /usr/include/endian.h \ + /usr/include/bits/endian.h \ + /usr/include/bits/endianness.h \ + /usr/include/bits/byteswap.h \ + /usr/include/bits/uintn-identity.h \ + /usr/include/sys/select.h \ + /usr/include/bits/select.h \ + /usr/include/bits/types/sigset_t.h \ + /usr/include/bits/types/__sigset_t.h \ + /usr/include/bits/types/struct_timeval.h \ + /usr/include/bits/types/struct_timespec.h \ + /usr/include/bits/pthreadtypes.h \ + /usr/include/bits/thread-shared-types.h \ + /usr/include/bits/pthreadtypes-arch.h \ + /usr/include/bits/struct_mutex.h \ + /usr/include/bits/struct_rwlock.h \ + /usr/include/alloca.h \ + /usr/include/bits/stdlib-bsearch.h \ + /usr/include/bits/stdlib-float.h \ + /usr/include/c++/11/bits/std_abs.h \ + /usr/include/c++/11/bits/algorithmfwd.h \ + /usr/include/c++/11/bits/stl_heap.h \ + /usr/include/c++/11/bits/stl_tempbuf.h \ + /usr/include/c++/11/bits/stl_construct.h \ + /usr/include/c++/11/new \ + /usr/include/c++/11/bits/exception.h \ + /usr/include/c++/11/bits/uniform_int_dist.h \ + /usr/include/c++/11/codecvt \ + /usr/include/c++/11/bits/locale_classes.h \ + /usr/include/c++/11/bits/localefwd.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/c++locale.h \ + /usr/include/c++/11/clocale \ + /usr/include/locale.h \ + /usr/include/bits/locale.h \ + /usr/include/c++/11/iosfwd \ + /usr/include/c++/11/bits/stringfwd.h \ + /usr/include/c++/11/bits/memoryfwd.h \ + /usr/include/c++/11/bits/postypes.h \ + /usr/include/c++/11/cwchar \ + /usr/include/wchar.h \ + /usr/lib/gcc/x86_64-redhat-linux/11/include/stdarg.h \ + /usr/include/bits/wchar.h \ + /usr/include/bits/types/wint_t.h \ + /usr/include/bits/types/mbstate_t.h \ + /usr/include/bits/types/__mbstate_t.h \ + /usr/include/bits/types/__FILE.h \ + /usr/include/bits/types/FILE.h \ + /usr/include/c++/11/cctype \ + /usr/include/ctype.h \ + /usr/include/c++/11/string \ + /usr/include/c++/11/bits/char_traits.h \ + /usr/include/c++/11/cstdint \ + /usr/lib/gcc/x86_64-redhat-linux/11/include/stdint.h \ + /usr/include/stdint.h \ + /usr/include/bits/stdint-uintn.h \ + /usr/include/c++/11/bits/allocator.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/c++allocator.h \ + /usr/include/c++/11/ext/new_allocator.h \ + /usr/include/c++/11/bits/ostream_insert.h \ + /usr/include/c++/11/bits/cxxabi_forced.h \ + /usr/include/c++/11/bits/stl_function.h \ + /usr/include/c++/11/backward/binders.h \ + /usr/include/c++/11/bits/range_access.h \ + /usr/include/c++/11/bits/basic_string.h \ + /usr/include/c++/11/ext/atomicity.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/gthr.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/gthr-default.h \ + /usr/include/pthread.h \ + /usr/include/sched.h \ + /usr/include/bits/sched.h \ + /usr/include/bits/types/struct_sched_param.h \ + /usr/include/bits/cpu-set.h \ + /usr/include/time.h \ + /usr/include/bits/time.h \ + /usr/include/bits/timex.h \ + /usr/include/bits/types/struct_tm.h \ + /usr/include/bits/types/struct_itimerspec.h \ + /usr/include/bits/setjmp.h \ + /usr/include/bits/types/struct___jmp_buf_tag.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/atomic_word.h \ + /usr/include/sys/single_threaded.h \ + /usr/include/c++/11/ext/alloc_traits.h \ + /usr/include/c++/11/bits/alloc_traits.h \ + /usr/include/c++/11/ext/string_conversions.h \ + /usr/include/c++/11/cstdio \ + /usr/include/stdio.h \ + /usr/include/bits/types/__fpos_t.h \ + /usr/include/bits/types/__fpos64_t.h \ + /usr/include/bits/types/struct_FILE.h \ + /usr/include/bits/types/cookie_io_functions_t.h \ + /usr/include/bits/stdio_lim.h \ + /usr/include/bits/stdio.h \ + /usr/include/c++/11/cerrno \ + /usr/include/errno.h \ + /usr/include/bits/errno.h \ + /usr/include/linux/errno.h \ + /usr/include/asm/errno.h \ + /usr/include/asm-generic/errno.h \ + /usr/include/asm-generic/errno-base.h \ + /usr/include/bits/types/error_t.h \ + /usr/include/c++/11/bits/charconv.h \ + /usr/include/c++/11/bits/functional_hash.h \ + /usr/include/c++/11/bits/hash_bytes.h \ + /usr/include/c++/11/bits/basic_string.tcc \ + /usr/include/c++/11/bits/locale_classes.tcc \ + /usr/include/c++/11/bits/codecvt.h \ + /usr/include/c++/11/functional \ + /usr/include/c++/11/tuple \ + /usr/include/c++/11/array \ + /usr/include/c++/11/bits/uses_allocator.h \ + /usr/include/c++/11/bits/invoke.h \ + /usr/include/c++/11/bits/refwrap.h \ + /usr/include/c++/11/bits/std_function.h \ + /usr/include/c++/11/typeinfo \ + /usr/include/c++/11/iterator \ + /usr/include/c++/11/bits/stream_iterator.h \ + /usr/include/c++/11/bits/streambuf_iterator.h \ + /usr/include/c++/11/streambuf \ + /usr/include/c++/11/bits/ios_base.h \ + /usr/include/c++/11/system_error \ + /usr/include/c++/11/x86_64-redhat-linux/bits/error_constants.h \ + /usr/include/c++/11/stdexcept \ + /usr/include/c++/11/exception \ + /usr/include/c++/11/bits/exception_ptr.h \ + /usr/include/c++/11/bits/cxxabi_init_exception.h \ + /usr/include/c++/11/bits/nested_exception.h \ + /usr/include/c++/11/bits/streambuf.tcc \ + /usr/include/c++/11/locale \ + /usr/include/c++/11/bits/locale_facets.h \ + /usr/include/c++/11/cwctype \ + /usr/include/wctype.h \ + /usr/include/bits/wctype-wchar.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/ctype_base.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/ctype_inline.h \ + /usr/include/c++/11/bits/locale_facets.tcc \ + /usr/include/c++/11/bits/locale_facets_nonio.h \ + /usr/include/c++/11/ctime \ + /usr/include/c++/11/x86_64-redhat-linux/bits/time_members.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/messages_members.h \ + /usr/include/libintl.h \ + /usr/include/c++/11/bits/locale_facets_nonio.tcc \ + /usr/include/c++/11/bits/locale_conv.h \ + /usr/include/c++/11/bits/unique_ptr.h \ + /usr/include/c++/11/memory \ + /usr/include/c++/11/bits/stl_uninitialized.h \ + /usr/include/c++/11/bits/stl_raw_storage_iter.h \ + /usr/include/c++/11/bits/align.h \ + /usr/include/c++/11/bit \ + /usr/include/c++/11/bits/shared_ptr.h \ + /usr/include/c++/11/bits/shared_ptr_base.h \ + /usr/include/c++/11/bits/allocated_ptr.h \ + /usr/include/c++/11/ext/aligned_buffer.h \ + /usr/include/c++/11/ext/concurrence.h \ + /usr/include/c++/11/bits/shared_ptr_atomic.h \ + /usr/include/c++/11/bits/atomic_base.h \ + /usr/include/c++/11/bits/atomic_lockfree_defines.h \ + /usr/include/c++/11/backward/auto_ptr.h \ + /usr/include/c++/11/vector \ + /usr/include/c++/11/bits/stl_vector.h \ + /usr/include/c++/11/bits/stl_bvector.h \ + /usr/include/c++/11/bits/vector.tcc \ + /usr/include/boost/optional/optional.hpp \ + /usr/include/boost/assert.hpp \ + /usr/include/assert.h \ + /usr/include/boost/core/addressof.hpp \ + /usr/include/boost/config.hpp \ + /usr/include/boost/config/user.hpp \ + /usr/include/boost/config/detail/select_compiler_config.hpp \ + /usr/include/boost/config/compiler/gcc.hpp \ + /usr/include/c++/11/cstddef \ + /usr/include/boost/config/detail/select_stdlib_config.hpp \ + /usr/include/c++/11/version \ + /usr/include/boost/config/stdlib/libstdcpp3.hpp \ + /usr/include/unistd.h \ + /usr/include/bits/posix_opt.h \ + /usr/include/bits/environments.h \ + /usr/include/bits/confname.h \ + /usr/include/bits/getopt_posix.h \ + /usr/include/bits/getopt_core.h \ + /usr/include/bits/unistd_ext.h \ + /usr/include/boost/config/detail/select_platform_config.hpp \ + /usr/include/boost/config/platform/linux.hpp \ + /usr/include/boost/config/detail/posix_features.hpp \ + /usr/include/boost/config/detail/suffix.hpp \ + /usr/include/boost/config/helper_macros.hpp \ + /usr/include/boost/core/enable_if.hpp \ + /usr/include/boost/core/explicit_operator_bool.hpp \ + /usr/include/boost/config/workaround.hpp \ + /usr/include/boost/core/swap.hpp \ + /usr/include/boost/optional/bad_optional_access.hpp \ + /usr/include/boost/static_assert.hpp \ + /usr/include/boost/detail/workaround.hpp \ + /usr/include/boost/throw_exception.hpp \ + /usr/include/boost/assert/source_location.hpp \ + /usr/include/boost/current_function.hpp \ + /usr/include/boost/cstdint.hpp \ + /usr/include/boost/exception/exception.hpp \ + /usr/include/boost/type.hpp \ + /usr/include/boost/type_traits/alignment_of.hpp \ + /usr/include/boost/type_traits/intrinsics.hpp \ + /usr/include/boost/type_traits/detail/config.hpp \ + /usr/include/boost/version.hpp \ + /usr/include/boost/type_traits/integral_constant.hpp \ + /usr/include/boost/type_traits/conditional.hpp \ + /usr/include/boost/type_traits/has_nothrow_constructor.hpp \ + /usr/include/boost/type_traits/is_default_constructible.hpp \ + /usr/include/boost/type_traits/is_complete.hpp \ + /usr/include/boost/type_traits/declval.hpp \ + /usr/include/boost/type_traits/add_rvalue_reference.hpp \ + /usr/include/boost/type_traits/is_void.hpp \ + /usr/include/boost/type_traits/is_reference.hpp \ + /usr/include/boost/type_traits/is_lvalue_reference.hpp \ + /usr/include/boost/type_traits/is_rvalue_reference.hpp \ + /usr/include/boost/type_traits/remove_reference.hpp \ + /usr/include/boost/type_traits/is_function.hpp \ + /usr/include/boost/type_traits/detail/is_function_cxx_11.hpp \ + /usr/include/boost/type_traits/detail/yes_no_type.hpp \ + /usr/include/boost/type_traits/type_with_alignment.hpp \ + /usr/include/boost/type_traits/is_pod.hpp \ + /usr/include/boost/type_traits/is_scalar.hpp \ + /usr/include/boost/type_traits/is_arithmetic.hpp \ + /usr/include/boost/type_traits/is_integral.hpp \ + /usr/include/boost/type_traits/is_floating_point.hpp \ + /usr/include/boost/type_traits/is_enum.hpp \ + /usr/include/boost/type_traits/is_pointer.hpp \ + /usr/include/boost/type_traits/is_member_pointer.hpp \ + /usr/include/boost/type_traits/is_member_function_pointer.hpp \ + /usr/include/boost/type_traits/detail/is_member_function_pointer_cxx_11.hpp \ + /usr/include/boost/type_traits/remove_const.hpp \ + /usr/include/boost/type_traits/decay.hpp \ + /usr/include/boost/type_traits/is_array.hpp \ + /usr/include/boost/type_traits/remove_bounds.hpp \ + /usr/include/boost/type_traits/remove_extent.hpp \ + /usr/include/boost/type_traits/add_pointer.hpp \ + /usr/include/boost/type_traits/remove_cv.hpp \ + /usr/include/boost/type_traits/is_base_of.hpp \ + /usr/include/boost/type_traits/is_base_and_derived.hpp \ + /usr/include/boost/type_traits/is_same.hpp \ + /usr/include/boost/type_traits/is_class.hpp \ + /usr/include/boost/type_traits/is_const.hpp \ + /usr/include/boost/type_traits/is_constructible.hpp \ + /usr/include/boost/type_traits/is_destructible.hpp \ + /usr/include/boost/type_traits/is_nothrow_move_assignable.hpp \ + /usr/include/boost/type_traits/has_trivial_move_assign.hpp \ + /usr/include/boost/type_traits/is_assignable.hpp \ + /usr/include/boost/type_traits/is_volatile.hpp \ + /usr/include/boost/type_traits/has_nothrow_assign.hpp \ + /usr/include/boost/type_traits/enable_if.hpp \ + /usr/include/boost/type_traits/is_nothrow_move_constructible.hpp \ + /usr/include/boost/move/utility.hpp \ + /usr/include/boost/move/detail/config_begin.hpp \ + /usr/include/boost/move/detail/workaround.hpp \ + /usr/include/boost/move/utility_core.hpp \ + /usr/include/boost/move/core.hpp \ + /usr/include/boost/move/detail/config_end.hpp \ + /usr/include/boost/move/detail/meta_utils.hpp \ + /usr/include/boost/move/detail/meta_utils_core.hpp \ + /usr/include/boost/move/traits.hpp \ + /usr/include/boost/move/detail/type_traits.hpp \ + /usr/include/boost/none.hpp \ + /usr/include/boost/none_t.hpp \ + /usr/include/boost/utility/compare_pointees.hpp \ + /usr/include/boost/utility/result_of.hpp \ + /usr/include/boost/preprocessor/cat.hpp \ + /usr/include/boost/preprocessor/config/config.hpp \ + /usr/include/boost/preprocessor/iteration/iterate.hpp \ + /usr/include/boost/preprocessor/arithmetic/dec.hpp \ + /usr/include/boost/preprocessor/config/limits.hpp \ + /usr/include/boost/preprocessor/arithmetic/limits/dec_256.hpp \ + /usr/include/boost/preprocessor/arithmetic/inc.hpp \ + /usr/include/boost/preprocessor/arithmetic/limits/inc_256.hpp \ + /usr/include/boost/preprocessor/array/elem.hpp \ + /usr/include/boost/preprocessor/array/data.hpp \ + /usr/include/boost/preprocessor/tuple/elem.hpp \ + /usr/include/boost/preprocessor/facilities/expand.hpp \ + /usr/include/boost/preprocessor/facilities/overload.hpp \ + /usr/include/boost/preprocessor/variadic/size.hpp \ + /usr/include/boost/preprocessor/control/iif.hpp \ + /usr/include/boost/preprocessor/facilities/check_empty.hpp \ + /usr/include/boost/preprocessor/variadic/has_opt.hpp \ + /usr/include/boost/preprocessor/variadic/limits/size_64.hpp \ + /usr/include/boost/preprocessor/tuple/rem.hpp \ + /usr/include/boost/preprocessor/tuple/detail/is_single_return.hpp \ + /usr/include/boost/preprocessor/variadic/elem.hpp \ + /usr/include/boost/preprocessor/variadic/limits/elem_64.hpp \ + /usr/include/boost/preprocessor/array/size.hpp \ + /usr/include/boost/preprocessor/slot/slot.hpp \ + /usr/include/boost/preprocessor/slot/detail/def.hpp \ + /usr/include/boost/preprocessor/repetition/enum_params.hpp \ + /usr/include/boost/preprocessor/punctuation/comma_if.hpp \ + /usr/include/boost/preprocessor/control/if.hpp \ + /usr/include/boost/preprocessor/logical/bool.hpp \ + /usr/include/boost/preprocessor/logical/limits/bool_256.hpp \ + /usr/include/boost/preprocessor/facilities/empty.hpp \ + /usr/include/boost/preprocessor/punctuation/comma.hpp \ + /usr/include/boost/preprocessor/repetition/repeat.hpp \ + /usr/include/boost/preprocessor/debug/error.hpp \ + /usr/include/boost/preprocessor/detail/auto_rec.hpp \ + /usr/include/boost/preprocessor/detail/limits/auto_rec_256.hpp \ + /usr/include/boost/preprocessor/tuple/eat.hpp \ + /usr/include/boost/preprocessor/repetition/limits/repeat_256.hpp \ + /usr/include/boost/preprocessor/repetition/enum_trailing_params.hpp \ + /usr/include/boost/preprocessor/repetition/enum_binary_params.hpp \ + /usr/include/boost/preprocessor/repetition/enum_shifted_params.hpp \ + /usr/include/boost/preprocessor/facilities/intercept.hpp \ + /usr/include/boost/preprocessor/facilities/limits/intercept_256.hpp \ + /usr/include/boost/type_traits/type_identity.hpp \ + /usr/include/boost/preprocessor/iteration/detail/iter/forward1.hpp \ + /usr/include/boost/preprocessor/iteration/detail/bounds/lower1.hpp \ + /usr/include/boost/preprocessor/slot/detail/shared.hpp \ + /usr/include/boost/preprocessor/iteration/detail/bounds/upper1.hpp \ + /usr/include/boost/preprocessor/iteration/detail/iter/limits/forward1_256.hpp \ + /usr/include/boost/utility/detail/result_of_iterate.hpp \ + /usr/include/boost/optional/optional_fwd.hpp \ + /usr/include/boost/optional/detail/optional_config.hpp \ + /usr/include/boost/optional/detail/optional_factory_support.hpp \ + /usr/include/boost/optional/detail/optional_aligned_storage.hpp \ + /usr/include/boost/optional/detail/optional_trivially_copyable_base.hpp \ + /usr/include/boost/optional/detail/optional_reference_spec.hpp \ + /usr/include/boost/optional/detail/optional_relops.hpp \ + /usr/include/boost/optional/detail/optional_swap.hpp \ + include/LibLsp/lsp/AbsolutePath.h \ + include/LibLsp/JsonRpc/serializer.h \ + include/LibLsp/JsonRpc/macro_map.h \ + /usr/include/boost/optional.hpp \ + /usr/include/c++/11/cassert \ + /usr/include/c++/11/map \ + /usr/include/c++/11/bits/stl_tree.h \ + /usr/include/c++/11/bits/stl_map.h \ + /usr/include/c++/11/bits/stl_multimap.h \ + /usr/include/c++/11/bits/erase_if.h \ + include/LibLsp/lsp/lsPosition.h \ + /usr/include/c++/11/cstring \ + /usr/include/string.h \ + /usr/include/strings.h \ + /usr/include/c++/11/fstream \ + /usr/include/c++/11/istream \ + /usr/include/c++/11/ios \ + /usr/include/c++/11/bits/basic_ios.h \ + /usr/include/c++/11/bits/basic_ios.tcc \ + /usr/include/c++/11/ostream \ + /usr/include/c++/11/bits/ostream.tcc \ + /usr/include/c++/11/bits/istream.tcc \ + /usr/include/c++/11/x86_64-redhat-linux/bits/basic_file.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/c++io.h \ + /usr/include/c++/11/bits/fstream.tcc \ + /usr/include/c++/11/queue \ + /usr/include/c++/11/deque \ + /usr/include/c++/11/bits/stl_deque.h \ + /usr/include/c++/11/bits/deque.tcc \ + /usr/include/c++/11/bits/stl_queue.h \ + /usr/include/c++/11/sstream \ + /usr/include/c++/11/bits/sstream.tcc \ + /usr/include/c++/11/unordered_map \ + /usr/include/c++/11/bits/hashtable.h \ + /usr/include/c++/11/bits/hashtable_policy.h \ + /usr/include/c++/11/bits/unordered_map.h \ + /usr/include/sys/stat.h \ + /usr/include/bits/stat.h \ + /usr/include/bits/struct_stat.h \ + /usr/include/bits/statx.h \ + /usr/include/linux/stat.h \ + /usr/include/linux/types.h \ + /usr/include/asm/types.h \ + /usr/include/asm-generic/types.h \ + /usr/include/asm-generic/int-ll64.h \ + /usr/include/asm/bitsperlong.h \ + /usr/include/asm-generic/bitsperlong.h \ + /usr/include/linux/posix_types.h \ + /usr/include/linux/stddef.h \ + /usr/include/asm/posix_types.h \ + /usr/include/asm/posix_types_64.h \ + /usr/include/asm-generic/posix_types.h \ + /usr/include/bits/statx-generic.h \ + /usr/include/bits/types/struct_statx_timestamp.h \ + /usr/include/bits/types/struct_statx.h \ + third_party/utfcpp/source/utf8.h \ + third_party/utfcpp/source/utf8/checked.h \ + third_party/utfcpp/source/utf8/core.h \ + third_party/utfcpp/source/utf8/cpp11.h \ + third_party/utfcpp/source/utf8/checked.h \ + third_party/utfcpp/source/utf8/unchecked.h \ + /usr/include/boost/filesystem/path.hpp \ + /usr/include/boost/filesystem/config.hpp \ + /usr/include/boost/system/api_config.hpp \ + /usr/include/boost/config/auto_link.hpp \ + /usr/include/boost/filesystem/path_traits.hpp \ + /usr/include/boost/system/error_code.hpp \ + /usr/include/boost/system/detail/error_code.hpp \ + /usr/include/boost/system/detail/error_category.hpp \ + /usr/include/boost/system/detail/config.hpp \ + /usr/include/boost/system/detail/error_condition.hpp \ + /usr/include/boost/system/detail/generic_category.hpp \ + /usr/include/boost/system/detail/generic_category_message.hpp \ + /usr/include/boost/system/detail/enable_if.hpp \ + /usr/include/boost/system/is_error_condition_enum.hpp \ + /usr/include/boost/system/detail/system_category.hpp \ + /usr/include/boost/system/is_error_code_enum.hpp \ + /usr/include/boost/system/error_category.hpp \ + /usr/include/boost/system/detail/error_category_impl.hpp \ + /usr/include/boost/system/detail/to_std_category.hpp \ + /usr/include/c++/11/mutex \ + /usr/include/c++/11/chrono \ + /usr/include/c++/11/ratio \ + /usr/include/c++/11/limits \ + /usr/include/c++/11/bits/parse_numbers.h \ + /usr/include/c++/11/bits/std_mutex.h \ + /usr/include/c++/11/bits/unique_lock.h \ + /usr/include/boost/system/error_condition.hpp \ + /usr/include/boost/system/errc.hpp \ + /usr/include/boost/system/detail/errc.hpp \ + /usr/include/boost/system/detail/cerrno.hpp \ + /usr/include/boost/system/generic_category.hpp \ + /usr/include/boost/system/system_category.hpp \ + /usr/include/boost/system/detail/system_category_impl.hpp \ + /usr/include/boost/system/detail/is_generic_value.hpp \ + /usr/include/boost/system/detail/throws.hpp \ + /usr/include/c++/11/list \ + /usr/include/c++/11/bits/stl_list.h \ + /usr/include/c++/11/bits/list.tcc \ + /usr/include/boost/config/abi_prefix.hpp \ + /usr/include/boost/config/abi_suffix.hpp \ + /usr/include/boost/system/system_error.hpp \ + /usr/include/boost/iterator/iterator_facade.hpp \ + /usr/include/boost/iterator/interoperable.hpp \ + /usr/include/boost/mpl/bool.hpp \ + /usr/include/boost/mpl/bool_fwd.hpp \ + /usr/include/boost/mpl/aux_/adl_barrier.hpp \ + /usr/include/boost/mpl/aux_/config/adl.hpp \ + /usr/include/boost/mpl/aux_/config/msvc.hpp \ + /usr/include/boost/mpl/aux_/config/intel.hpp \ + /usr/include/boost/mpl/aux_/config/gcc.hpp \ + /usr/include/boost/mpl/aux_/config/workaround.hpp \ + /usr/include/boost/mpl/integral_c_tag.hpp \ + /usr/include/boost/mpl/aux_/config/static_constant.hpp \ + /usr/include/boost/mpl/or.hpp \ + /usr/include/boost/mpl/aux_/config/use_preprocessed.hpp \ + /usr/include/boost/mpl/aux_/nested_type_wknd.hpp \ + /usr/include/boost/mpl/aux_/na_spec.hpp \ + /usr/include/boost/mpl/lambda_fwd.hpp \ + /usr/include/boost/mpl/void_fwd.hpp \ + /usr/include/boost/mpl/aux_/na.hpp \ + /usr/include/boost/mpl/aux_/na_fwd.hpp \ + /usr/include/boost/mpl/aux_/config/ctps.hpp \ + /usr/include/boost/mpl/aux_/config/lambda.hpp \ + /usr/include/boost/mpl/aux_/config/ttp.hpp \ + /usr/include/boost/mpl/int.hpp \ + /usr/include/boost/mpl/int_fwd.hpp \ + /usr/include/boost/mpl/aux_/nttp_decl.hpp \ + /usr/include/boost/mpl/aux_/config/nttp.hpp \ + /usr/include/boost/mpl/aux_/integral_wrapper.hpp \ + /usr/include/boost/mpl/aux_/static_cast.hpp \ + /usr/include/boost/mpl/aux_/lambda_arity_param.hpp \ + /usr/include/boost/mpl/aux_/template_arity_fwd.hpp \ + /usr/include/boost/mpl/aux_/arity.hpp \ + /usr/include/boost/mpl/aux_/config/dtp.hpp \ + /usr/include/boost/mpl/aux_/preprocessor/params.hpp \ + /usr/include/boost/mpl/aux_/config/preprocessor.hpp \ + /usr/include/boost/preprocessor/comma_if.hpp \ + /usr/include/boost/preprocessor/repeat.hpp \ + /usr/include/boost/preprocessor/inc.hpp \ + /usr/include/boost/mpl/aux_/preprocessor/enum.hpp \ + /usr/include/boost/mpl/aux_/preprocessor/def_params_tail.hpp \ + /usr/include/boost/mpl/limits/arity.hpp \ + /usr/include/boost/preprocessor/logical/and.hpp \ + /usr/include/boost/preprocessor/logical/bitand.hpp \ + /usr/include/boost/preprocessor/identity.hpp \ + /usr/include/boost/preprocessor/facilities/identity.hpp \ + /usr/include/boost/preprocessor/empty.hpp \ + /usr/include/boost/preprocessor/arithmetic/add.hpp \ + /usr/include/boost/preprocessor/control/while.hpp \ + /usr/include/boost/preprocessor/list/fold_left.hpp \ + /usr/include/boost/preprocessor/list/detail/fold_left.hpp \ + /usr/include/boost/preprocessor/control/expr_iif.hpp \ + /usr/include/boost/preprocessor/list/adt.hpp \ + /usr/include/boost/preprocessor/detail/is_binary.hpp \ + /usr/include/boost/preprocessor/detail/check.hpp \ + /usr/include/boost/preprocessor/logical/compl.hpp \ + /usr/include/boost/preprocessor/list/detail/limits/fold_left_256.hpp \ + /usr/include/boost/preprocessor/list/limits/fold_left_256.hpp \ + /usr/include/boost/preprocessor/list/fold_right.hpp \ + /usr/include/boost/preprocessor/list/detail/fold_right.hpp \ + /usr/include/boost/preprocessor/list/reverse.hpp \ + /usr/include/boost/preprocessor/list/detail/limits/fold_right_256.hpp \ + /usr/include/boost/preprocessor/control/detail/while.hpp \ + /usr/include/boost/preprocessor/control/detail/limits/while_256.hpp \ + /usr/include/boost/preprocessor/control/limits/while_256.hpp \ + /usr/include/boost/preprocessor/logical/bitor.hpp \ + /usr/include/boost/preprocessor/arithmetic/detail/is_maximum_number.hpp \ + /usr/include/boost/preprocessor/comparison/equal.hpp \ + /usr/include/boost/preprocessor/comparison/not_equal.hpp \ + /usr/include/boost/preprocessor/comparison/limits/not_equal_256.hpp \ + /usr/include/boost/preprocessor/arithmetic/detail/maximum_number.hpp \ + /usr/include/boost/preprocessor/arithmetic/detail/is_minimum_number.hpp \ + /usr/include/boost/preprocessor/logical/not.hpp \ + /usr/include/boost/preprocessor/arithmetic/sub.hpp \ + /usr/include/boost/mpl/aux_/config/eti.hpp \ + /usr/include/boost/mpl/aux_/config/overload_resolution.hpp \ + /usr/include/boost/mpl/aux_/lambda_support.hpp \ + /usr/include/boost/mpl/aux_/include_preprocessed.hpp \ + /usr/include/boost/mpl/aux_/config/compiler.hpp \ + /usr/include/boost/preprocessor/stringize.hpp \ + /usr/include/boost/mpl/aux_/preprocessed/gcc/or.hpp \ + /usr/include/boost/type_traits/is_convertible.hpp \ + /usr/include/boost/type_traits/is_abstract.hpp \ + /usr/include/boost/type_traits/add_lvalue_reference.hpp \ + /usr/include/boost/type_traits/add_reference.hpp \ + /usr/include/boost/iterator/detail/config_def.hpp \ + /usr/include/boost/iterator/detail/config_undef.hpp \ + /usr/include/boost/iterator/iterator_traits.hpp \ + /usr/include/boost/iterator/iterator_categories.hpp \ + /usr/include/boost/mpl/eval_if.hpp \ + /usr/include/boost/mpl/if.hpp \ + /usr/include/boost/mpl/aux_/value_wknd.hpp \ + /usr/include/boost/mpl/aux_/config/integral.hpp \ + /usr/include/boost/mpl/identity.hpp \ + /usr/include/boost/mpl/placeholders.hpp \ + /usr/include/boost/mpl/arg.hpp \ + /usr/include/boost/mpl/arg_fwd.hpp \ + /usr/include/boost/mpl/aux_/na_assert.hpp \ + /usr/include/boost/mpl/assert.hpp \ + /usr/include/boost/mpl/not.hpp \ + /usr/include/boost/mpl/aux_/yes_no.hpp \ + /usr/include/boost/mpl/aux_/config/arrays.hpp \ + /usr/include/boost/mpl/aux_/config/gpu.hpp \ + /usr/include/boost/mpl/aux_/config/pp_counter.hpp \ + /usr/include/boost/mpl/aux_/arity_spec.hpp \ + /usr/include/boost/mpl/aux_/arg_typedef.hpp \ + /usr/include/boost/mpl/aux_/preprocessed/gcc/arg.hpp \ + /usr/include/boost/mpl/aux_/preprocessed/gcc/placeholders.hpp \ + /usr/include/boost/iterator/detail/facade_iterator_category.hpp \ + /usr/include/boost/core/use_default.hpp \ + /usr/include/boost/mpl/and.hpp \ + /usr/include/boost/mpl/aux_/preprocessed/gcc/and.hpp \ + /usr/include/boost/detail/indirect_traits.hpp \ + /usr/include/boost/type_traits/remove_pointer.hpp \ + /usr/include/boost/detail/select_type.hpp \ + /usr/include/boost/iterator/detail/enable_if.hpp \ + /usr/include/boost/type_traits/add_const.hpp \ + /usr/include/boost/mpl/always.hpp \ + /usr/include/boost/mpl/aux_/preprocessor/default_params.hpp \ + /usr/include/boost/mpl/apply.hpp \ + /usr/include/boost/mpl/apply_fwd.hpp \ + /usr/include/boost/mpl/aux_/preprocessed/gcc/apply_fwd.hpp \ + /usr/include/boost/mpl/apply_wrap.hpp \ + /usr/include/boost/mpl/aux_/has_apply.hpp \ + /usr/include/boost/mpl/has_xxx.hpp \ + /usr/include/boost/mpl/aux_/type_wrapper.hpp \ + /usr/include/boost/mpl/aux_/config/has_xxx.hpp \ + /usr/include/boost/mpl/aux_/config/msvc_typename.hpp \ + /usr/include/boost/mpl/aux_/config/has_apply.hpp \ + /usr/include/boost/mpl/aux_/msvc_never_true.hpp \ + /usr/include/boost/mpl/aux_/preprocessed/gcc/apply_wrap.hpp \ + /usr/include/boost/mpl/lambda.hpp \ + /usr/include/boost/mpl/bind.hpp \ + /usr/include/boost/mpl/bind_fwd.hpp \ + /usr/include/boost/mpl/aux_/config/bind.hpp \ + /usr/include/boost/mpl/aux_/preprocessed/gcc/bind_fwd.hpp \ + /usr/include/boost/mpl/next.hpp \ + /usr/include/boost/mpl/next_prior.hpp \ + /usr/include/boost/mpl/aux_/common_name_wknd.hpp \ + /usr/include/boost/mpl/protect.hpp \ + /usr/include/boost/mpl/aux_/preprocessed/gcc/bind.hpp \ + /usr/include/boost/mpl/aux_/full_lambda.hpp \ + /usr/include/boost/mpl/quote.hpp \ + /usr/include/boost/mpl/void.hpp \ + /usr/include/boost/mpl/aux_/has_type.hpp \ + /usr/include/boost/mpl/aux_/config/bcc.hpp \ + /usr/include/boost/mpl/aux_/preprocessed/gcc/quote.hpp \ + /usr/include/boost/mpl/aux_/template_arity.hpp \ + /usr/include/boost/mpl/aux_/preprocessed/gcc/template_arity.hpp \ + /usr/include/boost/mpl/aux_/preprocessed/gcc/full_lambda.hpp \ + /usr/include/boost/mpl/aux_/preprocessed/gcc/apply.hpp \ + /usr/include/boost/io/quoted.hpp \ + /usr/include/boost/io/detail/buffer_fill.hpp \ + /usr/include/boost/io/detail/ostream_guard.hpp \ + /usr/include/boost/io/ios_state.hpp \ + /usr/include/boost/io_fwd.hpp \ + /usr/include/boost/functional/hash_fwd.hpp \ + /usr/include/boost/container_hash/hash_fwd.hpp \ + /usr/include/boost/filesystem/operations.hpp \ + /usr/include/boost/filesystem/file_status.hpp \ + /usr/include/boost/detail/bitmask.hpp \ + /usr/include/boost/filesystem/exception.hpp \ + /usr/include/boost/smart_ptr/intrusive_ptr.hpp \ + /usr/include/boost/smart_ptr/detail/sp_convertible.hpp \ + /usr/include/boost/smart_ptr/detail/sp_nullptr_t.hpp \ + /usr/include/boost/smart_ptr/detail/sp_noexcept.hpp \ + /usr/include/boost/config/no_tr1/functional.hpp \ + /usr/include/boost/smart_ptr/detail/operator_bool.hpp \ + /usr/include/boost/smart_ptr/intrusive_ref_counter.hpp \ + /usr/include/boost/smart_ptr/detail/atomic_count.hpp \ + /usr/include/boost/smart_ptr/detail/sp_has_gcc_intrinsics.hpp \ + /usr/include/boost/smart_ptr/detail/sp_has_sync_intrinsics.hpp \ + /usr/include/boost/smart_ptr/detail/atomic_count_gcc_atomic.hpp \ + /usr/include/boost/filesystem/directory.hpp \ + /usr/include/boost/core/scoped_enum.hpp \ + /usr/include/boost/algorithm/string.hpp \ + /usr/include/boost/algorithm/string/std_containers_traits.hpp \ + /usr/include/boost/algorithm/string/std/string_traits.hpp \ + /usr/include/boost/algorithm/string/yes_no_type.hpp \ + /usr/include/boost/algorithm/string/sequence_traits.hpp \ + /usr/include/boost/algorithm/string/std/list_traits.hpp \ + /usr/include/boost/algorithm/string/std/slist_traits.hpp \ + /usr/include/boost/algorithm/string/config.hpp \ + /usr/include/c++/11/ext/slist \ + /usr/include/boost/algorithm/string/trim.hpp \ + /usr/include/boost/range/begin.hpp \ + /usr/include/boost/range/config.hpp \ + /usr/include/boost/range/iterator.hpp \ + /usr/include/boost/range/range_fwd.hpp \ + /usr/include/boost/range/mutable_iterator.hpp \ + /usr/include/boost/range/detail/extract_optional_type.hpp \ + /usr/include/boost/range/detail/msvc_has_iterator_workaround.hpp \ + /usr/include/boost/range/const_iterator.hpp \ + /usr/include/boost/range/end.hpp \ + /usr/include/boost/range/detail/implementation_help.hpp \ + /usr/include/boost/range/detail/common.hpp \ + /usr/include/boost/range/detail/sfinae.hpp \ + /usr/include/boost/range/as_literal.hpp \ + /usr/include/boost/range/iterator_range.hpp \ + /usr/include/boost/range/iterator_range_core.hpp \ + /usr/include/boost/range/functions.hpp \ + /usr/include/boost/range/size.hpp \ + /usr/include/boost/range/size_type.hpp \ + /usr/include/boost/range/difference_type.hpp \ + /usr/include/boost/range/has_range_iterator.hpp \ + /usr/include/boost/utility/enable_if.hpp \ + /usr/include/boost/range/concepts.hpp \ + /usr/include/boost/concept_check.hpp \ + /usr/include/boost/concept/assert.hpp \ + /usr/include/boost/concept/detail/general.hpp \ + /usr/include/boost/concept/detail/backward_compatibility.hpp \ + /usr/include/boost/concept/detail/has_constraints.hpp \ + /usr/include/boost/type_traits/conversion_traits.hpp \ + /usr/include/boost/concept/usage.hpp \ + /usr/include/boost/concept/detail/concept_def.hpp \ + /usr/include/boost/preprocessor/seq/for_each_i.hpp \ + /usr/include/boost/preprocessor/repetition/for.hpp \ + /usr/include/boost/preprocessor/repetition/detail/for.hpp \ + /usr/include/boost/preprocessor/repetition/detail/limits/for_256.hpp \ + /usr/include/boost/preprocessor/repetition/limits/for_256.hpp \ + /usr/include/boost/preprocessor/seq/seq.hpp \ + /usr/include/boost/preprocessor/seq/elem.hpp \ + /usr/include/boost/preprocessor/seq/limits/elem_256.hpp \ + /usr/include/boost/preprocessor/seq/size.hpp \ + /usr/include/boost/preprocessor/seq/limits/size_256.hpp \ + /usr/include/boost/preprocessor/seq/detail/is_empty.hpp \ + /usr/include/boost/preprocessor/seq/enum.hpp \ + /usr/include/boost/preprocessor/seq/limits/enum_256.hpp \ + /usr/include/boost/concept/detail/concept_undef.hpp \ + /usr/include/boost/iterator/iterator_concepts.hpp \ + /usr/include/boost/limits.hpp \ + /usr/include/boost/range/value_type.hpp \ + /usr/include/boost/range/detail/misc_concept.hpp \ + /usr/include/boost/type_traits/make_unsigned.hpp \ + /usr/include/boost/type_traits/is_signed.hpp \ + /usr/include/c++/11/climits \ + /usr/lib/gcc/x86_64-redhat-linux/11/include/limits.h \ + /usr/lib/gcc/x86_64-redhat-linux/11/include/syslimits.h \ + /usr/include/limits.h \ + /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h \ + /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h \ + /usr/include/bits/xopen_lim.h \ + /usr/include/bits/uio_lim.h \ + /usr/include/boost/type_traits/is_unsigned.hpp \ + /usr/include/boost/type_traits/add_volatile.hpp \ + /usr/include/boost/range/detail/has_member_size.hpp \ + /usr/include/boost/utility.hpp \ + /usr/include/boost/utility/base_from_member.hpp \ + /usr/include/boost/preprocessor/repetition/repeat_from_to.hpp \ + /usr/include/boost/utility/binary.hpp \ + /usr/include/boost/preprocessor/control/deduce_d.hpp \ + /usr/include/boost/preprocessor/seq/cat.hpp \ + /usr/include/boost/preprocessor/seq/fold_left.hpp \ + /usr/include/boost/preprocessor/seq/limits/fold_left_256.hpp \ + /usr/include/boost/preprocessor/seq/transform.hpp \ + /usr/include/boost/preprocessor/arithmetic/mod.hpp \ + /usr/include/boost/preprocessor/arithmetic/detail/div_base.hpp \ + /usr/include/boost/preprocessor/comparison/less_equal.hpp \ + /usr/include/boost/preprocessor/arithmetic/detail/is_1_number.hpp \ + /usr/include/boost/utility/identity_type.hpp \ + /usr/include/boost/type_traits/function_traits.hpp \ + /usr/include/boost/core/checked_delete.hpp \ + /usr/include/boost/core/noncopyable.hpp \ + /usr/include/boost/range/distance.hpp \ + /usr/include/boost/iterator/distance.hpp \ + /usr/include/boost/range/empty.hpp \ + /usr/include/boost/range/rbegin.hpp \ + /usr/include/boost/range/reverse_iterator.hpp \ + /usr/include/boost/iterator/reverse_iterator.hpp \ + /usr/include/boost/iterator/iterator_adaptor.hpp \ + /usr/include/boost/range/rend.hpp \ + /usr/include/boost/range/algorithm/equal.hpp \ + /usr/include/boost/range/detail/safe_bool.hpp \ + /usr/include/boost/next_prior.hpp \ + /usr/include/boost/type_traits/has_plus.hpp \ + /usr/include/boost/type_traits/detail/has_binary_operator.hpp \ + /usr/include/boost/type_traits/make_void.hpp \ + /usr/include/boost/type_traits/has_plus_assign.hpp \ + /usr/include/boost/type_traits/has_minus.hpp \ + /usr/include/boost/type_traits/has_minus_assign.hpp \ + /usr/include/boost/iterator/advance.hpp \ + /usr/include/boost/range/iterator_range_io.hpp \ + /usr/include/boost/range/detail/str_types.hpp \ + /usr/include/boost/algorithm/string/detail/trim.hpp \ + /usr/include/boost/algorithm/string/classification.hpp \ + /usr/include/boost/algorithm/string/detail/classification.hpp \ + /usr/include/boost/algorithm/string/predicate_facade.hpp \ + /usr/include/boost/algorithm/string/case_conv.hpp \ + /usr/include/boost/iterator/transform_iterator.hpp \ + /usr/include/boost/algorithm/string/detail/case_conv.hpp \ + /usr/include/boost/algorithm/string/predicate.hpp \ + /usr/include/boost/algorithm/string/compare.hpp \ + /usr/include/boost/algorithm/string/find.hpp \ + /usr/include/boost/algorithm/string/finder.hpp \ + /usr/include/boost/algorithm/string/constants.hpp \ + /usr/include/boost/algorithm/string/detail/finder.hpp \ + /usr/include/boost/algorithm/string/detail/predicate.hpp \ + /usr/include/boost/algorithm/string/split.hpp \ + /usr/include/boost/algorithm/string/iter_find.hpp \ + /usr/include/boost/algorithm/string/concept.hpp \ + /usr/include/boost/algorithm/string/find_iterator.hpp \ + /usr/include/boost/algorithm/string/detail/find_iterator.hpp \ + /usr/include/boost/function.hpp \ + /usr/include/boost/preprocessor/iterate.hpp \ + /usr/include/boost/function/detail/prologue.hpp \ + /usr/include/boost/function/function_base.hpp \ + /usr/include/boost/integer.hpp \ + /usr/include/boost/integer_fwd.hpp \ + /usr/include/boost/integer_traits.hpp \ + /usr/include/boost/type_index.hpp \ + /usr/include/boost/type_index/stl_type_index.hpp \ + /usr/include/boost/type_index/type_index_facade.hpp \ + /usr/include/boost/core/demangle.hpp \ + /usr/include/c++/11/cxxabi.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/cxxabi_tweaks.h \ + /usr/include/boost/type_traits/has_trivial_copy.hpp \ + /usr/include/boost/type_traits/is_copy_constructible.hpp \ + /usr/include/boost/type_traits/has_trivial_destructor.hpp \ + /usr/include/boost/type_traits/composite_traits.hpp \ + /usr/include/boost/type_traits/is_union.hpp \ + /usr/include/boost/ref.hpp \ + /usr/include/boost/core/ref.hpp \ + /usr/include/boost/function_equal.hpp \ + /usr/include/boost/function/function_fwd.hpp \ + /usr/include/boost/mem_fn.hpp \ + /usr/include/boost/bind/mem_fn.hpp \ + /usr/include/boost/get_pointer.hpp \ + /usr/include/boost/config/no_tr1/memory.hpp \ + /usr/include/boost/bind/mem_fn_template.hpp \ + /usr/include/boost/bind/mem_fn_cc.hpp \ + /usr/include/boost/preprocessor/enum.hpp \ + /usr/include/boost/preprocessor/repetition/enum.hpp \ + /usr/include/boost/preprocessor/enum_params.hpp \ + /usr/include/boost/function/detail/function_iterate.hpp \ + /usr/include/boost/function/detail/maybe_include.hpp \ + /usr/include/boost/function/function_template.hpp \ + /usr/include/boost/core/no_exceptions_support.hpp \ + /usr/include/boost/algorithm/string/detail/util.hpp \ + /usr/include/boost/algorithm/string/join.hpp \ + /usr/include/boost/algorithm/string/detail/sequence.hpp \ + /usr/include/boost/mpl/logical.hpp \ + /usr/include/boost/algorithm/string/replace.hpp \ + /usr/include/boost/algorithm/string/find_format.hpp \ + /usr/include/boost/algorithm/string/detail/find_format.hpp \ + /usr/include/boost/algorithm/string/detail/find_format_store.hpp \ + /usr/include/boost/algorithm/string/detail/replace_storage.hpp \ + /usr/include/boost/algorithm/string/detail/find_format_all.hpp \ + /usr/include/boost/algorithm/string/formatter.hpp \ + /usr/include/boost/algorithm/string/detail/formatter.hpp \ + /usr/include/boost/algorithm/string/erase.hpp + +CMakeFiles/lspcpp.dir/src/lsp/working_files.cpp.o: src/lsp/working_files.cpp \ + /usr/include/stdc-predef.h \ + include/LibLsp/lsp/working_files.h \ + include/LibLsp/lsp/lsp_diagnostic.h \ + include/LibLsp/lsp/lsRange.h \ + include/LibLsp/JsonRpc/serializer.h \ + include/LibLsp/JsonRpc/macro_map.h \ + /usr/include/boost/optional.hpp \ + /usr/include/boost/optional/optional.hpp \ + /usr/include/c++/11/new \ + /usr/include/c++/11/x86_64-redhat-linux/bits/c++config.h \ + /usr/include/bits/wordsize.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/os_defines.h \ + /usr/include/features.h \ + /usr/include/sys/cdefs.h \ + /usr/include/bits/long-double.h \ + /usr/include/gnu/stubs.h \ + /usr/include/gnu/stubs-64.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/cpu_defines.h \ + /usr/include/c++/11/bits/exception.h \ + /usr/include/c++/11/iosfwd \ + /usr/include/c++/11/bits/stringfwd.h \ + /usr/include/c++/11/bits/memoryfwd.h \ + /usr/include/c++/11/bits/postypes.h \ + /usr/include/c++/11/cwchar \ + /usr/include/wchar.h \ + /usr/include/bits/libc-header-start.h \ + /usr/include/bits/floatn.h \ + /usr/include/bits/floatn-common.h \ + /usr/lib/gcc/x86_64-redhat-linux/11/include/stddef.h \ + /usr/lib/gcc/x86_64-redhat-linux/11/include/stdarg.h \ + /usr/include/bits/wchar.h \ + /usr/include/bits/types/wint_t.h \ + /usr/include/bits/types/mbstate_t.h \ + /usr/include/bits/types/__mbstate_t.h \ + /usr/include/bits/types/__FILE.h \ + /usr/include/bits/types/FILE.h \ + /usr/include/bits/types/locale_t.h \ + /usr/include/bits/types/__locale_t.h \ + /usr/include/boost/assert.hpp \ + /usr/include/assert.h \ + /usr/include/boost/core/addressof.hpp \ + /usr/include/boost/config.hpp \ + /usr/include/boost/config/user.hpp \ + /usr/include/boost/config/detail/select_compiler_config.hpp \ + /usr/include/boost/config/compiler/gcc.hpp \ + /usr/include/c++/11/cstddef \ + /usr/include/boost/config/detail/select_stdlib_config.hpp \ + /usr/include/c++/11/version \ + /usr/include/boost/config/stdlib/libstdcpp3.hpp \ + /usr/include/unistd.h \ + /usr/include/bits/posix_opt.h \ + /usr/include/bits/environments.h \ + /usr/include/bits/types.h \ + /usr/include/bits/timesize.h \ + /usr/include/bits/typesizes.h \ + /usr/include/bits/time64.h \ + /usr/include/bits/confname.h \ + /usr/include/bits/getopt_posix.h \ + /usr/include/bits/getopt_core.h \ + /usr/include/bits/unistd_ext.h \ + /usr/include/boost/config/detail/select_platform_config.hpp \ + /usr/include/boost/config/platform/linux.hpp \ + /usr/include/c++/11/cstdlib \ + /usr/include/stdlib.h \ + /usr/include/bits/waitflags.h \ + /usr/include/bits/waitstatus.h \ + /usr/include/sys/types.h \ + /usr/include/bits/types/clock_t.h \ + /usr/include/bits/types/clockid_t.h \ + /usr/include/bits/types/time_t.h \ + /usr/include/bits/types/timer_t.h \ + /usr/include/bits/stdint-intn.h \ + /usr/include/endian.h \ + /usr/include/bits/endian.h \ + /usr/include/bits/endianness.h \ + /usr/include/bits/byteswap.h \ + /usr/include/bits/uintn-identity.h \ + /usr/include/sys/select.h \ + /usr/include/bits/select.h \ + /usr/include/bits/types/sigset_t.h \ + /usr/include/bits/types/__sigset_t.h \ + /usr/include/bits/types/struct_timeval.h \ + /usr/include/bits/types/struct_timespec.h \ + /usr/include/bits/pthreadtypes.h \ + /usr/include/bits/thread-shared-types.h \ + /usr/include/bits/pthreadtypes-arch.h \ + /usr/include/bits/struct_mutex.h \ + /usr/include/bits/struct_rwlock.h \ + /usr/include/alloca.h \ + /usr/include/bits/stdlib-bsearch.h \ + /usr/include/bits/stdlib-float.h \ + /usr/include/c++/11/bits/std_abs.h \ + /usr/include/boost/config/detail/posix_features.hpp \ + /usr/include/boost/config/detail/suffix.hpp \ + /usr/include/boost/config/helper_macros.hpp \ + /usr/include/boost/core/enable_if.hpp \ + /usr/include/boost/core/explicit_operator_bool.hpp \ + /usr/include/boost/config/workaround.hpp \ + /usr/include/boost/core/swap.hpp \ + /usr/include/c++/11/utility \ + /usr/include/c++/11/bits/stl_relops.h \ + /usr/include/c++/11/bits/stl_pair.h \ + /usr/include/c++/11/bits/move.h \ + /usr/include/c++/11/type_traits \ + /usr/include/c++/11/initializer_list \ + /usr/include/boost/optional/bad_optional_access.hpp \ + /usr/include/c++/11/stdexcept \ + /usr/include/c++/11/exception \ + /usr/include/c++/11/bits/exception_ptr.h \ + /usr/include/c++/11/bits/exception_defines.h \ + /usr/include/c++/11/bits/cxxabi_init_exception.h \ + /usr/include/c++/11/typeinfo \ + /usr/include/c++/11/bits/hash_bytes.h \ + /usr/include/c++/11/bits/nested_exception.h \ + /usr/include/c++/11/string \ + /usr/include/c++/11/bits/char_traits.h \ + /usr/include/c++/11/bits/stl_algobase.h \ + /usr/include/c++/11/bits/functexcept.h \ + /usr/include/c++/11/bits/cpp_type_traits.h \ + /usr/include/c++/11/ext/type_traits.h \ + /usr/include/c++/11/ext/numeric_traits.h \ + /usr/include/c++/11/bits/stl_iterator_base_types.h \ + /usr/include/c++/11/bits/stl_iterator_base_funcs.h \ + /usr/include/c++/11/bits/concept_check.h \ + /usr/include/c++/11/debug/assertions.h \ + /usr/include/c++/11/bits/stl_iterator.h \ + /usr/include/c++/11/bits/ptr_traits.h \ + /usr/include/c++/11/debug/debug.h \ + /usr/include/c++/11/bits/predefined_ops.h \ + /usr/include/c++/11/cstdint \ + /usr/lib/gcc/x86_64-redhat-linux/11/include/stdint.h \ + /usr/include/stdint.h \ + /usr/include/bits/stdint-uintn.h \ + /usr/include/c++/11/bits/allocator.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/c++allocator.h \ + /usr/include/c++/11/ext/new_allocator.h \ + /usr/include/c++/11/bits/localefwd.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/c++locale.h \ + /usr/include/c++/11/clocale \ + /usr/include/locale.h \ + /usr/include/bits/locale.h \ + /usr/include/c++/11/cctype \ + /usr/include/ctype.h \ + /usr/include/c++/11/bits/ostream_insert.h \ + /usr/include/c++/11/bits/cxxabi_forced.h \ + /usr/include/c++/11/bits/stl_function.h \ + /usr/include/c++/11/backward/binders.h \ + /usr/include/c++/11/bits/range_access.h \ + /usr/include/c++/11/bits/basic_string.h \ + /usr/include/c++/11/ext/atomicity.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/gthr.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/gthr-default.h \ + /usr/include/pthread.h \ + /usr/include/sched.h \ + /usr/include/bits/sched.h \ + /usr/include/bits/types/struct_sched_param.h \ + /usr/include/bits/cpu-set.h \ + /usr/include/time.h \ + /usr/include/bits/time.h \ + /usr/include/bits/timex.h \ + /usr/include/bits/types/struct_tm.h \ + /usr/include/bits/types/struct_itimerspec.h \ + /usr/include/bits/setjmp.h \ + /usr/include/bits/types/struct___jmp_buf_tag.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/atomic_word.h \ + /usr/include/sys/single_threaded.h \ + /usr/include/c++/11/ext/alloc_traits.h \ + /usr/include/c++/11/bits/alloc_traits.h \ + /usr/include/c++/11/bits/stl_construct.h \ + /usr/include/c++/11/ext/string_conversions.h \ + /usr/include/c++/11/cstdio \ + /usr/include/stdio.h \ + /usr/include/bits/types/__fpos_t.h \ + /usr/include/bits/types/__fpos64_t.h \ + /usr/include/bits/types/struct_FILE.h \ + /usr/include/bits/types/cookie_io_functions_t.h \ + /usr/include/bits/stdio_lim.h \ + /usr/include/bits/stdio.h \ + /usr/include/c++/11/cerrno \ + /usr/include/errno.h \ + /usr/include/bits/errno.h \ + /usr/include/linux/errno.h \ + /usr/include/asm/errno.h \ + /usr/include/asm-generic/errno.h \ + /usr/include/asm-generic/errno-base.h \ + /usr/include/bits/types/error_t.h \ + /usr/include/c++/11/bits/charconv.h \ + /usr/include/c++/11/bits/functional_hash.h \ + /usr/include/c++/11/bits/basic_string.tcc \ + /usr/include/boost/static_assert.hpp \ + /usr/include/boost/detail/workaround.hpp \ + /usr/include/boost/throw_exception.hpp \ + /usr/include/boost/assert/source_location.hpp \ + /usr/include/boost/current_function.hpp \ + /usr/include/boost/cstdint.hpp \ + /usr/include/boost/exception/exception.hpp \ + /usr/include/boost/type.hpp \ + /usr/include/boost/type_traits/alignment_of.hpp \ + /usr/include/boost/type_traits/intrinsics.hpp \ + /usr/include/boost/type_traits/detail/config.hpp \ + /usr/include/boost/version.hpp \ + /usr/include/boost/type_traits/integral_constant.hpp \ + /usr/include/boost/type_traits/conditional.hpp \ + /usr/include/boost/type_traits/has_nothrow_constructor.hpp \ + /usr/include/boost/type_traits/is_default_constructible.hpp \ + /usr/include/boost/type_traits/is_complete.hpp \ + /usr/include/boost/type_traits/declval.hpp \ + /usr/include/boost/type_traits/add_rvalue_reference.hpp \ + /usr/include/boost/type_traits/is_void.hpp \ + /usr/include/boost/type_traits/is_reference.hpp \ + /usr/include/boost/type_traits/is_lvalue_reference.hpp \ + /usr/include/boost/type_traits/is_rvalue_reference.hpp \ + /usr/include/boost/type_traits/remove_reference.hpp \ + /usr/include/boost/type_traits/is_function.hpp \ + /usr/include/boost/type_traits/detail/is_function_cxx_11.hpp \ + /usr/include/boost/type_traits/detail/yes_no_type.hpp \ + /usr/include/boost/type_traits/type_with_alignment.hpp \ + /usr/include/boost/type_traits/is_pod.hpp \ + /usr/include/boost/type_traits/is_scalar.hpp \ + /usr/include/boost/type_traits/is_arithmetic.hpp \ + /usr/include/boost/type_traits/is_integral.hpp \ + /usr/include/boost/type_traits/is_floating_point.hpp \ + /usr/include/boost/type_traits/is_enum.hpp \ + /usr/include/boost/type_traits/is_pointer.hpp \ + /usr/include/boost/type_traits/is_member_pointer.hpp \ + /usr/include/boost/type_traits/is_member_function_pointer.hpp \ + /usr/include/boost/type_traits/detail/is_member_function_pointer_cxx_11.hpp \ + /usr/include/boost/type_traits/remove_const.hpp \ + /usr/include/boost/type_traits/decay.hpp \ + /usr/include/boost/type_traits/is_array.hpp \ + /usr/include/boost/type_traits/remove_bounds.hpp \ + /usr/include/boost/type_traits/remove_extent.hpp \ + /usr/include/boost/type_traits/add_pointer.hpp \ + /usr/include/boost/type_traits/remove_cv.hpp \ + /usr/include/boost/type_traits/is_base_of.hpp \ + /usr/include/boost/type_traits/is_base_and_derived.hpp \ + /usr/include/boost/type_traits/is_same.hpp \ + /usr/include/boost/type_traits/is_class.hpp \ + /usr/include/boost/type_traits/is_const.hpp \ + /usr/include/boost/type_traits/is_constructible.hpp \ + /usr/include/boost/type_traits/is_destructible.hpp \ + /usr/include/boost/type_traits/is_nothrow_move_assignable.hpp \ + /usr/include/boost/type_traits/has_trivial_move_assign.hpp \ + /usr/include/boost/type_traits/is_assignable.hpp \ + /usr/include/boost/type_traits/is_volatile.hpp \ + /usr/include/boost/type_traits/has_nothrow_assign.hpp \ + /usr/include/boost/type_traits/enable_if.hpp \ + /usr/include/boost/type_traits/is_nothrow_move_constructible.hpp \ + /usr/include/boost/move/utility.hpp \ + /usr/include/boost/move/detail/config_begin.hpp \ + /usr/include/boost/move/detail/workaround.hpp \ + /usr/include/boost/move/utility_core.hpp \ + /usr/include/boost/move/core.hpp \ + /usr/include/boost/move/detail/config_end.hpp \ + /usr/include/boost/move/detail/meta_utils.hpp \ + /usr/include/boost/move/detail/meta_utils_core.hpp \ + /usr/include/boost/move/traits.hpp \ + /usr/include/boost/move/detail/type_traits.hpp \ + /usr/include/boost/none.hpp \ + /usr/include/boost/none_t.hpp \ + /usr/include/boost/utility/compare_pointees.hpp \ + /usr/include/c++/11/functional \ + /usr/include/c++/11/tuple \ + /usr/include/c++/11/array \ + /usr/include/c++/11/bits/uses_allocator.h \ + /usr/include/c++/11/bits/invoke.h \ + /usr/include/c++/11/bits/refwrap.h \ + /usr/include/c++/11/bits/std_function.h \ + /usr/include/boost/utility/result_of.hpp \ + /usr/include/boost/preprocessor/cat.hpp \ + /usr/include/boost/preprocessor/config/config.hpp \ + /usr/include/boost/preprocessor/iteration/iterate.hpp \ + /usr/include/boost/preprocessor/arithmetic/dec.hpp \ + /usr/include/boost/preprocessor/config/limits.hpp \ + /usr/include/boost/preprocessor/arithmetic/limits/dec_256.hpp \ + /usr/include/boost/preprocessor/arithmetic/inc.hpp \ + /usr/include/boost/preprocessor/arithmetic/limits/inc_256.hpp \ + /usr/include/boost/preprocessor/array/elem.hpp \ + /usr/include/boost/preprocessor/array/data.hpp \ + /usr/include/boost/preprocessor/tuple/elem.hpp \ + /usr/include/boost/preprocessor/facilities/expand.hpp \ + /usr/include/boost/preprocessor/facilities/overload.hpp \ + /usr/include/boost/preprocessor/variadic/size.hpp \ + /usr/include/boost/preprocessor/control/iif.hpp \ + /usr/include/boost/preprocessor/facilities/check_empty.hpp \ + /usr/include/boost/preprocessor/variadic/has_opt.hpp \ + /usr/include/boost/preprocessor/variadic/limits/size_64.hpp \ + /usr/include/boost/preprocessor/tuple/rem.hpp \ + /usr/include/boost/preprocessor/tuple/detail/is_single_return.hpp \ + /usr/include/boost/preprocessor/variadic/elem.hpp \ + /usr/include/boost/preprocessor/variadic/limits/elem_64.hpp \ + /usr/include/boost/preprocessor/array/size.hpp \ + /usr/include/boost/preprocessor/slot/slot.hpp \ + /usr/include/boost/preprocessor/slot/detail/def.hpp \ + /usr/include/boost/preprocessor/repetition/enum_params.hpp \ + /usr/include/boost/preprocessor/punctuation/comma_if.hpp \ + /usr/include/boost/preprocessor/control/if.hpp \ + /usr/include/boost/preprocessor/logical/bool.hpp \ + /usr/include/boost/preprocessor/logical/limits/bool_256.hpp \ + /usr/include/boost/preprocessor/facilities/empty.hpp \ + /usr/include/boost/preprocessor/punctuation/comma.hpp \ + /usr/include/boost/preprocessor/repetition/repeat.hpp \ + /usr/include/boost/preprocessor/debug/error.hpp \ + /usr/include/boost/preprocessor/detail/auto_rec.hpp \ + /usr/include/boost/preprocessor/detail/limits/auto_rec_256.hpp \ + /usr/include/boost/preprocessor/tuple/eat.hpp \ + /usr/include/boost/preprocessor/repetition/limits/repeat_256.hpp \ + /usr/include/boost/preprocessor/repetition/enum_trailing_params.hpp \ + /usr/include/boost/preprocessor/repetition/enum_binary_params.hpp \ + /usr/include/boost/preprocessor/repetition/enum_shifted_params.hpp \ + /usr/include/boost/preprocessor/facilities/intercept.hpp \ + /usr/include/boost/preprocessor/facilities/limits/intercept_256.hpp \ + /usr/include/boost/type_traits/type_identity.hpp \ + /usr/include/boost/preprocessor/iteration/detail/iter/forward1.hpp \ + /usr/include/boost/preprocessor/iteration/detail/bounds/lower1.hpp \ + /usr/include/boost/preprocessor/slot/detail/shared.hpp \ + /usr/include/boost/preprocessor/iteration/detail/bounds/upper1.hpp \ + /usr/include/boost/preprocessor/iteration/detail/iter/limits/forward1_256.hpp \ + /usr/include/boost/utility/detail/result_of_iterate.hpp \ + /usr/include/boost/optional/optional_fwd.hpp \ + /usr/include/boost/optional/detail/optional_config.hpp \ + /usr/include/boost/optional/detail/optional_factory_support.hpp \ + /usr/include/boost/optional/detail/optional_aligned_storage.hpp \ + /usr/include/boost/optional/detail/optional_trivially_copyable_base.hpp \ + /usr/include/boost/optional/detail/optional_reference_spec.hpp \ + /usr/include/boost/optional/detail/optional_relops.hpp \ + /usr/include/boost/optional/detail/optional_swap.hpp \ + /usr/include/c++/11/cassert \ + /usr/include/c++/11/memory \ + /usr/include/c++/11/bits/stl_uninitialized.h \ + /usr/include/c++/11/bits/stl_tempbuf.h \ + /usr/include/c++/11/bits/stl_raw_storage_iter.h \ + /usr/include/c++/11/bits/align.h \ + /usr/include/c++/11/bit \ + /usr/include/c++/11/bits/unique_ptr.h \ + /usr/include/c++/11/bits/shared_ptr.h \ + /usr/include/c++/11/bits/shared_ptr_base.h \ + /usr/include/c++/11/bits/allocated_ptr.h \ + /usr/include/c++/11/ext/aligned_buffer.h \ + /usr/include/c++/11/ext/concurrence.h \ + /usr/include/c++/11/bits/shared_ptr_atomic.h \ + /usr/include/c++/11/bits/atomic_base.h \ + /usr/include/c++/11/bits/atomic_lockfree_defines.h \ + /usr/include/c++/11/backward/auto_ptr.h \ + /usr/include/c++/11/vector \ + /usr/include/c++/11/bits/stl_vector.h \ + /usr/include/c++/11/bits/stl_bvector.h \ + /usr/include/c++/11/bits/vector.tcc \ + /usr/include/c++/11/map \ + /usr/include/c++/11/bits/stl_tree.h \ + /usr/include/c++/11/bits/stl_map.h \ + /usr/include/c++/11/bits/stl_multimap.h \ + /usr/include/c++/11/bits/erase_if.h \ + /usr/include/c++/11/algorithm \ + /usr/include/c++/11/bits/stl_algo.h \ + /usr/include/c++/11/bits/algorithmfwd.h \ + /usr/include/c++/11/bits/stl_heap.h \ + /usr/include/c++/11/bits/uniform_int_dist.h \ + include/LibLsp/lsp/lsPosition.h \ + include/LibLsp/lsp/lsTextEdit.h \ + include/LibLsp/lsp/lsDocumentUri.h \ + include/LibLsp/lsp/lsResponseError.h \ + /usr/include/c++/11/sstream \ + /usr/include/c++/11/istream \ + /usr/include/c++/11/ios \ + /usr/include/c++/11/bits/ios_base.h \ + /usr/include/c++/11/bits/locale_classes.h \ + /usr/include/c++/11/bits/locale_classes.tcc \ + /usr/include/c++/11/system_error \ + /usr/include/c++/11/x86_64-redhat-linux/bits/error_constants.h \ + /usr/include/c++/11/streambuf \ + /usr/include/c++/11/bits/streambuf.tcc \ + /usr/include/c++/11/bits/basic_ios.h \ + /usr/include/c++/11/bits/locale_facets.h \ + /usr/include/c++/11/cwctype \ + /usr/include/wctype.h \ + /usr/include/bits/wctype-wchar.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/ctype_base.h \ + /usr/include/c++/11/bits/streambuf_iterator.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/ctype_inline.h \ + /usr/include/c++/11/bits/locale_facets.tcc \ + /usr/include/c++/11/bits/basic_ios.tcc \ + /usr/include/c++/11/ostream \ + /usr/include/c++/11/bits/ostream.tcc \ + /usr/include/c++/11/bits/istream.tcc \ + /usr/include/c++/11/bits/sstream.tcc \ + include/LibLsp/lsp/lsAny.h \ + include/LibLsp/JsonRpc/message.h \ + /usr/include/c++/11/atomic \ + /usr/include/c++/11/iostream \ + include/LibLsp/lsp/method_type.h \ + include/LibLsp/lsp/location_type.h \ + include/LibLsp/JsonRpc/RequestInMessage.h \ + /usr/include/c++/11/mutex \ + /usr/include/c++/11/chrono \ + /usr/include/c++/11/ratio \ + /usr/include/c++/11/limits \ + /usr/include/c++/11/ctime \ + /usr/include/c++/11/bits/parse_numbers.h \ + /usr/include/c++/11/bits/std_mutex.h \ + /usr/include/c++/11/bits/unique_lock.h \ + include/LibLsp/JsonRpc/lsRequestId.h \ + include/LibLsp/JsonRpc/lsResponseMessage.h \ + include/LibLsp/lsp/AbsolutePath.h \ + include/LibLsp/lsp/textDocument/did_change.h \ + include/LibLsp/JsonRpc/NotificationInMessage.h \ + include/LibLsp/lsp/lsVersionedTextDocumentIdentifier.h \ + include/LibLsp/lsp/lsTextDocumentIdentifier.h \ + include/LibLsp/lsp/textDocument/did_close.h \ + include/LibLsp/lsp/textDocument/did_open.h \ + include/LibLsp/lsp/lsTextDocumentItem.h \ + include/LibLsp/lsp/Directory.h \ + /usr/include/c++/11/climits \ + /usr/lib/gcc/x86_64-redhat-linux/11/include/limits.h \ + /usr/lib/gcc/x86_64-redhat-linux/11/include/syslimits.h \ + /usr/include/limits.h \ + /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h \ + /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h \ + /usr/include/bits/xopen_lim.h \ + /usr/include/bits/uio_lim.h \ + /usr/include/c++/11/numeric \ + /usr/include/c++/11/bits/stl_numeric.h \ + include/LibLsp/lsp/utils.h \ + /usr/include/c++/11/codecvt \ + /usr/include/c++/11/bits/codecvt.h \ + /usr/include/c++/11/iterator \ + /usr/include/c++/11/bits/stream_iterator.h \ + /usr/include/c++/11/locale \ + /usr/include/c++/11/bits/locale_facets_nonio.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/time_members.h \ + /usr/include/c++/11/x86_64-redhat-linux/bits/messages_members.h \ + /usr/include/libintl.h \ + /usr/include/c++/11/bits/locale_facets_nonio.tcc \ + /usr/include/c++/11/bits/locale_conv.h + + +third_party/utfcpp/source/utf8/unchecked.h: + +third_party/utfcpp/source/utf8/core.h: + +third_party/utfcpp/source/utf8/checked.h: + +third_party/utfcpp/source/utf8.h: + +/usr/include/sys/random.h: + +/usr/include/boost/uuid/detail/random_provider_getrandom.ipp: + +/usr/include/boost/uuid/detail/random_provider_detect_platform.hpp: + +/usr/include/boost/uuid/entropy_error.hpp: + +/usr/include/boost/uuid/detail/random_provider.hpp: + +/usr/include/boost/function_types/detail/to_sequence.hpp: + +/usr/include/boost/function_types/detail/synthesize_impl/arity10_1.hpp: + +/usr/include/boost/function_types/detail/synthesize_impl/arity10_0.hpp: + +/usr/include/boost/function_types/detail/cv_traits.hpp: + +/usr/include/boost/function_types/member_function_pointer.hpp: + +/usr/include/boost/tti/detail/dptmf.hpp: + +/usr/include/boost/tti/detail/denclosing_type.hpp: + +/usr/include/boost/tti/gen/namespace_gen.hpp: + +/usr/include/boost/function_types/is_callable_builtin.hpp: + +/usr/include/boost/detail/templated_streams.hpp: + +/usr/include/boost/tti/detail/dftclass.hpp: + +/usr/include/boost/tti/detail/dcomp_mem_fun.hpp: + +/usr/include/boost/function_types/detail/pp_retag_default_cc/preprocessed.hpp: + +/usr/include/boost/mpl/aux_/preprocessed/gcc/bitand.hpp: + +/usr/include/boost/mpl/bitand.hpp: + +/usr/include/boost/function_types/detail/components_as_mpl_sequence.hpp: + +/usr/include/boost/function_types/detail/components_impl/arity20_1.hpp: + +/usr/include/boost/function_types/detail/components_impl/arity10_0.hpp: + +/usr/include/boost/function_types/detail/components_impl/arity20_0.hpp: + +/usr/include/boost/function_types/detail/pp_arity_loop.hpp: + +/usr/include/boost/function_types/config/config.hpp: + +/usr/include/boost/mpl/same_as.hpp: + +/usr/include/boost/function_types/components.hpp: + +/usr/include/boost/tti/detail/dmem_fun.hpp: + +/usr/include/boost/tti/detail/ddeftype.hpp: + +/usr/include/boost/function_types/detail/encoding/undef.hpp: + +/usr/include/boost/function_types/detail/encoding/aliases_undef.hpp: + +/usr/include/boost/function_types/detail/pp_tags/cc_tag.hpp: + +/usr/include/boost/function_types/detail/pp_cc_loop/preprocessed.hpp: + +/usr/include/boost/function_types/detail/encoding/aliases_def.hpp: + +/usr/include/boost/function_types/detail/encoding/def.hpp: + +/usr/include/boost/preprocessor/punctuation/paren.hpp: + +/usr/include/boost/function_types/detail/pp_tags/preprocessed.hpp: + +/usr/include/boost/mpl/aux_/preprocessed/gcc/bitxor.hpp: + +/usr/include/boost/function_types/property_tags.hpp: + +/usr/include/boost/tti/has_member_function.hpp: + +/usr/include/boost/random/detail/uniform_int_float.hpp: + +/usr/include/boost/random/detail/operators.hpp: + +/usr/include/boost/random/detail/polynomial.hpp: + +/usr/include/boost/random/detail/enable_warnings.hpp: + +/usr/include/boost/random/detail/disable_warnings.hpp: + +/usr/include/boost/integer/integer_log2.hpp: + +/usr/include/boost/random/detail/integer_log2.hpp: + +/usr/include/boost/random/detail/large_arithmetic.hpp: + +/usr/include/boost/random/detail/ptr_helper.hpp: + +/usr/include/boost/integer/integer_mask.hpp: + +/usr/include/boost/uuid/basic_name_generator.hpp: + +/usr/include/boost/uuid/name_generator_sha1.hpp: + +/usr/include/boost/uuid/uuid_generators.hpp: + +/usr/lib/gcc/x86_64-redhat-linux/11/include/mm_malloc.h: + +/usr/lib/gcc/x86_64-redhat-linux/11/include/mmintrin.h: + +/usr/lib/gcc/x86_64-redhat-linux/11/include/emmintrin.h: + +/usr/include/boost/uuid/detail/config.hpp: + +/usr/include/boost/uuid/uuid.hpp: + +/usr/include/c++/11/codecvt: + +include/LibLsp/lsp/utils.h: + +third_party/uri/include/network/uri/detail/translate.hpp: + +third_party/uri/include/network/uri/detail/uri_parts.hpp: + +third_party/uri/include/network/uri/config.hpp: + +third_party/uri/include/network/uri/uri.hpp: + +third_party/uri/include/network/uri/uri_builder.hpp: + +include/LibLsp/lsp/Directory.h: + +include/LibLsp/lsp/AbsolutePath.h: + +include/LibLsp/lsp/lru_cache.h: + +src/lsp/lsp.cpp: + +include/LibLsp/lsp/workspace/configuration.h: + +include/LibLsp/lsp/textDocument/semanticHighlighting.h: + +include/LibLsp/lsp/textDocument/didRenameFiles.h: + +include/LibLsp/lsp/client/unregisterCapability.h: + +include/LibLsp/lsp/client/registerCapability.h: + +include/LibLsp/lsp/windows/MessageNotify.h: + +include/LibLsp/lsp/textDocument/publishDiagnostics.h: + +include/LibLsp/lsp/textDocument/did_save.h: + +include/LibLsp/lsp/extention/jdtls/projectConfigurationUpdate.h: + +include/LibLsp/lsp/general/initialized.h: + +include/LibLsp/lsp/general/exit.h: + +include/LibLsp/lsp/extention/jdtls/Move.h: + +include/LibLsp/lsp/extention/jdtls/getMoveDestinations.h: + +include/LibLsp/lsp/extention/jdtls/generateToString.h: + +include/LibLsp/lsp/extention/jdtls/generateHashCodeEquals.h: + +include/LibLsp/lsp/extention/jdtls/resolveUnimplementedAccessors.h: + +include/LibLsp/lsp/extention/jdtls/generateAccessors.h: + +include/LibLsp/lsp/extention/jdtls/getRefactorEdit.h: + +include/LibLsp/lsp/extention/jdtls/findLinks.h: + +include/LibLsp/lsp/extention/jdtls/executeCommand.h: + +include/LibLsp/lsp/extention/jdtls/checkToStringStatus.h: + +include/LibLsp/lsp/extention/jdtls/addOverridableMethods.h: + +include/LibLsp/lsp/extention/jdtls/listOverridableMethods.h: + +include/LibLsp/lsp/extention/jdtls/classFileContents.h: + +include/LibLsp/lsp/textDocument/selectionRange.h: + +include/LibLsp/lsp/textDocument/callHierarchy.h: + +include/LibLsp/lsp/textDocument/resolveTypeHierarchy.h: + +include/LibLsp/lsp/textDocument/prepareRename.h: + +include/LibLsp/lsp/textDocument/foldingRange.h: + +include/LibLsp/lsp/textDocument/colorPresentation.h: + +include/LibLsp/lsp/textDocument/declaration_definition.h: + +include/LibLsp/lsp/workspace/symbol.h: + +include/LibLsp/lsp/textDocument/rename.h: + +include/LibLsp/lsp/textDocument/implementation.h: + +include/LibLsp/lsp/textDocument/hover.h: + +include/LibLsp/lsp/lsFormattingOptions.h: + +include/LibLsp/lsp/textDocument/highlight.h: + +include/LibLsp/lsp/textDocument/did_close.h: + +/usr/include/c++/11/bits/regex.tcc: + +/usr/include/c++/11/bits/regex.h: + +/usr/include/c++/11/bits/regex_compiler.tcc: + +/usr/include/c++/11/bits/regex_compiler.h: + +/usr/include/c++/11/bits/regex_scanner.tcc: + +/usr/include/c++/11/bits/regex_automaton.tcc: + +/usr/include/c++/11/stack: + +/usr/include/c++/11/regex: + +include/LibLsp/lsp/lsTextDocumentEdit.h: + +include/LibLsp/lsp/lsWorkspaceEdit.h: + +include/LibLsp/lsp/lsCodeAction.h: + +include/LibLsp/lsp/workspace/execute_command.h: + +include/LibLsp/lsp/CodeActionParams.h: + +include/LibLsp/lsp/lsTextDocumentIdentifier.h: + +include/LibLsp/lsp/textDocument/SemanticTokens.h: + +include/LibLsp/lsp/general/lsServerCapabilities.h: + +include/LibLsp/lsp/workspace/workspaceFolders.h: + +include/LibLsp/lsp/lsCommand.h: + +include/LibLsp/lsp/lsMarkedString.h: + +include/LibLsp/lsp/general/lsTextDocumentClientCapabilities.h: + +include/LibLsp/lsp/general/initialize.h: + +include/LibLsp/lsp/ProtocolJsonHandler.h: + +src/lsp/ProtocolJsonHandler.cpp: + +/usr/include/c++/11/bits/this_thread_sleep.h: + +/usr/include/boost/mpl/remove.hpp: + +/usr/include/c++/11/thread: + +include/LibLsp/lsp/SimpleTimer.h: + +include/LibLsp/lsp/ProcessIoService.h: + +/usr/include/boost/process/detail/posix/start_dir.hpp: + +/usr/include/boost/process/start_dir.hpp: + +/usr/include/boost/process/spawn.hpp: + +/usr/include/boost/token_functions.hpp: + +/usr/include/boost/tokenizer.hpp: + +/usr/include/boost/process/search_path.hpp: + +/usr/include/boost/process/detail/posix/pipe_out.hpp: + +/usr/include/boost/process/detail/posix/file_out.hpp: + +/usr/include/boost/process/detail/posix/file_in.hpp: + +/usr/include/boost/process/detail/posix/null_out.hpp: + +/usr/include/boost/process/detail/posix/file_descriptor.hpp: + +/usr/include/boost/process/detail/posix/close_in.hpp: + +/usr/include/boost/process/handles.hpp: + +/usr/include/boost/process/exe.hpp: + +/usr/include/boost/process/detail/posix/env_init.hpp: + +/usr/include/boost/process/detail/posix/environment.hpp: + +/usr/include/boost/process/environment.hpp: + +/usr/include/boost/process/env.hpp: + +/usr/include/boost/process/cmd.hpp: + +/usr/include/boost/process/detail/posix/group_handle.hpp: + +/usr/include/boost/process/group.hpp: + +/usr/include/boost/process/detail/async_handler.hpp: + +/usr/include/boost/process/detail/posix/signal.hpp: + +/usr/include/boost/process/detail/posix/fd.hpp: + +/usr/include/boost/fusion/adapted/std_tuple/detail/convert_impl.hpp: + +include/LibLsp/lsp/extention/jdtls/generateConstructors.h: + +/usr/include/boost/fusion/adapted/std_tuple/detail/value_at_impl.hpp: + +/usr/include/boost/fusion/adapted/std_tuple/detail/at_impl.hpp: + +/usr/include/boost/fusion/adapted/std_tuple/detail/end_impl.hpp: + +third_party/uri/include/network/uri/detail/decode.hpp: + +/usr/include/boost/fusion/adapted/std_tuple/std_tuple_iterator.hpp: + +/usr/include/boost/fusion/adapted/std_tuple/detail/category_of_impl.hpp: + +/usr/include/boost/fusion/adapted/std_tuple/detail/is_sequence_impl.hpp: + +/usr/include/boost/fusion/adapted/std_tuple/detail/is_view_impl.hpp: + +/usr/include/boost/fusion/tuple/make_tuple.hpp: + +/usr/include/boost/fusion/tuple/tuple.hpp: + +/usr/include/boost/fusion/sequence/io/detail/out.hpp: + +/usr/include/boost/fusion/sequence/io/out.hpp: + +/usr/include/boost/fusion/sequence/io/detail/manip.hpp: + +/usr/include/boost/fusion/sequence/io/detail/in.hpp: + +/usr/include/boost/fusion/sequence/intrinsic/at_key.hpp: + +/usr/include/boost/fusion/sequence/intrinsic/back.hpp: + +/usr/include/boost/fusion/sequence/comparison/greater_equal.hpp: + +/usr/include/boost/fusion/sequence/comparison/detail/less.hpp: + +/usr/include/boost/fusion/sequence/comparison/less.hpp: + +/usr/include/boost/fusion/sequence/comparison/greater.hpp: + +/usr/include/boost/fusion/sequence/sequence_facade.hpp: + +/usr/include/boost/fusion/container/generation/make_set.hpp: + +/usr/include/boost/fusion/container/generation/vector_tie.hpp: + +/usr/include/boost/fusion/container/generation/make_vector.hpp: + +/usr/include/boost/fusion/container/generation/map_tie.hpp: + +/usr/include/boost/fusion/container/generation/make_list.hpp: + +/usr/include/boost/fusion/container/generation/make_cons.hpp: + +/usr/include/boost/fusion/container/generation/list_tie.hpp: + +/usr/include/boost/fusion/container/generation/ignore.hpp: + +/usr/include/boost/fusion/container/generation/cons_tie.hpp: + +/usr/include/boost/fusion/container/generation/deque_tie.hpp: + +/usr/include/boost/fusion/container/deque/front_extended_deque.hpp: + +/usr/include/boost/fusion/container/deque/detail/convert_impl.hpp: + +/usr/include/boost/fusion/container/deque/convert.hpp: + +/usr/include/boost/fusion/container/deque/detail/end_impl.hpp: + +/usr/include/boost/fusion/container/deque/deque_iterator.hpp: + +/usr/include/boost/function_types/detail/synthesize_impl/arity20_1.hpp: + +/usr/include/boost/fusion/container/deque/detail/begin_impl.hpp: + +/usr/include/boost/fusion/container/deque/detail/value_at_impl.hpp: + +/usr/include/boost/fusion/container/deque/detail/deque_keyed_values.hpp: + +/usr/include/boost/fusion/container/deque/detail/keyed_element.hpp: + +/usr/include/boost/fusion/container/deque/deque.hpp: + +/usr/include/boost/fusion/container/set.hpp: + +/usr/include/boost/fusion/container/map/convert.hpp: + +/usr/include/boost/fusion/sequence/intrinsic/at_c.hpp: + +/usr/include/boost/fusion/container/map/detail/value_at_key_impl.hpp: + +/usr/include/boost/fusion/container/map/detail/value_at_impl.hpp: + +/usr/include/boost/fusion/container/map/detail/at_key_impl.hpp: + +/usr/include/boost/fusion/container/map/map_iterator.hpp: + +/usr/include/boost/fusion/container/map/detail/begin_impl.hpp: + +/usr/include/boost/fusion/support/pair.hpp: + +/usr/include/boost/fusion/container/map.hpp: + +/usr/include/boost/fusion/container/list/detail/convert_impl.hpp: + +/usr/include/boost/fusion/container/list/detail/list_to_cons.hpp: + +/usr/include/boost/fusion/container/list/list.hpp: + +/usr/include/boost/fusion/view/flatten_view/flatten_view_iterator.hpp: + +/usr/include/boost/mpl/aux_/single_element_iter.hpp: + +/usr/include/boost/fusion/view/flatten_view/flatten_view.hpp: + +/usr/include/boost/mpl/vector/aux_/preprocessed/typeof_based/vector20.hpp: + +/usr/include/boost/mpl/vector/aux_/include_preprocessed.hpp: + +/usr/include/boost/mpl/vector/aux_/begin_end.hpp: + +/usr/include/boost/mpl/vector/aux_/O1_size.hpp: + +/usr/include/boost/mpl/vector/aux_/vector0.hpp: + +/usr/include/boost/mpl/vector/aux_/clear.hpp: + +/usr/include/boost/mpl/vector/aux_/push_back.hpp: + +include/LibLsp/lsp/textDocument/code_action.h: + +/usr/include/boost/mpl/vector/aux_/item.hpp: + +/usr/include/boost/mpl/vector/aux_/push_front.hpp: + +third_party/uri/include/network/optional.hpp: + +/usr/include/boost/mpl/vector/aux_/front.hpp: + +/usr/include/boost/mpl/aux_/config/typeof.hpp: + +/usr/include/boost/mpl/vector/aux_/at.hpp: + +/usr/include/boost/mpl/vector/vector0.hpp: + +/usr/include/boost/mpl/vector/vector10.hpp: + +/usr/include/boost/mpl/vector/vector20.hpp: + +/usr/include/boost/mpl/vector.hpp: + +/usr/include/boost/mpl/front_inserter.hpp: + +/usr/include/boost/mpl/back_inserter.hpp: + +/usr/include/boost/process/system.hpp: + +/usr/include/boost/mpl/iterator_category.hpp: + +/usr/include/boost/mpl/pair_view.hpp: + +/usr/include/boost/fusion/view/zip_view/detail/equal_to_impl.hpp: + +/usr/include/boost/fusion/view/zip_view/detail/value_of_impl.hpp: + +/usr/include/boost/fusion/view/zip_view/detail/distance_impl.hpp: + +/usr/include/boost/fusion/view/zip_view/detail/advance_impl.hpp: + +/usr/include/boost/fusion/view/zip_view/detail/next_impl.hpp: + +/usr/include/boost/fusion/view/zip_view/detail/deref_impl.hpp: + +/usr/include/boost/fusion/view/zip_view/zip_view_iterator.hpp: + +/usr/include/boost/mpl/aux_/iter_fold_if_impl.hpp: + +/usr/include/boost/mpl/pair.hpp: + +/usr/include/boost/mpl/iter_fold_if.hpp: + +/usr/include/boost/mpl/aux_/transform_iter.hpp: + +/usr/include/boost/fusion/algorithm/transformation/remove.hpp: + +/usr/include/boost/fusion/view/zip_view/detail/value_at_impl.hpp: + +/usr/include/boost/fusion/view/zip_view/detail/size_impl.hpp: + +/usr/include/boost/fusion/sequence/intrinsic/front.hpp: + +/usr/include/boost/fusion/view/zip_view/detail/end_impl.hpp: + +/usr/include/boost/fusion/view/zip_view/zip_view.hpp: + +include/LibLsp/lsp/textDocument/resolveCompletionItem.h: + +/usr/include/boost/fusion/view/zip_view.hpp: + +/usr/include/boost/fusion/view/reverse_view/detail/end_impl.hpp: + +/usr/include/boost/fusion/view/reverse_view/detail/begin_impl.hpp: + +/usr/include/boost/fusion/view/reverse_view/detail/value_of_data_impl.hpp: + +/usr/include/boost/fusion/view/reverse_view/detail/deref_data_impl.hpp: + +/usr/include/boost/fusion/view/reverse_view/detail/value_of_impl.hpp: + +/usr/include/boost/fusion/view/reverse_view/detail/advance_impl.hpp: + +/usr/include/boost/fusion/view/reverse_view/detail/next_impl.hpp: + +/usr/include/boost/fusion/view/reverse_view/reverse_view_iterator.hpp: + +/usr/include/boost/fusion/view/reverse_view/reverse_view.hpp: + +/usr/include/boost/fusion/view/nview/detail/distance_impl.hpp: + +/usr/include/boost/fusion/view/nview/detail/advance_impl.hpp: + +/usr/include/boost/fusion/view/nview/detail/value_at_impl.hpp: + +/usr/include/boost/fusion/view/nview/detail/at_impl.hpp: + +/usr/include/boost/fusion/view/nview/detail/next_impl.hpp: + +/usr/include/boost/fusion/view/nview/detail/value_of_impl.hpp: + +/usr/include/boost/fusion/view/nview/detail/begin_impl.hpp: + +/usr/include/boost/fusion/view/nview/detail/size_impl.hpp: + +/usr/include/boost/fusion/view/nview/nview_iterator.hpp: + +/usr/include/boost/fusion/view/nview/detail/nview_impl.hpp: + +/usr/include/boost/fusion/view/nview.hpp: + +/usr/include/boost/fusion/view/filter_view.hpp: + +/usr/include/boost/fusion/view.hpp: + +/usr/include/boost/process/pipe.hpp: + +/usr/include/boost/fusion/container/set/detail/convert_impl.hpp: + +/usr/include/boost/fusion/container/set/detail/value_of_data_impl.hpp: + +/usr/include/boost/fusion/container/set/detail/key_of_impl.hpp: + +/usr/include/boost/fusion/container/set/detail/deref_impl.hpp: + +/usr/include/boost/fusion/container/set/detail/deref_data_impl.hpp: + +/usr/include/boost/fusion/container/set/detail/value_of_impl.hpp: + +/usr/include/boost/fusion/iterator/basic_iterator.hpp: + +/usr/include/boost/fusion/container/set/detail/begin_impl.hpp: + +/usr/include/boost/fusion/container/set/set.hpp: + +/usr/include/boost/fusion/container/set/convert.hpp: + +/usr/include/boost/fusion/sequence/comparison/enable_comparison.hpp: + +/usr/include/boost/fusion/support/as_const.hpp: + +/usr/include/boost/mpl/transform.hpp: + +/usr/include/boost/fusion/sequence/comparison/detail/equal_to.hpp: + +/usr/include/boost/fusion/sequence/comparison/equal_to.hpp: + +/usr/include/boost/fusion/algorithm/query/detail/segmented_find_if.hpp: + +/usr/include/boost/fusion/algorithm/query/find_if.hpp: + +/usr/include/boost/process/detail/posix/executor.hpp: + +/usr/include/boost/fusion/container/deque/detail/build_deque.hpp: + +/usr/include/boost/process/detail/child_decl.hpp: + +/usr/include/boost/process/child.hpp: + +/usr/include/boost/process/async_system.hpp: + +/usr/include/boost/process/detail/posix/async_out.hpp: + +/usr/include/boost/process/detail/posix/asio_fwd.hpp: + +/usr/include/bits/dirent.h: + +/usr/include/boost/fusion/include/for_each.hpp: + +/usr/include/c++/11/bits/fstream.tcc: + +/usr/include/c++/11/x86_64-redhat-linux/bits/c++io.h: + +/usr/include/c++/11/x86_64-redhat-linux/bits/basic_file.h: + +/usr/include/boost/fusion/sequence.hpp: + +/usr/include/boost/filesystem/file_status.hpp: + +/usr/include/boost/filesystem/directory.hpp: + +/usr/include/boost/smart_ptr/detail/atomic_count_gcc_atomic.hpp: + +/usr/include/boost/smart_ptr/detail/atomic_count.hpp: + +/usr/include/boost/smart_ptr/intrusive_ref_counter.hpp: + +/usr/include/boost/process/detail/posix/basic_pipe.hpp: + +/usr/include/boost/process/detail/posix/child_handle.hpp: + +/usr/include/boost/process/detail/posix/is_running.hpp: + +/usr/include/boost/fusion/view/transform_view.hpp: + +/usr/include/boost/fusion/container/vector/detail/equal_to_impl.hpp: + +/usr/include/boost/fusion/container/vector/detail/next_impl.hpp: + +/usr/include/boost/fusion/container/vector/detail/value_of_impl.hpp: + +/usr/include/boost/fusion/container/vector/vector_iterator.hpp: + +/usr/include/boost/fusion/container/vector/detail/begin_impl.hpp: + +/usr/include/boost/fusion/container/vector/detail/value_at_impl.hpp: + +/usr/include/boost/fusion/container/vector/detail/at_impl.hpp: + +/usr/include/boost/fusion/support/detail/index_sequence.hpp: + +/usr/include/boost/fusion/container/vector/vector.hpp: + +/usr/include/c++/11/bits/stl_stack.h: + +/usr/include/boost/fusion/algorithm/iteration/detail/segmented_fold.hpp: + +/usr/include/boost/fusion/algorithm/iteration/detail/preprocessed/fold.hpp: + +/usr/include/boost/fusion/algorithm/iteration/fold_fwd.hpp: + +/usr/include/boost/fusion/algorithm/iteration/fold.hpp: + +/usr/include/boost/fusion/mpl/push_front.hpp: + +/usr/include/boost/mpl/push_back_fwd.hpp: + +/usr/include/boost/fusion/mpl/push_back.hpp: + +/usr/include/boost/mpl/pop_front_fwd.hpp: + +/usr/include/boost/fusion/mpl/pop_front.hpp: + +/usr/include/boost/fusion/iterator/iterator_adapter.hpp: + +/usr/include/boost/fusion/algorithm/transformation/pop_back.hpp: + +/usr/include/boost/mpl/aux_/pop_back_impl.hpp: + +/usr/include/boost/mpl/pop_back_fwd.hpp: + +/usr/include/boost/mpl/pop_back.hpp: + +/usr/include/boost/mpl/aux_/joint_iter.hpp: + +/usr/include/boost/mpl/joint_view.hpp: + +/usr/include/boost/mpl/aux_/insert_range_impl.hpp: + +/usr/include/boost/mpl/insert_range_fwd.hpp: + +/usr/include/boost/mpl/insert_range.hpp: + +/usr/include/boost/fusion/mpl/insert_range.hpp: + +/usr/include/boost/fusion/algorithm/transformation/insert.hpp: + +/usr/include/boost/fusion/view/flatten_view.hpp: + +/usr/include/boost/mpl/aux_/insert_impl.hpp: + +/usr/include/boost/mpl/insert.hpp: + +/usr/include/boost/fusion/mpl/insert.hpp: + +/usr/include/boost/mpl/aux_/front_impl.hpp: + +/usr/include/boost/mpl/front.hpp: + +/usr/include/boost/filesystem/convenience.hpp: + +/usr/include/boost/fusion/mpl/front.hpp: + +/usr/include/boost/fusion/algorithm/query/find_fwd.hpp: + +/usr/include/boost/fusion/algorithm/query/detail/segmented_find.hpp: + +/usr/include/boost/mpl/aux_/erase_key_impl.hpp: + +/usr/include/boost/random/detail/seed.hpp: + +/usr/include/boost/mpl/erase_key_fwd.hpp: + +/usr/include/boost/mpl/aux_/preprocessed/gcc/reverse_fold_impl.hpp: + +/usr/include/boost/mpl/aux_/erase_impl.hpp: + +/usr/include/boost/process/detail/handler.hpp: + +/usr/include/boost/fusion/mpl/empty.hpp: + +/usr/include/boost/fusion/container/deque/deque_fwd.hpp: + +/usr/include/boost/fusion/container/set/set_fwd.hpp: + +/usr/include/boost/fusion/container/vector/vector_fwd.hpp: + +/usr/include/boost/fusion/mpl/detail/clear.hpp: + +/usr/include/boost/mpl/clear_fwd.hpp: + +/usr/include/boost/mpl/clear.hpp: + +/usr/include/boost/mpl/min.hpp: + +/usr/include/boost/fusion/mpl/clear.hpp: + +/usr/include/boost/mpl/aux_/back_impl.hpp: + +/usr/include/boost/mpl/back_fwd.hpp: + +/usr/include/boost/mpl/back.hpp: + +include/LibLsp/lsp/textDocument/code_lens.h: + +/usr/include/boost/mpl/aux_/empty_impl.hpp: + +/usr/include/boost/mpl/empty.hpp: + +/usr/include/boost/fusion/adapted/mpl/detail/empty_impl.hpp: + +/usr/include/boost/fusion/adapted/mpl/detail/category_of_impl.hpp: + +/usr/include/boost/mpl/aux_/has_key_impl.hpp: + +/usr/include/boost/mpl/has_key_fwd.hpp: + +/usr/include/boost/mpl/has_key.hpp: + +/usr/include/boost/fusion/adapted/mpl/detail/has_key_impl.hpp: + +include/LibLsp/lsp/textDocument/formatting.h: + +/usr/include/boost/mpl/aux_/at_impl.hpp: + +/usr/include/boost/fusion/container/list/convert.hpp: + +/usr/include/boost/mpl/at.hpp: + +/usr/include/boost/fusion/adapted/mpl/detail/value_at_impl.hpp: + +/usr/include/boost/mpl/size_fwd.hpp: + +/usr/include/boost/mpl/size.hpp: + +/usr/include/boost/process/detail/posix/pipe_in.hpp: + +/usr/include/boost/fusion/adapted/mpl/detail/size_impl.hpp: + +/usr/include/boost/fusion/adapted/mpl/detail/is_sequence_impl.hpp: + +/usr/include/boost/fusion/mpl.hpp: + +/usr/include/boost/fusion/view/detail/strictest_traversal.hpp: + +/usr/include/boost/fusion/sequence/intrinsic/at.hpp: + +/usr/include/boost/fusion/view/transform_view/detail/end_impl.hpp: + +/usr/include/boost/fusion/view/transform_view/transform_view_fwd.hpp: + +/usr/include/boost/fusion/view/transform_view/detail/equal_to_impl.hpp: + +/usr/include/boost/fusion/view/transform_view/detail/distance_impl.hpp: + +/usr/include/boost/fusion/view/transform_view/detail/prior_impl.hpp: + +/usr/include/boost/fusion/view/transform_view/detail/next_impl.hpp: + +/usr/include/boost/mpl/remove_if.hpp: + +/usr/include/boost/fusion/view/transform_view/detail/deref_impl.hpp: + +/usr/include/boost/fusion/algorithm/transformation/transform.hpp: + +/usr/include/boost/fusion/view/filter_view/detail/size_impl.hpp: + +/usr/include/boost/fusion/view/filter_view/detail/end_impl.hpp: + +/usr/include/boost/fusion/view/filter_view/detail/begin_impl.hpp: + +/usr/include/boost/fusion/view/filter_view/detail/key_of_impl.hpp: + +/usr/include/boost/fusion/view/filter_view/detail/value_of_data_impl.hpp: + +/usr/include/boost/fusion/view/filter_view/detail/deref_data_impl.hpp: + +/usr/include/boost/fusion/view/filter_view/detail/value_of_impl.hpp: + +/usr/include/boost/fusion/view/filter_view/detail/deref_impl.hpp: + +/usr/include/boost/fusion/algorithm/query/detail/find_if.hpp: + +/usr/include/boost/fusion/view/filter_view/filter_view_iterator.hpp: + +/usr/include/boost/fusion/algorithm/transformation/filter_if.hpp: + +/usr/include/boost/fusion/algorithm/iteration/for_each_fwd.hpp: + +/usr/include/boost/fusion/iterator/detail/segment_sequence.hpp: + +/usr/include/boost/fusion/view/single_view/detail/value_at_impl.hpp: + +/usr/include/boost/fusion/view/single_view/detail/size_impl.hpp: + +/usr/include/boost/fusion/view/single_view/detail/begin_impl.hpp: + +/usr/include/boost/fusion/view/single_view/detail/at_impl.hpp: + +/usr/include/boost/fusion/view/single_view/detail/equal_to_impl.hpp: + +/usr/include/boost/mpl/aux_/preprocessed/gcc/minus.hpp: + +/usr/include/boost/mpl/minus.hpp: + +/usr/include/boost/fusion/view/single_view/detail/advance_impl.hpp: + +/usr/include/boost/fusion/view/single_view/detail/next_impl.hpp: + +/usr/include/boost/fusion/view/nview/detail/deref_impl.hpp: + +/usr/include/boost/fusion/view/single_view/single_view_iterator.hpp: + +/usr/include/boost/mpl/aux_/preprocessed/gcc/inherit.hpp: + +/usr/include/boost/mpl/inherit.hpp: + +/usr/include/boost/fusion/view/joint_view/detail/end_impl.hpp: + +/usr/include/boost/fusion/view/joint_view/detail/value_of_impl.hpp: + +/usr/include/boost/fusion/view/joint_view/detail/next_impl.hpp: + +/usr/include/boost/fusion/view/joint_view/detail/deref_impl.hpp: + +/usr/include/boost/mpl/end.hpp: + +/usr/include/boost/fusion/adapted/mpl/detail/end_impl.hpp: + +/usr/include/boost/mpl/iterator_tags.hpp: + +/usr/include/boost/fusion/iterator/detail/adapt_value_traits.hpp: + +/usr/include/boost/fusion/iterator/mpl/fusion_iterator.hpp: + +/usr/include/boost/mpl/begin.hpp: + +/usr/include/boost/mpl/iterator_range.hpp: + +/usr/include/boost/mpl/aux_/preprocessed/gcc/iter_fold_impl.hpp: + +/usr/include/boost/mpl/distance.hpp: + +/usr/include/boost/mpl/aux_/preprocessed/gcc/advance_backward.hpp: + +/usr/include/boost/blank_fwd.hpp: + +/usr/include/boost/mpl/aux_/advance_backward.hpp: + +/usr/include/boost/mpl/aux_/advance_forward.hpp: + +/usr/include/boost/mpl/negate.hpp: + +/usr/include/boost/mpl/prior.hpp: + +/usr/include/boost/fusion/adapted/mpl/mpl_iterator.hpp: + +/usr/include/boost/fusion/adapted/mpl/detail/begin_impl.hpp: + +/usr/include/boost/mpl/size_t_fwd.hpp: + +/usr/include/boost/mpl/size_t.hpp: + +/usr/include/boost/mpl/aux_/preprocessed/gcc/plus.hpp: + +/usr/include/boost/mpl/plus.hpp: + +/usr/include/boost/mpl/aux_/preprocessed/gcc/fold_impl.hpp: + +/usr/include/boost/mpl/aux_/fold_impl.hpp: + +/usr/include/boost/mpl/long.hpp: + +/usr/include/boost/mpl/O1_size_fwd.hpp: + +/usr/include/boost/mpl/O1_size.hpp: + +/usr/include/boost/mpl/fold.hpp: + +/usr/include/sys/wait.h: + +/usr/include/boost/mpl/aux_/pop_front_impl.hpp: + +/usr/include/boost/fusion/sequence/intrinsic/detail/segmented_size.hpp: + +/usr/include/boost/fusion/adapted/mpl/detail/is_view_impl.hpp: + +/usr/include/boost/fusion/view/joint_view/joint_view_fwd.hpp: + +/usr/include/boost/random/detail/config.hpp: + +/usr/include/boost/fusion/view/joint_view/joint_view.hpp: + +/usr/include/boost/fusion/support/detail/as_fusion_element.hpp: + +/usr/include/boost/fusion/algorithm/transformation/push_back.hpp: + +/usr/include/boost/fusion/view/iterator_range/detail/segmented_iterator_range.hpp: + +/usr/include/boost/fusion/container/map/detail/map_impl.hpp: + +/usr/include/boost/fusion/view/iterator_range/detail/segments_impl.hpp: + +/usr/include/boost/fusion/view/iterator_range/detail/value_at_impl.hpp: + +/usr/include/boost/fusion/view/iterator_range/detail/size_impl.hpp: + +/usr/include/boost/fusion/iterator/advance.hpp: + +/usr/include/boost/fusion/view/iterator_range/detail/at_impl.hpp: + +/usr/include/boost/fusion/view/iterator_range/detail/begin_impl.hpp: + +/usr/include/boost/fusion/iterator/mpl/convert_iterator.hpp: + +/usr/include/boost/fusion/iterator/distance.hpp: + +/usr/include/boost/fusion/tuple.hpp: + +/usr/include/boost/fusion/view/iterator_range/iterator_range.hpp: + +/usr/include/boost/fusion/container/list/detail/at_impl.hpp: + +/usr/include/boost/fusion/container/list/detail/end_impl.hpp: + +/usr/include/boost/fusion/view/nview/detail/prior_impl.hpp: + +/usr/include/boost/fusion/container/list/list_fwd.hpp: + +/usr/include/boost/fusion/container/list/detail/equal_to_impl.hpp: + +/usr/include/boost/fusion/container/list/detail/next_impl.hpp: + +/usr/include/boost/fusion/container/list/detail/deref_impl.hpp: + +/usr/include/boost/fusion/container/list/cons_iterator.hpp: + +/usr/include/boost/fusion/container/list/nil.hpp: + +/usr/include/boost/fusion/sequence/intrinsic/detail/segmented_end.hpp: + +/usr/include/boost/fusion/sequence/intrinsic/end.hpp: + +/usr/include/boost/fusion/view/zip_view/detail/prior_impl.hpp: + +/usr/include/boost/fusion/support/detail/access.hpp: + +/usr/include/boost/fusion/support/detail/enabler.hpp: + +/usr/include/boost/fusion/container/list/cons.hpp: + +/usr/include/boost/fusion/iterator/detail/segmented_next_impl.hpp: + +/usr/include/boost/fusion/iterator/detail/segmented_equal_to.hpp: + +/usr/include/boost/fusion/iterator/value_of.hpp: + +/usr/include/boost/fusion/iterator/key_of.hpp: + +/usr/include/boost/fusion/iterator/deref_data.hpp: + +/usr/include/boost/fusion/support/category_of.hpp: + +/usr/include/boost/fusion/iterator/detail/distance.hpp: + +/usr/include/boost/fusion/iterator/prior.hpp: + +/usr/include/boost/fusion/iterator/iterator_facade.hpp: + +/usr/include/boost/fusion/iterator/detail/segmented_iterator.hpp: + +/usr/include/boost/preprocessor/iterate.hpp: + +third_party/threadpool/boost/threadpool/pool.hpp: + +/usr/include/boost/beast/websocket/impl/write.hpp: + +/usr/include/boost/type_traits/remove_cv_ref.hpp: + +/usr/include/c++/11/mutex: + +/usr/include/boost/preprocessor/repetition/repeat.hpp: + +/usr/include/boost/type_traits/remove_all_extents.hpp: + +include/LibLsp/lsp/extention/jdtls/codeActionResult.h: + +/usr/include/boost/beast/websocket/detail/impl_base.hpp: + +/usr/include/boost/mpl/aux_/iter_apply.hpp: + +/usr/include/boost/fusion/container/vector/detail/advance_impl.hpp: + +/usr/include/boost/type_traits/make_unsigned.hpp: + +/usr/include/boost/function_types/detail/retag_default_cc.hpp: + +/usr/include/boost/type_traits/is_stateless.hpp: + +/usr/include/boost/iterator/minimum_category.hpp: + +/usr/include/boost/type_traits/is_scoped_enum.hpp: + +/usr/include/boost/atomic/detail/fence_arch_ops_gcc_x86.hpp: + +/usr/include/boost/type_traits/is_object.hpp: + +/usr/include/boost/fusion/container/generation/make_map.hpp: + +/usr/include/boost/thread/detail/platform_time.hpp: + +/usr/include/boost/type_traits/is_list_constructible.hpp: + +../gc-8.2.0/include/gc_version.h: + +/usr/include/boost/fusion/sequence/io/in.hpp: + +/usr/include/boost/asio/basic_datagram_socket.hpp: + +/usr/include/boost/type_traits/is_empty.hpp: + +/usr/include/boost/asio/traits/set_done_member.hpp: + +/usr/include/boost/asio/impl/thread_pool.ipp: + +include/LibLsp/JsonRpc/WebSocketServer.h: + +/usr/include/boost/mpl/distance_fwd.hpp: + +/usr/include/boost/fusion/container/list/detail/empty_impl.hpp: + +/usr/include/boost/type_traits/is_fundamental.hpp: + +/usr/include/boost/algorithm/string/std/slist_traits.hpp: + +/usr/include/boost/type_traits/has_virtual_destructor.hpp: + +/usr/include/boost/predef/os/qnxnto.h: + +/usr/include/boost/type_traits/has_unary_plus.hpp: + +/usr/include/boost/type_traits/has_trivial_move_constructor.hpp: + +/usr/include/boost/asio/basic_socket_streambuf.hpp: + +/usr/include/boost/type_traits/has_trivial_assign.hpp: + +/usr/include/boost/mpl/arg.hpp: + +/usr/include/boost/mpl/aux_/clear_impl.hpp: + +/usr/include/boost/range/rend.hpp: + +/usr/include/boost/type_traits/has_pre_decrement.hpp: + +/usr/include/boost/type_traits/has_post_increment.hpp: + +/usr/include/boost/mpl/less.hpp: + +third_party/threadpool/boost/threadpool/detail/scope_guard.hpp: + +/usr/include/boost/fusion/view/single_view/detail/end_impl.hpp: + +/usr/include/boost/mpl/aux_/nttp_decl.hpp: + +/usr/include/boost/date_time/date_duration_types.hpp: + +/usr/include/boost/type_traits/is_convertible.hpp: + +/usr/include/boost/type_traits/has_trivial_destructor.hpp: + +/usr/include/boost/type_traits/is_copy_constructible.hpp: + +/usr/include/boost/type_traits/has_multiplies.hpp: + +/usr/include/boost/asio/detail/cstdint.hpp: + +/usr/include/boost/type_traits/has_logical_and.hpp: + +/usr/include/boost/type_traits/add_const.hpp: + +/usr/include/boost/type_traits/has_less_equal.hpp: + +/usr/include/boost/type_traits/has_left_shift.hpp: + +/usr/include/boost/core/swap.hpp: + +/usr/include/boost/type_traits/has_logical_not.hpp: + +third_party/rapidjson/include/rapidjson/internal/diyfp.h: + +/usr/include/boost/atomic/detail/extra_fp_ops_generic.hpp: + +/usr/include/boost/function/detail/prologue.hpp: + +/usr/include/boost/type_traits/has_bit_xor_assign.hpp: + +/usr/include/boost/logic/tribool.hpp: + +/usr/include/boost/endian/detail/endian_store.hpp: + +/usr/include/boost/preprocessor/repetition/detail/for.hpp: + +/usr/include/boost/type_traits/has_bit_xor.hpp: + +/usr/include/boost/type_traits/make_void.hpp: + +/usr/include/boost/atomic/ipc_atomic.hpp: + +/usr/include/bits/types/siginfo_t.h: + +src/lsp/working_files.cpp: + +/usr/include/boost/type_traits/detail/has_binary_operator.hpp: + +/usr/include/boost/type_traits/has_nothrow_destructor.hpp: + +/usr/include/boost/type_traits/floating_point_promotion.hpp: + +/usr/include/boost/fusion/sequence/convert.hpp: + +/usr/include/boost/preprocessor/seq/fold_left.hpp: + +/usr/include/boost/type_traits/copy_reference.hpp: + +/usr/include/c++/11/x86_64-redhat-linux/bits/ctype_base.h: + +third_party/rapidjson/include/rapidjson/internal/pow10.h: + +/usr/include/boost/type_traits/aligned_storage.hpp: + +/usr/include/c++/11/iomanip: + +/usr/include/boost/process/io.hpp: + +/usr/include/boost/core/scoped_enum.hpp: + +/usr/include/boost/mp11/detail/mp_copy_if.hpp: + +/usr/include/boost/asio/ip/address_v6_iterator.hpp: + +/usr/include/boost/thread/detail/lockable_wrapper.hpp: + +/usr/include/boost/asio/detail/impl/reactive_descriptor_service.ipp: + +/usr/include/boost/thread/pthread/condition_variable.hpp: + +/usr/include/bits/endian.h: + +/usr/include/bits/sockaddr.h: + +/usr/include/boost/thread/condition_variable.hpp: + +/usr/include/boost/thread/condition.hpp: + +/usr/include/boost/mpl/aux_/integral_wrapper.hpp: + +/usr/include/boost/type_traits/is_unbounded_array.hpp: + +/usr/include/boost/type_traits/is_unscoped_enum.hpp: + +/usr/include/boost/intrusive/detail/node_cloner_disposer.hpp: + +/usr/include/boost/random/detail/signed_unsigned_tools.hpp: + +/usr/include/boost/type_traits/is_bounded_array.hpp: + +/usr/include/boost/asio/detail/impl/socket_ops.ipp: + +/usr/include/boost/type_traits/extent.hpp: + +/usr/include/boost/date_time/microsec_time_clock.hpp: + +/usr/include/boost/asio/completion_condition.hpp: + +/usr/include/boost/smart_ptr/shared_array.hpp: + +/usr/include/boost/core/allocator_access.hpp: + +/usr/include/boost/mpl/vector/aux_/tag.hpp: + +/usr/include/boost/type_traits/is_virtual_base_of.hpp: + +/usr/include/boost/make_shared.hpp: + +/usr/include/boost/config/no_tr1/functional.hpp: + +/usr/include/c++/11/stdlib.h: + +/usr/include/c++/11/bits/regex_constants.h: + +/usr/include/boost/smart_ptr/intrusive_ptr.hpp: + +/usr/include/boost/type_traits/has_logical_or.hpp: + +/usr/include/c++/11/bits/stl_set.h: + +/usr/lib/gcc/x86_64-redhat-linux/11/include/xmmintrin.h: + +/usr/include/boost/predef/compiler/gcc_xml.h: + +/usr/include/boost/chrono/ceil.hpp: + +/usr/include/c++/11/ostream: + +/usr/include/boost/chrono/clock_string.hpp: + +/usr/include/boost/chrono/detail/system.hpp: + +/usr/include/boost/thread/pthread/thread_data.hpp: + +/usr/include/boost/scoped_ptr.hpp: + +/usr/include/boost/type_traits/detail/mp_defer.hpp: + +/usr/include/boost/type_traits/is_base_of.hpp: + +/usr/include/boost/fusion/mpl/back.hpp: + +/usr/include/boost/atomic/detail/extra_fp_ops_emulated.hpp: + +/usr/include/boost/type_traits/is_member_object_pointer.hpp: + +/usr/include/boost/asio/windows/object_handle.hpp: + +/usr/include/boost/ratio/detail/mpl/gcd.hpp: + +/usr/include/c++/11/bits/basic_ios.h: + +/usr/include/boost/ratio/config.hpp: + +/usr/include/boost/mpl/or.hpp: + +/usr/include/boost/type_traits.hpp: + +/usr/include/boost/mpl/logical.hpp: + +/usr/include/boost/predef/version.h: + +/usr/include/boost/predef/hardware/simd/x86/versions.h: + +/usr/include/boost/predef/hardware.h: + +/usr/include/boost/detail/container_fwd.hpp: + +/usr/include/boost/predef/platform/windows_system.h: + +/usr/include/boost/fusion/view/joint_view/detail/begin_impl.hpp: + +/usr/include/boost/predef/platform/mingw.h: + +/usr/include/boost/predef/os/windows.h: + +/usr/include/boost/type_traits/has_multiplies_assign.hpp: + +/usr/include/boost/predef/os/hpux.h: + +/usr/include/boost/predef/os/cygwin.h: + +/usr/include/boost/type_traits/has_greater.hpp: + +/usr/include/boost/predef/hardware/simd/ppc.h: + +/usr/include/boost/type_traits/remove_const.hpp: + +/usr/include/boost/intrusive/rbtree.hpp: + +/usr/include/boost/beast/zlib/inflate_stream.hpp: + +/usr/include/boost/predef/os/bsd/bsdi.h: + +/usr/include/boost/fusion/container/vector.hpp: + +/usr/include/boost/process/detail/posix/use_vfork.hpp: + +/usr/include/boost/predef/os/haiku.h: + +/usr/include/boost/beast/http/detail/type_traits.hpp: + +/usr/include/boost/random/detail/seed_impl.hpp: + +/usr/include/boost/mpl/sequence_tag_fwd.hpp: + +/usr/include/boost/predef/os/bsd.h: + +/usr/include/boost/process/detail/execute_impl.hpp: + +/usr/include/boost/beast/core/detail/buffers_pair.hpp: + +/usr/include/boost/predef/os/beos.h: + +/usr/include/bits/posix2_lim.h: + +/usr/include/boost/predef/library/std/stdcpp3.h: + +/usr/include/boost/type_traits/integral_constant.hpp: + +/usr/include/boost/fusion/mpl/size.hpp: + +/usr/include/boost/predef/library/std/roguewave.h: + +/usr/include/sys/ucontext.h: + +/usr/include/boost/predef/library/std/libcomo.h: + +/usr/include/boost/predef/library/std/cxx.h: + +/usr/include/boost/asio/impl/multiple_exceptions.ipp: + +/usr/include/boost/predef/detail/_exception.h: + +/usr/include/boost/intrusive/detail/simple_disposers.hpp: + +/usr/include/boost/type_traits/has_new_operator.hpp: + +/usr/include/boost/predef/library/c/vms.h: + +/usr/include/boost/core/alloc_construct.hpp: + +/usr/include/boost/mpl/aux_/iter_push_front.hpp: + +/usr/include/boost/beast/zlib/detail/inflate_stream.hpp: + +/usr/include/boost/predef/library/c/_prefix.h: + +/usr/include/bits/termios-c_cflag.h: + +/usr/include/boost/fusion/mpl/at.hpp: + +/usr/include/boost/chrono/system_clocks.hpp: + +/usr/include/c++/11/x86_64-redhat-linux/bits/os_defines.h: + +/usr/include/boost/beast/http/impl/rfc7230.ipp: + +/usr/include/boost/predef/compiler/sgi_mipspro.h: + +/usr/include/boost/predef/compiler/pgi.h: + +/usr/include/boost/predef/compiler/palm.h: + +/usr/include/boost/predef/compiler/greenhills.h: + +/usr/include/boost/predef/compiler/kai.h: + +/usr/include/sys/time.h: + +include/LibLsp/lsp/textDocument/range_formatting.h: + +/usr/include/boost/predef/compiler/ibm.h: + +/usr/include/boost/move/detail/workaround.hpp: + +/usr/include/boost/predef/library.h: + +/usr/include/boost/bind/bind_mf2_cc.hpp: + +/usr/include/boost/predef/library/c.h: + +/usr/include/boost/fusion/view/zip_view/detail/at_impl.hpp: + +/usr/include/boost/mpl/aux_/msvc_never_true.hpp: + +/usr/include/boost/mpl/vector/aux_/iterator.hpp: + +/usr/include/boost/beast/core/detail/buffers_ref.hpp: + +/usr/include/boost/fusion/container/deque/detail/is_sequence_impl.hpp: + +/usr/include/boost/predef/compiler/iar.h: + +/usr/include/boost/predef/detail/comp_detected.h: + +/usr/include/boost/predef/compiler/diab.h: + +/usr/include/boost/preprocessor/arithmetic/limits/inc_256.hpp: + +/usr/include/c++/11/bits/invoke.h: + +/usr/include/boost/predef/architecture/x86/32.h: + +/usr/include/boost/thread/detail/atomic_redef_macros.hpp: + +/usr/include/boost/fusion/view/reverse_view/detail/key_of_impl.hpp: + +/usr/include/boost/predef/architecture/x86.h: + +/usr/include/boost/mpl/iter_fold.hpp: + +/usr/include/boost/predef/architecture/sys390.h: + +/usr/include/sys/cdefs.h: + +/usr/include/c++/11/x86_64-redhat-linux/bits/time_members.h: + +/usr/include/boost/process/detail/posix/handler.hpp: + +/usr/include/boost/fusion/sequence/intrinsic/has_key.hpp: + +/usr/include/bits/types/time_t.h: + +/usr/include/boost/predef/architecture/parisc.h: + +/usr/include/boost/thread/lock_algorithms.hpp: + +/usr/include/boost/ratio/detail/mpl/abs.hpp: + +/usr/include/boost/predef/os/bsd/net.h: + +/usr/include/boost/ratio/detail/mpl/sign.hpp: + +/usr/include/boost/predef/platform.h: + +/usr/include/boost/mpl/always.hpp: + +/usr/include/boost/predef/architecture/m68k.h: + +/usr/include/boost/predef/architecture.h: + +/usr/include/boost/function_types/detail/synthesize.hpp: + +/usr/include/boost/thread/executors/executor.hpp: + +/usr/include/boost/asio/buffered_write_stream_fwd.hpp: + +/usr/include/boost/predef/make.h: + +/usr/include/boost/predef/language/stdc.h: + +/usr/include/boost/filesystem/fstream.hpp: + +/usr/include/boost/predef/language.h: + +/usr/include/boost/operators.hpp: + +/usr/include/boost/atomic/detail/fence_operations.hpp: + +/usr/include/boost/chrono/time_point.hpp: + +/usr/include/boost/asio/basic_socket.hpp: + +/usr/include/boost/date_time/dst_rules.hpp: + +/usr/include/c++/11/bits/uses_allocator.h: + +/usr/include/boost/date_time/time_iterator.hpp: + +/usr/include/boost/fusion/adapted/mpl.hpp: + +/usr/include/c++/11/bits/stl_multiset.h: + +/usr/include/boost/fusion/container/set/detail/end_impl.hpp: + +/usr/include/boost/type_traits/is_union.hpp: + +/usr/include/boost/numeric/conversion/converter_policies.hpp: + +/usr/include/boost/atomic/detail/core_ops_gcc_atomic.hpp: + +/usr/include/boost/predef/os/irix.h: + +/usr/include/bits/in.h: + +/usr/include/boost/concept/detail/general.hpp: + +/usr/include/boost/date_time/posix_time/time_period.hpp: + +/usr/include/boost/numeric/conversion/detail/preprocessed/numeric_cast_traits_long_long.hpp: + +/usr/include/unistd.h: + +/usr/include/boost/numeric/conversion/detail/preprocessed/numeric_cast_traits_common.hpp: + +/usr/include/boost/fusion/container/list/detail/reverse_cons.hpp: + +/usr/include/boost/atomic/detail/type_traits/make_unsigned.hpp: + +/usr/include/boost/asio/detail/timer_scheduler.hpp: + +/usr/include/boost/beast/http/rfc7230.hpp: + +/usr/include/boost/numeric/conversion/detail/bounds.hpp: + +/usr/include/boost/asio/ip/address_v4_iterator.hpp: + +/usr/include/boost/beast/websocket/impl/accept.hpp: + +/usr/include/boost/numeric/conversion/detail/converter.hpp: + +/usr/include/boost/predef/hardware/simd/x86.h: + +/usr/include/boost/type_traits/is_pointer.hpp: + +/usr/include/c++/11/bits/regex_automaton.h: + +/usr/include/boost/mpl/aux_/preprocessed/gcc/less.hpp: + +/usr/include/boost/mpl/aux_/preprocessor/default_params.hpp: + +/usr/include/boost/type_traits/is_signed.hpp: + +/usr/include/boost/asio/steady_timer.hpp: + +/usr/include/boost/asio/ip/address_v6_range.hpp: + +/usr/include/boost/range/iterator_range_core.hpp: + +/usr/include/boost/type_traits/has_bit_and.hpp: + +/usr/include/boost/mpl/aux_/preprocessed/gcc/times.hpp: + +/usr/include/bits/environments.h: + +/usr/include/boost/numeric/conversion/detail/is_subranged.hpp: + +/usr/include/c++/11/ext/alloc_traits.h: + +/usr/include/boost/predef/library/std/msl.h: + +/usr/include/boost/asio/detail/impl/handler_tracking.ipp: + +/usr/include/boost/asio/ip/bad_address_cast.hpp: + +/usr/include/boost/type_traits/integral_promotion.hpp: + +/usr/include/boost/numeric/conversion/detail/sign_mixture.hpp: + +/usr/include/bits/time64.h: + +/usr/include/boost/mpl/not.hpp: + +/usr/include/boost/type_traits/common_type.hpp: + +/usr/include/boost/asio/basic_deadline_timer.hpp: + +/usr/include/boost/mpl/aux_/has_tag.hpp: + +/usr/include/c++/11/iostream: + +/usr/include/boost/type_traits/is_trivially_copyable.hpp: + +/usr/include/boost/move/unique_ptr.hpp: + +include/LibLsp/lsp/extention/jdtls/checkDelegateMethodsStatus.h: + +/usr/include/boost/mpl/void.hpp: + +include/LibLsp/lsp/ResourceOperation.h: + +/usr/include/boost/type_traits/is_noncopyable.hpp: + +/usr/include/boost/type_traits/has_divides_assign.hpp: + +/usr/include/boost/fusion/sequence/intrinsic/detail/segmented_begin.hpp: + +/usr/include/boost/preprocessor/stringize.hpp: + +/usr/include/boost/fusion/support/unused.hpp: + +/usr/include/bits/termios-c_lflag.h: + +/usr/include/boost/system/detail/is_generic_value.hpp: + +/usr/include/boost/smart_ptr/detail/sp_forward.hpp: + +/usr/include/boost/mpl/aux_/config/arrays.hpp: + +/usr/include/boost/mpl/apply_wrap.hpp: + +/usr/include/boost/mpl/aux_/comparison_op.hpp: + +/usr/include/boost/mpl/aux_/inserter_algorithm.hpp: + +/usr/include/boost/asio/detail/push_options.hpp: + +/usr/include/boost/mpl/aux_/config/overload_resolution.hpp: + +include/LibLsp/lsp/textDocument/type_definition.h: + +/usr/include/boost/asio/detail/impl/service_registry.ipp: + +/usr/include/boost/asio/ip/impl/network_v6.hpp: + +/usr/include/boost/type_traits/has_bit_or_assign.hpp: + +/usr/include/boost/intrusive/detail/node_holder.hpp: + +/usr/include/boost/preprocessor/identity.hpp: + +/usr/include/boost/process/detail/posix/close_out.hpp: + +/usr/include/boost/optional/detail/optional_aligned_storage.hpp: + +/usr/include/c++/11/set: + +/usr/include/boost/beast/core/buffers_prefix.hpp: + +/usr/include/boost/preprocessor/array/size.hpp: + +/usr/include/boost/mpl/aux_/preprocessed/gcc/bind_fwd.hpp: + +/usr/include/boost/predef/hardware/simd/x86_amd.h: + +/usr/include/c++/11/bits/stl_queue.h: + +/usr/include/boost/mpl/aux_/config/preprocessor.hpp: + +/usr/include/c++/11/ext/numeric_traits.h: + +/usr/include/boost/fusion/container/map/detail/end_impl.hpp: + +/usr/include/boost/mpl/aux_/lambda_arity_param.hpp: + +/usr/include/boost/mpl/empty_fwd.hpp: + +/usr/include/c++/11/bits/ostream_insert.h: + +include/LibLsp/JsonRpc/RemoteEndPoint.h: + +/usr/include/boost/type_traits/is_float.hpp: + +/usr/include/boost/uuid/string_generator.hpp: + +/usr/include/boost/mpl/int_fwd.hpp: + +/usr/include/boost/mpl/int.hpp: + +/usr/include/boost/mpl/aux_/na_fwd.hpp: + +/usr/include/boost/mpl/bool_fwd.hpp: + +/usr/include/boost/type_traits/copy_cv.hpp: + +/usr/include/boost/mpl/bool.hpp: + +/usr/include/boost/mpl/aux_/na.hpp: + +/usr/include/boost/mpl/aux_/config/gcc.hpp: + +/usr/include/boost/mpl/erase.hpp: + +/usr/include/boost/numeric/conversion/bounds.hpp: + +/usr/include/boost/mpl/aux_/preprocessed/gcc/vector.hpp: + +/usr/include/boost/numeric/conversion/detail/numeric_cast_traits.hpp: + +/usr/include/boost/mpl/aux_/is_msvc_eti_arg.hpp: + +/usr/include/boost/mpl/aux_/config/adl.hpp: + +/usr/include/boost/preprocessor/arithmetic/detail/div_base.hpp: + +/usr/include/boost/mpl/aux_/na_spec.hpp: + +/usr/include/boost/mpl/aux_/static_cast.hpp: + +/usr/include/boost/cstdint.hpp: + +/usr/include/bits/termios-c_iflag.h: + +/usr/include/boost/mpl/if.hpp: + +src/jsonrpc/MessageJsonHandler.cpp: + +/usr/include/boost/numeric/conversion/detail/meta.hpp: + +/usr/include/boost/numeric/conversion/converter.hpp: + +/usr/include/boost/numeric/conversion/cast.hpp: + +/usr/include/boost/beast/core/buffered_read_stream.hpp: + +/usr/include/boost/date_time/date_clock_device.hpp: + +/usr/include/boost/date_time/gregorian/greg_date.hpp: + +/usr/include/boost/type_traits/has_trivial_copy.hpp: + +/usr/include/boost/asio/uses_executor.hpp: + +/usr/include/boost/date_time/gregorian/greg_duration.hpp: + +/usr/include/boost/asio/detail/signal_handler.hpp: + +/usr/include/boost/mpl/eval_if.hpp: + +/usr/include/boost/mpl/bitxor.hpp: + +/usr/include/boost/type.hpp: + +/usr/include/boost/asio/posix/descriptor_base.hpp: + +/usr/include/boost/type_traits/is_polymorphic.hpp: + +/usr/include/boost/date_time/gregorian/greg_year.hpp: + +/usr/include/boost/date_time/gregorian/greg_day.hpp: + +/usr/include/boost/mpl/advance.hpp: + +/usr/include/boost/type_traits/make_signed.hpp: + +/usr/include/boost/date_time/constrained_value.hpp: + +/usr/include/boost/uuid/name_generator.hpp: + +/usr/include/boost/date_time/gregorian/greg_weekday.hpp: + +/usr/include/boost/asio/impl/write_at.hpp: + +/usr/include/boost/preprocessor/repetition/for.hpp: + +/usr/include/boost/predef/architecture/alpha.h: + +/usr/include/bits/types/FILE.h: + +/usr/include/c++/11/complex: + +/usr/include/boost/make_unique.hpp: + +/usr/include/boost/date_time/int_adapter.hpp: + +include/LibLsp/JsonRpc/serializer.h: + +/usr/include/boost/fusion/container/generation.hpp: + +/usr/include/boost/type_traits/is_same.hpp: + +/usr/include/boost/mp11/detail/mp_count.hpp: + +/usr/include/boost/fusion/algorithm/iteration/detail/segmented_for_each.hpp: + +/usr/include/boost/date_time/time_duration.hpp: + +/usr/include/asm/posix_types_64.h: + +/usr/include/bits/iscanonical.h: + +/usr/include/boost/asio/detail/bulk_executor_op.hpp: + +/usr/include/boost/mpl/aux_/preprocessed/gcc/or.hpp: + +/usr/include/boost/thread/lock_types.hpp: + +/usr/include/asm-generic/bitsperlong.h: + +third_party/threadpool/boost/threadpool/detail/locking_ptr.hpp: + +/usr/include/bits/mathcalls.h: + +/usr/include/bits/mathcalls-helper-functions.h: + +/usr/include/boost/beast/core/detail/ostream.hpp: + +third_party/uri/include/network/uri/detail/encode.hpp: + +/usr/include/bits/fp-logb.h: + +/usr/include/boost/beast/core/stream_traits.hpp: + +/usr/include/boost/thread/pthread/pthread_helpers.hpp: + +/usr/include/boost/asio/associated_allocator.hpp: + +/usr/include/boost/intrusive_ptr.hpp: + +/usr/include/boost/smart_ptr/detail/spinlock.hpp: + +/usr/include/c++/11/cmath: + +/usr/include/boost/config/no_tr1/cmath.hpp: + +/usr/include/boost/limits.hpp: + +/usr/include/boost/date_time/posix_time/posix_time_config.hpp: + +/usr/include/boost/fusion/container/list/cons_fwd.hpp: + +/usr/include/boost/date_time/posix_time/ptime.hpp: + +/usr/include/boost/type_traits/is_const.hpp: + +/usr/include/boost/mpl/aux_/config/integral.hpp: + +/usr/include/boost/beast/core/detail/config.hpp: + +/usr/include/boost/beast/core/impl/error.hpp: + +/usr/include/boost/smart_ptr/detail/sp_thread_pause.hpp: + +/usr/include/c++/11/version: + +/usr/include/boost/smart_ptr/detail/spinlock_gcc_atomic.hpp: + +/usr/include/boost/smart_ptr/detail/sp_nullptr_t.hpp: + +/usr/include/boost/date_time/filetime_functions.hpp: + +/usr/include/c++/11/map: + +/usr/include/boost/asio/detail/socket_ops.hpp: + +include/LibLsp/lsp/extention/jdtls/searchSymbols.h: + +/usr/include/boost/smart_ptr/detail/sp_noexcept.hpp: + +/usr/include/boost/mpl/at_fwd.hpp: + +/usr/include/boost/predef/os/ios.h: + +/usr/include/boost/asio/basic_socket_iostream.hpp: + +/usr/include/boost/tti/detail/dnullptr.hpp: + +/usr/include/boost/smart_ptr/detail/sp_counted_impl.hpp: + +/usr/include/boost/mpl/aux_/preprocessed/gcc/advance_forward.hpp: + +/usr/include/boost/smart_ptr/detail/sp_typeinfo_.hpp: + +/usr/include/boost/bind.hpp: + +/usr/include/boost/smart_ptr/detail/sp_counted_base_gcc_atomic.hpp: + +/usr/include/boost/predef/architecture/superh.h: + +/usr/include/boost/smart_ptr/detail/sp_has_sync_intrinsics.hpp: + +/usr/include/boost/move/detail/placement_new.hpp: + +/usr/include/boost/fusion/sequence/intrinsic/segments.hpp: + +include/LibLsp/lsp/textDocument/signature_help.h: + +/usr/include/boost/mpl/aux_/config/ttp.hpp: + +/usr/include/boost/fusion/view/iterator_range.hpp: + +/usr/include/boost/predef/os/os400.h: + +/usr/include/boost/function_types/detail/synthesize_impl/arity20_0.hpp: + +/usr/include/boost/intrusive/detail/config_begin.hpp: + +/usr/include/boost/fusion/view/reverse_view/detail/deref_impl.hpp: + +/usr/include/boost/smart_ptr/detail/sp_has_gcc_intrinsics.hpp: + +/usr/include/boost/smart_ptr/detail/shared_count.hpp: + +/usr/include/boost/mpl/begin_end.hpp: + +/usr/include/boost/date_time/c_time.hpp: + +/usr/include/boost/predef.h: + +/usr/include/boost/mpl/aux_/preprocessor/def_params_tail.hpp: + +/usr/include/boost/asio/impl/io_context.ipp: + +/usr/include/boost/thread/thread_time.hpp: + +/usr/include/boost/thread/lockable_traits.hpp: + +/usr/include/boost/thread/lock_options.hpp: + +/usr/include/boost/thread/detail/delete.hpp: + +/usr/include/dirent.h: + +/usr/include/boost/detail/bitmask.hpp: + +/usr/include/boost/assert/source_location.hpp: + +/usr/include/boost/fusion/view/transform_view/transform_view.hpp: + +/usr/include/boost/atomic/ipc_atomic_ref.hpp: + +/usr/include/boost/asio/ip/impl/address_v6.ipp: + +/usr/include/boost/fusion/support/detail/and.hpp: + +/usr/include/boost/type_traits/is_abstract.hpp: + +/usr/include/boost/asio/buffered_read_stream_fwd.hpp: + +/usr/include/boost/asio/detail/resolve_endpoint_op.hpp: + +/usr/include/boost/config/abi_suffix.hpp: + +/usr/include/boost/system/detail/throws.hpp: + +/usr/include/c++/11/bits/deque.tcc: + +/usr/include/boost/system/detail/system_category_impl.hpp: + +/usr/include/boost/preprocessor/punctuation/comma_if.hpp: + +/usr/include/boost/type_traits/add_cv.hpp: + +/usr/include/boost/type_traits/add_rvalue_reference.hpp: + +/usr/include/boost/type_traits/is_destructible.hpp: + +/usr/include/boost/process/detail/posix/search_path.hpp: + +/usr/include/bits/types/struct_iovec.h: + +/usr/include/boost/beast/core/static_buffer.hpp: + +/usr/include/boost/system/system_category.hpp: + +/usr/include/c++/11/bits/list.tcc: + +/usr/include/boost/predef/compiler/comeau.h: + +/usr/include/boost/mpl/aux_/preprocessed/gcc/apply_wrap.hpp: + +src/jsonrpc/message.cpp: + +/usr/include/boost/system/detail/cerrno.hpp: + +/usr/include/boost/asio/traits/execute_free.hpp: + +/usr/include/boost/system/errc.hpp: + +/usr/include/boost/type_traits/negation.hpp: + +/usr/include/boost/asio/detail/reactive_socket_send_op.hpp: + +/usr/include/boost/numeric/conversion/sign_mixture_enum.hpp: + +/usr/include/boost/system/error_condition.hpp: + +/usr/include/bits/types/struct_timeval.h: + +/usr/include/boost/system/detail/error_category_impl.hpp: + +/usr/include/boost/system/error_category.hpp: + +/usr/include/boost/system/detail/enable_if.hpp: + +/usr/include/boost/asio/impl/serial_port_base.ipp: + +/usr/include/boost/date_time/posix_time/posix_time_duration.hpp: + +/usr/include/boost/asio/local/datagram_protocol.hpp: + +/usr/include/boost/system/detail/config.hpp: + +/usr/include/c++/11/bits/unique_lock.h: + +/usr/include/boost/type_traits/copy_cv_ref.hpp: + +/usr/include/boost/system/error_code.hpp: + +/usr/include/boost/predef/architecture/riscv.h: + +/usr/include/boost/thread/exceptions.hpp: + +/usr/include/boost/core/ignore_unused.hpp: + +src/lsp/ParentProcessWatcher.cpp: + +/usr/include/boost/range/begin.hpp: + +/usr/include/boost/config/auto_link.hpp: + +/usr/include/boost/predef/compiler/borland.h: + +/usr/include/boost/enable_shared_from_this.hpp: + +/usr/include/boost/asio/execution/bad_executor.hpp: + +/usr/include/boost/asio/detail/impl/resolver_service_base.ipp: + +/usr/include/boost/asio/windows/random_access_handle.hpp: + +/usr/include/boost/smart_ptr/make_shared_array.hpp: + +/usr/include/boost/type_traits/has_right_shift.hpp: + +/usr/include/boost/thread/pthread/mutex.hpp: + +/usr/include/c++/11/bits/regex_executor.tcc: + +/usr/include/boost/mpl/aux_/config/static_constant.hpp: + +/usr/include/boost/thread/mutex.hpp: + +/usr/include/boost/core/noncopyable.hpp: + +/usr/include/boost/mpl/aux_/push_back_impl.hpp: + +/usr/include/boost/utility/identity_type.hpp: + +/usr/include/boost/date_time/date_defs.hpp: + +/usr/include/boost/preprocessor/control/limits/while_256.hpp: + +third_party/utfcpp/source/utf8/cpp11.h: + +/usr/include/boost/preprocessor/arithmetic/detail/is_1_number.hpp: + +/usr/include/c++/11/x86_64-redhat-linux/bits/gthr-default.h: + +/usr/include/boost/preprocessor/arithmetic/mod.hpp: + +/usr/include/boost/beast/core/detail/buffers_range_adaptor.hpp: + +/usr/include/boost/config/requires_threads.hpp: + +/usr/include/boost/beast/http/error.hpp: + +/usr/include/boost/mpl/aux_/iter_fold_impl.hpp: + +/usr/include/boost/preprocessor/seq/transform.hpp: + +/usr/include/bits/termios-tcflow.h: + +/usr/include/boost/preprocessor/seq/limits/fold_left_256.hpp: + +/usr/include/boost/mpl/aux_/config/pp_counter.hpp: + +/usr/include/boost/process.hpp: + +/usr/include/boost/process/detail/traits/cmd_or_exe.hpp: + +/usr/include/boost/type_traits/has_nothrow_copy.hpp: + +/usr/include/boost/type_traits/add_lvalue_reference.hpp: + +/usr/include/c++/11/bits/ostream.tcc: + +/usr/include/boost/current_function.hpp: + +/usr/include/boost/detail/workaround.hpp: + +/usr/include/boost/static_assert.hpp: + +/usr/include/boost/core/explicit_operator_bool.hpp: + +/usr/include/boost/type_traits/remove_extent.hpp: + +/usr/include/boost/fusion/view/transform_view/detail/begin_impl.hpp: + +/usr/include/boost/beast/core/detail/service_base.hpp: + +/usr/include/boost/process/detail/posix/terminate.hpp: + +/usr/include/dlfcn.h: + +/usr/include/bits/fcntl-linux.h: + +/usr/include/boost/asio/detail/impl/strand_service.ipp: + +/usr/include/boost/beast/core/file.hpp: + +/usr/include/boost/concept/detail/concept_def.hpp: + +/usr/include/boost/preprocessor/seq/enum.hpp: + +/usr/include/boost/fusion/support/sequence_base.hpp: + +/usr/include/boost/mpl/aux_/include_preprocessed.hpp: + +/usr/include/boost/mpl/aux_/adl_barrier.hpp: + +/usr/include/bits/signal_ext.h: + +/usr/include/c++/11/bits/stl_construct.h: + +/usr/include/boost/asio/detail/impl/posix_mutex.ipp: + +/usr/include/boost/predef/language/objc.h: + +/usr/include/bits/timesize.h: + +/usr/include/bits/types/wint_t.h: + +/usr/include/boost/asio/basic_streambuf.hpp: + +/usr/include/boost/mpl/aux_/msvc_eti_base.hpp: + +/usr/include/boost/process/posix.hpp: + +/usr/include/bits/getopt_posix.h: + +/usr/include/boost/exception/to_string_stub.hpp: + +/usr/include/boost/predef/os/macos.h: + +/usr/include/boost/mp11/utility.hpp: + +/usr/include/bits/types/struct_FILE.h: + +/usr/include/c++/11/bits/stl_algobase.h: + +/usr/include/c++/11/deque: + +/usr/include/boost/range/iterator_range.hpp: + +/usr/include/boost/asio/posix/basic_descriptor.hpp: + +/usr/include/boost/fusion/container/vector/convert.hpp: + +/usr/include/boost/detail/select_type.hpp: + +/usr/include/boost/mpl/aux_/preprocessed/gcc/template_arity.hpp: + +/usr/include/boost/beast/zlib/detail/ranges.hpp: + +/usr/include/boost/optional/optional.hpp: + +/usr/include/boost/integer_traits.hpp: + +/usr/include/boost/numeric/conversion/detail/int_float_mixture.hpp: + +/usr/include/bits/types/struct_itimerspec.h: + +/usr/include/boost/asio/windows/basic_stream_handle.hpp: + +/usr/include/boost/system/detail/error_condition.hpp: + +/usr/include/boost/mpl/aux_/config/dtp.hpp: + +include/LibLsp/lsp/textDocument/completion.h: + +/usr/include/boost/fusion/container/list.hpp: + +/usr/include/boost/preprocessor/seq/size.hpp: + +/usr/include/c++/11/clocale: + +/usr/include/boost/mpl/deref.hpp: + +/usr/include/boost/asio/awaitable.hpp: + +/usr/include/boost/asio/is_read_buffered.hpp: + +/usr/include/boost/date_time/time_resolution_traits.hpp: + +/usr/include/c++/11/cwctype: + +/usr/include/boost/core/enable_if.hpp: + +/usr/include/boost/preprocessor/repetition/limits/repeat_256.hpp: + +/usr/include/boost/fusion/container/vector/detail/as_vector.hpp: + +/usr/include/c++/11/bits/locale_facets.h: + +/usr/include/boost/asio/detail/config.hpp: + +/usr/include/c++/11/bits/exception.h: + +/usr/include/boost/config/user.hpp: + +/usr/include/boost/iterator/detail/config_def.hpp: + +/usr/include/boost/predef/platform/windows_phone.h: + +/usr/include/boost/asio/detail/descriptor_read_op.hpp: + +/usr/include/boost/asio/detail/handler_tracking.hpp: + +/usr/include/sched.h: + +/usr/include/boost/mpl/times.hpp: + +/usr/include/c++/11/bits/uniform_int_dist.h: + +/usr/include/boost/type_traits/is_member_function_pointer.hpp: + +/usr/include/c++/11/stdexcept: + +/usr/include/boost/mpl/aux_/config/forwarding.hpp: + +/usr/include/boost/type_traits/is_integral.hpp: + +/usr/include/boost/type_traits/has_less.hpp: + +/usr/include/c++/11/bits/functexcept.h: + +/usr/include/boost/asio/detail/concurrency_hint.hpp: + +include/LibLsp/JsonRpc/message.h: + +/usr/include/boost/asio/execution/operation_state.hpp: + +/usr/include/boost/predef/compiler/intel.h: + +/usr/include/boost/date_time/gregorian/greg_day_of_year.hpp: + +/usr/include/c++/11/system_error: + +/usr/include/boost/date_time/time_defs.hpp: + +/usr/include/c++/11/bits/stl_vector.h: + +/usr/include/bits/types/struct_timespec.h: + +/usr/include/c++/11/bits/algorithmfwd.h: + +/usr/include/boost/predef/version_number.h: + +/usr/include/boost/mpl/identity.hpp: + +/usr/include/boost/atomic/detail/platform.hpp: + +/usr/include/boost/type_traits/has_plus.hpp: + +/usr/include/boost/atomic/detail/core_operations_emulated_fwd.hpp: + +/usr/include/boost/type_index/stl_type_index.hpp: + +include/LibLsp/JsonRpc/Condition.h: + +/usr/include/bits/stdint-uintn.h: + +/usr/lib/gcc/x86_64-redhat-linux/11/include/stdarg.h: + +/usr/include/boost/fusion/container/vector/detail/convert_impl.hpp: + +/usr/include/boost/atomic/detail/link.hpp: + +/usr/include/boost/numeric/conversion/conversion_traits.hpp: + +/usr/include/boost/asio/traits/query_static_constexpr_member.hpp: + +/usr/include/boost/mpl/aux_/find_if_pred.hpp: + +/usr/include/bits/socket.h: + +/usr/include/boost/chrono/detail/is_evenly_divisible_by.hpp: + +/usr/include/boost/smart_ptr/weak_ptr.hpp: + +/usr/include/bits/stdio.h: + +third_party/uri/include/network/string_view.hpp: + +/usr/include/c++/11/bitset: + +/usr/include/boost/fusion/algorithm/transformation/push_front.hpp: + +/usr/include/bits/types/__fpos64_t.h: + +/usr/include/linux/futex.h: + +/usr/include/boost/type_traits/has_nothrow_constructor.hpp: + +/usr/include/boost/config/pragma_message.hpp: + +/usr/include/c++/11/functional: + +/usr/include/boost/asio/impl/system_context.hpp: + +/usr/include/boost/endian/detail/integral_by_size.hpp: + +/usr/include/bits/wordsize.h: + +/usr/include/boost/asio/detail/impl/posix_thread.ipp: + +/usr/include/boost/fusion/container/list/detail/build_cons.hpp: + +/usr/include/c++/11/bits/std_abs.h: + +/usr/include/boost/range/reverse_iterator.hpp: + +/usr/include/c++/11/bits/stl_heap.h: + +/usr/include/boost/mpl/aux_/config/ctps.hpp: + +/usr/include/boost/asio/detail/socket_option.hpp: + +/usr/include/c++/11/experimental/bits/lfts_config.h: + +/usr/include/bits/select.h: + +/usr/include/boost/ratio/ratio.hpp: + +/usr/include/sys/select.h: + +include/LibLsp/lsp/extention/jdtls/WorkspaceSymbolParams.h: + +/usr/include/bits/types/__sigval_t.h: + +/usr/include/boost/type_traits/has_bit_or.hpp: + +/usr/include/boost/fusion/view/single_view/detail/deref_impl.hpp: + +include/LibLsp/JsonRpc/traits.h: + +third_party/rapidjson/include/rapidjson/internal/strfunc.h: + +/usr/include/boost/type_traits/is_unsigned.hpp: + +/usr/include/c++/11/bits/shared_ptr_base.h: + +/usr/include/boost/asio/detail/socket_holder.hpp: + +/usr/include/bits/uintn-identity.h: + +/usr/include/boost/preprocessor/detail/check.hpp: + +/usr/include/boost/type_traits/has_minus_assign.hpp: + +/usr/include/boost/thread/interruption.hpp: + +/usr/include/boost/type_traits/type_with_alignment.hpp: + +third_party/rapidjson/include/rapidjson/internal/stack.h: + +/usr/include/boost/predef/hardware/simd/ppc/versions.h: + +/usr/include/c++/11/type_traits: + +/usr/include/boost/asio/traits/static_require.hpp: + +/usr/include/sys/types.h: + +/usr/include/boost/asio/system_context.hpp: + +/usr/include/boost/type_traits/remove_pointer.hpp: + +/usr/include/boost/fusion/view/reverse_view/detail/value_at_impl.hpp: + +/usr/include/c++/11/x86_64-redhat-linux/bits/cpu_defines.h: + +/usr/include/boost/asio/high_resolution_timer.hpp: + +/usr/include/bits/pthreadtypes.h: + +/usr/include/boost/date_time/locale_config.hpp: + +include/LibLsp/JsonRpc/MessageJsonHandler.h: + +/usr/include/stdlib.h: + +/usr/include/boost/thread/pthread/pthread_mutex_scoped_lock.hpp: + +include/LibLsp/lsp/textDocument/document_link.h: + +/usr/include/boost/type_traits/disjunction.hpp: + +/usr/include/boost/process/detail/used_handles.hpp: + +/usr/include/boost/type_traits/has_equal_to.hpp: + +/usr/include/boost/smart_ptr/allocate_shared_array.hpp: + +/usr/include/boost/optional/bad_optional_access.hpp: + +/usr/include/boost/asio/ip/host_name.hpp: + +/usr/include/boost/mpl/aux_/has_apply.hpp: + +/usr/include/boost/thread/xtime.hpp: + +/usr/include/c++/11/cstdint: + +/usr/include/boost/asio/serial_port_base.hpp: + +/usr/include/boost/intrusive/detail/get_value_traits.hpp: + +/usr/include/boost/fusion/container/vector/detail/config.hpp: + +/usr/include/boost/algorithm/string/detail/sequence.hpp: + +/usr/include/bits/long-double.h: + +/usr/include/boost/intrusive/detail/workaround.hpp: + +include/LibLsp/lsp/textDocument/did_change.h: + +/usr/include/c++/11/cwchar: + +/usr/include/boost/predef/architecture/rs6k.h: + +/usr/include/boost/fusion/algorithm/transformation/erase_key.hpp: + +/usr/include/asm-generic/errno-base.h: + +/usr/include/boost/type_traits/remove_bounds.hpp: + +/usr/include/c++/11/bits/char_traits.h: + +/usr/include/c++/11/bits/concept_check.h: + +/usr/include/boost/config/compiler/gcc.hpp: + +/usr/include/boost/type_traits/enable_if.hpp: + +/usr/include/boost/asio/detail/eventfd_select_interrupter.hpp: + +/usr/include/boost/preprocessor/list/detail/fold_left.hpp: + +/usr/include/boost/atomic/detail/int_sizes.hpp: + +/usr/include/boost/asio/detail/reactive_socket_sendto_op.hpp: + +/usr/include/bits/confname.h: + +/usr/include/c++/11/bits/erase_if.h: + +/usr/include/boost/intrusive/detail/math.hpp: + +/usr/include/c++/11/bits/ptr_traits.h: + +/usr/include/boost/token_iterator.hpp: + +/usr/include/c++/11/bits/stl_map.h: + +/usr/include/boost/date_time/posix_time/conversion.hpp: + +/usr/include/boost/beast/websocket.hpp: + +/usr/include/boost/beast/core/detail/chacha.hpp: + +third_party/rapidjson/include/rapidjson/internal/itoa.h: + +/usr/include/boost/asio/windows/basic_overlapped_handle.hpp: + +/usr/include/c++/11/cassert: + +/usr/include/boost/asio/ip/impl/network_v4.hpp: + +include/LibLsp/lsp/lsTextEdit.h: + +/usr/include/boost/preprocessor/list/detail/limits/fold_left_256.hpp: + +/usr/include/boost/mpl/aux_/config/has_apply.hpp: + +/usr/include/boost/preprocessor/seq/cat.hpp: + +/usr/include/limits.h: + +/usr/include/c++/11/bits/hash_bytes.h: + +/usr/include/boost/detail/indirect_traits.hpp: + +/usr/include/boost/core/checked_delete.hpp: + +/usr/include/boost/asio/execution/set_value.hpp: + +/usr/include/boost/beast/http/detail/rfc7230.hpp: + +/usr/include/boost/predef/library/std/dinkumware.h: + +/usr/include/boost/smart_ptr.hpp: + +third_party/rapidjson/include/rapidjson/stream.h: + +/usr/include/bits/struct_mutex.h: + +/usr/include/boost/predef/compiler/tendra.h: + +/usr/include/boost/chrono/duration.hpp: + +/usr/include/c++/11/ext/type_traits.h: + +/usr/include/boost/preprocessor/config/limits.hpp: + +/usr/include/boost/predef/compiler/hp_acc.h: + +/usr/include/boost/mp11/detail/mp_void.hpp: + +/usr/include/boost/asio/detail/service_registry.hpp: + +/usr/include/boost/type_traits/has_modulus_assign.hpp: + +/usr/include/boost/asio/detail/posix_global.hpp: + +/usr/include/boost/shared_array.hpp: + +/usr/include/boost/asio/execution/bulk_execute.hpp: + +/usr/include/boost/range/const_iterator.hpp: + +third_party/rapidjson/include/rapidjson/writer.h: + +/usr/include/c++/11/cstdlib: + +/usr/include/boost/mpl/aux_/numeric_cast_utils.hpp: + +/usr/include/boost/fusion/container/vector/detail/distance_impl.hpp: + +/usr/include/c++/11/bits/exception_defines.h: + +/usr/include/boost/checked_delete.hpp: + +/usr/include/boost/mpl/min_max.hpp: + +/usr/include/bits/waitstatus.h: + +/usr/include/c++/11/bits/std_mutex.h: + +/usr/include/boost/preprocessor/repeat.hpp: + +/usr/include/boost/asio/traits/set_done_free.hpp: + +/usr/include/boost/asio/time_traits.hpp: + +/usr/include/boost/atomic/detail/atomic_impl.hpp: + +/usr/include/boost/beast/websocket/detail/hybi13.hpp: + +/usr/include/boost/optional/detail/optional_reference_spec.hpp: + +third_party/rapidjson/include/rapidjson/rapidjson.h: + +/usr/include/c++/11/bits/parse_numbers.h: + +/usr/include/boost/ref.hpp: + +/usr/include/boost/preprocessor/detail/is_binary.hpp: + +/usr/include/boost/fusion/view/reverse_view/detail/at_impl.hpp: + +/usr/include/c++/11/bits/stl_relops.h: + +/usr/include/boost/mpl/push_back.hpp: + +/usr/include/boost/asio/detail/reactor_op.hpp: + +/usr/include/boost/type_traits/add_reference.hpp: + +/usr/include/c++/11/ios: + +/usr/include/boost/system/generic_category.hpp: + +/usr/include/boost/predef/hardware/simd/arm.h: + +/usr/include/bits/sigthread.h: + +/usr/include/boost/predef/os.h: + +/usr/include/bits/ss_flags.h: + +/usr/include/boost/move/detail/meta_utils_core.hpp: + +/usr/include/bits/types.h: + +/usr/include/c++/11/array: + +/usr/include/boost/atomic/detail/type_traits/is_integral.hpp: + +/usr/include/boost/asio/compose.hpp: + +src/jsonrpc/Endpoint.cpp: + +/usr/include/c++/11/ext/string_conversions.h: + +/usr/include/boost/preprocessor/list/detail/fold_right.hpp: + +/usr/include/boost/uuid/detail/random_provider_include_platform.hpp: + +/usr/include/boost/function_types/detail/pp_variate_loop/preprocessed.hpp: + +/usr/include/boost/preprocessor/repetition/enum_shifted_params.hpp: + +/usr/include/math.h: + +/usr/include/boost/preprocessor/iteration/detail/bounds/lower1.hpp: + +/usr/include/c++/11/bits/charconv.h: + +/usr/include/boost/asio/basic_socket_acceptor.hpp: + +/usr/include/bits/errno.h: + +/usr/include/boost/asio/basic_streambuf_fwd.hpp: + +/usr/include/c++/11/bits/unique_ptr.h: + +/usr/include/boost/type_traits/same_traits.hpp: + +/usr/include/boost/fusion/view/filter_view/detail/equal_to_impl.hpp: + +/usr/include/boost/beast/core/detail/bind_handler.hpp: + +/usr/lib/gcc/x86_64-redhat-linux/11/include/stdint.h: + +/usr/include/boost/beast/core/buffer_traits.hpp: + +/usr/include/c++/11/vector: + +/usr/include/bits/fp-fast.h: + +/usr/include/boost/preprocessor/repetition/enum_binary_params.hpp: + +/usr/include/bits/libc-header-start.h: + +/usr/include/boost/predef/architecture/ia64.h: + +/usr/include/c++/11/bits/predefined_ops.h: + +/usr/include/boost/fusion/view/nview/detail/end_impl.hpp: + +/usr/include/sys/syscall.h: + +/usr/include/boost/predef/platform/windows_desktop.h: + +/usr/include/bits/types/sigevent_t.h: + +third_party/threadpool/boost/threadpool/future.hpp: + +/usr/include/boost/random/uniform_int.hpp: + +/usr/include/boost/type_traits/conjunction.hpp: + +/usr/include/boost/predef/compiler/dignus.h: + +/usr/include/boost/asio/io_service_strand.hpp: + +/usr/include/boost/beast/core/impl/read_size.hpp: + +/usr/include/boost/fusion/view/filter_view/detail/next_impl.hpp: + +/usr/include/boost/algorithm/string/detail/predicate.hpp: + +/usr/include/stdc-predef.h: + +/usr/include/boost/beast/core/detail/bind_continuation.hpp: + +/usr/include/boost/fusion/view/transform_view/detail/value_of_impl.hpp: + +/usr/include/boost/range/detail/misc_concept.hpp: + +/usr/include/boost/fusion/view/single_view/single_view.hpp: + +/usr/include/boost/preprocessor/comma_if.hpp: + +/usr/include/boost/mpl/aux_/preprocessor/enum.hpp: + +/usr/include/boost/mp11/list.hpp: + +/usr/include/boost/config/workaround.hpp: + +/usr/include/boost/bind/bind_mf_cc.hpp: + +/usr/include/boost/beast/core/tcp_stream.hpp: + +src/lsp/lsp_diagnostic.cpp: + +/usr/include/boost/mpl/aux_/config/intel.hpp: + +/usr/include/boost/date_time/gregorian_calendar.ipp: + +/usr/include/boost/chrono/detail/static_assert.hpp: + +/usr/include/boost/beast/core/buffers_cat.hpp: + +/usr/include/boost/atomic/detail/fence_arch_operations.hpp: + +/usr/include/boost/asio/detail/reactive_descriptor_service.hpp: + +/usr/lib/gcc/x86_64-redhat-linux/11/include/syslimits.h: + +/usr/include/boost/smart_ptr/detail/local_counted_base.hpp: + +/usr/include/boost/type_traits/has_complement.hpp: + +/usr/include/bits/timex.h: + +/usr/include/bits/timerfd.h: + +/usr/include/boost/mpl/aux_/config/workaround.hpp: + +/usr/include/boost/smart_ptr/enable_shared_from_this.hpp: + +/usr/include/c++/11/x86_64-redhat-linux/bits/atomic_word.h: + +/usr/include/bits/types/sig_atomic_t.h: + +/usr/include/boost/type_traits/is_scalar.hpp: + +/usr/include/boost/predef/architecture/arm.h: + +/usr/include/boost/predef/language/cuda.h: + +/usr/include/boost/endian/conversion.hpp: + +/usr/include/stdint.h: + +/usr/include/c++/11/ext/new_allocator.h: + +/usr/include/boost/asio/detail/work_dispatcher.hpp: + +/usr/include/boost/asio/detail/buffer_resize_guard.hpp: + +third_party/threadpool/boost/threadpool/detail/worker_thread.hpp: + +/usr/include/boost/mpl/aux_/value_wknd.hpp: + +/usr/include/boost/type_traits/has_divides.hpp: + +/usr/include/c++/11/x86_64-redhat-linux/bits/error_constants.h: + +/usr/include/boost/smart_ptr/scoped_array.hpp: + +/usr/include/boost/preprocessor/logical/not.hpp: + +/usr/include/bits/types/cookie_io_functions_t.h: + +include/LibLsp/lsp/lsTextDocumentPositionParams.h: + +/usr/include/c++/11/bits/std_thread.h: + +/usr/include/c++/11/x86_64-redhat-linux/bits/c++config.h: + +/usr/include/boost/preprocessor/empty.hpp: + +/usr/include/c++/11/bits/range_access.h: + +/usr/include/boost/beast/websocket/impl/rfc6455.hpp: + +/usr/include/boost/beast/core/buffers_range.hpp: + +/usr/include/boost/process/detail/posix/compare_handles.hpp: + +/usr/include/locale.h: + +/usr/include/boost/type_traits/is_volatile.hpp: + +/usr/include/boost/predef/library/std.h: + +include/LibLsp/lsp/textDocument/document_symbol.h: + +/usr/include/c++/11/bits/stl_tempbuf.h: + +/usr/include/bits/typesizes.h: + +/usr/include/boost/throw_exception.hpp: + +/usr/include/boost/preprocessor/seq/limits/size_256.hpp: + +/usr/include/boost/date_time/date_iterator.hpp: + +/usr/include/boost/mpl/aux_/template_arity.hpp: + +/usr/include/bits/termios-struct.h: + +/usr/include/bits/types/struct_statx.h: + +/usr/include/boost/date_time/gregorian/greg_calendar.hpp: + +/usr/include/c++/11/bits/allocator.h: + +/usr/include/boost/asio/execution/invocable_archetype.hpp: + +/usr/include/sys/poll.h: + +/usr/include/boost/atomic/detail/string_ops.hpp: + +/usr/include/bits/cpu-set.h: + +/usr/include/bits/unistd_ext.h: + +/usr/include/boost/range/iterator_range_io.hpp: + +/usr/include/c++/11/bits/postypes.h: + +/usr/include/boost/preprocessor/tuple/elem.hpp: + +/usr/include/boost/mpl/integral_c_tag.hpp: + +/usr/include/boost/asio/detail/wait_op.hpp: + +/usr/include/boost/preprocessor/punctuation/comma.hpp: + +/usr/include/c++/11/memory: + +/usr/include/boost/thread/cv_status.hpp: + +/usr/include/boost/core/use_default.hpp: + +/usr/include/boost/config/detail/select_platform_config.hpp: + +/usr/include/boost/date_time/time_system_split.hpp: + +src/jsonrpc/Context.cpp: + +/usr/include/boost/mpl/equal_to.hpp: + +/usr/include/boost/config.hpp: + +/usr/include/boost/beast/core/file_win32.hpp: + +/usr/include/boost/fusion/container/deque/detail/at_impl.hpp: + +/usr/include/bits/types/sigval_t.h: + +/usr/include/boost/fusion/view/single_view/detail/value_of_impl.hpp: + +/usr/include/boost/mpl/aux_/yes_no.hpp: + +/usr/include/boost/date_time/wrapping_int.hpp: + +/usr/include/boost/preprocessor/arithmetic/dec.hpp: + +/usr/include/boost/asio/execution/mapping.hpp: + +/usr/include/boost/mpl/limits/arity.hpp: + +/usr/include/c++/11/bits/sstream.tcc: + +/usr/include/bits/types/__FILE.h: + +/usr/include/bits/types/struct_sigstack.h: + +/usr/include/boost/beast/websocket/detail/soft_mutex.hpp: + +/usr/include/boost/type_traits/has_minus.hpp: + +/usr/include/c++/11/backward/binders.h: + +/usr/include/boost/type_traits/add_pointer.hpp: + +/usr/include/boost/date_time/gregorian_calendar.hpp: + +/usr/include/boost/asio/execution/occupancy.hpp: + +/usr/include/boost/type_traits/has_greater_equal.hpp: + +/usr/include/boost/preprocessor/control/deduce_d.hpp: + +/usr/include/boost/asio/detail/date_time_fwd.hpp: + +/usr/include/boost/function/function_base.hpp: + +/usr/include/boost/type_traits/detail/yes_no_type.hpp: + +/usr/include/boost/mpl/aux_/config/has_xxx.hpp: + +include/LibLsp/lsp/general/lsWorkspaceClientCapabilites.h: + +/usr/include/boost/predef/library/std/_prefix.h: + +/usr/include/assert.h: + +/usr/include/boost/config/no_tr1/utility.hpp: + +/usr/include/boost/preprocessor/array/elem.hpp: + +/usr/include/wctype.h: + +/usr/include/boost/predef/detail/_cassert.h: + +/usr/include/boost/io/ostream_put.hpp: + +include/LibLsp/lsp/general/lsClientCapabilities.h: + +/usr/include/boost/intrusive/circular_list_algorithms.hpp: + +/usr/include/bits/sigevent-consts.h: + +/usr/include/boost/asio/detail/reactor_fwd.hpp: + +/usr/include/boost/predef/library/std/sgi.h: + +/usr/include/boost/mpl/transform_view.hpp: + +/usr/include/boost/fusion/sequence/intrinsic/value_at.hpp: + +/usr/include/boost/asio/serial_port.hpp: + +/usr/include/boost/fusion/container/vector/detail/prior_impl.hpp: + +/usr/include/c++/11/bits/stl_iterator.h: + +/usr/include/boost/fusion/container/list/detail/value_of_impl.hpp: + +/usr/include/termios.h: + +/usr/include/boost/smart_ptr/detail/sp_convertible.hpp: + +/usr/include/boost/config/abi_prefix.hpp: + +/usr/include/boost/asio/read_until.hpp: + +/usr/include/boost/type_traits/is_class.hpp: + +/usr/include/boost/smart_ptr/detail/sp_thread_sleep.hpp: + +/usr/include/boost/type_traits/is_function.hpp: + +/usr/include/bits/types/clockid_t.h: + +/usr/include/boost/predef/other.h: + +/usr/include/boost/mpl/aux_/has_begin.hpp: + +/usr/include/c++/11/debug/assertions.h: + +/usr/include/boost/beast/zlib/detail/window.hpp: + +/usr/include/c++/11/string: + +/usr/include/boost/assert.hpp: + +/usr/include/boost/function_types/detail/class_transform.hpp: + +/usr/include/boost/fusion/tuple/tuple_tie.hpp: + +/usr/include/boost/filesystem/config.hpp: + +/usr/include/boost/asio/ip/impl/address_v6.hpp: + +/usr/include/boost/predef/architecture/sparc.h: + +/usr/include/boost/container_hash/hash.hpp: + +/usr/include/boost/algorithm/string/trim.hpp: + +/usr/include/boost/algorithm/string/concept.hpp: + +/usr/include/boost/random/detail/generator_seed_seq.hpp: + +/usr/include/boost/preprocessor/arithmetic/sub.hpp: + +/usr/include/boost/mpl/erase_key.hpp: + +/usr/include/boost/asio/traits/require_member.hpp: + +/usr/include/boost/predef/detail/test.h: + +/usr/include/boost/beast/websocket/detail/decorator.hpp: + +include/LibLsp/lsp/general/shutdown.h: + +/usr/include/boost/mpl/aux_/config/dependent_nttp.hpp: + +/usr/include/c++/11/numeric: + +/usr/include/boost/beast/http/string_body.hpp: + +/usr/lib/gcc/x86_64-redhat-linux/11/include/stddef.h: + +/usr/include/c++/11/new: + +third_party/rapidjson/include/rapidjson/prettywriter.h: + +/usr/include/c++/11/climits: + +/usr/include/bits/sched.h: + +/usr/include/boost/mpl/numeric_cast.hpp: + +/usr/include/boost/beast/core/detail/remap_post_to_defer.hpp: + +/usr/include/boost/preprocessor/facilities/expand.hpp: + +/usr/include/boost/preprocessor/iteration/detail/bounds/upper1.hpp: + +/usr/include/c++/11/x86_64-redhat-linux/bits/gthr.h: + +/usr/include/boost/fusion/view/iterator_range/detail/is_segmented_impl.hpp: + +/usr/include/c++/11/x86_64-redhat-linux/bits/c++locale.h: + +/usr/include/boost/bind/storage.hpp: + +/usr/include/boost/filesystem/operations.hpp: + +/usr/include/c++/11/bits/stl_tree.h: + +/usr/include/boost/core/first_scalar.hpp: + +/usr/include/c++/11/tuple: + +/usr/include/bits/types/__sigset_t.h: + +/usr/include/c++/11/bits/basic_ios.tcc: + +/usr/include/boost/preprocessor/facilities/empty.hpp: + +/usr/include/boost/fusion/support/void.hpp: + +/usr/include/boost/system/is_error_condition_enum.hpp: + +/usr/include/boost/date_time/gregorian/greg_ymd.hpp: + +include/LibLsp/lsp/workspace/didChangeWorkspaceFolders.h: + +/usr/include/boost/fusion/algorithm/transformation/insert_range.hpp: + +/usr/include/c++/11/bits/locale_classes.tcc: + +/usr/include/boost/atomic/atomic_ref.hpp: + +/usr/include/bits/math-vector.h: + +/usr/include/c++/11/ext/aligned_buffer.h: + +/usr/include/c++/11/future: + +include/LibLsp/lsp/textDocument/willSave.h: + +/usr/include/boost/fusion/container/set/detail/as_set.hpp: + +/usr/include/c++/11/bits/basic_string.h: + +/usr/include/boost/atomic/detail/fence_ops_gcc_atomic.hpp: + +/usr/include/c++/11/bits/nested_exception.h: + +/usr/include/boost/asio/windows/overlapped_handle.hpp: + +/usr/include/boost/mpl/tag.hpp: + +/usr/include/bits/dirent_ext.h: + +/usr/include/boost/preprocessor/list/limits/fold_left_256.hpp: + +/usr/include/c++/11/cerrno: + +/usr/include/boost/atomic/detail/core_operations_emulated.hpp: + +/usr/include/boost/random/uniform_int_distribution.hpp: + +/usr/include/boost/uuid/detail/sha1.hpp: + +/usr/include/boost/beast/http/fields.hpp: + +/usr/include/boost/asio/detail/winsock_init.hpp: + +/usr/include/boost/fusion/mpl/erase_key.hpp: + +../gc-8.2.0/include/gc_pthread_redirects.h: + +/usr/include/boost/filesystem/path.hpp: + +/usr/include/c++/11/bits/localefwd.h: + +/usr/include/boost/type_traits/rank.hpp: + +/usr/include/bits/types/mbstate_t.h: + +/usr/include/boost/predef/platform/windows_runtime.h: + +/usr/include/bits/signum-generic.h: + +/usr/include/c++/11/bits/atomic_futex.h: + +/usr/include/boost/asio/signal_set.hpp: + +/usr/include/boost/type_traits/has_negate.hpp: + +third_party/threadpool/boost/threadpool.hpp: + +/usr/include/boost/mpl/aux_/size_impl.hpp: + +/usr/include/boost/mpl/aux_/common_name_wknd.hpp: + +/usr/include/boost/fusion/support/segmented_fold_until.hpp: + +/usr/include/boost/preprocessor/repetition/enum_params.hpp: + +/usr/include/boost/mpl/long_fwd.hpp: + +/usr/include/boost/preprocessor/logical/and.hpp: + +/usr/include/bits/types/locale_t.h: + +/usr/include/boost/preprocessor/list/adt.hpp: + +/usr/lib/gcc/x86_64-redhat-linux/11/include/limits.h: + +/usr/include/c++/11/unordered_map: + +/usr/include/boost/type_traits/has_right_shift_assign.hpp: + +/usr/include/boost/smart_ptr/shared_ptr.hpp: + +/usr/include/c++/11/bits/allocated_ptr.h: + +/usr/include/boost/asio/execution.hpp: + +/usr/include/boost/thread/lock_guard.hpp: + +/usr/include/boost/mpl/aux_/preprocessed/gcc/quote.hpp: + +/usr/include/boost/fusion/sequence/comparison/less_equal.hpp: + +/usr/include/boost/fusion/support/is_iterator.hpp: + +/usr/include/c++/11/utility: + +/usr/include/c++/11/bits/refwrap.h: + +/usr/include/boost/system/detail/generic_category_message.hpp: + +/usr/include/boost/fusion/sequence/intrinsic/swap.hpp: + +/usr/include/gnu/stubs-64.h: + +/usr/include/boost/intrusive/detail/iiterator.hpp: + +/usr/include/boost/beast/core/impl/static_buffer.hpp: + +/usr/include/boost/config/stdlib/libstdcpp3.hpp: + +include/LibLsp/lsp/extention/jdtls/OverridableMethod.h: + +/usr/include/boost/type_traits/is_void.hpp: + +/usr/include/boost/random/mersenne_twister.hpp: + +/usr/include/boost/numeric/conversion/numeric_cast_traits.hpp: + +/usr/include/boost/thread/thread.hpp: + +/usr/include/c++/11/bits/stl_multimap.h: + +/usr/include/boost/predef/compiler/digitalmars.h: + +/usr/include/boost/system/detail/error_code.hpp: + +/usr/include/boost/algorithm/string/yes_no_type.hpp: + +/usr/include/boost/range/detail/str_types.hpp: + +/usr/include/boost/preprocessor/slot/detail/def.hpp: + +/usr/include/boost/process/detail/posix/async_in.hpp: + +/usr/include/boost/mpl/push_front_fwd.hpp: + +/usr/include/boost/predef/language/stdcpp.h: + +/usr/include/string.h: + +/usr/include/c++/11/bits/atomic_lockfree_defines.h: + +/usr/include/boost/intrusive/detail/ebo_functor_holder.hpp: + +/usr/include/bits/types/struct_sched_param.h: + +/usr/include/boost/concept_check.hpp: + +/usr/include/boost/ratio/detail/mpl/lcm.hpp: + +/usr/include/c++/11/atomic: + +/usr/include/boost/smart_ptr/detail/sp_counted_base.hpp: + +/usr/include/bits/stdio_lim.h: + +/usr/include/boost/range/mutable_iterator.hpp: + +/usr/include/boost/beast/core/buffers_suffix.hpp: + +/usr/include/boost/fusion/iterator/mpl.hpp: + +/usr/include/c++/11/condition_variable: + +/usr/include/boost/fusion/sequence/comparison.hpp: + +/usr/include/gnu/stubs.h: + +include/LibLsp/lsp/lsResponseError.h: + +/usr/include/bits/types/__mbstate_t.h: + +/usr/include/c++/11/ratio: + +/usr/include/boost/mpl/multiplies.hpp: + +/usr/include/boost/core/default_allocator.hpp: + +/usr/include/boost/asio/detail/op_queue.hpp: + +/usr/include/bits/fcntl.h: + +/usr/include/boost/date_time/time.hpp: + +/usr/include/boost/type_traits/has_trivial_constructor.hpp: + +/usr/include/bits/stdint-intn.h: + +/usr/include/boost/asio/this_coro.hpp: + +/usr/include/boost/move/utility.hpp: + +/usr/include/boost/asio/ip/detail/endpoint.hpp: + +/usr/include/bits/types/__fpos_t.h: + +/usr/include/boost/predef/detail/os_detected.h: + +/usr/include/c++/11/bits/move.h: + +third_party/rapidjson/include/rapidjson/internal/strtod.h: + +/usr/include/boost/mp11/function.hpp: + +/usr/include/boost/mpl/vector/aux_/back.hpp: + +/usr/include/c++/11/iosfwd: + +/usr/include/c++/11/initializer_list: + +/usr/include/c++/11/bits/istream.tcc: + +/usr/include/boost/exception/detail/exception_ptr.hpp: + +/usr/include/boost/regex/v4/match_flags.hpp: + +/usr/include/boost/mpl/aux_/preprocessor/params.hpp: + +/usr/include/bits/types/clock_t.h: + +/usr/include/c++/11/bits/locale_classes.h: + +/usr/include/boost/predef/compiler/mpw.h: + +/usr/include/bits/types/timer_t.h: + +/usr/include/boost/thread.hpp: + +third_party/rapidjson/include/rapidjson/internal/swap.h: + +/usr/include/c++/11/bits/hashtable.h: + +/usr/include/bits/setjmp.h: + +/usr/include/boost/thread/recursive_mutex.hpp: + +/usr/include/boost/fusion/iterator/detail/adapt_deref_traits.hpp: + +/usr/include/boost/date_time/period.hpp: + +/usr/include/boost/asio/detail/regex_fwd.hpp: + +/usr/include/c++/11/bits/locale_facets.tcc: + +/usr/include/boost/smart_ptr/scoped_ptr.hpp: + +/usr/include/boost/type_traits/has_pre_increment.hpp: + +/usr/include/boost/core/ref.hpp: + +include/LibLsp/lsp/lsRange.h: + +/usr/include/boost/mpl/aux_/lambda_support.hpp: + +/usr/include/boost/beast/core/detail/temporary_buffer.hpp: + +/usr/include/c++/11/bits/atomic_base.h: + +/usr/include/boost/mpl/aux_/config/nttp.hpp: + +/usr/include/c++/11/exception: + +/usr/include/boost/predef/compiler/edg.h: + +/usr/include/boost/algorithm/string/find_format.hpp: + +/usr/include/wchar.h: + +/usr/include/boost/is_placeholder.hpp: + +/usr/include/boost/predef/architecture/convex.h: + +third_party/threadpool/boost/threadpool/pool_adaptors.hpp: + +/usr/include/sys/uio.h: + +/usr/include/c++/11/bits/stl_iterator_base_types.h: + +/usr/include/boost/predef/architecture/pyramid.h: + +/usr/include/boost/system/detail/to_std_category.hpp: + +src/lsp/textDocument.cpp: + +/usr/include/boost/algorithm/string/predicate.hpp: + +/usr/include/bits/stdlib-bsearch.h: + +/usr/include/boost/type_traits/remove_reference.hpp: + +/usr/include/boost/system/system_error.hpp: + +include/LibLsp/lsp/lsPosition.h: + +/usr/include/c++/11/ctime: + +/usr/include/boost/fusion/view/zip_view/zip_view_iterator_fwd.hpp: + +/usr/include/bits/wctype-wchar.h: + +/usr/include/boost/predef/hardware/simd.h: + +/usr/include/bits/dlfcn.h: + +/usr/include/boost/utility/enable_if.hpp: + +/usr/include/boost/type_traits/alignment_of.hpp: + +/usr/include/boost/type_traits/intrinsics.hpp: + +/usr/include/boost/scoped_array.hpp: + +/usr/include/boost/asio/placeholders.hpp: + +/usr/include/boost/asio/execution/scheduler.hpp: + +third_party/rapidjson/include/rapidjson/internal/biginteger.h: + +/usr/include/boost/asio/local/detail/impl/endpoint.ipp: + +/usr/include/c++/11/bits/vector.tcc: + +/usr/include/boost/move/utility_core.hpp: + +/usr/include/boost/type_traits/is_enum.hpp: + +/usr/include/boost/predef/compiler/gcc.h: + +/usr/include/boost/type_traits/is_assignable.hpp: + +/usr/include/boost/type_traits/conditional.hpp: + +/usr/include/boost/uuid/nil_generator.hpp: + +/usr/include/boost/asio/streambuf.hpp: + +/usr/include/boost/fusion/include/equal_to.hpp: + +/usr/include/c++/11/typeinfo: + +/usr/include/boost/type_traits/is_default_constructible.hpp: + +/usr/include/boost/beast/core/detail/work_guard.hpp: + +/usr/include/boost/utility/result_of.hpp: + +/usr/include/boost/mpl/aux_/preprocessed/gcc/unpack_args.hpp: + +/usr/include/c++/11/bits/exception_ptr.h: + +/usr/include/boost/bind/mem_fn_cc.hpp: + +/usr/include/boost/random/variate_generator.hpp: + +/usr/include/boost/smart_ptr/detail/operator_bool.hpp: + +/usr/include/bits/time.h: + +/usr/include/boost/asio/traits/submit_free.hpp: + +/usr/include/boost/type_traits/declval.hpp: + +third_party/threadpool/boost/threadpool/detail/pool_core.hpp: + +/usr/include/c++/11/bits/cxxabi_init_exception.h: + +/usr/include/boost/mpl/aux_/config/msvc.hpp: + +/usr/include/c++/11/bits/regex_error.h: + +/usr/include/linux/errno.h: + +include/LibLsp/JsonRpc/StreamMessageProducer.h: + +/usr/include/boost/utility/base_from_member.hpp: + +/usr/include/boost/thread/futures/is_future_type.hpp: + +/usr/include/boost/beast/websocket/stream.hpp: + +/usr/include/boost/beast/core/detail/impl/temporary_buffer.ipp: + +/usr/include/boost/intrusive/bstree.hpp: + +include/LibLsp/JsonRpc/Context.h: + +/usr/include/boost/type_traits/is_rvalue_reference.hpp: + +include/LibLsp/JsonRpc/stream.h: + +/usr/include/boost/type_traits/detail/is_function_cxx_11.hpp: + +/usr/include/boost/type_traits/is_pod.hpp: + +/usr/include/boost/type_traits/is_floating_point.hpp: + +/usr/include/boost/asio/impl/defer.hpp: + +/usr/include/c++/11/algorithm: + +/usr/include/boost/mpl/aux_/arithmetic_op.hpp: + +/usr/include/boost/type_traits/is_member_pointer.hpp: + +/usr/include/boost/type_traits/detail/is_member_function_pointer_cxx_11.hpp: + +/usr/include/boost/asio/ip/udp.hpp: + +/usr/include/ctype.h: + +/usr/include/boost/type_traits/is_nothrow_swappable.hpp: + +/usr/include/boost/function_types/config/cc_names.hpp: + +include/LibLsp/lsp/Markup/string_ref.h: + +../gc-8.2.0/include/gc.h: + +/usr/include/c++/11/bits/alloc_traits.h: + +/usr/include/boost/type_traits/has_not_equal_to.hpp: + +/usr/include/boost/core/noinit_adaptor.hpp: + +/usr/include/boost/preprocessor/list/fold_left.hpp: + +/usr/include/c++/11/bits/stringfwd.h: + +include/LibLsp/JsonRpc/MessageIssue.h: + +/usr/include/boost/type_traits/decay.hpp: + +/usr/include/boost/beast/http/empty_body.hpp: + +/usr/include/boost/type_traits/is_array.hpp: + +/usr/include/boost/fusion/mpl/erase.hpp: + +/usr/include/boost/atomic/detail/wait_ops_emulated.hpp: + +include/LibLsp/JsonRpc/macro_map.h: + +/usr/include/boost/asio/detail/string_view.hpp: + +/usr/include/boost/fusion/mpl/begin.hpp: + +/usr/include/boost/type_traits/is_base_and_derived.hpp: + +/usr/include/boost/intrusive/list_hook.hpp: + +/usr/include/boost/mpl/vector/aux_/preprocessed/typeof_based/vector10.hpp: + +/usr/include/boost/mpl/aux_/config/lambda.hpp: + +/usr/include/boost/fusion/view/joint_view.hpp: + +/usr/include/boost/beast/core/rate_policy.hpp: + +/usr/include/boost/mp11/version.hpp: + +third_party/rapidjson/include/rapidjson/reader.h: + +/usr/include/boost/predef/os/bsd/free.h: + +/usr/include/c++/11/ext/concurrence.h: + +/usr/include/boost/mp11/detail/mp_map_find.hpp: + +/usr/include/boost/mpl/aux_/type_wrapper.hpp: + +/usr/include/boost/none.hpp: + +/usr/include/boost/move/adl_move_swap.hpp: + +/usr/include/boost/preprocessor/logical/bitor.hpp: + +/usr/include/bits/waitflags.h: + +/usr/include/boost/type_traits/is_nothrow_move_assignable.hpp: + +/usr/include/bits/xopen_lim.h: + +/usr/include/boost/date_time/time_clock.hpp: + +/usr/include/boost/type_traits/has_trivial_move_assign.hpp: + +/usr/include/boost/beast/websocket/detail/hybi13.ipp: + +include/LibLsp/JsonRpc/GCThreadContext.h: + +/usr/include/boost/fusion/algorithm/transformation/erase.hpp: + +/usr/include/boost/process/detail/traits/error.hpp: + +/usr/include/boost/preprocessor/control/detail/while.hpp: + +/usr/include/c++/11/x86_64-redhat-linux/bits/ctype_inline.h: + +/usr/include/boost/regex/config.hpp: + +/usr/include/boost/beast/core/impl/flat_stream.hpp: + +/usr/include/boost/type_traits/has_nothrow_assign.hpp: + +/usr/include/boost/fusion/mpl/pop_back.hpp: + +/usr/include/boost/predef/platform/windows_server.h: + +/usr/include/boost/mpl/has_xxx.hpp: + +/usr/include/boost/type_traits/is_nothrow_move_constructible.hpp: + +/usr/include/boost/fusion/algorithm/transformation/pop_front.hpp: + +/usr/include/boost/move/detail/to_raw_pointer.hpp: + +/usr/include/boost/preprocessor/list/reverse.hpp: + +/usr/include/boost/beast/core/multi_buffer.hpp: + +/usr/include/boost/beast/core/impl/buffered_read_stream.hpp: + +/usr/include/boost/optional/detail/optional_trivially_copyable_base.hpp: + +/usr/include/boost/preprocessor/debug/error.hpp: + +/usr/include/boost/predef/compiler.h: + +third_party/rapidjson/include/rapidjson/document.h: + +/usr/include/boost/move/detail/config_begin.hpp: + +/usr/include/boost/move/detail/meta_utils.hpp: + +/usr/include/boost/preprocessor/array/data.hpp: + +/usr/include/boost/integer.hpp: + +/usr/include/boost/thread/pthread/recursive_mutex.hpp: + +/usr/include/boost/fusion/tuple/tuple_fwd.hpp: + +/usr/include/boost/move/traits.hpp: + +/usr/include/boost/move/detail/config_end.hpp: + +/usr/include/bits/siginfo-arch.h: + +/usr/include/boost/process/detail/posix/wait_group.hpp: + +/usr/include/boost/move/detail/type_traits.hpp: + +/usr/include/boost/beast/core/detail/stream_traits.hpp: + +/usr/include/boost/beast/zlib/deflate_stream.hpp: + +/usr/include/boost/chrono/config.hpp: + +/usr/include/boost/thread/detail/make_tuple_indices.hpp: + +/usr/include/bits/termios-misc.h: + +/usr/include/boost/date_time/posix_time/posix_time_system.hpp: + +/usr/include/boost/none_t.hpp: + +/usr/include/boost/date_time/date_generators.hpp: + +/usr/include/boost/utility/compare_pointees.hpp: + +/usr/include/boost/date_time/date.hpp: + +/usr/include/c++/11/bits/stl_algo.h: + +/usr/include/boost/fusion/sequence/intrinsic.hpp: + +/usr/include/boost/asio/use_future.hpp: + +/usr/include/boost/preprocessor/iteration/iterate.hpp: + +/usr/include/boost/asio/detail/reactive_socket_service_base.hpp: + +/usr/include/boost/type_traits/has_plus_assign.hpp: + +/usr/include/boost/preprocessor/slot/slot.hpp: + +/usr/include/boost/preprocessor/arithmetic/limits/dec_256.hpp: + +/usr/include/boost/fusion/include/filter_if.hpp: + +/usr/include/boost/fusion/view/iterator_range/detail/end_impl.hpp: + +/usr/include/boost/preprocessor/arithmetic/inc.hpp: + +/usr/include/boost/intrusive/bstree_algorithms.hpp: + +/usr/include/boost/preprocessor/facilities/overload.hpp: + +/usr/include/boost/predef/compiler/microtec.h: + +include/LibLsp/JsonRpc/MessageProducer.h: + +/usr/include/bits/types/struct_tm.h: + +/usr/include/bits/sigstack.h: + +include/LibLsp/lsp/lsp_diagnostic.h: + +/usr/include/boost/preprocessor/variadic/size.hpp: + +/usr/include/boost/asio/impl/detached.hpp: + +/usr/include/boost/preprocessor/control/iif.hpp: + +include/LibLsp/lsp/method_type.h: + +/usr/include/boost/predef/compiler/llvm.h: + +/usr/include/boost/preprocessor/tuple/rem.hpp: + +/usr/include/boost/atomic/detail/extra_operations_fwd.hpp: + +/usr/include/boost/asio/impl/executor.ipp: + +/usr/include/boost/asio/ip/unicast.hpp: + +/usr/include/boost/preprocessor/seq/elem.hpp: + +third_party/rapidjson/include/rapidjson/internal/clzll.h: + +/usr/include/boost/asio/impl/system_executor.hpp: + +/usr/include/boost/predef/os/amigaos.h: + +/usr/include/boost/preprocessor/tuple/detail/is_single_return.hpp: + +/usr/include/boost/thread/detail/thread_interruption.hpp: + +/usr/include/boost/beast/core/detail/base64.hpp: + +/usr/include/boost/type_traits/has_left_shift_assign.hpp: + +/usr/include/boost/preprocessor/variadic/limits/elem_64.hpp: + +/usr/include/boost/predef/library/c/zos.h: + +/usr/include/c++/11/bits/stl_iterator_base_funcs.h: + +/usr/include/boost/fusion/view/zip_view/detail/begin_impl.hpp: + +/usr/include/boost/asio/execution/blocking.hpp: + +/usr/include/boost/beast/core/static_string.hpp: + +/usr/include/c++/11/bits/streambuf.tcc: + +/usr/include/boost/preprocessor/control/if.hpp: + +/usr/include/c++/11/x86_64-redhat-linux/bits/messages_members.h: + +/usr/include/boost/asio/detail/timer_scheduler_fwd.hpp: + +/usr/include/boost/asio/execution/context_as.hpp: + +/usr/include/bits/thread-shared-types.h: + +/usr/include/boost/preprocessor/control/detail/limits/while_256.hpp: + +/usr/include/boost/utility/binary.hpp: + +/usr/include/boost/mpl/integral_c_fwd.hpp: + +/usr/include/boost/asio/detail/operation.hpp: + +/usr/include/boost/preprocessor/logical/bool.hpp: + +include/LibLsp/lsp/textDocument/references.h: + +/usr/include/boost/type_traits/has_bit_and_assign.hpp: + +/usr/include/boost/numeric/conversion/detail/conversion_traits.hpp: + +/usr/include/bits/flt-eval-method.h: + +/usr/include/boost/type_traits/is_complete.hpp: + +/usr/include/boost/preprocessor/detail/auto_rec.hpp: + +/usr/include/boost/preprocessor/tuple/eat.hpp: + +/usr/include/bits/netdb.h: + +/usr/include/boost/asio/ip/address.hpp: + +/usr/include/boost/preprocessor/facilities/intercept.hpp: + +/usr/include/bits/posix_opt.h: + +/usr/include/boost/beast/http/impl/basic_parser.ipp: + +/usr/include/boost/preprocessor/facilities/limits/intercept_256.hpp: + +/usr/include/boost/predef/architecture/x86/64.h: + +/usr/include/sys/single_threaded.h: + +third_party/threadpool/boost/threadpool/size_policies.hpp: + +/usr/include/c++/11/bits/streambuf_iterator.h: + +/usr/include/boost/beast/http/detail/basic_parsed_list.hpp: + +/usr/include/boost/type_traits/type_identity.hpp: + +/usr/include/boost/fusion/support/detail/segmented_fold_until_impl.hpp: + +/usr/include/c++/11/bits/ios_base.h: + +/usr/include/boost/mp11/detail/mp_append.hpp: + +/usr/include/boost/preprocessor/slot/detail/shared.hpp: + +/usr/include/boost/mp11/detail/mp_with_index.hpp: + +/usr/include/bits/byteswap.h: + +/usr/include/features.h: + +/usr/include/boost/preprocessor/iteration/detail/iter/limits/forward1_256.hpp: + +include/LibLsp/lsp/extention/jdtls/generateDelegateMethods.h: + +/usr/include/boost/type_traits/detail/has_postfix_operator.hpp: + +/usr/include/boost/ratio/detail/overflow_helpers.hpp: + +/usr/include/boost/range/detail/common.hpp: + +/usr/include/boost/system/is_error_code_enum.hpp: + +/usr/include/boost/asio/detail/io_object_impl.hpp: + +/usr/include/boost/atomic/detail/atomic_ref_impl.hpp: + +/usr/include/boost/optional/optional_fwd.hpp: + +/usr/include/boost/numeric/conversion/udt_builtin_mixture_enum.hpp: + +/usr/include/boost/beast/core/detail/read.hpp: + +/usr/include/boost/smart_ptr/detail/local_sp_deleter.hpp: + +/usr/include/boost/optional/detail/optional_factory_support.hpp: + +/usr/include/boost/thread/future.hpp: + +/usr/include/c++/11/bits/quoted_string.h: + +/usr/include/boost/asio/execution/any_executor.hpp: + +include/LibLsp/lsp/lsVersionedTextDocumentIdentifier.h: + +/usr/include/boost/algorithm/string/detail/find_iterator.hpp: + +/usr/include/boost/asio/detail/std_fenced_block.hpp: + +/usr/include/boost/predef/compiler/sunpro.h: + +/usr/include/boost/optional/detail/optional_swap.hpp: + +/usr/include/boost/date_time/date_duration.hpp: + +/usr/include/bits/locale.h: + +/usr/include/boost/predef/hardware/simd/arm/versions.h: + +/usr/include/boost/asio/packaged_task.hpp: + +include/LibLsp/lsp/textDocument/resolveCodeLens.h: + +/usr/include/boost/function/function_template.hpp: + +/usr/include/boost/beast/core/detail/static_string.hpp: + +src/jsonrpc/GCThreadContext.cpp: + +/usr/include/signal.h: + +/usr/include/strings.h: + +/usr/include/boost/asio/detail/bind_handler.hpp: + +/usr/include/boost/asio/detail/handler_cont_helpers.hpp: + +/usr/include/boost/beast/core/string.hpp: + +/usr/include/bits/signum-arch.h: + +/usr/include/boost/type_traits/has_unary_minus.hpp: + +/usr/include/bits/siginfo-consts.h: + +/usr/include/boost/preprocessor/iteration/detail/iter/forward1.hpp: + +/usr/include/bits/sigcontext.h: + +/usr/include/boost/asio/detail/timer_queue_set.hpp: + +/usr/include/bits/struct_rwlock.h: + +include/LibLsp/lsp/lsDocumentUri.h: + +/usr/include/c++/11/cstring: + +/usr/include/boost/mpl/lambda_fwd.hpp: + +/usr/include/inttypes.h: + +/usr/include/boost/type_traits/is_compound.hpp: + +/usr/include/boost/thread/detail/thread_safety.hpp: + +/usr/include/boost/asio/traits/start_free.hpp: + +/usr/include/boost/date_time/time_system_counted.hpp: + +third_party/rapidjson/include/rapidjson/encodings.h: + +/usr/include/c++/11/bit: + +/usr/include/boost/beast/websocket/option.hpp: + +/usr/include/bits/posix1_lim.h: + +third_party/rapidjson/include/rapidjson/encodedstream.h: + +/usr/include/boost/asio/detail/recycling_allocator.hpp: + +/usr/include/boost/intrusive/detail/function_detector.hpp: + +/usr/include/boost/endian/detail/order.hpp: + +/usr/include/bits/types/error_t.h: + +/usr/include/boost/algorithm/string/join.hpp: + +/usr/include/boost/date_time/gregorian/conversion.hpp: + +third_party/rapidjson/include/rapidjson/memorystream.h: + +/usr/include/boost/fusion/support/detail/is_same_size.hpp: + +/usr/include/bits/statx.h: + +third_party/rapidjson/include/rapidjson/error/error.h: + +/usr/include/boost/preprocessor/control/expr_iif.hpp: + +/usr/include/boost/predef/hardware/simd/x86_amd/versions.h: + +/usr/include/boost/numeric/conversion/detail/udt_builtin_mixture.hpp: + +/usr/include/boost/fusion/sequence/intrinsic/detail/segmented_end_impl.hpp: + +third_party/rapidjson/include/rapidjson/internal/ieee754.h: + +/usr/include/boost/beast/core/ostream.hpp: + +/usr/include/boost/preprocessor/repetition/enum.hpp: + +/usr/include/boost/predef/compiler/metaware.h: + +/usr/include/boost/intrusive/list.hpp: + +/usr/include/c++/11/limits: + +/usr/include/boost/date_time/posix_time/posix_time_types.hpp: + +/usr/include/c++/11/bits/stream_iterator.h: + +/usr/include/c++/11/bits/cpp_type_traits.h: + +/usr/include/boost/preprocessor/facilities/check_empty.hpp: + +src/jsonrpc/RemoteEndPoint.cpp: + +/usr/include/boost/thread/once.hpp: + +/usr/include/boost/type_traits/has_modulus.hpp: + +/usr/include/boost/mpl/aux_/config/compiler.hpp: + +/usr/include/boost/beast/http/impl/message.hpp: + +/usr/include/boost/asio/execution/start.hpp: + +/usr/include/boost/preprocessor/repetition/repeat_from_to.hpp: + +/usr/include/boost/function_types/is_member_function_pointer.hpp: + +/usr/include/boost/ratio/ratio_fwd.hpp: + +/usr/include/boost/asio/traits/schedule_free.hpp: + +/usr/include/boost/preprocessor/repetition/enum_trailing_params.hpp: + +/usr/include/boost/preprocessor/list/fold_right.hpp: + +/usr/include/c++/11/sstream: + +/usr/include/boost/next_prior.hpp: + +include/LibLsp/lsp/lsAny.h: + +src/lsp/Markup.cpp: + +/usr/include/boost/asio/detail/scoped_ptr.hpp: + +/usr/include/boost/predef/compiler/nvcc.h: + +/usr/include/boost/function/detail/maybe_include.hpp: + +/usr/include/c++/11/cstddef: + +include/LibLsp/lsp/language/language.h: + +/usr/include/boost/asio/async_result.hpp: + +../gc-8.2.0/include/gc_config_macros.h: + +/usr/include/boost/range/difference_type.hpp: + +/usr/include/boost/asio/traits/static_query.hpp: + +/usr/include/c++/11/chrono: + +/usr/include/boost/type_traits/has_dereference.hpp: + +/usr/include/boost/predef/architecture/ptx.h: + +/usr/include/boost/thread/detail/move.hpp: + +/usr/include/boost/mpl/zip_view.hpp: + +/usr/include/c++/11/cstdio: + +/usr/include/boost/optional/detail/optional_relops.hpp: + +/usr/include/boost/fusion/iterator/equal_to.hpp: + +/usr/include/endian.h: + +include/LibLsp/JsonRpc/lsRequestId.h: + +/usr/include/boost/fusion/view/transform_view/detail/at_impl.hpp: + +/usr/include/boost/smart_ptr/detail/spinlock_pool.hpp: + +/usr/include/boost/mpl/reverse_fold.hpp: + +/usr/include/bits/types/struct___jmp_buf_tag.h: + +include/LibLsp/JsonRpc/lsResponseMessage.h: + +/usr/include/boost/atomic/detail/wait_capabilities.hpp: + +/usr/include/boost/preprocessor/logical/bitand.hpp: + +include/LibLsp/JsonRpc/Cancellation.h: + +include/LibLsp/JsonRpc/NotificationInMessage.h: + +/usr/include/boost/atomic/detail/type_traits/is_signed.hpp: + +/usr/include/boost/asio/detail/impl/signal_set_service.ipp: + +/usr/include/boost/atomic/detail/memory_order_utils.hpp: + +/usr/include/boost/asio/detail/impl/strand_executor_service.hpp: + +/usr/include/boost/predef/compiler/watcom.h: + +/usr/include/boost/asio/handler_alloc_hook.hpp: + +include/LibLsp/JsonRpc/threaded_queue.h: + +/usr/include/boost/beast/http/impl/rfc7230.hpp: + +/usr/include/c++/11/locale: + +/usr/include/boost/predef/os/unix.h: + +/usr/include/boost/atomic/detail/atomic_flag_impl.hpp: + +/usr/include/c++/11/bits/stl_deque.h: + +/usr/include/boost/atomic/detail/bitwise_fp_cast.hpp: + +/usr/include/c++/11/bits/shared_ptr.h: + +/usr/include/boost/mpl/aux_/config/msvc_typename.hpp: + +/usr/include/c++/11/bits/hashtable_policy.h: + +/usr/include/boost/mp11/integral.hpp: + +/usr/include/boost/fusion/adapted/std_tuple/mpl/clear.hpp: + +/usr/include/alloca.h: + +/usr/include/bits/wchar.h: + +include/LibLsp/lsp/location_type.h: + +/usr/include/boost/type_traits/is_arithmetic.hpp: + +/usr/include/c++/11/bits/unordered_map.h: + +include/LibLsp/JsonRpc/json.h: + +third_party/rapidjson/include/rapidjson/stringbuffer.h: + +/usr/include/boost/preprocessor/variadic/limits/size_64.hpp: + +/usr/include/boost/fusion/container/map/detail/at_impl.hpp: + +/usr/include/boost/core/empty_value.hpp: + +/usr/include/c++/11/debug/debug.h: + +/usr/include/boost/type_traits/is_constructible.hpp: + +include/LibLsp/JsonRpc/ScopeExit.h: + +/usr/include/c++/11/bits/functional_hash.h: + +third_party/threadpool/boost/threadpool/detail/future.hpp: + +/usr/include/boost/mpl/aux_/O1_size_impl.hpp: + +/usr/include/c++/11/iterator: + +/usr/include/boost/config/detail/posix_features.hpp: + +/usr/include/boost/atomic/detail/extra_fp_operations.hpp: + +/usr/include/boost/preprocessor/arithmetic/add.hpp: + +/usr/include/boost/tti/detail/dmacro_sunfix.hpp: + +/usr/include/boost/mpl/void_fwd.hpp: + +/usr/include/time.h: + +/usr/include/boost/type_traits/has_post_decrement.hpp: + +/usr/include/boost/predef/os/vms.h: + +/usr/include/boost/preprocessor/logical/compl.hpp: + +/usr/include/boost/date_time/gregorian/greg_month.hpp: + +include/LibLsp/lsp/textDocument/documentColor.h: + +/usr/include/boost/date_time/special_defs.hpp: + +/usr/include/boost/thread/csbl/memory/shared_ptr.hpp: + +include/LibLsp/lsp/lsp_completion.h: + +/usr/include/boost/predef/compiler/ekopath.h: + +/usr/include/boost/config/detail/select_compiler_config.hpp: + +/usr/include/c++/11/bits/stl_raw_storage_iter.h: + +/usr/include/bits/local_lim.h: + +/usr/include/boost/preprocessor/facilities/identity.hpp: + +/usr/include/boost/asio/detail/null_event.hpp: + +/usr/include/boost/mpl/unpack_args.hpp: + +/usr/include/boost/fusion/view/nview/detail/equal_to_impl.hpp: + +/usr/include/c++/11/bits/memoryfwd.h: + +/usr/include/boost/preprocessor/comparison/not_equal.hpp: + +/usr/include/boost/atomic/detail/header.hpp: + +/usr/include/boost/iterator/iterator_traits.hpp: + +/usr/include/boost/iterator/iterator_concepts.hpp: + +/usr/include/boost/process/detail/traits/env.hpp: + +/usr/include/boost/preprocessor/arithmetic/detail/is_minimum_number.hpp: + +/usr/include/boost/mpl/aux_/msvc_type.hpp: + +/usr/include/boost/mp11/detail/mp_remove_if.hpp: + +/usr/include/boost/integer_fwd.hpp: + +/usr/include/boost/type_index.hpp: + +/usr/include/boost/asio/io_service.hpp: + +/usr/include/boost/container_hash/hash_fwd.hpp: + +/usr/include/boost/asio/ip/network_v6.hpp: + +/usr/include/boost/fusion/algorithm/iteration/detail/for_each.hpp: + +/usr/include/boost/core/demangle.hpp: + +/usr/include/boost/beast/http/write.hpp: + +/usr/include/c++/11/cxxabi.h: + +/usr/include/boost/process/detail/posix/sigchld_service.hpp: + +/usr/include/c++/11/x86_64-redhat-linux/bits/cxxabi_tweaks.h: + +/usr/include/boost/mpl/sequence_tag.hpp: + +/usr/include/boost/type_traits/composite_traits.hpp: + +/usr/include/boost/thread/detail/invoke.hpp: + +/usr/include/boost/fusion/view/joint_view/detail/value_of_data_impl.hpp: + +/usr/include/boost/function_equal.hpp: + +/usr/include/boost/function/function_fwd.hpp: + +/usr/include/boost/predef/compiler/visualc.h: + +/usr/include/c++/11/x86_64-redhat-linux/bits/c++allocator.h: + +/usr/include/boost/mem_fn.hpp: + +/usr/include/boost/regex/config/cwchar.hpp: + +/usr/include/boost/mpl/inserter.hpp: + +/usr/include/boost/bind/mem_fn.hpp: + +/usr/include/c++/11/experimental/string_view: + +/usr/include/bits/statx-generic.h: + +/usr/include/fcntl.h: + +/usr/include/asm/ioctls.h: + +/usr/include/boost/bind/mem_fn_template.hpp: + +/usr/include/boost/preprocessor/enum.hpp: + +/usr/include/boost/asio/traits/set_value_member.hpp: + +/usr/include/boost/preprocessor/enum_params.hpp: + +/usr/include/boost/function/detail/function_iterate.hpp: + +/usr/include/boost/fusion/view/single_view/detail/distance_impl.hpp: + +/usr/include/boost/thread/detail/thread.hpp: + +/usr/include/boost/intrusive/detail/config_end.hpp: + +/usr/include/boost/thread/detail/thread_heap_alloc.hpp: + +/usr/include/boost/asio/execution/execute.hpp: + +/usr/include/boost/thread/pthread/thread_heap_alloc.hpp: + +/usr/include/boost/thread/detail/is_convertible.hpp: + +/usr/include/c++/11/list: + +/usr/include/boost/fusion/view/transform_view/detail/advance_impl.hpp: + +/usr/include/boost/asio/connect.hpp: + +include/LibLsp/lsp/workspace/did_change_configuration.h: + +/usr/include/boost/beast/core/detail/string.hpp: + +/usr/include/boost/bind/bind.hpp: + +/usr/include/c++/11/istream: + +/usr/include/boost/asio/ip/impl/host_name.ipp: + +/usr/include/boost/config/helper_macros.hpp: + +/usr/include/boost/bind/arg.hpp: + +/usr/include/boost/preprocessor/variadic/has_opt.hpp: + +/usr/include/boost/bind/detail/result_traits.hpp: + +/usr/include/boost/intrusive/detail/bstree_algorithms_base.hpp: + +/usr/include/boost/visit_each.hpp: + +/usr/include/boost/core/is_same.hpp: + +/usr/include/boost/algorithm/string/predicate_facade.hpp: + +/usr/include/boost/bind/bind_cc.hpp: + +/usr/include/boost/bind/placeholders.hpp: + +/usr/include/boost/beast/core/detect_ssl.hpp: + +/usr/include/boost/type_traits/detail/has_prefix_operator.hpp: + +/usr/include/boost/io/ios_state.hpp: + +/usr/include/boost/io_fwd.hpp: + +/usr/include/boost/predef/platform/ios.h: + +/usr/include/libintl.h: + +/usr/include/boost/fusion/container.hpp: + +/usr/include/c++/11/bits/codecvt.h: + +/usr/include/c++/11/bits/locale_facets_nonio.tcc: + +/usr/include/boost/regex_fwd.hpp: + +/usr/include/c++/11/bits/locale_conv.h: + +/usr/include/boost/predef/platform/cloudabi.h: + +/usr/include/boost/functional/hash.hpp: + +/usr/include/boost/optional/detail/optional_config.hpp: + +/usr/include/boost/container_hash/detail/hash_float.hpp: + +/usr/include/boost/fusion/adapted/std_tuple/tag_of.hpp: + +/usr/include/boost/container_hash/detail/limits.hpp: + +/usr/include/boost/fusion/container/deque.hpp: + +/usr/include/boost/integer/static_log2.hpp: + +/usr/include/bits/syscall.h: + +/usr/include/boost/thread/futures/future_error.hpp: + +/usr/include/boost/container_hash/extensions.hpp: + +/usr/include/boost/tuple/tuple.hpp: + +/usr/include/boost/thread/detail/thread_group.hpp: + +/usr/include/boost/atomic/detail/core_arch_operations_fwd.hpp: + +/usr/include/boost/thread/csbl/memory/unique_ptr.hpp: + +/usr/include/boost/thread/csbl/memory/config.hpp: + +/usr/include/boost/move/detail/unique_ptr_meta_utils.hpp: + +/usr/include/boost/asio/ip/impl/address.ipp: + +/usr/include/boost/move/make_unique.hpp: + +/usr/include/boost/type_traits/is_final.hpp: + +/usr/include/boost/thread/pthread/shared_mutex.hpp: + +/usr/include/boost/atomic.hpp: + +/usr/include/boost/asio/detail/call_stack.hpp: + +/usr/include/boost/memory_order.hpp: + +/usr/include/boost/process/async.hpp: + +/usr/include/boost/beast/core/impl/buffers_suffix.hpp: + +/usr/include/boost/atomic/capabilities.hpp: + +/usr/include/boost/atomic/detail/capabilities.hpp: + +/usr/include/boost/atomic/detail/futex.hpp: + +/usr/include/boost/atomic/detail/addressof.hpp: + +/usr/include/boost/version.hpp: + +/usr/include/asm/unistd_64.h: + +/usr/include/boost/beast/core/impl/static_buffer.ipp: + +/usr/include/boost/thread/pthread/condition_variable_fwd.hpp: + +/usr/include/linux/types.h: + +/usr/include/asm/types.h: + +/usr/include/asm-generic/int-ll64.h: + +include/LibLsp/lsp/extention/jdtls/buildWorkspace.h: + +/usr/include/boost/predef/library/c/gnu.h: + +/usr/include/boost/beast/websocket/impl/stream_impl.hpp: + +/usr/include/asm/bitsperlong.h: + +/usr/include/linux/posix_types.h: + +/usr/include/linux/stddef.h: + +/usr/include/boost/fusion/container/map/map_fwd.hpp: + +/usr/include/boost/asio/detail/posix_signal_blocker.hpp: + +/usr/include/asm/posix_types.h: + +/usr/include/boost/asio/detail/impl/reactive_socket_service_base.ipp: + +/usr/include/boost/mpl/aux_/config/use_preprocessed.hpp: + +/usr/include/boost/beast/zlib/detail/bitstream.hpp: + +/usr/include/boost/beast/websocket/impl/stream.hpp: + +/usr/include/asm-generic/posix_types.h: + +/usr/include/boost/beast/core/file_stdio.hpp: + +/usr/include/boost/beast/http/parser.hpp: + +/usr/include/boost/system/detail/errc.hpp: + +/usr/include/boost/beast/core/flat_stream.hpp: + +/usr/include/boost/beast/core/flat_buffer.hpp: + +/usr/include/boost/atomic/detail/intptr.hpp: + +/usr/include/boost/concept/assert.hpp: + +/usr/include/boost/atomic/detail/footer.hpp: + +/usr/include/boost/atomic/detail/float_sizes.hpp: + +/usr/lib/gcc/x86_64-redhat-linux/11/include/float.h: + +/usr/include/boost/asio/handler_continuation_hook.hpp: + +/usr/include/boost/atomic/detail/caps_gcc_atomic.hpp: + +/usr/include/boost/fusion/algorithm/query/find.hpp: + +/usr/include/boost/atomic/detail/caps_arch_gcc_x86.hpp: + +/usr/include/boost/mpl/aux_/reverse_fold_impl.hpp: + +/usr/include/boost/atomic/detail/wait_caps_futex.hpp: + +/usr/include/boost/date_time/year_month_day.hpp: + +/usr/include/boost/type_traits/cv_traits.hpp: + +/usr/include/boost/atomic/atomic.hpp: + +/usr/include/boost/mpl/next.hpp: + +/usr/include/boost/atomic/detail/classify.hpp: + +/usr/include/boost/atomic/detail/type_traits/is_floating_point.hpp: + +/usr/include/asm/errno.h: + +/usr/include/boost/beast/websocket/detail/frame.hpp: + +/usr/include/boost/atomic/detail/storage_traits.hpp: + +/usr/include/boost/mpl/aux_/largest_int.hpp: + +/usr/include/boost/algorithm/string/std/string_traits.hpp: + +/usr/include/boost/atomic/detail/aligned_variable.hpp: + +/usr/include/boost/beast/core/detail/stream_base.hpp: + +/usr/include/boost/atomic/detail/type_traits/alignment_of.hpp: + +/usr/include/bits/uio-ext.h: + +/usr/include/boost/atomic/detail/bitwise_cast.hpp: + +/usr/include/boost/asio/detail/posix_static_mutex.hpp: + +/usr/include/boost/algorithm/string/detail/formatter.hpp: + +/usr/include/boost/atomic/detail/type_traits/integral_constant.hpp: + +/usr/include/errno.h: + +/usr/include/boost/atomic/detail/integral_conversions.hpp: + +/usr/include/boost/atomic/detail/type_traits/make_signed.hpp: + +include/LibLsp/lsp/extention/jdtls/checkConstructorsStatus.h: + +/usr/include/boost/atomic/detail/core_arch_operations.hpp: + +/usr/include/boost/preprocessor/seq/limits/elem_256.hpp: + +/usr/include/boost/asio/buffer.hpp: + +/usr/include/bits/floatn.h: + +/usr/include/boost/mp11/algorithm.hpp: + +/usr/include/boost/intrusive/detail/hook_traits.hpp: + +/usr/include/boost/atomic/detail/core_arch_ops_gcc_x86.hpp: + +/usr/include/bits/stdlib-float.h: + +/usr/include/boost/asio/ip/multicast.hpp: + +/usr/include/boost/atomic/detail/pause.hpp: + +/usr/include/boost/atomic/detail/wait_operations_fwd.hpp: + +/usr/include/boost/atomic/detail/extra_ops_generic.hpp: + +/usr/include/boost/beast/core/file_base.hpp: + +/usr/include/boost/mpl/aux_/push_front_impl.hpp: + +/usr/include/boost/atomic/detail/extra_ops_emulated.hpp: + +/usr/include/boost/iterator/iterator_categories.hpp: + +/usr/include/boost/asio/ip/address_v6.hpp: + +/usr/include/boost/exception/get_error_info.hpp: + +/usr/include/boost/atomic/detail/extra_ops_gcc_x86.hpp: + +/usr/include/boost/fusion/container/map/detail/build_map.hpp: + +/usr/include/boost/predef/other/endian.h: + +/usr/include/boost/atomic/detail/type_traits/is_trivially_default_constructible.hpp: + +/usr/include/boost/atomic/detail/type_traits/conditional.hpp: + +/usr/include/boost/atomic/detail/fp_operations.hpp: + +/usr/include/boost/mpl/aux_/has_size.hpp: + +/usr/include/boost/preprocessor/arithmetic/detail/is_maximum_number.hpp: + +/usr/include/boost/atomic/detail/fp_ops_generic.hpp: + +/usr/include/boost/atomic/detail/fp_operations_fwd.hpp: + +/usr/include/boost/atomic/detail/fp_ops_emulated.hpp: + +/usr/include/boost/asio/detail/chrono.hpp: + +/usr/include/boost/atomic/detail/type_traits/is_iec559.hpp: + +/usr/include/boost/intrusive/detail/key_nodeptr_comp.hpp: + +/usr/include/boost/atomic/atomic_flag.hpp: + +/usr/include/boost/atomic/ipc_atomic_flag.hpp: + +/usr/include/boost/type_traits/remove_cv.hpp: + +/usr/include/boost/thread/tss.hpp: + +/usr/include/boost/beast/websocket/detail/service.ipp: + +/usr/include/boost/atomic/detail/lock_pool.hpp: + +/usr/include/boost/thread/locks.hpp: + +third_party/uri/include/network/uri/uri_errors.hpp: + +/usr/include/boost/thread/shared_lock_guard.hpp: + +/usr/include/boost/atomic/detail/core_operations.hpp: + +/usr/include/boost/smart_ptr/detail/sp_disable_deprecated.hpp: + +/usr/include/boost/thread/barrier.hpp: + +/usr/include/boost/predef/os/solaris.h: + +/usr/include/boost/thread/detail/nullary_function.hpp: + +/usr/include/boost/thread/detail/memory.hpp: + +/usr/include/boost/predef/library/std/stlport.h: + +/usr/include/boost/thread/csbl/memory/pointer_traits.hpp: + +/usr/include/boost/thread/csbl/memory/allocator_arg.hpp: + +/usr/include/boost/mpl/advance_fwd.hpp: + +/usr/include/boost/intrusive/detail/tree_iterator.hpp: + +/usr/include/boost/thread/csbl/memory/allocator_traits.hpp: + +/usr/include/boost/predef/os/linux.h: + +/usr/include/boost/thread/csbl/memory/scoped_allocator.hpp: + +/usr/include/boost/type_traits/remove_volatile.hpp: + +/usr/include/boost/thread/detail/invoker.hpp: + +/usr/include/boost/thread/csbl/tuple.hpp: + +/usr/include/boost/mpl/aux_/nested_type_wknd.hpp: + +/usr/include/boost/tuple/detail/tuple_basic.hpp: + +/usr/include/boost/asio/basic_signal_set.hpp: + +/usr/include/boost/beast/http/field.hpp: + +/usr/include/boost/thread/detail/variadic_header.hpp: + +/usr/include/boost/process/detail/posix/handles.hpp: + +/usr/include/boost/asio/execution/connect.hpp: + +/usr/include/boost/config/detail/select_stdlib_config.hpp: + +/usr/include/boost/thread/detail/variadic_footer.hpp: + +/usr/include/boost/thread/exceptional_ptr.hpp: + +include/LibLsp/lsp/extention/jdtls/organizeImports.h: + +/usr/include/bits/mathcalls-narrow.h: + +/usr/include/c++/11/backward/auto_ptr.h: + +/usr/include/boost/mpl/is_sequence.hpp: + +/usr/include/boost/exception_ptr.hpp: + +/usr/include/boost/atomic/detail/config.hpp: + +/usr/include/boost/exception/info.hpp: + +/usr/include/boost/asio/thread_pool.hpp: + +/usr/include/boost/exception/to_string.hpp: + +/usr/include/boost/intrusive/detail/equal_to_value.hpp: + +/usr/include/bits/types/__locale_t.h: + +/usr/include/boost/thread/thread_only.hpp: + +/usr/include/boost/atomic/detail/core_operations_fwd.hpp: + +/usr/include/boost/exception/detail/is_output_streamable.hpp: + +/usr/include/boost/exception/detail/object_hex_dump.hpp: + +include/LibLsp/JsonRpc/TcpServer.h: + +/usr/include/boost/exception/detail/type_info.hpp: + +/usr/include/boost/preprocessor/control/while.hpp: + +/usr/include/boost/thread/executors/executor_adaptor.hpp: + +/usr/include/boost/exception/detail/error_info_impl.hpp: + +/usr/include/boost/exception/detail/shared_ptr.hpp: + +/usr/include/boost/exception/diagnostic_information.hpp: + +/usr/include/boost/asio/execution/receiver_invocation_error.hpp: + +/usr/include/boost/exception/current_exception_cast.hpp: + +/usr/include/bits/uio_lim.h: + +/usr/include/boost/exception/detail/clone_current_exception.hpp: + +/usr/include/boost/thread/futures/future_error_code.hpp: + +/usr/include/boost/algorithm/string.hpp: + +/usr/include/boost/thread/futures/future_status.hpp: + +/usr/include/boost/thread/futures/launch.hpp: + +/usr/include/boost/thread/futures/wait_for_all.hpp: + +/usr/include/boost/thread/futures/wait_for_any.hpp: + +/usr/include/c++/11/fstream: + +/usr/include/boost/iterator/advance.hpp: + +/usr/include/boost/mpl/integral_c.hpp: + +/usr/include/boost/algorithm/string/find.hpp: + +/usr/include/boost/mpl/placeholders.hpp: + +/usr/include/boost/random/traits.hpp: + +/usr/include/boost/asio/traits/prefer_free.hpp: + +/usr/include/boost/mpl/arg_fwd.hpp: + +/usr/include/c++/11/bits/regex_scanner.h: + +/usr/include/boost/system/api_config.hpp: + +/usr/include/boost/mpl/aux_/na_assert.hpp: + +/usr/include/boost/mpl/aux_/preprocessed/gcc/placeholders.hpp: + +/usr/include/boost/mpl/assert.hpp: + +/usr/include/boost/asio/detail/impl/null_event.ipp: + +/usr/include/boost/mpl/aux_/config/gpu.hpp: + +/usr/include/boost/mpl/aux_/arity_spec.hpp: + +include/LibLsp/JsonRpc/RequestInMessage.h: + +/usr/include/boost/mpl/aux_/arg_typedef.hpp: + +/usr/include/boost/mpl/vector/aux_/pop_back.hpp: + +/usr/include/boost/mpl/and.hpp: + +/usr/include/boost/mpl/aux_/preprocessed/gcc/arg.hpp: + +/usr/include/boost/iterator/reverse_iterator.hpp: + +/usr/include/boost/range/detail/msvc_has_iterator_workaround.hpp: + +/usr/include/bits/termios-c_oflag.h: + +/usr/include/boost/config/detail/suffix.hpp: + +/usr/include/boost/iterator/iterator_facade.hpp: + +/usr/include/boost/predef/os/bsd/dragonfly.h: + +/usr/include/boost/iterator/interoperable.hpp: + +/usr/include/boost/iterator/detail/facade_iterator_category.hpp: + +/usr/include/boost/iterator/detail/enable_if.hpp: + +/usr/include/boost/fusion/adapted/std_tuple/detail/build_std_tuple.hpp: + +/usr/include/boost/mpl/apply.hpp: + +/usr/include/boost/preprocessor/config/config.hpp: + +/usr/include/boost/asio/detail/signal_op.hpp: + +/usr/include/boost/mpl/apply_fwd.hpp: + +/usr/include/boost/mpl/lambda.hpp: + +/usr/include/boost/asio/posix/descriptor.hpp: + +/usr/include/boost/range/as_literal.hpp: + +/usr/include/boost/mpl/bind.hpp: + +/usr/include/boost/fusion/algorithm/query/find_if_fwd.hpp: + +third_party/rapidjson/include/rapidjson/error/en.h: + +/usr/include/boost/mpl/bind_fwd.hpp: + +/usr/include/boost/get_pointer.hpp: + +/usr/include/boost/algorithm/string/std/list_traits.hpp: + +/usr/include/boost/fusion/iterator/value_of_data.hpp: + +/usr/include/boost/mpl/aux_/config/bind.hpp: + +/usr/include/boost/asio/ip/detail/socket_option.hpp: + +/usr/include/boost/mpl/protect.hpp: + +/usr/include/boost/predef/library/c/cloudabi.h: + +/usr/include/boost/atomic/detail/extra_fp_operations_fwd.hpp: + +/usr/include/boost/mpl/aux_/preprocessed/gcc/bind.hpp: + +/usr/include/boost/mpl/aux_/full_lambda.hpp: + +/usr/include/boost/filesystem/exception.hpp: + +/usr/include/boost/mpl/quote.hpp: + +/usr/include/boost/mpl/aux_/template_arity_fwd.hpp: + +/usr/include/boost/function.hpp: + +/usr/include/boost/mpl/aux_/has_type.hpp: + +/usr/include/boost/regex/v4/regex_fwd.hpp: + +/usr/include/boost/mpl/aux_/preprocessed/gcc/full_lambda.hpp: + +/usr/include/boost/asio/detail/scoped_lock.hpp: + +/usr/include/boost/asio/execution/impl/bad_executor.ipp: + +/usr/include/boost/mpl/aux_/preprocessed/gcc/apply.hpp: + +/usr/include/boost/asio/traits/equality_comparable.hpp: + +/usr/include/boost/thread/executor.hpp: + +/usr/include/boost/beast/http/read.hpp: + +/usr/include/boost/thread/executors/generic_executor_ref.hpp: + +/usr/include/boost/intrusive/detail/parent_from_member.hpp: + +/usr/include/boost/mpl/single_view.hpp: + +/usr/include/boost/thread/detail/atomic_undef_macros.hpp: + +third_party/threadpool/boost/threadpool/task_adaptors.hpp: + +/usr/include/c++/11/bits/stl_bvector.h: + +third_party/threadpool/boost/threadpool/scheduling_policies.hpp: + +/usr/include/boost/utility.hpp: + +/usr/include/c++/11/queue: + +/usr/include/boost/fusion/view/reverse_view.hpp: + +/usr/include/boost/beast/http/type_traits.hpp: + +third_party/threadpool/boost/threadpool/shutdown_policies.hpp: + +/usr/include/boost/mpl/pop_front.hpp: + +src/jsonrpc/StreamMessageProducer.cpp: + +include/LibLsp/lsp/symbol.h: + +/usr/include/boost/asio/detail/signal_blocker.hpp: + +/usr/include/boost/asio.hpp: + +/usr/include/linux/version.h: + +/usr/include/boost/intrusive/link_mode.hpp: + +/usr/include/boost/container_hash/detail/float_functions.hpp: + +/usr/include/boost/asio/detail/type_traits.hpp: + +/usr/include/boost/predef/platform/mingw64.h: + +/usr/include/boost/asio/detail/pop_options.hpp: + +/usr/include/c++/11/bits/random.tcc: + +/usr/include/boost/mpl/find_if.hpp: + +/usr/include/boost/asio/associated_executor.hpp: + +/usr/include/boost/asio/ip/network_v4.hpp: + +/usr/include/boost/asio/execution/executor.hpp: + +/usr/include/boost/predef/compiler/metrowerks.h: + +/usr/include/boost/asio/execution/detail/as_invocable.hpp: + +/usr/include/boost/fusion/view/transform_view/transform_view_iterator.hpp: + +/usr/include/boost/asio/detail/atomic_count.hpp: + +/usr/include/boost/asio/detail/memory.hpp: + +/usr/include/boost/asio/execution/impl/receiver_invocation_error.ipp: + +/usr/include/c++/11/bits/stl_function.h: + +/usr/include/boost/asio/execution/set_done.hpp: + +/usr/include/bits/getopt_core.h: + +/usr/include/boost/config/platform/linux.hpp: + +/usr/include/boost/beast/http/basic_parser.hpp: + +/usr/include/boost/asio/execution/set_error.hpp: + +/usr/include/boost/asio/traits/set_error_member.hpp: + +/usr/include/boost/asio/traits/set_error_free.hpp: + +/usr/include/boost/asio/detail/variadic_templates.hpp: + +/usr/include/sys/epoll.h: + +/usr/include/boost/asio/traits/set_value_free.hpp: + +/usr/include/boost/system/detail/error_category.hpp: + +/usr/include/boost/asio/execution/detail/as_receiver.hpp: + +/usr/include/boost/asio/detail/thread_context.hpp: + +/usr/include/boost/function_types/config/compiler.hpp: + +/usr/include/boost/asio/traits/execute_member.hpp: + +/usr/include/boost/asio/is_executor.hpp: + +/usr/include/boost/type_traits/is_reference.hpp: + +/usr/include/boost/asio/impl/read_until.hpp: + +/usr/include/boost/asio/ts/netfwd.hpp: + +/usr/include/boost/predef/compiler/clang.h: + +/usr/include/boost/intrusive/parent_from_member.hpp: + +/usr/include/boost/asio/detail/is_executor.hpp: + +/usr/include/boost/asio/execution/allocator.hpp: + +/usr/include/boost/fusion/container/list/detail/value_at_impl.hpp: + +/usr/include/boost/intrusive/detail/iterator.hpp: + +/usr/include/boost/asio/execution/schedule.hpp: + +/usr/include/boost/asio/traits/schedule_member.hpp: + +/usr/include/c++/11/bits/stl_pair.h: + +/usr/include/boost/asio/execution/sender.hpp: + +include/LibLsp/lsp/textDocument/typeHierarchy.h: + +/usr/include/boost/asio/execution/detail/void_receiver.hpp: + +/usr/include/boost/asio/execution/receiver.hpp: + +/usr/include/boost/asio/execution/detail/as_operation.hpp: + +/usr/include/boost/atomic/detail/wait_ops_generic.hpp: + +/usr/include/boost/asio/detail/thread_info_base.hpp: + +/usr/include/boost/asio/traits/connect_member.hpp: + +/usr/include/boost/blank.hpp: + +/usr/include/boost/intrusive/detail/empty_node_checker.hpp: + +/usr/include/boost/asio/traits/connect_free.hpp: + +/usr/include/c++/11/csignal: + +/usr/include/boost/asio/is_applicable_property.hpp: + +/usr/include/boost/range/range_fwd.hpp: + +/usr/include/boost/beast/core/impl/saved_handler.ipp: + +/usr/include/boost/asio/detail/assert.hpp: + +/usr/include/boost/asio/detail/global.hpp: + +/usr/include/boost/asio/detail/handler_alloc_helpers.hpp: + +/usr/include/boost/beast/core/detail/allocator.hpp: + +/usr/include/boost/asio/detail/noncopyable.hpp: + +/usr/include/boost/predef/architecture/ppc.h: + +/usr/include/boost/asio/detail/tss_ptr.hpp: + +/usr/include/boost/algorithm/string/sequence_traits.hpp: + +/usr/include/boost/preprocessor/list/detail/limits/fold_right_256.hpp: + +/usr/include/boost/asio/detail/keyword_tss_ptr.hpp: + +/usr/include/boost/mpl/vector/vector30.hpp: + +/usr/include/boost/asio/traits/start_member.hpp: + +/usr/include/boost/asio/multiple_exceptions.hpp: + +/usr/include/boost/asio/impl/handler_alloc_hook.ipp: + +/usr/include/boost/fusion/view/joint_view/joint_view_iterator.hpp: + +/usr/include/bits/types/sigset_t.h: + +/usr/include/boost/asio/detail/handler_invoke_helpers.hpp: + +/usr/include/boost/asio/posix/basic_stream_descriptor.hpp: + +/usr/include/boost/asio/handler_invoke_hook.hpp: + +/usr/include/boost/predef/platform/mingw32.h: + +/usr/include/boost/asio/detail/non_const_lvalue.hpp: + +/usr/include/boost/beast/core/bind_handler.hpp: + +/usr/include/boost/asio/prefer.hpp: + +/usr/include/boost/asio/traits/prefer_member.hpp: + +/usr/include/boost/preprocessor/inc.hpp: + +/usr/include/boost/asio/traits/require_free.hpp: + +/usr/include/boost/asio/traits/query_free.hpp: + +/usr/include/bits/socket_type.h: + +/usr/include/boost/asio/require.hpp: + +/usr/include/boost/range/detail/extract_optional_type.hpp: + +/usr/include/boost/process/detail/posix/async_handler.hpp: + +/usr/include/boost/asio/detail/event.hpp: + +/usr/include/boost/asio/detail/is_buffer_sequence.hpp: + +/usr/include/boost/asio/detail/posix_event.hpp: + +/usr/include/boost/beast/http/impl/write.hpp: + +/usr/include/boost/asio/detail/impl/posix_event.ipp: + +/usr/include/boost/asio/detail/throw_error.hpp: + +/usr/include/boost/asio/detail/impl/throw_error.ipp: + +/usr/include/boost/asio/error.hpp: + +/usr/include/boost/tti/gen/has_member_function_gen.hpp: + +/usr/include/boost/cerrno.hpp: + +/usr/include/netdb.h: + +/usr/include/boost/mpl/front_fwd.hpp: + +/usr/include/netinet/in.h: + +/usr/include/sys/socket.h: + +/usr/include/asm/socket.h: + +/usr/include/asm-generic/socket.h: + +/usr/include/boost/predef/os/bsd/open.h: + +/usr/include/asm/sockios.h: + +/usr/include/boost/beast/core/read_size.hpp: + +/usr/include/bits/sigaction.h: + +/usr/include/asm-generic/sockios.h: + +/usr/include/bits/types/struct_osockaddr.h: + +/usr/include/rpc/netdb.h: + +/usr/include/boost/asio/impl/error.ipp: + +/usr/include/boost/fusion/iterator/detail/advance.hpp: + +/usr/include/boost/atomic/detail/wait_ops_futex.hpp: + +/usr/include/boost/asio/detail/mutex.hpp: + +/usr/include/boost/intrusive/detail/mpl.hpp: + +/usr/include/boost/asio/detail/posix_mutex.hpp: + +/usr/include/boost/asio/execution/bulk_guarantee.hpp: + +/usr/include/boost/asio/traits/bulk_execute_member.hpp: + +/usr/include/boost/asio/traits/bulk_execute_free.hpp: + +/usr/include/boost/asio/detail/timer_queue.hpp: + +/usr/include/boost/asio/execution/context.hpp: + +/usr/include/boost/asio/detail/dependent_type.hpp: + +/usr/include/boost/asio/execution/outstanding_work.hpp: + +/usr/include/c++/11/streambuf: + +/usr/include/boost/asio/detail/impl/strand_executor_service.ipp: + +/usr/include/boost/asio/execution/prefer_only.hpp: + +/usr/include/boost/preprocessor/seq/seq.hpp: + +/usr/include/boost/asio/execution/relationship.hpp: + +/usr/include/boost/asio/ip/resolver_query_base.hpp: + +third_party/rapidjson/include/rapidjson/internal/dtoa.h: + +/usr/include/asm-generic/types.h: + +/usr/include/boost/asio/execution/submit.hpp: + +/usr/include/boost/asio/io_context_strand.hpp: + +/usr/include/boost/asio/execution/detail/submit_receiver.hpp: + +/usr/include/boost/asio/traits/submit_member.hpp: + +/usr/include/boost/asio/detail/executor_op.hpp: + +/usr/include/boost/mpl/vector/aux_/empty.hpp: + +/usr/include/boost/asio/detail/fenced_block.hpp: + +/usr/include/boost/asio/detail/handler_type_requirements.hpp: + +/usr/include/boost/preprocessor/arithmetic/detail/maximum_number.hpp: + +/usr/include/boost/algorithm/string/finder.hpp: + +/usr/include/boost/asio/detail/scheduler_operation.hpp: + +/usr/include/boost/asio/detail/scheduler.hpp: + +/usr/include/boost/fusion/container/vector/detail/deref_impl.hpp: + +/usr/include/boost/atomic/detail/type_traits/is_function.hpp: + +/usr/include/boost/asio/execution_context.hpp: + +/usr/include/boost/asio/defer.hpp: + +/usr/include/boost/asio/impl/execution_context.hpp: + +/usr/include/boost/asio/detail/impl/service_registry.hpp: + +/usr/include/boost/mpl/aux_/traits_lambda_spec.hpp: + +/usr/include/boost/asio/impl/execution_context.ipp: + +/usr/include/boost/utility/string_view.hpp: + +/usr/include/boost/asio/generic/detail/impl/endpoint.ipp: + +/usr/include/boost/beast/core/string_type.hpp: + +/usr/include/boost/asio/detail/conditionally_enabled_event.hpp: + +/usr/include/c++/11/bits/cxxabi_forced.h: + +/usr/include/boost/asio/detail/thread.hpp: + +/usr/include/boost/algorithm/string/erase.hpp: + +/usr/include/boost/asio/detail/posix_thread.hpp: + +/usr/include/boost/asio/detail/impl/scheduler.ipp: + +/usr/include/boost/thread/pthread/once_atomic.hpp: + +/usr/include/boost/asio/detail/limits.hpp: + +/usr/include/boost/asio/detail/reactor.hpp: + +/usr/include/boost/fusion/support/detail/is_native_fusion_sequence.hpp: + +/usr/include/boost/fusion/view/reverse_view/detail/distance_impl.hpp: + +/usr/include/bits/termios-c_cc.h: + +/usr/include/boost/thread/detail/config.hpp: + +/usr/include/boost/asio/detail/object_pool.hpp: + +/usr/include/boost/asio/detail/select_interrupter.hpp: + +/usr/include/c++/11/ext/atomicity.h: + +/usr/include/boost/algorithm/string/detail/find_format.hpp: + +/usr/include/boost/fusion/sequence/intrinsic_fwd.hpp: + +/usr/include/sys/stat.h: + +/usr/include/boost/fusion/view/joint_view/detail/deref_data_impl.hpp: + +/usr/include/boost/core/no_exceptions_support.hpp: + +/usr/include/bits/stat.h: + +/usr/include/boost/core/addressof.hpp: + +/usr/include/boost/beast/websocket/detail/utf8_checker.ipp: + +/usr/include/bits/struct_stat.h: + +/usr/include/boost/mp11/detail/mp_fold.hpp: + +/usr/include/boost/fusion/view/joint_view/detail/key_of_impl.hpp: + +/usr/include/boost/fusion/mpl/end.hpp: + +/usr/include/linux/stat.h: + +/usr/include/bits/types/struct_statx_timestamp.h: + +/usr/include/linux/falloc.h: + +/usr/include/bits/eventfd.h: + +/usr/include/boost/optional.hpp: + +/usr/include/boost/asio/detail/socket_types.hpp: + +/usr/include/sys/ioctl.h: + +/usr/include/bits/ioctls.h: + +/usr/include/asm-generic/ioctls.h: + +/usr/include/boost/beast/websocket/rfc6455.hpp: + +include/LibLsp/lsp/workspace/did_change_watched_files.h: + +/usr/include/asm/ioctl.h: + +include/LibLsp/lsp/out_list.h: + +/usr/include/boost/smart_ptr/make_shared_object.hpp: + +/usr/include/boost/iterator/iterator_adaptor.hpp: + +/usr/include/asm-generic/ioctl.h: + +/usr/include/bits/ioctl-types.h: + +/usr/include/c++/11/bits/shared_ptr_atomic.h: + +/usr/include/sys/ttydefaults.h: + +/usr/include/boost/atomic/detail/type_traits/is_trivially_copyable.hpp: + +/usr/include/poll.h: + +/usr/include/bits/poll.h: + +/usr/include/sys/un.h: + +/usr/include/netinet/tcp.h: + +src/lsp/utils.cpp: + +/usr/include/arpa/inet.h: + +/usr/include/net/if.h: + +/usr/include/boost/type_index/type_index_facade.hpp: + +/usr/include/boost/concept/usage.hpp: + +/usr/include/boost/fusion/support/is_view.hpp: + +/usr/include/boost/asio/detail/timer_queue_base.hpp: + +/usr/include/boost/asio/detail/impl/timer_queue_set.ipp: + +/usr/include/sys/timerfd.h: + +/usr/include/boost/move/default_delete.hpp: + +/usr/include/boost/asio/detail/impl/epoll_reactor.hpp: + +/usr/include/boost/asio/detail/impl/epoll_reactor.ipp: + +/usr/include/bits/epoll.h: + +/usr/include/boost/asio/detail/scheduler_thread_info.hpp: + +/usr/include/boost/asio/any_io_executor.hpp: + +/usr/include/boost/asio/io_context.hpp: + +/usr/include/boost/asio/detail/wrapped_handler.hpp: + +/usr/include/boost/asio/impl/io_context.hpp: + +/usr/include/boost/asio/generic/datagram_protocol.hpp: + +/usr/include/boost/beast/websocket/impl/teardown.hpp: + +/usr/include/boost/fusion/support/tag_of.hpp: + +/usr/include/boost/fusion/view/single_view.hpp: + +/usr/include/boost/asio/detail/completion_handler.hpp: + +/usr/include/boost/asio/executor_work_guard.hpp: + +include/LibLsp/lsp/ExecuteCommandParams.h: + +/usr/include/boost/asio/post.hpp: + +/usr/include/boost/fusion/view/reverse_view/detail/prior_impl.hpp: + +/usr/include/boost/smart_ptr/make_unique.hpp: + +/usr/include/boost/weak_ptr.hpp: + +/usr/include/boost/asio/impl/post.hpp: + +/usr/include/linux/limits.h: + +/usr/include/boost/asio/socket_base.hpp: + +/usr/include/boost/core/typeinfo.hpp: + +/usr/include/boost/asio/detail/io_control.hpp: + +include/LibLsp/lsp/textDocument/did_open.h: + +/usr/include/boost/asio/ip/impl/network_v6.ipp: + +/usr/include/boost/asio/detail/array_fwd.hpp: + +/usr/include/c++/11/bits/ranges_base.h: + +/usr/include/c++/11/experimental/bits/string_view.tcc: + +/usr/include/boost/asio/detail/buffer_sequence_adapter.hpp: + +include/LibLsp/lsp/lsTextDocumentItem.h: + +/usr/include/boost/asio/traits/static_require_concept.hpp: + +/usr/include/boost/asio/detail/impl/buffer_sequence_adapter.ipp: + +/usr/include/boost/shared_ptr.hpp: + +/usr/include/boost/asio/detail/reactive_socket_service.hpp: + +/usr/include/boost/asio/detail/reactive_null_buffers_op.hpp: + +/usr/include/boost/mpl/vector/aux_/pop_front.hpp: + +/usr/include/boost/asio/detail/reactive_socket_accept_op.hpp: + +/usr/include/boost/mpl/aux_/preprocessed/gcc/and.hpp: + +/usr/include/boost/asio/detail/reactive_socket_recvfrom_op.hpp: + +/usr/include/boost/intrusive/pack_options.hpp: + +/usr/include/boost/asio/detail/reactive_socket_recv_op.hpp: + +/usr/include/boost/asio/detail/reactive_socket_recvmsg_op.hpp: + +/usr/include/boost/asio/detail/throw_exception.hpp: + +/usr/include/boost/asio/read_at.hpp: + +/usr/include/boost/asio/detail/reactive_wait_op.hpp: + +/usr/include/c++/11/bits/regex_executor.h: + +/usr/include/boost/fusion/adapted/std_tuple/detail/begin_impl.hpp: + +/usr/include/boost/asio/detail/deadline_timer_service.hpp: + +/usr/include/boost/asio/detail/timer_queue_ptime.hpp: + +/usr/include/boost/asio/detail/impl/timer_queue_ptime.ipp: + +/usr/include/boost/beast/core/impl/static_string.hpp: + +/usr/include/boost/asio/basic_io_object.hpp: + +/usr/include/boost/asio/detail/resolve_query_op.hpp: + +/usr/include/boost/asio/basic_raw_socket.hpp: + +/usr/include/boost/asio/basic_seq_packet_socket.hpp: + +/usr/include/boost/predef/platform/windows_uwp.h: + +/usr/include/bits/termios.h: + +/usr/include/boost/beast/http/impl/read.hpp: + +/usr/include/boost/asio/impl/serial_port_base.hpp: + +/usr/include/boost/mpl/aux_/config/bcc.hpp: + +/usr/include/boost/asio/strand.hpp: + +/usr/include/boost/fusion/container/vector/detail/end_impl.hpp: + +/usr/include/boost/algorithm/string/detail/classification.hpp: + +/usr/include/boost/asio/detail/reactive_serial_port_service.hpp: + +/usr/include/boost/algorithm/string/classification.hpp: + +/usr/include/boost/asio/detail/descriptor_ops.hpp: + +/usr/include/boost/function_types/parameter_types.hpp: + +/usr/include/boost/type_traits/detail/config.hpp: + +/usr/include/boost/beast/websocket/stream_fwd.hpp: + +/usr/include/boost/function_types/detail/pp_loop.hpp: + +/usr/include/bits/endianness.h: + +/usr/include/boost/beast/core/detail/static_const.hpp: + +/usr/include/boost/asio/traits/query_member.hpp: + +/usr/include/boost/asio/detail/impl/descriptor_ops.ipp: + +/usr/include/boost/asio/detail/descriptor_write_op.hpp: + +src/lsp/initialize.cpp: + +/usr/include/boost/asio/detail/static_mutex.hpp: + +/usr/include/boost/asio/basic_stream_socket.hpp: + +/usr/include/boost/process/async_pipe.hpp: + +/usr/include/boost/mpl/erase_fwd.hpp: + +/usr/include/c++/11/bits/stl_uninitialized.h: + +/usr/include/boost/asio/basic_waitable_timer.hpp: + +/usr/include/boost/asio/detail/chrono_time_traits.hpp: + +/usr/include/boost/filesystem/string_file.hpp: + +/usr/include/bits/termios-baud.h: + +/usr/include/boost/asio/wait_traits.hpp: + +/usr/include/boost/asio/bind_executor.hpp: + +/usr/include/boost/mp11/detail/mp_is_list.hpp: + +/usr/include/boost/uuid/random_generator.hpp: + +/usr/include/boost/fusion/sequence/intrinsic/value_at_key.hpp: + +/usr/include/c++/11/bits/locale_facets_nonio.h: + +/usr/include/boost/process/detail/posix/io_context_ref.hpp: + +/usr/include/boost/asio/buffered_read_stream.hpp: + +/usr/include/boost/beast/core/basic_stream.hpp: + +/usr/include/boost/asio/detail/buffered_stream_storage.hpp: + +/usr/include/boost/fusion/mpl/has_key.hpp: + +/usr/include/c++/11/typeindex: + +/usr/include/boost/asio/impl/buffered_read_stream.hpp: + +/usr/include/boost/preprocessor/variadic/elem.hpp: + +/usr/include/c++/11/x86_64-redhat-linux/bits/opt_random.h: + +/usr/include/boost/predef/architecture/z.h: + +/usr/include/boost/asio/buffered_stream_fwd.hpp: + +/usr/include/boost/beast/core/detail/sha1.ipp: + +/usr/include/boost/asio/buffered_stream.hpp: + +/usr/include/boost/asio/windows/basic_object_handle.hpp: + +/usr/include/boost/smart_ptr/detail/yield_k.hpp: + +/usr/include/boost/asio/buffered_write_stream.hpp: + +/usr/include/boost/beast/core/saved_handler.hpp: + +/usr/include/boost/asio/write.hpp: + +/usr/include/boost/asio/impl/write.hpp: + +/usr/include/boost/asio/detail/base_from_completion_cond.hpp: + +/usr/include/boost/asio/detail/consuming_buffers.hpp: + +/usr/include/boost/asio/impl/buffered_write_stream.hpp: + +/usr/include/boost/asio/co_spawn.hpp: + +/usr/include/boost/asio/impl/redirect_error.hpp: + +/usr/include/boost/asio/impl/compose.hpp: + +/usr/include/boost/atomic/fences.hpp: + +/usr/include/boost/asio/impl/connect.hpp: + +/usr/include/boost/preprocessor/detail/limits/auto_rec_256.hpp: + +/usr/include/boost/asio/coroutine.hpp: + +/usr/include/boost/fusion/support/tag_of_fwd.hpp: + +/usr/include/boost/asio/deadline_timer.hpp: + +/usr/include/boost/asio/detached.hpp: + +/usr/include/boost/asio/dispatch.hpp: + +/usr/include/boost/asio/impl/dispatch.hpp: + +/usr/include/boost/fusion/support/detail/mpl_iterator_category.hpp: + +/usr/include/boost/asio/executor.hpp: + +/usr/include/sys/eventfd.h: + +src/jsonrpc/TcpServer.cpp: + +/usr/include/boost/asio/impl/executor.hpp: + +/usr/include/boost/predef/os/aix.h: + +/usr/include/boost/range/distance.hpp: + +/usr/include/boost/asio/generic/basic_endpoint.hpp: + +/usr/include/boost/asio/generic/detail/endpoint.hpp: + +/usr/include/boost/asio/generic/raw_protocol.hpp: + +/usr/include/boost/asio/generic/seq_packet_protocol.hpp: + +/usr/include/boost/intrusive/detail/size_holder.hpp: + +/usr/include/boost/asio/generic/stream_protocol.hpp: + +/usr/include/boost/mpl/next_prior.hpp: + +/usr/include/boost/asio/detail/strand_service.hpp: + +/usr/include/boost/asio/detail/impl/strand_service.hpp: + +/usr/include/c++/11/bits/align.h: + +/usr/include/boost/predef/architecture/blackfin.h: + +/usr/include/boost/asio/ip/address_v4.hpp: + +/usr/include/boost/asio/ip/impl/address_v4.hpp: + +/usr/include/boost/preprocessor/comparison/less_equal.hpp: + +/usr/include/boost/asio/ip/impl/address.hpp: + +/usr/include/boost/asio/ip/address_v4_range.hpp: + +/usr/include/boost/range/rbegin.hpp: + +/usr/include/boost/config/no_tr1/memory.hpp: + +/usr/include/boost/asio/ip/impl/network_v4.ipp: + +/usr/include/boost/asio/ip/basic_endpoint.hpp: + +/usr/include/boost/asio/ip/detail/impl/endpoint.ipp: + +/usr/include/boost/asio/ip/basic_resolver.hpp: + +/usr/include/boost/asio/ip/basic_resolver_iterator.hpp: + +/usr/include/boost/filesystem.hpp: + +/usr/include/boost/predef/platform/windows_store.h: + +/usr/include/bits/pthreadtypes-arch.h: + +/usr/include/boost/type_traits/is_lvalue_reference.hpp: + +/usr/include/boost/beast/core/detail/base64.ipp: + +/usr/include/boost/beast/version.hpp: + +/usr/include/boost/asio/ip/basic_resolver_entry.hpp: + +/usr/include/boost/predef/architecture/sys370.h: + +/usr/include/boost/asio/ip/basic_resolver_query.hpp: + +/usr/include/boost/asio/ip/basic_resolver_results.hpp: + +/usr/include/boost/beast/http/chunk_encode.hpp: + +/usr/include/boost/intrusive/detail/algo_type.hpp: + +/usr/include/boost/fusion/iterator/next.hpp: + +/usr/include/boost/asio/ip/resolver_base.hpp: + +include/LibLsp/lsp/Markup/Markup.h: + +/usr/include/boost/asio/detail/resolver_service.hpp: + +/usr/include/boost/asio/detail/resolve_op.hpp: + +/usr/include/boost/preprocessor/comparison/limits/not_equal_256.hpp: + +/usr/include/boost/asio/detail/resolver_service_base.hpp: + +/usr/include/c++/11/random: + +/usr/include/boost/algorithm/string/detail/replace_storage.hpp: + +/usr/include/boost/asio/ip/icmp.hpp: + +/usr/include/boost/fusion/adapted/std_tuple/detail/size_impl.hpp: + +/usr/include/boost/preprocessor/cat.hpp: + +/usr/include/boost/asio/ip/tcp.hpp: + +/usr/include/boost/asio/ip/v6_only.hpp: + +/usr/include/boost/beast/http/impl/verb.ipp: + +/usr/include/boost/core/pointer_traits.hpp: + +/usr/include/boost/thread/detail/platform.hpp: + +/usr/include/boost/asio/is_write_buffered.hpp: + +/usr/include/boost/asio/local/basic_endpoint.hpp: + +/usr/include/boost/smart_ptr/bad_weak_ptr.hpp: + +/usr/include/boost/asio/local/detail/endpoint.hpp: + +/usr/include/boost/asio/local/connect_pair.hpp: + +/usr/include/boost/asio/basic_serial_port.hpp: + +/usr/include/boost/process/args.hpp: + +/usr/include/boost/mpl/push_front.hpp: + +/usr/include/boost/asio/local/stream_protocol.hpp: + +/usr/include/boost/asio/detail/future.hpp: + +/usr/include/c++/11/bits/basic_string.tcc: + +/usr/include/boost/asio/read.hpp: + +/usr/include/boost/thread/shared_mutex.hpp: + +/usr/include/boost/asio/impl/read.hpp: + +/usr/include/boost/asio/impl/read_at.hpp: + +/usr/include/boost/regex/user.hpp: + +/usr/include/boost/asio/execution/detail/bulk_sender.hpp: + +/usr/include/boost/asio/redirect_error.hpp: + +/usr/include/boost/asio/require_concept.hpp: + +/usr/include/boost/asio/traits/require_concept_member.hpp: + +/usr/include/boost/mpl/limits/vector.hpp: + +/usr/include/boost/asio/impl/thread_pool.hpp: + +/usr/include/boost/asio/detail/blocking_executor_op.hpp: + +/usr/include/boost/fusion/adapted/std_tuple.hpp: + +/usr/include/boost/asio/detail/strand_executor_service.hpp: + +/usr/include/boost/intrusive/set.hpp: + +/usr/include/boost/asio/system_timer.hpp: + +/usr/include/boost/date_time/posix_time/date_duration_operators.hpp: + +/usr/include/boost/asio/use_awaitable.hpp: + +/usr/include/boost/asio/windows/basic_random_access_handle.hpp: + +/usr/include/boost/asio/impl/use_future.hpp: + +/usr/include/boost/type_traits/function_traits.hpp: + +/usr/include/boost/asio/version.hpp: + +/usr/include/boost/range/iterator.hpp: + +/usr/include/boost/asio/windows/overlapped_ptr.hpp: + +/usr/include/boost/asio/windows/stream_handle.hpp: + +/usr/include/boost/smart_ptr/make_shared.hpp: + +/usr/include/boost/asio/write_at.hpp: + +/usr/include/boost/winapi/config.hpp: + +/usr/include/boost/exception/exception.hpp: + +/usr/include/boost/mpl/begin_end_fwd.hpp: + +/usr/include/boost/date_time/adjust_functors.hpp: + +src/jsonrpc/WebSocketServer.cpp: + +/usr/include/boost/core/exchange.hpp: + +/usr/include/boost/beast/core/error.hpp: + +/usr/include/boost/beast/core/impl/error.ipp: + +/usr/include/boost/beast/core/impl/file_stdio.ipp: + +/usr/include/boost/beast/core/role.hpp: + +/usr/include/boost/type_traits/is_copy_assignable.hpp: + +/usr/include/boost/beast/core/impl/basic_stream.hpp: + +/usr/include/asm/unistd.h: + +/usr/include/boost/beast/core/async_base.hpp: + +/usr/include/boost/atomic/detail/wait_operations.hpp: + +/usr/include/boost/beast/core/detail/tuple.hpp: + +/usr/include/boost/mp11/integer_sequence.hpp: + +include/LibLsp/JsonRpc/Endpoint.h: + +/usr/include/boost/mp11/detail/config.hpp: + +/usr/include/boost/function_types/detail/components_impl/arity10_1.hpp: + +/usr/include/boost/asio/detail/signal_set_service.hpp: + +/usr/include/boost/mp11/set.hpp: + +/usr/include/boost/preprocessor/logical/limits/bool_256.hpp: + +/usr/include/boost/beast/websocket/detail/mask.hpp: + +/usr/include/boost/mp11/detail/mp_plus.hpp: + +/usr/include/boost/mpl/aux_/preprocessed/gcc/iter_fold_if_impl.hpp: + +/usr/include/boost/mp11/detail/mp_min_element.hpp: + +/usr/include/boost/beast/core/detail/async_base.hpp: + +/usr/include/boost/beast/core/impl/async_base.hpp: + +/usr/include/boost/beast/core/detail/buffer_traits.hpp: + +/usr/include/boost/beast/core/impl/buffers_prefix.hpp: + +/usr/include/boost/beast/websocket/teardown.hpp: + +/usr/include/boost/process/detail/traits.hpp: + +src/jsonrpc/threaded_queue.cpp: + +/usr/include/boost/beast/core/detail/is_invocable.hpp: + +/usr/include/boost/beast/websocket/error.hpp: + +/usr/include/boost/beast/websocket/impl/error.hpp: + +/usr/include/boost/beast/websocket/impl/error.ipp: + +/usr/include/boost/io/detail/buffer_fill.hpp: + +/usr/include/boost/utility/swap.hpp: + +/usr/include/boost/io/detail/ostream_guard.hpp: + +/usr/include/c++/11/bits/std_function.h: + +/usr/include/boost/utility/string_view_fwd.hpp: + +/usr/include/boost/process/detail/posix/group_ref.hpp: + +/usr/include/boost/utility/detail/result_of_iterate.hpp: + +/usr/include/boost/beast/core/impl/string.ipp: + +/usr/include/boost/beast/http/impl/error.hpp: + +/usr/include/boost/asio/detail/epoll_reactor.hpp: + +/usr/include/boost/beast/http/impl/error.ipp: + +/usr/include/bits/libm-simd-decl-stubs.h: + +/usr/include/boost/beast/http/message.hpp: + +/usr/include/boost/asio/detail/conditionally_enabled_mutex.hpp: + +/usr/include/boost/beast/http/impl/field.ipp: + +/usr/include/boost/system/detail/system_category.hpp: + +/usr/include/boost/preprocessor/repetition/limits/for_256.hpp: + +/usr/include/boost/mpl/vector/aux_/size.hpp: + +/usr/include/boost/intrusive/intrusive_fwd.hpp: + +/usr/include/boost/fusion/container/map/map.hpp: + +/usr/include/boost/intrusive/detail/assert.hpp: + +/usr/include/boost/process/detail/basic_cmd.hpp: + +/usr/include/boost/intrusive/detail/list_node.hpp: + +/usr/include/boost/intrusive/pointer_rebind.hpp: + +include/LibLsp/lsp/extention/jdtls/checkHashCodeEqualsStatus.h: + +/usr/include/boost/intrusive/options.hpp: + +/usr/include/boost/mpl/aux_/arity.hpp: + +/usr/include/boost/move/detail/pointer_element.hpp: + +/usr/include/boost/intrusive/detail/is_stateful_value_traits.hpp: + +/usr/include/boost/fusion/view/filter_view/filter_view.hpp: + +/usr/include/c++/11/cctype: + +/usr/include/boost/intrusive/detail/default_header_holder.hpp: + +third_party/rapidjson/include/rapidjson/allocators.h: + +/usr/include/boost/intrusive/detail/reverse_iterator.hpp: + +/usr/include/boost/intrusive/detail/std_fwd.hpp: + +/usr/include/boost/move/detail/std_ns_begin.hpp: + +/usr/include/boost/move/detail/std_ns_end.hpp: + +/usr/include/pthread.h: + +/usr/include/boost/move/detail/iterator_traits.hpp: + +/usr/include/boost/intrusive/detail/uncast.hpp: + +/usr/include/boost/intrusive/detail/list_iterator.hpp: + +/usr/include/boost/process/detail/posix/wait_for_exit.hpp: + +/usr/include/boost/intrusive/detail/array_initializer.hpp: + +/usr/include/boost/mpl/insert_fwd.hpp: + +/usr/include/boost/iterator/detail/config_undef.hpp: + +/usr/include/boost/intrusive/detail/exception_disposer.hpp: + +/usr/include/boost/intrusive/detail/tree_value_compare.hpp: + +/usr/include/boost/fusion/iterator/deref.hpp: + +/usr/include/boost/asio/system_executor.hpp: + +/usr/include/boost/intrusive/detail/algorithm.hpp: + +/usr/include/boost/intrusive/detail/minimal_less_equal_header.hpp: + +/usr/include/boost/intrusive/detail/minimal_pair_header.hpp: + +/usr/include/boost/mpl/vector/aux_/preprocessed/typeof_based/vector30.hpp: + +/usr/include/boost/intrusive/set_hook.hpp: + +/usr/include/boost/intrusive/detail/rbtree_node.hpp: + +/usr/include/boost/intrusive/rbtree_algorithms.hpp: + +/usr/include/boost/process/detail/handler_base.hpp: + +/usr/include/boost/intrusive/pointer_plus_bits.hpp: + +/usr/include/boost/intrusive/detail/tree_node.hpp: + +/usr/include/boost/intrusive/bs_set_hook.hpp: + +/usr/include/boost/fusion/view/transform_view/detail/value_at_impl.hpp: + +/usr/include/boost/beast/http/impl/fields.hpp: + +/usr/include/boost/iterator/transform_iterator.hpp: + +/usr/include/boost/type_traits/is_complex.hpp: + +/usr/include/boost/beast/core/detail/type_traits.hpp: + +/usr/include/boost/move/core.hpp: + +/usr/include/boost/beast/core/impl/buffers_cat.hpp: + +/usr/include/boost/date_time/gregorian/gregorian_types.hpp: + +/usr/include/boost/atomic/detail/extra_operations.hpp: + +/usr/include/boost/beast/core/detail/variant.hpp: + +/usr/include/boost/beast/http/status.hpp: + +/usr/include/boost/beast/core/detail/clamp.hpp: + +/usr/include/boost/beast/http/verb.hpp: + +/usr/include/boost/beast/http/detail/rfc7230.ipp: + +/usr/include/boost/beast/http/impl/status.ipp: + +/usr/include/asm-generic/errno.h: + +/usr/include/boost/beast/http/detail/chunk_encode.hpp: + +/usr/include/boost/beast/http/impl/chunk_encode.hpp: + +/usr/include/boost/beast/core/detail/varint.hpp: + +/usr/include/boost/asio/detail/executor_function.hpp: + +/usr/include/boost/beast/http/impl/fields.ipp: + +/usr/include/boost/predef/library/c/uc.h: + +/usr/include/boost/beast/websocket/detail/prng.hpp: + +/usr/include/boost/date_time/gregorian/greg_duration_types.hpp: + +/usr/include/boost/beast/websocket/stream_base.hpp: + +/usr/include/boost/asio/impl/system_context.ipp: + +/usr/include/boost/algorithm/string/detail/trim.hpp: + +/usr/include/boost/numeric/conversion/int_float_mixture_enum.hpp: + +/usr/include/c++/11/bits/random.h: + +/usr/include/boost/uuid/detail/uuid_x86.ipp: + +/usr/include/c++/11/bits/stl_numeric.h: + +/usr/include/boost/beast/websocket/detail/prng.ipp: + +/usr/include/boost/beast/core/detail/pcg.hpp: + +/usr/include/boost/beast/websocket/detail/utf8_checker.hpp: + +/usr/include/boost/beast/core/flat_static_buffer.hpp: + +/usr/include/boost/fusion/sequence/comparison/not_equal_to.hpp: + +/usr/include/boost/fusion/adapted/mpl/detail/at_impl.hpp: + +/usr/include/boost/beast/core/impl/flat_static_buffer.hpp: + +/usr/include/boost/fusion/sequence/intrinsic/size.hpp: + +/usr/include/boost/beast/core/detail/sha1.hpp: + +/usr/include/boost/beast/core/impl/flat_static_buffer.ipp: + +/usr/include/bits/types/stack_t.h: + +/usr/include/boost/atomic/detail/gcc_atomic_memory_order_utils.hpp: + +/usr/include/boost/endian/detail/endian_reverse.hpp: + +/usr/include/boost/mpl/aux_/numeric_op.hpp: + +/usr/include/boost/endian/detail/intrinsic.hpp: + +/usr/include/bits/siginfo-consts-arch.h: + +/usr/include/boost/endian/detail/is_scoped_enum.hpp: + +/usr/include/boost/endian/detail/endian_load.hpp: + +/usr/include/boost/random/detail/generator_bits.hpp: + +/usr/include/boost/endian/detail/is_trivially_copyable.hpp: + +/usr/include/boost/fusion/sequence/intrinsic/empty.hpp: + +/usr/include/boost/beast/websocket/detail/pmd_extension.hpp: + +/usr/include/boost/intrusive/detail/generic_hook.hpp: + +third_party/rapidjson/include/rapidjson/internal/meta.h: + +/usr/include/boost/beast/websocket/detail/pmd_extension.ipp: + +/usr/include/boost/beast/zlib/error.hpp: + +/usr/include/boost/beast/zlib/impl/error.hpp: + +/usr/include/boost/system/detail/generic_category.hpp: + +/usr/include/boost/beast/zlib/impl/error.ipp: + +/usr/include/stdio.h: + +/usr/include/boost/asio/detail/thread_group.hpp: + +/usr/include/boost/beast/zlib/zlib.hpp: + +/usr/include/boost/beast/zlib/detail/deflate_stream.hpp: + +/usr/include/bits/floatn-common.h: + +/usr/include/boost/beast/zlib/detail/deflate_stream.ipp: + +/usr/include/boost/beast/zlib/detail/inflate_stream.ipp: + +/usr/include/boost/type_traits/add_volatile.hpp: + +/usr/include/boost/predef/library/std/vacpp.h: + +/usr/include/boost/beast/websocket/detail/mask.ipp: + +/usr/include/boost/asio/query.hpp: + +/usr/include/boost/beast/websocket/detail/service.hpp: + +/usr/include/boost/process/detail/posix/basic_cmd.hpp: + +/usr/include/boost/beast/http/detail/basic_parser.hpp: + +/usr/include/boost/mpl/aux_/config/eti.hpp: + +/usr/include/boost/intrusive/pointer_traits.hpp: + +/usr/include/boost/beast/core/detail/char_buffer.hpp: + +/usr/include/boost/beast/http/detail/basic_parser.ipp: + +/usr/include/boost/asio/traits/require_concept_free.hpp: + +/usr/include/boost/beast/http/impl/basic_parser.hpp: + +/usr/include/boost/beast/http/impl/parser.hpp: + +/usr/include/boost/beast/core/detail/buffer.hpp: + +/usr/include/boost/beast/core/detail/impl/read.hpp: + +include/LibLsp/lsp/working_files.h: + +/usr/include/boost/asio/detail/impl/reactive_serial_port_service.ipp: + +/usr/include/boost/beast/http/serializer.hpp: + +/usr/include/boost/beast/http/impl/serializer.hpp: + +src/jsonrpc/serializer.cpp: + +/usr/include/boost/beast/core/make_printable.hpp: + +/usr/include/boost/beast/core/impl/saved_handler.hpp: + +/usr/include/boost/beast/websocket/detail/type_traits.hpp: + +/usr/include/boost/beast/websocket/impl/close.hpp: + +/usr/include/boost/process/detail/posix/null_in.hpp: + +/usr/include/boost/asio/static_thread_pool.hpp: + +/usr/include/boost/beast/websocket/impl/handshake.hpp: + +/usr/include/boost/asio/execution/blocking_adaptation.hpp: + +/usr/include/boost/beast/websocket/impl/ping.hpp: + +/usr/include/boost/beast/websocket/impl/read.hpp: + +/usr/include/boost/predef/compiler/compaq.h: + +/usr/include/boost/filesystem/path_traits.hpp: + +/usr/include/linux/ioctl.h: + +/usr/include/boost/beast/core.hpp: + +/usr/include/boost/uuid/uuid_io.hpp: + +/usr/include/boost/predef/platform/android.h: + +/usr/include/boost/predef/library/std/modena.h: + +/usr/include/boost/beast/core/impl/multi_buffer.hpp: + +/usr/include/boost/predef/architecture/mips.h: + +/usr/include/boost/beast/core/buffers_adaptor.hpp: + +/usr/include/boost/fusion/sequence/io.hpp: + +/usr/include/boost/fusion/container/vector/vector10.hpp: + +/usr/include/boost/asio/buffers_iterator.hpp: + +/usr/include/boost/beast/core/impl/buffers_adaptor.hpp: + +/usr/include/boost/beast/core/buffers_to_string.hpp: + +/usr/include/boost/asio/yield.hpp: + +/usr/include/boost/asio/unyield.hpp: + +/usr/include/boost/fusion/sequence/intrinsic/begin.hpp: + +/usr/include/boost/mpl/aux_/preprocessed/gcc/equal_to.hpp: + +/usr/include/boost/beast/core/file_posix.hpp: + +/usr/include/boost/beast/core/impl/file_posix.ipp: + +/usr/include/boost/fusion/container/generation/make_deque.hpp: + +/usr/include/boost/beast/core/detail/win32_unicode_path.hpp: + +/usr/include/boost/beast/core/detail/flat_stream.hpp: + +/usr/include/boost/asio/ip/impl/basic_endpoint.hpp: + +/usr/include/boost/beast/core/span.hpp: + +/usr/include/boost/algorithm/string/std_containers_traits.hpp: + +/usr/include/boost/algorithm/string/config.hpp: + +/usr/include/c++/11/ext/slist: + +/usr/include/boost/utility/declval.hpp: + +/usr/include/boost/range/config.hpp: + +/usr/include/boost/asio/detail/cstddef.hpp: + +/usr/include/boost/range/end.hpp: + +/usr/include/boost/mpl/aux_/lambda_spec.hpp: + +/usr/include/boost/range/detail/implementation_help.hpp: + +/usr/include/boost/date_time/compiler_config.hpp: + +/usr/include/boost/range/detail/sfinae.hpp: + +/usr/include/boost/range/functions.hpp: + +/usr/include/boost/range/size.hpp: + +/usr/include/boost/range/size_type.hpp: + +/usr/include/boost/algorithm/string/iter_find.hpp: + +/usr/include/boost/range/has_range_iterator.hpp: + +/usr/include/boost/range/concepts.hpp: + +/usr/include/boost/concept/detail/backward_compatibility.hpp: + +/usr/include/boost/concept/detail/has_constraints.hpp: + +/usr/include/boost/type_traits/conversion_traits.hpp: + +/usr/include/boost/preprocessor/seq/for_each_i.hpp: + +include/LibLsp/lsp/general/InitializeParams.h: + +/usr/include/boost/preprocessor/repetition/detail/limits/for_256.hpp: + +/usr/include/boost/preprocessor/seq/limits/enum_256.hpp: + +/usr/include/boost/concept/detail/concept_undef.hpp: + +/usr/include/boost/range/value_type.hpp: + +/usr/include/boost/random/detail/const_mod.hpp: + +/usr/include/boost/range/detail/has_member_size.hpp: + +/usr/include/boost/type_traits/promote.hpp: + +/usr/include/boost/iterator/distance.hpp: + +/usr/include/boost/asio/detail/array.hpp: + +/usr/include/boost/range/empty.hpp: + +/usr/include/boost/range/algorithm/equal.hpp: + +/usr/include/boost/asio/posix/stream_descriptor.hpp: + +/usr/include/boost/range/detail/safe_bool.hpp: + +/usr/include/boost/fusion/view/nview/nview.hpp: + +/usr/include/boost/algorithm/string/case_conv.hpp: + +/usr/include/boost/algorithm/string/detail/case_conv.hpp: + +/usr/include/boost/algorithm/string/compare.hpp: + +/usr/include/boost/mp11/detail/mp_list.hpp: + +/usr/include/boost/algorithm/string/constants.hpp: + +/usr/include/boost/algorithm/string/detail/finder.hpp: + +/usr/include/boost/algorithm/string/split.hpp: + +/usr/include/boost/asio/detail/wait_handler.hpp: + +/usr/include/boost/algorithm/string/find_iterator.hpp: + +/usr/include/c++/11/bits/stl_list.h: + +/usr/include/boost/algorithm/string/detail/util.hpp: + +/usr/include/boost/preprocessor/comparison/equal.hpp: + +/usr/include/boost/beast/core/impl/flat_buffer.hpp: + +/usr/include/boost/algorithm/string/replace.hpp: + +/usr/include/boost/algorithm/string/detail/find_format_store.hpp: + +/usr/include/boost/algorithm/string/detail/find_format_all.hpp: + +/usr/include/boost/algorithm/string/formatter.hpp: + +include/LibLsp/lsp/ParentProcessWatcher.h: + +/usr/include/boost/process/detail/posix/async_pipe.hpp: + +/usr/include/boost/asio/detail/impl/eventfd_select_interrupter.ipp: + +/usr/include/boost/process/detail/config.hpp: + +/usr/include/boost/process/exception.hpp: + +/usr/include/boost/process/error.hpp: + +/usr/include/boost/logic/tribool_fwd.hpp: + +/usr/include/boost/io/quoted.hpp: + +/usr/include/boost/functional/hash_fwd.hpp: + +/usr/include/boost/asio/detail/reactive_socket_connect_op.hpp: + +/usr/include/boost/process/detail/traits/decl.hpp: + +/usr/include/boost/process/detail/traits/wchar_t.hpp: + +/usr/include/boost/asio/detail/handler_work.hpp: + +/usr/include/boost/process/locale.hpp: + +/usr/include/boost/preprocessor/seq/detail/is_empty.hpp: + +/usr/include/boost/process/detail/posix/cmd.hpp: + +/usr/include/boost/process/shell.hpp: + +/usr/include/boost/process/detail/posix/shell_path.hpp: + +/usr/include/boost/process/detail/traits/async.hpp: + +/usr/include/boost/process/detail/on_exit.hpp: + +/usr/include/boost/process/detail/posix/on_exit.hpp: + +/usr/include/boost/fusion/support/config.hpp: + +/usr/include/boost/fusion/support/iterator_base.hpp: + +/usr/include/boost/fusion/support/detail/is_mpl_sequence.hpp: + +/usr/include/boost/mpl/aux_/begin_end_impl.hpp: + +/usr/include/boost/fusion/algorithm/iteration/for_each.hpp: + +/usr/include/boost/fusion/container/list/detail/begin_impl.hpp: + +/usr/include/boost/asio/ip/impl/address_v4.ipp: + +/usr/include/boost/mpl/empty_base.hpp: + +/usr/include/boost/fusion/support/is_sequence.hpp: + +/usr/include/boost/fusion/view/single_view/detail/prior_impl.hpp: + +/usr/include/boost/fusion/support/is_segmented.hpp: + +/usr/include/boost/mpl/aux_/preprocessed/gcc/apply_fwd.hpp: + +/usr/include/boost/fusion/sequence/intrinsic/detail/segmented_begin_impl.hpp: + +/usr/include/boost/fusion/iterator/segmented_iterator.hpp: diff --git a/graphics/asymptote/LspCpp/CMakeFiles/lspcpp.dir/compiler_depend.ts b/graphics/asymptote/LspCpp/CMakeFiles/lspcpp.dir/compiler_depend.ts new file mode 100644 index 0000000000..f93565eb8f --- /dev/null +++ b/graphics/asymptote/LspCpp/CMakeFiles/lspcpp.dir/compiler_depend.ts @@ -0,0 +1,2 @@ +# CMAKE generated file: DO NOT EDIT! +# Timestamp file for compiler generated dependencies management for lspcpp. diff --git a/graphics/asymptote/LspCpp/CMakeFiles/lspcpp.dir/depend.make b/graphics/asymptote/LspCpp/CMakeFiles/lspcpp.dir/depend.make new file mode 100644 index 0000000000..52a3dcf548 --- /dev/null +++ b/graphics/asymptote/LspCpp/CMakeFiles/lspcpp.dir/depend.make @@ -0,0 +1,2 @@ +# Empty dependencies file for lspcpp. +# This may be replaced when dependencies are built. diff --git a/graphics/asymptote/LspCpp/CMakeFiles/lspcpp.dir/flags.make b/graphics/asymptote/LspCpp/CMakeFiles/lspcpp.dir/flags.make new file mode 100644 index 0000000000..2240985663 --- /dev/null +++ b/graphics/asymptote/LspCpp/CMakeFiles/lspcpp.dir/flags.make @@ -0,0 +1,10 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 3.20 + +# compile CXX with /bin/c++ +CXX_DEFINES = -DLSPCPP_JSON_=1 + +CXX_INCLUDES = -I/usr/local/src/asymptote-2.78/LspCpp/include -I/usr/local/src/asymptote-2.78/LspCpp/third_party/rapidjson/include -I/usr/local/src/asymptote-2.78/LspCpp/third_party/uri/include -isystem /usr/local/src/asymptote-2.78/LspCpp/third_party/threadpool -isystem /usr/local/src/asymptote-2.78/LspCpp/third_party/utfcpp/source + +CXX_FLAGS = -fPIE -D_FILE_OFFSET_BITS=64 -DUSEGC -I../gc-8.2.0/include -O2 -g -DNDEBUG -fPIC -Wall -std=c++14 + diff --git a/graphics/asymptote/LspCpp/CMakeFiles/lspcpp.dir/link.txt b/graphics/asymptote/LspCpp/CMakeFiles/lspcpp.dir/link.txt new file mode 100644 index 0000000000..836ae2d086 --- /dev/null +++ b/graphics/asymptote/LspCpp/CMakeFiles/lspcpp.dir/link.txt @@ -0,0 +1,2 @@ +/bin/ar qc liblspcpp.a CMakeFiles/lspcpp.dir/src/jsonrpc/Context.cpp.o CMakeFiles/lspcpp.dir/src/jsonrpc/Endpoint.cpp.o CMakeFiles/lspcpp.dir/src/jsonrpc/GCThreadContext.cpp.o CMakeFiles/lspcpp.dir/src/jsonrpc/message.cpp.o CMakeFiles/lspcpp.dir/src/jsonrpc/MessageJsonHandler.cpp.o CMakeFiles/lspcpp.dir/src/jsonrpc/RemoteEndPoint.cpp.o CMakeFiles/lspcpp.dir/src/jsonrpc/serializer.cpp.o CMakeFiles/lspcpp.dir/src/jsonrpc/StreamMessageProducer.cpp.o CMakeFiles/lspcpp.dir/src/jsonrpc/TcpServer.cpp.o CMakeFiles/lspcpp.dir/src/jsonrpc/threaded_queue.cpp.o CMakeFiles/lspcpp.dir/src/jsonrpc/WebSocketServer.cpp.o CMakeFiles/lspcpp.dir/src/lsp/initialize.cpp.o CMakeFiles/lspcpp.dir/src/lsp/lsp.cpp.o CMakeFiles/lspcpp.dir/src/lsp/lsp_diagnostic.cpp.o CMakeFiles/lspcpp.dir/src/lsp/Markup.cpp.o CMakeFiles/lspcpp.dir/src/lsp/ParentProcessWatcher.cpp.o CMakeFiles/lspcpp.dir/src/lsp/ProtocolJsonHandler.cpp.o CMakeFiles/lspcpp.dir/src/lsp/textDocument.cpp.o CMakeFiles/lspcpp.dir/src/lsp/utils.cpp.o CMakeFiles/lspcpp.dir/src/lsp/working_files.cpp.o +/bin/ranlib liblspcpp.a diff --git a/graphics/asymptote/LspCpp/CMakeFiles/lspcpp.dir/progress.make b/graphics/asymptote/LspCpp/CMakeFiles/lspcpp.dir/progress.make new file mode 100644 index 0000000000..683f312204 --- /dev/null +++ b/graphics/asymptote/LspCpp/CMakeFiles/lspcpp.dir/progress.make @@ -0,0 +1,22 @@ +CMAKE_PROGRESS_1 = 2 +CMAKE_PROGRESS_2 = 3 +CMAKE_PROGRESS_3 = 4 +CMAKE_PROGRESS_4 = 5 +CMAKE_PROGRESS_5 = 6 +CMAKE_PROGRESS_6 = 7 +CMAKE_PROGRESS_7 = 8 +CMAKE_PROGRESS_8 = 9 +CMAKE_PROGRESS_9 = 10 +CMAKE_PROGRESS_10 = 11 +CMAKE_PROGRESS_11 = 12 +CMAKE_PROGRESS_12 = 13 +CMAKE_PROGRESS_13 = 14 +CMAKE_PROGRESS_14 = 15 +CMAKE_PROGRESS_15 = 16 +CMAKE_PROGRESS_16 = 17 +CMAKE_PROGRESS_17 = 18 +CMAKE_PROGRESS_18 = 19 +CMAKE_PROGRESS_19 = 20 +CMAKE_PROGRESS_20 = 21 +CMAKE_PROGRESS_21 = 22 + diff --git a/graphics/asymptote/LspCpp/CMakeFiles/progress.marks b/graphics/asymptote/LspCpp/CMakeFiles/progress.marks new file mode 100644 index 0000000000..64bb6b746d --- /dev/null +++ b/graphics/asymptote/LspCpp/CMakeFiles/progress.marks @@ -0,0 +1 @@ +30 diff --git a/graphics/asymptote/LspCpp/CMakeLists.txt b/graphics/asymptote/LspCpp/CMakeLists.txt new file mode 100644 index 0000000000..ed420b2955 --- /dev/null +++ b/graphics/asymptote/LspCpp/CMakeLists.txt @@ -0,0 +1,336 @@ +cmake_minimum_required(VERSION 3.8) + +if(POLICY CMP0025) + # detect Apple's Clang + cmake_policy(SET CMP0025 NEW) +endif() +if(POLICY CMP0054) + cmake_policy(SET CMP0054 NEW) +endif() + +set(LIB_MAJOR_VERSION "1") +set(LIB_MINOR_VERSION "0") +set(LIB_PATCH_VERSION "0") +set(LIB_VERSION_STRING "${LIB_MAJOR_VERSION}.${LIB_MINOR_VERSION}.${LIB_PATCH_VERSION}") + +# Without this, paths are not relative in the sources list +cmake_policy(SET CMP0076 NEW) +project(lspcpp VERSION "${LIB_VERSION_STRING}" LANGUAGES CXX C) + +SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") +SET(GOOGLETEST_VERSION "0.00") + +# compile in RelWithDebInfo mode by default +if(NOT CMAKE_BUILD_TYPE) + set(CMAKE_BUILD_TYPE "RelWithDebInfo" CACHE STRING "Choose the type of build, options are: Debug Release RelWithDebInfo MinSizeRel." FORCE) +endif() + +########################################################### +# Options +########################################################### +function (option_if_not_defined name description default) + if(NOT DEFINED ${name}) + option(${name} ${description} ${default}) + endif() +endfunction() + +option_if_not_defined(USE_SYSTEM_RAPIDJSON "Use system RapidJSON instead of the git submodule if exists" OFF) +option_if_not_defined(LSPCPP_WARNINGS_AS_ERRORS "Treat warnings as errors" OFF) +option_if_not_defined(LSPCPP_BUILD_EXAMPLES "Build example applications" OFF) +option_if_not_defined(LSPCPP_BUILD_FUZZER "Build fuzzer" OFF) +option_if_not_defined(LSPCPP_ASAN "Build lsp with address sanitizer" OFF) +option_if_not_defined(LSPCPP_MSAN "Build lsp with memory sanitizer" OFF) +option_if_not_defined(LSPCPP_TSAN "Build lsp with thread sanitizer" OFF) +option_if_not_defined(LSPCPP_INSTALL "Create lsp install target" OFF) + +########################################################### +# Directories +########################################################### +function (set_if_not_defined name value) + if(NOT DEFINED ${name}) + set(${name} ${value} PARENT_SCOPE) + endif() +endfunction() + +set(LSPCPP_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/include) +set_if_not_defined(LSPCPP_THIRD_PARTY_DIR ${CMAKE_CURRENT_SOURCE_DIR}/third_party) + +macro(lspcpp_set_target_options_with_nuget_pkg target id version) + if (CMAKE_GENERATOR MATCHES "Visual Studio.*") + if(EXISTS ${CMAKE_BINARY_DIR}/packages/${id}.${version}/build/${id}.targets) + target_link_libraries(${target} PRIVATE ${CMAKE_BINARY_DIR}/packages/${id}.${version}/build/${id}.targets) + elseif(EXISTS ${CMAKE_BINARY_DIR}/packages/${id}.${version}/build/native/${id}.targets) + target_link_libraries(${target} PRIVATE ${CMAKE_BINARY_DIR}/packages/${id}.${version}/build/native/${id}.targets) + else() + message(FATAL_ERROR "Can't find target of ${id}.${version}") + endif() + else() + message(FATAL_ERROR "NUGET package only use in Visual Studio") + endif() + +endmacro() + +macro(INSTALL_NUGET id version) + if (CMAKE_GENERATOR MATCHES "Visual Studio.*") + unset(nuget_cmd) + list(APPEND nuget_cmd install ${id} -Prerelease -Version ${version} -OutputDirectory ${CMAKE_BINARY_DIR}/packages) + message("excute nuget install:${nuget_cmd}") + execute_process(COMMAND nuget ${nuget_cmd} ENCODING AUTO) + else() + message(FATAL_ERROR "INSTALL_NUGET only use in Visual Studio") + endif() + +endmacro() +########################################################### +# Functions +########################################################### +function(lspcpp_set_target_options target) + + set_property(TARGET ${target} PROPERTY CXX_STANDARD_REQUIRED ON) + + # Enable C++14 (Required) + set_property(TARGET ${target} PROPERTY CXX_STANDARD 14) + + set_property(TARGET ${target} PROPERTY CXX_EXTENSIONS OFF) + + if (CMAKE_GENERATOR MATCHES "Visual Studio.*") + lspcpp_set_target_options_with_nuget_pkg(${target} boost 1.76.0.0) + lspcpp_set_target_options_with_nuget_pkg(${target} boost_chrono-vc141 1.76.0.0) + lspcpp_set_target_options_with_nuget_pkg(${target} boost_date_time-vc141 1.76.0.0) + lspcpp_set_target_options_with_nuget_pkg(${target} boost_filesystem-vc141 1.76.0.0) + lspcpp_set_target_options_with_nuget_pkg(${target} boost_program_options-vc141 1.76.0.0) + lspcpp_set_target_options_with_nuget_pkg(${target} boost_system-vc141 1.76.0.0) + lspcpp_set_target_options_with_nuget_pkg(${target} boost_thread-vc141 1.76.0.0) + endif() + + # Enable all warnings + if(MSVC) + target_compile_options(${target} PRIVATE "-W4") + else() + target_compile_options(${target} PRIVATE "-Wall") + endif() + + # Disable specific, pedantic warnings + if(MSVC) + target_compile_options(${target} PRIVATE + "-D_CRT_SECURE_NO_WARNINGS" + + # Warnings from nlohmann/json headers. + "/wd4267" # 'argument': conversion from 'size_t' to 'int', possible loss of data + "/bigobj" # for visual studio 2022 x64 or later. + ) + endif() + + # Add define for JSON library in use + set_target_properties(${target} PROPERTIES + COMPILE_DEFINITIONS "LSPCPP_JSON_${LSPCPP_JSON_LIBRARY_UPPER}=1" + ) + + # Treat all warnings as errors + if(LSPCPP_WARNINGS_AS_ERRORS) + if(MSVC) + target_compile_options(${target} PRIVATE "/WX") + else() + target_compile_options(${target} PRIVATE "-Werror") + endif() + endif(LSPCPP_WARNINGS_AS_ERRORS) + + if(LSPCPP_ASAN) + target_compile_options(${target} PUBLIC "-fsanitize=address") + target_link_libraries(${target} PUBLIC "-fsanitize=address") + elseif(LSPCPP_MSAN) + target_compile_options(${target} PUBLIC "-fsanitize=memory") + target_link_libraries(${target} PUBLIC "-fsanitize=memory") + elseif(LSPCPP_TSAN) + target_compile_options(${target} PUBLIC "-fsanitize=thread") + target_link_libraries(${target} PUBLIC "-fsanitize=thread") + endif() + + # Error on undefined symbols + # if(NOT MSVC) + # target_compile_options(${target} PRIVATE "-Wl,--no-undefined") + # endif() + +endfunction() + + +# Libraries + +if (MSVC) + set(Uri_USE_STATIC_CRT OFF) +endif() +set(Uri_BUILD_TESTS OFF) +add_subdirectory(third_party/uri) + +########################################################### +# boost library +########################################################### +if (CMAKE_GENERATOR MATCHES "Visual Studio.*") + INSTALL_NUGET(boost 1.76.0.0) + INSTALL_NUGET(boost_chrono-vc141 1.76.0.0) + INSTALL_NUGET(boost_date_time-vc141 1.76.0.0) + INSTALL_NUGET(boost_filesystem-vc141 1.76.0.0) + INSTALL_NUGET(boost_program_options-vc141 1.76.0.0) + INSTALL_NUGET(boost_system-vc141 1.76.0.0) + INSTALL_NUGET(boost_thread-vc141 1.76.0.0) +else() + + find_package(Boost COMPONENTS date_time chrono filesystem system thread program_options) + if(NOT Boost_FOUND) + if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin") + message(FATAL_ERROR "Can't find boost,lease build boost and install it or install boost with : brew install boost") + elseif(${CMAKE_SYSTEM_NAME} MATCHES "Linux") + message(FATAL_ERROR "Can't find boost,please build boost and install it. or install boost with : sudo apt-get install libboost-dev") + endif() + endif() +endif() + + +########################################################### +# JSON library +########################################################### +if(USE_SYSTEM_RAPIDJSON) + set(RapidJSON_MIN_VERSION "1.1.0") + find_package(RapidJSON ${RapidJSON_MIN_VERSION} QUIET) + if(NOT DEFINED RapidJSON_INCLUDE_DIRS AND DEFINED RAPIDJSON_INCLUDE_DIRS) + set(RapidJSON_INCLUDE_DIRS "${RAPIDJSON_INCLUDE_DIRS}") + endif() +endif() +if(NOT RapidJSON_FOUND) + if(EXISTS "${CMAKE_SOURCE_DIR}/third_party/rapidjson/include") + message(STATUS "Using local RapidJSON") + set(RapidJSON_INCLUDE_DIRS third_party/rapidjson/include) + else() + message(STATUS "Please initialize rapidJSON git submodule as currently installed version is to old:") + message(STATUS "git submodule init && git submodule update") + message(FATAL_ERROR "RapidJSON version is likely too old.") + endif() +endif() + + +########################################################### +# Targets +########################################################### + +# lsp +add_library(lspcpp STATIC) + +### Includes +target_include_directories(lspcpp + PUBLIC + ${LSPCPP_INCLUDE_DIR} + ${Boost_INCLUDE_DIRS} + ${RapidJSON_INCLUDE_DIRS} + ${Uri_SOURCE_DIR}/include + ) + +target_link_libraries(lspcpp PUBLIC network-uri ${Boost_LIBRARIES}) + +set(LSPCPP_THIRD_PARTY_DIR_LIST + ${LSPCPP_THIRD_PARTY_DIR}/threadpool + ${LSPCPP_THIRD_PARTY_DIR}/utfcpp/source + ) + +foreach(include_dir ${LSPCPP_THIRD_PARTY_DIR_LIST}) + get_filename_component(include_dir_realpath ${include_dir} REALPATH) + # Don't add as SYSTEM if they are in CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES. + # It would reorder the system search paths and cause issues with libstdc++'s + # use of #include_next. + if(NOT "${include_dir_realpath}" IN_LIST CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES) + target_include_directories(lspcpp SYSTEM PRIVATE ${include_dir}) + endif() +endforeach() + +### Sources +set(LSPCPP_LIST + src/jsonrpc/Context.cpp + src/jsonrpc/Endpoint.cpp + src/jsonrpc/GCThreadContext.cpp + src/jsonrpc/message.cpp + src/jsonrpc/MessageJsonHandler.cpp + src/jsonrpc/RemoteEndPoint.cpp + src/jsonrpc/serializer.cpp + src/jsonrpc/StreamMessageProducer.cpp + src/jsonrpc/TcpServer.cpp + src/jsonrpc/threaded_queue.cpp + src/jsonrpc/WebSocketServer.cpp + + src/lsp/initialize.cpp + src/lsp/lsp.cpp + src/lsp/lsp_diagnostic.cpp + src/lsp/Markup.cpp + src/lsp/ParentProcessWatcher.cpp + src/lsp/ProtocolJsonHandler.cpp + src/lsp/textDocument.cpp + src/lsp/utils.cpp + src/lsp/working_files.cpp + ) + +target_sources(lspcpp PRIVATE + ${LSPCPP_LIST}) + +### Compile options + +lspcpp_set_target_options(lspcpp) + +set_target_properties(lspcpp PROPERTIES POSITION_INDEPENDENT_CODE 1) + +# install +if(LSPCPP_INSTALL) + include(GNUInstallDirs) + + install(DIRECTORY ${LSPCPP_INCLUDE_DIR}/LibLsp + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} + USE_SOURCE_PERMISSIONS + ) + + install(TARGETS lspcpp + EXPORT lspcpp-targets + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} + ) + + install(EXPORT lspcpp-targets + FILE lspcpp-config.cmake + NAMESPACE lspcpp:: + DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/lspcpp + ) +endif() + +# examples +if(LSPCPP_BUILD_EXAMPLES) + + ########################################################### + # OS libraries + ########################################################### + if(CMAKE_SYSTEM_NAME MATCHES "Windows") + set(LSPCPP_OS_LIBS WS2_32) + elseif(CMAKE_SYSTEM_NAME MATCHES "Linux") + set(LSPCPP_OS_LIBS pthread) + elseif(CMAKE_SYSTEM_NAME MATCHES "Darwin") + set(LSPCPP_OS_LIBS) + endif() + + function(build_example target) + add_executable(${target} "${CMAKE_CURRENT_SOURCE_DIR}/examples/${target}.cpp") + target_include_directories(${target} PRIVATE ${Uri_SOURCE_DIR}/include) + set_target_properties(${target} PROPERTIES + FOLDER "Examples" + ) + lspcpp_set_target_options(${target}) + target_link_libraries(${target} PRIVATE lspcpp "${LSPCPP_OS_LIBS}") + endfunction(build_example) + + set(EXAMPLES + StdIOClientExample + StdIOServerExample + TcpServerExample + WebsocketExample + ) + + foreach (example ${EXAMPLES}) + build_example(${example}) + endforeach() +endif() diff --git a/graphics/asymptote/LspCpp/LICENSE b/graphics/asymptote/LspCpp/LICENSE old mode 100644 new mode 100755 index e2016d4801..f9e07552ce --- a/graphics/asymptote/LspCpp/LICENSE +++ b/graphics/asymptote/LspCpp/LICENSE @@ -1,21 +1,21 @@ -MIT License - -Copyright (c) 2020 kuafuwang - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. +MIT License + +Copyright (c) 2020 kuafuwang + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/graphics/asymptote/LspCpp/LibLsp/JsonRpc/Cancellation.h b/graphics/asymptote/LspCpp/LibLsp/JsonRpc/Cancellation.h deleted file mode 100644 index b89f32f166..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/JsonRpc/Cancellation.h +++ /dev/null @@ -1,23 +0,0 @@ -#pragma once -#include -#include "lsRequestId.h" -#include -using CancelMonitor = std::function; -namespace Cancellation -{ - - struct Params { - /** - * The request id to cancel. - */ - lsRequestId id; - - MAKE_SWAP_METHOD(Cancellation::Params, id); - }; - -}; -MAKE_REFLECT_STRUCT(Cancellation::Params, id); - -DEFINE_NOTIFICATION_TYPE(Notify_Cancellation, Cancellation::Params,"$/cancelRequest"); - - diff --git a/graphics/asymptote/LspCpp/LibLsp/JsonRpc/Condition.h b/graphics/asymptote/LspCpp/LibLsp/JsonRpc/Condition.h deleted file mode 100644 index a5f550041d..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/JsonRpc/Condition.h +++ /dev/null @@ -1,48 +0,0 @@ -#pragma once -#include -template -class Condition -{ -public: - - std::mutex m_mutex; - std::condition_variable m_condition; - ~Condition() { - m_condition.notify_all(); - } - void notify(std::unique_ptr data) noexcept - { - { - std::lock_guard eventLock(m_mutex); - any.swap(data); - } - // wake up one waiter - m_condition.notify_one(); - }; - - - std::unique_ptr wait(unsigned timeout=0) - { - std::unique_lock ul(m_mutex); - if (!timeout) { - m_condition.wait(ul,[&]() { - if (!any) - return false; - return true; - }); - } - else{ - if(!any){ - std::cv_status status = m_condition.wait_for(ul, std::chrono::milliseconds(timeout)); - if (status == std::cv_status::timeout) - { - return {}; - } - } - } - return std::unique_ptr(any.release()); - - } -private: - std::unique_ptr any; -}; diff --git a/graphics/asymptote/LspCpp/LibLsp/JsonRpc/Context.cpp b/graphics/asymptote/LspCpp/LibLsp/JsonRpc/Context.cpp deleted file mode 100644 index 5fb1ad4d45..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/JsonRpc/Context.cpp +++ /dev/null @@ -1,35 +0,0 @@ -//===--- Context.cpp ---------------------------------------------*- C++-*-===// -// -// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -// See https://llvm.org/LICENSE.txt for license information. -// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -// -//===----------------------------------------------------------------------===// - -#include "Context.h" -#include - -namespace lsp { - - -Context Context::empty() { return Context(/*dataPtr=*/nullptr); } - -Context::Context(std::shared_ptr DataPtr) - : dataPtr(std::move(DataPtr)) {} - -Context Context::clone() const { return Context(dataPtr); } - -static Context ¤tContext() { - static thread_local auto c = Context::empty(); - return c; -} - -const Context &Context::current() { return currentContext(); } - -Context Context::swapCurrent(Context Replacement) { - std::swap(Replacement, currentContext()); - return Replacement; -} - - -} // lsp clang diff --git a/graphics/asymptote/LspCpp/LibLsp/JsonRpc/Context.h b/graphics/asymptote/LspCpp/LibLsp/JsonRpc/Context.h deleted file mode 100644 index 20edf71b1c..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/JsonRpc/Context.h +++ /dev/null @@ -1,216 +0,0 @@ -//===--- Context.h - Mechanism for passing implicit data --------*- C++-*-===// -// -// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -// See https://llvm.org/LICENSE.txt for license information. -// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -// -//===----------------------------------------------------------------------===// -// -// Context for storing and retrieving implicit data. Useful for passing implicit -// parameters on a per-request basis. -// -//===----------------------------------------------------------------------===// - -#pragma once - -#include -#include - -namespace lsp { - - -/// Values in a Context are indexed by typed keys. -/// Key serves two purposes: -/// - it provides a lookup key for the context (each Key is unique), -/// - it makes lookup type-safe: a Key can only map to a T (or nothing). -/// -/// Example: -/// Key RequestID; -/// Key Version; -/// -/// Context Ctx = Context::empty().derive(RequestID, 10).derive(Version, 3); -/// assert(*Ctx.get(RequestID) == 10); -/// assert(*Ctx.get(Version) == 3); -/// -/// Keys are typically used across multiple functions, so most of the time you -/// would want to make them static class members or global variables. -template class Key { -public: - static_assert(!std::is_reference::value, - "Reference arguments to Key<> are not allowed"); - - constexpr Key() = default; - - Key(Key const &) = delete; - Key &operator=(Key const &) = delete; - Key(Key &&) = delete; - Key &operator=(Key &&) = delete; -}; - -/// A context is an immutable container for per-request data that must be -/// propagated through layers that don't care about it. An example is a request -/// ID that we may want to use when logging. -/// -/// Conceptually, a context is a heterogeneous map, T>. Each key has -/// an associated value type, which allows the map to be typesafe. -/// -/// There is an "ambient" context for each thread, Context::current(). -/// Most functions should read from this, and use WithContextValue or -/// WithContext to extend or replace the context within a block scope. -/// Only code dealing with threads and extension points should need to use -/// other Context objects. -/// -/// You can't add data to an existing context, instead you create a new -/// immutable context derived from it with extra data added. When you retrieve -/// data, the context will walk up the parent chain until the key is found. -class Context { -public: - /// Returns an empty root context that contains no data. - static Context empty(); - /// Returns the context for the current thread, creating it if needed. - static const Context ¤t(); - // Sets the current() context to Replacement, and returns the old context. - // Prefer to use WithContext or WithContextValue to do this safely. - static Context swapCurrent(Context Replacement); - -private: - struct Data; - Context(std::shared_ptr DataPtr); - -public: - /// Same as Context::empty(), please use Context::empty() instead. - Context() = default; - - /// Copy operations for this class are deleted, use an explicit clone() method - /// when you need a copy of the context instead. - Context(Context const &) = delete; - Context &operator=(const Context &) = delete; - - Context(Context &&) = default; - Context &operator=(Context &&) = default; - - /// Get data stored for a typed \p Key. If values are not found - /// \returns Pointer to the data associated with \p Key. If no data is - /// specified for \p Key, return null. - template const Type *get(const Key &Key) const { - for (const Data *DataPtr = this->dataPtr.get(); DataPtr != nullptr; - DataPtr = DataPtr->parent.get()) { - if (DataPtr->KeyPtr == &Key) - return static_cast(DataPtr->value->getValuePtr()); - } - return nullptr; - } - - /// A helper to get a reference to a \p Key that must exist in the map. - /// Must not be called for keys that are not in the map. - template const Type &getExisting(const Key &Key) const { - auto Val = get(Key); - assert(Val && "Key does not exist"); - return *Val; - } - - /// Derives a child context - /// It is safe to move or destroy a parent context after calling derive(). - /// The child will keep its parent alive, and its data remains accessible. - template - Context derive(const Key &Key, - typename std::decay::type Value) const & { - return Context(std::make_shared( - Data{/*parent=*/dataPtr, &Key, - std::make_unique::type>>( - std::move(Value))})); - } - - template - Context - derive(const Key &Key, - typename std::decay::type Value) && /* takes ownership */ { - return Context(std::make_shared( - Data{/*parent=*/std::move(dataPtr), &Key, - std::make_unique::type>>( - std::move(Value))})); - } - - /// Derives a child context, using an anonymous key. - /// Intended for objects stored only for their destructor's side-effect. - template Context derive(Type &&Value) const & { - static Key::type> Private; - return derive(Private, std::forward(Value)); - } - - template Context derive(Type &&Value) && { - static Key::type> Private; - return std::move(*this).derive(Private, std::forward(Value)); - } - - /// Clone this context object. - Context clone() const; - -private: - class AnyStorage { - public: - virtual ~AnyStorage() = default; - virtual void *getValuePtr() = 0; - }; - - template class TypedAnyStorage : public Context::AnyStorage { - static_assert(std::is_same::type, T>::value, - "Argument to TypedAnyStorage must be decayed"); - - public: - TypedAnyStorage(T &&Value) : value(std::move(Value)) {} - - void *getValuePtr() override { return &value; } - - private: - T value; - }; - - struct Data { - // We need to make sure parent outlives the value, so the order of members - // is important. We do that to allow classes stored in Context's child - // layers to store references to the data in the parent layers. - std::shared_ptr parent; - const void *KeyPtr; - std::unique_ptr value; - }; - - std::shared_ptr dataPtr; -}; - -/// WithContext replaces Context::current() with a provided scope. -/// When the WithContext is destroyed, the original scope is restored. -/// For extending the current context with new value, prefer WithContextValue. -class WithContext { -public: - WithContext(Context C) : restore(Context::swapCurrent(std::move(C))) {} - ~WithContext() { Context::swapCurrent(std::move(restore)); } - WithContext(const WithContext &) = delete; - WithContext &operator=(const WithContext &) = delete; - WithContext(WithContext &&) = delete; - WithContext &operator=(WithContext &&) = delete; - -private: - Context restore; -}; - -/// WithContextValue extends Context::current() with a single value. -/// When the WithContextValue is destroyed, the original scope is restored. -class WithContextValue { -public: - template - WithContextValue(const Key &K, typename std::decay::type V) - : restore(Context::current().derive(K, std::move(V))) {} - - // Anonymous values can be used for the destructor side-effect. - template - WithContextValue(T &&V) - : restore(Context::current().derive(std::forward(V))) {} - -private: - WithContext restore; -}; - - -} // namespace lsp - diff --git a/graphics/asymptote/LspCpp/LibLsp/JsonRpc/Endpoint.cpp b/graphics/asymptote/LspCpp/LibLsp/JsonRpc/Endpoint.cpp deleted file mode 100644 index 549744555b..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/JsonRpc/Endpoint.cpp +++ /dev/null @@ -1,46 +0,0 @@ -#include "Endpoint.h" -#include "message.h" - - -bool GenericEndpoint::notify(std::unique_ptr msg) -{ - auto findIt = method2notification.find(msg->GetMethodType()); - - if (findIt != method2notification.end()) - { - return findIt->second(std::move(msg)); - } - std::string info = "can't find method2notification for notification:\n" + msg->ToJson() + "\n"; - log.log(lsp::Log::Level::SEVERE, info); - return false; -} - -bool GenericEndpoint::onResponse(const std::string& method, std::unique_ptrmsg) -{ - auto findIt = method2response.find(method); - - if (findIt != method2response.end()) - { - return findIt->second(std::move(msg)); - } - - std::string info = "can't find method2response for response:\n" + msg->ToJson() + "\n"; - log.log(lsp::Log::Level::SEVERE, info); - - return false; -} - - - -bool GenericEndpoint::onRequest(std::unique_ptr request) -{ - auto findIt = method2request.find(request->GetMethodType()); - - if (findIt != method2request.end()) - { - return findIt->second(std::move(request)); - } - std::string info = "can't find method2request for request:\n" + request->ToJson() + "\n"; - log.log(lsp::Log::Level::SEVERE, info); - return false; -} diff --git a/graphics/asymptote/LspCpp/LibLsp/JsonRpc/Endpoint.h b/graphics/asymptote/LspCpp/LibLsp/JsonRpc/Endpoint.h deleted file mode 100644 index 01d8e8ca91..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/JsonRpc/Endpoint.h +++ /dev/null @@ -1,53 +0,0 @@ -#pragma once -#include -#include -#include -#include "MessageIssue.h" -struct LspMessage; -struct NotificationInMessage; -struct lsBaseOutMessage; -struct RequestInMessage; - -using GenericResponseHandler = std::function< bool(std::unique_ptr) >; -using GenericRequestHandler = std::function< bool(std::unique_ptr) >; -using GenericNotificationHandler = std::function< bool(std::unique_ptr) >; - -class Endpoint -{ -public: - virtual ~Endpoint() = default; - virtual bool onRequest(std::unique_ptr) = 0; - virtual bool notify(std::unique_ptr) = 0; - - virtual bool onResponse(const std::string&, std::unique_ptr) = 0; - virtual void registerRequestHandler(const std::string&, GenericResponseHandler ) = 0; - virtual void registerNotifyHandler(const std::string&, GenericNotificationHandler ) = 0; -}; - -class GenericEndpoint :public Endpoint -{ - -public: - GenericEndpoint(lsp::Log& l):log(l){} - bool notify(std::unique_ptr) override; - bool onResponse(const std::string&, std::unique_ptr) override; - - bool onRequest(std::unique_ptr) override; - std::map< std::string, GenericRequestHandler > method2request; - std::map< std::string, GenericResponseHandler > method2response; - std::map< std::string, GenericNotificationHandler > method2notification; - - void registerRequestHandler(const std::string& method, GenericResponseHandler cb) override - { - method2request[method] = cb; - } - - void registerNotifyHandler(const std::string& method, GenericNotificationHandler cb) override - { - method2notification[method] = cb; - } - lsp::Log& log; - - - -}; diff --git a/graphics/asymptote/LspCpp/LibLsp/JsonRpc/GCThreadContext.cpp b/graphics/asymptote/LspCpp/LibLsp/JsonRpc/GCThreadContext.cpp deleted file mode 100644 index 15253411a1..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/JsonRpc/GCThreadContext.cpp +++ /dev/null @@ -1,17 +0,0 @@ -#include "GCThreadContext.h" -#include - -GCThreadContext::GCThreadContext() -{ -#ifdef USEGC - GC_get_stack_base(&gsb); - GC_register_my_thread(&gsb); -#endif -} - -GCThreadContext::~GCThreadContext() -{ -#ifdef USEGC - GC_unregister_my_thread(); -#endif -} \ No newline at end of file diff --git a/graphics/asymptote/LspCpp/LibLsp/JsonRpc/GCThreadContext.h b/graphics/asymptote/LspCpp/LibLsp/JsonRpc/GCThreadContext.h deleted file mode 100644 index a0f7db288d..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/JsonRpc/GCThreadContext.h +++ /dev/null @@ -1,19 +0,0 @@ -#pragma once - -#if defined(USEGC) -#define GC_THREADS -#include -#endif - -class GCThreadContext -{ -public: - GCThreadContext(); - ~GCThreadContext(); - -private: -#if defined(USEGC) - GC_stack_base gsb; -#endif - -}; \ No newline at end of file diff --git a/graphics/asymptote/LspCpp/LibLsp/JsonRpc/MessageIssue.h b/graphics/asymptote/LspCpp/LibLsp/JsonRpc/MessageIssue.h deleted file mode 100644 index bda6e65d46..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/JsonRpc/MessageIssue.h +++ /dev/null @@ -1,182 +0,0 @@ -#pragma once -#include -#include -#include -namespace lsp -{ - class Log - { - public: - virtual ~Log() = default; - - enum class Level - { - /** - * OFF is a special level that can be used to turn off logging. - - */ - OFF = 1, - - /** - * SEVERE is a message level indicating a serious failure. - *

- * In general SEVERE messages should describe events that are - * of considerable importance and which will prevent normal - * program execution. They should be reasonably intelligible - * to end users and to system administrators. - - */ - SEVERE = 2, - - /** - * WARNING is a message level indicating a potential problem. - *

- * In general WARNING messages should describe events that will - * be of interest to end users or system managers, or which - * indicate potential problems. - - * - */ - WARNING = 3, - /** - * INFO is a message level for informational messages. - *

- * Typically INFO messages will be written to the console - * or its equivalent. So the INFO level should only be - * used for reasonably significant messages that will - * make sense to end users and system administrators. - - */ - INFO = 3, - /** - * CONFIG is a message level for static configuration messages. - *

- * CONFIG messages are intended to provide a variety of static - * configuration information, to assist in debugging problems - * that may be associated with particular configurations. - * For example, CONFIG message might include the CPU type, - * the graphics depth, the GUI look-and-feel, etc. - * This level is initialized to 4. - */ - - CONFIG = 4, - - - - /** - * FINE is a message level providing tracing information. - *

- * All of FINE, FINER, and FINEST are intended for relatively - * detailed tracing. The exact meaning of the three levels will - * vary between subsystems, but in general, FINEST should be used - * for the most voluminous detailed output, FINER for somewhat - * less detailed output, and FINE for the lowest volume (and - * most important) messages. - *

- * In general the FINE level should be used for information - * that will be broadly interesting to developers who do not have - * a specialized interest in the specific subsystem. - *

- * FINE messages might include things like minor (recoverable) - * failures. Issues indicating potential performance problems - * are also worth logging as FINE. - * This level is initialized to 5. - */ - FINE = 5, - - /** - * FINER indicates a fairly detailed tracing message. - * By default logging calls for entering, returning, or throwing - * an exception are traced at this level. - * This level is initialized to 400. - */ - FINER = 6, - - /** - * FINEST indicates a highly detailed tracing message. - * This level is initialized to 300. - */ - FINEST = 7, - - /** - * ALL indicates that all messages should be logged. - * This level is initialized to Integer.MIN_VALUE. - */ - ALL, - }; - virtual void log(Level level, std::wstring&& msg) = 0; - virtual void log(Level level, const std::wstring& msg) = 0; - virtual void log(Level level, std::string&& msg) = 0; - virtual void log(Level level, const std::string& msg) = 0; - - void info(const std::string& msg) - { - log(Level::INFO, msg); - } - void info(const std::wstring& msg) - { - log(Level::INFO, msg); - } - void error(const std::string& msg) - { - log(Level::SEVERE, msg); - } - void error(const std::wstring& msg) - { - log(Level::SEVERE, msg); - } - void warning(const std::string& msg) - { - log(Level::WARNING, msg); - } - void warning(const std::wstring& msg) - { - log(Level::WARNING, msg); - } - }; -} - -class MessageIssue { - -public: - std::string text; - - lsp::Log::Level code; - - MessageIssue(const std::string& text, lsp::Log::Level code) :text(text), code(code) - { - - - } - MessageIssue(std::string&& text, lsp::Log::Level code) :text(text), code(code) - { - - - } - - - std::string getText() { - return text; - } - - lsp::Log::Level getIssueCode() { - return code; - } - - - std::string toString() { - return getText(); - } - -}; -class MessageIssueHandler -{ -public: - /** - * Handle issues found while parsing or validating a message. The list of issues must not be empty. - */ - virtual ~MessageIssueHandler() = default; - - virtual void handle(std::vector&&) = 0; - virtual void handle( MessageIssue&&) = 0; -}; diff --git a/graphics/asymptote/LspCpp/LibLsp/JsonRpc/MessageJsonHandler.cpp b/graphics/asymptote/LspCpp/LibLsp/JsonRpc/MessageJsonHandler.cpp deleted file mode 100644 index 111b29aa1c..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/JsonRpc/MessageJsonHandler.cpp +++ /dev/null @@ -1,57 +0,0 @@ -#include "MessageJsonHandler.h" -#include -#include - - - -std::unique_ptr MessageJsonHandler::parseResponseMessage(const std::string& method, Reader& r) -{ - auto findIt = method2response.find(method); - - if( findIt != method2response.end()) - { - return findIt->second(r); - } - return nullptr; -} - -std::unique_ptr MessageJsonHandler::parseRequstMessage(const std::string& method, Reader&r) -{ - auto findIt = method2request.find(method); - - if (findIt != method2request.end()) - { - return findIt->second(r); - } - return nullptr; -} - -bool MessageJsonHandler::resovleResponseMessage(Reader&r, std::pair>& result) -{ - for (auto& handler : method2response) - { - try - { - auto msg = handler.second(r); - result.first = handler.first; - result.second = std::move(msg); - return true; - } - catch (...) - { - - } - } - return false; -} - -std::unique_ptr MessageJsonHandler::parseNotificationMessage(const std::string& method, Reader& r) -{ - auto findIt = method2notification.find(method); - - if (findIt != method2notification.end()) - { - return findIt->second(r); - } - return nullptr; -} diff --git a/graphics/asymptote/LspCpp/LibLsp/JsonRpc/MessageJsonHandler.h b/graphics/asymptote/LspCpp/LibLsp/JsonRpc/MessageJsonHandler.h deleted file mode 100644 index 7e238b0cf6..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/JsonRpc/MessageJsonHandler.h +++ /dev/null @@ -1,61 +0,0 @@ -#pragma once -#include -#include -#include -#include -class Reader; - - -using GenericRequestJsonHandler = std::function< std::unique_ptr(Reader&) >; -using GenericResponseJsonHandler = std::function< std::unique_ptr(Reader&) >; -using GenericNotificationJsonHandler = std::function< std::unique_ptr(Reader&) >; - -class MessageJsonHandler -{ -public: - std::map< std::string, GenericRequestJsonHandler > method2request; - std::map< std::string, GenericResponseJsonHandler > method2response; - std::map< std::string, GenericNotificationJsonHandler > method2notification; - - - const GenericRequestJsonHandler* GetRequestJsonHandler(const char* methodInfo) const - { - const auto findIt = method2request.find(methodInfo); - return findIt == method2request.end() ? nullptr : &findIt->second; - } - - void SetRequestJsonHandler(const std::string& methodInfo, GenericRequestJsonHandler handler) - { - method2request[methodInfo] = handler; - } - - const GenericResponseJsonHandler* GetResponseJsonHandler(const char* methodInfo) const - { - const auto findIt = method2response.find(methodInfo); - return findIt == method2response.end() ? nullptr : &findIt->second; - } - - void SetResponseJsonHandler(const std::string& methodInfo,GenericResponseJsonHandler handler) - { - method2response[methodInfo] = handler; - } - - const GenericNotificationJsonHandler* GetNotificationJsonHandler(const char* methodInfo) const - { - const auto findIt = method2notification.find(methodInfo); - return findIt == method2notification.end() ? nullptr : &findIt->second; - } - - void SetNotificationJsonHandler(const std::string& methodInfo, GenericNotificationJsonHandler handler) - { - method2notification[methodInfo] = handler; - } - - - - std::unique_ptr parseResponseMessage(const std::string&, Reader&); - std::unique_ptr parseRequstMessage(const std::string&, Reader&); - bool resovleResponseMessage(Reader&, std::pair>& result); - std::unique_ptr parseNotificationMessage(const std::string&, Reader&); -}; - diff --git a/graphics/asymptote/LspCpp/LibLsp/JsonRpc/MessageProducer.h b/graphics/asymptote/LspCpp/LibLsp/JsonRpc/MessageProducer.h deleted file mode 100644 index ab7a29a17f..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/JsonRpc/MessageProducer.h +++ /dev/null @@ -1,13 +0,0 @@ -#pragma once -#include -#include - -class MessageProducer -{ -public: - - - typedef std::function< void(std::string&&) > MessageConsumer; - virtual ~MessageProducer() = default; - virtual void listen(MessageConsumer) = 0; -}; diff --git a/graphics/asymptote/LspCpp/LibLsp/JsonRpc/NotificationInMessage.h b/graphics/asymptote/LspCpp/LibLsp/JsonRpc/NotificationInMessage.h deleted file mode 100644 index e4841b5703..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/JsonRpc/NotificationInMessage.h +++ /dev/null @@ -1,62 +0,0 @@ -#pragma once - - -#include "lsRequestId.h" -#include "LibLsp/JsonRpc/message.h" - - - -// NotificationInMessage does not have |id|. -struct NotificationInMessage : public LspMessage { - - Kind GetKid() override - { - return NOTIFICATION_MESSAGE; - } - MethodType GetMethodType() const override - { - return method.c_str(); - } - void SetMethodType(MethodType _t) override - { - method = _t; - } - std::string method; -}; -template -struct lsNotificationInMessage : NotificationInMessage { - - void ReflectWriter(Writer& writer) override { - Reflect(writer, static_cast(*this)); - } - lsNotificationInMessage(MethodType _method) - { - method = _method; - } - - static std::unique_ptr ReflectReader(Reader& visitor) { - - TDerived* temp = new TDerived(); - - std::unique_ptr message = std::unique_ptr(temp); - // Reflect may throw and *message will be partially deserialized. - Reflect(visitor, static_cast(*temp)); - return message; - - } - void swap(lsNotificationInMessage& arg) noexcept - { - method.swap(method); - std::swap(params, arg.params); - } - T params; -}; - -#define DEFINE_NOTIFICATION_TYPE(MSG,paramType,methodInfo)\ -namespace MSG {\ - struct notify : public lsNotificationInMessage< paramType , notify >{\ - static constexpr MethodType kMethodInfo = methodInfo;\ - notify():lsNotificationInMessage(kMethodInfo){} \ - };\ -};\ -MAKE_REFLECT_STRUCT(MSG::notify, jsonrpc,method, params) diff --git a/graphics/asymptote/LspCpp/LibLsp/JsonRpc/RemoteEndPoint.cpp b/graphics/asymptote/LspCpp/LibLsp/JsonRpc/RemoteEndPoint.cpp deleted file mode 100644 index 46f09ec686..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/JsonRpc/RemoteEndPoint.cpp +++ /dev/null @@ -1,612 +0,0 @@ -#include "MessageJsonHandler.h" -#include "Endpoint.h" -#include "message.h" -#include "RemoteEndPoint.h" -#include -#include "Cancellation.h" -#include "StreamMessageProducer.h" -#include "NotificationInMessage.h" -#include "lsResponseMessage.h" -#include "Condition.h" -#include "Context.h" -#include "rapidjson/error/en.h" -#include "json.h" -#include "GCThreadContext.h" -#include "ScopeExit.h" -#include "stream.h" - -#define BOOST_BIND_GLOBAL_PLACEHOLDERS -#include "boost/threadpool.hpp" -#include -namespace lsp { - -// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -// See https://llvm.org/LICENSE.txt for license information. -// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -//===----------------------------------------------------------------------===// - -// Cancellation mechanism for long-running tasks. -// -// This manages interactions between: -// -// 1. Client code that starts some long-running work, and maybe cancels later. -// -// std::pair Task = cancelableTask(); -// { -// WithContext Cancelable(std::move(Task.first)); -// Expected -// deepThoughtAsync([](int answer){ errs() << answer; }); -// } -// // ...some time later... -// if (User.fellAsleep()) -// Task.second(); -// -// (This example has an asynchronous computation, but synchronous examples -// work similarly - the Canceler should be invoked from another thread). -// -// 2. Library code that executes long-running work, and can exit early if the -// result is not needed. -// -// void deepThoughtAsync(std::function Callback) { -// runAsync([Callback]{ -// int A = ponder(6); -// if (getCancelledMonitor()) -// return; -// int B = ponder(9); -// if (getCancelledMonitor()) -// return; -// Callback(A * B); -// }); -// } -// -// (A real example may invoke the callback with an error on cancellation, -// the CancelledError is provided for this purpose). -// -// Cancellation has some caveats: -// - the work will only stop when/if the library code next checks for it. -// Code outside clangd such as Sema will not do this. -// - it's inherently racy: client code must be prepared to accept results -// even after requesting cancellation. -// - it's Context-based, so async work must be dispatched to threads in -// ways that preserve the context. (Like runAsync() or TUScheduler). -// - - /// A canceller requests cancellation of a task, when called. - /// Calling it again has no effect. - using Canceler = std::function; - - // We don't want a cancelable scope to "shadow" an enclosing one. - struct CancelState { - std::shared_ptr> cancelled; - const CancelState* parent = nullptr; - lsRequestId id; - }; - static Key g_stateKey; - - /// Defines a new task whose cancellation may be requested. - /// The returned Context defines the scope of the task. - /// When the context is active, getCancelledMonitor() is 0 until the Canceler is - /// invoked, and equal to Reason afterwards. - /// Conventionally, Reason may be the LSP error code to return. - std::pair cancelableTask(const lsRequestId& id,int reason = 1){ - assert(reason != 0 && "Can't detect cancellation if Reason is zero"); - CancelState state; - state.id = id; - state.cancelled = std::make_shared>(); - state.parent = Context::current().get(g_stateKey); - return { - Context::current().derive(g_stateKey, state), - [reason, cancelled(state.cancelled)] { *cancelled = reason; }, - }; - } - /// If the current context is within a cancelled task, returns the reason. -/// (If the context is within multiple nested tasks, true if any are cancelled). -/// Always zero if there is no active cancelable task. -/// This isn't free (context lookup) - don't call it in a tight loop. - boost::optional getCancelledMonitor(const lsRequestId& id, const Context& ctx = Context::current()){ - for (const CancelState* state = ctx.get(g_stateKey); state != nullptr; - state = state->parent) - { - if (id != state->id)continue; - const std::shared_ptr > cancelled = state->cancelled; - std::function temp = [=]{ - return cancelled->load(); - }; - return std::move(temp); - } - - return {}; - } -} // namespace lsp - -using namespace lsp; -class PendingRequestInfo -{ - using RequestCallBack = std::function< bool(std::unique_ptr) >; -public: - PendingRequestInfo(const std::string& md, - const RequestCallBack& callback); - PendingRequestInfo(const std::string& md); - PendingRequestInfo() {} - std::string method; - RequestCallBack futureInfo; -}; - -PendingRequestInfo::PendingRequestInfo(const std::string& _md, - const RequestCallBack& callback) : method(_md), - futureInfo(callback) -{ -} - -PendingRequestInfo::PendingRequestInfo(const std::string& md) : method(md) -{ -} -struct RemoteEndPoint::Data -{ - explicit Data(lsp::Log& _log , RemoteEndPoint* owner) - : m_id(0), next_request_cookie(0), message_producer(new StreamMessageProducer(*owner)), log(_log) - { - - } - ~Data() - { - delete message_producer; - } - std::atomic m_id; - boost::threadpool::pool tp; - // Method calls may be cancelled by ID, so keep track of their state. - // This needs a mutex: handlers may finish on a different thread, and that's - // when we clean up entries in the map. - mutable std::mutex request_cancelers_mutex; - - std::map< lsRequestId, std::pair > requestCancelers; - - std::atomic next_request_cookie; // To disambiguate reused IDs, see below. - void onCancel(Notify_Cancellation::notify* notify) { - std::lock_guard Lock(request_cancelers_mutex); - const auto it = requestCancelers.find(notify->params.id); - if (it != requestCancelers.end()) - it->second.first(); // Invoke the canceler. - } - - // We run cancelable requests in a context that does two things: - // - allows cancellation using requestCancelers[ID] - // - cleans up the entry in requestCancelers when it's no longer needed - // If a client reuses an ID, the last wins and the first cannot be canceled. - Context cancelableRequestContext(lsRequestId id) { - auto task = cancelableTask(id, - /*Reason=*/static_cast(lsErrorCodes::RequestCancelled)); - unsigned cookie; - { - std::lock_guard Lock(request_cancelers_mutex); - cookie = next_request_cookie.fetch_add(1, std::memory_order_relaxed); - requestCancelers[id] = { std::move(task.second), cookie }; - } - // When the request ends, we can clean up the entry we just added. - // The cookie lets us check that it hasn't been overwritten due to ID - // reuse. - return task.first.derive(lsp::make_scope_exit([this, id, cookie] { - std::lock_guard lock(request_cancelers_mutex); - const auto& it = requestCancelers.find(id); - if (it != requestCancelers.end() && it->second.second == cookie) - requestCancelers.erase(it); - })); - } - - std::map > _client_request_futures; - StreamMessageProducer* message_producer; - std::atomic quit{}; - lsp::Log& log; - std::shared_ptr input; - std::shared_ptr output; - - void pendingRequest(RequestInMessage& info, GenericResponseHandler&& handler) - { - auto id = m_id.fetch_add(1, std::memory_order_relaxed); - info.id.set(id); - std::lock_guard lock(m_requsetInfo); - _client_request_futures[info.id] = std::make_shared(info.method, handler); - - } - const std::shared_ptr getRequestInfo(const lsRequestId& _id) - { - std::lock_guard lock(m_requsetInfo); - auto findIt = _client_request_futures.find(_id); - if (findIt != _client_request_futures.end()) - { - return findIt->second; - } - return nullptr; - } - - std::mutex m_requsetInfo; - void removeRequestInfo(const lsRequestId& _id) - { - std::lock_guard lock(m_requsetInfo); - auto findIt = _client_request_futures.find(_id); - if (findIt != _client_request_futures.end()) - { - _client_request_futures.erase(findIt); - } - } - void clear() - { - { - std::lock_guard lock(m_requsetInfo); - _client_request_futures.clear(); - - } - tp.clear(); - quit.store(true, std::memory_order_relaxed); - } -}; - -namespace -{ -void WriterMsg(std::shared_ptr& output, LspMessage& msg) -{ - const auto& s = msg.ToJson(); - const auto value = - std::string("Content-Length: ") + std::to_string(s.size()) + "\r\n\r\n" + s; - output->write(value); - output->flush(); -} - -bool isResponseMessage(JsonReader& visitor) -{ - - if (!visitor.HasMember("id")) - { - return false; - } - - if (!visitor.HasMember("result") && !visitor.HasMember("error")) - { - return false; - } - - return true; -} - -bool isRequestMessage(JsonReader& visitor) -{ - if (!visitor.HasMember("method")) - { - return false; - } - if (!visitor["method"]->IsString()) - { - return false; - } - if (!visitor.HasMember("id")) - { - return false; - } - return true; -} -bool isNotificationMessage(JsonReader& visitor) -{ - if (!visitor.HasMember("method")) - { - return false; - } - if (!visitor["method"]->IsString()) - { - return false; - } - if (visitor.HasMember("id")) - { - return false; - } - return true; -} -} - -CancelMonitor RemoteEndPoint::getCancelMonitor(const lsRequestId& id) -{ - auto monitor = getCancelledMonitor(id); - if(monitor.has_value()) - { - return monitor.value(); - } - return [] { - return 0; - }; - -} - -RemoteEndPoint::RemoteEndPoint( - const std::shared_ptr < MessageJsonHandler >& json_handler,const std::shared_ptr < Endpoint>& localEndPoint, lsp::Log& _log, uint8_t max_workers): - d_ptr(new Data(_log,this)),jsonHandler(json_handler), local_endpoint(localEndPoint) -{ - jsonHandler->method2notification[Notify_Cancellation::notify::kMethodInfo] = [](Reader& visitor) - { - return Notify_Cancellation::notify::ReflectReader(visitor); - }; - - d_ptr->quit.store(false, std::memory_order_relaxed); - d_ptr->tp.size_controller().resize(max_workers); -} - -RemoteEndPoint::~RemoteEndPoint() -{ - delete d_ptr; - d_ptr->quit.store(true, std::memory_order_relaxed); -} - -bool RemoteEndPoint::dispatch(const std::string& content) -{ - rapidjson::Document document; - document.Parse(content.c_str(), content.length()); - if (document.HasParseError()) - { - std::string info ="lsp msg format error:"; - rapidjson::GetParseErrorFunc GetParseError = rapidjson::GetParseError_En; // or whatever - info+= GetParseError(document.GetParseError()); - info += "\n"; - info += "ErrorContext offset:\n"; - info += content.substr(document.GetErrorOffset()); - d_ptr->log.log(Log::Level::SEVERE, info); - - return false; - } - - JsonReader visitor{ &document }; - if (!visitor.HasMember("jsonrpc") || - std::string(visitor["jsonrpc"]->GetString()) != "2.0") - { - std::string reason; - reason = "Reason:Bad or missing jsonrpc version\n"; - reason += "content:\n" + content; - d_ptr->log.log(Log::Level::SEVERE, reason); - return false; - - } - LspMessage::Kind _kind = LspMessage::NOTIFICATION_MESSAGE; - try { - if (isRequestMessage(visitor)) - { - _kind = LspMessage::REQUEST_MESSAGE; - auto msg = jsonHandler->parseRequstMessage(visitor["method"]->GetString(), visitor); - if (msg) { - mainLoop(std::move(msg)); - } - else { - std::string info = "Unknown support request message when consumer message:\n"; - info += content; - d_ptr->log.log(Log::Level::WARNING, info); - return false; - } - } - else if (isResponseMessage(visitor)) - { - _kind = LspMessage::RESPONCE_MESSAGE; - lsRequestId id; - ReflectMember(visitor, "id", id); - - auto msgInfo = d_ptr->getRequestInfo(id); - if (!msgInfo) - { - std::pair> result; - auto b = jsonHandler->resovleResponseMessage(visitor, result); - if (b) - { - result.second->SetMethodType(result.first.c_str()); - mainLoop(std::move(result.second)); - } - else - { - std::string info = "Unknown response message :\n"; - info += content; - d_ptr->log.log(Log::Level::INFO, info); - } - } - else - { - - auto msg = jsonHandler->parseResponseMessage(msgInfo->method, visitor); - if (msg) { - mainLoop(std::move(msg)); - } - else - { - std::string info = "Unknown response message :\n"; - info += content; - d_ptr->log.log(Log::Level::SEVERE, info); - return false; - } - - } - } - else if (isNotificationMessage(visitor)) - { - auto msg = jsonHandler->parseNotificationMessage(visitor["method"]->GetString(), visitor); - if (!msg) - { - std::string info = "Unknown notification message :\n"; - info += content; - d_ptr->log.log(Log::Level::SEVERE, info); - return false; - } - mainLoop(std::move(msg)); - } - else - { - std::string info = "Unknown lsp message when consumer message:\n"; - info += content; - d_ptr->log.log(Log::Level::WARNING, info); - return false; - } - } - catch (std::exception& e) - { - - std::string info = "Exception when process "; - if(_kind==LspMessage::REQUEST_MESSAGE) - { - info += "request"; - } - if (_kind == LspMessage::RESPONCE_MESSAGE) - { - info += "response"; - } - else - { - info += "notification"; - } - info += " message:\n"; - info += e.what(); - std::string reason = "Reason:" + info + "\n"; - reason += "content:\n" + content; - d_ptr->log.log(Log::Level::SEVERE, reason); - return false; - } - return true; -} - - - -void RemoteEndPoint::internalSendRequest( RequestInMessage& info, GenericResponseHandler handler) -{ - std::lock_guard lock(m_sendMutex); - if (!d_ptr->output || d_ptr->output->bad()) - { - std::string desc = "Output isn't good any more:\n"; - d_ptr->log.log(Log::Level::INFO, desc); - return ; - } - d_ptr->pendingRequest(info, std::move(handler)); - WriterMsg(d_ptr->output, info); -} - - -std::unique_ptr RemoteEndPoint::internalWaitResponse(RequestInMessage& request, unsigned time_out) -{ - auto eventFuture = std::make_shared< Condition< LspMessage > >(); - internalSendRequest(request, [=](std::unique_ptr data) - { - eventFuture->notify(std::move(data)); - return true; - }); - return eventFuture->wait(time_out); -} - -void RemoteEndPoint::mainLoop(std::unique_ptrmsg) -{ - if(d_ptr->quit.load(std::memory_order_relaxed)) - { - return; - } - const auto _kind = msg->GetKid(); - if (_kind == LspMessage::REQUEST_MESSAGE) - { - auto req = static_cast(msg.get()); - // Calls can be canceled by the client. Add cancellation context. - WithContext WithCancel(d_ptr->cancelableRequestContext(req->id)); - local_endpoint->onRequest(std::move(msg)); - } - - else if (_kind == LspMessage::RESPONCE_MESSAGE) - { - auto response = static_cast(msg.get()); - auto msgInfo = d_ptr->getRequestInfo(response->id); - if (!msgInfo) - { - const auto _method_desc = msg->GetMethodType(); - local_endpoint->onResponse(_method_desc, std::move(msg)); - } - else - { - bool needLocal = true; - if (msgInfo->futureInfo) - { - if (msgInfo->futureInfo(std::move(msg))) - { - needLocal = false; - } - } - if (needLocal) - { - local_endpoint->onResponse(msgInfo->method, std::move(msg)); - } - d_ptr->removeRequestInfo(response->id); - } - } - else if (_kind == LspMessage::NOTIFICATION_MESSAGE) - { - if (strcmp(Notify_Cancellation::notify::kMethodInfo, msg->GetMethodType())==0) - { - d_ptr->onCancel(static_cast(msg.get())); - } - else - { - local_endpoint->notify(std::move(msg)); - } - - } - else - { - std::string info = "Unknown lsp message when process message in mainLoop:\n"; - d_ptr->log.log(Log::Level::WARNING, info); - } -} - -void RemoteEndPoint::handle(std::vector&& issue) -{ - for(auto& it : issue) - { - d_ptr->log.log(it.code, it.text); - } -} - -void RemoteEndPoint::handle(MessageIssue&& issue) -{ - d_ptr->log.log(issue.code, issue.text); -} - - -void RemoteEndPoint::startProcessingMessages(std::shared_ptr r, - std::shared_ptr w) -{ - d_ptr->quit.store(false, std::memory_order_relaxed); - d_ptr->input = r; - d_ptr->output = w; - d_ptr->message_producer->bind(r); - message_producer_thread_ = std::make_shared([&]() - { - d_ptr->message_producer->listen([&](std::string&& content){ - const auto temp = std::make_shared(std::move(content)); - d_ptr->tp.schedule([this, temp]{ -#ifdef USEGC - GCThreadContext gcContext; -#endif - - dispatch(*temp); - }); - }); - }); -} - -void RemoteEndPoint::Stop() -{ - if(message_producer_thread_ && message_producer_thread_->joinable()) - { - message_producer_thread_->detach(); - } - d_ptr->clear(); - -} - -void RemoteEndPoint::sendMsg( LspMessage& msg) -{ - - std::lock_guard lock(m_sendMutex); - if (!d_ptr->output || d_ptr->output->bad()) - { - std::string info = "Output isn't good any more:\n"; - d_ptr->log.log(Log::Level::INFO, info); - return; - } - WriterMsg(d_ptr->output, msg); - -} diff --git a/graphics/asymptote/LspCpp/LibLsp/JsonRpc/RemoteEndPoint.h b/graphics/asymptote/LspCpp/LibLsp/JsonRpc/RemoteEndPoint.h deleted file mode 100644 index 3ae6b567a5..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/JsonRpc/RemoteEndPoint.h +++ /dev/null @@ -1,340 +0,0 @@ -#pragma once -#include "LibLsp/lsp/lsp_diagnostic.h" -#include "LibLsp/JsonRpc/Cancellation.h" -#include "LibLsp/JsonRpc/lsResponseMessage.h" -#include "LibLsp/JsonRpc/RequestInMessage.h" -#include "LibLsp/JsonRpc/NotificationInMessage.h" -#include "traits.h" -#include -#include -#include "threaded_queue.h" -#include -#include "MessageIssue.h" -#include "LibLsp/JsonRpc/MessageJsonHandler.h" -#include "Endpoint.h" - - -class MessageJsonHandler; -class Endpoint; -struct LspMessage; -class RemoteEndPoint; -namespace lsp { - class ostream; - class istream; - - //////////////////////////////////////////////////////////////////////////////// - // ResponseOrError - //////////////////////////////////////////////////////////////////////////////// - - // ResponseOrError holds either the response to a request or an error - // message. - template - struct ResponseOrError { - using Request = T; - ResponseOrError(); - ResponseOrError(const T& response); - ResponseOrError(T&& response); - ResponseOrError(const Rsp_Error& error); - ResponseOrError(Rsp_Error&& error); - ResponseOrError(const ResponseOrError& other); - ResponseOrError(ResponseOrError&& other) noexcept; - - ResponseOrError& operator=(const ResponseOrError& other); - ResponseOrError& operator=(ResponseOrError&& other) noexcept; - bool IsError() const { return is_error; } - std::string ToJson() - { - if (is_error) return error.ToJson(); - return response.ToJson(); - } - T response; - Rsp_Error error; // empty represents success. - bool is_error; - }; - - template - ResponseOrError::ResponseOrError(): is_error(false) - { - } - - template - ResponseOrError::ResponseOrError(const T& resp) : response(resp), is_error(false) {} - template - ResponseOrError::ResponseOrError(T&& resp) : response(std::move(resp)), is_error(false) {} - template - ResponseOrError::ResponseOrError(const Rsp_Error& err) : error(err), is_error(true) {} - template - ResponseOrError::ResponseOrError(Rsp_Error&& err) : error(std::move(err)), is_error(true) {} - template - ResponseOrError::ResponseOrError(const ResponseOrError& other) - : response(other.response), error(other.error), is_error(other.is_error) {} - template - ResponseOrError::ResponseOrError(ResponseOrError&& other) noexcept - : response(std::move(other.response)), error(std::move(other.error)), is_error(other.is_error) {} - template - ResponseOrError& ResponseOrError::operator=( - const ResponseOrError& other) { - response = other.response; - error = other.error; - is_error = other.is_error; - return *this; - } - template - ResponseOrError& ResponseOrError::operator=(ResponseOrError&& other) noexcept - { - response = std::move(other.response); - error = std::move(other.error); - is_error = other.is_error; - return *this; - } - -} - - -class RemoteEndPoint :MessageIssueHandler -{ - - template - using ParamType = lsp::traits::ParameterType; - - template - using IsRequest = lsp::traits::EnableIfIsType; - - template - using IsResponse = lsp::traits::EnableIfIsType; - - template - using IsNotify = lsp::traits::EnableIfIsType; - - - template - using IsRequestHandler = lsp::traits::EnableIf>:: - value>; - - template - using IsRequestHandlerWithMonitor = lsp::traits::EnableIf>:: - value>; - -public: - - - RemoteEndPoint(const std::shared_ptr & json_handler, - const std::shared_ptr < Endpoint >& localEndPoint, - lsp::Log& _log, uint8_t max_workers = 2); - - ~RemoteEndPoint() override; - template , typename ResponseType = typename RequestType::Response> - IsRequestHandler< F, lsp::ResponseOrError > registerHandler(F&& handler) - { - ProcessRequestJsonHandler(handler); - local_endpoint->registerRequestHandler(RequestType::kMethodInfo, [=](std::unique_ptr msg) { - auto req = reinterpret_cast(msg.get()); - lsp::ResponseOrError res(handler(*req)); - if (res.is_error) { - res.error.id = req->id; - send(res.error); - } - else - { - res.response.id = req->id; - send(res.response); - } - return true; - }); - } - template , typename ResponseType = typename RequestType::Response> - IsRequestHandlerWithMonitor< F, lsp::ResponseOrError > registerHandler(F&& handler) { - ProcessRequestJsonHandler(handler); - local_endpoint->registerRequestHandler(RequestType::kMethodInfo, [=](std::unique_ptr msg) { - auto req = static_cast(msg.get()); - lsp::ResponseOrError res(handler(*req , getCancelMonitor(req->id))); - if (res.is_error) { - res.error.id = req->id; - send(res.error); - } - else - { - res.response.id = req->id; - send(res.response); - } - return true; - }); - } - using RequestErrorCallback = std::function; - - template > - void send(T& request, F&& handler, RequestErrorCallback onError) - { - ProcessRequestJsonHandler(handler); - auto cb = [=](std::unique_ptr msg) { - if (!msg) - return true; - const auto result = msg.get(); - - if (static_cast(result)->IsErrorType()) { - const auto rsp_error = static_cast(result); - onError(*rsp_error); - } - else { - handler(*static_cast(result)); - } - - return true; - }; - internalSendRequest(request, cb); - } - - - template > - IsNotify registerHandler(F&& handler) { - { - std::lock_guard lock(m_sendMutex); - if (!jsonHandler->GetNotificationJsonHandler(NotifyType::kMethodInfo)) - { - jsonHandler->SetNotificationJsonHandler(NotifyType::kMethodInfo, - [](Reader& visitor) - { - return NotifyType::ReflectReader(visitor); - }); - } - } - local_endpoint->registerNotifyHandler(NotifyType::kMethodInfo, [=](std::unique_ptr msg) { - handler(*static_cast(msg.get())); - return true; - }); - } - - template > - std::future< lsp::ResponseOrError > send(T& request) { - - ProcessResponseJsonHandler(request); - using Response = typename T::Response; - auto promise = std::make_shared< std::promise>>(); - auto cb = [=](std::unique_ptr msg) { - if (!msg) - return true; - auto result = msg.get(); - - if (reinterpret_cast(result)->IsErrorType()) - { - Rsp_Error* rsp_error = static_cast(result); - Rsp_Error temp; - std::swap(temp, *rsp_error); - promise->set_value(std::move(lsp::ResponseOrError(std::move(temp)))); - } - else - { - Response temp; - std::swap(temp, *static_cast(result)); - promise->set_value(std::move(lsp::ResponseOrError(std::move(temp)))); - } - return true; - }; - internalSendRequest(request, cb); - return promise->get_future(); - } - - template > - std::unique_ptr> waitResponse(T& request, const unsigned time_out = 0) - { - auto future_rsp = send(request); - if (time_out == 0) - { - future_rsp.wait(); - } - else - { - auto state = future_rsp.wait_for(std::chrono::milliseconds(time_out)); - if (std::future_status::timeout == state) - { - return {}; - } - } - - using Response = typename T::Response; - return std::make_unique>(std::move(future_rsp.get())); - } - - void send(NotificationInMessage& msg) - { - sendMsg(msg); - } - - void send(ResponseInMessage& msg) - { - sendMsg(msg); - } - - void sendNotification(NotificationInMessage& msg) - { - send(msg); - } - void sendResponse(ResponseInMessage& msg) - { - send(msg); - } - void startProcessingMessages(std::shared_ptr r, - std::shared_ptr w); - - bool IsWorking() const - { - if (message_producer_thread_) - return true; - return false; - } - void Stop(); - - std::unique_ptr internalWaitResponse(RequestInMessage&, unsigned time_out = 0); - - void internalSendRequest(RequestInMessage&, GenericResponseHandler); - - void handle(std::vector&&) override; - void handle(MessageIssue&&) override; -private: - CancelMonitor getCancelMonitor(const lsRequestId&); - void sendMsg(LspMessage& msg); - void mainLoop(std::unique_ptr); - bool dispatch(const std::string&); - template > - IsRequest ProcessRequestJsonHandler(const F& handler) { - std::lock_guard lock(m_sendMutex); - if (!jsonHandler->GetRequestJsonHandler(RequestType::kMethodInfo)) - { - jsonHandler->SetRequestJsonHandler(RequestType::kMethodInfo, - [](Reader& visitor) - { - return RequestType::ReflectReader(visitor); - }); - } - } - template > - void ProcessResponseJsonHandler(T& request) - { - using Response = typename T::Response; - std::lock_guard lock(m_sendMutex); - if (!jsonHandler->GetResponseJsonHandler(T::kMethodInfo)) - { - jsonHandler->SetResponseJsonHandler(T::kMethodInfo, [](Reader& visitor) - { - if (visitor.HasMember("error")) - return Rsp_Error::ReflectReader(visitor); - return Response::ReflectReader(visitor); - }); - } - } - - struct Data; - - Data* d_ptr; - - std::shared_ptr < MessageJsonHandler> jsonHandler; - std::mutex m_sendMutex; - - std::shared_ptr < Endpoint > local_endpoint; -public: - std::shared_ptr < std::thread > message_producer_thread_; -}; diff --git a/graphics/asymptote/LspCpp/LibLsp/JsonRpc/RequestInMessage.h b/graphics/asymptote/LspCpp/LibLsp/JsonRpc/RequestInMessage.h deleted file mode 100644 index 163d038a2e..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/JsonRpc/RequestInMessage.h +++ /dev/null @@ -1,70 +0,0 @@ -#pragma once - - -#include "serializer.h" -#include -#include -#include "lsRequestId.h" -#include "LibLsp/JsonRpc/message.h" -#include "LibLsp/lsp/method_type.h" -#include "lsResponseMessage.h" - -struct RequestInMessage : public LspMessage { - // number or string, actually no null - lsRequestId id; - std::string method; - Kind GetKid() override - { - return REQUEST_MESSAGE; - } - -}; - - - -template -struct lsRequest : public RequestInMessage -{ - lsRequest(MethodType _method) - { - method = _method; - } - MethodType GetMethodType() const override { return method.c_str(); } - void SetMethodType(MethodType _method) override - { - method = _method; - } \ - void ReflectWriter(Writer& writer) override { - Reflect(writer, static_cast(*this)); - } - - static std::unique_ptr ReflectReader(Reader& visitor) { - - TDerived* temp = new TDerived(); - std::unique_ptr message = std::unique_ptr(temp); - // Reflect may throw and *message will be partially deserialized. - Reflect(visitor, static_cast(*temp)); - return message; - } - void swap(lsRequest& arg) noexcept - { - id.swap(arg.id); - method.swap(method); - std::swap(params, arg.params); - } - T params; -}; - - -#define DEFINE_REQUEST_RESPONSE_TYPE(MSG,request_param,response_result,methodInfo)\ -namespace MSG {\ - struct response :public ResponseMessage< response_result, response> {}; \ - struct request : public lsRequest< request_param , request >{\ - static constexpr MethodType kMethodInfo = methodInfo;\ - request():lsRequest(kMethodInfo){} \ - using Response = response;\ - };\ -};\ -MAKE_REFLECT_STRUCT(MSG::request, jsonrpc, id, method, params);\ -MAKE_REFLECT_STRUCT(MSG::response, jsonrpc, id, result); - diff --git a/graphics/asymptote/LspCpp/LibLsp/JsonRpc/ScopeExit.h b/graphics/asymptote/LspCpp/LibLsp/JsonRpc/ScopeExit.h deleted file mode 100644 index 024b700b4a..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/JsonRpc/ScopeExit.h +++ /dev/null @@ -1,59 +0,0 @@ -//===- llvm/ADT/ScopeExit.h - Execute code at scope exit --------*- C++ -*-===// -// -// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -// See https://llvm.org/LICENSE.txt for license information. -// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -// -//===----------------------------------------------------------------------===// -// -// This file defines the make_scope_exit function, which executes user-defined -// cleanup logic at scope exit. -// -//===----------------------------------------------------------------------===// -#pragma once -#include -#include - -namespace lsp { -namespace detail { - -template class scope_exit { - Callable ExitFunction; - bool Engaged = true; // False once moved-from or release()d. - -public: - template - explicit scope_exit(Fp &&F) : ExitFunction(std::forward(F)) {} - - scope_exit(scope_exit &&Rhs) - : ExitFunction(std::move(Rhs.ExitFunction)), Engaged(Rhs.Engaged) { - Rhs.release(); - } - scope_exit(const scope_exit &) = delete; - scope_exit &operator=(scope_exit &&) = delete; - scope_exit &operator=(const scope_exit &) = delete; - - void release() { Engaged = false; } - - ~scope_exit() { - if (Engaged) - ExitFunction(); - } -}; - -} // end namespace detail - -// Keeps the callable object that is passed in, and execute it at the -// destruction of the returned object (usually at the scope exit where the -// returned object is kept). -// -// Interface is specified by p0052r2. -template - detail::scope_exit::type> -make_scope_exit(Callable &&F) { - return detail::scope_exit::type>( - std::forward(F)); -} - -} // end namespace lsp - diff --git a/graphics/asymptote/LspCpp/LibLsp/JsonRpc/StreamMessageProducer.cpp b/graphics/asymptote/LspCpp/LibLsp/JsonRpc/StreamMessageProducer.cpp deleted file mode 100644 index c9df407980..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/JsonRpc/StreamMessageProducer.cpp +++ /dev/null @@ -1,191 +0,0 @@ - -#include "StreamMessageProducer.h" -#include - -#include "stream.h" - - -bool StartsWith(std::string value, std::string start); -bool StartsWith(std::string value, std::string start) { - if (start.size() > value.size()) - return false; - return std::equal(start.begin(), start.end(), value.begin()); -} - -using namespace std; -namespace -{ - string JSONRPC_VERSION = "2.0"; - string CONTENT_LENGTH_HEADER = "Content-Length"; - string CONTENT_TYPE_HEADER = "Content-Type"; - string JSON_MIME_TYPE = "application/json"; - string CRLF = "\r\n"; - -} - - void StreamMessageProducer::parseHeader(std::string& line, StreamMessageProducer::Headers& headers) - { - int sepIndex = line.find(':'); - if (sepIndex >= 0) { - auto key = line.substr(0, sepIndex); - if(key == CONTENT_LENGTH_HEADER) - { - headers.contentLength = atoi(line.substr(sepIndex + 1).data()); - } - else if(key == CONTENT_TYPE_HEADER) - { - int charsetIndex = line.find("charset="); - if (charsetIndex >= 0) - headers.charset = line.substr(charsetIndex + 8); - } - } - } - - -void StreamMessageProducer::listen(MessageConsumer callBack) -{ - if(!input) - return; - - keepRunning = true; - bool newLine = false; - Headers headers; - string headerBuilder ; - string debugBuilder ; - // Read the content length. It is terminated by the "\r\n" sequence. - while (keepRunning) - { - if(input->bad()) - { - std::string info = "Input stream is bad."; - auto what = input->what(); - if (what.size()) - { - info += "Reason:"; - info += input->what(); - } - MessageIssue issue(info, lsp::Log::Level::SEVERE); - issueHandler.handle(std::move(issue)); - return; - } - if(input->fail()) - { - std::string info = "Input fail."; - auto what = input->what(); - if(what.size()) - { - info += "Reason:"; - info += input->what(); - } - MessageIssue issue(info, lsp::Log::Level::WARNING); - issueHandler.handle(std::move(issue)); - if(input->need_to_clear_the_state()) - input->clear(); - else - { - return; - } - } - int c = input->get(); - if (c == EOF) { - // End of input stream has been reached - keepRunning = false; - } - else - { - - debugBuilder.push_back((char)c); - if (c == '\n') - { - if (newLine) { - // Two consecutive newlines have been read, which signals the start of the message content - if (headers.contentLength <= 0) - { - string info = "Unexpected token:" + debugBuilder; - info = +" (expected Content-Length: sequence);"; - MessageIssue issue(info, lsp::Log::Level::WARNING); - issueHandler.handle(std::move(issue)); - } - else { - bool result = handleMessage(headers,callBack); - if (!result) - keepRunning = false; - newLine = false; - } - headers.clear(); - debugBuilder.clear(); - } - else if (!headerBuilder.empty()) { - // A single newline ends a header line - parseHeader(headerBuilder, headers); - headerBuilder.clear(); - } - newLine = true; - } - else if (c != '\r') { - // Add the input to the current header line - - headerBuilder.push_back((char)c); - newLine = false; - } - } - } - -} - -void StreamMessageProducer::bind(std::shared_ptr_in) -{ - input = _in; -} - -bool StreamMessageProducer::handleMessage(Headers& headers ,MessageConsumer callBack) -{ - // Read content. - auto content_length = headers.contentLength; - std::string content(content_length,0); - auto data = &content[0]; - input->read(data, content_length); - if (input->bad()) - { - std::string info = "Input stream is bad."; - auto what = input->what(); - if (!what.empty()) - { - info += "Reason:"; - info += input->what(); - } - MessageIssue issue(info, lsp::Log::Level::SEVERE); - issueHandler.handle(std::move(issue)); - return false; - } - - if (input->eof()) - { - MessageIssue issue("No more input when reading content body", lsp::Log::Level::INFO); - issueHandler.handle(std::move(issue)); - return false; - } - if (input->fail()) - { - std::string info = "Input fail."; - auto what = input->what(); - if (!what.empty()) - { - info += "Reason:"; - info += input->what(); - } - MessageIssue issue(info, lsp::Log::Level::WARNING); - issueHandler.handle(std::move(issue)); - if (input->need_to_clear_the_state()) - input->clear(); - else - { - return false; - } - } - - callBack(std::move(content)); - - return true; -} - diff --git a/graphics/asymptote/LspCpp/LibLsp/JsonRpc/StreamMessageProducer.h b/graphics/asymptote/LspCpp/LibLsp/JsonRpc/StreamMessageProducer.h deleted file mode 100644 index 439a9f1b0e..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/JsonRpc/StreamMessageProducer.h +++ /dev/null @@ -1,48 +0,0 @@ -#pragma once -#include -#include -#include "MessageProducer.h" -#include -#include -#include "MessageIssue.h" - -namespace lsp { - class istream; -} - -class StreamMessageProducer : public MessageProducer -{ -public: - struct Headers - { - int contentLength = -1; - std::string charset; - void clear() - { - contentLength = -1; - charset.clear(); - } - }; - bool handleMessage(Headers& headers, MessageConsumer callBack); - StreamMessageProducer( - MessageIssueHandler& message_issue_handler, std::shared_ptr < lsp::istream> _input) - : issueHandler(message_issue_handler), - input(_input) - { - } - StreamMessageProducer( - MessageIssueHandler& message_issue_handler) - : issueHandler(message_issue_handler) - { - } - - bool keepRunning = false; - void listen(MessageConsumer) override; - void bind(std::shared_ptr < lsp::istream>); - void parseHeader(std::string& line, Headers& headers); -private: - MessageIssueHandler& issueHandler; - std::shared_ptr < lsp::istream> input; - - -}; diff --git a/graphics/asymptote/LspCpp/LibLsp/JsonRpc/TcpServer.cpp b/graphics/asymptote/LspCpp/LibLsp/JsonRpc/TcpServer.cpp deleted file mode 100644 index 9188356473..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/JsonRpc/TcpServer.cpp +++ /dev/null @@ -1,299 +0,0 @@ -// -// server.cpp - -#include "TcpServer.h" -#include -#include -#include - -#include "MessageIssue.h" -#include "stream.h" - - -namespace lsp { - struct tcp_connect_session; - - - class tcp_stream_wrapper :public istream, public ostream - { - public: - tcp_stream_wrapper(tcp_connect_session& _w); - - tcp_connect_session& session; - std::atomic quit{}; - std::shared_ptr < MultiQueueWaiter> request_waiter; - ThreadedQueue< char > on_request; - std::string error_message; - - - bool fail() override - { - return bad(); - } - - - - bool eof() override - { - return bad(); - } - bool good() override - { - return !bad(); - } - tcp_stream_wrapper& read(char* str, std::streamsize count) - override - { - auto some = on_request.TryDequeueSome(static_cast( count )); - for (size_t i = 0; i < some.size(); ++i) - { - str[i] = some[i]; - } - for (std::streamsize i = 0; i < count; ++i) - { - str[i] = static_cast(get()); - } - - return *this; - } - int get() override - { - return on_request.Dequeue(); - } - - bool bad() override; - - tcp_stream_wrapper& write(const std::string& c) override; - - tcp_stream_wrapper& write(std::streamsize _s) override; - - tcp_stream_wrapper& flush() override - { - return *this; - } - void reset_state() - { - return; - } - - void clear() override - { - - } - - std::string what() override; - bool need_to_clear_the_state() override - { - return false; - } - }; - struct tcp_connect_session:std::enable_shared_from_this - { - /// Buffer for incoming data. - std::array buffer_; - boost::asio::ip::tcp::socket socket_; - /// Strand to ensure the connection's handlers are not called concurrently. - boost::asio::io_context::strand strand_; - std::shared_ptr proxy_; - explicit tcp_connect_session(boost::asio::io_context& io_context, boost::asio::ip::tcp::socket&& _socket) - : socket_(std::move(_socket)), strand_(io_context), proxy_(new tcp_stream_wrapper(*this)) - { - do_read(); - } - void do_write(const std::string& data) - { - socket_.async_write_some(boost::asio::buffer(data.data(), data.size()), - boost::asio::bind_executor(strand_,[this](boost::system::error_code ec, std::size_t n) - { - if (!ec) - { - return; - } - proxy_->error_message = ec.message(); - - })); - } - void do_read() - { - socket_.async_read_some(boost::asio::buffer(buffer_), - boost::asio::bind_executor(strand_, - [this](boost::system::error_code ec, size_t bytes_transferred) - { - if (!ec) - { - std::vector elements(buffer_.data(), buffer_.data() + bytes_transferred); - proxy_->on_request.EnqueueAll(std::move(elements), false); - do_read(); - return; - } - proxy_->error_message = ec.message(); - - })); - } - }; - - tcp_stream_wrapper::tcp_stream_wrapper(tcp_connect_session& _w): session(_w) - { - } - - bool tcp_stream_wrapper::bad() - { - return !session.socket_.is_open(); - } - - tcp_stream_wrapper& tcp_stream_wrapper::write(const std::string& c) - { - session.do_write(c); - return *this; - } - - tcp_stream_wrapper& tcp_stream_wrapper::write(std::streamsize _s) - { - session.do_write(std::to_string(_s)); - return *this; - } - - std::string tcp_stream_wrapper::what() - { - if (error_message.size()) - return error_message; - - if(! session.socket_.is_open()) - { - return "Socket is not open."; - } - return {}; - } - - struct TcpServer::Data - { - Data( - lsp::Log& log, uint32_t _max_workers) : - acceptor_(io_context_), _log(log) - { - } - - ~Data() - { - - } - /// The io_context used to perform asynchronous operations. - boost::asio::io_context io_context_; - - std::shared_ptr work; - - std::shared_ptr _connect_session; - /// Acceptor used to listen for incoming connections. - boost::asio::ip::tcp::acceptor acceptor_; - - lsp::Log& _log; - - }; - - TcpServer::~TcpServer() - { - delete d_ptr; - } - - TcpServer::TcpServer(const std::string& address, const std::string& port, - std::shared_ptr < MessageJsonHandler> json_handler, - std::shared_ptr < Endpoint> localEndPoint, lsp::Log& log, uint32_t _max_workers) - : point(json_handler, localEndPoint, log, _max_workers),d_ptr(new Data( log, _max_workers)) - - { - - d_ptr->work = std::make_shared(d_ptr->io_context_); - - // Open the acceptor with the option to reuse the address (i.e. SO_REUSEADDR). - boost::asio::ip::tcp::resolver resolver(d_ptr->io_context_); - boost::asio::ip::tcp::endpoint endpoint = - *resolver.resolve(address, port).begin(); - d_ptr->acceptor_.open(endpoint.protocol()); - d_ptr->acceptor_.set_option(boost::asio::ip::tcp::acceptor::reuse_address(true)); - try - { - d_ptr->acceptor_.bind(endpoint); - } - catch (boost::system::system_error & e) - { - std::string temp = "Socket Server bind failed."; - d_ptr->_log.log(lsp::Log::Level::INFO , temp + e.what()); - return; - } - d_ptr->acceptor_.listen(); - - do_accept(); - std::string desc = "Socket TcpServer " + address + " " + port + " start."; - d_ptr->_log.log(lsp::Log::Level::INFO, desc); - } - - void TcpServer::run() - { - // The io_context::run() call will block until all asynchronous operations - // have finished. While the TcpServer is running, there is always at least one - // asynchronous operation outstanding: the asynchronous accept call waiting - // for new incoming connections. - d_ptr->io_context_.run(); - - } - - void TcpServer::stop() - { - try - { - if(d_ptr->work) - d_ptr->work.reset(); - - do_stop(); - } - catch (...) - { - } - } - - void TcpServer::do_accept() - { - d_ptr->acceptor_.async_accept( - [this](boost::system::error_code ec, boost::asio::ip::tcp::socket socket) - { - // Check whether the TcpServer was stopped by a signal before this - // completion handler had a chance to run. - if (!d_ptr->acceptor_.is_open()) - { - return; - } - - if (!ec) - { - if(d_ptr->_connect_session) - { - if(d_ptr->_connect_session->socket_.is_open()) - { - std::string desc = "Disconnect previous client " + d_ptr->_connect_session->socket_.local_endpoint().address().to_string(); - d_ptr->_log.log(lsp::Log::Level::INFO, desc); - d_ptr->_connect_session->socket_.close(); - } - - point.Stop(); - } - auto local_point = socket.local_endpoint(); - - std::string desc = ("New client " + local_point.address().to_string() + " connect."); - d_ptr->_log.log(lsp::Log::Level::INFO, desc); - d_ptr->_connect_session = std::make_shared(d_ptr->io_context_,std::move(socket)); - - point.startProcessingMessages(d_ptr->_connect_session->proxy_, d_ptr->_connect_session->proxy_); - do_accept(); - } - }); - } - - void TcpServer::do_stop() - { - d_ptr->acceptor_.close(); - - point.Stop(); - - } - - } // namespace diff --git a/graphics/asymptote/LspCpp/LibLsp/JsonRpc/TcpServer.h b/graphics/asymptote/LspCpp/LibLsp/JsonRpc/TcpServer.h deleted file mode 100644 index e533acf056..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/JsonRpc/TcpServer.h +++ /dev/null @@ -1,40 +0,0 @@ -#pragma once - -#include -#include -#include "RemoteEndPoint.h" - -namespace lsp { - class Log; -} -namespace lsp -{ - /// The top-level class of the HTTP server. - class TcpServer - { - public: - TcpServer(const TcpServer&) = delete; - TcpServer& operator=(const TcpServer&) = delete; - ~TcpServer(); - /// Construct the server to listen on the specified TCP address and port, and - /// serve up files from the given directory. - explicit TcpServer(const std::string& address, const std::string& port, - std::shared_ptr < MessageJsonHandler> json_handler, - std::shared_ptr < Endpoint> localEndPoint, lsp::Log& ,uint32_t _max_workers = 2); - - /// Run the server's io_context loop. - void run(); - void stop(); - - RemoteEndPoint point; - private: - struct Data; - /// Perform an asynchronous accept operation. - void do_accept(); - - /// Wait for a request to stop the server. - void do_stop(); - Data* d_ptr = nullptr; - }; -} // namespace - diff --git a/graphics/asymptote/LspCpp/LibLsp/JsonRpc/WebSocketServer.cpp b/graphics/asymptote/LspCpp/LibLsp/JsonRpc/WebSocketServer.cpp deleted file mode 100644 index 2cb83099c3..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/JsonRpc/WebSocketServer.cpp +++ /dev/null @@ -1,341 +0,0 @@ -#include "MessageIssue.h" -#include "WebSocketServer.h" -#include -#include -#include -#include "stream.h" -#include -#include -#include -namespace beast = boost::beast; // from -namespace http = beast::http; // from -namespace websocket = beast::websocket; // from -namespace net = boost::asio; // from -using tcp = boost::asio::ip::tcp; // from -namespace lsp { - - // Echoes back all received WebSocket messages - class server_session : public std::enable_shared_from_this - { - websocket::stream ws_; - - beast::flat_buffer buffer_; - std::string user_agent_; - public: - std::shared_ptr proxy_; - // Take ownership of the socket - explicit - server_session(tcp::socket&& socket,const std::string& user_agent) - : ws_(std::move(socket)),user_agent_(user_agent) - { - proxy_ = std::make_shared(ws_); - } - - // Get on the correct executor - void - run() - { - // We need to be executing within a strand to perform async operations - // on the I/O objects in this server_session. Although not strictly necessary - // for single-threaded contexts, this example code is written to be - // thread-safe by default. - net::dispatch(ws_.get_executor(), - beast::bind_front_handler( - &server_session::on_run, - shared_from_this())); - } - - // Start the asynchronous operation - void - on_run() - { - // Set suggested timeout settings for the websocket - ws_.set_option( - websocket::stream_base::timeout::suggested( - beast::role_type::server)); - - // Set a decorator to change the Server of the handshake - ws_.set_option(websocket::stream_base::decorator( - [=](websocket::response_type& res) - { - res.set(http::field::server, user_agent_.c_str()); - })); - // Accept the websocket handshake - ws_.async_accept( - beast::bind_front_handler( - &server_session::on_accept, - shared_from_this())); - } - - void - on_accept(beast::error_code ec) - { - if (ec) - return ; - - // Read a message - // Read a message into our buffer - ws_.async_read( - buffer_, - beast::bind_front_handler( - &server_session::on_read, - shared_from_this())); - } - - - - void - on_read( - beast::error_code ec, - std::size_t bytes_transferred) - { - - if(!ec) - { - char* data = reinterpret_cast(buffer_.data().data()); - std::vector elements(data, data + bytes_transferred); - - buffer_.clear(); - proxy_->on_request.EnqueueAll(std::move(elements), false); - - // Read a message into our buffer - ws_.async_read( - buffer_, - beast::bind_front_handler( - &server_session::on_read, - shared_from_this())); - return; - } - if (ec){ - proxy_->error_message = ec.message(); - } - } - - - - void close() - { - if(ws_.is_open()) - { - boost::system::error_code ec; - ws_.close(websocket::close_code::normal, ec); - } - - } - }; - - //------------------------------------------------------------------------------ - - struct WebSocketServer::Data - { - Data(const std::string& user_agent, lsp::Log& log) : - acceptor_(io_context_), user_agent_(user_agent), _log(log) - - { - } - - ~Data() - { - - } - /// The io_context used to perform asynchronous operations. - boost::asio::io_context io_context_; - - std::shared_ptr work; - - /// Acceptor used to listen for incoming connections. - boost::asio::ip::tcp::acceptor acceptor_; - - std::shared_ptr < server_session> _server_session; - - std::string user_agent_; - lsp::Log& _log; - - }; - - websocket_stream_wrapper::websocket_stream_wrapper(boost::beast::websocket::stream& _w): - ws_(_w), request_waiter(new MultiQueueWaiter()), - on_request(request_waiter) - { - } - - bool websocket_stream_wrapper::fail() - { - return bad(); - } - - bool websocket_stream_wrapper::eof() - { - return bad(); - } - - bool websocket_stream_wrapper::good() - { - return !bad(); - } - - websocket_stream_wrapper& websocket_stream_wrapper::read(char* str, std::streamsize count) - { - auto some = on_request.TryDequeueSome(static_cast(count)); - - for (size_t i = 0; i < some.size(); ++i) - { - str[i] = some[i]; - } - for (std::streamsize i = 0; i < count; ++i) - { - str[i] = static_cast(get()); - } - return *this; - } - - int websocket_stream_wrapper::get() - { - return on_request.Dequeue(); - } - - bool websocket_stream_wrapper::bad() - { - return !ws_.next_layer().socket().is_open(); - } - - websocket_stream_wrapper& websocket_stream_wrapper::write(const std::string& c) - { - ws_.write(boost::asio::buffer(std::string(c))); - return *this; - } - - - websocket_stream_wrapper& websocket_stream_wrapper::write(std::streamsize _s) - { - std::ostringstream temp; - temp << _s; - ws_.write(boost::asio::buffer(temp.str())); - return *this; - } - - websocket_stream_wrapper& websocket_stream_wrapper::flush() - { - return *this; - } - - void websocket_stream_wrapper::clear() - { - } - - std::string websocket_stream_wrapper::what() - { - if (!error_message.empty()) - return error_message; - - if (!ws_.next_layer().socket().is_open()) - { - return "Socket is not open."; - } - return {}; - } - - WebSocketServer::~WebSocketServer() - { - delete d_ptr; - } - - WebSocketServer::WebSocketServer(const std::string& user_agent, const std::string& address, const std::string& port, - std::shared_ptr < MessageJsonHandler> json_handler, - std::shared_ptr < Endpoint> localEndPoint, lsp::Log& log, uint32_t _max_workers) - : point(json_handler,localEndPoint,log, _max_workers),d_ptr(new Data(user_agent,log)) - - { - - d_ptr->work = std::make_shared(d_ptr->io_context_); - - // Open the acceptor with the option to reuse the address (i.e. SO_REUSEADDR). - boost::asio::ip::tcp::resolver resolver(d_ptr->io_context_); - boost::asio::ip::tcp::endpoint endpoint = - *resolver.resolve(address, port).begin(); - d_ptr->acceptor_.open(endpoint.protocol()); - d_ptr->acceptor_.set_option(boost::asio::ip::tcp::acceptor::reuse_address(true)); - try - { - d_ptr->acceptor_.bind(endpoint); - } - catch (boost::system::system_error & e) - { - std::string temp = "Socket Server blid faild."; - d_ptr->_log.log(lsp::Log::Level::INFO , temp + e.what()); - return; - } - d_ptr->acceptor_.listen(); - - do_accept(); - std::string desc = "Socket WebSocketServer " + address + " " + port + " start."; - d_ptr->_log.log(lsp::Log::Level::INFO, desc); - } - - void WebSocketServer::run() - { - // The io_context::run() call will block until all asynchronous operations - // have finished. While the WebSocketServer is running, there is always at least one - // asynchronous operation outstanding: the asynchronous accept call waiting - // for new incoming connections. - d_ptr->io_context_.run(); - - } - - void WebSocketServer::stop() - { - try - { - if(d_ptr->work) - d_ptr->work.reset(); - - do_stop(); - } - catch (...) - { - } - } - - void WebSocketServer::do_accept() - { - d_ptr->acceptor_.async_accept( - [this](boost::system::error_code ec, boost::asio::ip::tcp::socket socket) - { - // Check whether the WebSocketServer was stopped by a signal before this - // completion handler had a chance to run. - if (!d_ptr->acceptor_.is_open()) - { - return; - } - if (!ec) - { - if(d_ptr->_server_session) - { - try - { - d_ptr->_server_session->close(); - point.Stop(); - } - catch (...) - { - } - } - d_ptr->_server_session = std::make_shared(std::move(socket), d_ptr->user_agent_); - d_ptr->_server_session->run(); - - point.startProcessingMessages(d_ptr->_server_session->proxy_, d_ptr->_server_session->proxy_); - do_accept(); - } - - }); - } - - void WebSocketServer::do_stop() - { - d_ptr->acceptor_.close(); - - point.Stop(); - - } - - } // namespace diff --git a/graphics/asymptote/LspCpp/LibLsp/JsonRpc/WebSocketServer.h b/graphics/asymptote/LspCpp/LibLsp/JsonRpc/WebSocketServer.h deleted file mode 100644 index 5206525ceb..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/JsonRpc/WebSocketServer.h +++ /dev/null @@ -1,87 +0,0 @@ -#pragma once - -#include -#include -#include -#include - - -#include "RemoteEndPoint.h" -#include "stream.h" -#include "threaded_queue.h" - -namespace lsp { - class Log; -} - - -namespace lsp -{ - - - - class websocket_stream_wrapper :public istream, public ostream - { - public: - - websocket_stream_wrapper(boost::beast::websocket::stream& _w); - - boost::beast::websocket::stream& ws_; - std::atomic quit{}; - std::shared_ptr < MultiQueueWaiter> request_waiter; - ThreadedQueue< char > on_request; - std::string error_message; - bool fail() override; - - bool eof() override; - - bool good() override; - - websocket_stream_wrapper& read(char* str, std::streamsize count) override; - - int get() override; - - bool bad() override; - - websocket_stream_wrapper& write(const std::string& c) override; - - websocket_stream_wrapper& write(std::streamsize _s) override; - - websocket_stream_wrapper& flush() override; - - void clear() override; - - std::string what() override; - }; - - /// The top-level class of the HTTP server. - class WebSocketServer - { - public: - WebSocketServer(const WebSocketServer&) = delete; - WebSocketServer& operator=(const WebSocketServer&) = delete; - ~WebSocketServer(); - /// Construct the server to listen on the specified TCP address and port, and - /// serve up files from the given directory. - explicit WebSocketServer(const std::string& user_agent, const std::string& address, const std::string& port, - std::shared_ptr < MessageJsonHandler> json_handler, - std::shared_ptr < Endpoint> localEndPoint, lsp::Log& ,uint32_t _max_workers = 2); - - /// Run the server's io_context loop. - void run(); - void stop(); - - RemoteEndPoint point; - private: - struct Data; - /// Perform an asynchronous accept operation. - void do_accept(); - - /// Wait for a request to stop the server. - void do_stop(); - Data* d_ptr = nullptr; - - - }; - - } // namespace diff --git a/graphics/asymptote/LspCpp/LibLsp/JsonRpc/json.h b/graphics/asymptote/LspCpp/LibLsp/JsonRpc/json.h deleted file mode 100644 index 98ee91b544..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/JsonRpc/json.h +++ /dev/null @@ -1,81 +0,0 @@ -#pragma once - -#include "serializer.h" - -#include -#include - -class JsonReader : public Reader { - - std::vector path_; - - public: - rapidjson::GenericValue>* m_; - JsonReader(rapidjson::GenericValue>* m) : m_(m) {} - SerializeFormat Format() const override { return SerializeFormat::Json; } - - bool IsBool() override { return m_->IsBool(); } - bool IsNull() override { return m_->IsNull(); } - bool IsArray() override { return m_->IsArray(); } - bool IsInt() override { return m_->IsInt(); } - bool IsInt64() override { return m_->IsInt64(); } - bool IsUint64() override { return m_->IsUint64(); } - bool IsDouble() override { return m_->IsDouble(); } - bool IsNumber() override { return m_->IsNumber(); } - bool IsString() override { return m_->IsString(); } - - void GetNull() override {} - bool GetBool() override { return m_->GetBool(); } - int GetInt() override { return m_->GetInt(); } - uint32_t GetUint32() override { return uint32_t(m_->GetUint64()); } - int64_t GetInt64() override { return m_->GetInt64(); } - uint64_t GetUint64() override { return m_->GetUint64(); } - double GetDouble() override { return m_->GetDouble(); } - std::string GetString() override { return m_->GetString(); } - - bool HasMember(const char* x) override - { - if (m_->IsObject()) - return m_->HasMember(x); - else - return false; - } - std::unique_ptr operator[](const char* x) override { - auto& sub = (*m_)[x]; - return std::unique_ptr(new JsonReader(&sub)); - } - - std::string ToString() const override; - - void IterMap(std::function fn) override; - - void IterArray(std::function fn) override; - - void DoMember(const char* name, std::function fn) override; - - std::string GetPath() const; -}; - -class JsonWriter : public Writer { - - public: - rapidjson::Writer* m_; - - JsonWriter(rapidjson::Writer* m) : m_(m) {} - SerializeFormat Format() const override { return SerializeFormat::Json; } - - void Null() override { m_->Null(); } - void Bool(bool x) override { m_->Bool(x); } - void Int(int x) override { m_->Int(x); } - void Uint32(uint32_t x) override { m_->Uint64(x); } - void Int64(int64_t x) override { m_->Int64(x); } - void Uint64(uint64_t x) override { m_->Uint64(x); } - void Double(double x) override { m_->Double(x); } - void String(const char* x) override { m_->String(x); } - void String(const char* x, size_t len) override { m_->String(x, len); } - void StartArray(size_t) override { m_->StartArray(); } - void EndArray() override { m_->EndArray(); } - void StartObject() override { m_->StartObject(); } - void EndObject() override { m_->EndObject(); } - void Key(const char* name) override { m_->Key(name); } -}; diff --git a/graphics/asymptote/LspCpp/LibLsp/JsonRpc/lsRequestId.h b/graphics/asymptote/LspCpp/LibLsp/JsonRpc/lsRequestId.h deleted file mode 100644 index 87e94669ab..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/JsonRpc/lsRequestId.h +++ /dev/null @@ -1,51 +0,0 @@ -#pragma once - -#include "LibLsp/JsonRpc/serializer.h" - -struct lsRequestId { - // The client can send the request id as an int or a string. We should output - // the same format we received. - enum Type { kNone, kInt, kString }; - Type type = kNone; - - int value = -1; - std::string k_string; - bool has_value() const { return type != kNone; } - void swap(lsRequestId& arg) noexcept - { - std::swap(arg, *this); - } - void set(int v) - { - value = v; - type = kInt; - } - void set(const std::string& v) - { - k_string = v; - type = kString; - } - bool operator==(const lsRequestId& rhs) const - { - if (type != rhs.type) return false; - if (type == kInt) - return value == rhs.value; - return k_string == rhs.k_string; - } - bool operator!=(const lsRequestId& rhs) const - { - return !operator==(rhs); - } - bool operator<(const lsRequestId& rhs) const - { - if (type != rhs.type) return false; - if (type == kInt) - return value < rhs.value; - return k_string < rhs.k_string; - } -}; -void Reflect(Reader& visitor, lsRequestId& value); -void Reflect(Writer& visitor, lsRequestId& value); - -// Debug method to convert an id to a string. -std::string ToString(const lsRequestId& id); \ No newline at end of file diff --git a/graphics/asymptote/LspCpp/LibLsp/JsonRpc/lsResponseMessage.h b/graphics/asymptote/LspCpp/LibLsp/JsonRpc/lsResponseMessage.h deleted file mode 100644 index ba94167cf8..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/JsonRpc/lsResponseMessage.h +++ /dev/null @@ -1,71 +0,0 @@ -#pragma once -#include "serializer.h" -#include "lsRequestId.h" -#include "LibLsp/JsonRpc/message.h" -#include "LibLsp/lsp/method_type.h" - - -struct ResponseInMessage :public LspMessage { - - lsRequestId id; - std::string m_methodType; - - virtual MethodType GetMethodType() const override - { - return m_methodType.data(); - }; - virtual void SetMethodType(MethodType _type) override - { - m_methodType = _type; - }; - - Kind GetKid() override - { - return RESPONCE_MESSAGE; - } - virtual bool IsErrorType() - { - return false; - } -}; -template -struct BaseResponseMessage : ResponseInMessage { - - void ReflectWriter(Writer& writer) override { - Reflect(writer, static_cast(*this)); - } - static std::unique_ptr ReflectReader(Reader& visitor) { - - TDerived* temp = new TDerived(); - std::unique_ptr message = std::unique_ptr(temp); - // Reflect may throw and *message will be partially deserialized. - Reflect(visitor, static_cast(*temp)); - return message; - } - -}; - - -template -struct ResponseMessage : BaseResponseMessage { - T result; - void swap(ResponseMessage& arg) noexcept - { - std::swap(result, arg.result); - this->id.swap(arg.id); - this->m_methodType.swap(arg.m_methodType); - } -}; - -template -struct ResponseError : BaseResponseMessage { - T error; - bool IsErrorType() override { return true; } - void swap(ResponseError& arg) noexcept - { - - this->id.swap(arg.id); - this->m_methodType.swap(arg.m_methodType); - std::swap(error, arg.error); - } -}; diff --git a/graphics/asymptote/LspCpp/LibLsp/JsonRpc/message.cpp b/graphics/asymptote/LspCpp/LibLsp/JsonRpc/message.cpp deleted file mode 100644 index e84455402c..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/JsonRpc/message.cpp +++ /dev/null @@ -1,88 +0,0 @@ -#include "message.h" -#include -#include -#include "serializer.h" -#include "lsRequestId.h" -#include "RequestInMessage.h" -#include "Condition.h" -#include "json.h" - -void LspMessage::Write(std::ostream& out) { - rapidjson::StringBuffer output; - rapidjson::Writer writer(output); - JsonWriter json_writer{ &writer }; - ReflectWriter(json_writer); - - const auto value = std::string("Content-Length: ") + std::to_string(output.GetSize()) + "\r\n\r\n" + output.GetString(); - out << value; - out.flush(); -} - -std::string LspMessage::ToJson() { - rapidjson::StringBuffer output; - rapidjson::Writer writer(output); - JsonWriter json_writer{ &writer }; - this->ReflectWriter(json_writer); - return output.GetString(); -} - -void Reflect(Reader& visitor, lsRequestId& value) { - if (visitor.IsInt()) { - value.type = lsRequestId::kInt; - value.value = visitor.GetInt(); - } - else if (visitor.IsInt64()) { - value.type = lsRequestId::kInt; - // `lsRequestId.value` is an `int`, so we're forced to truncate. - value.value = static_cast(visitor.GetInt64()); - } - else if (visitor.IsString()) { - value.type = lsRequestId::kString; - value.k_string = visitor.GetString(); - value.value = atoi(value.k_string.c_str()); - - } - else { - value.type = lsRequestId::kNone; - value.value = -1; - } -} - -void Reflect(Writer& visitor, lsRequestId& value) { - switch (value.type) { - case lsRequestId::kNone: - visitor.Null(); - break; - case lsRequestId::kInt: - visitor.Int(value.value); - break; - case lsRequestId::kString: - - if(value.k_string.empty()) - { - std::string str = std::to_string(value.value); - visitor.String(str.c_str(), str.length()); - } - else - { - visitor.String(value.k_string.c_str(), value.k_string.length()); - } - break; - } -} - -std::string ToString(const lsRequestId& id) { - if (id.type != lsRequestId::kNone) - { - if(id.type == lsRequestId::kString) - { - if (!id.k_string.empty()) - return id.k_string; - } - return std::to_string(id.value); - } - - return ""; -} - - diff --git a/graphics/asymptote/LspCpp/LibLsp/JsonRpc/message.h b/graphics/asymptote/LspCpp/LibLsp/JsonRpc/message.h deleted file mode 100644 index 6603f3fb3a..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/JsonRpc/message.h +++ /dev/null @@ -1,34 +0,0 @@ -#pragma once - -#include -#include -#include -#include -#include "LibLsp/lsp/method_type.h" - -struct LspMessage -{ -public: - std::string jsonrpc = "2.0"; - virtual void ReflectWriter(Writer&) = 0; - - // Send the message to the language client by writing it to stdout. - void Write(std::ostream& out); - - - virtual MethodType GetMethodType() const = 0; - virtual void SetMethodType(MethodType) = 0; - - virtual ~LspMessage()=default; - enum Kind - { - REQUEST_MESSAGE, - RESPONCE_MESSAGE, - NOTIFICATION_MESSAGE - }; - - virtual Kind GetKid() = 0; - virtual std::string ToJson() ; - -}; - diff --git a/graphics/asymptote/LspCpp/LibLsp/JsonRpc/optional.hpp b/graphics/asymptote/LspCpp/LibLsp/JsonRpc/optional.hpp deleted file mode 100644 index 86e3b407c6..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/JsonRpc/optional.hpp +++ /dev/null @@ -1,1846 +0,0 @@ -// -// Copyright (c) 2014-2021 Martin Moene -// -// https://github.com/martinmoene/optional-lite -// -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -#pragma once - -#ifndef NONSTD_OPTIONAL_LITE_HPP -#define NONSTD_OPTIONAL_LITE_HPP - -#define optional_lite_MAJOR 3 -#define optional_lite_MINOR 5 -#define optional_lite_PATCH 0 - -#define optional_lite_VERSION optional_STRINGIFY(optional_lite_MAJOR) "." optional_STRINGIFY(optional_lite_MINOR) "." optional_STRINGIFY(optional_lite_PATCH) - -#define optional_STRINGIFY( x ) optional_STRINGIFY_( x ) -#define optional_STRINGIFY_( x ) #x - -// optional-lite configuration: - -#define optional_OPTIONAL_DEFAULT 0 -#define optional_OPTIONAL_NONSTD 1 -#define optional_OPTIONAL_STD 2 - -// tweak header support: - -#ifdef __has_include -# if __has_include() -# include -# endif -#define optional_HAVE_TWEAK_HEADER 1 -#else -#define optional_HAVE_TWEAK_HEADER 0 -//# pragma message("optional.hpp: Note: Tweak header not supported.") -#endif - -// optional selection and configuration: - -#if !defined( optional_CONFIG_SELECT_OPTIONAL ) -# define optional_CONFIG_SELECT_OPTIONAL ( optional_HAVE_STD_OPTIONAL ? optional_OPTIONAL_STD : optional_OPTIONAL_NONSTD ) -#endif - -// Control presence of extensions: - -#ifndef optional_CONFIG_NO_EXTENSIONS -#define optional_CONFIG_NO_EXTENSIONS 0 -#endif - -// Control presence of exception handling (try and auto discover): - -#ifndef optional_CONFIG_NO_EXCEPTIONS -# if defined(_MSC_VER) -# include // for _HAS_EXCEPTIONS -# endif -# if defined(__cpp_exceptions) || defined(__EXCEPTIONS) || (_HAS_EXCEPTIONS) -# define optional_CONFIG_NO_EXCEPTIONS 0 -# else -# define optional_CONFIG_NO_EXCEPTIONS 1 -# endif -#endif - -// C++ language version detection (C++20 is speculative): -// Note: VC14.0/1900 (VS2015) lacks too much from C++14. - -#ifndef optional_CPLUSPLUS -# if defined(_MSVC_LANG ) && !defined(__clang__) -# define optional_CPLUSPLUS (_MSC_VER == 1900 ? 201103L : _MSVC_LANG ) -# else -# define optional_CPLUSPLUS __cplusplus -# endif -#endif - -#define optional_CPP98_OR_GREATER ( optional_CPLUSPLUS >= 199711L ) -#define optional_CPP11_OR_GREATER ( optional_CPLUSPLUS >= 201103L ) -#define optional_CPP11_OR_GREATER_ ( optional_CPLUSPLUS >= 201103L ) -#define optional_CPP14_OR_GREATER ( optional_CPLUSPLUS >= 201402L ) -#define optional_CPP17_OR_GREATER ( optional_CPLUSPLUS >= 201703L ) -#define optional_CPP20_OR_GREATER ( optional_CPLUSPLUS >= 202000L ) - -// C++ language version (represent 98 as 3): - -#define optional_CPLUSPLUS_V ( optional_CPLUSPLUS / 100 - (optional_CPLUSPLUS > 200000 ? 2000 : 1994) ) - -// Use C++17 std::optional if available and requested: - -#if optional_CPP17_OR_GREATER && defined(__has_include ) -# if __has_include( ) -# define optional_HAVE_STD_OPTIONAL 1 -# else -# define optional_HAVE_STD_OPTIONAL 0 -# endif -#else -# define optional_HAVE_STD_OPTIONAL 0 -#endif - -#define optional_USES_STD_OPTIONAL ( (optional_CONFIG_SELECT_OPTIONAL == optional_OPTIONAL_STD) || ((optional_CONFIG_SELECT_OPTIONAL == optional_OPTIONAL_DEFAULT) && optional_HAVE_STD_OPTIONAL) ) - -// -// in_place: code duplicated in any-lite, expected-lite, optional-lite, value-ptr-lite, variant-lite: -// - -#ifndef nonstd_lite_HAVE_IN_PLACE_TYPES -#define nonstd_lite_HAVE_IN_PLACE_TYPES 1 - -// C++17 std::in_place in : - -#if optional_CPP17_OR_GREATER - -#include - -namespace nonstd { - -using std::in_place; -using std::in_place_type; -using std::in_place_index; -using std::in_place_t; -using std::in_place_type_t; -using std::in_place_index_t; - -#define nonstd_lite_in_place_t( T) std::in_place_t -#define nonstd_lite_in_place_type_t( T) std::in_place_type_t -#define nonstd_lite_in_place_index_t(K) std::in_place_index_t - -#define nonstd_lite_in_place( T) std::in_place_t{} -#define nonstd_lite_in_place_type( T) std::in_place_type_t{} -#define nonstd_lite_in_place_index(K) std::in_place_index_t{} - -} // namespace nonstd - -#else // optional_CPP17_OR_GREATER - -#include - -namespace nonstd { -namespace detail { - -template< class T > -struct in_place_type_tag {}; - -template< std::size_t K > -struct in_place_index_tag {}; - -} // namespace detail - -struct in_place_t {}; - -template< class T > -inline in_place_t in_place( detail::in_place_type_tag /*unused*/ = detail::in_place_type_tag() ) -{ - return in_place_t(); -} - -template< std::size_t K > -inline in_place_t in_place( detail::in_place_index_tag /*unused*/ = detail::in_place_index_tag() ) -{ - return in_place_t(); -} - -template< class T > -inline in_place_t in_place_type( detail::in_place_type_tag /*unused*/ = detail::in_place_type_tag() ) -{ - return in_place_t(); -} - -template< std::size_t K > -inline in_place_t in_place_index( detail::in_place_index_tag /*unused*/ = detail::in_place_index_tag() ) -{ - return in_place_t(); -} - -// mimic templated typedef: - -#define nonstd_lite_in_place_t( T) nonstd::in_place_t(&)( nonstd::detail::in_place_type_tag ) -#define nonstd_lite_in_place_type_t( T) nonstd::in_place_t(&)( nonstd::detail::in_place_type_tag ) -#define nonstd_lite_in_place_index_t(K) nonstd::in_place_t(&)( nonstd::detail::in_place_index_tag ) - -#define nonstd_lite_in_place( T) nonstd::in_place_type -#define nonstd_lite_in_place_type( T) nonstd::in_place_type -#define nonstd_lite_in_place_index(K) nonstd::in_place_index - -} // namespace nonstd - -#endif // optional_CPP17_OR_GREATER -#endif // nonstd_lite_HAVE_IN_PLACE_TYPES - -// -// Using std::optional: -// - -#if optional_USES_STD_OPTIONAL - -#include - -namespace nonstd { - - using std::optional; - using std::bad_optional_access; - using std::hash; - - using std::nullopt; - using std::nullopt_t; - - using std::operator==; - using std::operator!=; - using std::operator<; - using std::operator<=; - using std::operator>; - using std::operator>=; - using std::make_optional; - using std::swap; -} - -#else // optional_USES_STD_OPTIONAL - -#include -#include - -// optional-lite alignment configuration: - -#ifndef optional_CONFIG_MAX_ALIGN_HACK -# define optional_CONFIG_MAX_ALIGN_HACK 0 -#endif - -#ifndef optional_CONFIG_ALIGN_AS -// no default, used in #if defined() -#endif - -#ifndef optional_CONFIG_ALIGN_AS_FALLBACK -# define optional_CONFIG_ALIGN_AS_FALLBACK double -#endif - -// Compiler warning suppression: - -#if defined(__clang__) -# pragma clang diagnostic push -# pragma clang diagnostic ignored "-Wundef" -#elif defined(__GNUC__) -# pragma GCC diagnostic push -# pragma GCC diagnostic ignored "-Wundef" -#elif defined(_MSC_VER ) -# pragma warning( push ) -#endif - -// half-open range [lo..hi): -#define optional_BETWEEN( v, lo, hi ) ( (lo) <= (v) && (v) < (hi) ) - -// Compiler versions: -// -// MSVC++ 6.0 _MSC_VER == 1200 optional_COMPILER_MSVC_VERSION == 60 (Visual Studio 6.0) -// MSVC++ 7.0 _MSC_VER == 1300 optional_COMPILER_MSVC_VERSION == 70 (Visual Studio .NET 2002) -// MSVC++ 7.1 _MSC_VER == 1310 optional_COMPILER_MSVC_VERSION == 71 (Visual Studio .NET 2003) -// MSVC++ 8.0 _MSC_VER == 1400 optional_COMPILER_MSVC_VERSION == 80 (Visual Studio 2005) -// MSVC++ 9.0 _MSC_VER == 1500 optional_COMPILER_MSVC_VERSION == 90 (Visual Studio 2008) -// MSVC++ 10.0 _MSC_VER == 1600 optional_COMPILER_MSVC_VERSION == 100 (Visual Studio 2010) -// MSVC++ 11.0 _MSC_VER == 1700 optional_COMPILER_MSVC_VERSION == 110 (Visual Studio 2012) -// MSVC++ 12.0 _MSC_VER == 1800 optional_COMPILER_MSVC_VERSION == 120 (Visual Studio 2013) -// MSVC++ 14.0 _MSC_VER == 1900 optional_COMPILER_MSVC_VERSION == 140 (Visual Studio 2015) -// MSVC++ 14.1 _MSC_VER >= 1910 optional_COMPILER_MSVC_VERSION == 141 (Visual Studio 2017) -// MSVC++ 14.2 _MSC_VER >= 1920 optional_COMPILER_MSVC_VERSION == 142 (Visual Studio 2019) - -#if defined(_MSC_VER ) && !defined(__clang__) -# define optional_COMPILER_MSVC_VER (_MSC_VER ) -# define optional_COMPILER_MSVC_VERSION (_MSC_VER / 10 - 10 * ( 5 + (_MSC_VER < 1900 ) ) ) -#else -# define optional_COMPILER_MSVC_VER 0 -# define optional_COMPILER_MSVC_VERSION 0 -#endif - -#define optional_COMPILER_VERSION( major, minor, patch ) ( 10 * (10 * (major) + (minor) ) + (patch) ) - -#if defined(__GNUC__) && !defined(__clang__) -# define optional_COMPILER_GNUC_VERSION optional_COMPILER_VERSION(__GNUC__, __GNUC_MINOR__, __GNUC_PATCHLEVEL__) -#else -# define optional_COMPILER_GNUC_VERSION 0 -#endif - -#if defined(__clang__) -# define optional_COMPILER_CLANG_VERSION optional_COMPILER_VERSION(__clang_major__, __clang_minor__, __clang_patchlevel__) -#else -# define optional_COMPILER_CLANG_VERSION 0 -#endif - -#if optional_BETWEEN(optional_COMPILER_MSVC_VERSION, 70, 140 ) -# pragma warning( disable: 4345 ) // initialization behavior changed -#endif - -#if optional_BETWEEN(optional_COMPILER_MSVC_VERSION, 70, 150 ) -# pragma warning( disable: 4814 ) // in C++14 'constexpr' will not imply 'const' -#endif - -// Presence of language and library features: - -#define optional_HAVE(FEATURE) ( optional_HAVE_##FEATURE ) - -#ifdef _HAS_CPP0X -# define optional_HAS_CPP0X _HAS_CPP0X -#else -# define optional_HAS_CPP0X 0 -#endif - -// Unless defined otherwise below, consider VC14 as C++11 for optional-lite: - -#if optional_COMPILER_MSVC_VER >= 1900 -# undef optional_CPP11_OR_GREATER -# define optional_CPP11_OR_GREATER 1 -#endif - -#define optional_CPP11_90 (optional_CPP11_OR_GREATER_ || optional_COMPILER_MSVC_VER >= 1500) -#define optional_CPP11_100 (optional_CPP11_OR_GREATER_ || optional_COMPILER_MSVC_VER >= 1600) -#define optional_CPP11_110 (optional_CPP11_OR_GREATER_ || optional_COMPILER_MSVC_VER >= 1700) -#define optional_CPP11_120 (optional_CPP11_OR_GREATER_ || optional_COMPILER_MSVC_VER >= 1800) -#define optional_CPP11_140 (optional_CPP11_OR_GREATER_ || optional_COMPILER_MSVC_VER >= 1900) -#define optional_CPP11_141 (optional_CPP11_OR_GREATER_ || optional_COMPILER_MSVC_VER >= 1910) - -#define optional_CPP14_000 (optional_CPP14_OR_GREATER) -#define optional_CPP17_000 (optional_CPP17_OR_GREATER) - -// clang >= 2.9, gcc >= 4.9, msvc >= vc14.0/1900 (vs15): -#define optional_CPP11_140_C290_G490 ((optional_CPP11_OR_GREATER_ && (optional_COMPILER_CLANG_VERSION >= 290 || optional_COMPILER_GNUC_VERSION >= 490)) || (optional_COMPILER_MSVC_VER >= 1900)) - -// clang >= 3.5, msvc >= vc11 (vs12): -#define optional_CPP11_110_C350 ( optional_CPP11_110 && !optional_BETWEEN( optional_COMPILER_CLANG_VERSION, 1, 350 ) ) - -// clang >= 3.5, gcc >= 5.0, msvc >= vc11 (vs12): -#define optional_CPP11_110_C350_G500 \ - ( optional_CPP11_110 && \ - !( optional_BETWEEN( optional_COMPILER_CLANG_VERSION, 1, 350 ) \ - || optional_BETWEEN( optional_COMPILER_GNUC_VERSION , 1, 500 ) ) ) - -// Presence of C++11 language features: - -#define optional_HAVE_CONSTEXPR_11 optional_CPP11_140 -#define optional_HAVE_IS_DEFAULT optional_CPP11_140 -#define optional_HAVE_NOEXCEPT optional_CPP11_140 -#define optional_HAVE_NULLPTR optional_CPP11_100 -#define optional_HAVE_REF_QUALIFIER optional_CPP11_140_C290_G490 -#define optional_HAVE_STATIC_ASSERT optional_CPP11_110 -#define optional_HAVE_INITIALIZER_LIST optional_CPP11_140 - -// Presence of C++14 language features: - -#define optional_HAVE_CONSTEXPR_14 optional_CPP14_000 - -// Presence of C++17 language features: - -#define optional_HAVE_NODISCARD optional_CPP17_000 - -// Presence of C++ library features: - -#define optional_HAVE_CONDITIONAL optional_CPP11_120 -#define optional_HAVE_REMOVE_CV optional_CPP11_120 -#define optional_HAVE_TYPE_TRAITS optional_CPP11_90 - -#define optional_HAVE_TR1_TYPE_TRAITS (!! optional_COMPILER_GNUC_VERSION ) -#define optional_HAVE_TR1_ADD_POINTER (!! optional_COMPILER_GNUC_VERSION ) - -#define optional_HAVE_IS_ASSIGNABLE optional_CPP11_110_C350 -#define optional_HAVE_IS_MOVE_CONSTRUCTIBLE optional_CPP11_110_C350 -#define optional_HAVE_IS_NOTHROW_MOVE_ASSIGNABLE optional_CPP11_110_C350 -#define optional_HAVE_IS_NOTHROW_MOVE_CONSTRUCTIBLE optional_CPP11_110_C350 -#define optional_HAVE_IS_TRIVIALLY_COPY_CONSTRUCTIBLE optional_CPP11_110_C350_G500 -#define optional_HAVE_IS_TRIVIALLY_MOVE_CONSTRUCTIBLE optional_CPP11_110_C350_G500 - -// C++ feature usage: - -#if optional_HAVE( CONSTEXPR_11 ) -# define optional_constexpr constexpr -#else -# define optional_constexpr /*constexpr*/ -#endif - -#if optional_HAVE( IS_DEFAULT ) -# define optional_is_default = default; -#else -# define optional_is_default {} -#endif - -#if optional_HAVE( CONSTEXPR_14 ) -# define optional_constexpr14 constexpr -#else -# define optional_constexpr14 /*constexpr*/ -#endif - -#if optional_HAVE( NODISCARD ) -# define optional_nodiscard [[nodiscard]] -#else -# define optional_nodiscard /*[[nodiscard]]*/ -#endif - -#if optional_HAVE( NOEXCEPT ) -# define optional_noexcept noexcept -#else -# define optional_noexcept /*noexcept*/ -#endif - -#if optional_HAVE( NULLPTR ) -# define optional_nullptr nullptr -#else -# define optional_nullptr NULL -#endif - -#if optional_HAVE( REF_QUALIFIER ) -// NOLINTNEXTLINE( bugprone-macro-parentheses ) -# define optional_ref_qual & -# define optional_refref_qual && -#else -# define optional_ref_qual /*&*/ -# define optional_refref_qual /*&&*/ -#endif - -#if optional_HAVE( STATIC_ASSERT ) -# define optional_static_assert(expr, text) static_assert(expr, text); -#else -# define optional_static_assert(expr, text) /*static_assert(expr, text);*/ -#endif - -// additional includes: - -#if optional_CONFIG_NO_EXCEPTIONS -// already included: -#else -# include -#endif - -#if optional_CPP11_OR_GREATER -# include -#endif - -#if optional_HAVE( INITIALIZER_LIST ) -# include -#endif - -#if optional_HAVE( TYPE_TRAITS ) -# include -#elif optional_HAVE( TR1_TYPE_TRAITS ) -# include -#endif - -// Method enabling - -#if optional_CPP11_OR_GREATER - -#define optional_REQUIRES_0(...) \ - template< bool B = (__VA_ARGS__), typename std::enable_if::type = 0 > - -#define optional_REQUIRES_T(...) \ - , typename std::enable_if< (__VA_ARGS__), int >::type = 0 - -#define optional_REQUIRES_R(R, ...) \ - typename std::enable_if< (__VA_ARGS__), R>::type - -#define optional_REQUIRES_A(...) \ - , typename std::enable_if< (__VA_ARGS__), void*>::type = nullptr - -#endif - -// -// optional: -// - -namespace nonstd { namespace optional_lite { - -namespace std11 { - -template< class T, T v > struct integral_constant { enum { value = v }; }; -template< bool B > struct bool_constant : integral_constant{}; - -typedef bool_constant< true > true_type; -typedef bool_constant< false > false_type; - -#if optional_CPP11_OR_GREATER - using std::move; -#else - template< typename T > T & move( T & t ) { return t; } -#endif - -#if optional_HAVE( CONDITIONAL ) - using std::conditional; -#else - template< bool B, typename T, typename F > struct conditional { typedef T type; }; - template< typename T, typename F > struct conditional { typedef F type; }; -#endif // optional_HAVE_CONDITIONAL - -#if optional_HAVE( IS_ASSIGNABLE ) - using std::is_assignable; -#else - template< class T, class U > struct is_assignable : std11::true_type{}; -#endif - -#if optional_HAVE( IS_MOVE_CONSTRUCTIBLE ) - using std::is_move_constructible; -#else - template< class T > struct is_move_constructible : std11::true_type{}; -#endif - -#if optional_HAVE( IS_NOTHROW_MOVE_ASSIGNABLE ) - using std::is_nothrow_move_assignable; -#else - template< class T > struct is_nothrow_move_assignable : std11::true_type{}; -#endif - -#if optional_HAVE( IS_NOTHROW_MOVE_CONSTRUCTIBLE ) - using std::is_nothrow_move_constructible; -#else - template< class T > struct is_nothrow_move_constructible : std11::true_type{}; -#endif - -#if optional_HAVE( IS_TRIVIALLY_COPY_CONSTRUCTIBLE ) - using std::is_trivially_copy_constructible; -#else - template< class T > struct is_trivially_copy_constructible : std11::true_type{}; -#endif - -#if optional_HAVE( IS_TRIVIALLY_MOVE_CONSTRUCTIBLE ) - using std::is_trivially_move_constructible; -#else - template< class T > struct is_trivially_move_constructible : std11::true_type{}; -#endif - -} // namespace std11 - -#if optional_CPP11_OR_GREATER - -/// type traits C++17: - -namespace std17 { - -#if optional_CPP17_OR_GREATER - -using std::is_swappable; -using std::is_nothrow_swappable; - -#elif optional_CPP11_OR_GREATER - -namespace detail { - -using std::swap; - -struct is_swappable -{ - template< typename T, typename = decltype( swap( std::declval(), std::declval() ) ) > - static std11::true_type test( int /*unused*/ ); - - template< typename > - static std11::false_type test(...); -}; - -struct is_nothrow_swappable -{ - // wrap noexcept(expr) in separate function as work-around for VC140 (VS2015): - - template< typename T > - static constexpr bool satisfies() - { - return noexcept( swap( std::declval(), std::declval() ) ); - } - - template< typename T > - static auto test( int /*unused*/ ) -> std11::integral_constant()>{} - - template< typename > - static auto test(...) -> std11::false_type; -}; - -} // namespace detail - -// is [nothow] swappable: - -template< typename T > -struct is_swappable : decltype( detail::is_swappable::test(0) ){}; - -template< typename T > -struct is_nothrow_swappable : decltype( detail::is_nothrow_swappable::test(0) ){}; - -#endif // optional_CPP17_OR_GREATER - -} // namespace std17 - -/// type traits C++20: - -namespace std20 { - -template< typename T > -struct remove_cvref -{ - typedef typename std::remove_cv< typename std::remove_reference::type >::type type; -}; - -} // namespace std20 - -#endif // optional_CPP11_OR_GREATER - -/// class optional - -template< typename T > -class optional; - -namespace detail { - -// C++11 emulation: - -struct nulltype{}; - -template< typename Head, typename Tail > -struct typelist -{ - typedef Head head; - typedef Tail tail; -}; - -#if optional_CONFIG_MAX_ALIGN_HACK - -// Max align, use most restricted type for alignment: - -#define optional_UNIQUE( name ) optional_UNIQUE2( name, __LINE__ ) -#define optional_UNIQUE2( name, line ) optional_UNIQUE3( name, line ) -#define optional_UNIQUE3( name, line ) name ## line - -#define optional_ALIGN_TYPE( type ) \ - type optional_UNIQUE( _t ); struct_t< type > optional_UNIQUE( _st ) - -template< typename T > -struct struct_t { T _; }; - -union max_align_t -{ - optional_ALIGN_TYPE( char ); - optional_ALIGN_TYPE( short int ); - optional_ALIGN_TYPE( int ); - optional_ALIGN_TYPE( long int ); - optional_ALIGN_TYPE( float ); - optional_ALIGN_TYPE( double ); - optional_ALIGN_TYPE( long double ); - optional_ALIGN_TYPE( char * ); - optional_ALIGN_TYPE( short int * ); - optional_ALIGN_TYPE( int * ); - optional_ALIGN_TYPE( long int * ); - optional_ALIGN_TYPE( float * ); - optional_ALIGN_TYPE( double * ); - optional_ALIGN_TYPE( long double * ); - optional_ALIGN_TYPE( void * ); - -#ifdef HAVE_LONG_LONG - optional_ALIGN_TYPE( long long ); -#endif - - struct Unknown; - - Unknown ( * optional_UNIQUE(_) )( Unknown ); - Unknown * Unknown::* optional_UNIQUE(_); - Unknown ( Unknown::* optional_UNIQUE(_) )( Unknown ); - - struct_t< Unknown ( * )( Unknown) > optional_UNIQUE(_); - struct_t< Unknown * Unknown::* > optional_UNIQUE(_); - struct_t< Unknown ( Unknown::* )(Unknown) > optional_UNIQUE(_); -}; - -#undef optional_UNIQUE -#undef optional_UNIQUE2 -#undef optional_UNIQUE3 - -#undef optional_ALIGN_TYPE - -#elif defined( optional_CONFIG_ALIGN_AS ) // optional_CONFIG_MAX_ALIGN_HACK - -// Use user-specified type for alignment: - -#define optional_ALIGN_AS( unused ) \ - optional_CONFIG_ALIGN_AS - -#else // optional_CONFIG_MAX_ALIGN_HACK - -// Determine POD type to use for alignment: - -#define optional_ALIGN_AS( to_align ) \ - typename type_of_size< alignment_types, alignment_of< to_align >::value >::type - -template< typename T > -struct alignment_of; - -template< typename T > -struct alignment_of_hack -{ - char c; - T t; - alignment_of_hack(); -}; - -template< size_t A, size_t S > -struct alignment_logic -{ - enum { value = A < S ? A : S }; -}; - -template< typename T > -struct alignment_of -{ - enum { value = alignment_logic< - sizeof( alignment_of_hack ) - sizeof(T), sizeof(T) >::value }; -}; - -template< typename List, size_t N > -struct type_of_size -{ - typedef typename std11::conditional< - N == sizeof( typename List::head ), - typename List::head, - typename type_of_size::type >::type type; -}; - -template< size_t N > -struct type_of_size< nulltype, N > -{ - typedef optional_CONFIG_ALIGN_AS_FALLBACK type; -}; - -template< typename T> -struct struct_t { T _; }; - -#define optional_ALIGN_TYPE( type ) \ - typelist< type , typelist< struct_t< type > - -struct Unknown; - -typedef - optional_ALIGN_TYPE( char ), - optional_ALIGN_TYPE( short ), - optional_ALIGN_TYPE( int ), - optional_ALIGN_TYPE( long ), - optional_ALIGN_TYPE( float ), - optional_ALIGN_TYPE( double ), - optional_ALIGN_TYPE( long double ), - - optional_ALIGN_TYPE( char *), - optional_ALIGN_TYPE( short * ), - optional_ALIGN_TYPE( int * ), - optional_ALIGN_TYPE( long * ), - optional_ALIGN_TYPE( float * ), - optional_ALIGN_TYPE( double * ), - optional_ALIGN_TYPE( long double * ), - - optional_ALIGN_TYPE( Unknown ( * )( Unknown ) ), - optional_ALIGN_TYPE( Unknown * Unknown::* ), - optional_ALIGN_TYPE( Unknown ( Unknown::* )( Unknown ) ), - - nulltype - > > > > > > > > > > > > > > - > > > > > > > > > > > > > > - > > > > > > - alignment_types; - -#undef optional_ALIGN_TYPE - -#endif // optional_CONFIG_MAX_ALIGN_HACK - -/// C++03 constructed union to hold value. - -template< typename T > -union storage_t -{ -//private: -// template< typename > friend class optional; - - typedef T value_type; - - storage_t() optional_is_default - - explicit storage_t( value_type const & v ) - { - construct_value( v ); - } - - void construct_value( value_type const & v ) - { - ::new( value_ptr() ) value_type( v ); - } - -#if optional_CPP11_OR_GREATER - - explicit storage_t( value_type && v ) - { - construct_value( std::move( v ) ); - } - - void construct_value( value_type && v ) - { - ::new( value_ptr() ) value_type( std::move( v ) ); - } - - template< class... Args > - storage_t( nonstd_lite_in_place_t(T), Args&&... args ) - { - emplace( std::forward(args)... ); - } - - template< class... Args > - void emplace( Args&&... args ) - { - ::new( value_ptr() ) value_type( std::forward(args)... ); - } - - template< class U, class... Args > - void emplace( std::initializer_list il, Args&&... args ) - { - ::new( value_ptr() ) value_type( il, std::forward(args)... ); - } - -#endif - - void destruct_value() - { - value_ptr()->~T(); - } - - optional_nodiscard value_type const * value_ptr() const - { - return as(); - } - - value_type * value_ptr() - { - return as(); - } - - optional_nodiscard value_type const & value() const optional_ref_qual - { - return * value_ptr(); - } - - value_type & value() optional_ref_qual - { - return * value_ptr(); - } - -#if optional_HAVE( REF_QUALIFIER ) - - optional_nodiscard value_type const && value() const optional_refref_qual - { - return std::move( value() ); - } - - value_type && value() optional_refref_qual - { - return std::move( value() ); - } - -#endif - -#if optional_CPP11_OR_GREATER - - using aligned_storage_t = typename std::aligned_storage< sizeof(value_type), alignof(value_type) >::type; - aligned_storage_t data; - -#elif optional_CONFIG_MAX_ALIGN_HACK - - typedef struct { unsigned char data[ sizeof(value_type) ]; } aligned_storage_t; - - max_align_t hack; - aligned_storage_t data; - -#else - typedef optional_ALIGN_AS(value_type) align_as_type; - - typedef struct { align_as_type data[ 1 + ( sizeof(value_type) - 1 ) / sizeof(align_as_type) ]; } aligned_storage_t; - aligned_storage_t data; - -# undef optional_ALIGN_AS - -#endif // optional_CONFIG_MAX_ALIGN_HACK - - optional_nodiscard void * ptr() optional_noexcept - { - return &data; - } - - optional_nodiscard void const * ptr() const optional_noexcept - { - return &data; - } - - template - optional_nodiscard U * as() - { - return reinterpret_cast( ptr() ); - } - - template - optional_nodiscard U const * as() const - { - return reinterpret_cast( ptr() ); - } -}; - -} // namespace detail - -/// disengaged state tag - -struct nullopt_t -{ - struct init{}; - explicit optional_constexpr nullopt_t( init /*unused*/ ) optional_noexcept {} -}; - -#if optional_HAVE( CONSTEXPR_11 ) -constexpr nullopt_t nullopt{ nullopt_t::init{} }; -#else -// extra parenthesis to prevent the most vexing parse: -const nullopt_t nullopt(( nullopt_t::init() )); -#endif - -/// optional access error - -#if ! optional_CONFIG_NO_EXCEPTIONS - -class bad_optional_access : public std::logic_error -{ -public: - explicit bad_optional_access() - : logic_error( "bad optional access" ) {} -}; - -#endif //optional_CONFIG_NO_EXCEPTIONS - -/// optional - -template< typename T> -class optional -{ - optional_static_assert(( !std::is_same::type, nullopt_t>::value ), - "T in optional must not be of type 'nullopt_t'.") - - optional_static_assert(( !std::is_same::type, in_place_t>::value ), - "T in optional must not be of type 'in_place_t'.") - - optional_static_assert(( std::is_object::value && std::is_destructible::value && !std::is_array::value ), - "T in optional must meet the Cpp17Destructible requirements.") - -private: - template< typename > friend class optional; - - typedef void (optional::*safe_bool)() const; - -public: - typedef T value_type; - - // x.x.3.1, constructors - - // 1a - default construct - optional_constexpr optional() optional_noexcept - : has_value_( false ) - , contained() - {} - - // 1b - construct explicitly empty - // NOLINTNEXTLINE( google-explicit-constructor, hicpp-explicit-conversions ) - optional_constexpr optional( nullopt_t /*unused*/ ) optional_noexcept - : has_value_( false ) - , contained() - {} - - // 2 - copy-construct -#if optional_CPP11_OR_GREATER - // template< typename U = T - // optional_REQUIRES_T( - // std::is_copy_constructible::value - // || std11::is_trivially_copy_constructible::value - // ) - // > -#endif - optional_constexpr14 optional( optional const & other ) - : has_value_( other.has_value() ) - { - if ( other.has_value() ) - { - contained.construct_value( other.contained.value() ); - } - } - -#if optional_CPP11_OR_GREATER - - // 3 (C++11) - move-construct from optional - template< typename U = T - optional_REQUIRES_T( - std11::is_move_constructible::value - || std11::is_trivially_move_constructible::value - ) - > - optional_constexpr14 optional( optional && other ) - // NOLINTNEXTLINE( performance-noexcept-move-constructor ) - noexcept( std11::is_nothrow_move_constructible::value ) - : has_value_( other.has_value() ) - { - if ( other.has_value() ) - { - contained.construct_value( std::move( other.contained.value() ) ); - } - } - - // 4a (C++11) - explicit converting copy-construct from optional - template< typename U - optional_REQUIRES_T( - std::is_constructible::value - && !std::is_constructible & >::value - && !std::is_constructible && >::value - && !std::is_constructible const & >::value - && !std::is_constructible const && >::value - && !std::is_convertible< optional & , T>::value - && !std::is_convertible< optional && , T>::value - && !std::is_convertible< optional const & , T>::value - && !std::is_convertible< optional const &&, T>::value - && !std::is_convertible< U const & , T>::value /*=> explicit */ - ) - > - explicit optional( optional const & other ) - : has_value_( other.has_value() ) - { - if ( other.has_value() ) - { - contained.construct_value( T{ other.contained.value() } ); - } - } -#endif // optional_CPP11_OR_GREATER - - // 4b (C++98 and later) - non-explicit converting copy-construct from optional - template< typename U -#if optional_CPP11_OR_GREATER - optional_REQUIRES_T( - std::is_constructible::value - && !std::is_constructible & >::value - && !std::is_constructible && >::value - && !std::is_constructible const & >::value - && !std::is_constructible const && >::value - && !std::is_convertible< optional & , T>::value - && !std::is_convertible< optional && , T>::value - && !std::is_convertible< optional const & , T>::value - && !std::is_convertible< optional const &&, T>::value - && std::is_convertible< U const & , T>::value /*=> non-explicit */ - ) -#endif // optional_CPP11_OR_GREATER - > - // NOLINTNEXTLINE( google-explicit-constructor, hicpp-explicit-conversions ) - /*non-explicit*/ optional( optional const & other ) - : has_value_( other.has_value() ) - { - if ( other.has_value() ) - { - contained.construct_value( other.contained.value() ); - } - } - -#if optional_CPP11_OR_GREATER - - // 5a (C++11) - explicit converting move-construct from optional - template< typename U - optional_REQUIRES_T( - std::is_constructible::value - && !std::is_constructible & >::value - && !std::is_constructible && >::value - && !std::is_constructible const & >::value - && !std::is_constructible const && >::value - && !std::is_convertible< optional & , T>::value - && !std::is_convertible< optional && , T>::value - && !std::is_convertible< optional const & , T>::value - && !std::is_convertible< optional const &&, T>::value - && !std::is_convertible< U &&, T>::value /*=> explicit */ - ) - > - explicit optional( optional && other - ) - : has_value_( other.has_value() ) - { - if ( other.has_value() ) - { - contained.construct_value( T{ std::move( other.contained.value() ) } ); - } - } - - // 5a (C++11) - non-explicit converting move-construct from optional - template< typename U - optional_REQUIRES_T( - std::is_constructible::value - && !std::is_constructible & >::value - && !std::is_constructible && >::value - && !std::is_constructible const & >::value - && !std::is_constructible const && >::value - && !std::is_convertible< optional & , T>::value - && !std::is_convertible< optional && , T>::value - && !std::is_convertible< optional const & , T>::value - && !std::is_convertible< optional const &&, T>::value - && std::is_convertible< U &&, T>::value /*=> non-explicit */ - ) - > - // NOLINTNEXTLINE( google-explicit-constructor, hicpp-explicit-conversions ) - /*non-explicit*/ optional( optional && other ) - : has_value_( other.has_value() ) - { - if ( other.has_value() ) - { - contained.construct_value( std::move( other.contained.value() ) ); - } - } - - // 6 (C++11) - in-place construct - template< typename... Args - optional_REQUIRES_T( - std::is_constructible::value - ) - > - optional_constexpr explicit optional( nonstd_lite_in_place_t(T), Args&&... args ) - : has_value_( true ) - , contained( in_place, std::forward(args)... ) - {} - - // 7 (C++11) - in-place construct, initializer-list - template< typename U, typename... Args - optional_REQUIRES_T( - std::is_constructible&, Args&&...>::value - ) - > - optional_constexpr explicit optional( nonstd_lite_in_place_t(T), std::initializer_list il, Args&&... args ) - : has_value_( true ) - , contained( T( il, std::forward(args)...) ) - {} - - // 8a (C++11) - explicit move construct from value - template< typename U = T - optional_REQUIRES_T( - std::is_constructible::value - && !std::is_same::type, nonstd_lite_in_place_t(U)>::value - && !std::is_same::type, optional>::value - && !std::is_convertible::value /*=> explicit */ - ) - > - optional_constexpr explicit optional( U && value ) - : has_value_( true ) - , contained( nonstd_lite_in_place(T), std::forward( value ) ) - {} - - // 8b (C++11) - non-explicit move construct from value - template< typename U = T - optional_REQUIRES_T( - std::is_constructible::value - && !std::is_same::type, nonstd_lite_in_place_t(U)>::value - && !std::is_same::type, optional>::value - && std::is_convertible::value /*=> non-explicit */ - ) - > - // NOLINTNEXTLINE( google-explicit-constructor, hicpp-explicit-conversions ) - optional_constexpr /*non-explicit*/ optional( U && value ) - : has_value_( true ) - , contained( nonstd_lite_in_place(T), std::forward( value ) ) - {} - -#else // optional_CPP11_OR_GREATER - - // 8 (C++98) - optional( value_type const & value ) - : has_value_( true ) - , contained( value ) - {} - -#endif // optional_CPP11_OR_GREATER - - // x.x.3.2, destructor - - ~optional() - { - if ( has_value() ) - { - contained.destruct_value(); - } - } - - // x.x.3.3, assignment - - // 1 (C++98and later) - assign explicitly empty - optional & operator=( nullopt_t /*unused*/) optional_noexcept - { - reset(); - return *this; - } - - // 2 (C++98and later) - copy-assign from optional -#if optional_CPP11_OR_GREATER - // NOLINTNEXTLINE( cppcoreguidelines-c-copy-assignment-signature, misc-unconventional-assign-operator ) - optional_REQUIRES_R( - optional &, - true -// std::is_copy_constructible::value -// && std::is_copy_assignable::value - ) - operator=( optional const & other ) - noexcept( - std11::is_nothrow_move_assignable::value - && std11::is_nothrow_move_constructible::value - ) -#else - optional & operator=( optional const & other ) -#endif - { - if ( (has_value() == true ) && (other.has_value() == false) ) { reset(); } - else if ( (has_value() == false) && (other.has_value() == true ) ) { initialize( *other ); } - else if ( (has_value() == true ) && (other.has_value() == true ) ) { contained.value() = *other; } - return *this; - } - -#if optional_CPP11_OR_GREATER - - // 3 (C++11) - move-assign from optional - // NOLINTNEXTLINE( cppcoreguidelines-c-copy-assignment-signature, misc-unconventional-assign-operator ) - optional_REQUIRES_R( - optional &, - true -// std11::is_move_constructible::value -// && std::is_move_assignable::value - ) - operator=( optional && other ) noexcept - { - if ( (has_value() == true ) && (other.has_value() == false) ) { reset(); } - else if ( (has_value() == false) && (other.has_value() == true ) ) { initialize( std::move( *other ) ); } - else if ( (has_value() == true ) && (other.has_value() == true ) ) { contained.value() = std::move( *other ); } - return *this; - } - - // 4 (C++11) - move-assign from value - template< typename U = T > - // NOLINTNEXTLINE( cppcoreguidelines-c-copy-assignment-signature, misc-unconventional-assign-operator ) - optional_REQUIRES_R( - optional &, - std::is_constructible::value - && std11::is_assignable::value - && !std::is_same::type, nonstd_lite_in_place_t(U)>::value - && !std::is_same::type, optional>::value - && !(std::is_scalar::value && std::is_same::type>::value) - ) - operator=( U && value ) - { - if ( has_value() ) - { - contained.value() = std::forward( value ); - } - else - { - initialize( T( std::forward( value ) ) ); - } - return *this; - } - -#else // optional_CPP11_OR_GREATER - - // 4 (C++98) - copy-assign from value - template< typename U /*= T*/ > - optional & operator=( U const & value ) - { - if ( has_value() ) contained.value() = value; - else initialize( T( value ) ); - return *this; - } - -#endif // optional_CPP11_OR_GREATER - - // 5 (C++98 and later) - converting copy-assign from optional - template< typename U > -#if optional_CPP11_OR_GREATER - // NOLINTNEXTLINE( cppcoreguidelines-c-copy-assignment-signature, misc-unconventional-assign-operator ) - optional_REQUIRES_R( - optional&, - std::is_constructible< T , U const &>::value - && std11::is_assignable< T&, U const &>::value - && !std::is_constructible & >::value - && !std::is_constructible && >::value - && !std::is_constructible const & >::value - && !std::is_constructible const && >::value - && !std::is_convertible< optional & , T>::value - && !std::is_convertible< optional && , T>::value - && !std::is_convertible< optional const & , T>::value - && !std::is_convertible< optional const &&, T>::value - && !std11::is_assignable< T&, optional & >::value - && !std11::is_assignable< T&, optional && >::value - && !std11::is_assignable< T&, optional const & >::value - && !std11::is_assignable< T&, optional const && >::value - ) -#else - optional& -#endif // optional_CPP11_OR_GREATER - operator=( optional const & other ) - { - return *this = optional( other ); - } - -#if optional_CPP11_OR_GREATER - - // 6 (C++11) - converting move-assign from optional - template< typename U > - // NOLINTNEXTLINE( cppcoreguidelines-c-copy-assignment-signature, misc-unconventional-assign-operator ) - optional_REQUIRES_R( - optional&, - std::is_constructible< T , U>::value - && std11::is_assignable< T&, U>::value - && !std::is_constructible & >::value - && !std::is_constructible && >::value - && !std::is_constructible const & >::value - && !std::is_constructible const && >::value - && !std::is_convertible< optional & , T>::value - && !std::is_convertible< optional && , T>::value - && !std::is_convertible< optional const & , T>::value - && !std::is_convertible< optional const &&, T>::value - && !std11::is_assignable< T&, optional & >::value - && !std11::is_assignable< T&, optional && >::value - && !std11::is_assignable< T&, optional const & >::value - && !std11::is_assignable< T&, optional const && >::value - ) - operator=( optional && other ) - { - return *this = optional( std::move( other ) ); - } - - // 7 (C++11) - emplace - template< typename... Args - optional_REQUIRES_T( - std::is_constructible::value - ) - > - T& emplace( Args&&... args ) - { - *this = nullopt; - contained.emplace( std::forward(args)... ); - has_value_ = true; - return contained.value(); - } - - // 8 (C++11) - emplace, initializer-list - template< typename U, typename... Args - optional_REQUIRES_T( - std::is_constructible&, Args&&...>::value - ) - > - T& emplace( std::initializer_list il, Args&&... args ) - { - *this = nullopt; - contained.emplace( il, std::forward(args)... ); - has_value_ = true; - return contained.value(); - } - -#endif // optional_CPP11_OR_GREATER - - // x.x.3.4, swap - - void swap( optional & other ) -#if optional_CPP11_OR_GREATER - noexcept( - std11::is_nothrow_move_constructible::value - && std17::is_nothrow_swappable::value - ) -#endif - { - using std::swap; - if ( (has_value() == true ) && (other.has_value() == true ) ) { swap( **this, *other ); } - else if ( (has_value() == false) && (other.has_value() == true ) ) { initialize( std11::move(*other) ); other.reset(); } - else if ( (has_value() == true ) && (other.has_value() == false) ) { other.initialize( std11::move(**this) ); reset(); } - } - - // x.x.3.5, observers - - optional_constexpr value_type const * operator ->() const - { - return assert( has_value() ), - contained.value_ptr(); - } - - optional_constexpr14 value_type * operator ->() - { - return assert( has_value() ), - contained.value_ptr(); - } - - optional_constexpr value_type const & operator *() const optional_ref_qual - { - return assert( has_value() ), - contained.value(); - } - - optional_constexpr14 value_type & operator *() optional_ref_qual - { - return assert( has_value() ), - contained.value(); - } - -#if optional_HAVE( REF_QUALIFIER ) - - optional_constexpr value_type const && operator *() const optional_refref_qual - { - return std::move( **this ); - } - - optional_constexpr14 value_type && operator *() optional_refref_qual - { - return std::move( **this ); - } - -#endif - -#if optional_CPP11_OR_GREATER - optional_constexpr explicit operator bool() const optional_noexcept - { - return has_value(); - } -#else - optional_constexpr operator safe_bool() const optional_noexcept - { - return has_value() ? &optional::this_type_does_not_support_comparisons : 0; - } -#endif - - // NOLINTNEXTLINE( modernize-use-nodiscard ) - /*optional_nodiscard*/ optional_constexpr bool has_value() const optional_noexcept - { - return has_value_; - } - - // NOLINTNEXTLINE( modernize-use-nodiscard ) - /*optional_nodiscard*/ optional_constexpr14 value_type const & value() const optional_ref_qual - { -#if optional_CONFIG_NO_EXCEPTIONS - assert( has_value() ); -#else - if ( ! has_value() ) - { - throw bad_optional_access(); - } -#endif - return contained.value(); - } - - optional_constexpr14 value_type & value() optional_ref_qual - { -#if optional_CONFIG_NO_EXCEPTIONS - assert( has_value() ); -#else - if ( ! has_value() ) - { - throw bad_optional_access(); - } -#endif - return contained.value(); - } - -#if optional_HAVE( REF_QUALIFIER ) && ( !optional_COMPILER_GNUC_VERSION || optional_COMPILER_GNUC_VERSION >= 490 ) - - // NOLINTNEXTLINE( modernize-use-nodiscard ) - /*optional_nodiscard*/ optional_constexpr value_type const && value() const optional_refref_qual - { - return std::move( value() ); - } - - optional_constexpr14 value_type && value() optional_refref_qual - { - return std::move( value() ); - } - -#endif - -#if optional_HAVE( REF_QUALIFIER ) - - template< typename U > - optional_constexpr value_type value_or( U && v ) const optional_ref_qual - { - return has_value() ? contained.value() : static_cast(std::forward( v ) ); - } - - template< typename U > - optional_constexpr14 value_type value_or( U && v ) optional_refref_qual - { -#if optional_COMPILER_CLANG_VERSION - return has_value() ? /*std::move*/( contained.value() ) : static_cast(std::forward( v ) ); -#else - return has_value() ? std::move( contained.value() ) : static_cast(std::forward( v ) ); -#endif - } - -#else - - template< typename U > - optional_constexpr value_type value_or( U const & v ) const - { - return has_value() ? contained.value() : static_cast( v ); - } - -#endif // optional_HAVE( REF_QUALIFIER ) - -#if !optional_CONFIG_NO_EXTENSIONS -#if optional_HAVE( REF_QUALIFIER ) - - template< typename F > - optional_constexpr value_type value_or_eval( F f ) const & - { - return has_value() ? contained.value() : f(); - } - - template< typename F > - optional_constexpr14 value_type value_or_eval( F f ) && - { - if ( has_value() ) - { - return std::move( contained.value() ); - } - else - { - return f(); - } - } - -#else - - template< typename F > - optional_constexpr value_type value_or_eval( F f ) const - { - return has_value() ? contained.value() : f(); - } - -#endif // optional_HAVE( REF_QUALIFIER ) -#endif // !optional_CONFIG_NO_EXTENSIONS - - // x.x.3.6, modifiers - - void reset() optional_noexcept - { - if ( has_value() ) - { - contained.destruct_value(); - } - - has_value_ = false; - } - -private: - void this_type_does_not_support_comparisons() const {} - - template< typename V > - void initialize( V const & value ) - { - assert( ! has_value() ); - contained.construct_value( value ); - has_value_ = true; - } - -#if optional_CPP11_OR_GREATER - template< typename V > - void initialize( V && value ) - { - assert( ! has_value() ); - contained.construct_value( std::move( value ) ); - has_value_ = true; - } - -#endif - -private: - bool has_value_; - detail::storage_t< value_type > contained; - -}; - -// Relational operators - -template< typename T, typename U > -optional_nodiscard optional_constexpr bool operator==( optional const & x, optional const & y ) -{ - return bool(x) != bool(y) ? false : !bool( x ) ? true : *x == *y; -} - -template< typename T, typename U > -optional_nodiscard optional_constexpr bool operator!=( optional const & x, optional const & y ) -{ - return !(x == y); -} - -template< typename T, typename U > -optional_nodiscard optional_constexpr bool operator<( optional const & x, optional const & y ) -{ - return (!y) ? false : (!x) ? true : *x < *y; -} - -template< typename T, typename U > -optional_nodiscard optional_constexpr bool operator>( optional const & x, optional const & y ) -{ - return (y < x); -} - -template< typename T, typename U > -optional_nodiscard optional_constexpr bool operator<=( optional const & x, optional const & y ) -{ - return !(y < x); -} - -template< typename T, typename U > -optional_nodiscard optional_constexpr bool operator>=( optional const & x, optional const & y ) -{ - return !(x < y); -} - -// Comparison with nullopt - -template< typename T > -optional_nodiscard optional_constexpr bool operator==( optional const & x, nullopt_t /*unused*/ ) optional_noexcept -{ - return (!x); -} - -template< typename T > -optional_nodiscard optional_constexpr bool operator==( nullopt_t /*unused*/, optional const & x ) optional_noexcept -{ - return (!x); -} - -template< typename T > -optional_nodiscard optional_constexpr bool operator!=( optional const & x, nullopt_t /*unused*/ ) optional_noexcept -{ - return bool(x); -} - -template< typename T > -optional_nodiscard optional_constexpr bool operator!=( nullopt_t /*unused*/, optional const & x ) optional_noexcept -{ - return bool(x); -} - -template< typename T > -optional_nodiscard optional_constexpr bool operator<( optional const & /*unused*/, nullopt_t /*unused*/ ) optional_noexcept -{ - return false; -} - -template< typename T > -optional_nodiscard optional_constexpr bool operator<( nullopt_t /*unused*/, optional const & x ) optional_noexcept -{ - return bool(x); -} - -template< typename T > -optional_nodiscard optional_constexpr bool operator<=( optional const & x, nullopt_t /*unused*/ ) optional_noexcept -{ - return (!x); -} - -template< typename T > -optional_nodiscard optional_constexpr bool operator<=( nullopt_t /*unused*/, optional const & /*unused*/ ) optional_noexcept -{ - return true; -} - -template< typename T > -optional_nodiscard optional_constexpr bool operator>( optional const & x, nullopt_t /*unused*/ ) optional_noexcept -{ - return bool(x); -} - -template< typename T > -optional_nodiscard optional_constexpr bool operator>( nullopt_t /*unused*/, optional const & /*unused*/ ) optional_noexcept -{ - return false; -} - -template< typename T > -optional_nodiscard optional_constexpr bool operator>=( optional const & /*unused*/, nullopt_t /*unused*/ ) optional_noexcept -{ - return true; -} - -template< typename T > -optional_nodiscard optional_constexpr bool operator>=( nullopt_t /*unused*/, optional const & x ) optional_noexcept -{ - return (!x); -} - -// Comparison with T - -template< typename T, typename U > -optional_nodiscard optional_constexpr bool operator==( optional const & x, U const & v ) -{ - return bool(x) ? *x == v : false; -} - -template< typename T, typename U > -optional_nodiscard optional_constexpr bool operator==( U const & v, optional const & x ) -{ - return bool(x) ? v == *x : false; -} - -template< typename T, typename U > -optional_nodiscard optional_constexpr bool operator!=( optional const & x, U const & v ) -{ - return bool(x) ? *x != v : true; -} - -template< typename T, typename U > -optional_nodiscard optional_constexpr bool operator!=( U const & v, optional const & x ) -{ - return bool(x) ? v != *x : true; -} - -template< typename T, typename U > -optional_nodiscard optional_constexpr bool operator<( optional const & x, U const & v ) -{ - return bool(x) ? *x < v : true; -} - -template< typename T, typename U > -optional_nodiscard optional_constexpr bool operator<( U const & v, optional const & x ) -{ - return bool(x) ? v < *x : false; -} - -template< typename T, typename U > -optional_nodiscard optional_constexpr bool operator<=( optional const & x, U const & v ) -{ - return bool(x) ? *x <= v : true; -} - -template< typename T, typename U > -optional_nodiscard optional_constexpr bool operator<=( U const & v, optional const & x ) -{ - return bool(x) ? v <= *x : false; -} - -template< typename T, typename U > -optional_nodiscard optional_constexpr bool operator>( optional const & x, U const & v ) -{ - return bool(x) ? *x > v : false; -} - -template< typename T, typename U > -optional_nodiscard optional_constexpr bool operator>( U const & v, optional const & x ) -{ - return bool(x) ? v > *x : true; -} - -template< typename T, typename U > -optional_nodiscard optional_constexpr bool operator>=( optional const & x, U const & v ) -{ - return bool(x) ? *x >= v : false; -} - -template< typename T, typename U > -optional_nodiscard optional_constexpr bool operator>=( U const & v, optional const & x ) -{ - return bool(x) ? v >= *x : true; -} - -// Specialized algorithms - -template< typename T -#if optional_CPP11_OR_GREATER - optional_REQUIRES_T( - std11::is_move_constructible::value - && std17::is_swappable::value ) -#endif -> -void swap( optional & x, optional & y ) -#if optional_CPP11_OR_GREATER - noexcept( noexcept( x.swap(y) ) ) -#endif -{ - x.swap( y ); -} - -#if optional_CPP11_OR_GREATER - -template< typename T > -optional_constexpr optional< typename std::decay::type > make_optional( T && value ) -{ - return optional< typename std::decay::type >( std::forward( value ) ); -} - -template< typename T, typename...Args > -optional_constexpr optional make_optional( Args&&... args ) -{ - return optional( nonstd_lite_in_place(T), std::forward(args)...); -} - -template< typename T, typename U, typename... Args > -optional_constexpr optional make_optional( std::initializer_list il, Args&&... args ) -{ - return optional( nonstd_lite_in_place(T), il, std::forward(args)...); -} - -#else - -template< typename T > -optional make_optional( T const & value ) -{ - return optional( value ); -} - -#endif // optional_CPP11_OR_GREATER - -} // namespace optional_lite - -using optional_lite::optional; -using optional_lite::nullopt_t; -using optional_lite::nullopt; - -#if ! optional_CONFIG_NO_EXCEPTIONS -using optional_lite::bad_optional_access; -#endif - -using optional_lite::make_optional; - -} // namespace nonstd - -#if optional_CPP11_OR_GREATER - -// specialize the std::hash algorithm: - -namespace std { - -template< class T > -struct hash< nonstd::optional > -{ -public: - std::size_t operator()( nonstd::optional const & v ) const optional_noexcept - { - return bool( v ) ? std::hash{}( *v ) : 0; - } -}; - -} //namespace std - -#endif // optional_CPP11_OR_GREATER - -#if defined(__clang__) -# pragma clang diagnostic pop -#elif defined(__GNUC__) -# pragma GCC diagnostic pop -#elif defined(_MSC_VER ) -# pragma warning( pop ) -#endif - -#endif // optional_USES_STD_OPTIONAL - -#endif // NONSTD_OPTIONAL_LITE_HPP diff --git a/graphics/asymptote/LspCpp/LibLsp/JsonRpc/serializer.cpp b/graphics/asymptote/LspCpp/LibLsp/JsonRpc/serializer.cpp deleted file mode 100644 index 356d803b5d..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/JsonRpc/serializer.cpp +++ /dev/null @@ -1,214 +0,0 @@ -#include "serializer.h" -#include -#include -#include "json.h" - - - -//// Elementary types - -void JsonNull::swap(JsonNull& arg) noexcept -{ -} - - -void Reflect(Reader& visitor, uint8_t& value) { - if (!visitor.IsInt()) - throw std::invalid_argument("uint8_t"); - value = (uint8_t)visitor.GetInt(); -} -void Reflect(Writer& visitor, uint8_t& value) { - visitor.Int(value); -} - -void Reflect(Reader& visitor, short& value) { - if (!visitor.IsInt()) - throw std::invalid_argument("short"); - value = (short)visitor.GetInt(); -} -void Reflect(Writer& visitor, short& value) { - visitor.Int(value); -} - -void Reflect(Reader& visitor, unsigned short& value) { - if (!visitor.IsInt()) - throw std::invalid_argument("unsigned short"); - value = (unsigned short)visitor.GetInt(); -} -void Reflect(Writer& visitor, unsigned short& value) { - visitor.Int(value); -} - -void Reflect(Reader& visitor, int& value) { - if (!visitor.IsInt()) - throw std::invalid_argument("int"); - value = visitor.GetInt(); -} -void Reflect(Writer& visitor, int& value) { - visitor.Int(value); -} - -void Reflect(Reader& visitor, unsigned& value) { - if (!visitor.IsUint64()) - throw std::invalid_argument("unsigned"); - value = visitor.GetUint32(); -} -void Reflect(Writer& visitor, unsigned& value) { - visitor.Uint32(value); -} - -void Reflect(Reader& visitor, long& value) { - if (!visitor.IsInt64()) - throw std::invalid_argument("long"); - value = long(visitor.GetInt64()); -} -void Reflect(Writer& visitor, long& value) { - visitor.Int64(value); -} - -void Reflect(Reader& visitor, unsigned long& value) { - if (!visitor.IsUint64()) - throw std::invalid_argument("unsigned long"); - value = (unsigned long)visitor.GetUint64(); -} -void Reflect(Writer& visitor, unsigned long& value) { - visitor.Uint64(value); -} - -void Reflect(Reader& visitor, long long& value) { - if (!visitor.IsInt64()) - throw std::invalid_argument("long long"); - value = visitor.GetInt64(); -} -void Reflect(Writer& visitor, long long& value) { - visitor.Int64(value); -} - -void Reflect(Reader& visitor, unsigned long long& value) { - if (!visitor.IsUint64()) - throw std::invalid_argument("unsigned long long"); - value = visitor.GetUint64(); -} -void Reflect(Writer& visitor, unsigned long long& value) { - visitor.Uint64(value); -} - -void Reflect(Reader& visitor, double& value) { - if (!visitor.IsNumber()) - throw std::invalid_argument("double"); - value = visitor.GetDouble(); -} -void Reflect(Writer& visitor, double& value) { - visitor.Double(value); -} - -void Reflect(Reader& visitor, bool& value) { - if (!visitor.IsBool()) - throw std::invalid_argument("bool"); - value = visitor.GetBool(); -} -void Reflect(Writer& visitor, bool& value) { - visitor.Bool(value); -} - -void Reflect(Reader& visitor, std::string& value) { - if (!visitor.IsString()) - throw std::invalid_argument("std::string"); - value = visitor.GetString(); -} -void Reflect(Writer& visitor, std::string& value) { - visitor.String(value.c_str(), (rapidjson::SizeType)value.size()); -} - -void Reflect(Reader& visitor, JsonNull& value) { - visitor.GetNull(); -} - -void Reflect(Writer& visitor, JsonNull& value) { - visitor.Null(); -} - - -void Reflect(Reader& visitor, SerializeFormat& value) { - std::string fmt = visitor.GetString(); - value = fmt[0] == 'm' ? SerializeFormat::MessagePack : SerializeFormat::Json; -} - -void Reflect(Writer& visitor, SerializeFormat& value) { - switch (value) { - case SerializeFormat::Json: - visitor.String("json"); - break; - case SerializeFormat::MessagePack: - visitor.String("msgpack"); - break; - } -} - - -std::string JsonReader::ToString() const -{ - rapidjson::StringBuffer strBuf; - strBuf.Clear(); - rapidjson::Writer writer(strBuf); - m_->Accept(writer); - std::string strJson = strBuf.GetString(); - return strJson; -} - -void JsonReader::IterMap(std::function fn) -{ - path_.push_back("0"); - for (auto& entry : m_->GetObject()) - { - auto saved = m_; - m_ = &(entry.value); - - fn(entry.name.GetString(), *this); - m_ = saved; - } - path_.pop_back(); -} - - void JsonReader::IterArray(std::function fn) -{ - if (!m_->IsArray()) - throw std::invalid_argument("array"); - // Use "0" to indicate any element for now. - path_.push_back("0"); - for (auto& entry : m_->GetArray()) - { - auto saved = m_; - m_ = &entry; - fn(*this); - m_ = saved; - } - path_.pop_back(); -} - -void JsonReader::DoMember(const char* name, std::function fn) -{ - path_.push_back(name); - auto it = m_->FindMember(name); - if (it != m_->MemberEnd()) - { - auto saved = m_; - m_ = &it->value; - fn(*this); - m_ = saved; - } - path_.pop_back(); -} - -std::string JsonReader::GetPath() const -{ - std::string ret; - for (auto& t : path_) - { - ret += '/'; - ret += t; - } - ret.pop_back(); - return ret; -} - diff --git a/graphics/asymptote/LspCpp/LibLsp/JsonRpc/serializer.h b/graphics/asymptote/LspCpp/LibLsp/JsonRpc/serializer.h deleted file mode 100644 index 10456f40b5..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/JsonRpc/serializer.h +++ /dev/null @@ -1,378 +0,0 @@ -#pragma once - - -#include -#ifdef boost -#include "optional.hpp" -#else -#include -#endif -#include -#include -#include -#include -#include -#include -#include -#include - - -struct AbsolutePath; - -enum class SerializeFormat { Json, MessagePack }; - -// A tag type that can be used to write `null` to json. -struct JsonNull -{ - void swap(JsonNull& arg) noexcept; -}; - - - -class Reader { -public: - virtual ~Reader() {} - virtual SerializeFormat Format() const = 0; - - virtual bool IsBool() = 0; - virtual bool IsNull() = 0; - virtual bool IsArray() = 0; - virtual bool IsInt() = 0; - virtual bool IsInt64() = 0; - virtual bool IsUint64() = 0; - virtual bool IsDouble() = 0; - virtual bool IsNumber() = 0; - virtual bool IsString() = 0; - - virtual void GetNull() = 0; - virtual bool GetBool() = 0; - virtual int GetInt() = 0; - virtual uint32_t GetUint32() = 0; - virtual int64_t GetInt64() = 0; - virtual uint64_t GetUint64() = 0; - virtual double GetDouble() = 0; - virtual std::string GetString() = 0; - - virtual bool HasMember(const char* x) = 0; - virtual std::unique_ptr operator[](const char* x) = 0; - virtual void IterMap( std::function fn) = 0; - virtual void IterArray(std::function fn) = 0; - virtual void DoMember(const char* name, std::function fn) = 0; - virtual std::string ToString() const = 0; -}; - - - -class Writer { -public: - virtual ~Writer() {} - virtual SerializeFormat Format() const = 0; - - virtual void Null() = 0; - virtual void Bool(bool x) = 0; - virtual void Int(int x) = 0; - virtual void Uint32(uint32_t x) = 0; - virtual void Int64(int64_t x) = 0; - virtual void Uint64(uint64_t x) = 0; - virtual void Double(double x) = 0; - virtual void String(const char* x) = 0; - virtual void String(const char* x, size_t len) = 0; - virtual void StartArray(size_t) = 0; - virtual void EndArray() = 0; - virtual void StartObject() = 0; - virtual void EndObject() = 0; - virtual void Key(const char* name) = 0; -}; - - - -struct optionals_mandatory_tag {}; - -#define REFLECT_MEMBER_START() ReflectMemberStart(visitor, value) -#define REFLECT_MEMBER_END() ReflectMemberEnd(visitor, value); -#define REFLECT_MEMBER_END1(value) ReflectMemberEnd(visitor, value); -#define REFLECT_MEMBER(name) ReflectMember(visitor, #name, value.name) -#define REFLECT_MEMBER_OPTIONALS(name) \ - ReflectMember(visitor, #name, value.name, optionals_mandatory_tag{}) -#define REFLECT_MEMBER2(name, value) ReflectMember(visitor, name, value) - -#define MAKE_REFLECT_TYPE_PROXY(type_name) \ - MAKE_REFLECT_TYPE_PROXY2(type_name, std::underlying_type::type) -#define MAKE_REFLECT_TYPE_PROXY2(type, as_type) \ - inline void Reflect(Reader& visitor, type& value) { \ - as_type value0; \ - ::Reflect(visitor, value0); \ - value = static_cast(value0); \ - } \ - inline void Reflect(Writer& visitor, type& value) { \ - auto value0 = static_cast(value); \ - ::Reflect(visitor, value0); \ - } - -#define _MAPPABLE_REFLECT_MEMBER(name) REFLECT_MEMBER(name); -#define _MAPPABLE_REFLECT_MEMBER_OPTIONALS(name) REFLECT_MEMBER_OPTIONALS(name); - -#define MAKE_REFLECT_EMPTY_STRUCT(type, ...) \ - template \ - void Reflect(TVisitor& visitor, type& value) { \ - REFLECT_MEMBER_START(); \ - REFLECT_MEMBER_END(); \ - } - -#define MAKE_REFLECT_STRUCT(type, ...) \ - template \ - void Reflect(TVisitor& visitor, type& value) { \ - REFLECT_MEMBER_START(); \ - MACRO_MAP(_MAPPABLE_REFLECT_MEMBER, __VA_ARGS__) \ - REFLECT_MEMBER_END(); \ - } - - -#define _MAPPABLE_SWAP_MEMBER(name) std::swap(name,arg.name); - -#define MAKE_SWAP_METHOD(type, ...) \ -void swap(type& arg) noexcept{ \ - MACRO_MAP(_MAPPABLE_SWAP_MEMBER, __VA_ARGS__) \ -} - -#define MAKE_REFLECT_STRUCT_OPTIONALS_MANDATORY(type, ...) \ - template \ - void Reflect(TVisitor& visitor, type& value) { \ - REFLECT_MEMBER_START(); \ - MACRO_MAP(_MAPPABLE_REFLECT_MEMBER_OPTIONALS, __VA_ARGS__) \ - REFLECT_MEMBER_END(); \ - } - -// clang-format off -// Config has many fields, we need to support at least its number of fields. -#define NUM_VA_ARGS_IMPL(_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,_20,_21,_22,_23,_24,_25,_26,_27,_28,_29,_30,N,...) N -#define NUM_VA_ARGS(...) NUM_VA_ARGS_IMPL(__VA_ARGS__,30,29,28,27,26,25,24,23,22,21,20,19,18,17,16,15,14,13,12,11,10,9,8,7,6,5,4,3,2,1) -// clang-format on - -#define _MAPPABLE_REFLECT_ARRAY(name) Reflect(visitor, value.name); - -// Reflects the struct so it is serialized as an array instead of an object. -// This currently only supports writers. -#define MAKE_REFLECT_STRUCT_WRITER_AS_ARRAY(type, ...) \ - inline void Reflect(Writer& visitor, type& value) { \ - visitor.StartArray(NUM_VA_ARGS(__VA_ARGS__)); \ - MACRO_MAP(_MAPPABLE_REFLECT_ARRAY, __VA_ARGS__) \ - visitor.EndArray(); \ - } - -//// Elementary types - -void Reflect(Reader& visitor, uint8_t& value); -void Reflect(Writer& visitor, uint8_t& value); - -void Reflect(Reader& visitor, short& value); -void Reflect(Writer& visitor, short& value); - -void Reflect(Reader& visitor, unsigned short& value); -void Reflect(Writer& visitor, unsigned short& value); - -void Reflect(Reader& visitor, int& value); -void Reflect(Writer& visitor, int& value); - -void Reflect(Reader& visitor, unsigned& value); -void Reflect(Writer& visitor, unsigned& value); - -void Reflect(Reader& visitor, long& value); -void Reflect(Writer& visitor, long& value); - -void Reflect(Reader& visitor, unsigned long& value); -void Reflect(Writer& visitor, unsigned long& value); - -void Reflect(Reader& visitor, long long& value); -void Reflect(Writer& visitor, long long& value); - -void Reflect(Reader& visitor, unsigned long long& value); -void Reflect(Writer& visitor, unsigned long long& value); - -void Reflect(Reader& visitor, double& value); -void Reflect(Writer& visitor, double& value); - -void Reflect(Reader& visitor, bool& value); -void Reflect(Writer& visitor, bool& value); - -void Reflect(Reader& visitor, std::string& value); -void Reflect(Writer& visitor, std::string& value); - -void Reflect(Reader& visitor, JsonNull& value); -void Reflect(Writer& visitor, JsonNull& value); - -void Reflect(Reader& visitor, SerializeFormat& value); -void Reflect(Writer& visitor, SerializeFormat& value); - -//// Type constructors - -template -void Reflect(Reader& visitor, boost::optional& value) { - if (visitor.IsNull()) { - visitor.GetNull(); - return; - } - T real_value; - Reflect(visitor, real_value); - value = std::move(real_value); -} -template -void Reflect(Writer& visitor, boost::optional& value) { - if (value) - Reflect(visitor, *value); - else - visitor.Null(); -} - - -template -void ReflectMember(Writer& visitor, const char* name, boost::optional& value) { - // For TypeScript optional property key?: value in the spec, - // We omit both key and value if value is std::nullopt (null) for JsonWriter - // to reduce output. But keep it for other serialization formats. - if (value || visitor.Format() != SerializeFormat::Json) { - visitor.Key(name); - Reflect(visitor, value); - } -} - - - -template -void ReflectMember(Writer& visitor, - const char* name, - T& value, - optionals_mandatory_tag) { - visitor.Key(name); - Reflect(visitor, value); -} -template -void ReflectMember(Reader& visitor, - const char* name, - T& value, - optionals_mandatory_tag) { - Reflect(visitor, value); -} - -template -void Reflect(Reader& visitor, std::map& value) -{ - visitor.IterMap([&](const char* name,Reader& entry) { - T entry_value; - Reflect(entry, entry_value); - value[name]=(std::move(entry_value)); - }); -} -template -void Reflect(Writer& visitor, std::map& value) -{ - REFLECT_MEMBER_START(); - for (auto& it : value) - { - visitor.Key(it.first.c_str()); - Reflect(visitor, it.second); - } - REFLECT_MEMBER_END(); -} - -// std::vector -template -void Reflect(Reader& visitor, std::vector& values) { - visitor.IterArray([&](Reader& entry) { - T entry_value; - Reflect(entry, entry_value); - values.push_back(std::move(entry_value)); - }); -} - - -template -void Reflect(Writer& visitor, std::vector& values) { - visitor.StartArray(values.size()); - for (auto& value : values) - Reflect(visitor, value); - visitor.EndArray(); -} - -// ReflectMember - -inline void DefaultReflectMemberStart(Writer& visitor) { - visitor.StartObject(); -} -inline void DefaultReflectMemberStart(Reader& visitor) {} - -template -bool ReflectMemberStart(Reader& visitor, T& value) { - return false; -} -template -bool ReflectMemberStart(Writer& visitor, T& value) { - visitor.StartObject(); - return true; -} - -template -void ReflectMemberEnd(Reader& visitor, T& value) {} -template -void ReflectMemberEnd(Writer& visitor, T& value) { - visitor.EndObject(); -} - -template -void ReflectMember(Reader& visitor, const char* name, T& value) { - visitor.DoMember(name, [&](Reader& child) { Reflect(child, value); }); -} -template -void ReflectMember(Writer& visitor, const char* name, T& value) { - visitor.Key(name); - Reflect(visitor, value); -} - -template -void Reflect(Writer& visitor, std::pair< boost::optional<_Ty1>, boost::optional<_Ty2> >& value) -{ - if (value.first) - { - Reflect(visitor, value.first); - } - else - { - Reflect(visitor, value.second); - } -} -template -void Reflect(Reader& visitor, std::pair< boost::optional, boost::optional<_Ty2> >& value) -{ - if(visitor.IsBool()) - { - Reflect(visitor, value.first); - return; - } - - Reflect(visitor, value.second); -} -template -void Reflect(Reader& visitor, std::pair< boost::optional, boost::optional<_Ty2> >& value) -{ - if (visitor.IsString()) - { - Reflect(visitor, value.first); - return; - } - - Reflect(visitor, value.second); -} - - -template -void Reflect(Reader& visitor, std::pair< boost::optional<_Ty1>, boost::optional<_Ty2> >& value) -{ - try - { - Reflect(visitor, value.second); - } - catch (...) - { - Reflect(visitor, value.first); - } -} diff --git a/graphics/asymptote/LspCpp/LibLsp/JsonRpc/stream.h b/graphics/asymptote/LspCpp/LibLsp/JsonRpc/stream.h deleted file mode 100644 index 549c361950..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/JsonRpc/stream.h +++ /dev/null @@ -1,196 +0,0 @@ -#pragma once -#include -#include -namespace lsp -{ - class stream - { - public: - virtual ~stream() = default; - virtual bool fail() = 0; - virtual bool bad() = 0; - virtual bool eof() = 0; - virtual bool good() = 0; - virtual void clear() = 0; - virtual std::string what() = 0; - virtual bool need_to_clear_the_state() - { - return false; - } - - bool operator!() - { - return bad(); - } - }; - class istream : public stream - { - public: - virtual int get() = 0; - virtual ~istream() = default; - virtual istream& read(char* str, std::streamsize count) = 0; - }; - template - class base_istream : public istream - { - public: - explicit base_istream(T& _t) :_impl(_t) - { - - } - - int get() override - { - return _impl.get(); - } - bool fail() override - { - return _impl.fail(); - } - bool bad() override - { - return _impl.bad(); - } - bool eof() override - { - return _impl.eof(); - } - bool good() override - { - return _impl.good(); - } - istream& read(char* str, std::streamsize count) override - { - _impl.read(str, count); - return *this; - } - - void clear() override - { - _impl.clear(); - } - T& _impl; - }; - class ostream : public stream - { - public: - virtual ~ostream() = default; - - virtual ostream& write(const std::string&) = 0; - virtual ostream& write(std::streamsize) = 0; - virtual ostream& flush() = 0; - - }; - template - class base_ostream : public ostream - { - public: - explicit base_ostream(T& _t) :_impl(_t) - { - - } - - bool fail() override - { - return _impl.fail(); - } - bool good() override - { - return _impl.good(); - } - bool bad() override - { - return _impl.bad(); - } - bool eof() override - { - return _impl.eof(); - } - - ostream& write(const std::string& c) override - { - _impl << c; - return *this; - } - - ostream& write(std::streamsize _s) override - { - - _impl << std::to_string(_s); - return *this; - } - - ostream& flush() override - { - _impl.flush(); - return *this; - } - - void clear() override - { - _impl.clear(); - } - protected: - T& _impl; - }; - - template - class base_iostream : public istream, public ostream - { - public: - explicit base_iostream(T& _t) :_impl(_t) - { - - } - - int get() override - { - return _impl.get(); - } - bool fail() override - { - return _impl.fail(); - } - bool bad() override - { - return _impl.bad(); - } - bool eof() override - { - return _impl.eof(); - } - bool good() override - { - return _impl.good(); - } - istream& read(char* str, std::streamsize count) override - { - _impl.read(str, count); - return *this; - } - ostream& write(const std::string& c) override - { - _impl << c; - return *this; - } - - ostream& write(std::streamsize _s) override - { - _impl << std::to_string(_s); - return *this; - } - - ostream& flush() override - { - _impl.flush(); - return *this; - } - - void clear() override - { - _impl.clear(); - } - protected: - T& _impl; - }; -} diff --git a/graphics/asymptote/LspCpp/LibLsp/JsonRpc/threaded_queue.cpp b/graphics/asymptote/LspCpp/LibLsp/JsonRpc/threaded_queue.cpp deleted file mode 100644 index 17e965eadf..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/JsonRpc/threaded_queue.cpp +++ /dev/null @@ -1,20 +0,0 @@ -#include "threaded_queue.h" - -// static -bool MultiQueueWaiter::HasState( - std::initializer_list queues) { - for (BaseThreadQueue* queue : queues) { - if (!queue->IsEmpty()) - return true; - } - return false; -} - -bool MultiQueueWaiter::ValidateWaiter( - std::initializer_list queues) { - for (BaseThreadQueue* queue : queues) { - if (queue->waiter.get() != this) - return false; - } - return true; -} diff --git a/graphics/asymptote/LspCpp/LibLsp/JsonRpc/threaded_queue.h b/graphics/asymptote/LspCpp/LibLsp/JsonRpc/threaded_queue.h deleted file mode 100644 index cca9f9a486..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/JsonRpc/threaded_queue.h +++ /dev/null @@ -1,249 +0,0 @@ -#pragma once - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - - -struct MultiQueueWaiter; - -struct BaseThreadQueue { - virtual ~BaseThreadQueue() = default; - - virtual bool IsEmpty() = 0; - - std::shared_ptr waiter; -}; - -// std::lock accepts two or more arguments. We define an overload for one -// argument. -namespace std { -template -void lock(Lockable& l) { - l.lock(); -} -} // namespace std - -template -struct MultiQueueLock { - MultiQueueLock(Queue... lockable) : tuple_{lockable...} { lock(); } - ~MultiQueueLock() { unlock(); } - void lock() { lock_impl(typename std::index_sequence_for{}); } - void unlock() { unlock_impl(typename std::index_sequence_for{}); } - - private: - template - void lock_impl(std::index_sequence) { - std::lock(std::get(tuple_)->mutex...); - } - - template - void unlock_impl(std::index_sequence) { - (void)std::initializer_list{ - (std::get(tuple_)->mutex.unlock(), 0)...}; - } - - std::tuple tuple_; -}; - -struct MultiQueueWaiter { - static bool HasState(std::initializer_list queues); - - bool ValidateWaiter(std::initializer_list queues); - - template - bool Wait(std::atomic& quit, BaseThreadQueue... queues) { - MultiQueueLock l(queues...); - while (!quit.load(std::memory_order_relaxed)) { - if (HasState({ queues... })) - return false; - cv.wait(l); - } - return true; - } - template - void WaitUntil(std::chrono::steady_clock::time_point t, - BaseThreadQueue... queues) { - MultiQueueLock l(queues...); - if (!HasState({ queues... })) - cv.wait_until(l, t); - } - template - void Wait(BaseThreadQueue... queues) { - assert(ValidateWaiter({queues...})); - - MultiQueueLock l(queues...); - while (!HasState({queues...})) - cv.wait(l); - } - - std::condition_variable_any cv; -}; - -// A threadsafe-queue. http://stackoverflow.com/a/16075550 -template -struct ThreadedQueue : public BaseThreadQueue { - public: - ThreadedQueue() : ThreadedQueue(std::make_shared()) {} - - explicit ThreadedQueue(std::shared_ptr waiter) - : total_count_(0) { - this->waiter = waiter; - } - - // Returns the number of elements in the queue. This is lock-free. - size_t Size() const { return total_count_; } - - // Add an element to the queue. - void Enqueue(T&& t, bool priority) { - { - std::lock_guard lock(mutex); - if (priority) - priority_.push_back(std::move(t)); - else - queue_.push_back(std::move(t)); - ++total_count_; - } - waiter->cv.notify_one(); - } - - // Add a set of elements to the queue. - void EnqueueAll(std::vector&& elements, bool priority) { - if (elements.empty()) - return; - - { - std::lock_guard lock(mutex); - total_count_ += elements.size(); - for (T& element : elements) { - if (priority) - priority_.push_back(std::move(element)); - else - queue_.push_back(std::move(element)); - } - elements.clear(); - } - - waiter->cv.notify_all(); - } - - // Returns true if the queue is empty. This is lock-free. - bool IsEmpty() { return total_count_ == 0; } - - // Get the first element from the queue. Blocks until one is available. - T Dequeue() { - std::unique_lock lock(mutex); - waiter->cv.wait(lock, - [&]() { return !priority_.empty() || !queue_.empty(); }); - - auto execute = [&](std::deque* q) { - auto val = std::move(q->front()); - q->pop_front(); - --total_count_; - return std::move(val); - }; - if (!priority_.empty()) - return execute(&priority_); - return execute(&queue_); - } - - // Get the first element from the queue without blocking. Returns a null - // value if the queue is empty. - boost::optional TryDequeue(bool priority) { - std::lock_guard lock(mutex); - - auto pop = [&](std::deque* q) { - auto val = std::move(q->front()); - q->pop_front(); - --total_count_; - return std::move(val); - }; - - auto get_result = [&](std::deque* first, - std::deque* second) -> boost::optional { - if (!first->empty()) - return pop(first); - if (!second->empty()) - return pop(second); - return {}; - }; - - if (priority) - return get_result(&priority_, &queue_); - return get_result(&queue_, &priority_); - } - // Return all elements in the queue. - std::vector DequeueAll() { - std::lock_guard lock(mutex); - - total_count_ = 0; - - std::vector result; - result.reserve(priority_.size() + queue_.size()); - while (!priority_.empty()) { - result.emplace_back(std::move(priority_.front())); - priority_.pop_front(); - } - while (!queue_.empty()) { - result.emplace_back(std::move(queue_.front())); - queue_.pop_front(); - } - - return result; - } - std::vector TryDequeueSome(size_t num) { - std::lock_guard lock(mutex); - - std::vector result; - num = std::min(num, priority_.size() + queue_.size()); - total_count_ -= num; - result.reserve(num); - while (num) - { - if(!priority_.empty()) { - result.emplace_back(std::move(priority_.front())); - priority_.pop_front(); - } - else - { - break; - } - num -= 1; - } - while (num) - { - if (!queue_.empty()) { - result.emplace_back(std::move(queue_.front())); - queue_.pop_front(); - } - else - { - break; - } - num -= 1; - } - return result; - } - template - void Iterate(Fn fn) { - std::lock_guard lock(mutex); - for (auto& entry : priority_) - fn(entry); - for (auto& entry : queue_) - fn(entry); - } - - mutable std::mutex mutex; - - private: - std::atomic total_count_; - std::deque priority_; - std::deque queue_; -}; diff --git a/graphics/asymptote/LspCpp/LibLsp/JsonRpc/traits.h b/graphics/asymptote/LspCpp/LibLsp/JsonRpc/traits.h deleted file mode 100644 index ce8905a840..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/JsonRpc/traits.h +++ /dev/null @@ -1,158 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#pragma once - - -#include -#include - -namespace lsp { -namespace traits { - -// NthTypeOf returns the `N`th type in `Types` -template -using NthTypeOf = typename std::tuple_element>::type; - -// `IsTypeOrDerived::value` is true iff `T` is of type `BASE`, or -// derives from `BASE`. -template -using IsTypeOrDerived = std::integral_constant< - bool, - std::is_base_of::type>::value || - std::is_same::type>::value>; - -// `EachIsTypeOrDerived::value` is true iff all of the types in -// the std::tuple `TYPES` is of, or derives from the corresponding indexed type -// in the std::tuple `BASES`. -// `N` must be equal to the number of types in both the std::tuple `BASES` and -// `TYPES`. -template -struct EachIsTypeOrDerived { - using base = typename std::tuple_element::type; - using type = typename std::tuple_element::type; - using last_matches = IsTypeOrDerived; - using others_match = EachIsTypeOrDerived; - static constexpr bool value = last_matches::value && others_match::value; -}; - -// EachIsTypeOrDerived specialization for N = 1 -template -struct EachIsTypeOrDerived<1, BASES, TYPES> { - using base = typename std::tuple_element<0, BASES>::type; - using type = typename std::tuple_element<0, TYPES>::type; - static constexpr bool value = IsTypeOrDerived::value; -}; - -// EachIsTypeOrDerived specialization for N = 0 -template -struct EachIsTypeOrDerived<0, BASES, TYPES> { - static constexpr bool value = true; -}; - -// Signature describes the signature of a function. -template -struct Signature { - // The return type of the function signature - using ret = RETURN; - // The parameters of the function signature held in a std::tuple - using parameters = std::tuple; - // The type of the Nth parameter of function signature - template - using parameter = NthTypeOf; - // The total number of parameters - static constexpr std::size_t parameter_count = sizeof...(PARAMETERS); -}; - -// SignatureOf is a traits helper that infers the signature of the function, -// method, static method, lambda, or function-like object `F`. -template -struct SignatureOf { - // The signature of the function-like object `F` - using type = typename SignatureOf::type; -}; - -// SignatureOf specialization for a regular function or static method. -template -struct SignatureOf { - // The signature of the function-like object `F` - using type = Signature::type, - typename std::decay::type...>; -}; - -// SignatureOf specialization for a non-static method. -template -struct SignatureOf { - // The signature of the function-like object `F` - using type = Signature::type, - typename std::decay::type...>; -}; - -// SignatureOf specialization for a non-static, const method. -template -struct SignatureOf { - // The signature of the function-like object `F` - using type = Signature::type, - typename std::decay::type...>; -}; - -// SignatureOfT is an alias to `typename SignatureOf::type`. -template -using SignatureOfT = typename SignatureOf::type; - -// ParameterType is an alias to `typename SignatureOf::type::parameter`. -template -using ParameterType = typename SignatureOfT::template parameter; - -// `HasSignature::value` is true iff the function-like `F` has a matching -// signature to the function-like `S`. -template -using HasSignature = std::integral_constant< - bool, - std::is_same, SignatureOfT>::value>; - -// `Min::value` resolves to the smaller value of A and B. -template -using Min = std::integral_constant; - -// `CompatibleWith::value` is true iff the function-like `F` -// can be called with the argument types of the function-like `S`. Return type -// of the two functions are not considered. -template -using CompatibleWith = std::integral_constant< - bool, - (SignatureOfT::parameter_count == SignatureOfT::parameter_count) && - EachIsTypeOrDerived::parameter_count, - SignatureOfT::parameter_count>::value, - typename SignatureOfT::parameters, - typename SignatureOfT::parameters>::value>; - -// If `CONDITION` is true then EnableIf resolves to type T, otherwise an -// invalid type. -template -using EnableIf = typename std::enable_if::type; - -// If `BASE` is a base of `T` then EnableIfIsType resolves to type `TRUE`, -// otherwise an invalid type. -template -using EnableIfIsType = EnableIf::value, TRUE_>; - -// If the function-like `F` has a matching signature to the function-like `S` -// then EnableIfHasSignature resolves to type `TRUE`, otherwise an invalid type. -template -using EnableIfHasSignature = EnableIf::value, TRUE_>; - -} // namespace traits -} // namespace lsp - diff --git a/graphics/asymptote/LspCpp/LibLsp/lsp/AbsolutePath.h b/graphics/asymptote/LspCpp/LibLsp/lsp/AbsolutePath.h deleted file mode 100644 index ef1ee43860..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/lsp/AbsolutePath.h +++ /dev/null @@ -1,27 +0,0 @@ -#pragma once - -#include -#include - -struct AbsolutePath { - static AbsolutePath BuildDoNotUse(const std::string& path); - - // Try not to use this. - AbsolutePath(); - - // Provide implicit conversions to std::string for the time being. - AbsolutePath(const std::string& path, bool validate = true); - operator std::string() const; - - bool operator==(const AbsolutePath& rhs) const; - bool operator!=(const AbsolutePath& rhs) const; - bool operator<(const AbsolutePath& rhs) const; - bool operator>(const AbsolutePath& rhs) const; - std::string path; - bool qualify = true; -}; - - -void Reflect(Reader& visitor, AbsolutePath& value); -void Reflect(Writer& visitor, AbsolutePath& value); - diff --git a/graphics/asymptote/LspCpp/LibLsp/lsp/ClientPreferences.h b/graphics/asymptote/LspCpp/LibLsp/lsp/ClientPreferences.h deleted file mode 100644 index 7adf557f83..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/lsp/ClientPreferences.h +++ /dev/null @@ -1,306 +0,0 @@ -#pragma once -#include -#include -#include -#include -#include - -class ClientPreferences -{ -public: - - std::shared_ptr workspace; - lsTextDocumentClientCapabilities textDocument ; - - ClientPreferences(const lsClientCapabilities& capabilities) - { - v3supported = capabilities.textDocument.has_value(); - if (v3supported) - textDocument = capabilities.textDocument.value(); - if(capabilities.workspace) - { - workspace = std::make_shared(capabilities.workspace.value()); - } - } - - bool v3supported=false; - - bool isSignatureHelpSupported() { - - return v3supported && (textDocument.signatureHelp); - } - bool isWorkspaceDidChangeConfigurationSupported() const - { - return workspace && isDynamicRegistrationSupported(workspace->didChangeConfiguration); - } - bool isWorkspaceFoldersSupported() { - return workspace != nullptr && isTrue(workspace->workspaceFolders); - } - - bool isCompletionDynamicRegistered() { - return v3supported && isDynamicRegistrationSupported(textDocument.completion); - } - - bool isCompletionSnippetsSupported() { - //@formatter:off - if(!v3supported || !textDocument.completion) - { - return false; - } - const auto& completion = textDocument.completion.value(); - if(completion.completionItem) - { - return isTrue(completion.completionItem.value().snippetSupport); - } - return false; - } - - bool isV3Supported() { - return v3supported; - } - - bool isFormattingDynamicRegistrationSupported() { - return v3supported && isDynamicRegistrationSupported(textDocument.formatting); - } - - bool isRangeFormattingDynamicRegistrationSupported() { - return v3supported && isDynamicRegistrationSupported(textDocument.rangeFormatting); - } - - bool isOnTypeFormattingDynamicRegistrationSupported() { - return v3supported && isDynamicRegistrationSupported(textDocument.onTypeFormatting); - } - - bool isCodeLensDynamicRegistrationSupported() { - return v3supported && isDynamicRegistrationSupported(textDocument.codeLens); - } - - bool isSignatureHelpDynamicRegistrationSupported() { - return v3supported && isDynamicRegistrationSupported(textDocument.signatureHelp); - } - template - static bool isDynamicRegistrationSupported(boost::optional& capability) - { - if(capability) - return (capability.value().dynamicRegistration.value()); - return false; - } - - bool isTrue(const boost::optional& value) - { - return value.get_value_or(false); - } - - bool isRenameDynamicRegistrationSupported() { - return v3supported && isDynamicRegistrationSupported(textDocument.rename); - } - - bool isExecuteCommandDynamicRegistrationSupported() { - return v3supported && workspace != nullptr && isDynamicRegistrationSupported(workspace->executeCommand); - } - - bool isWorkspaceSymbolDynamicRegistered() { - return v3supported && workspace != nullptr && isDynamicRegistrationSupported(workspace->symbol); - } - - bool isWorkspaceChangeWatchedFilesDynamicRegistered() { - return v3supported && workspace != nullptr && isDynamicRegistrationSupported(workspace->didChangeWatchedFiles); - } - - bool isDocumentSymbolDynamicRegistered() { - return v3supported && isDynamicRegistrationSupported(textDocument.documentSymbol); - } - - bool isCodeActionDynamicRegistered() { - return v3supported && isDynamicRegistrationSupported(textDocument.codeAction); - } - - bool isDefinitionDynamicRegistered() { - return v3supported && isDynamicRegistrationSupported(textDocument.definition); - } - - bool isTypeDefinitionDynamicRegistered() { - return v3supported && isDynamicRegistrationSupported(textDocument.typeDefinition); - } - - bool isHoverDynamicRegistered() { - return v3supported && isDynamicRegistrationSupported(textDocument.hover); - } - - bool isReferencesDynamicRegistered() { - return v3supported && isDynamicRegistrationSupported(textDocument.references); - } - - bool isDocumentHighlightDynamicRegistered() { - return v3supported && isDynamicRegistrationSupported(textDocument.documentHighlight); - } - - bool isFoldgingRangeDynamicRegistered() { - return v3supported && isDynamicRegistrationSupported(textDocument.foldingRange); - } - - bool isImplementationDynamicRegistered() { - return v3supported && isDynamicRegistrationSupported(textDocument.implementation); - } - - bool isSelectionRangeDynamicRegistered() { - return v3supported && isDynamicRegistrationSupported(textDocument.selectionRange); - } - - bool isWillSaveRegistered() { - return v3supported && isTrue(textDocument.synchronization.willSave); - } - - bool isWillSaveWaitUntilRegistered() { - return v3supported && isTrue(textDocument.synchronization.willSaveWaitUntil); - } - - bool isWorkspaceApplyEditSupported() { - return workspace != nullptr && isTrue(workspace->applyEdit); - } - - bool isSupportsCompletionDocumentationMarkdown() { - - if (!v3supported || !textDocument.completion) - { - return false; - } - const auto& completion = textDocument.completion.value(); - if (completion.completionItem) - { - auto& documentationFormat = completion.completionItem.value().documentationFormat; - if(documentationFormat) - { - auto& data = documentationFormat.value(); - for(auto& it : data) - { - if(it == "markdown") - { - return true; - } - } - } - } - return false; - - } - - - bool isWorkspaceEditResourceChangesSupported() { - if(!workspace) return false; - - if(workspace->workspaceEdit) - { - return isTrue(workspace->workspaceEdit.value().resourceChanges); - } - return false; - } - static bool contains(const std::vector& v, const std::string& target) - { - for(auto& it : v) - { - if(it == target) return true; - } - return false; - } - bool isResourceOperationSupported() const - { - if (!workspace) return false; - if (!workspace->workspaceEdit) - { - return false; - } - auto& it = (workspace->workspaceEdit.value()); - if(!it.resourceOperations) return false; - const auto& resourceOperations = it.resourceOperations.value(); - return contains(resourceOperations, "create") && contains(resourceOperations, "rename") && contains(resourceOperations, "delete"); - - } - - /** - * {@code true} if the client has explicitly set the - * {@code textDocument.documentSymbol.hierarchicalDocumentSymbolSupport} to - * {@code true} when initializing the LS. Otherwise, {@code false}. - */ - bool isHierarchicalDocumentSymbolSupported() { - if(!v3supported || !textDocument.documentSymbol) return false; - return isTrue(textDocument.documentSymbol.value().hierarchicalDocumentSymbolSupport); - - } - - bool isSemanticHighlightingSupported() { - //@formatter:off - if (!v3supported || !textDocument.semanticHighlightingCapabilities) return false; - return isTrue(textDocument.semanticHighlightingCapabilities.value().semanticHighlighting); - //@formatter:on - } - - /** - * {@code true} if the client has explicitly set the - * {@code textDocument.codeAction.codeActionLiteralSupport.codeActionKind.valueSet} - * value. Otherwise, {@code false}. - */ - bool isSupportedCodeActionKind(const std::string& kind) { - if (!v3supported || !textDocument.codeAction) return false; - //@formatter:off - const auto& codeAction = textDocument.codeAction.value(); - if(codeAction.codeActionLiteralSupport) - { - const auto& codeActionKind = codeAction.codeActionLiteralSupport.value().codeActionKind; - if(codeActionKind) - { - const auto& valueSet = codeActionKind.value().valueSet; - if(valueSet) - { - for(auto& k : valueSet.value()) - { - if(lsp::StartsWith(kind,k)) - { - return true; - } - } - } - } - } - return false; - - //@formatter:on - } - - /** - * {@code true} if the client has explicitly set the - * {@code textDocument.publishDiagnostics.tagSupport} to - * {@code true} when initializing the LS. Otherwise, {@code false}. - */ - bool isDiagnosticTagSupported() { - if (!v3supported || !textDocument.publishDiagnostics) return false; - const auto& publishDiagnostics = textDocument.publishDiagnostics.value(); - if(publishDiagnostics.tagSupport) - { - isTagSupported(publishDiagnostics.tagSupport); - } - return false; - } - - bool isTagSupported(const boost::optional < std::pair, - boost::optional > >& tagSupport) { - if(tagSupport) - { - auto &v = tagSupport.value(); - if (v.first) - { - return v.first.value(); - } - if (v.second) { - return !v.second.value().valueSet.empty(); - } - } - return false; - } - - bool isCallHierarchyDynamicRegistered() { - return v3supported && isDynamicRegistrationSupported(textDocument.callHierarchy); - } - -}; - diff --git a/graphics/asymptote/LspCpp/LibLsp/lsp/CodeActionParams.h b/graphics/asymptote/LspCpp/LibLsp/lsp/CodeActionParams.h deleted file mode 100644 index a1e3f1dcc1..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/lsp/CodeActionParams.h +++ /dev/null @@ -1,114 +0,0 @@ -#pragma once -#include "LibLsp/lsp/method_type.h" -#include "LibLsp/JsonRpc/message.h" -#include "LibLsp/lsp/lsp_diagnostic.h" -#include "LibLsp/lsp/workspace/execute_command.h" -#include "LibLsp/lsp/lsTextDocumentIdentifier.h" -#include "LibLsp/lsp/lsCodeAction.h" -namespace JDT -{ - namespace CodeActionKind { - - - /** - * Base kind for quickfix actions: 'quickfix' - */ - extern const char* QuickFix; - - /** - * Base kind for refactoring actions: 'refactor' - */ - extern const char* Refactor; - - /** - * Base kind for refactoring extraction actions: 'refactor.extract' - * - * Example extract actions: - * - * - Extract method - Extract function - Extract variable - Extract interface - * from class - ... - */ - extern const char* RefactorExtract; - - /** - * Base kind for refactoring inline actions: 'refactor.inline' - * - * Example inline actions: - * - * - Inline function - Inline variable - Inline constant - ... - */ - extern const char* RefactorInline; - - /** - * Base kind for refactoring rewrite actions: 'refactor.rewrite' - * - * Example rewrite actions: - * - * - Convert JavaScript function to class - Add or remove parameter - - * Encapsulate field - Make method static - Move method to base class - ... - */ - extern const char* RefactorRewrite; - - /** - * Base kind for source actions: `source` - * - * Source code actions apply to the entire file. - */ - extern const char* Source ; - - /** - * Base kind for an organize imports source action: `source.organizeImports` - */ - extern const char* SourceOrganizeImports; - - extern const char* COMMAND_ID_APPLY_EDIT; - }; - - -} -struct lsCodeActionContext { - // An array of diagnostics. - std::vector diagnostics; - /** - * Requested kind of actions to return. - * - * Actions not of this kind are filtered out by the client before being shown. So servers - * can omit computing them. - * - * See {@link CodeActionKind} for allowed values. - */ - boost::optional> only; - - MAKE_SWAP_METHOD(lsCodeActionContext, - diagnostics, only); -}; -MAKE_REFLECT_STRUCT(lsCodeActionContext, - diagnostics, only); - - -// Params for the CodeActionRequest -struct lsCodeActionParams { - // The document in which the command was invoked. - lsTextDocumentIdentifier textDocument; - // The range for which the command was invoked. - lsRange range; - // Context carrying additional information. - lsCodeActionContext context; - - MAKE_SWAP_METHOD(lsCodeActionParams, - textDocument, - range, - context); -}; -MAKE_REFLECT_STRUCT(lsCodeActionParams, - textDocument, - range, - context); - - - - - - - - diff --git a/graphics/asymptote/LspCpp/LibLsp/lsp/Directory.h b/graphics/asymptote/LspCpp/LibLsp/lsp/Directory.h deleted file mode 100644 index 93f2c0807d..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/lsp/Directory.h +++ /dev/null @@ -1,13 +0,0 @@ -#pragma once -#include - -struct AbsolutePath; - -struct Directory { - explicit Directory(const AbsolutePath& path); - - bool operator==(const Directory& rhs) const; - bool operator!=(const Directory& rhs) const; - - std::string path; -}; diff --git a/graphics/asymptote/LspCpp/LibLsp/lsp/ExecuteCommandParams.h b/graphics/asymptote/LspCpp/LibLsp/lsp/ExecuteCommandParams.h deleted file mode 100644 index c06eed4b1c..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/lsp/ExecuteCommandParams.h +++ /dev/null @@ -1,20 +0,0 @@ -#pragma once - -#include "lsAny.h" -struct ExecuteCommandParams { - /** - * The identifier of the actual command handler. - */ - - std::string command; - - /** - * Arguments that the command should be invoked with. - * The arguments are typically specified when a command is returned from the server to the client. - * Example requests that return a command are textDocument/codeAction or textDocument/codeLens. - */ - boost::optional> arguments; - - MAKE_SWAP_METHOD(ExecuteCommandParams, command, arguments); -}; -MAKE_REFLECT_STRUCT(ExecuteCommandParams,command,arguments) diff --git a/graphics/asymptote/LspCpp/LibLsp/lsp/IProgressMonitor.h b/graphics/asymptote/LspCpp/LibLsp/lsp/IProgressMonitor.h deleted file mode 100644 index bf1337e44f..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/lsp/IProgressMonitor.h +++ /dev/null @@ -1,145 +0,0 @@ -#pragma once - - -#include -namespace lsp { -/** - * The IProgressMonitor interface is implemented - * by objects that monitor the progress of an activity; the methods - * in this interface are invoked by code that performs the activity. - *

- * All activity is broken down into a linear sequence of tasks against - * which progress is reported. When a task begins, a beginTask(const wstring&, int) - * notification is reported, followed by any number and mixture of - * progress reports (worked()) and subtask notifications - * (subTask(const wstring&)). When the task is eventually completed, a - * done() notification is reported. After the done() - * notification, the progress monitor cannot be reused; i.e., - * beginTask(const wstring&, int) cannot be called again after the call to - * done(). - *

- *

- * A request to cancel an operation can be signaled using the - * setCanceled method. Operations taking a progress - * monitor are expected to poll the monitor (using isCanceled) - * periodically and abort at their earliest convenience. Operation can however - * choose to ignore cancelation requests. - *

- *

- * Since notification is synchronous with the activity itself, the listener should - * provide a fast and robust implementation. If the handling of notifications would - * involve blocking operations, or operations which might throw uncaught exceptions, - * the notifications should be queued, and the actual processing deferred (or perhaps - * delegated to a separate thread). - *

- *

- * Clients may implement this interface. - *

- */ - class IProgressMonitor { - public: - virtual ~IProgressMonitor() - { - } - - /** Constant indicating an unknown amount of work. - */ - - const static int UNKNOWN = -1; - - /** - * Notifies that the main task is beginning. This must only be called once - * on a given progress monitor instance. - * - * @param name the name (or description) of the main task - * @param totalWork the total number of work units into which - * the main task is been subdivided. If the value is UNKNOWN - * the implemenation is free to indicate progress in a way which - * doesn't require the total number of work units in advance. - */ - virtual void beginTask(void* , int totalWork) - { - - }; - /** - * Notifies that the work is done; that is, either the main task is completed - * or the user canceled it. This method may be called more than once - * (implementations should be prepared to handle this case). - */ - - virtual void endTask(void*, int totalWork) - { - - } - - virtual void done(void*) = 0; - - /** - * Internal method to handle scaling correctly. This method - * must not be called by a client. Clients should - * always use the method worked(int). - */ - virtual void internalWorked(double work) - { - - } - /** - * Returns whether cancelation of current operation has been requested. - * Long-running operations should poll to see if cancelation - * has been requested. - * - * @return true if cancellation has been requested, - * and false otherwise - * @see #setCanceled - */ - virtual bool isCanceled() = 0; - /** - * Sets the cancel state to the given value. - * - * @param value true indicates that cancelation has - * been requested (but not necessarily acknowledged); - * false clears this flag - * - * @see #isCanceled - */ - virtual void setCanceled(bool value) = 0; - /** - * Sets the task name to the given value. This method is used to - * restore the task label after a nested operation was executed. - * Normally there is no need for clients to call this method. - * - * @param name the name (or description) of the main task - * @see #beginTask(java.lang.const wstring&, int) - */ - virtual void setTaskName(void*) - { - - }; - /** - * Notifies that a subtask of the main task is beginning. - * Subtasks are optional; the main task might not have subtasks. - * - * @param name the name (or description) of the subtask - */ - virtual void subTask(void* ) - { - - } - /** - * Notifies that a given number of work unit of the main task - * has been completed. Note that this amount represents an - * installment, as opposed to a cumulative amount of work done - * to date. - * - * @param work the number of work units just completed - */ - virtual void worked(int work) - { - - }; - - virtual void catch_exception(void*) = 0; - }; -} - - diff --git a/graphics/asymptote/LspCpp/LibLsp/lsp/Markup/Markup.cpp b/graphics/asymptote/LspCpp/LibLsp/lsp/Markup/Markup.cpp deleted file mode 100644 index f65f8ad3ce..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/lsp/Markup/Markup.cpp +++ /dev/null @@ -1,942 +0,0 @@ -//===--- Markup.cpp -----------------------------------------*- C++-*------===// -// -// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -// See https://lsp.org/LICENSE.txt for license information. -// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -// -//===----------------------------------------------------------------------===// -#include "Markup.h" - -#include -#include -#include -#include -#include -#include -#include -#include - -namespace lsp { - - /// hexdigit - Return the hexadecimal character for the - /// given number \p X (which should be less than 16). - inline char hexdigit(unsigned X, bool LowerCase = false) { - const char HexChar = LowerCase ? 'a' : 'A'; - return X < 10 ? '0' + X : HexChar + X - 10; - } - - /// Given an array of c-style strings terminated by a null pointer, construct - /// a vector of StringRefs representing the same strings without the terminating - /// null string. - inline std::vector< std::string_ref> toStringRefArray(const char* const* Strings) { - std::vector< std::string_ref> Result; - while (*Strings) - Result.push_back(*Strings++); - return Result; - } - - /// Construct a string ref from a boolean. - inline std::string_ref toStringRef(bool B) { return std::string_ref(B ? "true" : "false"); } - - /// Construct a string ref from an array ref of unsigned chars. - inline std::string_ref toStringRef(const std::vector& Input) { - return std::string_ref(Input.begin(), Input.end()); - } - - /// Construct a string ref from an array ref of unsigned chars. - inline std::vector arrayRefFromStringRef(const std::string_ref& Input) { - return { Input.begin(), Input.end() }; - } - - /// Interpret the given character \p C as a hexadecimal digit and return its - /// value. - /// - /// If \p C is not a valid hex digit, -1U is returned. - inline unsigned hexDigitValue(char C) { - struct HexTable { - unsigned LUT[255] = {}; - constexpr HexTable() { - // Default initialize everything to invalid. - for (int i = 0; i < 255; ++i) - LUT[i] = ~0U; - // Initialize `0`-`9`. - for (int i = 0; i < 10; ++i) - LUT['0' + i] = i; - // Initialize `A`-`F` and `a`-`f`. - for (int i = 0; i < 6; ++i) - LUT['A' + i] = LUT['a' + i] = 10 + i; - } - }; - constexpr HexTable Table; - return Table.LUT[static_cast(C)]; - } - - /// Checks if character \p C is one of the 10 decimal digits. - inline bool isDigit(char C) { return C >= '0' && C <= '9'; } - - /// Checks if character \p C is a hexadecimal numeric character. - inline bool isHexDigit(char C) { return hexDigitValue(C) != ~0U; } - - /// Checks if character \p C is a valid letter as classified by "C" locale. - inline bool isAlpha(char C) { - return ('a' <= C && C <= 'z') || ('A' <= C && C <= 'Z'); - } - - /// Checks whether character \p C is either a decimal digit or an uppercase or - /// lowercase letter as classified by "C" locale. - inline bool isAlnum(char C) { return isAlpha(C) || isDigit(C); } - - /// Checks whether character \p C is valid ASCII (high bit is zero). - inline bool isASCII(char C) { return static_cast(C) <= 127; } - - /// Checks whether all characters in S are ASCII. - inline bool isASCII(std::string_ref S) { - for (char C : S) - { - if(!isASCII(C))return true; - } - return true; - } - - /// Checks whether character \p C is printable. - /// - /// Locale-independent version of the C standard library isprint whose results - /// may differ on different platforms. - inline bool isPrint(char C) { - unsigned char UC = static_cast(C); - return (0x20 <= UC) && (UC <= 0x7E); - } - - /// Checks whether character \p C is whitespace in the "C" locale. - /// - /// Locale-independent version of the C standard library isspace. - inline bool isSpace(char C) { - return C == ' ' || C == '\f' || C == '\n' || C == '\r' || C == '\t' || - C == '\v'; - } - - /// Returns the corresponding lowercase character if \p x is uppercase. - inline char toLower(char x) { - if (x >= 'A' && x <= 'Z') - return x - 'A' + 'a'; - return x; - } - - /// Returns the corresponding uppercase character if \p x is lowercase. - inline char toUpper(char x) { - if (x >= 'a' && x <= 'z') - return x - 'a' + 'A'; - return x; - } - - inline std::string utohexstr(uint64_t X, bool LowerCase = false) { - char Buffer[17]; - char* BufPtr = std::end(Buffer); - - if (X == 0) *--BufPtr = '0'; - - while (X) { - unsigned char Mod = static_cast(X) & 15; - *--BufPtr = hexdigit(Mod, LowerCase); - X >>= 4; - } - - return std::string(BufPtr, std::end(Buffer)); - } - - /// Convert buffer \p Input to its hexadecimal representation. - /// The returned string is double the size of \p Input. - inline std::string toHex( std::string_ref Input, bool LowerCase = false) { - static const char* const LUT = "0123456789ABCDEF"; - const uint8_t Offset = LowerCase ? 32 : 0; - size_t Length = Input.size(); - - std::string Output; - Output.reserve(2 * Length); - for (size_t i = 0; i < Length; ++i) { - const unsigned char c = Input[i]; - Output.push_back(LUT[c >> 4] | Offset); - Output.push_back(LUT[c & 15] | Offset); - } - return Output; - } - - inline std::string toHex(std::vector Input, bool LowerCase = false) { - return toHex(toStringRef(Input), LowerCase); - } - - /// Store the binary representation of the two provided values, \p MSB and - /// \p LSB, that make up the nibbles of a hexadecimal digit. If \p MSB or \p LSB - /// do not correspond to proper nibbles of a hexadecimal digit, this method - /// returns false. Otherwise, returns true. - inline bool tryGetHexFromNibbles(char MSB, char LSB, uint8_t& Hex) { - unsigned U1 = hexDigitValue(MSB); - unsigned U2 = hexDigitValue(LSB); - if (U1 == ~0U || U2 == ~0U) - return false; - - Hex = static_cast((U1 << 4) | U2); - return true; - } - - /// Return the binary representation of the two provided values, \p MSB and - /// \p LSB, that make up the nibbles of a hexadecimal digit. - inline uint8_t hexFromNibbles(char MSB, char LSB) { - uint8_t Hex = 0; - bool GotHex = tryGetHexFromNibbles(MSB, LSB, Hex); - (void)GotHex; - assert(GotHex && "MSB and/or LSB do not correspond to hex digits"); - return Hex; - } - - /// Convert hexadecimal string \p Input to its binary representation and store - /// the result in \p Output. Returns true if the binary representation could be - /// converted from the hexadecimal string. Returns false if \p Input contains - /// non-hexadecimal digits. The output string is half the size of \p Input. - inline bool tryGetFromHex( std::string_ref Input, std::string& Output) { - if (Input.empty()) - return true; - - Output.reserve((Input.size() + 1) / 2); - if (Input.size() % 2 == 1) { - uint8_t Hex = 0; - if (!tryGetHexFromNibbles('0', Input.front(), Hex)) - return false; - - Output.push_back(Hex); - Input = Input.drop_front(); - } - - assert(Input.size() % 2 == 0); - while (!Input.empty()) { - uint8_t Hex = 0; - if (!tryGetHexFromNibbles(Input[0], Input[1], Hex)) - return false; - - Output.push_back(Hex); - Input = Input.drop_front(2); - } - return true; - } - - /// Convert hexadecimal string \p Input to its binary representation. - /// The return string is half the size of \p Input. - inline std::string fromHex( std::string_ref Input) { - std::string Hex; - bool GotHex = tryGetFromHex(Input, Hex); - (void)GotHex; - assert(GotHex && "Input contains non hex digits"); - return Hex; - } - - - - inline std::string utostr(uint64_t X, bool isNeg = false) { - char Buffer[21]; - char* BufPtr = std::end(Buffer); - - if (X == 0) *--BufPtr = '0'; // Handle special case... - - while (X) { - *--BufPtr = '0' + char(X % 10); - X /= 10; - } - - if (isNeg) *--BufPtr = '-'; // Add negative sign... - return std::string(BufPtr, std::end(Buffer)); - } - - inline std::string itostr(int64_t X) { - if (X < 0) - return utostr(static_cast(1) + ~static_cast(X), true); - else - return utostr(static_cast(X)); - } - - /// StrInStrNoCase - Portable version of strcasestr. Locates the first - /// occurrence of string 's1' in string 's2', ignoring case. Returns - /// the offset of s2 in s1 or npos if s2 cannot be found. - std::string_ref::size_type StrInStrNoCase( std::string_ref s1, std::string_ref s2); - - /// getToken - This function extracts one token from source, ignoring any - /// leading characters that appear in the Delimiters string, and ending the - /// token at any of the characters that appear in the Delimiters string. If - /// there are no tokens in the source string, an empty string is returned. - /// The function returns a pair containing the extracted token and the - /// remaining tail string. - std::pair< std::string_ref, std::string_ref> getToken( std::string_ref Source, - std::string_ref Delimiters = " \t\n\v\f\r"); - - - - /// Returns the English suffix for an ordinal integer (-st, -nd, -rd, -th). - inline std::string_ref getOrdinalSuffix(unsigned Val) { - // It is critically important that we do this perfectly for - // user-written sequences with over 100 elements. - switch (Val % 100) { - case 11: - case 12: - case 13: - return "th"; - default: - switch (Val % 10) { - case 1: return "st"; - case 2: return "nd"; - case 3: return "rd"; - default: return "th"; - } - } - } - - namespace detail { - - template - inline std::string join_impl(IteratorT Begin, IteratorT End, - std::string_ref Separator, std::input_iterator_tag) { - std::string S; - if (Begin == End) - return S; - - S += (*Begin); - while (++Begin != End) { - S += Separator; - S += (*Begin); - } - return S; - } - - template - inline std::string join_impl(IteratorT Begin, IteratorT End, - std::string_ref Separator, std::forward_iterator_tag) { - std::string S; - if (Begin == End) - return S; - - size_t Len = (std::distance(Begin, End) - 1) * Separator.size(); - for (IteratorT I = Begin; I != End; ++I) - Len += (*I).size(); - S.reserve(Len); - size_t PrevCapacity = S.capacity(); - (void)PrevCapacity; - S += (*Begin); - while (++Begin != End) { - S += Separator; - S += (*Begin); - } - assert(PrevCapacity == S.capacity() && "String grew during building"); - return S; - } - - template - inline void join_items_impl(std::string& Result, Sep Separator) {} - - template - inline void join_items_impl(std::string& Result, Sep Separator, - const Arg& Item) { - Result += Item; - } - - template - inline void join_items_impl(std::string& Result, Sep Separator, const Arg1& A1, - Args &&... Items) { - Result += A1; - Result += Separator; - join_items_impl(Result, Separator, std::forward(Items)...); - } - - inline size_t join_one_item_size(char) { return 1; } - inline size_t join_one_item_size(const char* S) { return S ? ::strlen(S) : 0; } - - template inline size_t join_one_item_size(const T& Str) { - return Str.size(); - } - - inline size_t join_items_size() { return 0; } - - template inline size_t join_items_size(const A1& A) { - return join_one_item_size(A); - } - template - inline size_t join_items_size(const A1& A, Args &&... Items) { - return join_one_item_size(A) + join_items_size(std::forward(Items)...); - } - - } // end namespace detail - - /// Joins the strings in the range [Begin, End), adding Separator between - /// the elements. - template - inline std::string join(IteratorT Begin, IteratorT End, std::string_ref Separator) { - using tag = typename std::iterator_traits::iterator_category; - return detail::join_impl(Begin, End, Separator, tag()); - } - - /// Joins the strings in the range [R.begin(), R.end()), adding Separator - /// between the elements. - template - inline std::string join(Range&& R, std::string_ref Separator) { - return join(R.begin(), R.end(), Separator); - } - - /// Joins the strings in the parameter pack \p Items, adding \p Separator - /// between the elements. All arguments must be implicitly convertible to - /// std::string, or there should be an overload of std::string::operator+=() - /// that accepts the argument explicitly. - template - inline std::string join_items(Sep Separator, Args &&... Items) { - std::string Result; - if (sizeof...(Items) == 0) - return Result; - - size_t NS = detail::join_one_item_size(Separator); - size_t NI = detail::join_items_size(std::forward(Items)...); - Result.reserve(NI + (sizeof...(Items) - 1) * NS + 1); - detail::join_items_impl(Result, Separator, std::forward(Items)...); - return Result; - } - - /// A helper class to return the specified delimiter string after the first - /// invocation of operator std::string_ref(). Used to generate a comma-separated - /// list from a loop like so: - /// - /// \code - /// ListSeparator LS; - /// for (auto &I : C) - /// OS << LS << I.getName(); - /// \end - class ListSeparator { - bool First = true; - std::string_ref Separator; - - public: - ListSeparator( std::string_ref Separator = ", ") : Separator(Separator) {} - operator std::string_ref() { - if (First) { - First = false; - return {}; - } - return Separator; - } - }; - -} // end namespace lsp - -namespace lsp{ - -// Is ' || Contents.start_with("/>")) - return true; // May close the tag. - if (Contents.front() == '=') - return true; // Don't try to parse attribute values. - return false; // Random punctuation means this isn't a tag. - } - return true; // Potentially incomplete tag. -} - -// Tests whether C should be backslash-escaped in markdown. -// The string being escaped is Before + C + After. This is part of a paragraph. -// StartsLine indicates whether `Before` is the start of the line. -// After may not be everything until the end of the line. -// -// It's always safe to escape punctuation, but want minimal escaping. -// The strategy is to escape the first character of anything that might start -// a markdown grammar construct. -bool needsLeadingEscape(char C, std::string_ref Before, std::string_ref After, - bool StartsLine) { - - auto RulerLength = [&]() -> /*Length*/ unsigned { - if (!StartsLine || !Before.empty()) - return false; - std::string_ref A = After.trim_right(); - return std::all_of(A.begin(),A.end(), [C](char D) { return C == D; }) ? 1 + A.size() : 0; - }; - auto IsBullet = [&]() { - return StartsLine && Before.empty() && - (After.empty() || After.start_with(" ")); - }; - auto SpaceSurrounds = [&]() { - return (After.empty() || std::isspace(After.front())) && - (Before.empty() || std::isspace(Before.back())); - }; - - auto WordSurrounds = [&]() { - return (!After.empty() && std::isalnum(After.front())) && - (!Before.empty() && std::isalnum(Before.back())); - }; - - switch (C) { - case '\\': // Escaped character. - return true; - case '`': // Code block or inline code - // Any number of backticks can delimit an inline code block that can end - // anywhere (including on another line). We must escape them all. - return true; - case '~': // Code block - return StartsLine && Before.empty() && After.start_with("~~"); - case '#': { // ATX heading. - if (!StartsLine || !Before.empty()) - return false; - std::string_ref& Rest = After.trim_left(C); - return Rest.empty() || Rest.start_with(" "); - } - case ']': // Link or link reference. - // We escape ] rather than [ here, because it's more constrained: - // ](...) is an in-line link - // ]: is a link reference - // The following are only links if the link reference exists: - // ] by itself is a shortcut link - // ][...] is an out-of-line link - // Because we never emit link references, we don't need to handle these. - return After.start_with(":") || After.start_with("("); - case '=': // Setex heading. - return RulerLength() > 0; - case '_': // Horizontal ruler or matched delimiter. - if (RulerLength() >= 3) - return true; - // Not a delimiter if surrounded by space, or inside a word. - // (The rules at word boundaries are subtle). - return !(SpaceSurrounds() || WordSurrounds()); - case '-': // Setex heading, horizontal ruler, or bullet. - if (RulerLength() > 0) - return true; - return IsBullet(); - case '+': // Bullet list. - return IsBullet(); - case '*': // Bullet list, horizontal ruler, or delimiter. - return IsBullet() || RulerLength() >= 3 || !SpaceSurrounds(); - case '<': // HTML tag (or autolink, which we choose not to escape) - return looksLikeTag(After); - case '>': // Quote marker. Needs escaping at start of line. - return StartsLine && Before.empty(); - case '&': { // HTML entity reference - auto End = After.find(';'); - if (End == std::string_ref::npos) - return false; - std::string_ref Content = After.substr(0, End); - if (Content.consume_front("#")) - { - if (Content.consume_front("x") || Content.consume_front("X")) - { - return std::all_of(Content.begin(),Content.end(), lsp::isHexDigit); - } - - return std::all_of(Content.begin(), Content.end(), [](char c) - { - return lsp::isDigit(c); - }); - } - return std::all_of(Content.begin(), Content.end(), [](char c) - { - return lsp::isAlpha(c); - }); - } - case '.': // Numbered list indicator. Escape 12. -> 12\. at start of line. - case ')': - return StartsLine && !Before.empty() && - std::all_of(Before.begin(), Before.end(), [](char c) - { - return lsp::isDigit(c); - }) && After.start_with(" "); - default: - return false; - } -} - -/// Escape a markdown text block. Ensures the punctuation will not introduce -/// any of the markdown constructs. - std::string_ref renderText(const std::string_ref& Input, bool StartsLine) { - std::string_ref R; - for (unsigned I = 0; I < Input.size(); ++I) { - if (needsLeadingEscape(Input[I], Input.substr(0, I), Input.substr(I + 1), - StartsLine)) - R.push_back('\\'); - R.push_back(Input[I]); - } - return R; -} - -/// Renders \p Input as an inline block of code in markdown. The returned value -/// is surrounded by backticks and the inner contents are properly escaped. - std::string_ref renderInlineBlock(const std::string_ref& Input) { - std::string_ref R; - // Double all backticks to make sure we don't close the inline block early. - for (size_t From = 0; From < Input.size();) { - size_t Next = Input.find("`", From); - R += Input.substr(From, Next - From); - if (Next == std::string_ref::npos) - break; - R += "``"; // double the found backtick. - - From = Next + 1; - } - // If results starts with a backtick, add spaces on both sides. The spaces - // are ignored by markdown renderers. - if (std::string_ref(R).start_with("`") || std::string_ref(R).end_with("`")) - return "` " + std::move(R) + " `"; - // Markdown render should ignore first and last space if both are there. We - // add an extra pair of spaces in that case to make sure we render what the - // user intended. - if (std::string_ref(R).start_with(" ") && std::string_ref(R).end_with(" ")) - return "` " + std::move(R) + " `"; - return "`" + std::move(R) + "`"; -} - -/// Get marker required for \p Input to represent a markdown codeblock. It -/// consists of at least 3 backticks(`). Although markdown also allows to use -/// tilde(~) for code blocks, they are never used. - std::string_ref getMarkerForCodeBlock(const std::string_ref& Input) { - // Count the maximum number of consecutive backticks in \p Input. We need to - // start and end the code block with more. - unsigned MaxBackticks = 0; - unsigned Backticks = 0; - for (char C : Input) { - if (C == '`') { - ++Backticks; - continue; - } - MaxBackticks = std::max(MaxBackticks, Backticks); - Backticks = 0; - } - MaxBackticks = std::max(Backticks, MaxBackticks); - // Use the corresponding number of backticks to start and end a code block. - return std::string_ref(/*Repeat=*/std::max(3u, MaxBackticks + 1), '`'); -} - - /// SplitString - Split up the specified string according to the specified -/// delimiters, appending the result fragments to the output list. - void SplitString(const std::string& Source, - std::vector& OutFragments, - std::string Delimiters = " \t\n\v\f\r") -{ - boost::split(OutFragments, Source, boost::is_any_of(Delimiters)); -} - - -// Trims the input and concatenates whitespace blocks into a single ` `. - std::string_ref canonicalizeSpaces(const std::string_ref& Input) { - std::vector Words; - SplitString(Input, Words); - - return lsp::join(Words, " "); -} - - - std::string_ref renderBlocks( std::vector&& Children, - void (Block::* RenderFunc)(std::ostringstream&) const) { - std::string_ref R; - std::ostringstream OS(R); - - std::vector v{ 1, 2, 3 }; - - // Trim rulers. - Children.erase(std::remove_if(Children.begin(), Children.end(), [](const Block* C) - { - return C->isRuler(); - }), Children.end()); - - bool LastBlockWasRuler = true; - for (const auto& C : Children) { - if (C->isRuler() && LastBlockWasRuler) - continue; - LastBlockWasRuler = C->isRuler(); - ((*C).*RenderFunc)(OS); - } - - // Get rid of redundant empty lines introduced in plaintext while imitating - // padding in markdown. - std::string_ref AdjustedResult; - std::string_ref TrimmedText(OS.str()); - TrimmedText = TrimmedText.trim(); - - std::copy_if(TrimmedText.begin(), TrimmedText.end(), - std::back_inserter(AdjustedResult), - [&TrimmedText](const char& C) { - return !std::string_ref(TrimmedText.data(), - &C - TrimmedText.data() + 1) - // We allow at most two newlines. - .end_with("\n\n\n"); - }); - - return AdjustedResult; - }; - std::string_ref renderBlocks(const std::vector >& children, - void (Block::* renderFunc)(std::ostringstream&) const) - { - std::vector temp(children.size(), nullptr); - for(size_t i = 0 ; i < children.size() ; ++i) - { - temp[i]=(children[i].get()); - } - return renderBlocks(std::move(temp), renderFunc); - } -// Separates two blocks with extra spacing. Note that it might render strangely -// in vscode if the trailing block is a codeblock, see -// https://github.com/microsoft/vscode/issues/88416 for details. -class Ruler : public Block { -public: - void renderMarkdown(std::ostringstream &OS) const override { - // Note that we need an extra new line before the ruler, otherwise we might - // make previous block a title instead of introducing a ruler. - OS << "\n---\n"; - } - void renderPlainText(std::ostringstream &OS) const override { OS << '\n'; } - std::unique_ptr clone() const override { - return std::make_unique(*this); - } - bool isRuler() const override { return true; } -}; - -class CodeBlock : public Block { -public: - void renderMarkdown(std::ostringstream &OS) const override { - std::string_ref Marker = getMarkerForCodeBlock(Contents); - // No need to pad from previous blocks, as they should end with a new line. - OS << Marker << Language << '\n' << Contents << '\n' << Marker << '\n'; - } - - void renderPlainText(std::ostringstream &OS) const override { - // In plaintext we want one empty line before and after codeblocks. - OS << '\n' << Contents << "\n\n"; - } - - std::unique_ptr clone() const override { - return std::make_unique(*this); - } - - CodeBlock( std::string_ref Contents, std::string_ref Language) - : Contents(std::move(Contents)), Language(std::move(Language)) {} - -private: - - std::string_ref Contents; - std::string_ref Language; -}; - -// Inserts two spaces after each `\n` to indent each line. First line is not -// indented. - std::string_ref indentLines(const std::string_ref& Input) { - assert(!Input.end_with("\n") && "Input should've been trimmed."); - std::string_ref IndentedR; - // We'll add 2 spaces after each new line. - IndentedR.reserve(Input.size() + Input.count("\n") * 2); - for (char C : Input) { - IndentedR += C; - if (C == '\n') - IndentedR.append(" "); - } - return IndentedR; -} - -class Heading : public Paragraph { -public: - Heading(size_t Level) : Level(Level) {} - void renderMarkdown(std::ostringstream &OS) const override { - OS << std::string_ref(Level, '#') << ' '; - Paragraph::renderMarkdown(OS); - } - -private: - size_t Level; -}; - - - - - - std::string_ref Block::asMarkdown() const { - std::string_ref R; - std::ostringstream OS(R); - renderMarkdown(OS); - return std::string_ref(OS.str()).trim(); -} - - std::string_ref Block::asPlainText() const { - std::string_ref R; - std::ostringstream OS(R); - renderPlainText(OS); - return std::string_ref(OS.str()).trim().c_str(); -} - - void Paragraph::renderMarkdown(std::ostringstream& OS) const { - bool NeedsSpace = false; - bool HasChunks = false; - for (auto& C : Chunks) { - if (C.SpaceBefore || NeedsSpace) - OS << " "; - switch (C.Kind) { - case Chunk::PlainText: - OS << renderText(C.Contents, !HasChunks); - break; - case Chunk::InlineCode: - OS << renderInlineBlock(C.Contents); - break; - } - HasChunks = true; - NeedsSpace = C.SpaceAfter; - } - // Paragraphs are translated into markdown lines, not markdown paragraphs. - // Therefore it only has a single linebreak afterwards. - // VSCode requires two spaces at the end of line to start a new one. - OS << " \n"; - } - - std::unique_ptr Paragraph::clone() const { - return std::make_unique(*this); - } - - /// Choose a marker to delimit `Text` from a prioritized list of options. - /// This is more readable than escaping for plain-text. - std::string_ref chooseMarker(std::vector Options, - const std::string_ref& Text) - { - // Prefer a delimiter whose characters don't appear in the text. - for (std::string_ref& S : Options) - if (Text.find_first_of(S) == std::string_ref::npos) - return S; - return Options.front(); - } - - void Paragraph::renderPlainText(std::ostringstream& OS) const { - bool NeedsSpace = false; - for (auto& C : Chunks) { - if (C.SpaceBefore || NeedsSpace) - OS << " "; - std::string_ref Marker = ""; - if (C.Preserve && C.Kind == Chunk::InlineCode) - Marker = chooseMarker({ "`", "'", "\"" }, C.Contents); - OS << Marker << C.Contents << Marker; - NeedsSpace = C.SpaceAfter; - } - OS << '\n'; - } - - void BulletList::renderMarkdown(std::ostringstream& OS) const { - for (auto& D : Items) { - // Instead of doing this we might prefer passing Indent to children to get - // rid of the copies, if it turns out to be a bottleneck. - - OS << "- "; - OS << indentLines(D.asMarkdown()) << '\n'; - } - // We need a new line after list to terminate it in markdown. - OS << '\n'; - } - - void BulletList::renderPlainText(std::ostringstream& OS) const { - for (auto& D : Items) { - // Instead of doing this we might prefer passing Indent to children to get - // rid of the copies, if it turns out to be a bottleneck. - OS << "- " << indentLines(D.asPlainText()) << '\n'; - } - } - - Paragraph& Paragraph::appendSpace() { - if (!Chunks.empty()) - Chunks.back().SpaceAfter = true; - return *this; - } - - Paragraph& Paragraph::appendText(const std::string_ref& Text) { - std::string_ref Norm = canonicalizeSpaces(Text); - if (Norm.empty()) - return *this; - Chunks.emplace_back(); - Chunk& C = Chunks.back(); - C.Contents = std::move(Norm); - C.Kind = Chunk::PlainText; - - C.SpaceBefore = std::isspace(Text.front()); - C.SpaceAfter = std::isspace(Text.back()); - return *this; - } - - Paragraph& Paragraph::appendCode(const std::string_ref& Code, bool Preserve) { - bool AdjacentCode = - !Chunks.empty() && Chunks.back().Kind == Chunk::InlineCode; - std::string_ref Norm = canonicalizeSpaces(Code); - if (Norm.empty()) - return *this; - Chunks.emplace_back(); - Chunk& C = Chunks.back(); - C.Contents = std::move(Norm); - C.Kind = Chunk::InlineCode; - C.Preserve = Preserve; - // Disallow adjacent code spans without spaces, markdown can't render them. - C.SpaceBefore = AdjacentCode; - return *this; - } - - std::unique_ptr BulletList::clone() const { - return std::make_unique(*this); - } - - class Document& BulletList::addItem() { - Items.emplace_back(); - return Items.back(); - } - - Document& Document::operator=(const Document& Other) { - Children.clear(); - for (const auto& C : Other.Children) - Children.push_back(C->clone()); - return *this; - } - - void Document::append(Document Other) { - std::move(Other.Children.begin(), Other.Children.end(), - std::back_inserter(Children)); - } - - Paragraph& Document::addParagraph() { - Children.push_back(std::make_unique()); - return *static_cast(Children.back().get()); - } - - void Document::addRuler() { Children.push_back(std::make_unique()); } - - void Document::addCodeBlock(std::string_ref Code, std::string_ref Language) { - Children.emplace_back( - std::make_unique(std::move(Code), std::move(Language))); - } - - std::string_ref Document::asMarkdown() const { - return renderBlocks(Children, &Block::renderMarkdown); - } - - std::string_ref Document::asPlainText() const { - return renderBlocks(Children, &Block::renderPlainText); - } - - BulletList& Document::addBulletList() { - Children.emplace_back(std::make_unique()); - return *static_cast(Children.back().get()); - } - - Paragraph& Document::addHeading(size_t Level) { - assert(Level > 0); - Children.emplace_back(std::make_unique(Level)); - return *static_cast(Children.back().get()); - } - }; \ No newline at end of file diff --git a/graphics/asymptote/LspCpp/LibLsp/lsp/Markup/Markup.h b/graphics/asymptote/LspCpp/LibLsp/lsp/Markup/Markup.h deleted file mode 100644 index 92d773db0c..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/lsp/Markup/Markup.h +++ /dev/null @@ -1,119 +0,0 @@ -#pragma once -#include -#include -#include -#include -#include -#include -#include - -#include "string_ref.h" - -namespace lsp -{ - -/// Holds text and knows how to lay it out. Multiple blocks can be grouped to -/// form a document. Blocks include their own trailing newlines, std::string_ref -/// should trim them if need be. -class Block { -public: - virtual void renderMarkdown(std::ostringstream &OS) const = 0; - virtual void renderPlainText(std::ostringstream &OS) const = 0; - virtual std::unique_ptr clone() const = 0; - std::string_ref asMarkdown() const; - std::string_ref asPlainText() const; - - virtual bool isRuler() const { return false; } - virtual ~Block() = default; -}; - -/// Represents parts of the markup that can contain strings, like inline code, -/// code block or plain text. -/// One must introduce different paragraphs to create separate blocks. -class Paragraph : public Block { -public: - void renderMarkdown(std::ostringstream &OS) const override; - void renderPlainText(std::ostringstream &OS) const override; - std::unique_ptr clone() const override; - - /// Append plain text to the end of the string. - Paragraph &appendText(const std::string_ref& Text); - - /// Append inline code, this translates to the ` block in markdown. - /// \p Preserve indicates the code span must be apparent even in plaintext. - Paragraph &appendCode(const std::string_ref& Code, bool Preserve = false); - - /// Ensure there is space between the surrounding chunks. - /// Has no effect at the beginning or end of a paragraph. - Paragraph &appendSpace(); - -private: - struct Chunk { - enum { - PlainText, - InlineCode, - } Kind = PlainText; - // Preserve chunk markers in plaintext. - bool Preserve = false; - std::string_ref Contents; - // Whether this chunk should be surrounded by whitespace. - // Consecutive SpaceAfter and SpaceBefore will be collapsed into one space. - // Code spans don't usually set this: their spaces belong "inside" the span. - bool SpaceBefore = false; - bool SpaceAfter = false; - }; - std::vector Chunks; -}; - -/// Represents a sequence of one or more documents. Knows how to print them in a -/// list like format, e.g. by prepending with "- " and indentation. -class BulletList : public Block { -public: - void renderMarkdown(std::ostringstream &OS) const override; - void renderPlainText(std::ostringstream &OS) const override; - std::unique_ptr clone() const override; - - class Document &addItem(); - -private: - std::vector Items; -}; - -/// A format-agnostic representation for structured text. Allows rendering into -/// markdown and plaintext. -class Document { -public: - Document() = default; - Document(const Document &Other) { *this = Other; } - Document &operator=(const Document &); - Document(Document &&) = default; - Document &operator=(Document &&) = default; - - void append(Document Other); - - /// Adds a semantical block that will be separate from others. - Paragraph &addParagraph(); - /// Inserts a horizontal separator to the document. - void addRuler(); - /// Adds a block of code. This translates to a ``` block in markdown. In plain - /// text representation, the code block will be surrounded by newlines. - void addCodeBlock( std::string_ref Code, std::string_ref Language = "cpp"); - /// Heading is a special type of paragraph that will be prepended with \p - /// Level many '#'s in markdown. - Paragraph &addHeading(size_t Level); - - BulletList &addBulletList(); - - /// Doesn't contain any trailing newlines. - /// We try to make the markdown human-readable, e.g. avoid extra escaping. - /// At least one client (coc.nvim) displays the markdown verbatim! - std::string_ref asMarkdown() const; - /// Doesn't contain any trailing newlines. - std::string_ref asPlainText() const; - -private: - std::vector> Children; -}; - - -} diff --git a/graphics/asymptote/LspCpp/LibLsp/lsp/Markup/string_ref.h b/graphics/asymptote/LspCpp/LibLsp/lsp/Markup/string_ref.h deleted file mode 100644 index d7ee423944..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/lsp/Markup/string_ref.h +++ /dev/null @@ -1,1059 +0,0 @@ - -#pragma once -#include -#include -#include -#include -#include - -#ifndef _WIN32 -#include -#endif -namespace std -{ - - /** - * An extension of STL's string providing additional functionality that is often availiable in - * higher-level languages such as Python. - */ - class string_ref : public string - { - public: - - //static unsigned GetAutoSenseRadix(string_ref& Str) { - // if (Str.empty()) - // return 10; - - // if (Str.start_with("0x") || Str.start_with("0X")) { - // Str = Str.substr(2); - // return 16; - // } - - // if (Str.start_with("0b") || Str.start_with("0B")) { - // Str = Str.substr(2); - // return 2; - // } - - // if (Str.start_with("0o")) { - // Str = Str.substr(2); - // return 8; - // } - - // if (Str[0] == '0' && Str.size() > 1 && std::isdigit(Str[1])) { - // Str = Str.substr(1); - // return 8; - // } - - // return 10; - //} - - //static bool consumeUnsignedInteger(string_ref& Str, unsigned Radix, - // unsigned long long& Result) { - // // Autosense radix if not specified. - // if (Radix == 0) - // Radix = GetAutoSenseRadix(Str); - - // // Empty strings (after the radix autosense) are invalid. - // if (Str.empty()) return true; - - // // Parse all the bytes of the string given this radix. Watch for overflow. - // string_ref Str2 = Str; - // Result = 0; - // while (!Str2.empty()) { - // unsigned CharVal; - // if (Str2[0] >= '0' && Str2[0] <= '9') - // CharVal = Str2[0] - '0'; - // else if (Str2[0] >= 'a' && Str2[0] <= 'z') - // CharVal = Str2[0] - 'a' + 10; - // else if (Str2[0] >= 'A' && Str2[0] <= 'Z') - // CharVal = Str2[0] - 'A' + 10; - // else - // break; - - // // If the parsed value is larger than the integer radix, we cannot - // // consume any more characters. - // if (CharVal >= Radix) - // break; - - // // Add in this character. - // unsigned long long PrevResult = Result; - // Result = Result * Radix + CharVal; - - // // Check for overflow by shifting back and seeing if bits were lost. - // if (Result / Radix < PrevResult) - // return true; - - // Str2 = Str2.substr(1); - // } - - // // We consider the operation a failure if no characters were consumed - // // successfully. - // if (Str.size() == Str2.size()) - // return true; - - // Str = Str2; - // return false; - //} - - //static bool consumeSignedInteger(string_ref& Str, unsigned Radix, - // long long& Result) { - // unsigned long long ULLVal; - - // // Handle positive strings first. - // if (Str.empty() || Str.front() != '-') { - // if (consumeUnsignedInteger(Str, Radix, ULLVal) || - // // Check for value so large it overflows a signed value. - // (long long)ULLVal < 0) - // return true; - // Result = ULLVal; - // return false; - // } - - // // Get the positive part of the value. - // string_ref Str2 = Str.drop_front(1); - // if (consumeUnsignedInteger(Str2, Radix, ULLVal) || - // // Reject values so large they'd overflow as negative signed, but allow - // // "-0". This negates the unsigned so that the negative isn't undefined - // // on signed overflow. - // (long long)-ULLVal > 0) - // return true; - - // Str = Str2; - // Result = -ULLVal; - // return false; - //} - - ///// GetAsUnsignedInteger - Workhorse method that converts a integer character - ///// sequence of radix up to 36 to an unsigned long long value. - //static bool getAsUnsignedInteger(string_ref Str, unsigned Radix, - // unsigned long long& Result) { - // if (consumeUnsignedInteger(Str, Radix, Result)) - // return true; - - // // For getAsUnsignedInteger, we require the whole string to be consumed or - // // else we consider it a failure. - // return !Str.empty(); - //} - - //static bool getAsSignedInteger(string_ref Str, unsigned Radix, - // long long& Result) { - // if (consumeSignedInteger(Str, Radix, Result)) - // return true; - - // // For getAsSignedInteger, we require the whole string to be consumed or else - // // we consider it a failure. - // return !Str.empty(); - //} - - - ///// Parse the current string as an integer of the specified radix. If - ///// \p Radix is specified as zero, this does radix autosensing using - ///// extended C rules: 0 is octal, 0x is hex, 0b is binary. - ///// - ///// If the string is invalid or if only a subset of the string is valid, - ///// this returns true to signify the error. The string is considered - ///// erroneous if empty or if it overflows T. - //template - //std::enable_if_t::is_signed, bool> - // getAsInteger(unsigned Radix, T& Result) const { - // long long LLVal; - // if (getAsSignedInteger(*this, Radix, LLVal) || - // static_cast(LLVal) != LLVal) - // return true; - // Result = LLVal; - // return false; - //} - - //template - //std::enable_if_t::is_signed, bool> - // getAsInteger(unsigned Radix, T& Result) const { - // unsigned long long ULLVal; - // // The additional cast to unsigned long long is required to avoid the - // // Visual C++ warning C4805: '!=' : unsafe mix of type 'bool' and type - // // 'unsigned __int64' when instantiating getAsInteger with T = bool. - // if (getAsUnsignedInteger(*this, Radix, ULLVal) || - // static_cast(static_cast(ULLVal)) != ULLVal) - // return true; - // Result = ULLVal; - // return false; - //} - - - - /**` - * Default constructor - * - * Constructs an empty string_ref ("") - */ - string_ref() : string() { } - - /** - * Duplicate the STL string copy constructor - * - * @param[in] s The string to copy - * @param[in] pos The starting position in the string to copy from - * @param[in] n The number of characters to copy - */ - string_ref(const string &s, size_type pos = 0, size_type n = npos) : string(s, pos, npos) { } - - /** - * Construct an string_ref from a null-terminated character array - * - * @param[in] s The character array to copy into the new string - */ - string_ref(const value_type *s) : string(s) { } - - /** - * Construct an string_ref from a character array and a length - * - * @param[in] s The character array to copy into the new string - * @param[in] n The number of characters to copy - */ - string_ref(const value_type *s, size_type n) : string(s, n) { } - - /** - * Create an string_ref with @p n copies of @p c - * - * @param[in] n The number of copies - * @param[in] c The character to copy @p n times - */ - string_ref(size_type n, value_type c) : string(n, c) { } - - /** - * Create a string from a range - * - * @param[in] first The first element to copy in - * @param[in] last The last element to copy in - */ - template - string_ref(InputIterator first, InputIterator last) : string(first, last) { } - - /** - * The destructor - */ - ~string_ref() { } - - /** - * Split a string by whitespace - * - * @return A vector of strings, each of which is a substring of the string - */ - vector split(size_type limit = npos) const - { - vector v; - - const_iterator - i = begin(), - last = i; - for (; i != end(); i++) - { - if (*i == ' ' || *i == '\n' || *i == '\t' || *i == '\r') - { - if (i + 1 != end() && (i[1] == ' ' || i[1] == '\n' || i[1] == '\t' || i[1] == '\r')) - continue; - v.push_back(string_ref(last, i)); - last = i + 1; - if (v.size() >= limit - 1) - { - v.push_back(string_ref(last, end())); - return v; - } - } - } - - if (last != i) - v.push_back(string_ref(last, i)); - - return v; - } - - /** - * Split a string by a character - * - * Returns a vector of ext_strings, each of which is a substring of the string formed by splitting - * it on boundaries formed by the character @p separator. If @p limit is set, the returned vector - * will contain a maximum of @p limit elements with the last element containing the rest of - * the string. - * - * If @p separator is not found in the string, a single element will be returned in the vector - * containing the entire string. - * - * The separators are removed from the output - * - * @param[in] separator The character separator to split the string on - * @param[in] limit The maximum number of output elements - * @return A vector of strings, each of which is a substring of the string - * - * @section split_ex Example - * @code - * std::string_ref s("This|is|a|test."); - * std::vector v = s.split('|'); - * std::copy(v.begin(), v.end(), std::ostream_iterator(std::cout, "\n")); - * - * This - * is - * a - * test. - * @endcode - */ - vector split(value_type separator, size_type limit = npos) const - { - vector v; - - const_iterator - i = begin(), - last = i; - for (; i != end(); i++) - { - if (*i == separator) - { - v.push_back(string_ref(last, i)); - last = i + 1; - if (v.size() >= limit - 1) - { - v.push_back(string_ref(last, end())); - return v; - } - } - } - - if (last != i) - v.push_back(string_ref(last, i)); - - return v; - } - - /** - * Split a string by another string - * - * Returns a vector of ext_strings, each of which is a substring of the string formed by - * splitting it on boundaries formed by the string @p separator. If @p limit is set, the - * returned vector will contain a maximum of @p limit elements with the last element - * containing the rest of the string. - * - * If @p separator is not found in the string, a single element will be returned in the - * vector containing the entire string. - * - * The separators are removed from the output - * - * @param[in] separator The string separator to split the string on - * @param[in] limit The maximum number of output elements - * @return A vector of strings, each of which is a substring of the string - * - * @ref split_ex - */ - vector split(const string &separator, size_type limit = npos) const - { - vector v; - - const_iterator - i = begin(), - last = i; - for (; i != end(); i++) - { - if (string(i, i + separator.length()) == separator) - { - v.push_back(string_ref(last, i)); - last = i + separator.length(); - - if (v.size() >= limit - 1) - { - v.push_back(string_ref(last, end())); - return v; - } - } - } - - if (last != i) - v.push_back(string_ref(last, i)); - - return v; - } - - /** - * Convert a string into an integer - * - * Convert the initial portion of a string into a signed integer. Once a non-numeric - * character is reached, the remainder of @p string is ignored and the integer that was - * read returned. - * - * @param s The string to convert - * @return The integer converted from @p string - */ - static long int integer(const string &s) - { - long int retval = 0; - bool neg = false; - - for (const_iterator i = s.begin(); i != s.end(); i++) - { - if (i == s.begin()) - { - if (*i == '-') - { - neg = true; - continue; - } - else if (*i == '+') - continue; - } - if (*i >= '0' && *i <= '9') - { - retval *= 10; - retval += *i - '0'; - } - else - break; - } - - if (neg) - retval *= -1; - - return retval; - } - - /** - * Convert the string to an integer - * - * Convert the initial portion of the string into a signed integer. Once a non-numeric - * character is reached, the remainder of the string is ignored and the integer that had - * been read thus far is returned. - * - * @return The integer converted from the string - */ - long int integer() const - { - return integer(*this); - } - - /** - * Split a string into chunks of size @p chunklen. Returns a vector of strings. - * - * Splits a string into chunks of the given size. The final chunk may not fill its - * entire allocated number of characters. - * - * @param[in] chunklen The number of characters per chunk - * @return A vector of strings, each of length <= chunklen - * - * @section chunk_split-ex Example - * @code - * std::string_ref s("abcdefghijk"); - * std::vector v = s.chunk_split(3); - * std::copy(v.begin(), v.end(), ostream_iterator(cout, " ")); - * - * abc def ghi jk - * @endcode - */ - vector chunk_split(size_type chunklen) const - { - vector retval; - retval.reserve(size() / chunklen + 1); - - size_type count = 0; - const_iterator - i = begin(), - last = i; - for (; i != end(); i++, count++) - { - if (count == chunklen) - { - count = 0; - retval.push_back(string_ref(last, i)); - last = i; - } - } - - if (last != i) - retval.push_back(string_ref(last, i)); - - return retval; - } - - /** - * Join a sequence of strings by some glue to create a new string - * - * Glue is not added to the end of the string. - * - * @pre [first, last) is a valid range - * @pre InputIterator is a model of STL's Input Iterator - * @pre InputIterator must point to a string type (std::string, std::string_ref, char *) - * - * @param[in] glue The glue to join strings with - * @param[in] first The beginning of the range to join - * @param[in] last The end of the range to join - * @return A string constructed of each element of the range connected together with @p glue - * - * @section join_ex Example - * @code - * std::vector v; - * v.push_back("This"); - * v.push_back("is"); - * v.push_back("a"); - * v.push_back("test."); - * std::cout << std::string_ref::join("|", v.begin(), v.end()) << std::endl; - * - * This|is|a|test. - * @endcode - */ - template - static string_ref join(const string &glue, InputIterator first, InputIterator last) - { - string_ref retval; - - for (; first != last; ++first) - { - retval.append(*first); - retval.append(glue); - } - retval.erase(retval.length() - glue.length()); - - return retval; - } - - /** - * Join a sequence of strings by some glue to create a new string - * - * @copydoc join - * @ref join_ex - */ - template - static string_ref join(value_type glue, InputIterator first, InputIterator last) - { - string_ref retval; - - for (; first != last; ++first) - { - retval.append(*first); - retval.append(1, glue); - } - retval.erase(retval.length() - 1); - - return retval; - } - - /** - * Search for any instances of @p needle and replace them with @p s - * - * @param[in] needle The string to replace - * @param[in] s The replacement string - * @return *this - * @post All instances of @p needle in the string are replaced with @p s - * - * @section replace-ex Example - * @code - * std::string_ref s("This is a test."); - * s.replace("is", "ere"); - * std::cout << s << std::endl; - * - * There ere a test. - * @endcode - */ - string_ref &replace(const string &needle, const string &s) - { - size_type - lastpos = 0, - thispos; - - while ((thispos = find(needle, lastpos)) != npos) - { - string::replace(thispos, needle.length(), s); - lastpos = thispos + 1; - } - return *this; - } - string_ref &replace_first(const string &needle, const string &s) - { - size_type - lastpos = 0, - thispos; - - if ((thispos = find(needle, lastpos)) != npos) - { - string::replace(thispos, needle.length(), s); - lastpos = thispos + 1; - } - return *this; - } - /** - * Search of any instances of @p needle and replace them with @p c - * - * @param[in] needle The character to replace - * @param[in] c The replacement character - * @return *this - * @post All instances of @p needle in the string are replaced with @p c - * - * @ref replace-ex - */ - string_ref &replace(value_type needle, value_type c) - { - for (iterator i = begin(); i != end(); i++) - if (*i == needle) - *i = c; - - return *this; - } - - /** - * Repeat a string @p n times - * - * @param[in] n The number of times to repeat the string - * @return string_ref containing @p n copies of the string - * - * @section repeat-ex Example - * @code - * std::string_ref s("123"); - * s = s * 3; - * std::cout << s << std::endl; - * - * 123123123 - * @endcode - */ - string_ref operator*(size_type n) - { - string_ref retval; - for (size_type i = 0; i < n; i++) - retval.append(*this); - - return retval; - } - - /** - * Convert the string to lowercase - * - * @return *this - * @post The string is converted to lowercase - */ - string_ref &tolower() - { - for (iterator i = begin(); i != end(); i++) - if (*i >= 'A' && *i <= 'Z') - *i = (*i) + ('a' - 'A'); - return *this; - } - - /** - * Convert the string to uppercase - * - * @return *this - * @post The string is converted to uppercase - */ - string_ref &toupper() - { - for (iterator i = begin(); i != end(); i++) - if (*i >= 'a' && *i <= 'z') - *i = (*i) - ('a' - 'A'); - return *this; - } - - /** - * Count the occurances of @p str in the string. - * - * @return The count of substrings @p str in the string - */ - size_type count(const string &str) const - { - size_type - count = 0, - last = 0, - cur = 0; - - while ((cur = find(str, last + 1)) != npos) - { - count++; - last = cur; - } - - return count; - } - - /** - * Determine if the string is alphanumeric - * - * @return true if the string contains only characters between a-z, A-Z and 0-9 and - * contains at least one character, else false - */ - bool is_alnum() const - { - if (length() == 0) - return false; - - for (const_iterator i = begin(); i != end(); i++) - { - if (*i < 'A' || *i > 'Z') - if (*i < '0' || *i > '9') - if (*i < 'a' || *i > 'z') - return false; - } - - return true; - } - - /** - * Determine if the string is alphabetic only - * - * @return true of the string contains only characters between a-z and A-Z and contains at - * least one character, else false - */ - bool is_alpha() const - { - if (length() == 0) - return false; - - for (const_iterator i = begin(); i != end(); i++) - if (*i < 'A' || (*i > 'Z' && (*i < 'a' || *i > 'z'))) - return false; - - return true; - } - - /** - * Determine if the string is numeric only - * - * @return true if the string contains only characters between 0-9 and contains at least - * one character, else false - */ - bool is_numeric() const - { - if (length() == 0) - return false; - - for (const_iterator i = begin(); i != end(); i++) - if (*i < '0' || *i > '9') - return false; - - return true; - } - - /** - * Determine if a string is all lower case - * - * @return true if there is at least one character, and all characters are lowercase - * letters, else false - */ - bool is_lower() const - { - if (length() == 0) - return false; - - for (const_iterator i = begin(); i != end(); i++) - if (*i < 'a' || *i < 'z') - return false; - - return true; - } - - /** - * Determine if a string is all upper case - * - * @return true if there is at least one character, and all characters are uppercase - * letters, else false - */ - bool is_upper() const - { - if (length() == 0) - return false; - - for (const_iterator i = begin(); i != end(); i++) - if (*i < 'A' || *i > 'Z') - return false; - - return true; - } - - /** - * Swap the case of a string - * - * @post Converts all uppercase to lowercase, and all lowercase to uppercase in the string - * @return *this - */ - string_ref &swapcase() - { - for (iterator i = begin(); i != end(); i++) - if (*i >= 'A' && *i <= 'Z') - *i += ('a' - 'A'); - else if (*i >= 'a' && *i <= 'z') - *i -= ('a' - 'A'); - - return *this; - } - - /******************************************************************************* - Function: std::string_ref::start_with - Access: public - Qualifier: const - Parameter: const string & str - Returns: bool - - Purpose: is the string start with str - *******************************************************************************/ - bool start_with(const string& str) const - { - return ( this->find(str) == 0 ); - } - - /// Return a string_ref equal to 'this' but with only the last \p N - /// elements remaining. If \p N is greater than the length of the - /// string, the entire string is returned. - - string_ref take_back(size_t N = 1) const { - if (N >= size()) - return *this; - return drop_front(size() - N); - } - /// Return a string_ref equal to 'this' but with the first \p N elements - /// dropped. - - string_ref drop_front(size_t N = 1) const { - //assert(size() >= N && "Dropping more elements than exist"); - return substr(N); - } - - - - /// Return a string_ref equal to 'this' but with the last \p N elements - /// dropped. - - string_ref drop_back(size_t N = 1) const { - - return substr(0, size() - N); - } - - /// Return a string_ref equal to 'this', but with all characters satisfying - /// the given predicate dropped from the beginning of the string. - - string_ref drop_while(std::function F) const { - return substr(std::find_if_not(begin(),end(),F)-begin()); - } - - /// Return a string_ref equal to 'this', but with all characters not - /// satisfying the given predicate dropped from the beginning of the string. - - string_ref drop_until(std::function F) const { - return substr(std::find_if(begin(), end(), F) - begin()); - } - - /// Returns true if this string_ref has the given prefix and removes that - /// prefix. - bool consume_front(string_ref Prefix) { - if (!start_with(Prefix)) - return false; - - *this = drop_front(Prefix.size()); - return true; - } - - /// Returns true if this string_ref has the given suffix and removes that - /// suffix. - bool consume_back(string_ref Suffix) { - if (!end_with(Suffix)) - return false; - - *this = drop_back(Suffix.size()); - return true; - } - - /******************************************************************************* - Function: std::string_ref::end_with - Access: public - Qualifier: const - Parameter: const string & str - Returns: bool - - Purpose: is the string end with str - *******************************************************************************/ - bool end_with(const string& str) const - { - if (str.length() > this->length()) - { - return false; - } - size_type off = this->length() - str.length(); - return ( find(str, off) == off); - } - - /******************************************************************************* - Function: hl_lib::string_ref::format - Access: public - Qualifier: - Parameter: const char * format_string - Parameter: ... - Returns: string_ref& - - Purpose: format the string - *******************************************************************************/ - string_ref& format(const char* format_string, ...) - { - if (format_string == 0) - { - return *this; - } - - va_list argList; - char* pbuf = 0; - va_start( argList, format_string ); -#ifdef _WIN32 - int len = _vscprintf( format_string, argList ); -#else - int len = vsnprintf(nullptr, 0, format_string, argList); -#endif - pbuf = new char[len + 1]; - if (pbuf != 0) - { -#ifdef _WIN32 - vsprintf_s( pbuf, len + 1, format_string, argList ); -#else - vsprintf(pbuf, format_string, argList); -#endif - *this = pbuf; - } - delete[] pbuf; - va_end( argList ); - - return *this; - } - - /******************************************************************************* - Function: hl_lib::string_ref::trim_left - Access: public - Qualifier: - Parameter: value_type ch - Returns: string_ref& - - Purpose: delete all char which is ch at the left of the string - *******************************************************************************/ - string_ref& trim_left(value_type ch = ' ') - { - size_type off = this->find_first_not_of(ch); - if (off != string::npos) - { - this->erase(0, off); - } - return *this; - } - - /******************************************************************************* - Function: hl_lib::string_ref::trim_right - Access: public - Qualifier: - Parameter: value_type ch - Returns: string_ref& - - Purpose: delete all char which is ch at the right of the string - *******************************************************************************/ - string_ref& trim_right(value_type ch = ' ') - { - size_type off = this->find_last_not_of(ch); - if (off == string::npos) - { - off = 0; - } - else - { - off++; - } - this->erase(off, length() - off); - return *this; - } - - /******************************************************************************* - Function: hl_lib::string_ref::trim - Access: public - Qualifier: - Parameter: value_type ch - Returns: string_ref& - - Purpose: delete all char which is ch at the left and right of the string - *******************************************************************************/ - string_ref& trim(value_type ch = ' ') - { - trim_left(ch); - trim_right(ch); - return *this; - } - - /******************************************************************************* - Function: hl_lib::string_ref::float_num - Access: public static - Qualifier: - Parameter: const string & str - Returns: double - - Purpose: parse str to a float number - *******************************************************************************/ - static double float_num(const string& str) - { - return atof(str.c_str()); - } - - /******************************************************************************* - Function: hl_lib::string_ref::float_num - Access: public static - Qualifier: - Returns: double - - Purpose: parse this to a float number - *******************************************************************************/ - double float_num() const - { - return float_num(*this); - } - - /******************************************************************************* - Function: hl_lib::string_ref::compare_nocase - Access: public - Qualifier: const - Parameter: const string & str - Returns: int - - Purpose: compare string no case - *******************************************************************************/ - int compare_nocase(const string& str) const - { -#ifdef _WIN32 - return _stricmp(this->c_str(), str.c_str()); -#else - return strcasecmp(this->c_str(), str.c_str()); -#endif - } - - /******************************************************************************* - Function: hl_lib::string_ref::compare_nocase - Access: public - Qualifier: const - Parameter: size_type index - Parameter: size_type length - Parameter: const string & str - Returns: int - - Purpose: compare substring no case - *******************************************************************************/ - int compare_nocase( size_type index, size_type length, const string &str ) const - { - string_ref temp = this->substr(index, length); - return temp.compare_nocase(str); - } - - /******************************************************************************* - Function: hl_lib::string_ref::compare_nocase - Access: public - Qualifier: const - Parameter: size_type index - Parameter: size_type length - Parameter: const string & str - Parameter: size_type index2 - Parameter: size_type length2 - Returns: int - - Purpose: compare two substring no case - *******************************************************************************/ - int compare_nocase( size_type index, size_type length, const string &str, size_type index2, size_type length2) const - { - string_ref temp1 = this->substr(index, length); - string_ref temp2 = str.substr(index2, length2); - return temp1.compare_nocase(temp2); - } - - }; - -} - diff --git a/graphics/asymptote/LspCpp/LibLsp/lsp/ParentProcessWatcher.cpp b/graphics/asymptote/LspCpp/LibLsp/lsp/ParentProcessWatcher.cpp deleted file mode 100644 index 6769f5112d..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/lsp/ParentProcessWatcher.cpp +++ /dev/null @@ -1,106 +0,0 @@ -#include "ParentProcessWatcher.h" -#include - -#ifdef _WIN32 -#include -#endif - -#include -#include -#include - -#include "ProcessIoService.h" -#include "SimpleTimer.h" - - -using namespace boost::asio::ip; -using namespace std; - -struct ParentProcessWatcher::ParentProcessWatcherData : std::enable_shared_from_this -{ - std::unique_ptr> timer; - lsp::Log& _log; - std::function on_exit; - lsp::ProcessIoService asio_io; - std::shared_ptr < boost::process::opstream> write_to_service; - std::shared_ptr< boost::process::ipstream > read_from_service; - int pid; - const int _poll_delay_secs /*= 10*/; - std::string command; - std::shared_ptr c; - - ParentProcessWatcherData(lsp::Log& log, int _pid, - const std::function&& callback, uint32_t poll_delay_secs) : - _log(log), on_exit(callback), pid(_pid), _poll_delay_secs(poll_delay_secs) - { -#ifdef _WIN32 - command = "cmd /c \"tasklist /FI \"PID eq " + std::to_string(pid) + "\" | findstr " + - std::to_string(pid) + "\""; -#else - command = "ps -p " + std::to_string(pid); -#endif - - } - - void run() - { - write_to_service = std::make_shared(); - read_from_service = std::make_shared(); - -// const uint32_t POLL_DELAY_SECS = _poll_delay_secs; - auto self(shared_from_this()); - std::error_code ec; - namespace bp = boost::process; - c = std::make_shared(asio_io.getIOService(), command, - ec, -#ifdef _WIN32 - bp::windows::hide, -#endif - bp::std_out > *read_from_service, - bp::std_in < *write_to_service, - bp::on_exit([self](int exit_code, const std::error_code& ec_in) { - // the tasklist command should return 0 (parent process exists) or 1 (parent process doesn't exist) - if (exit_code == 1)// - { - if (self->on_exit) - { - - std::thread([=]() - { - std::this_thread::sleep_for(std::chrono::seconds(3)); - self->on_exit(); - }).detach(); - } - } - else - { - if (exit_code > 1) - { - self->_log.log(lsp::Log::Level::WARNING, "The tasklist command: '" + self->command + "' returns " + std::to_string(exit_code)); - } - - self->timer = std::make_unique>(self->_poll_delay_secs, [=]() { - self->run(); - }); - } - - })); - if (ec) - { - // fail - _log.log(lsp::Log::Level::SEVERE, "Start parent process watcher failed."); - } - } -}; - -ParentProcessWatcher::ParentProcessWatcher(lsp::Log& log, int pid, - const std::function&& callback, uint32_t poll_delay_secs) : d_ptr(new ParentProcessWatcherData(log, pid, std::move(callback), poll_delay_secs)) -{ - d_ptr->run(); -} - -ParentProcessWatcher::~ParentProcessWatcher() -{ - if (d_ptr->timer) - d_ptr->timer->Stop(); -} diff --git a/graphics/asymptote/LspCpp/LibLsp/lsp/ParentProcessWatcher.h b/graphics/asymptote/LspCpp/LibLsp/lsp/ParentProcessWatcher.h deleted file mode 100644 index fa84e4109a..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/lsp/ParentProcessWatcher.h +++ /dev/null @@ -1,17 +0,0 @@ -#pragma once - -#include "LibLsp/JsonRpc/MessageIssue.h" -#include - -class ParentProcessWatcher -{ -public: - struct ParentProcessWatcherData; - - ParentProcessWatcher(lsp::Log& log, int pid, const std::function&& callback, uint32_t poll_delay_secs = 10); - - ~ParentProcessWatcher(); - - std::shared_ptr d_ptr; -}; - diff --git a/graphics/asymptote/LspCpp/LibLsp/lsp/ProcessIoService.h b/graphics/asymptote/LspCpp/LibLsp/lsp/ProcessIoService.h deleted file mode 100644 index 1389a1d5b7..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/lsp/ProcessIoService.h +++ /dev/null @@ -1,48 +0,0 @@ -#pragma once -#include -#include - -namespace lsp -{ - class ProcessIoService - { - public: - using IOService = boost::asio::io_service; - using Work = boost::asio::io_service::work; - using WorkPtr = std::unique_ptr; - - ProcessIoService() { - - work_ = std::unique_ptr(new Work(ioService_)); - auto temp_thread_ = new std::thread([this] - { - ioService_.run(); - }); - thread_ = std::unique_ptr(temp_thread_); - } - - ProcessIoService(const ProcessIoService&) = delete; - ProcessIoService& operator=(const ProcessIoService&) = delete; - - boost::asio::io_service& getIOService() - { - return ioService_; - } - - void stop() - { - - work_.reset(); - - thread_->join(); - - } - - private: - IOService ioService_; - WorkPtr work_; - std::unique_ptr thread_; - - }; - -} diff --git a/graphics/asymptote/LspCpp/LibLsp/lsp/ProtocolJsonHandler.cpp b/graphics/asymptote/LspCpp/LibLsp/lsp/ProtocolJsonHandler.cpp deleted file mode 100644 index 90e3fcda08..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/lsp/ProtocolJsonHandler.cpp +++ /dev/null @@ -1,716 +0,0 @@ -#include "ProtocolJsonHandler.h" -#include "general/initialize.h" -#include "general/shutdown.h" -#include "textDocument/code_action.h" -#include "textDocument/code_lens.h" -#include "textDocument/completion.h" - - -#include "textDocument/did_close.h" - -#include "textDocument/highlight.h" -#include "textDocument/document_link.h" -#include "textDocument/formatting.h" -#include "textDocument/hover.h" -#include "textDocument/implementation.h" -#include "textDocument/range_formatting.h" -#include "textDocument/references.h" -#include "textDocument/rename.h" -#include "textDocument/signature_help.h" -#include "textDocument/type_definition.h" -#include "workspace/symbol.h" -#include "textDocument/typeHierarchy.h" -#include "out_list.h" -#include "extention/jdtls/codeActionResult.h" -#include "textDocument/declaration_definition.h" -#include "textDocument/resolveCompletionItem.h" -#include "textDocument/resolveCodeLens.h" -#include "textDocument/colorPresentation.h" -#include "textDocument/foldingRange.h" -#include "textDocument/prepareRename.h" -#include "textDocument/resolveTypeHierarchy.h" -#include "textDocument/callHierarchy.h" -#include "textDocument/selectionRange.h" -#include "extention/jdtls/classFileContents.h" -#include "extention/jdtls/buildWorkspace.h" -#include "extention/jdtls/listOverridableMethods.h" -#include "extention/jdtls/addOverridableMethods.h" -#include "extention/jdtls/checkHashCodeEqualsStatus.h" -#include "extention/jdtls/checkConstructorsStatus.h" -#include "extention/jdtls/checkDelegateMethodsStatus.h" -#include "extention/jdtls/checkToStringStatus.h" -#include "extention/jdtls/executeCommand.h" -#include "extention/jdtls/findLinks.h" -#include "extention/jdtls/generateAccessors.h" -#include "extention/jdtls/generateConstructors.h" -#include "extention/jdtls/generateDelegateMethods.h" -#include "extention/jdtls/generateHashCodeEquals.h" -#include "extention/jdtls/generateToString.h" -#include "extention/jdtls/getMoveDestinations.h" -#include "extention/jdtls/Move.h" -#include "extention/jdtls/organizeImports.h" -#include "general/exit.h" -#include "general/initialized.h" -#include "extention/jdtls/projectConfigurationUpdate.h" -#include "textDocument/did_change.h" -#include "textDocument/did_open.h" -#include "textDocument/did_save.h" -#include "textDocument/publishDiagnostics.h" -#include "textDocument/willSave.h" - -#include "workspace/didChangeWorkspaceFolders.h" -#include "workspace/did_change_configuration.h" -#include "workspace/did_change_watched_files.h" -#include "windows/MessageNotify.h" -#include "language/language.h" -#include "client/registerCapability.h" -#include "client/unregisterCapability.h" -#include "LibLsp/JsonRpc/Cancellation.h" -#include "textDocument/didRenameFiles.h" -#include "textDocument/semanticHighlighting.h" -#include "workspace/configuration.h" - - -void AddStadardResponseJsonRpcMethod(MessageJsonHandler& handler) -{ - - handler.method2response[td_initialize::request::kMethodInfo] = [](Reader& visitor) - { - if(visitor.HasMember("error")) - return Rsp_Error::ReflectReader(visitor); - - return td_initialize::response::ReflectReader(visitor); - }; - - handler.method2response[td_shutdown::request::kMethodInfo] = [](Reader& visitor) - { - if (visitor.HasMember("error")) - return Rsp_Error::ReflectReader(visitor); - return td_shutdown::response::ReflectReader(visitor); - }; - handler.method2response[td_codeAction::request::kMethodInfo] = [](Reader& visitor) - { - if (visitor.HasMember("error")) - return Rsp_Error::ReflectReader(visitor); - - return td_codeAction::response::ReflectReader(visitor); - }; - handler.method2response[td_codeLens::request::kMethodInfo] = [](Reader& visitor) - { - if (visitor.HasMember("error")) - return Rsp_Error::ReflectReader(visitor); - return td_codeLens::response::ReflectReader(visitor); - }; - handler.method2response[td_completion::request::kMethodInfo] = [](Reader& visitor) - { - if (visitor.HasMember("error")) - return Rsp_Error::ReflectReader(visitor); - return td_completion::response::ReflectReader(visitor); - }; - - handler.method2response[td_definition::request::kMethodInfo] = [](Reader& visitor) - { - if (visitor.HasMember("error")) - return Rsp_Error::ReflectReader(visitor); - return td_definition::response::ReflectReader(visitor); - }; - handler.method2response[td_declaration::request::kMethodInfo] = [](Reader& visitor) - { - if (visitor.HasMember("error")) - return Rsp_Error::ReflectReader(visitor); - return td_declaration::response::ReflectReader(visitor); - }; - handler.method2response[td_willSaveWaitUntil::request::kMethodInfo] = [](Reader& visitor) - { - if (visitor.HasMember("error")) - return Rsp_Error::ReflectReader(visitor); - return td_willSaveWaitUntil::response::ReflectReader(visitor); - }; - - handler.method2response[td_highlight::request::kMethodInfo] = [](Reader& visitor) - { - if (visitor.HasMember("error")) - return Rsp_Error::ReflectReader(visitor); - return td_highlight::response::ReflectReader(visitor); - }; - - handler.method2response[td_links::request::kMethodInfo] = [](Reader& visitor) - { - if (visitor.HasMember("error")) - return Rsp_Error::ReflectReader(visitor); - return td_links::response::ReflectReader(visitor); - }; - - handler.method2response[td_linkResolve::request::kMethodInfo] = [](Reader& visitor) - { - if (visitor.HasMember("error")) - return Rsp_Error::ReflectReader(visitor); - return td_linkResolve::response::ReflectReader(visitor); - }; - - handler.method2response[td_symbol::request::kMethodInfo] = [](Reader& visitor) - { - if (visitor.HasMember("error")) - return Rsp_Error::ReflectReader(visitor); - return td_symbol::response::ReflectReader(visitor); - }; - - handler.method2response[td_formatting::request::kMethodInfo] = [](Reader& visitor) - { - if (visitor.HasMember("error")) - return Rsp_Error::ReflectReader(visitor); - return td_formatting::response::ReflectReader(visitor); - }; - - handler.method2response[td_hover::request::kMethodInfo] = [](Reader& visitor) - { - if (visitor.HasMember("error")) - return Rsp_Error::ReflectReader(visitor); - return td_hover::response::ReflectReader(visitor); - - }; - - handler.method2response[td_implementation::request::kMethodInfo] = [](Reader& visitor) - { - if (visitor.HasMember("error")) - return Rsp_Error::ReflectReader(visitor); - return td_implementation::response::ReflectReader(visitor); - }; - - handler.method2response[td_rangeFormatting::request::kMethodInfo] = [](Reader& visitor) - { - if (visitor.HasMember("error")) - return Rsp_Error::ReflectReader(visitor); - return td_rangeFormatting::response::ReflectReader(visitor); - }; - - handler.method2response[td_references::request::kMethodInfo] = [](Reader& visitor) - { - if (visitor.HasMember("error")) - return Rsp_Error::ReflectReader(visitor); - return td_references::response::ReflectReader(visitor); - }; - - handler.method2response[td_rename::request::kMethodInfo] = [](Reader& visitor) - { - if (visitor.HasMember("error")) - return Rsp_Error::ReflectReader(visitor); - return td_rename::response::ReflectReader(visitor); - }; - - - handler.method2response[td_signatureHelp::request::kMethodInfo] = [](Reader& visitor) - { - if (visitor.HasMember("error")) - return Rsp_Error::ReflectReader(visitor); - return td_signatureHelp::response::ReflectReader(visitor); - }; - - handler.method2response[td_typeDefinition::request::kMethodInfo] = [](Reader& visitor) - { - if (visitor.HasMember("error")) - return Rsp_Error::ReflectReader(visitor); - return td_typeDefinition::response::ReflectReader(visitor); - }; - - handler.method2response[wp_executeCommand::request::kMethodInfo] = [](Reader& visitor) - { - if (visitor.HasMember("error")) - return Rsp_Error::ReflectReader(visitor); - return wp_executeCommand::response::ReflectReader(visitor); - }; - - handler.method2response[wp_symbol::request::kMethodInfo] = [](Reader& visitor) - { - if (visitor.HasMember("error")) - return Rsp_Error::ReflectReader(visitor); - return wp_symbol::response::ReflectReader(visitor); - }; - handler.method2response[td_typeHierarchy::request::kMethodInfo] = [](Reader& visitor) - { - if (visitor.HasMember("error")) - return Rsp_Error::ReflectReader(visitor); - return td_typeHierarchy::response::ReflectReader(visitor); - }; - handler.method2response[completionItem_resolve::request::kMethodInfo] = [](Reader& visitor) - { - if (visitor.HasMember("error")) - return Rsp_Error::ReflectReader(visitor); - return completionItem_resolve::response::ReflectReader(visitor); - }; - - handler.method2response[codeLens_resolve::request::kMethodInfo] = [](Reader& visitor) - { - if (visitor.HasMember("error")) - return Rsp_Error::ReflectReader(visitor); - - return codeLens_resolve::response::ReflectReader(visitor); - - }; - - handler.method2response[td_colorPresentation::request::kMethodInfo] = [](Reader& visitor) - { - if (visitor.HasMember("error")) - return Rsp_Error::ReflectReader(visitor); - - return td_colorPresentation::response::ReflectReader(visitor); - - }; - handler.method2response[td_documentColor::request::kMethodInfo] = [](Reader& visitor) - { - if (visitor.HasMember("error")) - return Rsp_Error::ReflectReader(visitor); - - return td_documentColor::response::ReflectReader(visitor); - - }; - handler.method2response[td_foldingRange::request::kMethodInfo] = [](Reader& visitor) - { - if (visitor.HasMember("error")) - return Rsp_Error::ReflectReader(visitor); - - return td_foldingRange::response::ReflectReader(visitor); - - }; - handler.method2response[td_prepareRename::request::kMethodInfo] = [](Reader& visitor) - { - if (visitor.HasMember("error")) - return Rsp_Error::ReflectReader(visitor); - - return td_prepareRename::response::ReflectReader(visitor); - - }; - handler.method2response[typeHierarchy_resolve::request::kMethodInfo] = [](Reader& visitor) - { - if (visitor.HasMember("error")) - return Rsp_Error::ReflectReader(visitor); - - return typeHierarchy_resolve::response::ReflectReader(visitor); - - }; - - handler.method2response[td_selectionRange::request::kMethodInfo] = [](Reader& visitor) - { - if (visitor.HasMember("error")) - return Rsp_Error::ReflectReader(visitor); - - return td_selectionRange::response::ReflectReader(visitor); - - }; - handler.method2response[td_didRenameFiles::request::kMethodInfo] = [](Reader& visitor) - { - if (visitor.HasMember("error")) - return Rsp_Error::ReflectReader(visitor); - - return td_didRenameFiles::response::ReflectReader(visitor); - - }; - handler.method2response[td_willRenameFiles::request::kMethodInfo] = [](Reader& visitor) - { - if (visitor.HasMember("error")) - return Rsp_Error::ReflectReader(visitor); - - return td_willRenameFiles::response::ReflectReader(visitor); - - }; - -} - - -void AddJavaExtentionResponseJsonRpcMethod(MessageJsonHandler& handler) -{ - handler.method2response[java_classFileContents::request::kMethodInfo] = [](Reader& visitor) - { - if (visitor.HasMember("error")) - return Rsp_Error::ReflectReader(visitor); - - return java_classFileContents::response::ReflectReader(visitor); - }; - handler.method2response[java_buildWorkspace::request::kMethodInfo] = [](Reader& visitor) - { - if (visitor.HasMember("error")) - return Rsp_Error::ReflectReader(visitor); - - return java_buildWorkspace::response::ReflectReader(visitor); - }; - handler.method2response[java_listOverridableMethods::request::kMethodInfo] = [](Reader& visitor) - { - if (visitor.HasMember("error")) - return Rsp_Error::ReflectReader(visitor); - - return java_listOverridableMethods::response::ReflectReader(visitor); - }; - handler.method2response[java_listOverridableMethods::request::kMethodInfo] = [](Reader& visitor) - { - if (visitor.HasMember("error")) - return Rsp_Error::ReflectReader(visitor); - - return java_listOverridableMethods::response::ReflectReader(visitor); - }; - - handler.method2response[java_checkHashCodeEqualsStatus::request::kMethodInfo] = [](Reader& visitor) - { - if (visitor.HasMember("error")) - return Rsp_Error::ReflectReader(visitor); - - return java_checkHashCodeEqualsStatus::response::ReflectReader(visitor); - }; - - - handler.method2response[java_addOverridableMethods::request::kMethodInfo] = [](Reader& visitor) - { - if (visitor.HasMember("error")) - return Rsp_Error::ReflectReader(visitor); - - return java_addOverridableMethods::response::ReflectReader(visitor); - }; - - handler.method2response[java_checkConstructorsStatus::request::kMethodInfo] = [](Reader& visitor) - { - if (visitor.HasMember("error")) - return Rsp_Error::ReflectReader(visitor); - - return java_checkConstructorsStatus::response::ReflectReader(visitor); - }; - - - handler.method2response[java_checkDelegateMethodsStatus::request::kMethodInfo] = [](Reader& visitor) - { - if (visitor.HasMember("error")) - return Rsp_Error::ReflectReader(visitor); - - return java_checkDelegateMethodsStatus::response::ReflectReader(visitor); - }; - handler.method2response[java_checkToStringStatus::request::kMethodInfo] = [](Reader& visitor) - { - if (visitor.HasMember("error")) - return Rsp_Error::ReflectReader(visitor); - - return java_checkToStringStatus::response::ReflectReader(visitor); - }; - - - handler.method2response[java_generateAccessors::request::kMethodInfo] = [](Reader& visitor) - { - if (visitor.HasMember("error")) - return Rsp_Error::ReflectReader(visitor); - - return java_generateAccessors::response::ReflectReader(visitor); - }; - handler.method2response[java_generateConstructors::request::kMethodInfo] = [](Reader& visitor) - { - if (visitor.HasMember("error")) - return Rsp_Error::ReflectReader(visitor); - - return java_generateConstructors::response::ReflectReader(visitor); - }; - handler.method2response[java_generateDelegateMethods::request::kMethodInfo] = [](Reader& visitor) - { - if (visitor.HasMember("error")) - return Rsp_Error::ReflectReader(visitor); - - return java_generateDelegateMethods::response::ReflectReader(visitor); - }; - - handler.method2response[java_generateHashCodeEquals::request::kMethodInfo] = [](Reader& visitor) - { - if (visitor.HasMember("error")) - return Rsp_Error::ReflectReader(visitor); - - return java_generateHashCodeEquals::response::ReflectReader(visitor); - }; - handler.method2response[java_generateToString::request::kMethodInfo] = [](Reader& visitor) - { - if (visitor.HasMember("error")) - return Rsp_Error::ReflectReader(visitor); - - return java_generateToString::response::ReflectReader(visitor); - }; - - handler.method2response[java_generateToString::request::kMethodInfo] = [](Reader& visitor) - { - if (visitor.HasMember("error")) - return Rsp_Error::ReflectReader(visitor); - - return java_generateToString::response::ReflectReader(visitor); - }; - - handler.method2response[java_getMoveDestinations::request::kMethodInfo] = [](Reader& visitor) - { - if (visitor.HasMember("error")) - return Rsp_Error::ReflectReader(visitor); - - return java_getMoveDestinations::response::ReflectReader(visitor); - }; - - handler.method2response[java_getRefactorEdit::request::kMethodInfo] = [](Reader& visitor) - { - if (visitor.HasMember("error")) - return Rsp_Error::ReflectReader(visitor); - - return java_getRefactorEdit::response::ReflectReader(visitor); - }; - - handler.method2response[java_move::request::kMethodInfo] = [](Reader& visitor) - { - if (visitor.HasMember("error")) - return Rsp_Error::ReflectReader(visitor); - - return java_move::response ::ReflectReader(visitor); - }; - - handler.method2response[java_organizeImports::request::kMethodInfo] = [](Reader& visitor) - { - if (visitor.HasMember("error")) - return Rsp_Error::ReflectReader(visitor); - - return java_organizeImports::response::ReflectReader(visitor); - }; - - handler.method2response[java_resolveUnimplementedAccessors::request::kMethodInfo] = [](Reader& visitor) - { - if (visitor.HasMember("error")) - return Rsp_Error::ReflectReader(visitor); - - return java_resolveUnimplementedAccessors::response::ReflectReader(visitor); - }; - - handler.method2response[java_searchSymbols::request::kMethodInfo] = [](Reader& visitor) - { - if (visitor.HasMember("error")) - return Rsp_Error::ReflectReader(visitor); - - return java_searchSymbols::response::ReflectReader(visitor); - }; - - handler.method2request[WorkspaceConfiguration::request::kMethodInfo] = [](Reader& visitor) - { - return WorkspaceConfiguration::request::ReflectReader(visitor); - }; - handler.method2request[WorkspaceFolders::request::kMethodInfo] = [](Reader& visitor) - { - return WorkspaceFolders::request::ReflectReader(visitor); - }; - -} - -void AddNotifyJsonRpcMethod(MessageJsonHandler& handler) -{ - - handler.method2notification[Notify_Exit::notify::kMethodInfo] = [](Reader& visitor) - { - return Notify_Exit::notify::ReflectReader(visitor); - }; - handler.method2notification[Notify_InitializedNotification::notify::kMethodInfo] = [](Reader& visitor) - { - return Notify_InitializedNotification::notify::ReflectReader(visitor); - }; - - handler.method2notification[java_projectConfigurationUpdate::notify::kMethodInfo] = [](Reader& visitor) - { - return java_projectConfigurationUpdate::notify::ReflectReader(visitor); - }; - - handler.method2notification[Notify_TextDocumentDidChange::notify::kMethodInfo] = [](Reader& visitor) - { - return Notify_TextDocumentDidChange::notify::ReflectReader(visitor); - }; - - handler.method2notification[Notify_TextDocumentDidClose::notify::kMethodInfo] = [](Reader& visitor) - { - return Notify_TextDocumentDidClose::notify::ReflectReader(visitor); - }; - - - handler.method2notification[Notify_TextDocumentDidOpen::notify::kMethodInfo] = [](Reader& visitor) - { - return Notify_TextDocumentDidOpen::notify::ReflectReader(visitor); - }; - - handler.method2notification[Notify_TextDocumentDidSave::notify::kMethodInfo] = [](Reader& visitor) - { - return Notify_TextDocumentDidSave::notify::ReflectReader(visitor); - }; - - handler.method2notification[Notify_TextDocumentPublishDiagnostics::notify::kMethodInfo] = [](Reader& visitor) - { - return Notify_TextDocumentPublishDiagnostics::notify::ReflectReader(visitor); - }; - handler.method2notification[Notify_semanticHighlighting::notify::kMethodInfo] = [](Reader& visitor) - { - return Notify_semanticHighlighting::notify::ReflectReader(visitor); - }; - handler.method2notification[td_willSave::notify::kMethodInfo] = [](Reader& visitor) - { - return td_willSave::notify::ReflectReader(visitor); - }; - - handler.method2notification[Notify_LogMessage::notify::kMethodInfo] = [](Reader& visitor) - { - return Notify_LogMessage::notify::ReflectReader(visitor); - }; - handler.method2notification[Notify_ShowMessage::notify::kMethodInfo] = [](Reader& visitor) - { - return Notify_ShowMessage::notify::ReflectReader(visitor); - }; - handler.method2notification[Notify_WorkspaceDidChangeWorkspaceFolders::notify::kMethodInfo] = [](Reader& visitor) - { - return Notify_WorkspaceDidChangeWorkspaceFolders::notify::ReflectReader(visitor); - }; - - handler.method2notification[Notify_WorkspaceDidChangeConfiguration::notify::kMethodInfo] = [](Reader& visitor) - { - return Notify_WorkspaceDidChangeConfiguration::notify::ReflectReader(visitor); - }; - - - handler.method2notification[Notify_WorkspaceDidChangeWatchedFiles::notify::kMethodInfo] = [](Reader& visitor) - { - return Notify_WorkspaceDidChangeWatchedFiles::notify::ReflectReader(visitor); - }; - - handler.method2notification[Notify_sendNotification::notify::kMethodInfo] = [](Reader& visitor) - { - return Notify_sendNotification::notify::ReflectReader(visitor); - }; - handler.method2notification[lang_status::notify::kMethodInfo] = [](Reader& visitor) - { - return lang_status::notify::ReflectReader(visitor); - }; - handler.method2notification[lang_actionableNotification::notify::kMethodInfo] = [](Reader& visitor) - { - return lang_actionableNotification::notify::ReflectReader(visitor); - }; - handler.method2notification[lang_progressReport::notify::kMethodInfo] = [](Reader& visitor) - { - return lang_progressReport::notify::ReflectReader(visitor); - }; - handler.method2notification[lang_eventNotification::notify::kMethodInfo] = [](Reader& visitor) - { - return lang_eventNotification::notify::ReflectReader(visitor); - }; -} - -void AddRequstJsonRpcMethod(MessageJsonHandler& handler) -{ - handler.method2request[Req_ClientRegisterCapability::request::kMethodInfo]= [](Reader& visitor) - { - - return Req_ClientRegisterCapability::request::ReflectReader(visitor); - }; - handler.method2request[Req_ClientUnregisterCapability::request::kMethodInfo] = [](Reader& visitor) - { - - return Req_ClientUnregisterCapability::request::ReflectReader(visitor); - }; -} - -void AddStandardRequestJsonRpcMethod(MessageJsonHandler& handler) -{ - - handler.method2request[td_initialize::request::kMethodInfo] = [](Reader& visitor) - { - - return td_initialize::request::ReflectReader(visitor); - }; - handler.method2request[td_shutdown::request::kMethodInfo] = [](Reader& visitor) - { - - return td_shutdown::request::ReflectReader(visitor); - }; - handler.method2request[td_codeAction::request::kMethodInfo] = [](Reader& visitor) - { - - - return td_codeAction::request::ReflectReader(visitor); - }; - handler.method2request[td_codeLens::request::kMethodInfo] = [](Reader& visitor) - { - - return td_codeLens::request::ReflectReader(visitor); - }; - handler.method2request[td_completion::request::kMethodInfo] = [](Reader& visitor) - { - - return td_completion::request::ReflectReader(visitor); - }; - - handler.method2request[td_definition::request::kMethodInfo] = [](Reader& visitor) - { - - return td_definition::request::ReflectReader(visitor); - }; - handler.method2request[td_declaration::request::kMethodInfo] = [](Reader& visitor) - { - - return td_declaration::request::ReflectReader(visitor); - }; - handler.method2request[td_willSaveWaitUntil::request::kMethodInfo] = [](Reader& visitor) - { - if (visitor.HasMember("error")) - return Rsp_Error::ReflectReader(visitor); - return td_willSaveWaitUntil::request::ReflectReader(visitor); - }; - - handler.method2request[td_highlight::request::kMethodInfo] = [](Reader& visitor) - { - - return td_highlight::request::ReflectReader(visitor); - }; - - handler.method2request[td_links::request::kMethodInfo] = [](Reader& visitor) - { - - return td_links::request::ReflectReader(visitor); - }; - - handler.method2request[td_linkResolve::request::kMethodInfo] = [](Reader& visitor) - { - - return td_linkResolve::request::ReflectReader(visitor); - }; - - handler.method2request[td_symbol::request::kMethodInfo] = [](Reader& visitor) - { - - return td_symbol::request::ReflectReader(visitor); - }; - - handler.method2request[td_formatting::request::kMethodInfo] = [](Reader& visitor) - { - - return td_formatting::request::ReflectReader(visitor); - }; - - handler.method2request[td_hover::request::kMethodInfo] = [](Reader& visitor) - { - return td_hover::request::ReflectReader(visitor); - }; - - handler.method2request[td_implementation::request::kMethodInfo] = [](Reader& visitor) - { - - return td_implementation::request::ReflectReader(visitor); - }; - - handler.method2request[td_didRenameFiles::request::kMethodInfo] = [](Reader& visitor) - { - - return td_didRenameFiles::request::ReflectReader(visitor); - }; - - handler.method2request[td_willRenameFiles::request::kMethodInfo] = [](Reader& visitor) - { - return td_willRenameFiles::request::ReflectReader(visitor); - }; -} - - -lsp::ProtocolJsonHandler::ProtocolJsonHandler() -{ - AddStadardResponseJsonRpcMethod(*this); - AddJavaExtentionResponseJsonRpcMethod(*this); - AddNotifyJsonRpcMethod(*this); - AddStandardRequestJsonRpcMethod(*this); - AddRequstJsonRpcMethod(*this); -} diff --git a/graphics/asymptote/LspCpp/LibLsp/lsp/ProtocolJsonHandler.h b/graphics/asymptote/LspCpp/LibLsp/lsp/ProtocolJsonHandler.h deleted file mode 100644 index b563f810d2..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/lsp/ProtocolJsonHandler.h +++ /dev/null @@ -1,11 +0,0 @@ -#pragma once - -#include "LibLsp/JsonRpc/MessageJsonHandler.h" -namespace lsp { - class ProtocolJsonHandler : public MessageJsonHandler - { - public: - ProtocolJsonHandler(); - }; - -} diff --git a/graphics/asymptote/LspCpp/LibLsp/lsp/ResourceOperation.h b/graphics/asymptote/LspCpp/LibLsp/lsp/ResourceOperation.h deleted file mode 100644 index caf2ea5d5f..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/lsp/ResourceOperation.h +++ /dev/null @@ -1,121 +0,0 @@ -#pragma once - -#include "LibLsp/JsonRpc/serializer.h" -#include -#include "lsDocumentUri.h" -#include "LibLsp/lsp/lsAny.h" -#include "LibLsp/lsp/lsTextEdit.h" -struct ResourceOperation { - std::string kind; - virtual ~ResourceOperation() = default; - - MAKE_SWAP_METHOD(ResourceOperation, kind); -}; -MAKE_REFLECT_STRUCT(ResourceOperation, kind); -extern void Reflect(Writer& visitor, ResourceOperation* value); -struct CreateFileOptions{ - - /** - * Overwrite existing file. Overwrite wins over `ignoreIfExists` - */ - boost::optional overwrite = false; - - /** - * Ignore if exists. - */ - boost::optional< bool> ignoreIfExists =false; - - MAKE_SWAP_METHOD(CreateFileOptions, overwrite, ignoreIfExists) -}; -MAKE_REFLECT_STRUCT(CreateFileOptions, overwrite, ignoreIfExists) -struct lsCreateFile :public ResourceOperation { - - /** - * The resource to create. - */ - lsCreateFile(); - lsDocumentUri uri; - - /** - * Additional options - */ - boost::optional options; - - - /** - * An optional annotation identifer describing the operation. - * - * @since 3.16.0 - */ - boost::optional annotationId; - - MAKE_SWAP_METHOD(lsCreateFile, kind, uri, options, annotationId) -}; -MAKE_REFLECT_STRUCT(lsCreateFile, kind, uri,options, annotationId) - - -struct DeleteFileOptions { - /** - * Delete the content recursively if a folder is denoted. - */ - boost::optional recursive = false; - - /** - * Ignore the operation if the file doesn't exist. - */ - boost::optional ignoreIfNotExists = false; - - - MAKE_SWAP_METHOD(DeleteFileOptions, recursive, ignoreIfNotExists); -}; - -MAKE_REFLECT_STRUCT(DeleteFileOptions, recursive, ignoreIfNotExists) - -struct lsDeleteFile :public ResourceOperation { - /** - * The file to delete. - */ - lsDeleteFile(); - lsDocumentUri uri; - - /** - * Delete options. - */ - boost::optional options; - - MAKE_SWAP_METHOD(lsDeleteFile, kind, uri, options); -}; -MAKE_REFLECT_STRUCT(lsDeleteFile, kind, uri,options); - -typedef CreateFileOptions RenameFileOptions; -struct lsRenameFile :public ResourceOperation { - /** - * The old (existing) location. - */ - lsRenameFile(); - lsDocumentUri oldUri; - - /** - * The new location. - */ - - lsDocumentUri newUri; - - /** - * Rename options. - */ - boost::optional options; - - /** - * An optional annotation identifer describing the operation. - * - * @since 3.16.0 - */ - boost::optional annotationId; - - MAKE_SWAP_METHOD(lsRenameFile, kind, oldUri, newUri, options, annotationId) -}; -MAKE_REFLECT_STRUCT(lsRenameFile, kind, oldUri, newUri, options, annotationId); - - -extern ResourceOperation* GetResourceOperation(lsp::Any& lspAny); \ No newline at end of file diff --git a/graphics/asymptote/LspCpp/LibLsp/lsp/SimpleTimer.h b/graphics/asymptote/LspCpp/LibLsp/lsp/SimpleTimer.h deleted file mode 100644 index 0a2707979d..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/lsp/SimpleTimer.h +++ /dev/null @@ -1,49 +0,0 @@ -#pragma once -#include -#include -#include -#include - -template -class SimpleTimer -{ -public: - SimpleTimer(unsigned int duration,const std::function& _call_back) - :is_running_(true), call_back(_call_back), _deadline_timer(_ios, Duration(duration)) - { - _deadline_timer.async_wait([&](const boost::system::error_code& e) - { - if (e.value() == boost::asio::error::operation_aborted) - { - return; - } - if(is_running_.load(std::memory_order_relaxed)) - { - call_back(); - } - - }); - _thread = std::thread([this] { _ios.run(); }); - } - ~SimpleTimer() - { - Stop(); - } - void Stop() - { - is_running_.store(false, std::memory_order_relaxed); - _ios.stop(); - if (_thread.joinable()) - { - _thread.join(); - } - } -private: - std::atomic_bool is_running_; - std::function call_back; - boost::asio::io_service _ios; - boost::asio::deadline_timer _deadline_timer; - std::thread _thread; - - -}; diff --git a/graphics/asymptote/LspCpp/LibLsp/lsp/client/registerCapability.h b/graphics/asymptote/LspCpp/LibLsp/lsp/client/registerCapability.h deleted file mode 100644 index fa5d111403..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/lsp/client/registerCapability.h +++ /dev/null @@ -1,49 +0,0 @@ -#pragma once -#include "LibLsp/JsonRpc/message.h" -#include "LibLsp/lsp/lsDocumentUri.h" - -/** - * General parameters to register for a capability. - */ - -struct Registration { - static Registration Create(const std::string& method); - /** - * The id used to register the request. The id can be used to deregister - * the request again. - */ - std::string id; - - /** - * The method / capability to register for. - */ - - std::string method; - - MAKE_SWAP_METHOD(Registration, id, method); -}; - - -MAKE_REFLECT_STRUCT(Registration, id, method); - -/** - * The client/registerCapability request is sent from the server to the client to register - * for a new capability on the client side. Not all clients need to support dynamic - * capability registration. A client opts in via the dynamicRegistration property on the - * specific client capabilities. A client can even provide dynamic registration for - * capability A but not for capability B (see TextDocumentClientCapabilities as an example). - */ -struct RegistrationParams -{ - std::vector registrations; - MAKE_SWAP_METHOD(RegistrationParams, registrations); -}; -/** - * The client/registerCapability request is sent from the server to the client - * to register for a new capability on the client side. - * Not all clients need to support dynamic capability registration. - * A client opts in via the ClientCapabilities.dynamicRegistration property - */ -MAKE_REFLECT_STRUCT(RegistrationParams, registrations); - -DEFINE_REQUEST_RESPONSE_TYPE(Req_ClientRegisterCapability, RegistrationParams,JsonNull, "client/registerCapability"); \ No newline at end of file diff --git a/graphics/asymptote/LspCpp/LibLsp/lsp/client/unregisterCapability.h b/graphics/asymptote/LspCpp/LibLsp/lsp/client/unregisterCapability.h deleted file mode 100644 index aa51d7efee..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/lsp/client/unregisterCapability.h +++ /dev/null @@ -1,41 +0,0 @@ -#pragma once - -#include "LibLsp/lsp/lsDocumentUri.h" - -#include "LibLsp/JsonRpc/RequestInMessage.h" -#include "LibLsp/JsonRpc/lsResponseMessage.h" - -/** - * General parameters to unregister a capability. - */ - -struct Unregistration { - /** - * The id used to unregister the request or notification. Usually an id - * provided during the register request. - */ - - std::string id; - - /** - * The method / capability to unregister for. - */ - - std::string method; - - MAKE_SWAP_METHOD(Unregistration, id, method); -}; -MAKE_REFLECT_STRUCT(Unregistration, id, method); -/** - * The client/unregisterCapability request is sent from the server to the client to unregister - * a previously registered capability. - */ -struct UnregistrationParams -{ - std::vector unregisterations; - MAKE_SWAP_METHOD(UnregistrationParams, unregisterations); -}; - -MAKE_REFLECT_STRUCT(UnregistrationParams, unregisterations); - -DEFINE_REQUEST_RESPONSE_TYPE(Req_ClientUnregisterCapability, UnregistrationParams,JsonNull, "client/unregisterCapability"); \ No newline at end of file diff --git a/graphics/asymptote/LspCpp/LibLsp/lsp/extention/jdtls/Move.h b/graphics/asymptote/LspCpp/LibLsp/lsp/extention/jdtls/Move.h deleted file mode 100644 index c0beb625f2..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/lsp/extention/jdtls/Move.h +++ /dev/null @@ -1,14 +0,0 @@ -#pragma once - -#include "LibLsp/JsonRpc/RequestInMessage.h" -#include "LibLsp/JsonRpc/lsResponseMessage.h" -#include -#include "LibLsp/lsp/CodeActionParams.h" -#include "getMoveDestinations.h" -#include "getRefactorEdit.h" - - -DEFINE_REQUEST_RESPONSE_TYPE(java_move, MoveParams, RefactorWorkspaceEdit, "java/move"); - - - diff --git a/graphics/asymptote/LspCpp/LibLsp/lsp/extention/jdtls/OverridableMethod.h b/graphics/asymptote/LspCpp/LibLsp/lsp/extention/jdtls/OverridableMethod.h deleted file mode 100644 index cfb17fdf34..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/lsp/extention/jdtls/OverridableMethod.h +++ /dev/null @@ -1,34 +0,0 @@ -#pragma once - -#include "LibLsp/JsonRpc/serializer.h" -#include -struct OverridableMethod -{ - std::string bindingKey; - std::string name; - std::vector parameters; - bool unimplemented = false; - std::string declaringClass; - std::string declaringClassType; - - void swap(OverridableMethod& arg) noexcept - { - bindingKey.swap(arg.bindingKey); - name.swap(arg.name); - parameters.swap(arg.parameters); - declaringClass.swap(arg.declaringClass); - declaringClassType.swap(arg.declaringClassType); - std::swap(unimplemented, arg.unimplemented); - } -}; -MAKE_REFLECT_STRUCT(OverridableMethod, bindingKey, name, parameters, unimplemented, declaringClass, declaringClassType); - -struct OverridableMethodsResponse -{ - std::string type; - std::vector methods; - - MAKE_SWAP_METHOD(OverridableMethodsResponse, type, methods) -}; - -MAKE_REFLECT_STRUCT(OverridableMethodsResponse, type, methods) diff --git a/graphics/asymptote/LspCpp/LibLsp/lsp/extention/jdtls/WorkspaceSymbolParams.h b/graphics/asymptote/LspCpp/LibLsp/lsp/extention/jdtls/WorkspaceSymbolParams.h deleted file mode 100644 index c7faa94d6c..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/lsp/extention/jdtls/WorkspaceSymbolParams.h +++ /dev/null @@ -1,13 +0,0 @@ -#pragma once - -#include "LibLsp/JsonRpc/serializer.h" -#include - - -struct WorkspaceSymbolParams -{ - std::string query; - MAKE_SWAP_METHOD(WorkspaceSymbolParams, query); -}; -MAKE_REFLECT_STRUCT(WorkspaceSymbolParams, query); - diff --git a/graphics/asymptote/LspCpp/LibLsp/lsp/extention/jdtls/addOverridableMethods.h b/graphics/asymptote/LspCpp/LibLsp/lsp/extention/jdtls/addOverridableMethods.h deleted file mode 100644 index 5da14a452a..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/lsp/extention/jdtls/addOverridableMethods.h +++ /dev/null @@ -1,19 +0,0 @@ -#pragma once - -#include "LibLsp/JsonRpc/message.h" -#include "OverridableMethod.h" -#include "LibLsp/lsp/CodeActionParams.h" -#include "LibLsp/JsonRpc/RequestInMessage.h" -#include "LibLsp/JsonRpc/lsResponseMessage.h" -struct AddOverridableMethodParams { - lsCodeActionParams context; - std::vector overridableMethods; - - MAKE_SWAP_METHOD(AddOverridableMethodParams, context, overridableMethods); -}; - -MAKE_REFLECT_STRUCT(AddOverridableMethodParams, context, overridableMethods); - -DEFINE_REQUEST_RESPONSE_TYPE(java_addOverridableMethods, AddOverridableMethodParams, lsWorkspaceEdit, "java/addOverridableMethods"); - - diff --git a/graphics/asymptote/LspCpp/LibLsp/lsp/extention/jdtls/buildWorkspace.h b/graphics/asymptote/LspCpp/LibLsp/lsp/extention/jdtls/buildWorkspace.h deleted file mode 100644 index a2c2c062cc..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/lsp/extention/jdtls/buildWorkspace.h +++ /dev/null @@ -1,17 +0,0 @@ -#pragma once - -#include "WorkspaceSymbolParams.h" -#include "LibLsp/JsonRpc/RequestInMessage.h" -#include "LibLsp/JsonRpc/lsResponseMessage.h" - - - - - -enum class BuildWorkspaceStatus : uint8_t{ - - FAILED, SUCCEED, WITH_ERROR, CANCELLED, -}; -MAKE_REFLECT_TYPE_PROXY(BuildWorkspaceStatus) - -DEFINE_REQUEST_RESPONSE_TYPE(java_buildWorkspace, bool, BuildWorkspaceStatus, "java/buildWorkspace"); \ No newline at end of file diff --git a/graphics/asymptote/LspCpp/LibLsp/lsp/extention/jdtls/checkConstructorsStatus.h b/graphics/asymptote/LspCpp/LibLsp/lsp/extention/jdtls/checkConstructorsStatus.h deleted file mode 100644 index 261a0cc551..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/lsp/extention/jdtls/checkConstructorsStatus.h +++ /dev/null @@ -1,29 +0,0 @@ -#pragma once - -#include "LibLsp/JsonRpc/RequestInMessage.h" -#include "LibLsp/JsonRpc/lsResponseMessage.h" -#include "LibLsp/lsp/CodeActionParams.h" -#include "checkHashCodeEqualsStatus.h" - -struct LspMethodBinding { - std::string bindingKey; - std::string name; - std::vector< std::string> parameters; - - MAKE_SWAP_METHOD(LspMethodBinding, bindingKey, name, parameters); -}; -MAKE_REFLECT_STRUCT(LspMethodBinding, bindingKey, name, parameters); - - -struct CheckConstructorsResponse { - std::vector constructors; - std::vector fields; - MAKE_SWAP_METHOD(CheckConstructorsResponse, constructors, fields) -}; -MAKE_REFLECT_STRUCT(CheckConstructorsResponse, constructors,fields) - -DEFINE_REQUEST_RESPONSE_TYPE(java_checkConstructorsStatus, lsCodeActionParams, CheckConstructorsResponse,"java/checkConstructorsStatus") - - - - diff --git a/graphics/asymptote/LspCpp/LibLsp/lsp/extention/jdtls/checkDelegateMethodsStatus.h b/graphics/asymptote/LspCpp/LibLsp/lsp/extention/jdtls/checkDelegateMethodsStatus.h deleted file mode 100644 index 729639eafa..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/lsp/extention/jdtls/checkDelegateMethodsStatus.h +++ /dev/null @@ -1,29 +0,0 @@ -#pragma once - -#include "LibLsp/JsonRpc/RequestInMessage.h" -#include "LibLsp/JsonRpc/lsResponseMessage.h" - -#include "LibLsp/lsp/CodeActionParams.h" -#include "checkHashCodeEqualsStatus.h" -#include "checkConstructorsStatus.h" - -struct LspDelegateField { - LspVariableBinding field; - std::vector delegateMethods; - - MAKE_SWAP_METHOD(LspDelegateField, field, delegateMethods); -}; -MAKE_REFLECT_STRUCT(LspDelegateField, field, delegateMethods); - - -struct CheckDelegateMethodsResponse { - std::vector delegateFields; - - MAKE_SWAP_METHOD(CheckDelegateMethodsResponse, delegateFields) -}; -MAKE_REFLECT_STRUCT(CheckDelegateMethodsResponse, delegateFields) - -DEFINE_REQUEST_RESPONSE_TYPE(java_checkDelegateMethodsStatus, - lsCodeActionParams, CheckDelegateMethodsResponse, "java/checkDelegateMethodsStatus"); - - diff --git a/graphics/asymptote/LspCpp/LibLsp/lsp/extention/jdtls/checkHashCodeEqualsStatus.h b/graphics/asymptote/LspCpp/LibLsp/lsp/extention/jdtls/checkHashCodeEqualsStatus.h deleted file mode 100644 index 1d9652dd44..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/lsp/extention/jdtls/checkHashCodeEqualsStatus.h +++ /dev/null @@ -1,36 +0,0 @@ -#pragma once - -#include "LibLsp/JsonRpc/RequestInMessage.h" -#include "LibLsp/JsonRpc/lsResponseMessage.h" - -#include - -#include "LibLsp/lsp/CodeActionParams.h" - -struct LspVariableBinding { - std::string bindingKey; - std::string name; - std::string type; - bool isField; - void swap(LspVariableBinding& arg) noexcept - { - bindingKey.swap(arg.bindingKey); - name.swap(arg.name); - type.swap(arg.type); - std::swap(isField, arg.isField); - } -}; -MAKE_REFLECT_STRUCT(LspVariableBinding, bindingKey, name, type, isField) - -struct CheckHashCodeEqualsResponse { - std::string type; - std::vector fields; - std::vector existingMethods; - MAKE_SWAP_METHOD(CheckHashCodeEqualsResponse, type, fields, type, existingMethods) -}; -MAKE_REFLECT_STRUCT(CheckHashCodeEqualsResponse, type, fields, type, existingMethods) - -DEFINE_REQUEST_RESPONSE_TYPE(java_checkHashCodeEqualsStatus, - lsCodeActionParams, CheckHashCodeEqualsResponse, "java/checkHashCodeEqualsStatus") - - diff --git a/graphics/asymptote/LspCpp/LibLsp/lsp/extention/jdtls/checkToStringStatus.h b/graphics/asymptote/LspCpp/LibLsp/lsp/extention/jdtls/checkToStringStatus.h deleted file mode 100644 index 24580d94c0..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/lsp/extention/jdtls/checkToStringStatus.h +++ /dev/null @@ -1,24 +0,0 @@ -#pragma once - -#include "LibLsp/JsonRpc/RequestInMessage.h" -#include "LibLsp/JsonRpc/lsResponseMessage.h" - -#include "LibLsp/lsp/CodeActionParams.h" -#include "checkHashCodeEqualsStatus.h" -struct CheckToStringResponse { - std::string type; - std::vector fields; - bool exists; - void swap(CheckToStringResponse& arg) noexcept - { - type.swap(arg.type); - fields.swap(arg.fields); - std::swap(exists, arg.exists); - } -}; -MAKE_REFLECT_STRUCT(CheckToStringResponse,type,fields,exists) - -DEFINE_REQUEST_RESPONSE_TYPE(java_checkToStringStatus, - lsCodeActionParams, CheckToStringResponse ,"java/checkToStringStatus") - - diff --git a/graphics/asymptote/LspCpp/LibLsp/lsp/extention/jdtls/classFileContents.h b/graphics/asymptote/LspCpp/LibLsp/lsp/extention/jdtls/classFileContents.h deleted file mode 100644 index 70eb121b99..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/lsp/extention/jdtls/classFileContents.h +++ /dev/null @@ -1,10 +0,0 @@ -#pragma once - -#include "LibLsp/JsonRpc/RequestInMessage.h" -#include "LibLsp/JsonRpc/lsResponseMessage.h" - -#include -#include "LibLsp/lsp/lsTextDocumentIdentifier.h" - -DEFINE_REQUEST_RESPONSE_TYPE(java_classFileContents, lsTextDocumentIdentifier, std::string ,"java/classFileContents"); - diff --git a/graphics/asymptote/LspCpp/LibLsp/lsp/extention/jdtls/codeActionResult.h b/graphics/asymptote/LspCpp/LibLsp/lsp/extention/jdtls/codeActionResult.h deleted file mode 100644 index 02024e3d93..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/lsp/extention/jdtls/codeActionResult.h +++ /dev/null @@ -1,22 +0,0 @@ -#pragma once - -#include "LibLsp/JsonRpc/serializer.h" -#include "LibLsp/JsonRpc/message.h" -#include "LibLsp/lsp/lsCodeAction.h" -#include "LibLsp/lsp/workspace/execute_command.h" -#include -#include "LibLsp/lsp/textDocument/code_action.h" - -namespace SourceAssistProcessor { - - /*std::set UNSUPPORTED_RESOURCES = { "module-info.java", "package-info.java" - };*/ - -// static const char* COMMAND_ID_ACTION_OVERRIDEMETHODSPROMPT = "java.action.overrideMethodsPrompt"; -// static const char* COMMAND_ID_ACTION_HASHCODEEQUALSPROMPT = "java.action.hashCodeEqualsPrompt"; -// static const char* COMMAND_ID_ACTION_ORGANIZEIMPORTS = "java.action.organizeImports"; -// static const char* COMMAND_ID_ACTION_GENERATETOSTRINGPROMPT = "java.action.generateToStringPrompt"; -// static const char* COMMAND_ID_ACTION_GENERATEACCESSORSPROMPT = "java.action.generateAccessorsPrompt"; -// static const char* COMMAND_ID_ACTION_GENERATECONSTRUCTORSPROMPT = "java.action.generateConstructorsPrompt"; -// static const char* COMMAND_ID_ACTION_GENERATEDELEGATEMETHODSPROMPT = "java.action.generateDelegateMethodsPrompt"; -}; diff --git a/graphics/asymptote/LspCpp/LibLsp/lsp/extention/jdtls/executeCommand.h b/graphics/asymptote/LspCpp/LibLsp/lsp/extention/jdtls/executeCommand.h deleted file mode 100644 index 92d4a3627b..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/lsp/extention/jdtls/executeCommand.h +++ /dev/null @@ -1,29 +0,0 @@ -#pragma once -#include "LibLsp/JsonRpc/RequestInMessage.h" -#include "LibLsp/JsonRpc/lsResponseMessage.h" -#include -#include "LibLsp/lsp/lsWorkspaceEdit.h" -#include "LibLsp/lsp/ExecuteCommandParams.h" -namespace buildpath -{ -// static const char* EDIT_ORGNIZEIMPORTS = "java.edit.organizeImports"; -// static const char* RESOLVE_SOURCE_ATTACHMENT = "java.project.resolveSourceAttachment"; - -// static const char* UPDATE_SOURCE_ATTACHMENT = "java.project.updateSourceAttachment"; - -// static const char* ADD_TO_SOURCEPATH = "java.project.addToSourcePath"; - -// static const char* REMOVE_FROM_SOURCEPATH = "java.project.removeFromSourcePath"; - -// static const char* LIST_SOURCEPATHS = "java.project.listSourcePaths"; - struct Result { - bool status; - std::string message; - }; - - - -} - - -DEFINE_REQUEST_RESPONSE_TYPE(java_executeCommand, ExecuteCommandParams, lsWorkspaceEdit, "java/executeCommand"); diff --git a/graphics/asymptote/LspCpp/LibLsp/lsp/extention/jdtls/findLinks.h b/graphics/asymptote/LspCpp/LibLsp/lsp/extention/jdtls/findLinks.h deleted file mode 100644 index d184c675d8..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/lsp/extention/jdtls/findLinks.h +++ /dev/null @@ -1,22 +0,0 @@ -#pragma once - -#include "LibLsp/JsonRpc/RequestInMessage.h" -#include "LibLsp/JsonRpc/lsResponseMessage.h" -#include -#include "LibLsp/lsp/CodeActionParams.h" -#include "getRefactorEdit.h" -#include "LibLsp/lsp/lsTextDocumentPositionParams.h" - -struct FindLinksParams { - // Supported link types: superImplementation - std::string type; - lsTextDocumentPositionParams position; - - MAKE_SWAP_METHOD(FindLinksParams, type, position) -}; -MAKE_REFLECT_STRUCT(FindLinksParams,type,position) - -DEFINE_REQUEST_RESPONSE_TYPE(java_findLinks, FindLinksParams,lsp::Any, "java/findLinks"); - - - diff --git a/graphics/asymptote/LspCpp/LibLsp/lsp/extention/jdtls/generateAccessors.h b/graphics/asymptote/LspCpp/LibLsp/lsp/extention/jdtls/generateAccessors.h deleted file mode 100644 index 200d840e94..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/lsp/extention/jdtls/generateAccessors.h +++ /dev/null @@ -1,19 +0,0 @@ -#pragma once - -#include "LibLsp/JsonRpc/RequestInMessage.h" -#include "LibLsp/JsonRpc/lsResponseMessage.h" -#include -#include "checkHashCodeEqualsStatus.h" -#include "resolveUnimplementedAccessors.h" - - -struct GenerateAccessorsParams { - lsCodeActionParams context; - std::vector accessors; - - - MAKE_SWAP_METHOD(GenerateAccessorsParams, context, accessors) -}; -MAKE_REFLECT_STRUCT(GenerateAccessorsParams, context, accessors) - -DEFINE_REQUEST_RESPONSE_TYPE(java_generateAccessors, GenerateAccessorsParams, lsWorkspaceEdit, "java/generateAccessors"); diff --git a/graphics/asymptote/LspCpp/LibLsp/lsp/extention/jdtls/generateConstructors.h b/graphics/asymptote/LspCpp/LibLsp/lsp/extention/jdtls/generateConstructors.h deleted file mode 100644 index 77c49a66a2..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/lsp/extention/jdtls/generateConstructors.h +++ /dev/null @@ -1,19 +0,0 @@ -#pragma once - -#include "LibLsp/JsonRpc/RequestInMessage.h" -#include "LibLsp/JsonRpc/lsResponseMessage.h" -#include -#include "checkHashCodeEqualsStatus.h" -#include "checkConstructorsStatus.h" - - -struct GenerateConstructorsParams { - lsCodeActionParams context; - std::vector constructors; - std::vector< LspVariableBinding >fields; - MAKE_SWAP_METHOD(GenerateConstructorsParams, context, fields) -}; -MAKE_REFLECT_STRUCT(GenerateConstructorsParams, context, fields) - -DEFINE_REQUEST_RESPONSE_TYPE(java_generateConstructors, GenerateConstructorsParams, lsWorkspaceEdit, "java/generateConstructors"); - diff --git a/graphics/asymptote/LspCpp/LibLsp/lsp/extention/jdtls/generateDelegateMethods.h b/graphics/asymptote/LspCpp/LibLsp/lsp/extention/jdtls/generateDelegateMethods.h deleted file mode 100644 index 8958ae4d7e..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/lsp/extention/jdtls/generateDelegateMethods.h +++ /dev/null @@ -1,25 +0,0 @@ -#pragma once - -#include "LibLsp/JsonRpc/RequestInMessage.h" -#include "LibLsp/JsonRpc/lsResponseMessage.h" -#include -#include "checkHashCodeEqualsStatus.h" -#include "checkConstructorsStatus.h" - -struct LspDelegateEntry { - LspVariableBinding field; - LspMethodBinding delegateMethod; - MAKE_SWAP_METHOD(LspDelegateEntry, field, delegateMethod); -}; -MAKE_REFLECT_STRUCT(LspDelegateEntry, field, delegateMethod); - - -struct GenerateDelegateMethodsParams { - lsCodeActionParams context; - std::vector delegateEntries; - MAKE_SWAP_METHOD(GenerateDelegateMethodsParams, context, delegateEntries) -}; -MAKE_REFLECT_STRUCT(GenerateDelegateMethodsParams, context, delegateEntries) - -DEFINE_REQUEST_RESPONSE_TYPE(java_generateDelegateMethods, GenerateDelegateMethodsParams, lsWorkspaceEdit, "java/generateDelegateMethods"); - diff --git a/graphics/asymptote/LspCpp/LibLsp/lsp/extention/jdtls/generateHashCodeEquals.h b/graphics/asymptote/LspCpp/LibLsp/lsp/extention/jdtls/generateHashCodeEquals.h deleted file mode 100644 index 937c358733..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/lsp/extention/jdtls/generateHashCodeEquals.h +++ /dev/null @@ -1,25 +0,0 @@ -#pragma once - -#include "LibLsp/JsonRpc/RequestInMessage.h" -#include "LibLsp/JsonRpc/lsResponseMessage.h" -#include - -#include "LibLsp/lsp/CodeActionParams.h" -#include "checkHashCodeEqualsStatus.h" - -struct GenerateHashCodeEqualsParams { - lsCodeActionParams context; - std::vector fields; - bool regenerate= false; - void swap(GenerateHashCodeEqualsParams& arg) noexcept - { - context.swap(arg.context); - fields.swap(arg.fields); - std::swap(regenerate, arg.regenerate); - } -}; -MAKE_REFLECT_STRUCT(GenerateHashCodeEqualsParams, context, fields, regenerate); - -DEFINE_REQUEST_RESPONSE_TYPE(java_generateHashCodeEquals, GenerateHashCodeEqualsParams, lsWorkspaceEdit, "java/generateHashCodeEquals") - - diff --git a/graphics/asymptote/LspCpp/LibLsp/lsp/extention/jdtls/generateToString.h b/graphics/asymptote/LspCpp/LibLsp/lsp/extention/jdtls/generateToString.h deleted file mode 100644 index 1f8ccc73b8..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/lsp/extention/jdtls/generateToString.h +++ /dev/null @@ -1,18 +0,0 @@ -#pragma once - -#include "LibLsp/JsonRpc/RequestInMessage.h" -#include "LibLsp/JsonRpc/lsResponseMessage.h" -#include -#include "checkHashCodeEqualsStatus.h" - - -struct GenerateToStringParams { - lsCodeActionParams context; - std::vector< LspVariableBinding >fields; - - MAKE_SWAP_METHOD(GenerateToStringParams, context, fields) - -}; -MAKE_REFLECT_STRUCT(GenerateToStringParams, context, fields) - -DEFINE_REQUEST_RESPONSE_TYPE(java_generateToString, GenerateToStringParams, lsWorkspaceEdit, "java/generateToString"); diff --git a/graphics/asymptote/LspCpp/LibLsp/lsp/extention/jdtls/getMoveDestinations.h b/graphics/asymptote/LspCpp/LibLsp/lsp/extention/jdtls/getMoveDestinations.h deleted file mode 100644 index bcbf6f8c2b..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/lsp/extention/jdtls/getMoveDestinations.h +++ /dev/null @@ -1,65 +0,0 @@ -#pragma once - -#include "LibLsp/JsonRpc/RequestInMessage.h" -#include "LibLsp/JsonRpc/lsResponseMessage.h" -#include -#include "LibLsp/lsp/lsAny.h" -#include "LibLsp/lsp/CodeActionParams.h" - -struct MoveKindInfo -{ - static std::string moveResource() - { - return "moveResource"; - } - static std::string moveInstanceMethod() - { - return "moveInstanceMethod"; - } - static std::string moveStaticMember() - { - return "moveStaticMember"; - } -}; - -struct MoveParams { - /** - * The supported move kind: moveResource, moveInstanceMethod, moveStaticMember, - * moveTypeToNewFile. - */ - std::string moveKind; - /** - * The selected resource uris when the move operation is triggered. - */ - std::vector sourceUris; - /** - * The code action params when the move operation is triggered. - */ - boost::optional params; - /** - * The possible destination: a folder/package, class, instanceDeclaration. - */ - lsp::Any destination; - bool updateReferences; - void swap(MoveParams& arg) noexcept - { - moveKind.swap(arg.moveKind); - sourceUris.swap(arg.sourceUris); - params.swap(arg.params); - destination.swap(arg.destination); - std::swap(updateReferences, arg.updateReferences); - } -}; -MAKE_REFLECT_STRUCT(MoveParams, moveKind, sourceUris, params, destination, updateReferences); - -struct MoveDestinationsResponse { - std::string errorMessage; - std::vector destinations; - MAKE_SWAP_METHOD(MoveDestinationsResponse, errorMessage, destinations); -}; -MAKE_REFLECT_STRUCT(MoveDestinationsResponse, errorMessage, destinations); - -DEFINE_REQUEST_RESPONSE_TYPE(java_getMoveDestinations, MoveParams, MoveDestinationsResponse, "java/getMoveDestinations"); - - - diff --git a/graphics/asymptote/LspCpp/LibLsp/lsp/extention/jdtls/getRefactorEdit.h b/graphics/asymptote/LspCpp/LibLsp/lsp/extention/jdtls/getRefactorEdit.h deleted file mode 100644 index e46327075a..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/lsp/extention/jdtls/getRefactorEdit.h +++ /dev/null @@ -1,77 +0,0 @@ -#pragma once - -#include "LibLsp/JsonRpc/RequestInMessage.h" -#include "LibLsp/JsonRpc/lsResponseMessage.h" - - - -#include -#include -#include "WorkspaceSymbolParams.h" -#include "LibLsp/lsp/method_type.h" -#include "LibLsp/lsp/textDocument/code_action.h" -#include "LibLsp/lsp/lsFormattingOptions.h" - -namespace -RefactorProposalUtility -{ - extern const char* APPLY_REFACTORING_COMMAND_ID; - extern const char* EXTRACT_VARIABLE_ALL_OCCURRENCE_COMMAND; - extern const char* EXTRACT_VARIABLE_COMMAND; - extern const char* EXTRACT_CONSTANT_COMMAND; - extern const char* EXTRACT_METHOD_COMMAND; - extern const char* EXTRACT_FIELD_COMMAND; - extern const char* CONVERT_VARIABLE_TO_FIELD_COMMAND; - extern const char* MOVE_FILE_COMMAND; - extern const char* MOVE_INSTANCE_METHOD_COMMAND; - extern const char* MOVE_STATIC_MEMBER_COMMAND; - extern const char* MOVE_TYPE_COMMAND; -}; - - -struct RenamePosition { - lsDocumentUri uri; - int offset = 0; - int length = 0; - void swap(RenamePosition& arg) noexcept - { - uri.swap(arg.uri); - std::swap(offset, arg.offset); - std::swap(length, arg.length); - } -}; -MAKE_REFLECT_STRUCT(RenamePosition, uri, offset, length); - -struct GetRefactorEditParams -{ - std::string command; - std::vector commandArguments; - lsCodeActionParams context; - boost::optional options; - MAKE_SWAP_METHOD(GetRefactorEditParams, command, context, options); -}; -MAKE_REFLECT_STRUCT(GetRefactorEditParams, command, context, options); - - - - -struct RefactorWorkspaceEdit { - /** - * The workspace edit this code action performs. - */ - lsWorkspaceEdit edit; - /** - * A command this code action executes. If a code action provides a edit and a - * command, first the edit is executed and then the command. - */ - - boost::optional errorMessage; - - boost::optional < lsCommandWithAny > command; - - MAKE_SWAP_METHOD(RefactorWorkspaceEdit, edit, command, errorMessage) -}; -MAKE_REFLECT_STRUCT(RefactorWorkspaceEdit,edit,command,errorMessage) - -DEFINE_REQUEST_RESPONSE_TYPE(java_getRefactorEdit, GetRefactorEditParams, RefactorWorkspaceEdit, "java/getRefactorEdit"); - diff --git a/graphics/asymptote/LspCpp/LibLsp/lsp/extention/jdtls/listOverridableMethods.h b/graphics/asymptote/LspCpp/LibLsp/lsp/extention/jdtls/listOverridableMethods.h deleted file mode 100644 index 13b73ce5c2..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/lsp/extention/jdtls/listOverridableMethods.h +++ /dev/null @@ -1,17 +0,0 @@ -#pragma once - -#include "LibLsp/JsonRpc/RequestInMessage.h" -#include "LibLsp/JsonRpc/lsResponseMessage.h" - -#include "LibLsp/lsp/CodeActionParams.h" -#include "OverridableMethod.h" - - - - - -DEFINE_REQUEST_RESPONSE_TYPE(java_listOverridableMethods, lsCodeActionParams, OverridableMethodsResponse, "java/listOverridableMethods"); - - - - diff --git a/graphics/asymptote/LspCpp/LibLsp/lsp/extention/jdtls/organizeImports.h b/graphics/asymptote/LspCpp/LibLsp/lsp/extention/jdtls/organizeImports.h deleted file mode 100644 index 817d52d32b..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/lsp/extention/jdtls/organizeImports.h +++ /dev/null @@ -1,12 +0,0 @@ -#pragma once -#include "LibLsp/JsonRpc/RequestInMessage.h" -#include "LibLsp/JsonRpc/lsResponseMessage.h" -#include - -#include "LibLsp/lsp/CodeActionParams.h" - - - -DEFINE_REQUEST_RESPONSE_TYPE(java_organizeImports, lsCodeActionParams, lsWorkspaceEdit, "java/organizeImports"); - - diff --git a/graphics/asymptote/LspCpp/LibLsp/lsp/extention/jdtls/projectConfigurationUpdate.h b/graphics/asymptote/LspCpp/LibLsp/lsp/extention/jdtls/projectConfigurationUpdate.h deleted file mode 100644 index 342d167093..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/lsp/extention/jdtls/projectConfigurationUpdate.h +++ /dev/null @@ -1,13 +0,0 @@ -#pragma once - -#include "LibLsp/JsonRpc/NotificationInMessage.h" - - -#include -#include -#include "WorkspaceSymbolParams.h" - -#include "LibLsp/lsp/lsTextDocumentIdentifier.h" - -DEFINE_NOTIFICATION_TYPE(java_projectConfigurationUpdate, lsTextDocumentIdentifier, "java/projectConfigurationUpdate"); - diff --git a/graphics/asymptote/LspCpp/LibLsp/lsp/extention/jdtls/resolveUnimplementedAccessors.h b/graphics/asymptote/LspCpp/LibLsp/lsp/extention/jdtls/resolveUnimplementedAccessors.h deleted file mode 100644 index ba77041474..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/lsp/extention/jdtls/resolveUnimplementedAccessors.h +++ /dev/null @@ -1,24 +0,0 @@ -#pragma once - -#include "LibLsp/JsonRpc/RequestInMessage.h" -#include "LibLsp/JsonRpc/lsResponseMessage.h" -#include -#include "checkHashCodeEqualsStatus.h" - - -struct AccessorField { - std::string fieldName; - bool isStatic =false; - bool generateGetter = false; - bool generateSetter = false; - void swap(AccessorField& arg) noexcept{ - fieldName.swap(arg.fieldName); - std::swap(isStatic, arg.isStatic); - std::swap(generateGetter, arg.generateGetter); - std::swap(generateSetter, arg.generateSetter); - } -}; - -MAKE_REFLECT_STRUCT(AccessorField, fieldName,isStatic,generateGetter,generateSetter) - -DEFINE_REQUEST_RESPONSE_TYPE(java_resolveUnimplementedAccessors, lsCodeActionParams, std::vector, "java/resolveUnimplementedAccessors"); diff --git a/graphics/asymptote/LspCpp/LibLsp/lsp/extention/jdtls/searchSymbols.h b/graphics/asymptote/LspCpp/LibLsp/lsp/extention/jdtls/searchSymbols.h deleted file mode 100644 index ac8a2419f6..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/lsp/extention/jdtls/searchSymbols.h +++ /dev/null @@ -1,27 +0,0 @@ -#pragma once - -#include "LibLsp/JsonRpc/RequestInMessage.h" -#include "LibLsp/JsonRpc/lsResponseMessage.h" - - -#include -#include -#include "WorkspaceSymbolParams.h" -#include "LibLsp/lsp/method_type.h" -#include "LibLsp/lsp/symbol.h" - - -struct SearchSymbolParams :public WorkspaceSymbolParams -{ - boost::optional projectName; - boost::optional< bool >sourceOnly; - boost::optional< int> maxResults; - MAKE_SWAP_METHOD(SearchSymbolParams, query, projectName, sourceOnly, maxResults); -}; -MAKE_REFLECT_STRUCT(SearchSymbolParams, query, projectName, sourceOnly, maxResults); - - -DEFINE_REQUEST_RESPONSE_TYPE(java_searchSymbols, SearchSymbolParams, std::vector, "java/searchSymbols"); - - - diff --git a/graphics/asymptote/LspCpp/LibLsp/lsp/extention/sct/SCTConfig.h b/graphics/asymptote/LspCpp/LibLsp/lsp/extention/sct/SCTConfig.h deleted file mode 100644 index 7b41118c0a..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/lsp/extention/sct/SCTConfig.h +++ /dev/null @@ -1,37 +0,0 @@ -#pragma once -#include -#include -#include -using namespace std; - - -struct TCP_option -{ - std::string host = "127.0.0.1"; - int port = 8889; - -}; -MAKE_REFLECT_STRUCT(TCP_option,host,port) - - -struct SCTConfig -{ - static SCTConfig* newInstance(const string& file_path,string& error); - std::string version; - std::string file_name; - - boost::optional start_by_jcide; - - boost::optional tcp; - boost::optional> args; - - // internal using - bool broken = false; - std::string error; -}; - - -MAKE_REFLECT_STRUCT(SCTConfig, version,file_name, tcp, args, start_by_jcide); - - - diff --git a/graphics/asymptote/LspCpp/LibLsp/lsp/extention/sct/protocol.h b/graphics/asymptote/LspCpp/LibLsp/lsp/extention/sct/protocol.h deleted file mode 100644 index 1f227a6110..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/lsp/extention/sct/protocol.h +++ /dev/null @@ -1,222 +0,0 @@ -#pragma once -#include "LibLsp/JsonRpc/RequestInMessage.h" -#include "LibLsp/lsp/lsDocumentUri.h" -#include "LibLsp/lsp/lsAny.h" -#include "LibLsp/JsonRpc/NotificationInMessage.h" - -struct DownLoadCapFileParams -{ - lsDocumentUri uri; - MAKE_SWAP_METHOD(DownLoadCapFileParams, uri); -}; -MAKE_REFLECT_STRUCT(DownLoadCapFileParams, uri); - -struct NormalActionResult -{ - bool state = false; - boost::optional> data; - boost::optional info; - MAKE_SWAP_METHOD(NormalActionResult, state, data, info); -}; -MAKE_REFLECT_STRUCT(NormalActionResult, data, state, info) - -DEFINE_REQUEST_RESPONSE_TYPE(sct_DownLoadCapFile, DownLoadCapFileParams, NormalActionResult, "sct/download_cap"); - - - - -enum class SctProtocol :uint8_t -{ - T01 = 0, T0 = 1, T1 = 2, -}; -MAKE_REFLECT_TYPE_PROXY(SctProtocol); - -struct ConnectParams -{ - - SctProtocol protocol= SctProtocol::T01; - boost::optional reader; - boost::optional data; - MAKE_SWAP_METHOD(ConnectParams, reader, protocol,data); -}; -MAKE_REFLECT_STRUCT(ConnectParams, reader, protocol, data); -DEFINE_REQUEST_RESPONSE_TYPE(sct_Connect, ConnectParams, NormalActionResult, "sct/connect"); - - - -struct SetProtocolParams -{ - - SctProtocol protocol = SctProtocol::T01; - -}; -MAKE_REFLECT_STRUCT(SetProtocolParams, protocol); - -DEFINE_REQUEST_RESPONSE_TYPE(sct_SetProtocol, SetProtocolParams, NormalActionResult, "sct/set_protocol"); - -struct GPAuthParams -{ - boost::optional < std::string> scp; - boost::optional < std::string > key; - boost::optional < lsp::Any > option; - MAKE_SWAP_METHOD(GPAuthParams, key, scp, option); -}; -MAKE_REFLECT_STRUCT(GPAuthParams, key, scp, option); -DEFINE_REQUEST_RESPONSE_TYPE(sct_gp_auth, GPAuthParams, NormalActionResult ,"sct/gp_auth"); - - - -struct InstallAppletParams -{ - std::vector package_aid; - std::vector applet_aid; - boost::optional < std::vector> instance_aid; - boost::optional> authority; - boost::optional> parameters; - MAKE_SWAP_METHOD(InstallAppletParams, package_aid, applet_aid, instance_aid, authority, parameters); -}; -MAKE_REFLECT_STRUCT(InstallAppletParams, package_aid, applet_aid, instance_aid, authority, parameters); -DEFINE_REQUEST_RESPONSE_TYPE(sct_InstalllApplet, InstallAppletParams, NormalActionResult, "sct/install_applet"); - - -struct TransmitParams -{ - std::vector command; - MAKE_SWAP_METHOD(TransmitParams, command); -}; -MAKE_REFLECT_STRUCT(TransmitParams, command); - -DEFINE_REQUEST_RESPONSE_TYPE(sct_Transmit, TransmitParams, NormalActionResult,"sct/transmit"); - -DEFINE_NOTIFICATION_TYPE(sct_Disconnect,JsonNull, "sct/disconnect") - - -struct SetWindowPosParams{ - int X = 0; - int Y = 0; - int cx = 100; - int cy = 100; - - MAKE_SWAP_METHOD(SetWindowPosParams, X, Y, cx, cy); -}; -MAKE_REFLECT_STRUCT(SetWindowPosParams, X, Y, cx, cy); -DEFINE_NOTIFICATION_TYPE(sct_SetWindowsPos, SetWindowPosParams, "sct/set_windows_pos") - -struct SetWindowVisibleParams -{ - static const int HIDE = 0; - static const int MINSIZE = 1; - static const int MAXSIZE = 2; - static const int NORMAL = 3; - int state = NORMAL; - MAKE_SWAP_METHOD(SetWindowVisibleParams, state); -}; -MAKE_REFLECT_STRUCT(SetWindowVisibleParams, state); -DEFINE_NOTIFICATION_TYPE(sct_SetWindowsVisible, SetWindowVisibleParams, "sct/set_windows_visible") - - - -enum CardInfoType:uint32_t -{ - ATR_TYPE = 0, - ATS_TYPE = 1, -}; -MAKE_REFLECT_TYPE_PROXY(CardInfoType); - - -struct GetCardInfoParams -{ - CardInfoType type_; -}; -MAKE_REFLECT_STRUCT(GetCardInfoParams, type_); - -DEFINE_REQUEST_RESPONSE_TYPE(sct_GetCardInfo, GetCardInfoParams, NormalActionResult, "sct/get_card_info"); - - -struct JdwpInfo -{ - std::string host="127.0.0.1"; - uint32_t jdwp_port = 9075; - -}; - -MAKE_REFLECT_STRUCT(JdwpInfo, host, jdwp_port); - -struct LaunchResult -{ - bool state; - boost::optional info; - boost::optional error; - MAKE_SWAP_METHOD(LaunchResult, state, info, error); -}; -MAKE_REFLECT_STRUCT(LaunchResult, state, info, error); - - -struct JcvmOutputParams -{ - std::string data; - MAKE_SWAP_METHOD(JcvmOutputParams, data); -}; -MAKE_REFLECT_STRUCT(JcvmOutputParams, data); - -DEFINE_NOTIFICATION_TYPE(sct_NotifyJcvmOutput, JcvmOutputParams,"sct/notify_jcvm_output"); - - -struct LaunchParam -{ - enum - { - LAUNCH_FOR_DEBUG = 0, - LAUNCH_FOR_RUN = 1 - }; - boost::optional launch_for_what; - -}; -MAKE_REFLECT_STRUCT(LaunchParam, launch_for_what); - - -DEFINE_REQUEST_RESPONSE_TYPE(sct_Launch, LaunchParam, LaunchResult , "sct/launch"); - - -DEFINE_REQUEST_RESPONSE_TYPE(sct_CheckBeforeLaunch, JsonNull, NormalActionResult, "sct/check_before_launch"); - - - -DEFINE_NOTIFICATION_TYPE(sct_NotifyDisconnect, JsonNull,"sct/notify_disconnect"); - - -DEFINE_NOTIFICATION_TYPE(sct_TerminateLaunch, JsonNull, "sct/terminate_launch"); - - - - -struct sctInitializeParams { - // The process Id of the parent process that started - // the server. Is null if the process has not been started by another process. - // If the parent process is not alive then the server should exit (see exit - // notification) its process. - boost::optional processId; - - // User provided initialization options. - boost::optional initializationOptions; - boost::optional version; - -}; -MAKE_REFLECT_STRUCT(sctInitializeParams,processId,initializationOptions, version); - -struct sctServerCapabilities { - bool gp_auth = false; - bool gp_key = false; - boost::optional version; - MAKE_SWAP_METHOD(sctServerCapabilities, gp_auth, gp_key, version); -}; -MAKE_REFLECT_STRUCT(sctServerCapabilities, gp_auth, gp_key, version); - - -struct stcInitializeResult -{ - sctServerCapabilities capabilities; -}; -MAKE_REFLECT_STRUCT(stcInitializeResult, capabilities); - -DEFINE_REQUEST_RESPONSE_TYPE(sct_initialize, sctInitializeParams, stcInitializeResult, "sct/initialize"); diff --git a/graphics/asymptote/LspCpp/LibLsp/lsp/extention/sct/sct.cpp b/graphics/asymptote/LspCpp/LibLsp/lsp/extention/sct/sct.cpp deleted file mode 100644 index 25c21ecddc..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/lsp/extention/sct/sct.cpp +++ /dev/null @@ -1,743 +0,0 @@ - -#include -#include "sct.h" -#include "SCTConfig.h" -#include -#include -#include -#include -#include "LibLsp/lsp/general/exit.h" -#include "LibLsp/lsp/general/initialized.h" -#include "LibLsp/lsp/windows/MessageNotify.h" -#include "LibLsp/lsp/language/language.h" -#include "LibLsp/JsonRpc/Condition.h" -#include "LibLsp/lsp/workspace/execute_command.h" -#include "LibLsp/JsonRpc/json.h" - -namespace lsp { - class Log; -} - -using namespace std; -using lsp::Log; - - -// -//MethodType sct_DownLoadCapFile::request::kMethodInfo = "sct/download_cap"; -// -//MethodType sct_Transmit::request::kMethodInfo = "sct/transmit"; -// -//MethodType sct_Connect::request::kMethodInfo = "sct/connect"; -// -//MethodType sct_Disconnect::request::kMethodInfo = "sct/disconnect"; -// -//MethodType sct_InstalllApplet::request::kMethodInfo = "sct/install_applet"; -// -//MethodType sct_gp_auth::request::kMethodInfo = "sct/gp_auth"; -// -//MethodType sct_SetWindowsPos::request::kMethodInfo = "sct/set_windows_pos"; -// -//MethodType sct_SetWindowsVisible::request::kMethodInfo = "sct/set_windows_visible"; -// -// -//MethodType sct_NotifyJcvmOutput::request::kMethodInfo = "sct/notify_jcvm_output"; -// -//MethodType sct_Launch::request::kMethodInfo = "sct/launch"; -// -//MethodType sct_SetProtocol::request::kMethodInfo = "sct/set_protocol"; -// -//MethodType sct_CheckBeforeLaunch::request::kMethodInfo = "sct/check_before_launch"; -// -//MethodType sct_GetCardInfo::request::kMethodInfo = "sct/get_card_info"; -// -//MethodType sct_NotifyDisconnect::request::kMethodInfo = "sct/notify_disconnect"; -//MethodType sct_TerminateLaunch::request::kMethodInfo = "sct/terminate_launch"; -//MethodType sct_initialize::request::kMethodInfo = "sct/initialize"; - - - SCTConfig* SCTConfig::newInstance(const string& file_path, string& error) -{ - if(!boost::filesystem::exists(file_path)) - { - error = "file no exists."; - return nullptr; - } - using namespace rapidjson; - using namespace std; - std::unique_ptr sct = std::make_unique(); - try - { - std::wifstream ifs(file_path); - WIStreamWrapper isw(ifs); - - Document d; - d.ParseStream(isw); - if(!d.HasParseError()) - { - JsonReader reader{ &d }; - Reflect(reader, *sct.get()); - } - } - catch (std::exception& e) - { - string temp = "Reflect failed. exception info:"; - - temp += e.what(); - error = temp; - sct.get()->broken = true; - sct.get()->error = temp; - } - return sct.release(); -} - - -SmartCardTool::SmartCardTool(): m_jdwpPort(0), m_curProtocol(SctProtocol::T01), log(nullptr) -{ - m_ipAddr = "127.0.0.1"; -} - -void AddNotifyJsonRpcMethod(sct::ProtocolJsonHandler& handler) -{ - handler.method2notification[Notify_Exit::notify::kMethodInfo] = [](Reader& visitor) - { - return Notify_Exit::notify::ReflectReader(visitor); - }; - handler.method2notification[Notify_InitializedNotification::notify::kMethodInfo] = [](Reader& visitor) - { - return Notify_InitializedNotification::notify::ReflectReader(visitor); - }; - - - handler.method2notification[Notify_LogMessage::notify::kMethodInfo] = [](Reader& visitor) - { - return Notify_LogMessage::notify::ReflectReader(visitor); - }; - handler.method2notification[Notify_ShowMessage::notify::kMethodInfo] = [](Reader& visitor) - { - return Notify_ShowMessage::notify::ReflectReader(visitor); - }; - - handler.method2notification[Notify_sendNotification::notify::kMethodInfo] = [](Reader& visitor) - { - return Notify_sendNotification::notify::ReflectReader(visitor); - }; - - handler.method2notification[lang_actionableNotification::notify::kMethodInfo] = [](Reader& visitor) - { - return lang_actionableNotification::notify::ReflectReader(visitor); - }; - handler.method2notification[lang_progressReport::notify::kMethodInfo] = [](Reader& visitor) - { - return lang_progressReport::notify::ReflectReader(visitor); - }; - - - handler.method2notification[sct_NotifyJcvmOutput::notify::kMethodInfo] = [](Reader& visitor) - { - return sct_NotifyJcvmOutput::notify::ReflectReader(visitor); - }; - handler.method2notification[sct_NotifyDisconnect::notify::kMethodInfo] = [](Reader& visitor) - { - return sct_NotifyDisconnect::notify::ReflectReader(visitor); - }; - -} - -sct::ProtocolJsonHandler::ProtocolJsonHandler() -{ - AddNotifyJsonRpcMethod(*this); - - method2response[sct_DownLoadCapFile::request::kMethodInfo ] = [](Reader& visitor) - { - if (visitor.HasMember("error")) - return Rsp_Error::ReflectReader(visitor); - - return sct_DownLoadCapFile::response::ReflectReader(visitor); - }; - method2response[sct_Connect::request::kMethodInfo] = [](Reader& visitor) - { - if (visitor.HasMember("error")) - return Rsp_Error::ReflectReader(visitor); - - return sct_Connect::response::ReflectReader(visitor); - }; - method2response[sct_SetProtocol::request::kMethodInfo] = [](Reader& visitor) - { - if (visitor.HasMember("error")) - return Rsp_Error::ReflectReader(visitor); - - return sct_SetProtocol::response::ReflectReader(visitor); - }; - method2response[sct_gp_auth::request::kMethodInfo] = [](Reader& visitor) - { - if (visitor.HasMember("error")) - return Rsp_Error::ReflectReader(visitor); - - return sct_gp_auth::response::ReflectReader(visitor); - }; - method2response[sct_InstalllApplet::request::kMethodInfo] = [](Reader& visitor) - { - if (visitor.HasMember("error")) - return Rsp_Error::ReflectReader(visitor); - - return sct_InstalllApplet::response::ReflectReader(visitor); - }; - method2response[sct_Transmit::request::kMethodInfo] = [](Reader& visitor) - { - if (visitor.HasMember("error")) - return Rsp_Error::ReflectReader(visitor); - - return sct_Transmit::response::ReflectReader(visitor); - }; - - method2response[sct_GetCardInfo::request::kMethodInfo] = [](Reader& visitor) - { - if (visitor.HasMember("error")) - return Rsp_Error::ReflectReader(visitor); - - return sct_GetCardInfo::response::ReflectReader(visitor); - }; - - method2response[sct_Launch::request::kMethodInfo] = [](Reader& visitor) - { - if (visitor.HasMember("error")) - return Rsp_Error::ReflectReader(visitor); - - return sct_Launch::response::ReflectReader(visitor); - }; - method2response[sct_CheckBeforeLaunch::request::kMethodInfo] = [](Reader& visitor) - { - if (visitor.HasMember("error")) - return Rsp_Error::ReflectReader(visitor); - - return sct_CheckBeforeLaunch::response::ReflectReader(visitor); - }; - - - method2response[sct_initialize::request::kMethodInfo] = [](Reader& visitor) - { - if (visitor.HasMember("error")) - return Rsp_Error::ReflectReader(visitor); - - return sct_initialize::response::ReflectReader(visitor); - }; - -} -bool SmartCardTool::check_sct_alive() -{ - if (sct) - { - return true; - } - if(log) - { - wstring strPrompt = L"sct is not alvie."; - log->log(Log::Level::SEVERE, strPrompt); - } - return false; -} - -bool SmartCardTool::initialize(int processId, int version) -{ - - if(!check_sct_alive()) - { - return false; - } - sct_initialize::request request; - request.params.processId = processId; - request.params.version = version; - - auto msg = sct->waitResponse(request, 100000); - - if (!msg) - { - return false; - } - - if (msg->is_error) - { - auto error = &msg->error; - log->error( error->error.ToString()); - return false; - } - auto result = &msg->response; - _lsServerCapabilities.swap(result->result.capabilities); - return true; -} - - - -SmartCardTool::~SmartCardTool() -{ - - -} - -bool SmartCardTool::GetCardInfo(CardInfoType type_, std::vector& out) -{ - if (!check_sct_alive()) - { - return false; - } - sct_GetCardInfo::request request; - request.params.type_ = type_; - - auto data = sct->waitResponse(request, 40000); - - if (!data) - { - if (log) - { - wstring strPrompt = L"GetCardInfo request timeout."; - log->log(Log::Level::SEVERE, strPrompt); - } - return false; - } - - if (data->is_error) - { - if (log) - { - string strPrompt = "GetCardInfo request error." + data->error.ToJson(); - log->log(Log::Level::SEVERE, strPrompt); - } - return false; - } - auto rsp = &data->response; - if (rsp->result.state) - { - out.swap(rsp->result.data.value()); - return true; - } - - if (log) - { - string strPrompt = "GetCardInfo failed. Reason:"; - strPrompt += rsp->result.info.value(); - log->log(Log::Level::SEVERE, strPrompt); - } - return false; -} - - - -bool SmartCardTool::Launch(bool for_debug) -{ - if (!check_sct_alive()) - { - return false; - } - sct_Launch::request request; - if(for_debug) - { - request.params.launch_for_what = LaunchParam::LAUNCH_FOR_DEBUG; - } - else - { - request.params.launch_for_what = LaunchParam::LAUNCH_FOR_RUN; - } - auto data = sct->waitResponse(request, 100000); - - if (!data) - { - if (log) - { - wstring strPrompt = L"Launch request timeout."; - log->log(Log::Level::SEVERE, strPrompt); - } - return false; - } - - if (data->is_error) - { - if (log) - { - string strPrompt = "Launch request error." + data->error.ToJson(); - - log->log(Log::Level::SEVERE, strPrompt); - } - return false; - } - auto rsp = &data->response; - if (rsp->result.state) - { - if (log) - { - log->log(Log::Level::INFO, L"Launch successfully"); - } - if(rsp->result.info) - { - m_ipAddr.swap(rsp->result.info.value().host); - m_jdwpPort = rsp->result.info.value().jdwp_port; - - } - } - else - { - if (log) - { - string strPrompt = "Launch failed. Reason:"; - strPrompt += rsp->result.error.value(); - log->log(Log::Level::SEVERE, strPrompt); - } - return false; - } - return true; -} - -void SmartCardTool::TerminateLaunch() -{ - if (!check_sct_alive()) - { - return ; - } - sct_TerminateLaunch::notify notify; - sct->send(notify); - connect_state = false; - return ; -} - -void SmartCardTool::show_message(lsMessageType type_, - const std::string& msg) -{ - if (!check_sct_alive()) - { - return ; - } - Notify_ShowMessage::notify notify; - notify.params.type = type_; - notify.params.message = msg; - sct->send(notify); -} - -bool SmartCardTool::CheckBeforeLaunch() -{ - if (!check_sct_alive()) - { - return false; - } - sct_CheckBeforeLaunch::request request; - auto data = sct->waitResponse(request, 50000); - - if (!data) - { - wstring strPrompt = L"CheckBeforeLaunch request timeout."; - if(log) - { - log->log(Log::Level::SEVERE, strPrompt); - } - - return false; - } - - if (data->is_error) - { - string strPrompt = "CheckBeforeLaunch request error." + data->error.ToJson(); - log->log(Log::Level::SEVERE, strPrompt); - return false; - } - auto rsp = &data->response; - if (rsp->result.state) - { - return true; - } - - - string strPrompt = "Check Before Launch JCVM failed. Reason:"; - strPrompt += rsp->result.info.value(); - log->log(Log::Level::SEVERE, strPrompt); - return false; - -} - - -bool SmartCardTool::Connect(SctProtocol protocol) -{ - if (!check_sct_alive()) - { - return false; - } - sct_Connect::request request; - - request.params.protocol = protocol; - - auto data = sct->waitResponse(request, 40000); - - if (!data) - { - wstring strPrompt = L"Connect request timeout."; - log->log(Log::Level::SEVERE, strPrompt); - return false; - } - - if (data->is_error) - { - string strPrompt = "Connect request error." + data->error.ToJson(); - log->log(Log::Level::SEVERE, strPrompt); - return false; - } - auto rsp =&data->response; - if (rsp->result.state) - { - connect_state = true; - return true; - } - else - { - string strPrompt = "Connect failed. Reason:"; - strPrompt += rsp->result.info.value(); - log->log(Log::Level::SEVERE, strPrompt); - return false; - } - -} - - - - -void SmartCardTool::DisConnect() -{ - if (!check_sct_alive()) - { - return ; - } - sct_Disconnect::notify notify; - sct->send(notify); - connect_state = false; - return ; -} - -bool SmartCardTool::DownLoadCapFile(const string& strCapFileName) -{ - if (!check_sct_alive()) - { - return false; - } - sct_DownLoadCapFile::request request; - request.params.uri.raw_uri_ = make_file_scheme_uri(strCapFileName); - - auto data = sct->waitResponse(request, 40000); - - if(!data) - { - wstring strPrompt = L"DownLoadCapFile request timeout."; - log->log(Log::Level::SEVERE,strPrompt); - return false; - } - - if(data->is_error) - { - string strPrompt = "DownLoadCapFile request error." + data->error.ToJson(); - log->log(Log::Level::SEVERE, strPrompt); - return false; - } - auto rsp = &data->response; - if(rsp->result.state) - { - string strPrompt = "DownLoadCapFile successfully"; - if(rsp->result.info) - { - strPrompt = rsp->result.info.value(); - } - log->log(Log::Level::INFO, strPrompt); - return true; - } - else - { - string strPrompt = "DownLoadCapFile failed. Reason:"; - strPrompt += rsp->result.info.value(); - log->log(Log::Level::SEVERE, strPrompt); - return false; - } - -} - -void SmartCardTool::SetWindowsVisible(SetWindowVisibleParams& params) -{ - if (!check_sct_alive()) - { - return ; - } - sct_SetWindowsVisible::notify notify; - notify.params.swap(params); - sct->send(notify); - -} - -void SmartCardTool::SetWindowPos(SetWindowPosParams& params) -{ - sct_SetWindowsPos::notify notify; - notify.params.swap(params); - sct->send(notify); -} - -bool SmartCardTool::SetProtocol(SctProtocol protocol) -{ - if (!check_sct_alive()) - { - return false; - } - sct_SetProtocol::request request; - - request.params.protocol = protocol; - - auto data = sct->waitResponse(request, 40000); - - if (!data) - { - wstring strPrompt = L"SetProtocol request timeout."; - log->log(Log::Level::SEVERE, strPrompt); - return false; - } - - if (data->is_error) - { - string strPrompt = "SetProtocol request error." + data->error.ToJson(); - log->log(Log::Level::SEVERE, strPrompt); - return false; - } - auto rsp = &data->response; - if (rsp->result.state) - { - m_curProtocol = protocol; - return true; - } - else - { - string strPrompt = "SetProtocol failed. Reason:"; - strPrompt += rsp->result.info.value(); - log->log(Log::Level::SEVERE, strPrompt); - return false; - } - -} - -bool SmartCardTool::GpAuth() -{ - - if (!check_sct_alive()) - { - return false; - } - sct_gp_auth::request request; - - auto data = sct->waitResponse(request, 100000); - - if (!data) - { - wstring strPrompt = L"gp_auth request timeout."; - log->log(Log::Level::SEVERE, strPrompt); - return false; - } - - if (data->is_error) - { - string strPrompt = "gp_auth request error." + data->error.ToJson(); - log->log(Log::Level::SEVERE, strPrompt); - return false; - } - auto rsp = &data->response; - if (rsp->result.state) - { - string strPrompt = "gp_auth request successfully."; - if (rsp->result.info) - strPrompt = rsp->result.info.value(); - - log->log(Log::Level::INFO, strPrompt); - return true; - } - else - { - string strPrompt = "gp_auth failed. Reason:"; - strPrompt += rsp->result.info.value(); - log->log(Log::Level::SEVERE, strPrompt); - return false; - } - -} - -bool SmartCardTool::InstallApplet(InstallAppletParams& params) -{ - if (!check_sct_alive()) - { - return false; - } - sct_InstalllApplet::request request; - request.params.swap(params); - auto data = sct->waitResponse(request); - - if (!data) - { - wstring strPrompt = L"Install Applet request timeout."; - log->log(Log::Level::SEVERE, strPrompt); - return false; - } - - if (data->is_error) - { - string strPrompt = "Install Applet request error." + data->error.ToJson(); - log->log(Log::Level::SEVERE, strPrompt); - return false; - } - auto rsp = &data->response; - if (rsp->result.state) - { - string strPrompt = "Install Applet successfully."; - if (rsp->result.info) - strPrompt = rsp->result.info.value(); - log->log(Log::Level::INFO, strPrompt); - return true; - } - else - { - string strPrompt = "Install Applet failed. Reason:"; - strPrompt += rsp->result.info.value(); - log->log(Log::Level::SEVERE, strPrompt); - return false; - } -} - - -bool SmartCardTool::Transmit(const std::vector& cmdApdu, std::vector& rspApdu) -{ - - if (!check_sct_alive()) - { - return false; - } - sct_Transmit::request request; - request.params.command = cmdApdu; - - auto data = sct->waitResponse(request); - - if (!data) - { - wstring strPrompt = L"Transmit request timeout."; - log->log(Log::Level::SEVERE, strPrompt); - return false; - } - - if (data->is_error) - { - string strPrompt = "Transmit request error." + data->error.ToJson(); - log->log(Log::Level::SEVERE, strPrompt); - return false; - } - auto rsp = &data->response; - if (rsp->result.state) - { - rspApdu.swap(rsp->result.data.value()); - //log->log(Log::Level::INFO, L"Transmit successfully"); - return true; - } - else - { - string strPrompt = "Transmit failed. Reason:"; - strPrompt += rsp->result.info.value(); - log->log(Log::Level::SEVERE, strPrompt); - return false; - } - - -} diff --git a/graphics/asymptote/LspCpp/LibLsp/lsp/extention/sct/sct.h b/graphics/asymptote/LspCpp/LibLsp/lsp/extention/sct/sct.h deleted file mode 100644 index 59ffe02fd7..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/lsp/extention/sct/sct.h +++ /dev/null @@ -1,103 +0,0 @@ -#pragma once - -#include -#include -#include -#include "protocol.h" -enum class lsMessageType; -enum CardInfoType : unsigned; -enum class SctProtocol : unsigned char; -struct InstallAppletParams; - - -using namespace std; - -class ModeState; -namespace sct -{ - class ProtocolJsonHandler : public MessageJsonHandler - { - public: - ProtocolJsonHandler(); - }; - -} -class SmartCardTool -{ - //IP �����ֽ��� - std::string m_ipAddr; - volatile uint16_t m_jdwpPort; - - - SctProtocol m_curProtocol; -public: - enum JCIDE_VERSION - { - V5_KIND = 5 - }; - SmartCardTool(); - ~SmartCardTool(); - - - bool GetCardInfo(CardInfoType type_,std::vector&); - bool Launch(bool for_debug = false); - - void TerminateLaunch(); - void show_message(lsMessageType type_,const std::string& msg); - bool CheckBeforeLaunch(); - - string GetIpAddr(){return m_ipAddr;} - - uint16_t GetJdwpPort(){return m_jdwpPort;} - - - - void SetWindowsVisible(SetWindowVisibleParams&); - void SetWindowPos(SetWindowPosParams&); - - SctProtocol GetProtocol(){return m_curProtocol;} - - - bool SetProtocol(SctProtocol protocol = SctProtocol::T01); - - bool GpAuth(); - - - bool InstallApplet(InstallAppletParams&);; - - bool DownLoadCapFile(const string& strCapFileName); - - - - bool IsConnected() const { - - return connect_state; - } - - string GetErrorString() { return {}; }; - - bool Connect(SctProtocol protocol = SctProtocol::T01); - - void DisConnect(); - - - - - bool Transmit(const std::vector& cmdApdu, std::vector& rspApdu) ; - - - lsp::Log* log; - volatile bool connect_state = false; - - std::shared_ptr sct; - - - bool initialize(int processId,int version); - const sctServerCapabilities& getServerCapabilities()const - { - return _lsServerCapabilities; - } -private: - sctServerCapabilities _lsServerCapabilities; - bool check_sct_alive(); -}; diff --git a/graphics/asymptote/LspCpp/LibLsp/lsp/extention/sonarlint/protocol.h b/graphics/asymptote/LspCpp/LibLsp/lsp/extention/sonarlint/protocol.h deleted file mode 100644 index d81c3eaa63..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/lsp/extention/sonarlint/protocol.h +++ /dev/null @@ -1,176 +0,0 @@ -#pragma once -#include -#include -#include "LibLsp/JsonRpc/RequestInMessage.h" -#include "LibLsp/lsp/lsDocumentUri.h" -#include "LibLsp/lsp/lsAny.h" -#include "LibLsp/JsonRpc/NotificationInMessage.h" -#include "LibLsp/lsp/general/InitializeParams.h" - -struct LintRule -{ - std::string key; - std::string name; - - - std::string Display() const - { - return name + " (" + key + ")"; - } - bool activeByDefault = true; - boost::optional severity; - boost::optional type; - int icon_index = -1; - MAKE_SWAP_METHOD(LintRule, key, name, activeByDefault, severity, type); - -}; -MAKE_REFLECT_STRUCT(LintRule, key, name, activeByDefault, severity, type); - - -struct RuleParameter { - std::string name; - boost::optional description; - boost::optional defaultValue; - -}; -MAKE_REFLECT_STRUCT(RuleParameter, name, description, defaultValue); - -struct ShowRuleDescriptionParams { - - boost::optional key; - - boost::optional name; - - boost::optional htmlDescription; - - boost::optional type; - - boost::optional severity; - - boost::optional< std::vector > parameters; - MAKE_SWAP_METHOD(ShowRuleDescriptionParams, key, name, htmlDescription, type, severity, parameters) - - -}; -MAKE_REFLECT_STRUCT(ShowRuleDescriptionParams, key, name, htmlDescription, type, severity, parameters); - - -struct GetJavaConfigResponse { - std::string projectRoot; - std::string sourceLevel; - std::vector classpath; - bool isTest; - std::string vmLocation; - MAKE_SWAP_METHOD(GetJavaConfigResponse, projectRoot, sourceLevel, classpath, isTest, vmLocation); -}; -MAKE_REFLECT_STRUCT(GetJavaConfigResponse, projectRoot, sourceLevel, classpath, isTest, vmLocation); - -struct SetTraceNotificationParams { - lsInitializeParams::lsTrace value; -}; -MAKE_REFLECT_STRUCT(SetTraceNotificationParams, value); - - -struct ServerConnectionSettings { - - std::string SONARCLOUD_URL = "https://sonarcloud.io"; - std::vectorSONARCLOUD_ALIAS = { "https://sonarqube.com", - "https://www.sonarqube.com", - "https://www.sonarcloud.io", - "https://sonarcloud.io" }; - - std::string connectionId; - std::string serverUrl; - std::string token; - boost::optional organizationKey; - MAKE_SWAP_METHOD(ServerConnectionSettings, connectionId, serverUrl, token, organizationKey) - -}; -MAKE_REFLECT_STRUCT(ServerConnectionSettings, connectionId, serverUrl, token, organizationKey) - -struct RuleSetting -{ - bool IsOn(); - std::string level = "on"; - RuleSetting(bool activate); - RuleSetting() = default; - void toggle(); - void on() - { - level = "on"; - } - void off() - { - level = "off"; - } - void turn(bool activate) - { - if (activate) - { - on(); - } - else - { - off(); - } - } - boost::optional< std::map > parameters; -}; -MAKE_REFLECT_STRUCT(RuleSetting, level, parameters) - -struct ConsoleParams -{ - boost::optional < bool >showAnalyzerLogs; - boost::optional < bool >showVerboseLogs; - MAKE_SWAP_METHOD(ConsoleParams, showAnalyzerLogs, showVerboseLogs) -}; -MAKE_REFLECT_STRUCT(ConsoleParams, showAnalyzerLogs, showVerboseLogs) - -struct SonarLintWorkspaceSettings -{ - boost::optional < bool > disableTelemetry; - boost::optional < std::map >connectedMode; - boost::optional> rules; - boost::optional output; - - boost::optional pathToNodeExecutable; - - boost::optional< std::map > getConfigurationParameters(const std::string& ruleKey); - - -}; - -MAKE_REFLECT_STRUCT(SonarLintWorkspaceSettings, disableTelemetry, connectedMode, - rules, output, pathToNodeExecutable) - - - - DEFINE_REQUEST_RESPONSE_TYPE(slls_listAllRules, JsonNull, lsp::Any, "sonarlint/listAllRules"); - - - -DEFINE_NOTIFICATION_TYPE(Notify_didClasspathUpdate, lsDocumentUri, "sonarlint/didClasspathUpdate") - - -DEFINE_NOTIFICATION_TYPE(Notify_didJavaServerModeChange, std::string, "sonarlint/didJavaServerModeChange") - - - -DEFINE_REQUEST_RESPONSE_TYPE(slls_showSonarLintOutput, JsonNull, JsonNull, "sonarlint/showSonarLintOutput"); - - - -DEFINE_REQUEST_RESPONSE_TYPE(slls_openJavaHomeSettings, JsonNull, JsonNull, "sonarlint/openJavaHomeSettings"); - - - - -DEFINE_REQUEST_RESPONSE_TYPE(slls_openPathToNodeSettings, JsonNull, JsonNull, "sonarlint/openPathToNodeSettings"); - - -DEFINE_REQUEST_RESPONSE_TYPE(slls_showRuleDescription, ShowRuleDescriptionParams, JsonNull, "sonarlint/showRuleDescription"); - -DEFINE_REQUEST_RESPONSE_TYPE(slls_getJavaConfig, lsDocumentUri, GetJavaConfigResponse, "sonarlint/getJavaConfig"); - - -DEFINE_NOTIFICATION_TYPE(slls_setTraceNotification, SetTraceNotificationParams, "$/setTraceNotification") \ No newline at end of file diff --git a/graphics/asymptote/LspCpp/LibLsp/lsp/general/InitializeParams.h b/graphics/asymptote/LspCpp/LibLsp/lsp/general/InitializeParams.h deleted file mode 100644 index f10080ea21..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/lsp/general/InitializeParams.h +++ /dev/null @@ -1,128 +0,0 @@ -#pragma once - -#include "LibLsp/lsp/lsDocumentUri.h" -#include "LibLsp/lsp/lsAny.h" -#include "lsClientCapabilities.h" -#include "LibLsp/lsp/workspace/workspaceFolders.h" - -struct ClientInfo { - std::string name; - boost::optional version; - - MAKE_SWAP_METHOD(ClientInfo,name,version); -}; -MAKE_REFLECT_STRUCT(ClientInfo,name,version); - -struct lsInitializeParams { - // The process Id of the parent process that started - // the server. Is null if the process has not been started by another process. - // If the parent process is not alive then the server should exit (see exit - // notification) its process. - boost::optional processId; - - /** - * Information about the client - * - * @since 3.15.0 - */ - boost::optional clientInfo; - /** - * The locale the client is currently showing the user interface - * in. This must not necessarily be the locale of the operating - * system. - * - * Uses IETF language tags as the value's syntax - * (See https://en.wikipedia.org/wiki/IETF_language_tag) - * - * @since 3.16.0 - */ - boost::optional locale; - - // The rootPath of the workspace. Is null - // if no folder is open. - // - // @deprecated in favour of rootUri. - boost::optional rootPath; - - // The rootUri of the workspace. Is null if no - // folder is open. If both `rootPath` and `rootUri` are set - // `rootUri` wins. - boost::optional rootUri; - - // User provided initialization options. - boost::optional initializationOptions; - - // The capabilities provided by the client (editor or tool) - lsClientCapabilities capabilities; - - - /** - * An boost::optional extension to the protocol. - * To tell the server what client (editor) is talking to it. - */ - // @Deprecated - boost::optional< std::string >clientName; - - - - enum class lsTrace { - // NOTE: serialized as a string, one of 'off' | 'messages' | 'verbose'; - Off, // off - Messages, // messages - Verbose // verbose - - }; - - // The initial trace setting. If omitted trace is disabled ('off'). - lsTrace trace = lsTrace::Off; - - - /** - * The workspace folders configured in the client when the server starts. - * This property is only available if the client supports workspace folders. - * It can be `null` if the client supports workspace folders but none are - * configured. - * - * Since 3.6.0 - */ - boost::optional< std::vector > workspaceFolders; - - MAKE_SWAP_METHOD(lsInitializeParams, - processId, - rootPath, - rootUri, - initializationOptions, - capabilities, clientName, clientInfo, - trace, workspaceFolders, locale) -}; - -void Reflect(Reader& reader, lsInitializeParams::lsTrace& value); - - -void Reflect(Writer& writer, lsInitializeParams::lsTrace& value); - - -MAKE_REFLECT_STRUCT(lsInitializeParams, - processId, - rootPath, - rootUri, - initializationOptions, - capabilities, clientName, clientInfo, - trace, workspaceFolders, locale) - -struct lsInitializeError { - // Indicates whether the client should retry to send the - // initilize request after showing the message provided - // in the ResponseError. - bool retry; - void swap(lsInitializeError& arg) noexcept - { - auto tem = retry; - retry = arg.retry; - arg.retry = tem; - } -}; -MAKE_REFLECT_STRUCT(lsInitializeError, retry); - - - diff --git a/graphics/asymptote/LspCpp/LibLsp/lsp/general/exit.h b/graphics/asymptote/LspCpp/LibLsp/lsp/general/exit.h deleted file mode 100644 index 02fe216017..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/lsp/general/exit.h +++ /dev/null @@ -1,7 +0,0 @@ -#pragma once - -#include "LibLsp/JsonRpc/NotificationInMessage.h" -/** - * A notification to ask the server to exit its process. - */ -DEFINE_NOTIFICATION_TYPE(Notify_Exit, boost::optional, "exit"); diff --git a/graphics/asymptote/LspCpp/LibLsp/lsp/general/initialize.cpp b/graphics/asymptote/LspCpp/LibLsp/lsp/general/initialize.cpp deleted file mode 100644 index 4886be9b46..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/lsp/general/initialize.cpp +++ /dev/null @@ -1,45 +0,0 @@ -#include "initialize.h" -#include "LibLsp/JsonRpc/json.h" - -void Reflect(Reader& reader, lsInitializeParams::lsTrace& value) -{ - if (!reader.IsString()) - { - value = lsInitializeParams::lsTrace::Off; - return; - } - std::string v = reader.GetString(); - if (v == "off") - value = lsInitializeParams::lsTrace::Off; - else if (v == "messages") - value = lsInitializeParams::lsTrace::Messages; - else if (v == "verbose") - value = lsInitializeParams::lsTrace::Verbose; -} - -void Reflect(Writer& writer, lsInitializeParams::lsTrace& value) -{ - switch (value) - { - case lsInitializeParams::lsTrace::Off: - writer.String("off"); - break; - case lsInitializeParams::lsTrace::Messages: - writer.String("messages"); - break; - case lsInitializeParams::lsTrace::Verbose: - writer.String("verbose"); - break; - } -} - void Reflect(Reader& visitor, std::pair, boost::optional >& value) -{ - if(((JsonReader&)visitor).m_->IsObject()) - { - Reflect(visitor, value.second); - } - else - { - Reflect(visitor, value.first); - } -} \ No newline at end of file diff --git a/graphics/asymptote/LspCpp/LibLsp/lsp/general/initialize.h b/graphics/asymptote/LspCpp/LibLsp/lsp/general/initialize.h deleted file mode 100644 index eb8810939a..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/lsp/general/initialize.h +++ /dev/null @@ -1,39 +0,0 @@ -#pragma once -#include "LibLsp/JsonRpc/message.h" -#include "InitializeParams.h" -#include "lsServerCapabilities.h" -#include "LibLsp/JsonRpc/lsResponseMessage.h" -#include "LibLsp/JsonRpc/RequestInMessage.h" - - - - - - -/** - * The capabilities the language server provides. - */ - struct InitializeResult { - lsServerCapabilities capabilities; - MAKE_SWAP_METHOD(InitializeResult, capabilities); - }; - -MAKE_REFLECT_STRUCT(InitializeResult, capabilities); - - -/** - * The initialize request is sent as the first request from the client to - * the server. - * - * If the server receives request or notification before the initialize request it should act as follows: - * - for a request the respond should be errored with code: -32001. The message can be picked by the server. - * - notifications should be dropped, except for the exit notification. This will allow the exit a server without an initialize request. - * - * Until the server has responded to the initialize request with an InitializeResult - * the client must not sent any additional requests or notifications to the server. - * - * During the initialize request the server is allowed to sent the notifications window/showMessage, - * window/logMessage and telemetry/event as well as the window/showMessageRequest request to the client. - */ - -DEFINE_REQUEST_RESPONSE_TYPE(td_initialize, lsInitializeParams, InitializeResult, "initialize"); diff --git a/graphics/asymptote/LspCpp/LibLsp/lsp/general/initialized.h b/graphics/asymptote/LspCpp/LibLsp/lsp/general/initialized.h deleted file mode 100644 index bb6d12511c..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/lsp/general/initialized.h +++ /dev/null @@ -1,13 +0,0 @@ -#pragma once - - -#include "LibLsp/JsonRpc/NotificationInMessage.h" -/** - * The initialized notification is sent from the client to the server after - * the client received the result of the initialize request but before the - * client is sending any other request or notification to the server. The - * server can use the initialized notification for example to dynamically - * register capabilities. - */ -DEFINE_NOTIFICATION_TYPE(Notify_InitializedNotification, JsonNull, "initialized"); - diff --git a/graphics/asymptote/LspCpp/LibLsp/lsp/general/lsClientCapabilities.h b/graphics/asymptote/LspCpp/LibLsp/lsp/general/lsClientCapabilities.h deleted file mode 100644 index fcf6634e13..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/lsp/general/lsClientCapabilities.h +++ /dev/null @@ -1,48 +0,0 @@ -#pragma once - -#include "LibLsp/lsp/lsAny.h" -#include "lsWorkspaceClientCapabilites.h" -#include "lsTextDocumentClientCapabilities.h" - -/** - * Client capabilities specific to the used markdown parser. - * - * @since 3.16.0 - */ -struct MarkdownClientCapabilities { - /** - * The name of the parser. - */ - std::string parser; - - /** - * The version of the parser. - */ - boost::optional version; - MAKE_SWAP_METHOD(MarkdownClientCapabilities, parser, version) - -}; -MAKE_REFLECT_STRUCT(MarkdownClientCapabilities, parser, version) - -struct lsClientCapabilities { - // Workspace specific client capabilities. - boost::optional workspace; - - // Text document specific client capabilities. - boost::optional textDocument; - - /** - * Window specific client capabilities. - */ - boost::optional window; - /** - * Experimental client capabilities. - */ - boost::optional experimental; - - MAKE_SWAP_METHOD(lsClientCapabilities, workspace, textDocument, window, experimental) -}; -MAKE_REFLECT_STRUCT(lsClientCapabilities, workspace, textDocument, window, experimental) - - - diff --git a/graphics/asymptote/LspCpp/LibLsp/lsp/general/lsServerCapabilities.h b/graphics/asymptote/LspCpp/LibLsp/lsp/general/lsServerCapabilities.h deleted file mode 100644 index 66af2ced6b..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/lsp/general/lsServerCapabilities.h +++ /dev/null @@ -1,589 +0,0 @@ -#pragma once -#include "LibLsp/lsp/method_type.h" - - -#include -#include "LibLsp/JsonRpc/message.h" -#include "LibLsp/lsp/lsDocumentUri.h" -#include "LibLsp/lsp/lsAny.h" -#include "InitializeParams.h" -#include "LibLsp/lsp/textDocument/SemanticTokens.h" - - -extern void Reflect(Reader&, std::pair, boost::optional >&); - -// - // Code Action options. - // -struct CodeActionOptions : WorkDoneProgressOptions { - // - // CodeActionKinds that this server may return. - // - // The list of kinds may be generic, such as `CodeActionKind.Refactor`, or the server - // may list out every specific kind they provide. - // - typedef std::string CodeActionKind; - std::vector codeActionKinds; - - MAKE_SWAP_METHOD(CodeActionOptions, workDoneProgress, codeActionKinds); -}; -MAKE_REFLECT_STRUCT(CodeActionOptions, workDoneProgress, codeActionKinds) -struct CodeLensOptions : WorkDoneProgressOptions { - // - // Code lens has a resolve provider as well. - // - boost::optional resolveProvider ; - MAKE_SWAP_METHOD(CodeLensOptions, workDoneProgress, resolveProvider); -}; -MAKE_REFLECT_STRUCT(CodeLensOptions, workDoneProgress, resolveProvider) - - -// Format document on type options -struct lsDocumentOnTypeFormattingOptions :WorkDoneProgressOptions { - // A character on which formatting should be triggered, like `}`. - std::string firstTriggerCharacter; - - // More trigger characters. - std::vector moreTriggerCharacter; - MAKE_SWAP_METHOD(lsDocumentOnTypeFormattingOptions, workDoneProgress, - firstTriggerCharacter, - moreTriggerCharacter); -}; -MAKE_REFLECT_STRUCT(lsDocumentOnTypeFormattingOptions, workDoneProgress, - firstTriggerCharacter, - moreTriggerCharacter); -struct RenameOptions : WorkDoneProgressOptions { - // - // Renames should be checked and tested before being executed. - // - boost::optional prepareProvider; - MAKE_SWAP_METHOD(RenameOptions, workDoneProgress, prepareProvider); -}; -MAKE_REFLECT_STRUCT(RenameOptions,workDoneProgress,prepareProvider) - -struct DocumentFilter{ - // - // A language id, like `typescript`. - // - boost::optional language; - // - // A Uri [scheme](#Uri.scheme), like `file` or `untitled`. - // - boost::optionalscheme; - // - // A glob pattern, like `*.{ts,js}`. - // - // Glob patterns can have the following syntax: - // - `*` to match one or more characters in a path segment - // - `?` to match on one character in a path segment - // - `**` to match any number of path segments, including none - // - `{}` to group sub patterns into an OR expression. (e.g. `**/*.{ts,js} - // matches all TypeScript and JavaScript files) - // - `[]` to declare a range of characters to match in a path segment - // (e.g., `example.[0-9]` to match on `example.0`, `example.1`,...) - // - `[!...]` to negate a range of characters to match in a path segment - // (e.g., `example.[!0-9]` to match on `example.a`, `example.b`, but - // not `example.0`) - // - boost::optionalpattern; - MAKE_SWAP_METHOD(DocumentFilter, language, scheme, pattern) -}; -MAKE_REFLECT_STRUCT(DocumentFilter, language, scheme, pattern) - -//A document selector is the combination of one or more document filters. -using DocumentSelector = std::vector; - -// Document link options -struct lsDocumentLinkOptions :WorkDoneProgressOptions { - // Document links have a resolve provider as well. - boost::optional resolveProvider; - MAKE_SWAP_METHOD(lsDocumentLinkOptions, workDoneProgress, resolveProvider); -}; -MAKE_REFLECT_STRUCT(lsDocumentLinkOptions, workDoneProgress,resolveProvider); - -// Execute command options. -struct lsExecuteCommandOptions : WorkDoneProgressOptions { - // The commands to be executed on the server - std::vector commands; - MAKE_SWAP_METHOD(lsExecuteCommandOptions, workDoneProgress, commands); -}; -MAKE_REFLECT_STRUCT(lsExecuteCommandOptions, workDoneProgress, commands); - - -struct TextDocumentRegistrationOptions -{ -// - // A document selector to identify the scope of the registration. If set to null - // the document selector provided on the client side will be used. - // - boost::optional documentSelector; - - MAKE_SWAP_METHOD(TextDocumentRegistrationOptions, documentSelector); -}; -MAKE_REFLECT_STRUCT(TextDocumentRegistrationOptions, documentSelector); - -// - // Static registration options to be returned in the initialize request. - // -struct StaticRegistrationOptions :public TextDocumentRegistrationOptions -{ - // - // The id used to register the request. The id can be used to deregister - // the request again. See also Registration#id. - // - boost::optional id; - MAKE_SWAP_METHOD(StaticRegistrationOptions, documentSelector, id) -}; -MAKE_REFLECT_STRUCT(StaticRegistrationOptions, documentSelector,id) - -// - // The server supports workspace folder. - // - // Since 3.6.0 - // - -struct WorkspaceFoldersOptions { - // - // The server has support for workspace folders - // - boost::optional supported; - - // - // Whether the server wants to receive workspace folder - // change notifications. - // - // If a string is provided, the string is treated as an ID - // under which the notification is registered on the client - // side. The ID can be used to unregister for these events - // using the `client/unregisterCapability` request. - // - boost::optional, boost::optional > > changeNotifications; - MAKE_SWAP_METHOD(WorkspaceFoldersOptions, supported, changeNotifications); -}; -MAKE_REFLECT_STRUCT(WorkspaceFoldersOptions, supported, changeNotifications); - -// - // A pattern kind describing if a glob pattern matches a file a folder or - // both. - // - // @since 3.16.0 - // -enum lsFileOperationPatternKind -{ - file, - folder -}; -MAKE_REFLECT_TYPE_PROXY(lsFileOperationPatternKind) - -// - // Matching options for the file operation pattern. - // - // @since 3.16.0 - // -struct lsFileOperationPatternOptions { - - // - // The pattern should be matched ignoring casing. - // - boost::optional ignoreCase; - MAKE_SWAP_METHOD(lsFileOperationPatternOptions, ignoreCase) -}; -MAKE_REFLECT_STRUCT(lsFileOperationPatternOptions, ignoreCase) -// - // A pattern to describe in which file operation requests or notifications - // the server is interested in. - // - // @since 3.16.0 - // -struct lsFileOperationPattern { - // - // The glob pattern to match. Glob patterns can have the following syntax: - // - `*` to match one or more characters in a path segment - // - `?` to match on one character in a path segment - // - `**` to match any number of path segments, including none - // - `{}` to group sub patterns into an OR expression. (e.g. `**/*.{ts,js}` - // matches all TypeScript and JavaScript files) - // - `[]` to declare a range of characters to match in a path segment - // (e.g., `example.[0-9]` to match on `example.0`, `example.1`,...) - // - `[!...]` to negate a range of characters to match in a path segment - // (e.g., `example.[!0-9]` to match on `example.a`, `example.b`, but - // not `example.0`) - // - std::string glob; - - // - // Whether to match files or folders with this pattern. - // - // Matches both if undefined. - // - boost::optional matches; - - // - // Additional options used during matching. - // - boost::optional options ; - MAKE_SWAP_METHOD(lsFileOperationPattern, glob, matches, options) -}; -MAKE_REFLECT_STRUCT(lsFileOperationPattern, glob, matches, options) -// - // A filter to describe in which file operation requests or notifications - // the server is interested in. - // - // @since 3.16.0 - // -struct lsFileOperationFilter { - - // - // A Uri like `file` or `untitled`. - // - boost::optional scheme; - - // - // The actual file operation pattern. - // - boost::optional pattern; - MAKE_SWAP_METHOD(lsFileOperationFilter, scheme, pattern) -}; -MAKE_REFLECT_STRUCT(lsFileOperationFilter, scheme, pattern) -// - // The options to register for file operations. - // - // @since 3.16.0 - // -struct lsFileOperationRegistrationOptions { - // - // The actual filters. - // - boost::optional> filters; - MAKE_SWAP_METHOD(lsFileOperationRegistrationOptions, filters) -}; -MAKE_REFLECT_STRUCT(lsFileOperationRegistrationOptions, filters) - -struct WorkspaceServerCapabilities { - // - // The server supports workspace folder. - // - // Since 3.6.0 - // - WorkspaceFoldersOptions workspaceFolders; - - - // - // The server is interested in file notifications/requests. - // - // @since 3.16.0 - // - struct lsFileOperations - { - // - // The server is interested in receiving didCreateFiles - // notifications. - // - boost::optional didCreate; - - // - // The server is interested in receiving willCreateFiles requests. - // - boost::optional willCreate; - - // - // The server is interested in receiving didRenameFiles - // notifications. - // - boost::optional didRename; - - // - // The server is interested in receiving willRenameFiles requests. - // - boost::optional willRename; - - // - // The server is interested in receiving didDeleteFiles file - // notifications. - // - boost::optional didDelete; - - // - // The server is interested in receiving willDeleteFiles file - // requests. - // - boost::optional willDelete; - MAKE_SWAP_METHOD(lsFileOperations, didCreate, willCreate, didRename, willRename, didDelete, willDelete) - }; - boost::optionalfileOperations; - - - MAKE_SWAP_METHOD(WorkspaceServerCapabilities, workspaceFolders, fileOperations) -}; -MAKE_REFLECT_STRUCT(WorkspaceServerCapabilities, workspaceFolders, fileOperations) -MAKE_REFLECT_STRUCT(WorkspaceServerCapabilities::lsFileOperations, didCreate, willCreate, didRename, willRename, didDelete, willDelete) - -// - // Semantic highlighting server capabilities. - // - //

- // Note: the {@code textDocument/semanticHighlighting} - // language feature is not yet part of the official LSP specification. - // - -struct SemanticHighlightingServerCapabilities { - // - // A "lookup table" of semantic highlighting TextMate scopes - // supported by the language server. If not defined or empty, then the server does not support the semantic highlighting - // feature. Otherwise, clients should reuse this "lookup table" when receiving semantic highlighting notifications from - // the server. - // - std::vector< std::vector > scopes; - MAKE_SWAP_METHOD(SemanticHighlightingServerCapabilities, scopes) -}; -MAKE_REFLECT_STRUCT(SemanticHighlightingServerCapabilities, scopes) - -struct SemanticTokensServerFull -{ - // - // The server supports deltas for full documents. - // - bool delta =false; - MAKE_SWAP_METHOD(SemanticTokensServerFull, delta) -}; -MAKE_REFLECT_STRUCT(SemanticTokensServerFull, delta) -struct SemanticTokensWithRegistrationOptions -{ - SemanticTokensLegend legend; - - // - // Server supports providing semantic tokens for a specific range - // of a document. - // - boost::optional< std::pair< boost::optional, boost::optional > > range; - - // - // Server supports providing semantic tokens for a full document. - // - boost::optional< std::pair< boost::optional, - boost::optional > > full; - - // - // A document selector to identify the scope of the registration. If set to null - // the document selector provided on the client side will be used. - // - boost::optional < std::vector > documentSelector; - // - // The id used to register the request. The id can be used to deregister - // the request again. See also Registration#id. - // - boost::optional id; - MAKE_SWAP_METHOD(SemanticTokensWithRegistrationOptions, legend, range, full, documentSelector, id) -}; -MAKE_REFLECT_STRUCT(SemanticTokensWithRegistrationOptions, legend, range, full, documentSelector ,id) - -using DocumentColorOptions = WorkDoneProgressOptions; -using FoldingRangeOptions = WorkDoneProgressOptions; -struct lsServerCapabilities { - // Defines how text documents are synced. Is either a detailed structure - // defining each notification or for backwards compatibility the - - // TextDocumentSyncKind number. - boost::optional< std::pair, - boost::optional >> textDocumentSync; - - // The server provides hover support. - boost::optional hoverProvider; - - // The server provides completion support. - boost::optional < lsCompletionOptions > completionProvider; - - // The server provides signature help support. - boost::optional < lsSignatureHelpOptions > signatureHelpProvider; - - // The server provides goto definition support. - boost::optional< std::pair< boost::optional, boost::optional > > definitionProvider; - - - // - // The server provides Goto Type Definition support. - // - // Since 3.6.0 - // - boost::optional< std::pair< boost::optional, boost::optional > > typeDefinitionProvider ; - - // The server provides implementation support. - boost::optional< std::pair< boost::optional, boost::optional > > implementationProvider ; - - // The server provides find references support. - boost::optional< std::pair< boost::optional, boost::optional > > referencesProvider ; - - // The server provides document highlight support. - boost::optional< std::pair< boost::optional, boost::optional > > documentHighlightProvider ; - - // The server provides document symbol support. - boost::optional< std::pair< boost::optional, boost::optional > > documentSymbolProvider ; - - // The server provides workspace symbol support. - boost::optional< std::pair< boost::optional, boost::optional > > workspaceSymbolProvider ; - - // The server provides code actions. - boost::optional< std::pair< boost::optional, boost::optional > > codeActionProvider ; - - // The server provides code lens. - boost::optional codeLensProvider; - - // The server provides document formatting. - boost::optional< std::pair< boost::optional, boost::optional > > documentFormattingProvider ; - - // The server provides document range formatting. - boost::optional< std::pair< boost::optional, boost::optional > > documentRangeFormattingProvider ; - - // The server provides document formatting on typing. - boost::optional documentOnTypeFormattingProvider; - - // The server provides rename support. - boost::optional< std::pair< boost::optional, boost::optional > > renameProvider; - - - // The server provides document link support. - boost::optional documentLinkProvider; - - - // - // The server provides color provider support. - // - // @since 3.6.0 - // - boost::optional< std::pair< boost::optional, boost::optional > > colorProvider; - - - // - // The server provides folding provider support. - // - // @since 3.10.0 - // - boost::optional < std::pair< boost::optional, boost::optional > > foldingRangeProvider; - - // The server provides execute command support. - boost::optional < lsExecuteCommandOptions >executeCommandProvider; - - - // - // Workspace specific server capabilities - // - boost::optional< WorkspaceServerCapabilities > workspace; - - // - // Semantic highlighting server capabilities. - // - - boost::optional< SemanticHighlightingServerCapabilities >semanticHighlighting; - - // - // Server capability for calculating super- and subtype hierarchies. - // The LS supports the type hierarchy language feature, if this capability is set to {@code true}. - // - //

- // Note: the {@code textDocument/typeHierarchy} - // language feature is not yet part of the official LSP specification. - // - - boost::optional< std::pair< boost::optional, - boost::optional > > typeHierarchyProvider; - - // - // The server provides Call Hierarchy support. - // - - boost::optional< std::pair< boost::optional, - boost::optional > > callHierarchyProvider; - - // - // The server provides selection range support. - // - // Since 3.15.0 - // - boost::optional< std::pair< boost::optional, - boost::optional > > selectionRangeProvider; - - // - // The server provides linked editing range support. - // - // Since 3.16.0 - // - boost::optional< std::pair< boost::optional, - boost::optional > > linkedEditingRangeProvider; - - - // - // The server provides semantic tokens support. - // - // Since 3.16.0 - // - boost::optional < SemanticTokensWithRegistrationOptions> semanticTokensProvider; - - // - // Whether server provides moniker support. - // - // Since 3.16.0 - // - boost::optional< std::pair< boost::optional, - boost::optional > > monikerProvider; - - boost::optional experimental; - - - MAKE_SWAP_METHOD(lsServerCapabilities, - textDocumentSync, - hoverProvider, - completionProvider, - signatureHelpProvider, - definitionProvider, - typeDefinitionProvider, - implementationProvider, - referencesProvider, - documentHighlightProvider, - documentSymbolProvider, - workspaceSymbolProvider, - codeActionProvider, - codeLensProvider, - documentFormattingProvider, - documentRangeFormattingProvider, - documentOnTypeFormattingProvider, - renameProvider, - documentLinkProvider, - executeCommandProvider, - workspace, - semanticHighlighting, - typeHierarchyProvider, - callHierarchyProvider, - selectionRangeProvider, - experimental, colorProvider, foldingRangeProvider, - linkedEditingRangeProvider, monikerProvider, semanticTokensProvider) - -}; -MAKE_REFLECT_STRUCT(lsServerCapabilities, - textDocumentSync, - hoverProvider, - completionProvider, - signatureHelpProvider, - definitionProvider, - typeDefinitionProvider, - implementationProvider, - referencesProvider, - documentHighlightProvider, - documentSymbolProvider, - workspaceSymbolProvider, - codeActionProvider, - codeLensProvider, - documentFormattingProvider, - documentRangeFormattingProvider, - documentOnTypeFormattingProvider, - renameProvider, - documentLinkProvider, - executeCommandProvider, - workspace, - semanticHighlighting, - typeHierarchyProvider, - callHierarchyProvider, - selectionRangeProvider, - experimental, colorProvider, foldingRangeProvider, - linkedEditingRangeProvider, monikerProvider, semanticTokensProvider) diff --git a/graphics/asymptote/LspCpp/LibLsp/lsp/general/lsTextDocumentClientCapabilities.h b/graphics/asymptote/LspCpp/LibLsp/lsp/general/lsTextDocumentClientCapabilities.h deleted file mode 100644 index 569f203c7a..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/lsp/general/lsTextDocumentClientCapabilities.h +++ /dev/null @@ -1,713 +0,0 @@ -#pragma once -#include "LibLsp/lsp/method_type.h" - - -#include -#include "LibLsp/JsonRpc/message.h" -#include "LibLsp/lsp/lsDocumentUri.h" -#include "LibLsp/lsp/lsAny.h" -#include "LibLsp/lsp/extention/jdtls/searchSymbols.h" -#include "lsWorkspaceClientCapabilites.h" -#include "LibLsp/lsp/lsp_completion.h" -#include "LibLsp/lsp/lsp_diagnostic.h" - - -struct WorkDoneProgressOptions -{ - boost::optionalworkDoneProgress; - MAKE_SWAP_METHOD(WorkDoneProgressOptions, workDoneProgress); -}; -MAKE_REFLECT_STRUCT(WorkDoneProgressOptions, workDoneProgress); - -// Completion options. -struct lsCompletionOptions:WorkDoneProgressOptions -{ - // The server provides support to resolve additional - // information for a completion item. - boost::optional resolveProvider = false; - - // - // Most tools trigger completion request automatically without explicitly requesting - // it using a keyboard shortcut (e.g. Ctrl+Space). Typically they do so when the user - // starts to type an identifier. For example if the user types `c` in a JavaScript file - // code complete will automatically pop up present `console` besides others as a - // completion item. Characters that make up identifiers don't need to be listed here. - // - // If code complete should automatically be trigger on characters not being valid inside - // an identifier (for example `.` in JavaScript) list them in `triggerCharacters`. - // - // https://github.com/Microsoft/language-server-protocol/issues/138. - boost::optional< std::vector > triggerCharacters ; - - // - // The list of all possible characters that commit a completion. This field can be used - // if clients don't support individual commmit characters per completion item. See - // `ClientCapabilities.textDocument.completion.completionItem.commitCharactersSupport` - // - boost::optional< std::vector > allCommitCharacters; - - MAKE_SWAP_METHOD(lsCompletionOptions, workDoneProgress, resolveProvider, triggerCharacters, allCommitCharacters); -}; -MAKE_REFLECT_STRUCT(lsCompletionOptions, workDoneProgress, resolveProvider, triggerCharacters,allCommitCharacters); - - - -// Save options. -struct lsSaveOptions { - // The client is supposed to include the content on save. - bool includeText = false; - void swap(lsSaveOptions& arg)noexcept - { - auto temp = includeText; - includeText = arg.includeText; - arg.includeText = temp; - } -}; -MAKE_REFLECT_STRUCT(lsSaveOptions, includeText); - -// Signature help options. -struct lsSignatureHelpOptions : WorkDoneProgressOptions { - // The characters that trigger signature help automatically. - // NOTE: If updating signature help tokens make sure to also update - // WorkingFile::FindClosestCallNameInBuffer. - std::vector triggerCharacters; - MAKE_SWAP_METHOD(lsSignatureHelpOptions, workDoneProgress, triggerCharacters); -}; -MAKE_REFLECT_STRUCT(lsSignatureHelpOptions, workDoneProgress, triggerCharacters); - -// Defines how the host (editor) should sync document changes to the language -// server. -enum class lsTextDocumentSyncKind { - // Documents should not be synced at all. - None = 0, - - // Documents are synced by always sending the full content - // of the document. - Full = 1, - - // Documents are synced by sending the full content on open. - // After that only incremental updates to the document are - // send. - Incremental = 2 -}; - -#if _WIN32 -MAKE_REFLECT_TYPE_PROXY(lsTextDocumentSyncKind) -#else -//#pragma clang diagnostic push -//#pragma clang diagnostic ignored "-Wunused-function" -MAKE_REFLECT_TYPE_PROXY(lsTextDocumentSyncKind) -//#pragma clang diagnostic pop -#endif - -struct lsTextDocumentSyncOptions { - // Open and close notifications are sent to the server. - boost::optional openClose ; - // Change notificatins are sent to the server. See TextDocumentSyncKind.None, - // TextDocumentSyncKind.Full and TextDocumentSyncKindIncremental. - boost::optional< lsTextDocumentSyncKind> change ; - // Will save notifications are sent to the server. - boost::optional willSave; - // Will save wait until requests are sent to the server. - boost::optional willSaveWaitUntil; - // Save notifications are sent to the server. - boost::optional save; - - MAKE_SWAP_METHOD(lsTextDocumentSyncOptions, - openClose, - change, - willSave, - willSaveWaitUntil, - save); -}; -MAKE_REFLECT_STRUCT(lsTextDocumentSyncOptions, - openClose, - change, - willSave, - willSaveWaitUntil, - save); - -struct SynchronizationCapabilities { - // Whether text document synchronization supports dynamic registration. - boost::optional dynamicRegistration; - - // The client supports sending will save notifications. - boost::optional willSave; - - // The client supports sending a will save request and - // waits for a response providing text edits which will - // be applied to the document before it is saved. - boost::optional willSaveWaitUntil; - - // The client supports did save notifications. - boost::optional didSave; - - MAKE_SWAP_METHOD(SynchronizationCapabilities, - dynamicRegistration, - willSave, - willSaveWaitUntil, - didSave); -}; -MAKE_REFLECT_STRUCT(SynchronizationCapabilities, - dynamicRegistration, - willSave, - willSaveWaitUntil, - didSave); - -struct CompletionItemKindCapabilities -{ - boost::optional >valueSet; - MAKE_SWAP_METHOD(CompletionItemKindCapabilities, valueSet); -}; -MAKE_REFLECT_STRUCT(CompletionItemKindCapabilities, valueSet); - -struct CompletionItemCapabilities { - // Client supports snippets as insert text. - // - // A snippet can define tab stops and placeholders with `$1`, `$2` - // and `${3:foo}`. `$0` defines the final tab stop, it defaults to - // the end of the snippet. Placeholders with equal identifiers are linked, - // that is typing in one will update others too. - boost::optional snippetSupport; - - // Client supports commit characters on a completion item. - - boost::optional commitCharactersSupport; - - - // Client supports the following content formats for the documentation - // property. The order describes the preferred format of the client. - - boost::optional< std::vector > documentationFormat; - - // Client supports the deprecated property on a completion item. - - boost::optional deprecatedSupport; - - // - // Client supports the preselect property on a completion item. - // - boost::optional preselectSupport; - - MAKE_SWAP_METHOD(CompletionItemCapabilities, - snippetSupport, - commitCharactersSupport, - documentationFormat, - deprecatedSupport, preselectSupport); -}; -MAKE_REFLECT_STRUCT(CompletionItemCapabilities, - snippetSupport, - commitCharactersSupport, - documentationFormat, - deprecatedSupport, preselectSupport); - - -// - // Capabilities specific to the `textDocument/completion` - // -struct CompletionCapabilities { - // Whether completion supports dynamic registration. - boost::optional dynamicRegistration; - - - - // The client supports the following `CompletionItem` specific - // capabilities. - boost::optional completionItem; - - // - // The client supports the following `CompletionItemKind` specific - // capabilities. - // - boost::optional completionItemKind; - - // - // The client supports sending additional context information for a - // `textDocument/completion` request. - // - boost::optional contextSupport; - - - MAKE_SWAP_METHOD(CompletionCapabilities, - dynamicRegistration, - completionItem, completionItemKind); -}; - -MAKE_REFLECT_STRUCT(CompletionCapabilities, - dynamicRegistration, - completionItem , completionItemKind); - - -struct HoverCapabilities:public DynamicRegistrationCapabilities -{ - // - // Client supports the following content formats for the content - // property. The order describes the preferred format of the client. - // - // See {@link MarkupKind} for allowed values. - // - boost::optional> contentFormat; - - MAKE_SWAP_METHOD(HoverCapabilities, dynamicRegistration, contentFormat); -}; -MAKE_REFLECT_STRUCT(HoverCapabilities, dynamicRegistration, contentFormat); - -// - // Client capabilities specific to parameter information. - // -struct ParameterInformationCapabilities { - // - // The client supports processing label offsets instead of a - // simple label string. - // - // Since 3.14.0 - // - boost::optional labelOffsetSupport; - - MAKE_SWAP_METHOD(ParameterInformationCapabilities, labelOffsetSupport); -}; -MAKE_REFLECT_STRUCT(ParameterInformationCapabilities, labelOffsetSupport) - - -struct SignatureInformationCapabilities { - // - // Client supports the following content formats for the documentation - // property. The order describes the preferred format of the client. - // - // See {@link MarkupKind} for allowed values. - // - std::vector documentationFormat; - - // - // Client capabilities specific to parameter information. - // - ParameterInformationCapabilities parameterInformation; - - MAKE_SWAP_METHOD(SignatureInformationCapabilities, documentationFormat, parameterInformation) -}; -MAKE_REFLECT_STRUCT(SignatureInformationCapabilities,documentationFormat, parameterInformation) - -struct SignatureHelpCapabilities :public DynamicRegistrationCapabilities -{ - // - // The client supports the following `SignatureInformation` - // specific properties. - // - boost::optional< SignatureInformationCapabilities > signatureInformation; - - MAKE_SWAP_METHOD(SignatureHelpCapabilities, dynamicRegistration, signatureInformation) -}; -MAKE_REFLECT_STRUCT(SignatureHelpCapabilities, dynamicRegistration, signatureInformation) - -struct DocumentSymbolCapabilities :public DynamicRegistrationCapabilities { - // - // Specific capabilities for the `SymbolKind`. - // - boost::optional symbolKind; - - // - // The client support hierarchical document symbols. - // - boost::optional hierarchicalDocumentSymbolSupport; - - MAKE_SWAP_METHOD(DocumentSymbolCapabilities, dynamicRegistration, symbolKind, hierarchicalDocumentSymbolSupport) -}; -MAKE_REFLECT_STRUCT(DocumentSymbolCapabilities, dynamicRegistration, symbolKind, hierarchicalDocumentSymbolSupport) - -struct DeclarationCapabilities:public DynamicRegistrationCapabilities{ - // - // The client supports additional metadata in the form of declaration links. - // - boost::optionallinkSupport; - - MAKE_SWAP_METHOD(DeclarationCapabilities, dynamicRegistration, linkSupport); -}; -MAKE_REFLECT_STRUCT(DeclarationCapabilities, dynamicRegistration, linkSupport) - - -struct CodeActionKindCapabilities -{ - // - // The code action kind values the client supports. When this - // property exists the client also guarantees that it will - // handle values outside its set gracefully and falls back - // to a default value when unknown. - // - // See {@link CodeActionKind} for allowed values. - // - boost::optional< std::vector< std::string> >valueSet; - - MAKE_SWAP_METHOD(CodeActionKindCapabilities, valueSet) -}; -MAKE_REFLECT_STRUCT(CodeActionKindCapabilities,valueSet) - -struct CodeActionLiteralSupportCapabilities -{ - boost::optional codeActionKind; - - MAKE_SWAP_METHOD(CodeActionLiteralSupportCapabilities, codeActionKind) -}; -MAKE_REFLECT_STRUCT(CodeActionLiteralSupportCapabilities, codeActionKind) - -struct CodeActionCapabilities:public DynamicRegistrationCapabilities{ - // - // The client support code action literals as a valid - // response of the `textDocument/codeAction` request. - // - boost::optional codeActionLiteralSupport; - - MAKE_SWAP_METHOD(CodeActionCapabilities, dynamicRegistration, codeActionLiteralSupport) -}; -MAKE_REFLECT_STRUCT(CodeActionCapabilities,dynamicRegistration,codeActionLiteralSupport) - -struct RenameCapabilities :public DynamicRegistrationCapabilities { - // - // The client support code action literals as a valid - // response of the `textDocument/codeAction` request. - // - boost::optional prepareSupport; - - MAKE_SWAP_METHOD(RenameCapabilities, dynamicRegistration, prepareSupport) -}; -MAKE_REFLECT_STRUCT(RenameCapabilities, dynamicRegistration, prepareSupport) - -struct DiagnosticsTagSupport { - /** - * The tags supported by the client. - */ - std::vector valueSet; - MAKE_SWAP_METHOD(DiagnosticsTagSupport, valueSet) -}; -MAKE_REFLECT_STRUCT(DiagnosticsTagSupport, valueSet) - -struct PublishDiagnosticsClientCapabilities :public DynamicRegistrationCapabilities { - /** - * The client support code action literals as a valid - * response of the `textDocument/codeAction` request. - */ - boost::optional relatedInformation; - - /** - * Client supports the tag property to provide meta data about a diagnostic. - * Clients supporting tags have to handle unknown tags gracefully. - * - * This property had been added and implemented as boolean before it was - * added to the specification as {@link DiagnosticsTagSupport}. In order to - * keep this implementation compatible with intermediate clients (including - * vscode-language-client < 6.0.0) we add an either type here. - * - * Since 3.15 - */ - boost::optional < std::pair, boost::optional > > tagSupport; - - /** - * Whether the client interprets the version property of the - * `textDocument/publishDiagnostics` notification's parameter. - * - * Since 3.15.0 - */ - boost::optional versionSupport; - - /** - * Client supports a codeDescription property - * - * @since 3.16.0 - */ - boost::optional codeDescriptionSupport ; - - /** - * Whether code action supports the `data` property which is - * preserved between a `textDocument/publishDiagnostics` and - * `textDocument/codeAction` request. - * - * @since 3.16.0 - */ - boost::optional dataSupport ; - - - MAKE_SWAP_METHOD(PublishDiagnosticsClientCapabilities, dynamicRegistration, relatedInformation, tagSupport,versionSupport,codeDescriptionSupport,dataSupport) -}; -MAKE_REFLECT_STRUCT(PublishDiagnosticsClientCapabilities, dynamicRegistration, relatedInformation, tagSupport, versionSupport, codeDescriptionSupport, dataSupport) - - -struct FoldingRangeCapabilities :public DynamicRegistrationCapabilities { - // - // The maximum number of folding ranges that the client prefers to receive per document. The value serves as a - // hint, servers are free to follow the limit. - // - boost::optional rangeLimit; - - // - // If set, the client signals that it only supports folding complete lines. If set, client will - // ignore specified `startCharacter` and `endCharacter` properties in a FoldingRange. - // - boost::optional lineFoldingOnly; - MAKE_SWAP_METHOD(FoldingRangeCapabilities, dynamicRegistration, rangeLimit, lineFoldingOnly) -}; -MAKE_REFLECT_STRUCT(FoldingRangeCapabilities, dynamicRegistration, rangeLimit,lineFoldingOnly) - - -struct SemanticHighlightingCapabilities :public DynamicRegistrationCapabilities { - // - // The client support code action literals as a valid - // response of the `textDocument/codeAction` request. - // - boost::optional semanticHighlighting; - - MAKE_SWAP_METHOD(SemanticHighlightingCapabilities, dynamicRegistration, semanticHighlighting) -}; -MAKE_REFLECT_STRUCT(SemanticHighlightingCapabilities, dynamicRegistration, semanticHighlighting) - -struct SemanticTokensClientCapabilitiesRequestsFull { - - // - // The client will send the `textDocument/semanticTokens/full/delta` request if - // the server provides a corresponding handler. - // - bool delta = false; - MAKE_SWAP_METHOD(SemanticTokensClientCapabilitiesRequestsFull, delta) -}; -MAKE_REFLECT_STRUCT(SemanticTokensClientCapabilitiesRequestsFull, delta) - -struct SemanticTokensClientCapabilities : public DynamicRegistrationCapabilities -{ - //export TokenFormat = 'relative'; - struct lsRequests - { - // - // The client will send the `textDocument/semanticTokens/range` request - // if the server provides a corresponding handler. - // - boost::optional, - boost::optional>> range; - // - // The client will send the `textDocument/semanticTokens/full` request - // if the server provides a corresponding handler. - // - boost::optional, boost::optional>> full; - MAKE_SWAP_METHOD(lsRequests, range, full) - }; - - lsRequests requests; - // - // The token types that the client supports. - // - std::vector tokenTypes; - - // - // The token modifiers that the client supports. - // - std::vector tokenModifiers; - // - // The formats the clients supports. - // - std::vector formats; - // - // Whether the client supports tokens that can overlap each other. - // - boost::optional < bool >overlappingTokenSupport; - - // - // Whether the client supports tokens that can span multiple lines. - // - boost::optional < bool > multilineTokenSupport; - - MAKE_SWAP_METHOD(SemanticTokensClientCapabilities, dynamicRegistration,requests, tokenTypes, tokenModifiers, - formats, overlappingTokenSupport, multilineTokenSupport) - -}; -MAKE_REFLECT_STRUCT(SemanticTokensClientCapabilities::lsRequests, range,full) -MAKE_REFLECT_STRUCT(SemanticTokensClientCapabilities, dynamicRegistration, requests, tokenTypes, tokenModifiers, - formats, overlappingTokenSupport, multilineTokenSupport) - -// Text document specific client capabilities. -struct lsTextDocumentClientCapabilities { - - SynchronizationCapabilities synchronization; - - - // Capabilities specific to the `textDocument/completion` - boost::optional completion; - - - - // Capabilities specific to the `textDocument/hover` - boost::optional hover; - - // Capabilities specific to the `textDocument/signatureHelp` - boost::optional signatureHelp; - - // Capabilities specific to the `textDocument/references` - boost::optional references; - - - - - - // Capabilities specific to the `textDocument/documentHighlight` - boost::optional documentHighlight; - - // Capabilities specific to the `textDocument/documentSymbol` - boost::optional documentSymbol; - - // Capabilities specific to the `textDocument/formatting` - boost::optional formatting; - - // Capabilities specific to the `textDocument/rangeFormatting` - boost::optional rangeFormatting; - - // Capabilities specific to the `textDocument/onTypeFormatting` - boost::optional onTypeFormatting; - - - // - // Capabilities specific to the `textDocument/declaration` - // - // Since 3.14.0 - // - boost::optional< DeclarationCapabilities> declaration; - - - typedef DeclarationCapabilities DefinitionCapabilities; - // Capabilities specific to the `textDocument/definition` - boost::optional definition; - - - - // -// Capabilities specific to the `textDocument/typeDefinition` -// -// Since 3.6.0 -// - typedef DeclarationCapabilities TypeDefinitionCapabilities; - boost::optional typeDefinition; - - - typedef DeclarationCapabilities ImplementationCapabilities; - // Capabilities specific to the `textDocument/implementation` - boost::optional implementation; - - - // Capabilities specific to the `textDocument/codeAction` - boost::optional codeAction; - - - // Capabilities specific to the `textDocument/codeLens` - boost::optional codeLens; - - // Capabilities specific to the `textDocument/documentLink` - boost::optional documentLink; - - // - // Capabilities specific to the `textDocument/documentColor` and the - // `textDocument/colorPresentation` request. - // - // Since 3.6.0 - // - boost::optional colorProvider; - - // Capabilities specific to the `textDocument/rename` - boost::optional rename; - -// -// Capabilities specific to `textDocument/publishDiagnostics`. -// - boost::optional publishDiagnostics; - - // -// Capabilities specific to `textDocument/foldingRange` requests. -// -// Since 3.10.0 -// - boost::optional< FoldingRangeCapabilities > foldingRange; - - - // - // Capabilities specific to {@code textDocument/semanticHighlighting}. - // - boost::optional< SemanticHighlightingCapabilities > semanticHighlightingCapabilities; - - // - // Capabilities specific to {@code textDocument/typeHierarchy}. - // - boost::optional< DynamicRegistrationCapabilities > typeHierarchyCapabilities; - - - - // -// Capabilities specific to `textDocument/selectionRange` requests -// - - boost::optional< DynamicRegistrationCapabilities > selectionRange; - - // - // Capabilities specific to the `textDocument/linkedEditingRange` request. - // - // @since 3.16.0 - // - boost::optional< DynamicRegistrationCapabilities > linkedEditingRange; - - // - // Capabilities specific to the various call hierarchy requests. - // - // @since 3.16.0 - // - boost::optional< DynamicRegistrationCapabilities > callHierarchy; - - // - // Capabilities specific to the various semantic token requests. - // - // @since 3.16.0 - // - boost::optional< SemanticTokensClientCapabilities > semanticTokens; - - // - // Capabilities specific to the `textDocument/moniker` request. - // - // @since 3.16.0 - // - boost::optional< DynamicRegistrationCapabilities > moniker; - - MAKE_SWAP_METHOD(lsTextDocumentClientCapabilities, - synchronization, - completion, - hover, - signatureHelp, - implementation, - references, - documentHighlight, - documentSymbol, - formatting, - rangeFormatting, - onTypeFormatting, - declaration, - definition, typeDefinition, implementation, - codeAction, - codeLens, - documentLink, colorProvider, - rename, publishDiagnostics, foldingRange, - semanticHighlightingCapabilities, typeHierarchyCapabilities, - callHierarchy, selectionRange , linkedEditingRange, semanticTokens, moniker) -}; - - -MAKE_REFLECT_STRUCT(lsTextDocumentClientCapabilities, - synchronization, - completion, - hover, - signatureHelp, - implementation, - references, - documentHighlight, - documentSymbol, - formatting, - rangeFormatting, - onTypeFormatting, - declaration, - definition, typeDefinition, implementation, - codeAction, - codeLens, - documentLink, colorProvider, - rename, publishDiagnostics, foldingRange, - semanticHighlightingCapabilities, typeHierarchyCapabilities, - callHierarchy, selectionRange, linkedEditingRange, semanticTokens, moniker) diff --git a/graphics/asymptote/LspCpp/LibLsp/lsp/general/lsWorkspaceClientCapabilites.h b/graphics/asymptote/LspCpp/LibLsp/lsp/general/lsWorkspaceClientCapabilites.h deleted file mode 100644 index dd37a1af2f..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/lsp/general/lsWorkspaceClientCapabilites.h +++ /dev/null @@ -1,256 +0,0 @@ -#pragma once -#include "LibLsp/lsp/method_type.h" - - -#include - -#include "LibLsp/JsonRpc/message.h" -#include "LibLsp/lsp/lsDocumentUri.h" -#include "LibLsp/lsp/lsAny.h" -#include "LibLsp/lsp/extention/jdtls/searchSymbols.h" - -/** - * Capabilities specific to `WorkspaceEdit`s - */ - -//New in version 3.13: ResourceOperationKind and FailureHandlingKind and the client capability workspace.workspaceEdit. -//resourceOperations as well as workspace.workspaceEdit.failureHandling. - -//The capabilities of a workspace edit has evolved over the time. -//Clients can describe their support using the following client capability : - -struct lschangeAnnotationSupport -{ - /** - * Whether the client groups edits with equal labels into tree nodes, - * for instance all edits labelled with "Changes in Strings" would - * be a tree node. - */ - boost::optional groupsOnLabel; - MAKE_SWAP_METHOD(lschangeAnnotationSupport, groupsOnLabel) -}; -MAKE_REFLECT_STRUCT(lschangeAnnotationSupport, groupsOnLabel) - -struct WorkspaceEditCapabilities { - /** - * The client supports versioned document changes in `WorkspaceEdit`s - */ - boost::optional documentChanges; - - /** - * The client supports resource changes - * in `WorkspaceEdit`s. - * - * @deprecated Since LSP introduces resource operations, use {link #resourceOperations} - */ - - boost::optional resourceChanges; - - /** - * The resource operations the client supports. Clients should at least - * support 'create', 'rename' and 'delete' files and folders. - * - * @since 3.13.0 - */ - boost::optional< std::vector > resourceOperations; - - /** - * The failure handling strategy of a client if applying the workspace edit - * fails. - * - * See {@link FailureHandlingKind} for allowed values. - */ - boost::optional failureHandling; - - /** - * Whether the client normalizes line endings to the client specific - * setting. - * If set to `true` the client will normalize line ending characters - * in a workspace edit to the client specific new line character(s). - * - * @since 3.16.0 - */ - boost::optional normalizesLineEndings;; - - /** - * Whether the client in general supports change annotations on text edits, - * create file, rename file and delete file changes. - * - * @since 3.16.0 - */ - boost::optional changeAnnotationSupport; - - MAKE_SWAP_METHOD(WorkspaceEditCapabilities, documentChanges, resourceChanges, resourceOperations, failureHandling, normalizesLineEndings, changeAnnotationSupport) - -}; -MAKE_REFLECT_STRUCT(WorkspaceEditCapabilities,documentChanges, resourceChanges, resourceOperations, failureHandling, normalizesLineEndings, changeAnnotationSupport) - - -struct DynamicRegistrationCapabilities { - // Did foo notification supports dynamic registration. - boost::optional dynamicRegistration; - - MAKE_SWAP_METHOD(DynamicRegistrationCapabilities, - dynamicRegistration); -}; - -MAKE_REFLECT_STRUCT(DynamicRegistrationCapabilities, - dynamicRegistration); - - - -// Workspace specific client capabilities. -struct SymbolKindCapabilities -{ - boost::optional< std::vector > valueSet; - - MAKE_SWAP_METHOD(SymbolKindCapabilities, valueSet) - - -}; -MAKE_REFLECT_STRUCT(SymbolKindCapabilities, valueSet) - - - - -struct SymbolCapabilities :public DynamicRegistrationCapabilities { - /** - * Specific capabilities for the `SymbolKind` in the `workspace/symbol` request. - */ - boost::optional symbolKind; - - MAKE_SWAP_METHOD(SymbolCapabilities, - symbolKind, dynamicRegistration) -}; -MAKE_REFLECT_STRUCT(SymbolCapabilities, - symbolKind, dynamicRegistration) - - -struct lsFileOperations -{ - /** - * Whether the client supports dynamic registration for file - * requests/notifications. - */ - boost::optional dynamicRegistration ; - - /** - * The client has support for sending didCreateFiles notifications. - */ - boost::optionaldidCreate ; - - /** - * The client has support for sending willCreateFiles requests. - */ - boost::optionalwillCreate ; - - /** - * The client has support for sending didRenameFiles notifications. - */ - boost::optionaldidRename ; - - /** - * The client has support for sending willRenameFiles requests. - */ - boost::optionalwillRename ; - - /** - * The client has support for sending didDeleteFiles notifications. - */ - boost::optionaldidDelete ; - - /** - * The client has support for sending willDeleteFiles requests. - */ - boost::optional willDelete ; - MAKE_SWAP_METHOD(lsFileOperations, dynamicRegistration, didCreate, willCreate, - didRename, willRename, didDelete, willDelete) -}; -MAKE_REFLECT_STRUCT(lsFileOperations, dynamicRegistration, didCreate, willCreate, - didRename, willRename, didDelete, willDelete) - -struct lsWorkspaceClientCapabilites { - // The client supports applying batch edits to the workspace. - boost::optional applyEdit; - - - - // Capabilities specific to `WorkspaceEdit`s - boost::optional workspaceEdit; - - - - // Capabilities specific to the `workspace/didChangeConfiguration` - // notification. - boost::optional didChangeConfiguration; - - // Capabilities specific to the `workspace/didChangeWatchedFiles` - // notification. - boost::optional didChangeWatchedFiles; - - // Capabilities specific to the `workspace/symbol` request. - boost::optional symbol; - - // Capabilities specific to the `workspace/executeCommand` request. - boost::optional executeCommand; - - - /** - * The client has support for workspace folders. - * - * Since 3.6.0 - */ - boost::optional workspaceFolders; - - /** - * The client supports `workspace/configuration` requests. - * - * Since 3.6.0 - */ - boost::optional configuration; - - - /** - * Capabilities specific to the semantic token requests scoped to the - * workspace. - * - * @since 3.16.0 - */ - boost::optional semanticTokens ; - - /** - * Capabilities specific to the code lens requests scoped to the - * workspace. - * - * @since 3.16.0 - */ - boost::optional codeLens ; - - /** - * The client has support for file requests/notifications. - * - * @since 3.16.0 - */ - boost::optional fileOperations; - - MAKE_SWAP_METHOD(lsWorkspaceClientCapabilites, - applyEdit, - workspaceEdit, - didChangeConfiguration, - didChangeWatchedFiles, - symbol,executeCommand, workspaceFolders, - configuration, semanticTokens, codeLens, fileOperations) -}; - -MAKE_REFLECT_STRUCT(lsWorkspaceClientCapabilites, - applyEdit, - workspaceEdit, - didChangeConfiguration, - didChangeWatchedFiles, - symbol, - executeCommand,workspaceFolders, - configuration, semanticTokens, codeLens, fileOperations) - - - - diff --git a/graphics/asymptote/LspCpp/LibLsp/lsp/general/progress.h b/graphics/asymptote/LspCpp/LibLsp/lsp/general/progress.h deleted file mode 100644 index 01cb18d68d..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/lsp/general/progress.h +++ /dev/null @@ -1,16 +0,0 @@ -#pragma once - -#include "LibLsp/JsonRpc/NotificationInMessage.h" -#include "LibLsp/lsp/lsAny.h" -//The base protocol offers also support to report progress in a generic fashion. -//This mechanism can be used to report any kind of progress including work done -//progress(usually used to report progress in the user interface using a progress bar) -//and partial result progress to support streaming of results. -struct ProgressParams -{ - std::pair , boost::optional > token; - lsp::Any value; - MAKE_SWAP_METHOD(ProgressParams, token, value) -}; -MAKE_REFLECT_STRUCT(ProgressParams, token, value) -DEFINE_NOTIFICATION_TYPE(Notify_Progress, ProgressParams, "$/progress"); diff --git a/graphics/asymptote/LspCpp/LibLsp/lsp/general/shutdown.h b/graphics/asymptote/LspCpp/LibLsp/lsp/general/shutdown.h deleted file mode 100644 index 5366ff89d6..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/lsp/general/shutdown.h +++ /dev/null @@ -1,15 +0,0 @@ -#pragma once - - -#include "LibLsp/JsonRpc/lsResponseMessage.h" -#include "LibLsp/JsonRpc/RequestInMessage.h" - -/** - * The shutdown request is sent from the client to the server. It asks the - * server to shutdown, but to not exit (otherwise the response might not be - * delivered correctly to the client). There is a separate exit notification - * that asks the server to exit. - */ - -DEFINE_REQUEST_RESPONSE_TYPE(td_shutdown, boost::optional, boost::optional, "shutdown"); - diff --git a/graphics/asymptote/LspCpp/LibLsp/lsp/language/language.h b/graphics/asymptote/LspCpp/LibLsp/lsp/language/language.h deleted file mode 100644 index b4c7829e95..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/lsp/language/language.h +++ /dev/null @@ -1,170 +0,0 @@ -#pragma once - -#include "LibLsp/JsonRpc/RequestInMessage.h" -#include "LibLsp/JsonRpc/NotificationInMessage.h" - -#include "LibLsp/lsp/lsDocumentUri.h" -#include "LibLsp/lsp/lsCommand.h" - -#ifdef _WIN32 -#include -#endif - -struct StatusReport { - - std::string ToString() const - { - std::string info; - info += "type:" + type + "\n"; - info += "message:" + message + "\n"; - return info; - } - /** - * The message type. See { - * - */ - - std::string type; - /** - * The actual message - * - */ - - std::string message; - MAKE_SWAP_METHOD(StatusReport, type, message); -}; -MAKE_REFLECT_STRUCT(StatusReport, type, message); - -/** - * The show message notification is sent from a server to a client to ask - * the client to display a particular message in the user interface. - */ -DEFINE_NOTIFICATION_TYPE(lang_status, StatusReport, "language/status"); - - -enum class MessageType { - - /** - * An error message. - */ - Error=(1), - - /** - * A warning message. - */ - Warning=(2), - - /** - * An information message. - */ - Info=(3), - - /** - * A log message. - */ - Log=(4) -}; -MAKE_REFLECT_TYPE_PROXY(MessageType); - - -struct ActionableNotification { - - - - /** - * The message type. See { - * - */ - - MessageType severity; - /** - * The actual message - * - */ - - std::string message; - - /** - * Optional data - * - */ - - boost::optional data; - - - /** - * Optional commands - * - */ - - std::vector commands; - - MAKE_SWAP_METHOD(ActionableNotification, severity, message, data, commands) -}; -MAKE_REFLECT_STRUCT(ActionableNotification, severity, message, data, commands) - - -/** - * The actionable notification is sent from a server to a client to ask the - * client to display a particular message in the user interface, and possible - * commands to execute. The commands must be implemented on the client side. - */ -DEFINE_NOTIFICATION_TYPE(lang_actionableNotification, ActionableNotification, "language/actionableNotification"); - - - -struct ProgressReport { - std::string ToString() const; - - std::string id; - - - std::string task; - - - std::string subTask; - - - std::string status; - - int totalWork = 0; - - - int workDone = 0; - - - bool complete = false; - MAKE_SWAP_METHOD(ProgressReport, id, task, subTask, status, workDone, complete); -}; - - -MAKE_REFLECT_STRUCT(ProgressReport, id, task, subTask, status, workDone, complete); - -/** - * The progress report notification is sent from a server to be handled by the - * client. - */ -DEFINE_NOTIFICATION_TYPE(lang_progressReport, ProgressReport, "language/progressReport"); - -enum EventType { - /** - * classpath updated event. - */ - ClasspathUpdated = (100), - - /** - * projects imported event. - */ - ProjectsImported = (200) -}; - -struct EventNotification -{ - int eventType; - lsp::Any data; - std::string ToString() const; - MAKE_SWAP_METHOD(EventNotification, eventType, data) -}; -MAKE_REFLECT_STRUCT(EventNotification, eventType, data); - -DEFINE_NOTIFICATION_TYPE(lang_eventNotification, EventNotification, "language/eventNotification"); \ No newline at end of file diff --git a/graphics/asymptote/LspCpp/LibLsp/lsp/location_type.h b/graphics/asymptote/LspCpp/LibLsp/lsp/location_type.h deleted file mode 100644 index 14e130f571..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/lsp/location_type.h +++ /dev/null @@ -1,63 +0,0 @@ -#pragma once - -#include "lsDocumentUri.h" -#include "lsRange.h" -//Represents a location inside a resource, such as a line inside a text file. -struct lsLocation { - lsLocation(); - lsLocation(lsDocumentUri uri, lsRange range); - - bool operator==(const lsLocation& other) const; - bool operator<(const lsLocation& o) const; - - lsDocumentUri uri; - lsRange range; - MAKE_SWAP_METHOD(lsLocation, uri, range) -}; -MAKE_REFLECT_STRUCT(lsLocation, uri, range) - - - -struct LinkLocation :public lsLocation -{ - std::string displayName; - std::string kind; - MAKE_REFLECT_STRUCT(LinkLocation, uri, range, displayName, kind) -}; -MAKE_REFLECT_STRUCT(LinkLocation, uri, range, displayName,kind) - -//Represents a link between a sourceand a target location. -struct LocationLink -{ - /** - * Span of the origin of this link. - * - * Used as the underlined span for mouse interaction. Defaults to the word range at - * the mouse position. - */ - boost::optional originSelectionRange; - - /** - * The target resource identifier of this link. - */ - - lsDocumentUri targetUri; - - /** - * The full target range of this link. If the target for example is a symbol then target range is the - * range enclosing this symbol not including leading/trailing whitespace but everything else - * like comments. This information is typically used to highlight the range in the editor. - */ - - lsRange targetRange; - - /** - * The range that should be selected and revealed when this link is being followed, e.g the name of a function. - * Must be contained by the the `targetRange`. See also `DocumentSymbol#range` - */ - - lsRange targetSelectionRange; - - MAKE_SWAP_METHOD(LocationLink, originSelectionRange, targetUri, targetRange, targetSelectionRange); -}; -MAKE_REFLECT_STRUCT(LocationLink, originSelectionRange, targetUri, targetRange, targetSelectionRange); \ No newline at end of file diff --git a/graphics/asymptote/LspCpp/LibLsp/lsp/lru_cache.h b/graphics/asymptote/LspCpp/LibLsp/lsp/lru_cache.h deleted file mode 100644 index f33bc5627a..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/lsp/lru_cache.h +++ /dev/null @@ -1,151 +0,0 @@ -#pragma once - -#include -#include -#include -#include -#include - -// Cache that evicts old entries which have not been used recently. Implemented -// using array/linear search so this works well for small array sizes. -template -struct LruCache { - explicit LruCache(int max_entries); - - // Fetches an entry for |key|. If it does not exist, |allocator| will be - // invoked to create one. - template - TValue Get(const TKey& key, TAllocator allocator); - // Returns true if there is an entry for |key|. - bool Has(const TKey& key); - // Fetches the entry for |filename| and updates it's usage so it is less - // likely to be evicted. - bool TryGet(const TKey& key, TValue* dest); - // TryGetEntry, except the entry is removed from the cache. - bool TryTake(const TKey& key, TValue* dest); - // Inserts an entry. Evicts the oldest unused entry if there is no space. - void Insert(const TKey& key, const TValue& value); - - // Call |func| on existing entries. If |func| returns false iteration - // terminates early. - template - void IterateValues(TFunc func); - - // Empties the cache - void Clear(void); - - private: - // There is a global score counter, when we access an element we increase - // its score to the current global value, so it has the highest overall - // score. This means that the oldest/least recently accessed value has the - // lowest score. - // - // There is a bit of special logic to handle score overlow. - struct Entry { - uint32_t score = 0; - TKey key; - TValue value; - bool operator<(const Entry& other) const { return score < other.score; } - }; - - void IncrementScore(); - - std::vector entries_; - int max_entries_ = 1; - uint32_t next_score_ = 0; -}; - -template -LruCache::LruCache(int max_entries) : max_entries_(max_entries) { - assert(max_entries > 0); -} - -template -template -TValue LruCache::Get(const TKey& key, TAllocator allocator) { - for (Entry& entry : entries_) { - if (entry.key == key) - return entry.value; - } - - auto result = allocator(); - Insert(key, result); - return result; -} - -template -bool LruCache::Has(const TKey& key) { - for (Entry& entry : entries_) { - if (entry.key == key) - return true; - } - return false; -} - -template -bool LruCache::TryGet(const TKey& key, TValue* dest) { - // Assign new score. - for (Entry& entry : entries_) { - if (entry.key == key) { - entry.score = next_score_; - IncrementScore(); - if (dest) - *dest = entry.value; - return true; - } - } - - return false; -} - -template -bool LruCache::TryTake(const TKey& key, TValue* dest) { - for (size_t i = 0; i < entries_.size(); ++i) { - if (entries_[i].key == key) { - if (dest) - *dest = entries_[i].value; - entries_.erase(entries_.begin() + i); - return true; - } - } - - return false; -} - -template -void LruCache::Insert(const TKey& key, const TValue& value) { - if ((int)entries_.size() >= max_entries_) - entries_.erase(std::min_element(entries_.begin(), entries_.end())); - - Entry entry; - entry.score = next_score_; - IncrementScore(); - entry.key = key; - entry.value = value; - entries_.push_back(entry); -} - -template -template -void LruCache::IterateValues(TFunc func) { - for (Entry& entry : entries_) { - if (!func(entry.value)) - break; - } -} - -template -void LruCache::IncrementScore() { - // Overflow. - if (++next_score_ == 0) { - std::sort(entries_.begin(), entries_.end()); - for (Entry& entry : entries_) - entry.score = next_score_++; - } -} - -template -void LruCache::Clear(void) { - entries_.clear(); - next_score_ = 0; -} diff --git a/graphics/asymptote/LspCpp/LibLsp/lsp/lsAny.h b/graphics/asymptote/LspCpp/LibLsp/lsp/lsAny.h deleted file mode 100644 index 3335aa86dc..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/lsp/lsAny.h +++ /dev/null @@ -1,159 +0,0 @@ -#pragma once - -#include "LibLsp/JsonRpc/serializer.h" -#include -#include "LibLsp/JsonRpc/message.h" -namespace lsp -{ - struct Any - { - //! Type of JSON value - enum Type { - kUnKnown=-1, - kNullType = 0, //!< null - kFalseType = 1, //!< false - kTrueType = 2, //!< true - kObjectType = 3, //!< object - kArrayType = 4, //!< array - kStringType = 5, //!< string - kNumberType = 6 //!< number - }; - - - - template - bool Get(T& value); - - template - void Set(T& value); - - int GuessType(); - int GetType(); - - void Set(std::unique_ptr value); - - void SetJsonString(std::string&& _data, Type _type); - - void SetJsonString(const std::string& _data, Type _type); - - const std::string& Data()const - { - return data; - } - - void swap(Any& arg) noexcept; - - /* - *Example for GetFromMap - struct A{ - std::string visitor; - bool verbose; - } - REFLECT_MAP_TO_STRUCT(A,visitor,verbose) - - std::string data = "{\"visitor\":\"default\",\"verbose\":\"true\"}; - lsp:Any any; - any.SetJsonString(data, static_cast(-1)); - A a_object; - any.GetFromMap(a_object); - */ - template - bool GetFromMap(T& value); - - - template - bool GetForMapHelper(T& value); - bool GetForMapHelper(std::string& value); - bool GetForMapHelper(boost::optional& value); - private: - std::unique_ptr GetReader(); - std::unique_ptr GetWriter() const; - void SetData(std::unique_ptr&); - - std::string data; - int jsonType = kUnKnown; - - }; - -}; - - -extern void Reflect(Reader& visitor, lsp::Any& value); -extern void Reflect(Writer& visitor, lsp::Any& value); - -template -void ReflectMember(std::map < std::string, lsp::Any>& visitor, const char* name, T& value) { - - auto it = visitor.find(name); - if (it != visitor.end()) - { - it->second.GetForMapHelper(value); - } -} -template -void ReflectMember(std::map < std::string, std::string>& visitor, const char* name, T& value) { - - auto it = visitor.find(name); - if (it != visitor.end()) - { - lsp::Any any; - any.SetJsonString(it->second, static_cast(-1)); - any.Get(value); - } -} - -#define REFLECT_MAP_TO_STRUCT(type, ...) \ - template \ - void ReflectMap(TVisitor& visitor, type& value) { \ - MACRO_MAP(_MAPPABLE_REFLECT_MEMBER, __VA_ARGS__) \ - } - - -namespace lsp -{ - template - bool Any::Get(T& value) - { - const auto visitor = GetReader(); - Reflect(*visitor, value); - return true; - } - - template - void Any::Set(T& value) - { - auto visitor = GetWriter(); - Reflect(*visitor, value); - SetData(visitor); - } - - template - bool Any::GetFromMap(T& value) - { - const auto visitor = GetReader(); - std::map < std::string, lsp::Any> _temp; - Reflect(*visitor, _temp); - ReflectMap(_temp, value); - return true; - } - - template - bool Any::GetForMapHelper(T& value) - { - jsonType = GetType(); - if (jsonType == kStringType) - { - auto copy = data; - copy.erase(copy.find_last_not_of('"') + 1); - copy.erase(0, copy.find_first_not_of('"')); - lsp::Any any; - any.SetJsonString(copy, kUnKnown); - any.Get(value); - } - else - { - Get(value); - } - return true; - } -} diff --git a/graphics/asymptote/LspCpp/LibLsp/lsp/lsCodeAction.h b/graphics/asymptote/LspCpp/LibLsp/lsp/lsCodeAction.h deleted file mode 100644 index 06a14f1540..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/lsp/lsCodeAction.h +++ /dev/null @@ -1,58 +0,0 @@ -#pragma once - -#include "LibLsp/JsonRpc/serializer.h" - - - -#include -#include -#include "lsPosition.h" -#include "lsWorkspaceEdit.h" -#include "lsp_diagnostic.h" -#include "lsCommand.h" - -struct CodeAction -{ - /** - * A short, human-readable, title for this code action. - */ - - std::string title; - - /** - * The kind of the code action. - * - * Used to filter code actions. - */ - boost::optional < std::string> kind; - - /** - * The diagnostics that this code action resolves. - */ - boost::optional < std::vector> diagnostics; - - /** - * The workspace edit this code action performs. - */ - boost::optional < lsWorkspaceEdit >edit; - - /** - * A command this code action executes. If a code action - * provides a edit and a command, first the edit is - * executed and then the command. - */ - boost::optional< lsCommandWithAny > command; - - MAKE_SWAP_METHOD(CodeAction, title, kind, diagnostics, edit, command) -}; -MAKE_REFLECT_STRUCT(CodeAction, title, kind, diagnostics, edit, command) -struct TextDocumentCodeAction - -{ - - typedef std::pair, boost::optional > Either; - -}; - - -extern void Reflect(Reader& visitor, TextDocumentCodeAction::Either& value); \ No newline at end of file diff --git a/graphics/asymptote/LspCpp/LibLsp/lsp/lsCommand.h b/graphics/asymptote/LspCpp/LibLsp/lsp/lsCommand.h deleted file mode 100644 index 94307f1479..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/lsp/lsCommand.h +++ /dev/null @@ -1,44 +0,0 @@ -#pragma once - -#include "LibLsp/JsonRpc/serializer.h" - - - -#include -#include -#include "lsAny.h" -// -//Represents a reference to a command.Provides a title which will be used to represent a command in the UI. -//Commands are identified by a string identifier. -//The recommended way to handle commands is to implement their execution on the server side -//if the clientand server provides the corresponding capabilities.Alternatively the tool -//extension code could handle the command.The protocol currently doesnt specify a set of well - known commands. -template -struct lsCommand { - // Title of the command (ie, 'save') - std::string title; - // Actual command identifier. - std::string command; - // Arguments to run the command with. - // **NOTE** This must be serialized as an array. Use - // MAKE_REFLECT_STRUCT_WRITER_AS_ARRAY. - boost::optional arguments; - - void swap(lsCommand& arg) noexcept - { - title.swap(arg.title); - command.swap(arg.command); - arguments.swap(arg.arguments); - } -}; -template -void Reflect(TVisitor& visitor, lsCommand& value) { - REFLECT_MEMBER_START(); - REFLECT_MEMBER(title); - REFLECT_MEMBER(command); - REFLECT_MEMBER(arguments); - REFLECT_MEMBER_END(); -} - - -using lsCommandWithAny = lsCommand< std::vector>; diff --git a/graphics/asymptote/LspCpp/LibLsp/lsp/lsDocumentUri.h b/graphics/asymptote/LspCpp/LibLsp/lsp/lsDocumentUri.h deleted file mode 100644 index 5d24f59e3a..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/lsp/lsDocumentUri.h +++ /dev/null @@ -1,26 +0,0 @@ -#pragma once -#include "LibLsp/JsonRpc/serializer.h" -#include -struct lsDocumentUri { - static lsDocumentUri FromPath(const AbsolutePath& path); - - lsDocumentUri(); - - lsDocumentUri(const AbsolutePath& path); - lsDocumentUri(const lsDocumentUri& other);; - bool operator==(const lsDocumentUri& other) const; - bool operator==(const std::string& other) const; - void SetPath(const AbsolutePath& path); - std::string GetRawPath() const; - AbsolutePath GetAbsolutePath() const; - - - std::string raw_uri_; - void swap(lsDocumentUri& arg) noexcept - { - raw_uri_.swap(arg.raw_uri_); - } -}; -extern void Reflect(Writer& visitor, lsDocumentUri& value); -extern void Reflect(Reader& visitor, lsDocumentUri& value); -extern std::string make_file_scheme_uri(const std::string& absolute_path); diff --git a/graphics/asymptote/LspCpp/LibLsp/lsp/lsFormattingOptions.h b/graphics/asymptote/LspCpp/LibLsp/lsp/lsFormattingOptions.h deleted file mode 100644 index a92df9b077..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/lsp/lsFormattingOptions.h +++ /dev/null @@ -1,43 +0,0 @@ -#pragma once - -#include "LibLsp/JsonRpc/serializer.h" - -struct lsFormattingOptions { - struct KeyData { - boost::optional _boolean; - boost::optional _integer; - boost::optional _string; - }; - - // Size of a tab in spaces. - int tabSize =4; - // Prefer spaces over tabs. - bool insertSpaces = true; - - /** - * Trim trailing whitespace on a line. - * - * @since 3.15.0 - */ - boost::optional trimTrailingWhitespace; - - /** - * Insert a newline character at the end of the file if one does not exist. - * - * @since 3.15.0 - */ - boost::optional insertFinalNewline; - - /** - * Trim all newlines after the final newline at the end of the file. - * - * @since 3.15.0 - */ - boost::optional trimFinalNewlines; - boost::optional key; - MAKE_SWAP_METHOD(lsFormattingOptions, tabSize, insertSpaces, trimTrailingWhitespace, insertFinalNewline, trimFinalNewlines, key) -}; -MAKE_REFLECT_STRUCT(lsFormattingOptions, tabSize, insertSpaces, trimTrailingWhitespace, insertFinalNewline, trimFinalNewlines, key); - -extern void Reflect(Reader& visitor, lsFormattingOptions::KeyData& value); -extern void Reflect(Writer& visitor, lsFormattingOptions::KeyData& value); \ No newline at end of file diff --git a/graphics/asymptote/LspCpp/LibLsp/lsp/lsMarkedString.h b/graphics/asymptote/LspCpp/LibLsp/lsp/lsMarkedString.h deleted file mode 100644 index 9191aa66d1..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/lsp/lsMarkedString.h +++ /dev/null @@ -1,45 +0,0 @@ -#pragma once - -#include "LibLsp/JsonRpc/serializer.h" - -#include -#include - - -// MarkedString can be used to render human readable text. It is either a -// markdown string or a code-block that provides a language and a code snippet. -// The language identifier is sematically equal to the optional language -// identifier in fenced code blocks in GitHub issues. See -// https://help.github.com/articles/creating-and-highlighting-code-blocks/#syntax-highlighting -// -// The pair of a language and a value is an equivalent to markdown: -// ```${language} -// ${value} -// ``` -// -// Note that markdown strings will be sanitized - that means html will be -// escaped. -struct lsMarkedString { - boost::optional language; - std::string value; -}; - -struct MarkupContent { - /** - * The type of the Markup. - */ - - std::string kind; - - /** - * The content itself. - */ - - std::string value; - - MAKE_SWAP_METHOD(MarkupContent, kind, value); -}; -MAKE_REFLECT_STRUCT(MarkupContent,kind,value); - -void Reflect(Writer& visitor, lsMarkedString& value); -void Reflect(Reader& visitor, lsMarkedString& value); diff --git a/graphics/asymptote/LspCpp/LibLsp/lsp/lsPosition.h b/graphics/asymptote/LspCpp/LibLsp/lsp/lsPosition.h deleted file mode 100644 index 8c2106e16e..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/lsp/lsPosition.h +++ /dev/null @@ -1,40 +0,0 @@ -#pragma once - -#include "LibLsp/JsonRpc/serializer.h" - - - -#include -#include - -//Position in a text document expressed as zero - based line and zero - based character offset. -//A position is between two characters like an insert cursor in a editor.Special values like -//for example - 1 to denote the end of a line are not supported. -struct lsPosition { - lsPosition(); - lsPosition(int line, int character); - - bool operator==(const lsPosition& other) const; - bool operator<(const lsPosition& other) const; - - std::string ToString() const; - - /** - * Line position in a document (zero-based). - */ - // Note: these are 0-based. - unsigned line = 0; - /** - * Character offset on a line in a document (zero-based). Assuming that - * the line is represented as a string, the `character` value represents - * the gap between the `character` and `character + 1`. - * - * If the character value is greater than the line length it defaults back - * to the line length. - */ - unsigned character = 0; - static const lsPosition kZeroPosition; - - MAKE_SWAP_METHOD(lsPosition, line, character) -}; -MAKE_REFLECT_STRUCT(lsPosition, line, character); \ No newline at end of file diff --git a/graphics/asymptote/LspCpp/LibLsp/lsp/lsRange.h b/graphics/asymptote/LspCpp/LibLsp/lsp/lsRange.h deleted file mode 100644 index 6cc01e37a7..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/lsp/lsRange.h +++ /dev/null @@ -1,32 +0,0 @@ -#pragma once - -#include "LibLsp/JsonRpc/serializer.h" - - - -#include -#include -#include "lsPosition.h" -//A range in a text document expressed as(zero - based) startand end positions. -//A range is comparable to a selection in an editor.Therefore the end position is exclusive. -//If you want to specify a range that contains a line including the line ending character(s) -//then use an end position denoting the start of the next line. -struct lsRange { - lsRange(); - lsRange(lsPosition start, lsPosition end); - - bool operator==(const lsRange& other) const; - bool operator<(const lsRange& other) const; - /** - * The range's start position. - */ - lsPosition start; - /** - * The range's end position. - */ - lsPosition end; - std::string ToString()const; - MAKE_SWAP_METHOD(lsRange, start, end) -}; - -MAKE_REFLECT_STRUCT(lsRange, start, end) \ No newline at end of file diff --git a/graphics/asymptote/LspCpp/LibLsp/lsp/lsResponseError.h b/graphics/asymptote/LspCpp/LibLsp/lsp/lsResponseError.h deleted file mode 100644 index 6146d6188f..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/lsp/lsResponseError.h +++ /dev/null @@ -1,117 +0,0 @@ -#pragma once - -#include "LibLsp/JsonRpc/serializer.h" -#include -#include "LibLsp/lsp/lsAny.h" - -enum class lsErrorCodes:int32_t { - // Defined by JSON RPC - ParseError = -32700, - InvalidRequest = -32600, - MethodNotFound = -32601, - InvalidParams = -32602, - InternalError = -32603, - - /** - * This is the start range of JSON RPC reserved error codes. - * It doesn't denote a real error code. No LSP error codes should - * be defined between the start and end range. For backwards - * compatibility the `ServerNotInitialized` and the `UnknownErrorCode` - * are left in the range. - * - * @since 3.16.0 - */ - jsonrpcReservedErrorRangeStart = -32099, - /** @deprecated use jsonrpcReservedErrorRangeStart */ - serverErrorStart = jsonrpcReservedErrorRangeStart, - - /** - * This is the start range of JSON RPC reserved error codes. - * It doesn't denote a real error code. - * - * @since 3.16.0 - */ - jsonrpcReservedErrorRangeEnd = -32000, - /** @deprecated use jsonrpcReservedErrorRangeEnd */ - serverErrorEnd = jsonrpcReservedErrorRangeEnd, - - /** - * Error code indicating that a server received a notification or - * request before the server has received the `initialize` request. - */ - ServerNotInitialized = -32002, - UnknownErrorCode = -32001, - - /** - * This is the start range of LSP reserved error codes. - * It doesn't denote a real error code. - * - * @since 3.16.0 - */ - lspReservedErrorRangeStart= -32899, - - /** - * The server cancelled the request. This error code should - * only be used for requests that explicitly support being - * server cancellable. - * - * @since 3.17.0 - */ - ServerCancelled = -32802, - - /** - * The server detected that the content of a document got - * modified outside normal conditions. A server should - * NOT send this error code if it detects a content change - * in it unprocessed messages. The result even computed - * on an older state might still be useful for the client. - * - * If a client decides that a result is not of any use anymore - * the client should cancel the request. - */ - ContentModified = -32801, - - /** - * The client has canceled a request and a server as detected - * the cancel. - */ - RequestCancelled = -32800, - - /** - * This is the end range of LSP reserved error codes. - * It doesn't denote a real error code. - * - * @since 3.16.0 - */ - lspReservedErrorRangeEnd = -32800, - - - -}; -MAKE_REFLECT_TYPE_PROXY(lsErrorCodes); -struct lsResponseError { - lsResponseError(): code(lsErrorCodes::UnknownErrorCode) - { - } - - /** - * A number indicating the error type that occurred. - */ - lsErrorCodes code; - // Short description. - /** - * A string providing a short description of the error. - */ - std::string message; - - /** - * A primitive or structured value that contains additional - * information about the error. Can be omitted. - */ - boost::optional data; - std::string ToString(); - void Write(Writer& visitor); - - MAKE_SWAP_METHOD(lsResponseError, code, message, data) -}; -MAKE_REFLECT_STRUCT(lsResponseError, code, message, data) \ No newline at end of file diff --git a/graphics/asymptote/LspCpp/LibLsp/lsp/lsTextDocumentEdit.h b/graphics/asymptote/LspCpp/LibLsp/lsp/lsTextDocumentEdit.h deleted file mode 100644 index 0bab8bc3d8..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/lsp/lsTextDocumentEdit.h +++ /dev/null @@ -1,24 +0,0 @@ -#pragma once - -#include "LibLsp/JsonRpc/serializer.h" -#include -#include "LibLsp/JsonRpc/message.h" -#include "lsVersionedTextDocumentIdentifier.h" -#include "lsTextEdit.h" - - -struct lsTextDocumentEdit { - // The text document to change. - lsVersionedTextDocumentIdentifier textDocument; - - /** - * The edits to be applied. - * - * @since 3.16.0 - support for AnnotatedTextEdit. This is guarded by the - * client capability `workspace.workspaceEdit.changeAnnotationSupport` - */ - // The edits to be applied. - std::vector< lsAnnotatedTextEdit > edits; - MAKE_SWAP_METHOD(lsTextDocumentEdit, textDocument, edits); -}; -MAKE_REFLECT_STRUCT(lsTextDocumentEdit, textDocument, edits); \ No newline at end of file diff --git a/graphics/asymptote/LspCpp/LibLsp/lsp/lsTextDocumentIdentifier.h b/graphics/asymptote/LspCpp/LibLsp/lsp/lsTextDocumentIdentifier.h deleted file mode 100644 index bb316eae5a..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/lsp/lsTextDocumentIdentifier.h +++ /dev/null @@ -1,14 +0,0 @@ -#pragma once - -#include "LibLsp/JsonRpc/serializer.h" -#include "lsDocumentUri.h" -//Text documents are identified using a URI.On the protocol level, -//URIs are passed as strings.The corresponding JSON structure looks like this: -struct lsTextDocumentIdentifier { - /** - * The text document's URI. - */ - lsDocumentUri uri; - MAKE_SWAP_METHOD(lsTextDocumentIdentifier, uri) -}; -MAKE_REFLECT_STRUCT(lsTextDocumentIdentifier, uri) \ No newline at end of file diff --git a/graphics/asymptote/LspCpp/LibLsp/lsp/lsTextDocumentItem.h b/graphics/asymptote/LspCpp/LibLsp/lsp/lsTextDocumentItem.h deleted file mode 100644 index 4d9b4ccc9f..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/lsp/lsTextDocumentItem.h +++ /dev/null @@ -1,26 +0,0 @@ -#pragma once - -#include "LibLsp/JsonRpc/serializer.h" -#include -#include -#include "lsDocumentUri.h" - -//An item to transfer a text document from the client to the server. -struct lsTextDocumentItem { - // The text document's URI. - lsDocumentUri uri; - - // The text document's language identifier. - std::string languageId; - - // The version number of this document (it will strictly increase after each - // change, including undo/redo). - int version = 0; - - // The content of the opened text document. - std::string text; - - MAKE_SWAP_METHOD(lsTextDocumentItem, uri, languageId, version, text) -}; - -MAKE_REFLECT_STRUCT(lsTextDocumentItem, uri, languageId, version, text) \ No newline at end of file diff --git a/graphics/asymptote/LspCpp/LibLsp/lsp/lsTextDocumentPositionParams.h b/graphics/asymptote/LspCpp/LibLsp/lsp/lsTextDocumentPositionParams.h deleted file mode 100644 index 52d291351e..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/lsp/lsTextDocumentPositionParams.h +++ /dev/null @@ -1,26 +0,0 @@ -#pragma once - -#include "LibLsp/JsonRpc/message.h" - -#include "lsTextDocumentIdentifier.h" -#include "lsPosition.h" - -/** - * A parameter literal used in requests to pass a text document and a position inside that document. - */ -struct lsTextDocumentPositionParams { - // The text document. - lsTextDocumentIdentifier textDocument; - - // The position inside the text document. - lsPosition position; - - /** - * Legacy property to support protocol version 1.0 requests. - */ - boost::optional uri; - - MAKE_SWAP_METHOD(lsTextDocumentPositionParams, textDocument, position, uri); - -}; -MAKE_REFLECT_STRUCT(lsTextDocumentPositionParams, textDocument, position, uri); diff --git a/graphics/asymptote/LspCpp/LibLsp/lsp/lsTextEdit.h b/graphics/asymptote/LspCpp/LibLsp/lsp/lsTextEdit.h deleted file mode 100644 index 8785e0dcbc..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/lsp/lsTextEdit.h +++ /dev/null @@ -1,87 +0,0 @@ -#pragma once - -#include "LibLsp/JsonRpc/serializer.h" - - - -#include -#include "lsRange.h" - - -//Since 3.16.0 there is also the concept of an annotated text edit which supports to add an annotation to a text edit. -//The annotation can add information describing the change to the text edit. -/** - * Additional information that describes document changes. - * - * @since 3.16.0 - */ -struct lsChangeAnnotation -{ - /** - * A human-readable string describing the actual change. The string - * is rendered prominent in the user interface. - */ - std::string label; - - /** - * A flag which indicates that user confirmation is needed - * before applying the change. - */ - boost::optional needsConfirmation; - - /** - * A human-readable string which is rendered less prominent in - * the user interface. - */ - boost::optional < std::string > description; - MAKE_REFLECT_STRUCT(lsChangeAnnotation, label, needsConfirmation, description) -}; -MAKE_REFLECT_STRUCT(lsChangeAnnotation, label, needsConfirmation, description) - - -//Usually clients provide options to group the changes along the annotations they are associated with. -//To support this in the protocol an edit or resource operation refers to a change annotation -//using an identifier and not the change annotation literal directly.This allows servers to use -//the identical annotation across multiple edits or resource operations which then allows clients -//to group the operations under that change annotation.The actual change annotations together with -//their identifers are managed by the workspace edit via the new property changeAnnotations. - - - -/** - * An identifier referring to a change annotation managed by a workspace - * edit. - * - * @since 3.16.0. - */ -using lsChangeAnnotationIdentifier = std::string; -/** - * A special text edit with an additional change annotation. - * - * @since 3.16.0. - */ - - -//A textual edit applicable to a text document. -struct lsTextEdit { - // The range of the text document to be manipulated. To insert - // text into a document create a range where start === end. - lsRange range; - - // The string to be inserted. For delete operations use an - // empty string. - std::string newText; - - /** - * The actual annotation identifier. - */ - boost::optional annotationId; - - - bool operator==(const lsTextEdit& that); - std::string ToString() const; - MAKE_SWAP_METHOD(lsTextEdit, range, newText, annotationId) -}; -MAKE_REFLECT_STRUCT(lsTextEdit, range, newText, annotationId) - -using lsAnnotatedTextEdit = lsTextEdit; diff --git a/graphics/asymptote/LspCpp/LibLsp/lsp/lsVersionedTextDocumentIdentifier.h b/graphics/asymptote/LspCpp/LibLsp/lsp/lsVersionedTextDocumentIdentifier.h deleted file mode 100644 index 8a858053b1..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/lsp/lsVersionedTextDocumentIdentifier.h +++ /dev/null @@ -1,32 +0,0 @@ -#pragma once - -#include "LibLsp/JsonRpc/serializer.h" - -#include "LibLsp/JsonRpc/message.h" -#include "LibLsp/lsp/lsDocumentUri.h" -#include "LibLsp/lsp/lsTextDocumentIdentifier.h" - -struct lsVersionedTextDocumentIdentifier -{ - lsDocumentUri uri; - // The version number of this document. number | null - boost::optional version; - - lsTextDocumentIdentifier AsTextDocumentIdentifier() const; - - MAKE_SWAP_METHOD(lsVersionedTextDocumentIdentifier, uri, version) -}; -MAKE_REFLECT_STRUCT(lsVersionedTextDocumentIdentifier, uri, version) - -/** - * The version number of this document. If an optional versioned text document - * identifier is sent from the server to the client and the file is not - * open in the editor (the server has not received an open notification - * before) the server can send `null` to indicate that the version is - * known and the content on disk is the master (as specified with document - * content ownership). - * - * The version number of a document will increase after each change, - * including undo/redo. The number doesn't need to be consecutive. - */ -using lsOptionalVersionedTextDocumentIdentifier = lsVersionedTextDocumentIdentifier; \ No newline at end of file diff --git a/graphics/asymptote/LspCpp/LibLsp/lsp/lsWorkspaceEdit.h b/graphics/asymptote/LspCpp/LibLsp/lsp/lsWorkspaceEdit.h deleted file mode 100644 index c7fb73930a..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/lsp/lsWorkspaceEdit.h +++ /dev/null @@ -1,57 +0,0 @@ -#pragma once - -#include "LibLsp/JsonRpc/serializer.h" -#include -#include "lsTextDocumentEdit.h" -#include "LibLsp/lsp/ResourceOperation.h" -#include "lsAny.h" - -//A workspace edit represents changes to many resources managed in the workspace. -//The edit should either provide changes or documentChanges. -//If the client can handle versioned document edits and if documentChanges are present, the latter are preferred over changes. - -//Since version 3.13.0 a workspace edit can contain resource operations(create, delete or rename files and folders) as well. -//If resource operations are present clients need to execute the operations in the order in which they are provided. -//So a workspace edit for example can consist of the following two changes : (1) create file a.txt and (2) a text document edit which insert text into file a. -//txt.An invalid sequence(e.g. (1) delete file a.txt and (2) insert text into file a.txt) will cause failure of the operation. -//How the client recovers from the failure is described by the client capability : workspace.workspaceEdit.failureHandling - - - -struct lsChangeAnnotations -{ - lsChangeAnnotation id; - MAKE_SWAP_METHOD(lsChangeAnnotations, id) -}; -MAKE_REFLECT_STRUCT(lsChangeAnnotations, id) -struct lsWorkspaceEdit { - // Holds changes to existing resources. - // changes ? : { [uri:string]: TextEdit[]; }; - // std::unordered_map> changes; - - // An array of `TextDocumentEdit`s to express changes to specific a specific - // version of a text document. Whether a client supports versioned document - // edits is expressed via `WorkspaceClientCapabilites.versionedWorkspaceEdit`. - // - boost::optional< std::map > > changes; - typedef std::pair < boost::optional, boost::optional > Either; - - boost::optional < std::vector< Either > > documentChanges; - /** - * A map of change annotations that can be referenced in - * `AnnotatedTextEdit`s or create, rename and delete file / folder - * operations. - * - * Whether clients honor this property depends on the client capability - * `workspace.changeAnnotationSupport`. - * - * @since 3.16.0 - */ - boost::optional< lsChangeAnnotations > changeAnnotations; - - MAKE_SWAP_METHOD(lsWorkspaceEdit, changes, documentChanges, changeAnnotations) -}; -MAKE_REFLECT_STRUCT(lsWorkspaceEdit, changes, documentChanges, changeAnnotations) - -extern void Reflect(Reader& visitor, lsWorkspaceEdit::Either& value); - diff --git a/graphics/asymptote/LspCpp/LibLsp/lsp/lsp.cpp b/graphics/asymptote/LspCpp/LibLsp/lsp/lsp.cpp deleted file mode 100644 index 81bf34ba3a..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/lsp/lsp.cpp +++ /dev/null @@ -1,1087 +0,0 @@ - - -#include "lru_cache.h" - - -#include - - -#include -#include -#include "location_type.h" -#include "out_list.h" -#include "lsTextDocumentIdentifier.h" -#include "lsVersionedTextDocumentIdentifier.h" -#include "lsResponseError.h" -#include "lsPosition.h" -#include "lsTextEdit.h" -#include "lsMarkedString.h" -#include "lsWorkspaceEdit.h" -#include "textDocument/code_action.h" -#include "textDocument/document_symbol.h" -#include "extention/jdtls/codeActionResult.h" - -#include "textDocument/selectionRange.h" -#include "AbsolutePath.h" - -#ifdef _WIN32 -#include -#else -#include -#include -#endif - -#include "Directory.h" -#include "lsFormattingOptions.h" -#include "LibLsp/JsonRpc/json.h" -#include "language/language.h" -#include "network/uri/uri_builder.hpp" -#include "lsp_completion.h" -#include "utils.h" -#include "client/registerCapability.h" -#include -#include -#include -// namespace - - - -lsTextDocumentIdentifier -lsVersionedTextDocumentIdentifier::AsTextDocumentIdentifier() const { - lsTextDocumentIdentifier result; - result.uri = uri; - return result; -} - - -lsPosition::lsPosition() {} -lsPosition::lsPosition(int line, int character) - : line(line), character(character) {} - -bool lsPosition::operator==(const lsPosition& other) const { - return line == other.line && character == other.character; -} - -bool lsPosition::operator<(const lsPosition& other) const { - return line != other.line ? line < other.line : character < other.character; -} - -std::string lsPosition::ToString() const { - return std::to_string(line) + ":" + std::to_string(character); -} -const lsPosition lsPosition::kZeroPosition = lsPosition(); - -lsRange::lsRange() {} -lsRange::lsRange(lsPosition start, lsPosition end) : start(start), end(end) {} - -bool lsRange::operator==(const lsRange& o) const { - return start == o.start && end == o.end; -} - -bool lsRange::operator<(const lsRange& o) const { - return !(start == o.start) ? start < o.start : end < o.end; -} - -std::string lsRange::ToString() const -{ - std::stringstream ss; - ss << "start:" << start.ToString() << std::endl; - ss << "end" << end.ToString() << std::endl; - return ss.str(); -} - -lsLocation::lsLocation() {} -lsLocation::lsLocation(lsDocumentUri uri, lsRange range) - : uri(uri), range(range) {} - -bool lsLocation::operator==(const lsLocation& o) const { - return uri == o.uri && range == o.range; -} - -bool lsLocation::operator<(const lsLocation& o) const { - return std::make_tuple(uri.raw_uri_, range) < - std::make_tuple(o.uri.raw_uri_, o.range); -} - -bool lsTextEdit::operator==(const lsTextEdit& that) { - return range == that.range && newText == that.newText; -} - -std::string lsTextEdit::ToString() const -{ - std::stringstream ss; - ss << "Range:" << range.ToString() << std::endl; - ss << "newText:" << newText << std::endl; - return ss.str(); -} - -void Reflect(Writer& visitor, lsMarkedString& value) { - // If there is a language, emit a `{language:string, value:string}` object. If - // not, emit a string. - if (value.language) { - REFLECT_MEMBER_START(); - REFLECT_MEMBER(language); - REFLECT_MEMBER(value); - REFLECT_MEMBER_END(); - } else { - Reflect(visitor, value.value); - } -} - -void Reflect(Reader& visitor, lsMarkedString& value) -{ - REFLECT_MEMBER_START(); - REFLECT_MEMBER(language); - REFLECT_MEMBER(value); - REFLECT_MEMBER_END(); -} - - void Reflect(Reader& visitor, LocationListEither::Either& value) -{ - if(!visitor.IsArray()) - { - throw std::invalid_argument("Rsp_LocationListEither::Either& value is not array"); - } - auto data = ((JsonReader&)visitor).m_->GetArray(); - if (data.Size() && data[0].HasMember("originSelectionRange")) - { - Reflect(visitor, value.second); - } - else { - Reflect(visitor, value.first); - } - -} - - void Reflect(Writer& visitor, LocationListEither::Either& value) -{ - if (value.first) - { - Reflect(visitor, value.first.value()); - } - else if (value.second) - { - Reflect(visitor, value.second.value()); - } -} - - -void Reflect(Reader& visitor, TextDocumentCodeAction::Either& value) -{ - - - if(visitor.HasMember("command")) - { - if(visitor["command"]->IsString()) - { - Reflect(visitor, value.first); - } - else - { - Reflect(visitor, value.second); - } - } - else - { - if (visitor.HasMember("diagnostics") || visitor.HasMember("edit")) - { - Reflect(visitor, value.second); - } - else - { - Reflect(visitor, value.first); - } - } - -} - - -void Reflect(Reader& visitor, lsWorkspaceEdit::Either& value) -{ - - - if(visitor.HasMember("textDocument")) - { - Reflect(visitor, value.first); - } - else - { - Reflect(visitor, value.second); - } -} -ResourceOperation* GetResourceOperation(lsp::Any& lspAny) -{ - rapidjson::Document document; - auto& data = lspAny.Data(); - document.Parse(data.c_str(), data.length()); - if (document.HasParseError()) { - // ��ʾ - return nullptr; - } - auto find = document.FindMember("kind"); - - JsonReader visitor{ &document }; - try - { - if (find->value == "create") - { - auto ptr = std::make_unique(); - auto temp = ptr.get(); - Reflect(visitor, *temp); - return ptr.release(); - } - else if (find->value == "rename") - { - auto ptr = std::make_unique(); - auto temp = ptr.get(); - Reflect(visitor, *temp); - return ptr.release(); - } - else if (find->value == "delete") - { - - auto ptr = std::make_unique(); - auto temp = ptr.get(); - Reflect(visitor, *temp); - return ptr.release(); - } - } - catch (std::exception&) - { - - } - return nullptr; -} - - void Reflect(Writer& visitor, ResourceOperation* value) -{ - - if(!value) - { - throw std::invalid_argument("ResourceOperation value is nullptr"); - } - if (value->kind == "create") - { - auto temp = (lsCreateFile*)value; - Reflect(visitor, *temp); - } - else if (value->kind == "rename") - { - auto temp = (lsRenameFile*)value; - Reflect(visitor, *temp); - } - else if (value->kind == "delete") - { - - auto temp = (lsDeleteFile*)value; - Reflect(visitor, *temp); - } - -} - -int lsp::Any::GuessType() -{ - if (!data.empty()) - { - if (data == "null") - { - jsonType = rapidjson::kNullType; - } - else if (data == "true") - { - jsonType = rapidjson::kTrueType; - } - else if(data == "false") - { - jsonType = rapidjson::kFalseType; - } - else if (data[0] == '{') - { - jsonType = rapidjson::kObjectType; - } - else if (data[0] == '[') - { - if (data.size() >= 2 && data[1] == '{') - jsonType = rapidjson::kStringType; - else - jsonType = rapidjson::kArrayType; - } - else if (data[0] == '"') - { - jsonType = rapidjson::kStringType; - } - else - { - jsonType = rapidjson::kNumberType; - } - } - else - { - if (jsonType != kUnKnown) - return jsonType; - jsonType = rapidjson::kNullType; - } - return jsonType; -} - -int lsp::Any::GetType() -{ - if (jsonType == Type::kUnKnown) - { - if (data.empty()) - { - jsonType = rapidjson::kNullType; - return jsonType; - } - rapidjson::Document document; - document.Parse(data.c_str(), data.length()); - if (document.HasParseError()) - { - // ��ʾ - return jsonType; - } - jsonType = document.GetType(); - } - return jsonType; -} - -void lsp::Any::Set(std::unique_ptr value) -{ - if (value) - { - jsonType = rapidjson::Type::kObjectType; - data = value->ToJson(); - } - else - { - assert(false); - } -} - -void lsp::Any::SetJsonString(std::string&& _data, Type _type) -{ - jsonType = _type; - data.swap(_data); - GetType(); -} - -void lsp::Any::SetJsonString(const std::string& _data, Type _type) -{ - jsonType = _type; - data = (_data); - GetType(); -} - -void lsp::Any::swap(Any& arg) noexcept -{ - data.swap(arg.data); - const int temp = jsonType; - jsonType = arg.jsonType; - arg.jsonType = temp; -} - -class JsonReaderForAny : public JsonReader -{ -public: - JsonReaderForAny() - : JsonReader(&document) - { - } - rapidjson::Document document; -}; - -bool lsp::Any::GetForMapHelper(std::string& value) -{ - return Get(value); -} - -bool lsp::Any::GetForMapHelper(boost::optional& value) -{ - return Get(value); -} - -std::unique_ptr lsp::Any::GetReader() -{ - auto reader = new JsonReaderForAny(); - std::unique_ptr ret(reader); - reader->document.Parse(data.c_str(), data.length()); - if (reader->document.HasParseError()) - { - return {}; - } - if (jsonType == kUnKnown) - { - jsonType = reader->document.GetType(); - } - return (ret); -} - -class JsonWriterForAny : public JsonWriter -{ -public: - rapidjson::StringBuffer output; - rapidjson::Writer writer; - JsonWriterForAny():JsonWriter(&writer), writer(output) - { - - } -}; - -std::unique_ptr lsp::Any::GetWriter() const -{ - return std::make_unique(); -} - -void lsp::Any::SetData(std::unique_ptr& writer) -{ - auto _temp = static_cast(writer.get()); - data = _temp->output.GetString(); - GuessType(); -} - -namespace -{ -#if 0 - rapidjson::Type convert(lsp::Any::Type type) - { - switch (type) - { - case lsp::Any::Type::kNullType: - return rapidjson::Type::kNullType; - case lsp::Any::Type::kFalseType: - return rapidjson::Type::kFalseType; - case lsp::Any::Type::kTrueType: - return rapidjson::Type::kTrueType; - case lsp::Any::Type::kObjectType: - return rapidjson::Type::kObjectType; - case lsp::Any::Type::kArrayType: - return rapidjson::Type::kArrayType; - case lsp::Any::Type::kStringType: - return rapidjson::Type::kStringType; - case lsp::Any::Type::kNumberType: - return rapidjson::Type::kNumberType; - default: - return rapidjson::Type::kNullType; - } - } -#endif - lsp::Any::Type convert(rapidjson::Type type) - { - switch (type) - { - case rapidjson::Type::kNullType: - return lsp::Any::Type::kNullType; - case rapidjson::Type::kFalseType: - return lsp::Any::Type::kFalseType; - case rapidjson::Type::kTrueType: - return lsp::Any::Type::kTrueType; - case rapidjson::Type::kObjectType: - return lsp::Any::Type::kObjectType; - case rapidjson::Type::kArrayType: - return lsp::Any::Type::kArrayType; - case rapidjson::Type::kStringType: - return lsp::Any::Type::kStringType; - case rapidjson::Type::kNumberType: - return lsp::Any::Type::kNumberType; - default: - return lsp::Any::Type::kNullType; - } - } -} - -void Reflect(Reader& visitor, lsp::Any& value) -{ - - //if (visitor.IsNull()) { - // visitor.GetNull(); - // value.SetJsonString("", rapidjson::Type::kNullType); - // return; - //}else - //{ - // - //} - JsonReader& json_reader = reinterpret_cast(visitor); - value.SetJsonString(visitor.ToString(), convert(json_reader.m_->GetType())); -} - void Reflect(Writer& visitor, lsp::Any& value) - { - JsonWriter& json_writer = reinterpret_cast(visitor); - json_writer.m_->RawValue( value.Data().data(),value.Data().size(),static_cast(value.GetType())); - - } - void Reflect(Reader& visitor, lsFormattingOptions::KeyData& value) -{ - if (visitor.IsBool()) - { - Reflect(visitor, value._boolean); - } - else if (visitor.IsInt() || visitor.IsInt64() || visitor.IsUint64()) - { - Reflect(visitor, value._integer); - } - else if(visitor.IsString()) - { - Reflect(visitor, value._string); - } -} - void Reflect(Writer& visitor, lsFormattingOptions::KeyData& value) -{ - if (value._boolean.has_value()) - { - Reflect(visitor, value._boolean); - } - else if (value._integer.has_value()) - { - Reflect(visitor, value._integer); - } - else if (value._string.has_value()) - { - Reflect(visitor, value._string); - } -} - -lsCreateFile::lsCreateFile() -{ - kind = "create"; -} - -lsDeleteFile::lsDeleteFile() -{ - kind = "delete"; -} - -lsRenameFile::lsRenameFile() -{ - kind = "rename"; -} - - -void Reflect(Reader& visitor, boost::optional< SelectionRange* >& value) -{ - if (visitor.IsNull()) { - visitor.GetNull(); - return; - } - - SelectionRange* entry_value = nullptr; - - - std::unique_ptr ptr = std::make_unique(); - SelectionRange* temp = ptr.get(); - Reflect(visitor, *temp); - - entry_value = ptr.release(); - value = (entry_value); - -} -void Reflect(Writer& visitor, SelectionRange* value) -{ - - if (!value) - { - throw std::invalid_argument("ResourceOperation value is nullptr"); - } - - Reflect(visitor, *value); - - -} - - std::string make_file_scheme_uri(const std::string& absolute_path) -{ - network::uri_builder builder; - builder.scheme("file"); - builder.host(""); - builder.path(absolute_path); - return builder.uri().string(); - //// lsDocumentUri uri; - //// uri.SetPath(absolute_path); - /// return uri.raw_uri_; -} - -// static -AbsolutePath AbsolutePath::BuildDoNotUse(const std::string& path) { - AbsolutePath p; - p.path = std::string(path); - return p; -} - - -AbsolutePath::AbsolutePath() {} - - - -AbsolutePath::operator std::string() const { - return path; -} - -bool AbsolutePath::operator==(const AbsolutePath& rhs) const { - return path == rhs.path; -} - -bool AbsolutePath::operator!=(const AbsolutePath& rhs) const { - return path != rhs.path; -} - -bool AbsolutePath::operator<(const AbsolutePath& rhs) const -{ - return path < rhs.path; -} - -bool AbsolutePath::operator>(const AbsolutePath& rhs) const -{ - return path > rhs.path; -} - -void Reflect(Reader& visitor, AbsolutePath& value) { - value.path = visitor.GetString(); -} -void Reflect(Writer& visitor, AbsolutePath& value) { - visitor.String(value.path.c_str(), value.path.length()); -} - -std::ostream& operator<<(std::ostream& out, const AbsolutePath& path) { - out << path.path; - return out; -} - -lsDocumentUri lsDocumentUri::FromPath(const AbsolutePath& path) { - lsDocumentUri result; - result.SetPath(path); - return result; -} -//void lsDocumentUri::SetPath(const AbsolutePath& path) -//{ -// raw_uri_ = make_file_scheme_uri(path.path); -//} -// -void lsDocumentUri::SetPath(const AbsolutePath& path) { - // file:///c%3A/Users/jacob/Desktop/superindex/indexer/full_tests - raw_uri_ = path; - - size_t index = raw_uri_.find(":"); - if (index == 1) { // widows drive letters must always be 1 char - raw_uri_.replace(raw_uri_.begin() + index, raw_uri_.begin() + index + 1, - "%3A"); - } - - // subset of reserved characters from the URI standard - // http://www.ecma-international.org/ecma-262/6.0/#sec-uri-syntax-and-semantics - std::string t; - t.reserve(8 + raw_uri_.size()); - - // TODO: proper fix -#if defined(_WIN32) - t += "file:///"; -#else - t += "file://"; -#endif - - // clang-format off - for (char c : raw_uri_) - switch (c) { - case ' ': t += "%20"; break; - case '#': t += "%23"; break; - case '$': t += "%24"; break; - case '&': t += "%26"; break; - case '(': t += "%28"; break; - case ')': t += "%29"; break; - case '+': t += "%2B"; break; - case ',': t += "%2C"; break; - case ';': t += "%3B"; break; - case '?': t += "%3F"; break; - case '@': t += "%40"; break; - default: t += c; break; - } - // clang-format on - raw_uri_ = std::move(t); -} - -std::string lsDocumentUri::GetRawPath() const { - - - if (raw_uri_.compare(0, 8, "file:///")) - return raw_uri_; - - - std::string ret; -#if defined(_WIN32) - size_t i = 8; -#else - size_t i = 7; -#endif - auto from_hex = [](unsigned char c) { - return c - '0' < 10 ? c - '0' : (c | 32) - 'a' + 10; - }; - for (; i < raw_uri_.size(); i++) { - if (i + 3 <= raw_uri_.size() && raw_uri_[i] == '%') { - ret.push_back(from_hex(raw_uri_[i + 1]) * 16 + from_hex(raw_uri_[i + 2])); - i += 2; - } - else - ret.push_back(raw_uri_[i] == '\\' ? '/' : raw_uri_[i]); - } - return ret; -} - -lsDocumentUri::lsDocumentUri() {} - - -lsDocumentUri::lsDocumentUri(const AbsolutePath& path) -{ - SetPath(path); -} - -lsDocumentUri::lsDocumentUri(const lsDocumentUri& other): raw_uri_(other.raw_uri_) -{ -} - -bool lsDocumentUri::operator==(const lsDocumentUri& other) const { - return raw_uri_ == other.raw_uri_; -} - -bool lsDocumentUri::operator==(const std::string& other) const -{ - return raw_uri_ == other; -} - - -AbsolutePath lsDocumentUri::GetAbsolutePath() const { - - - if (raw_uri_.find("file://") != std::string::npos){ - try - { - return lsp::NormalizePath(GetRawPath(), false /*ensure_exists*/, false); - } - catch (std::exception&) - { - return AbsolutePath("", false); - } - } - - return AbsolutePath(raw_uri_,false); - -} - -AbsolutePath::AbsolutePath(const std::string& path, bool validate) - : path(path) { - // TODO: enable validation after fixing tests. - if (validate && !lsp::IsAbsolutePath(path)) { - qualify = false; - auto temp = lsp::NormalizePath(path,false); - if(!temp.path.empty()) - { - this->path = temp.path; - } - } -} - -void Reflect(Writer& visitor, lsDocumentUri& value) { - Reflect(visitor, value.raw_uri_); -} -void Reflect(Reader& visitor, lsDocumentUri& value) { - Reflect(visitor, value.raw_uri_); - // Only record the path when we deserialize a URI, since it most likely came - // from the client. - -} - - std::string ProgressReport::ToString() const -{ - std::string info; - info += "id:" + id + "\n"; - info += "task:" + task + "\n"; - info += "subTask:" + subTask + "\n"; - info += "status:" + status + "\n"; - { - std::stringstream ss; - ss << "totalWork:" << totalWork << std::endl; - info += ss.str(); - } - { - std::stringstream ss; - ss << "workDone:" << workDone << std::endl; - info += ss.str(); - } - - { - std::stringstream ss; - ss << "complete:" << complete << std::endl; - info += ss.str(); - } - - return info; -} - -std::string EventNotification::ToString() const -{ - std::string info; - if (ClasspathUpdated == eventType) - { - info += "eventType:ClasspathUpdated\n"; - } - else if (ProjectsImported == eventType) - { - info += "eventType:ProjectsImported\n"; - } - else - { - std::ostringstream oss; - oss << std::hex << eventType << std::endl; - - info += "eventType:"; - info += oss.str(); - } - info += "data:" + data.Data() + "\n"; - return info; -} - -std::string lsp::ToString(lsCompletionItemKind _kind) -{ - switch (_kind) { - case lsCompletionItemKind::Text: - return "Text"; - case lsCompletionItemKind::Method: - return "Method"; - case lsCompletionItemKind::Function: - return ""; - case lsCompletionItemKind::Constructor: - return "Function"; - case lsCompletionItemKind::Field: - return "Field"; - case lsCompletionItemKind::Variable: - return ""; - case lsCompletionItemKind::Class: - return "Variable"; - case lsCompletionItemKind::Interface: - return "Interface"; - case lsCompletionItemKind::Module: - return "Module"; - case lsCompletionItemKind::Property: - return "Property"; - case lsCompletionItemKind::Unit: - return "Unit"; - case lsCompletionItemKind::Value: - return "Value"; - case lsCompletionItemKind::Enum: - return "Enum"; - case lsCompletionItemKind::Keyword: - return "Keyword"; - case lsCompletionItemKind::Snippet: - return "Snippet"; - case lsCompletionItemKind::Color: - return "Color"; - case lsCompletionItemKind::File: - return "File"; - case lsCompletionItemKind::Reference: - return "Reference"; - case lsCompletionItemKind::Folder: - return "Folder"; - case lsCompletionItemKind::EnumMember: - return "EnumMember"; - case lsCompletionItemKind::Constant: - return "Constant"; - case lsCompletionItemKind::Struct: - return "Struct"; - case lsCompletionItemKind::Event: - return "Event"; - case lsCompletionItemKind::Operator: - return "Operator"; - case lsCompletionItemKind::TypeParameter: - return "TypeParameter"; - default: - return "Unknown"; - } -} - -std::string lsp::ToString(lsInsertTextFormat _kind) -{ - if (_kind == lsInsertTextFormat::PlainText) - { - return "PlainText"; - } - else if (_kind == lsInsertTextFormat::Snippet) - { - return "Snippet"; - }else - { - return "Unknown"; - } -} - -const std::string& lsCompletionItem::InsertedContent() const -{ - if (textEdit) - return textEdit->newText; - if (insertText.has_value() && !insertText->empty()) - return insertText.value(); - return label; -} - -std::string lsCompletionItem::DisplayText() -{ - - if (detail) - { - - return label + " in " + detail.value(); - } - return label; -} - -std::string lsCompletionItem::ToString() - { - std::stringstream info; - info << "label : " << label << std::endl; - if(kind) - info << "kind : " << lsp::ToString(kind.value()) << std::endl; - else - info << "kind : no exist." << std::endl; - - if (detail) - info << "detail : " << detail.value() << std::endl; - else - info << "detail : no exist." << std::endl; - - if (documentation) - { - info << "documentation : " << std::endl; - if(documentation.value().first) - { - info << documentation.value().first.value(); - } - else if(documentation.value().second) - { - info << documentation.value().second.value().value; - } - } - else - info << "documentation : no exist." << std::endl; - - if (deprecated) - info << "deprecated : " << deprecated.value() << std::endl; - else - info << "deprecated : no exist." << std::endl; - - if (preselect) - info << "preselect : " << preselect.value() << std::endl; - else - info << "preselect : no exist." << std::endl; - - if (sortText) - info << "sortText : " << sortText.value() << std::endl; - else - info << "sortText : no exist." << std::endl; - - if (filterText) - info << "filterText : " << filterText.value() << std::endl; - else - info << "filterText : no exist." << std::endl; - - - if (insertText) - info << "insertText : " << insertText.value() << std::endl; - else - info << "insertText : no exist." << std::endl; - - - if (insertTextFormat) - info << "insertText : " << lsp::ToString(insertTextFormat.value()) << std::endl; - else - info << "insertTextFormat : no exist." << std::endl; - - if (textEdit) - info << "textEdit : " << textEdit.value().ToString() << std::endl; - else - info << "textEdit : no exist." << std::endl; - - - - return info.str(); - - } -namespace JDT -{ - namespace CodeActionKind { - - - /** - * Base kind for quickfix actions: 'quickfix' - */ - const char* QuickFix = "quickfix"; - - /** - * Base kind for refactoring actions: 'refactor' - */ - const char* Refactor = "refactor"; - - /** - * Base kind for refactoring extraction actions: 'refactor.extract' - * - * Example extract actions: - * - * - Extract method - Extract function - Extract variable - Extract interface - * from class - ... - */ - const char* RefactorExtract = "refactor.extract"; - - /** - * Base kind for refactoring inline actions: 'refactor.inline' - * - * Example inline actions: - * - * - Inline function - Inline variable - Inline constant - ... - */ - const char* RefactorInline = "refactor.inline"; - - /** - * Base kind for refactoring rewrite actions: 'refactor.rewrite' - * - * Example rewrite actions: - * - * - Convert JavaScript function to class - Add or remove parameter - - * Encapsulate field - Make method static - Move method to base class - ... - */ - const char* RefactorRewrite = "refactor.rewrite"; - - /** - * Base kind for source actions: `source` - * - * Source code actions apply to the entire file. - */ - const char* Source = "source"; - - /** - * Base kind for an organize imports source action: `source.organizeImports` - */ - const char* SourceOrganizeImports = "source.organizeImports"; - - const char* COMMAND_ID_APPLY_EDIT = "java.apply.workspaceEdit"; - - }; - - -} -Directory::Directory(const AbsolutePath& path) : path(path.path) { - lsp::EnsureEndsInSlash(this->path); -} - -bool Directory::operator==(const Directory& rhs) const { - return path == rhs.path; -} - -bool Directory::operator!=(const Directory& rhs) const { - return path != rhs.path; -} - - - - Registration Registration::Create(const std::string& method) -{ - Registration reg; - reg.method = method; - const boost::uuids::uuid a_uuid = boost::uuids::random_generator()(); - reg.id = to_string(a_uuid); - return reg; -} diff --git a/graphics/asymptote/LspCpp/LibLsp/lsp/lsp_code_action.h b/graphics/asymptote/LspCpp/LibLsp/lsp/lsp_code_action.h deleted file mode 100644 index 37acc6ca61..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/lsp/lsp_code_action.h +++ /dev/null @@ -1,64 +0,0 @@ -#pragma once - - -#include "location_type.h" -#include "lsDocumentUri.h" -#include "lsTextEdit.h" -#include "lsPosition.h" - -// codeAction -struct CommandArgs { - lsDocumentUri textDocumentUri; - std::vector edits; -}; -MAKE_REFLECT_STRUCT_WRITER_AS_ARRAY(CommandArgs, textDocumentUri, edits); -inline void Reflect(Reader& visitor, CommandArgs& value) { - int i = 0; - visitor.IterArray([&](Reader& visitor) { - switch (i++) { - case 0: - Reflect(visitor, value.textDocumentUri); - break; - case 1: - Reflect(visitor, value.edits); - break; - - } - }); -} - -// codeLens -struct lsCodeLensUserData {}; -MAKE_REFLECT_EMPTY_STRUCT(lsCodeLensUserData); - -struct lsCodeLensCommandArguments { - lsDocumentUri uri; - lsPosition position; - std::vector locations; -}; - -// FIXME Don't use array in vscode-cquery -inline void Reflect(Writer& visitor, lsCodeLensCommandArguments& value) { - visitor.StartArray(3); - Reflect(visitor, value.uri); - Reflect(visitor, value.position); - Reflect(visitor, value.locations); - visitor.EndArray(); -} - -inline void Reflect(Reader& visitor, lsCodeLensCommandArguments& value) { - int i = 0; - visitor.IterArray([&](Reader& visitor) { - switch (i++) { - case 0: - Reflect(visitor, value.uri); - break; - case 1: - Reflect(visitor, value.position); - break; - case 2: - Reflect(visitor, value.locations); - break; - } - }); -} diff --git a/graphics/asymptote/LspCpp/LibLsp/lsp/lsp_completion.h b/graphics/asymptote/LspCpp/LibLsp/lsp/lsp_completion.h deleted file mode 100644 index 250699a44a..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/lsp/lsp_completion.h +++ /dev/null @@ -1,224 +0,0 @@ -#pragma once -#include "lsTextEdit.h" -#include "lsMarkedString.h" -#include "lsCommand.h" - - -// The kind of a completion entry. -enum class lsCompletionItemKind { - Text = 1, - Method = 2, - Function = 3, - Constructor = 4, - Field = 5, - Variable = 6, - Class = 7, - Interface = 8, - Module = 9, - Property = 10, - Unit = 11, - Value = 12, - Enum = 13, - Keyword = 14, - Snippet = 15, - Color = 16, - File = 17, - Reference = 18, - Folder = 19, - EnumMember = 20, - Constant = 21, - Struct = 22, - Event = 23, - Operator = 24, - TypeParameter = 25, -}; -MAKE_REFLECT_TYPE_PROXY(lsCompletionItemKind); - - - -// Defines whether the insert text in a completion item should be interpreted as -// plain text or a snippet. -enum class lsInsertTextFormat { - // The primary text to be inserted is treated as a plain string. - PlainText = 1, - - // The primary text to be inserted is treated as a snippet. - // - // A snippet can define tab stops and placeholders with `$1`, `$2` - // and `${3:foo}`. `$0` defines the final tab stop, it defaults to - // the end of the snippet. Placeholders with equal identifiers are linked, - // that is typing in one will update others too. - // - // See also: - // https://github.com/Microsoft/vscode/blob/master/src/vs/editor/contrib/snippet/common/snippet.md - Snippet = 2 -}; -MAKE_REFLECT_TYPE_PROXY(lsInsertTextFormat); - -namespace lsp -{ - std::string ToString(lsCompletionItemKind); - std::string ToString(lsInsertTextFormat); -} -/** - * The Completion request is sent from the client to the server to compute completion items at a given cursor position. - * Completion items are presented in the IntelliSense user class. If computing complete completion items is expensive - * servers can additional provide a handler for the resolve completion item request. This request is send when a - * completion item is selected in the user class. - */ -struct lsCompletionItem { - - // The label of this completion item. By default - // also the text that is inserted when selecting - // this completion. - std::string label; - - // The kind of this completion item. Based of the kind - // an icon is chosen by the editor. - boost::optional kind ; - - // A human-readable string with additional information - // about this item, like type or symbol information. - boost::optional < std::string > detail; - - // A human-readable string that represents a doc-comment. - boost::optional< std::pair , boost::optional > > documentation; - - - /** - * Indicates if this item is deprecated. - */ - boost::optional< bool >deprecated; - - - /** - * Select this item when showing. - * - * *Note* that only one completion item can be selected and that the - * tool / client decides which item that is. The rule is that the *first - * item of those that match best is selected. - */ - boost::optional< bool > preselect; - - - // Internal information to order candidates. - int relevance = 0; - - // A string that shoud be used when comparing this item - // with other items. When `falsy` the label is used. - boost::optional< std::string > sortText; - - // A string that should be used when filtering a set of - // completion items. When `falsy` the label is used. - boost::optional filterText; - - // A string that should be inserted a document when selecting - // this completion. When `falsy` the label is used. - boost::optional insertText; - - // The format of the insert text. The format applies to both the `insertText` - // property and the `newText` property of a provided `textEdit`. - boost::optional< lsInsertTextFormat> insertTextFormat ; - - // An edit which is applied to a document when selecting this completion. When - // an edit is provided the value of `insertText` is ignored. - // - // *Note:* The range of the edit must be a single line range and it must - // contain the position at which completion has been requested. - boost::optional textEdit; - - // An boost::optional array of additional text edits that are applied when - // selecting this completion. Edits must not overlap with the main edit - // nor with themselves. - // std::vector additionalTextEdits; - - // An boost::optional command that is executed *after* inserting this completion. - // *Note* that additional modifications to the current document should be - // described with the additionalTextEdits-property. Command command; - - // An data entry field that is preserved on a completion item between - // a completion and a completion resolve request. - // data ? : any - - // Use this helper to figure out what content the completion item will insert - // into the document, as it could live in either |textEdit|, |insertText|, or - // |label|. - const std::string& InsertedContent() const; - - std::string DisplayText(); - /** - * An boost::optional array of additional text edits that are applied when - * selecting this completion. Edits must not overlap (including the same insert position) - * with the main edit nor with themselves. - * - * Additional text edits should be used to change text unrelated to the current cursor position - * (for example adding an import statement at the top of the file if the completion item will - * insert an unqualified type). - */ - boost::optional >additionalTextEdits; - - /** -* An boost::optional set of characters that when pressed while this completion is active will accept it first and -* then type that character. *Note* that all commit characters should have `length=1` and that superfluous -* characters will be ignored. -*/ - boost::optional< std::vector > commitCharacters; - - /** -* An boost::optional command that is executed *after* inserting this completion. *Note* that -* additional modifications to the current document should be described with the -* additionalTextEdits-property. -*/ - boost::optional command; - - /** -* An data entry field that is preserved on a completion item between a completion and a completion resolve request. -*/ - boost::optional data; - std::string ToString(); - MAKE_SWAP_METHOD(lsCompletionItem, - label, - kind, - detail, - documentation, - sortText, - insertText, - filterText, - insertTextFormat, - textEdit, - deprecated, preselect, additionalTextEdits, commitCharacters, - command, data); - -}; - - - -MAKE_REFLECT_STRUCT(lsCompletionItem, - label, - kind, - detail, - documentation, - sortText, - insertText, - filterText, - insertTextFormat, - textEdit, - deprecated, preselect, additionalTextEdits, commitCharacters, - command, data); - - - -struct CompletionList { - // This list it not complete. Further typing should result in recomputing - // this list. - bool isIncomplete = false; - // The completion items. - std::vector items; - - void swap(CompletionList& arg) noexcept - { - items.swap(arg.items); - std::swap(isIncomplete, arg.isIncomplete); - } -}; -MAKE_REFLECT_STRUCT(CompletionList, isIncomplete, items); \ No newline at end of file diff --git a/graphics/asymptote/LspCpp/LibLsp/lsp/lsp_diagnostic.cpp b/graphics/asymptote/LspCpp/LibLsp/lsp/lsp_diagnostic.cpp deleted file mode 100644 index c323706dc0..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/lsp/lsp_diagnostic.cpp +++ /dev/null @@ -1,74 +0,0 @@ -#include "lsp_diagnostic.h" -bool lsDiagnostic::operator==(const lsDiagnostic& rhs) const { - // Just check the important fields. - return range == rhs.range && message == rhs.message; -} -bool lsDiagnostic::operator!=(const lsDiagnostic& rhs) const { - return !(*this == rhs); -} - -std::string lsResponseError::ToString() -{ - std::string info = "code:"; - switch (code) - { - case lsErrorCodes::ParseError: - info += "ParseError\n"; - break; - case lsErrorCodes::InvalidRequest: - info += "InvalidRequest\n"; - break; - case lsErrorCodes::MethodNotFound: - info += "MethodNotFound\n"; - break; - case lsErrorCodes::InvalidParams: - info += "InvalidParams\n"; - break; - case lsErrorCodes::InternalError: - info += "InternalError\n"; - break; - case lsErrorCodes::serverErrorStart: - info += "serverErrorStart\n"; - break; - case lsErrorCodes::serverErrorEnd: - info += "serverErrorEnd\n"; - break; - case lsErrorCodes::ServerNotInitialized: - info += "ServerNotInitialized\n"; - break; - case lsErrorCodes::UnknownErrorCode: - info += "UnknownErrorCode\n"; - break; - // Defined by the protocol. - case lsErrorCodes::RequestCancelled: - info += "RequestCancelled\n"; - break; - default: - { - std::stringstream ss; - ss << "unknown code:" << (int32_t)code << std::endl; - info += ss.str(); - } - break; - } - info += "message:" + message; - info += "\n"; - - if(data.has_value()) - { - - info += "data:" + data.value().Data(); - info += "\n"; - } - return info; -} - -void lsResponseError::Write(Writer& visitor) { - auto& value = *this; - int code2 = static_cast(this->code); - - visitor.StartObject(); - REFLECT_MEMBER2("code", code2); - REFLECT_MEMBER(message); - visitor.EndObject(); -} diff --git a/graphics/asymptote/LspCpp/LibLsp/lsp/lsp_diagnostic.h b/graphics/asymptote/LspCpp/LibLsp/lsp/lsp_diagnostic.h deleted file mode 100644 index d1b1d1ba78..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/lsp/lsp_diagnostic.h +++ /dev/null @@ -1,151 +0,0 @@ -#pragma once -#include "lsRange.h" -#include "lsTextEdit.h" -#include "lsDocumentUri.h" - -#include "lsResponseError.h" -#include "location_type.h" - -#include "LibLsp/JsonRpc/RequestInMessage.h" -#include "LibLsp/JsonRpc/lsResponseMessage.h" - -enum class lsDiagnosticSeverity { - // Reports an error. - Error = 1, - // Reports a warning. - Warning = 2, - // Reports an information. - Information = 3, - // Reports a hint. - Hint = 4 -}; -MAKE_REFLECT_TYPE_PROXY(lsDiagnosticSeverity); - -/** - * The diagnostic tags. - * - * @since 3.15.0 - */ -enum class DiagnosticTag :uint8_t { - - /** - * Unused or unnecessary code. - * - * Clients are allowed to render diagnostics with this tag faded out instead of having - * an error squiggle. - */ - Unnecessary=(1), - - /** - * Deprecated or obsolete code. - * - * Clients are allowed to rendered diagnostics with this tag strike through. - */ - Deprecated=(2), -}; -MAKE_REFLECT_TYPE_PROXY(DiagnosticTag); - - - -/** - * Represents a related message and source code location for a diagnostic. This should be - * used to point to code locations that cause or related to a diagnostics, e.g when duplicating - * a symbol in a scope. - * - * Since 3.7.0 - */ - -struct DiagnosticRelatedInformation { - /** - * The location of this related diagnostic information. - */ - - lsLocation location; - - /** - * The message of this related diagnostic information. - */ - - std::string message; - - MAKE_SWAP_METHOD(DiagnosticRelatedInformation, location, message) -}; -MAKE_REFLECT_STRUCT(DiagnosticRelatedInformation, location, message) -/** - * Structure to capture a description for an error code. - * - * @since 3.16.0 - */ -struct DiagnosticCodeDescription { - /** - * An URI to open with more information about the diagnostic error. - */ - std::string href; - MAKE_SWAP_METHOD(DiagnosticCodeDescription, href) -}; -MAKE_REFLECT_STRUCT(DiagnosticCodeDescription, href) - -//Represents a diagnostic, such as a compiler error or warning.Diagnostic objects are only valid in the scope of a resource. -struct lsDiagnostic { - // The range at which the message applies. - lsRange range; - - // The diagnostic's severity. Can be omitted. If omitted it is up to the - // client to interpret diagnostics as error, warning, info or hint. - boost::optional severity; - - // The diagnostic's code. Can be omitted. - boost::optional< std::pair, boost::optional> > code; - - boost::optional codeDescription; - // A human-readable string describing the source of this - // diagnostic, e.g. 'typescript' or 'super lint'. - boost::optional < std::string >source ; - - // The diagnostic's message. - std::string message; - - // Non-serialized set of fixits. - std::vector fixits_; - - /** - * Additional metadata about the diagnostic. - * - * @since 3.15.0 - */ - boost::optional> tags; - - - /** - * An array of related diagnostic information, e.g. when symbol-names within a scope collide - * all definitions can be marked via this property. - * - * Since 3.7.0 - */ - boost::optional> relatedInformation; - - /** - * A data entry field that is preserved between a - * `textDocument/publishDiagnostics` notification and - * `textDocument/codeAction` request. - * - * @since 3.16.0 - */ - boost::optional data; - bool operator==(const lsDiagnostic& rhs) const; - bool operator!=(const lsDiagnostic& rhs) const; - - MAKE_SWAP_METHOD(lsDiagnostic, range, severity, code, codeDescription, source, message, tags, data) -}; -MAKE_REFLECT_STRUCT(lsDiagnostic, range, severity, code, codeDescription, source, message, tags, data) - - - -struct Rsp_Error : ResponseError { - - MAKE_SWAP_METHOD(Rsp_Error, jsonrpc, id, error) -}; -MAKE_REFLECT_STRUCT(Rsp_Error, jsonrpc, id, error) - - - diff --git a/graphics/asymptote/LspCpp/LibLsp/lsp/method_type.h b/graphics/asymptote/LspCpp/LibLsp/lsp/method_type.h deleted file mode 100644 index dcbb4a851a..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/lsp/method_type.h +++ /dev/null @@ -1,7 +0,0 @@ -#pragma once -#include - -using MethodType = const char* const; - - - diff --git a/graphics/asymptote/LspCpp/LibLsp/lsp/out_list.h b/graphics/asymptote/LspCpp/LibLsp/lsp/out_list.h deleted file mode 100644 index 36c4aa78ba..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/lsp/out_list.h +++ /dev/null @@ -1,22 +0,0 @@ -#pragma once - - -#include "location_type.h" - - -#include "LibLsp/JsonRpc/RequestInMessage.h" -#include "LibLsp/JsonRpc/lsResponseMessage.h" - - - -//DEFINE_RESPONCE_TYPE(Rsp_FindLinkLocationList, std::vector); -//DEFINE_RESPONCE_TYPE(Rsp_LocationList, std::vector); - - -namespace LocationListEither{ - - typedef std::pair< boost::optional> , boost::optional > > Either; - -}; -extern void Reflect(Reader& visitor, LocationListEither::Either& value); -//DEFINE_RESPONCE_TYPE(Rsp_LocationListEither, LocationListEither::Either); diff --git a/graphics/asymptote/LspCpp/LibLsp/lsp/symbol.h b/graphics/asymptote/LspCpp/LibLsp/lsp/symbol.h deleted file mode 100644 index 57298b8d7f..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/lsp/symbol.h +++ /dev/null @@ -1,164 +0,0 @@ -#pragma once -#include "LibLsp/lsp/location_type.h" - - -enum class lsSymbolKind : uint8_t { - Unknown = 0, - - File = 1, - Module = 2, - Namespace = 3, - Package = 4, - Class = 5, - Method = 6, - Property = 7, - Field = 8, - Constructor = 9, - Enum = 10, - Interface = 11, - Function = 12, - Variable = 13, - Constant = 14, - String = 15, - Number = 16, - Boolean = 17, - Array = 18, - Object = 19, - Key = 20, - Null = 21, - EnumMember = 22, - Struct = 23, - Event = 24, - Operator = 25, - - // For C++, this is interpreted as "template parameter" (including - // non-type template parameters). - TypeParameter = 26, - - // cquery extensions - // See also https://github.com/Microsoft/language-server-protocol/issues/344 - // for new SymbolKind clang/Index/IndexSymbol.h clang::index::SymbolKind - TypeAlias = 252, - Parameter = 253, - StaticMethod = 254, - Macro = 255, -}; -MAKE_REFLECT_TYPE_PROXY(lsSymbolKind); - -typedef lsSymbolKind SymbolKind; - -// A document highlight kind. -enum class lsDocumentHighlightKind { - // A textual occurrence. - Text = 1, - // Read-access of a symbol, like reading a variable. - Read = 2, - // Write-access of a symbol, like writing to a variable. - Write = 3 -}; -MAKE_REFLECT_TYPE_PROXY(lsDocumentHighlightKind); - -// A document highlight is a range inside a text document which deserves -// special attention. Usually a document highlight is visualized by changing -// the background color of its range. -struct lsDocumentHighlight { - // The range this highlight applies to. - lsRange range; - - // The highlight kind, default is DocumentHighlightKind.Text. - boost::optional kind ; - - MAKE_SWAP_METHOD(lsDocumentHighlight, range, kind) -}; -MAKE_REFLECT_STRUCT(lsDocumentHighlight, range, kind); - -struct lsSymbolInformation { - -/** - * The name of this symbol. - */ - std::string name; - /** - * The kind of this symbol. - */ - lsSymbolKind kind; - /** -* Indicates if this symbol is deprecated. -*/ - boost::optional deprecated; - /** - * The location of this symbol. The location's range is used by a tool - * to reveal the location in the editor. If the symbol is selected in the - * tool the range's start information is used to position the cursor. So - * the range usually spans more then the actual symbol's name and does - * normally include things like visibility modifiers. - * - * The range doesn't have to denote a node range in the sense of a abstract - * syntax tree. It can therefore not be used to re-construct a hierarchy of - * the symbols. - */ - lsLocation location; - /** - * The name of the symbol containing this symbol. This information is for - * user interface purposes (e.g. to render a qualifier in the user interface - * if necessary). It can't be used to re-infer a hierarchy for the document - * symbols. - */ - boost::optional containerName; - - - MAKE_SWAP_METHOD(lsSymbolInformation, name, kind, deprecated, location, containerName); -}; -MAKE_REFLECT_STRUCT(lsSymbolInformation, name, kind, deprecated, location, containerName); - - -struct lsDocumentSymbol { - /** - * The name of this symbol. - */ - - std::string name; - - /** - * The kind of this symbol. - */ - - lsSymbolKind kind = lsSymbolKind::Unknown; - - /** - * The range enclosing this symbol not including leading/trailing whitespace but everything else - * like comments. This information is typically used to determine if the clients cursor is - * inside the symbol to reveal in the symbol in the UI. - */ - - lsRange range; - - /** - * The range that should be selected and revealed when this symbol is being picked, e.g the name of a function. - * Must be contained by the `range`. - */ - - lsRange selectionRange; - - /** - * More detail for this symbol, e.g the signature of a function. If not provided the - * name is used. - */ - boost::optional< std::string > detail; - - /** - * Indicates if this symbol is deprecated. - */ - boost::optional< bool > deprecated; - - /** - * Children of this symbol, e.g. properties of a class. - */ - boost::optional < std::vector > children; - - //internal use - int flags=0; - - MAKE_SWAP_METHOD(lsDocumentSymbol, name, kind, range, selectionRange, detail, deprecated, children, flags); -}; -MAKE_REFLECT_STRUCT(lsDocumentSymbol, name, kind, range, selectionRange, detail, deprecated, children, flags); \ No newline at end of file diff --git a/graphics/asymptote/LspCpp/LibLsp/lsp/textDocument/SemanticTokens.h b/graphics/asymptote/LspCpp/LibLsp/lsp/textDocument/SemanticTokens.h deleted file mode 100644 index 612d186f6f..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/lsp/textDocument/SemanticTokens.h +++ /dev/null @@ -1,267 +0,0 @@ -#pragma once - -#include "LibLsp/lsp/lsTextDocumentIdentifier.h" -#include "LibLsp/lsp/lsVersionedTextDocumentIdentifier.h" -#include "LibLsp/JsonRpc/RequestInMessage.h" -enum class HighlightingKind_clangD { - Variable = 0, - LocalVariable, - Parameter, - Function, - Method, - StaticMethod, - Field, - StaticField, - Class, - Interface, - Enum, - EnumConstant, - Typedef, - Type, - Unknown, - Namespace, - TemplateParameter, - Concept, - Primitive, - Macro, - - // This one is different from the other kinds as it's a line style - // rather than a token style. - InactiveCode, - - LastKind = InactiveCode -}; -std::string toSemanticTokenType(HighlightingKind_clangD kind); - -enum class HighlightingModifier_clangD { - Declaration, - Deprecated, - Deduced, - Readonly, - Static, - Abstract, - DependentName, - DefaultLibrary, - - FunctionScope, - ClassScope, - FileScope, - GlobalScope, - - LastModifier = GlobalScope -}; -std::string toSemanticTokenModifier(HighlightingModifier_clangD modifier); - -enum SemanticTokenType { - ls_namespace=0,// 'namespace', - /** - * Represents a generic type. Acts as a fallback for types which - * can't be mapped to a specific type like class or enum. - */ - ls_type,// 'type', - ls_class,// 'class', - ls_enum,// 'enum', - ls_interface,// 'interface', - ls_struct,// 'struct', - ls_typeParameter,// 'typeParameter', - ls_parameter,// 'parameter', - ls_variable,// 'variable', - ls_property,// 'property', - ls_enumMember,// 'enumMember', - ls_event,// 'event', - ls_function,// 'function', - ls_method,// 'method', - ls_macro,// 'macro', - ls_keyword,// 'keyword', - ls_modifier,// 'modifier', - ls_comment,// 'comment', - ls_string,// 'string', - ls_number,// 'number', - ls_regexp,// 'regexp', - ls_operator,// 'operator' - lastKind = ls_operator -}; -std::string to_string(SemanticTokenType); -unsigned toSemanticTokenType(std::vector& modifiers); - -enum TokenType_JDT { - PACKAGE_JDT=0, - CLASS_JDT, - INTERFACE_JDT, - ENUM_JDT, - ENUM_MEMBER_JDT, - TYPE_JDT, - TYPE_PARAMETER_JDT, - ANNOTATION_JDT, - ANNOTATION_MEMBER_JDT, - METHOD_JDT, - PROPERTY_JDT, - VARIABLE_JDT, - PARAMETER_JDT -}; -std::string to_string(TokenType_JDT); - -enum SemanticTokenModifier { - ls_declaration=0,// 'declaration', - ls_definition,// 'definition', - ls_readonly,// 'readonly', - ls_static,// 'static', - ls_deprecated,// 'deprecated', - ls_abstract,// 'abstract', - ls_async,// 'async', - ls_modification,// 'modification', - ls_documentation,// 'documentation', - ls_defaultLibrary,// 'defaultLibrary' - LastModifier = ls_defaultLibrary -}; -std::string to_string(SemanticTokenModifier); -unsigned toSemanticTokenModifiers(std::vector&); -/// Specifies a single semantic token in the document. -/// This struct is not part of LSP, which just encodes lists of tokens as -/// arrays of numbers directly. -struct SemanticToken { - /// token line number, relative to the previous token - unsigned deltaLine = 0; - /// token start character, relative to the previous token - /// (relative to 0 or the previous token's start if they are on the same line) - unsigned deltaStart = 0; - /// the length of the token. A token cannot be multiline - unsigned length = 0; - /// will be looked up in `SemanticTokensLegend.tokenTypes` - unsigned tokenType = 0; - /// each set bit will be looked up in `SemanticTokensLegend.tokenModifiers` - unsigned tokenModifiers = 0; -}; -bool operator==(const SemanticToken&, const SemanticToken&); -struct SemanticTokens{ - - /** - * Tokens in a file are represented as an array of integers. The position of each token is expressed relative to - * the token before it, because most tokens remain stable relative to each other when edits are made in a file. - * - * --- - * In short, each token takes 5 integers to represent, so a specific token `i` in the file consists of the following array indices: - * - at index `5*i` - `deltaLine`: token line number, relative to the previous token - * - at index `5*i+1` - `deltaStart`: token start character, relative to the previous token (relative to 0 or the previous token's start if they are on the same line) - * - at index `5*i+2` - `length`: the length of the token. A token cannot be multiline. - * - at index `5*i+3` - `tokenType`: will be looked up in `SemanticTokensLegend.tokenTypes`. We currently ask that `tokenType` < 65536. - * - at index `5*i+4` - `tokenModifiers`: each set bit will be looked up in `SemanticTokensLegend.tokenModifiers` - * - * --- - * ### How to encode tokens - * - * Here is an example for encoding a file with 3 tokens in a uint32 array: - * ``` - * { line: 2, startChar: 5, length: 3, tokenType: "property", tokenModifiers: ["private", "static"] }, - * { line: 2, startChar: 10, length: 4, tokenType: "type", tokenModifiers: [] }, - * { line: 5, startChar: 2, length: 7, tokenType: "class", tokenModifiers: [] } - * ``` - * - * 1. First of all, a legend must be devised. This legend must be provided up-front and capture all possible token types. - * For this example, we will choose the following legend which must be passed in when registering the provider: - * ``` - * tokenTypes: ['property', 'type', 'class'], - * tokenModifiers: ['private', 'static'] - * ``` - * - * 2. The first transformation step is to encode `tokenType` and `tokenModifiers` as integers using the legend. Token types are looked - * up by index, so a `tokenType` value of `1` means `tokenTypes[1]`. Multiple token modifiers can be set by using bit flags, - * so a `tokenModifier` value of `3` is first viewed as binary `0b00000011`, which means `[tokenModifiers[0], tokenModifiers[1]]` because - * bits 0 and 1 are set. Using this legend, the tokens now are: - * ``` - * { line: 2, startChar: 5, length: 3, tokenType: 0, tokenModifiers: 3 }, - * { line: 2, startChar: 10, length: 4, tokenType: 1, tokenModifiers: 0 }, - * { line: 5, startChar: 2, length: 7, tokenType: 2, tokenModifiers: 0 } - * ``` - * - * 3. The next step is to represent each token relative to the previous token in the file. In this case, the second token - * is on the same line as the first token, so the `startChar` of the second token is made relative to the `startChar` - * of the first token, so it will be `10 - 5`. The third token is on a different line than the second token, so the - * `startChar` of the third token will not be altered: - * ``` - * { deltaLine: 2, deltaStartChar: 5, length: 3, tokenType: 0, tokenModifiers: 3 }, - * { deltaLine: 0, deltaStartChar: 5, length: 4, tokenType: 1, tokenModifiers: 0 }, - * { deltaLine: 3, deltaStartChar: 2, length: 7, tokenType: 2, tokenModifiers: 0 } - * ``` - * - * 4. Finally, the last step is to inline each of the 5 fields for a token in a single array, which is a memory friendly representation: - * ``` - * // 1st token, 2nd token, 3rd token - * [ 2,5,3,0,3, 0,5,4,1,0, 3,2,7,2,0 ] - * ``` - */ - std::vector data; - static std::vector encodeTokens(std::vector& tokens); - - /** - * An optional result id. If provided and clients support delta updating - * the client will include the result id in the next semantic token request. - * A server can then instead of computing all semantic tokens again simply - * send a delta. - */ - boost::optional resultId; - MAKE_SWAP_METHOD(SemanticTokens, data, resultId) -}; -MAKE_REFLECT_STRUCT(SemanticTokens, data, resultId) - -/// Body of textDocument/semanticTokens/full request. -struct SemanticTokensParams { - /// The text document. - lsTextDocumentIdentifier textDocument; - MAKE_REFLECT_STRUCT(SemanticTokensParams, textDocument) -}; -MAKE_REFLECT_STRUCT(SemanticTokensParams, textDocument) - - -/// Body of textDocument/semanticTokens/full/delta request. -/// Requests the changes in semantic tokens since a previous response. -struct SemanticTokensDeltaParams { - /// The text document. - lsTextDocumentIdentifier textDocument; - /** - * The result id of a previous response. The result Id can either point to - * a full response or a delta response depending on what was received last. - */ - std::string previousResultId; - - MAKE_REFLECT_STRUCT(SemanticTokensDeltaParams, textDocument, previousResultId) -}; -MAKE_REFLECT_STRUCT(SemanticTokensDeltaParams, textDocument, previousResultId) - -/// Describes a a replacement of a contiguous range of semanticTokens. -struct SemanticTokensEdit { - // LSP specifies `start` and `deleteCount` which are relative to the array - // encoding of the previous tokens. - // We use token counts instead, and translate when serializing this struct. - unsigned startToken = 0; - unsigned deleteTokens = 0; - std::vector tokens; // encoded as a flat integer array - - MAKE_REFLECT_STRUCT(SemanticTokensEdit, startToken, deleteTokens, tokens) -}; -MAKE_REFLECT_STRUCT(SemanticTokensEdit, startToken, deleteTokens, tokens) - - -/// This models LSP SemanticTokensDelta | SemanticTokens, which is the result of -/// textDocument/semanticTokens/full/delta. -struct SemanticTokensOrDelta { - boost::optional resultId; - /// Set if we computed edits relative to a previous set of tokens. - boost::optional< std::vector > edits; - /// Set if we computed a fresh set of tokens. - /// Set if we computed edits relative to a previous set of tokens. - boost::optional> tokens; // encoded as integer array - MAKE_REFLECT_STRUCT(SemanticTokensOrDelta, resultId, edits, tokens) -}; -MAKE_REFLECT_STRUCT(SemanticTokensOrDelta, resultId, edits, tokens) - - -struct SemanticTokensLegend { - std::vector tokenTypes; - std::vector tokenModifiers; - MAKE_REFLECT_STRUCT(SemanticTokensLegend, tokenTypes, tokenModifiers) -}; -MAKE_REFLECT_STRUCT(SemanticTokensLegend, tokenTypes, tokenModifiers) - -DEFINE_REQUEST_RESPONSE_TYPE(td_semanticTokens_full, SemanticTokensParams,boost::optional,"textDocument/semanticTokens/full") -DEFINE_REQUEST_RESPONSE_TYPE(td_semanticTokens_full_delta, SemanticTokensDeltaParams, boost::optional, "textDocument/semanticTokens/full/delta") \ No newline at end of file diff --git a/graphics/asymptote/LspCpp/LibLsp/lsp/textDocument/callHierarchy.h b/graphics/asymptote/LspCpp/LibLsp/lsp/textDocument/callHierarchy.h deleted file mode 100644 index a005c182e1..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/lsp/textDocument/callHierarchy.h +++ /dev/null @@ -1,121 +0,0 @@ -#pragma once - -#include "LibLsp/lsp/lsAny.h" -#include "LibLsp/JsonRpc/RequestInMessage.h" -#include "LibLsp/JsonRpc/lsResponseMessage.h" -#include "LibLsp/lsp/symbol.h" -#include "LibLsp/lsp/lsTextDocumentPositionParams.h" -#include "LibLsp/lsp/lsRange.h" - -enum class SymbolTag { Deprecated = 1 }; -MAKE_REFLECT_TYPE_PROXY(SymbolTag) - -struct CallHierarchyPrepareParams -{ - lsTextDocumentIdentifier textDocument; - lsPosition position; - - MAKE_SWAP_METHOD(CallHierarchyPrepareParams, - textDocument, - position) -}; -MAKE_REFLECT_STRUCT(CallHierarchyPrepareParams, - textDocument, - position) - - - - /// Represents programming constructs like functions or constructors - /// in the context of call hierarchy. -struct CallHierarchyItem { - /// The name of this item. - std::string name; - - /// The kind of this item. - SymbolKind kind; - - /// Tags for this item. - boost::optional> tags; - - /// More detaill for this item, e.g. the signature of a function. - boost::optional detail; - - /// The resource identifier of this item. - lsDocumentUri uri; - - /** - * The range enclosing this symbol not including leading/trailing whitespace - * but everything else, e.g. comments and code. - */ - lsRange range; - - /** - * The range that should be selected and revealed when this symbol is being - * picked, e.g. the name of a function. Must be contained by the - * [`range`](#CallHierarchyItem.range). - */ - lsRange selectionRange; - - /** - * A data entry field that is preserved between a call hierarchy prepare and - * incoming calls or outgoing calls requests. - */ - boost::optional data; - MAKE_SWAP_METHOD(CallHierarchyItem, name, kind, tags, detail, uri, range, selectionRange, data) -}; -MAKE_REFLECT_STRUCT(CallHierarchyItem, name, kind, tags, detail, uri, range, selectionRange, data) - - - -/// The parameter of a `callHierarchy/incomingCalls` request. -struct CallHierarchyIncomingCallsParams { - CallHierarchyItem item; - MAKE_SWAP_METHOD(CallHierarchyIncomingCallsParams,item) -}; -MAKE_REFLECT_STRUCT(CallHierarchyIncomingCallsParams, item) - - -/// Represents an incoming call, e.g. a caller of a method or constructor. -struct CallHierarchyIncomingCall { - /// The item that makes the call. - CallHierarchyItem from; - - /// The range at which the calls appear. - /// This is relative to the caller denoted by `From`. - std::vector fromRanges; - MAKE_SWAP_METHOD(CallHierarchyIncomingCall, from, fromRanges) -}; -MAKE_REFLECT_STRUCT(CallHierarchyIncomingCall, from, fromRanges) - - - - -/// The parameter of a `callHierarchy/outgoingCalls` request. -struct CallHierarchyOutgoingCallsParams { - CallHierarchyItem item; - MAKE_SWAP_METHOD(CallHierarchyOutgoingCallsParams, item) -}; -MAKE_REFLECT_STRUCT(CallHierarchyOutgoingCallsParams, item) - -/// Represents an outgoing call, e.g. calling a getter from a method or -/// a method from a constructor etc. -struct CallHierarchyOutgoingCall { - /// The item that is called. - CallHierarchyItem to; - - /// The range at which this item is called. - /// This is the range relative to the caller, and not `To`. - std::vector fromRanges; - MAKE_SWAP_METHOD(CallHierarchyOutgoingCall, to, fromRanges) -}; -MAKE_REFLECT_STRUCT(CallHierarchyOutgoingCall, to, fromRanges) - - -DEFINE_REQUEST_RESPONSE_TYPE(td_prepareCallHierarchy, CallHierarchyPrepareParams, - boost::optional>, "textDocument/prepareCallHierarchy") - -DEFINE_REQUEST_RESPONSE_TYPE(td_incomingCalls, CallHierarchyIncomingCallsParams, - boost::optional>, "callHierarchy/incomingCalls") - -DEFINE_REQUEST_RESPONSE_TYPE(td_outgoingCalls, CallHierarchyOutgoingCallsParams, - boost::optional>, "callHierarchy/CallHierarchyOutgoingCall") \ No newline at end of file diff --git a/graphics/asymptote/LspCpp/LibLsp/lsp/textDocument/code_action.h b/graphics/asymptote/LspCpp/LibLsp/lsp/textDocument/code_action.h deleted file mode 100644 index 419fdfbc9b..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/lsp/textDocument/code_action.h +++ /dev/null @@ -1,37 +0,0 @@ -#pragma once -#include "LibLsp/lsp/method_type.h" -#include "LibLsp/JsonRpc/RequestInMessage.h" -#include "LibLsp/JsonRpc/lsResponseMessage.h" -#include "LibLsp/lsp/lsTextDocumentIdentifier.h" -#include "LibLsp/lsp/CodeActionParams.h" - -namespace QuickAssistProcessor { - - extern const char* SPLIT_JOIN_VARIABLE_DECLARATION_ID;//$NON-NLS-1$ - extern const char* CONVERT_FOR_LOOP_ID;// ;// "org.eclipse.jdt.ls.correction.convertForLoop.assist"; //$NON-NLS-1$ - extern const char* ASSIGN_TO_LOCAL_ID ;// "org.eclipse.jdt.ls.correction.assignToLocal.assist"; //$NON-NLS-1$ - extern const char* ASSIGN_TO_FIELD_ID ;// "org.eclipse.jdt.ls.correction.assignToField.assist"; //$NON-NLS-1$ - extern const char* ASSIGN_PARAM_TO_FIELD_ID ;// "org.eclipse.jdt.ls.correction.assignParamToField.assist"; //$NON-NLS-1$ - extern const char* ASSIGN_ALL_PARAMS_TO_NEW_FIELDS_ID ;// "org.eclipse.jdt.ls.correction.assignAllParamsToNewFields.assist"; //$NON-NLS-1$ - extern const char* ADD_BLOCK_ID ;// "org.eclipse.jdt.ls.correction.addBlock.assist"; //$NON-NLS-1$ - extern const char* EXTRACT_LOCAL_ID ;// "org.eclipse.jdt.ls.correction.extractLocal.assist"; //$NON-NLS-1$ - extern const char* EXTRACT_LOCAL_NOT_REPLACE_ID ;// "org.eclipse.jdt.ls.correction.extractLocalNotReplaceOccurrences.assist"; //$NON-NLS-1$ - extern const char* EXTRACT_CONSTANT_ID ;// "org.eclipse.jdt.ls.correction.extractConstant.assist"; //$NON-NLS-1$ - extern const char* INLINE_LOCAL_ID ;// "org.eclipse.jdt.ls.correction.inlineLocal.assist"; //$NON-NLS-1$ - extern const char* CONVERT_LOCAL_TO_FIELD_ID ;// "org.eclipse.jdt.ls.correction.convertLocalToField.assist"; //$NON-NLS-1$ - extern const char* CONVERT_ANONYMOUS_TO_LOCAL_ID ;// "org.eclipse.jdt.ls.correction.convertAnonymousToLocal.assist"; //$NON-NLS-1$ - extern const char* CONVERT_TO_STRING_BUFFER_ID ;// "org.eclipse.jdt.ls.correction.convertToStringBuffer.assist"; //$NON-NLS-1$ - extern const char* CONVERT_TO_MESSAGE_FORMAT_ID ;// "org.eclipse.jdt.ls.correction.convertToMessageFormat.assist"; //$NON-NLS-1$; - extern const char* EXTRACT_METHOD_INPLACE_ID ;// "org.eclipse.jdt.ls.correction.extractMethodInplace.assist"; //$NON-NLS-1$; - - extern const char* CONVERT_ANONYMOUS_CLASS_TO_NESTED_COMMAND ;// "convertAnonymousClassToNestedCommand"; -}; -/** - * The code action request is sent from the client to the server to compute - * commands for a given text document and range. These commands are - * typically code fixes to either fix problems or to beautify/refactor code. - * - * Registration Options: TextDocumentRegistrationOptions - */ - -DEFINE_REQUEST_RESPONSE_TYPE(td_codeAction, lsCodeActionParams, std::vector, "textDocument/codeAction"); diff --git a/graphics/asymptote/LspCpp/LibLsp/lsp/textDocument/code_lens.h b/graphics/asymptote/LspCpp/LibLsp/lsp/textDocument/code_lens.h deleted file mode 100644 index 7fd5ae0cf9..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/lsp/textDocument/code_lens.h +++ /dev/null @@ -1,42 +0,0 @@ -#pragma once - -#include "LibLsp/JsonRpc/RequestInMessage.h" -#include "LibLsp/JsonRpc/lsResponseMessage.h" - -struct lsDocumentCodeLensParams { - -/** - * The document to request code lens for. - */ - lsTextDocumentIdentifier textDocument; - - MAKE_SWAP_METHOD(lsDocumentCodeLensParams, textDocument); -}; -MAKE_REFLECT_STRUCT(lsDocumentCodeLensParams, textDocument); - - - - -struct lsCodeLens { - // The range in which this code lens is valid. Should only span a single line. - lsRange range; - // The command this code lens represents. - boost::optional command; - // A data entry field that is preserved on a code lens item between - // a code lens and a code lens resolve request. - boost::optional< lsp::Any> data; - - MAKE_SWAP_METHOD(lsCodeLens, range, command, data) -}; -MAKE_REFLECT_STRUCT(lsCodeLens, range, command, data) - - - -/** - * The code lens request is sent from the client to the server to compute - * code lenses for a given text document. - * - * Registration Options: CodeLensRegistrationOptions - */ -DEFINE_REQUEST_RESPONSE_TYPE(td_codeLens, lsDocumentCodeLensParams, std::vector, "textDocument/codeLens") - diff --git a/graphics/asymptote/LspCpp/LibLsp/lsp/textDocument/colorPresentation.h b/graphics/asymptote/LspCpp/LibLsp/lsp/textDocument/colorPresentation.h deleted file mode 100644 index 22574e3e19..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/lsp/textDocument/colorPresentation.h +++ /dev/null @@ -1,63 +0,0 @@ -#pragma once - - -#include "LibLsp/JsonRpc/RequestInMessage.h" -#include "LibLsp/JsonRpc/lsResponseMessage.h" - -#include "LibLsp/lsp/lsTextDocumentIdentifier.h" -#include "LibLsp/lsp/lsRange.h" -#include "documentColor.h" -#include "LibLsp/lsp/lsTextEdit.h" - - -struct ColorPresentationParams { - - /** - * The text document. - */ - lsTextDocumentIdentifier textDocument; - - /** - * The range in the document where this color appers. - */ - - lsRange range; - - /** - * The actual color value for this color range. - */ - - TextDocument::Color color; - MAKE_SWAP_METHOD(ColorPresentationParams, textDocument, range, color) -}; -MAKE_REFLECT_STRUCT(ColorPresentationParams, textDocument, range, color) - - -struct ColorPresentation { - /** - * The label of this color presentation. It will be shown on the color - * picker header. By default this is also the text that is inserted when selecting - * this color presentation. - */ - - std::string label; - - /** - * An edit which is applied to a document when selecting - * this presentation for the color. When `null` the label is used. - */ - lsTextEdit textEdit; - - /** - * An optional array of additional text edits that are applied when - * selecting this color presentation. Edits must not overlap with the main edit nor with themselves. - */ - std::vector additionalTextEdits; - MAKE_SWAP_METHOD(ColorPresentation, label, textEdit, additionalTextEdits) -}; -MAKE_REFLECT_STRUCT(ColorPresentation, label, textEdit, additionalTextEdits) - - - -DEFINE_REQUEST_RESPONSE_TYPE(td_colorPresentation, - ColorPresentationParams, std::vector, "textDocument/colorPresentation") \ No newline at end of file diff --git a/graphics/asymptote/LspCpp/LibLsp/lsp/textDocument/completion.h b/graphics/asymptote/LspCpp/LibLsp/lsp/textDocument/completion.h deleted file mode 100644 index 883c5cfe3a..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/lsp/textDocument/completion.h +++ /dev/null @@ -1,82 +0,0 @@ -#pragma once - - -#include "LibLsp/JsonRpc/RequestInMessage.h" -#include "LibLsp/JsonRpc/lsResponseMessage.h" - -#include -#include "LibLsp/lsp/lsp_completion.h" -#include "LibLsp/lsp/lsTextDocumentPositionParams.h" - - -// How a completion was triggered -enum class lsCompletionTriggerKind { - // Completion was triggered by typing an identifier (24x7 code - // complete), manual invocation (e.g Ctrl+Space) or via API. - Invoked = 1, - - // Completion was triggered by a trigger character specified by - // the `triggerCharacters` properties of the `CompletionRegistrationOptions`. - TriggerCharacter = 2 -}; -MAKE_REFLECT_TYPE_PROXY(lsCompletionTriggerKind); - - -// Contains additional information about the context in which a completion -// request is triggered. -struct lsCompletionContext { - // How the completion was triggered. - lsCompletionTriggerKind triggerKind = lsCompletionTriggerKind::Invoked; - - // The trigger character (a single character) that has trigger code complete. - // Is undefined if `triggerKind !== CompletionTriggerKind.TriggerCharacter` - boost::optional triggerCharacter; - - MAKE_SWAP_METHOD(lsCompletionContext, triggerKind, triggerCharacter); -}; -MAKE_REFLECT_STRUCT(lsCompletionContext, triggerKind, triggerCharacter); - -struct lsCompletionParams : lsTextDocumentPositionParams { - // The completion context. This is only available it the client specifies to - // send this using - // `ClientCapabilities.textDocument.completion.contextSupport === true` - boost::optional context; - - MAKE_SWAP_METHOD(lsCompletionParams, textDocument, position, context); - -}; -MAKE_REFLECT_STRUCT(lsCompletionParams, textDocument, position, context); - - - - - - - - - -namespace TextDocumentComplete{ - - typedef std::pair< boost::optional>, boost::optional > Either; - -}; -extern void Reflect(Reader& visitor, TextDocumentComplete::Either& value); - -/** - * The Completion request is sent from the client to the server to compute - * completion items at a given cursor position. Completion items are - * presented in the IntelliSense user interface. If computing complete - * completion items is expensive servers can additional provide a handler - * for the resolve completion item request. This request is sent when a - * completion item is selected in the user interface. - * - * Registration Options: CompletionRegistrationOptions - */ -DEFINE_REQUEST_RESPONSE_TYPE(td_completion, lsCompletionParams, CompletionList , "textDocument/completion") - - - - - - - diff --git a/graphics/asymptote/LspCpp/LibLsp/lsp/textDocument/declaration_definition.h b/graphics/asymptote/LspCpp/LibLsp/lsp/textDocument/declaration_definition.h deleted file mode 100644 index aa20fce046..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/lsp/textDocument/declaration_definition.h +++ /dev/null @@ -1,29 +0,0 @@ -#pragma once - - -#include "LibLsp/JsonRpc/RequestInMessage.h" -#include "LibLsp/JsonRpc/lsResponseMessage.h" - -#include "LibLsp/lsp/lsTextDocumentPositionParams.h" -#include "LibLsp/lsp/out_list.h" - - -/** - * The go to declaration request is sent from the client to the server to resolve - * the declaration location of a symbol at a given text document position. - * - * Registration Options: TextDocumentRegistrationOptions - * - * Since version 3.14.0 - */ -DEFINE_REQUEST_RESPONSE_TYPE(td_declaration, lsTextDocumentPositionParams, LocationListEither::Either, "textDocument/declaration"); - -/** - * The goto definition request is sent from the client to the server to resolve - * the definition location of a symbol at a given text document position. - * - * Registration Options: TextDocumentRegistrationOptions - */ -DEFINE_REQUEST_RESPONSE_TYPE(td_definition, lsTextDocumentPositionParams, LocationListEither::Either, "textDocument/definition"); - - diff --git a/graphics/asymptote/LspCpp/LibLsp/lsp/textDocument/didRenameFiles.h b/graphics/asymptote/LspCpp/LibLsp/lsp/textDocument/didRenameFiles.h deleted file mode 100644 index e8a6235a00..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/lsp/textDocument/didRenameFiles.h +++ /dev/null @@ -1,44 +0,0 @@ -#pragma once - -#include "LibLsp/JsonRpc/RequestInMessage.h" -#include "LibLsp/JsonRpc/lsResponseMessage.h" -#include -#include "LibLsp/lsp/CodeActionParams.h" -#include "LibLsp/lsp/lsWorkspaceEdit.h" - - -class FileRenameEvent { -public: - std::string oldUri; - std::string newUri; - - FileRenameEvent() { - } - - FileRenameEvent(std::string oldUri, std::string newUri) { - this->oldUri = oldUri; - this->newUri = newUri; - } - MAKE_SWAP_METHOD(FileRenameEvent, oldUri, newUri); -}; -MAKE_REFLECT_STRUCT(FileRenameEvent, oldUri, newUri); - -class FileRenameParams { -public: - std::vector files; - - FileRenameParams() { - } - - FileRenameParams(std::vector& files) { - this->files = files; - } - MAKE_SWAP_METHOD(FileRenameParams, files); -}; -MAKE_REFLECT_STRUCT(FileRenameParams, files); - - -DEFINE_REQUEST_RESPONSE_TYPE(td_didRenameFiles, FileRenameParams, boost::optional, "java/didRenameFiles"); - - -DEFINE_REQUEST_RESPONSE_TYPE(td_willRenameFiles, FileRenameParams, boost::optional, "java/willRenameFiles"); diff --git a/graphics/asymptote/LspCpp/LibLsp/lsp/textDocument/did_change.h b/graphics/asymptote/LspCpp/LibLsp/lsp/textDocument/did_change.h deleted file mode 100644 index 0887bf6602..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/lsp/textDocument/did_change.h +++ /dev/null @@ -1,51 +0,0 @@ -#pragma once - - -#include "LibLsp/JsonRpc/NotificationInMessage.h" -#include "LibLsp/JsonRpc/lsResponseMessage.h" - -#include "LibLsp/lsp/lsVersionedTextDocumentIdentifier.h" -#include "LibLsp/lsp/lsRange.h" -#include "LibLsp/lsp/lsDocumentUri.h" -struct lsTextDocumentContentChangeEvent { - // The range of the document that changed. - boost::optional range; - // The length of the range that got replaced. - boost::optional rangeLength; - // The new text of the range/document. - std::string text; - - MAKE_SWAP_METHOD(lsTextDocumentContentChangeEvent, range, rangeLength, text); -}; -MAKE_REFLECT_STRUCT(lsTextDocumentContentChangeEvent, range, rangeLength, text); - - -struct lsTextDocumentDidChangeParams { - lsVersionedTextDocumentIdentifier textDocument; - std::vector contentChanges; - - /** - * Legacy property to support protocol version 1.0 requests. - */ - - boost::optional uri; - - void swap(lsTextDocumentDidChangeParams& arg) noexcept - { - uri.swap(arg.uri); - contentChanges.swap(arg.contentChanges); - textDocument.swap(arg.textDocument); - } -}; -MAKE_REFLECT_STRUCT(lsTextDocumentDidChangeParams, - textDocument, - contentChanges, uri); - -/** - * The document change notification is sent from the client to the server to - * signal changes to a text document. - * - * Registration Options: TextDocumentChangeRegistrationOptions - */ -DEFINE_NOTIFICATION_TYPE(Notify_TextDocumentDidChange, lsTextDocumentDidChangeParams, "textDocument/didChange"); - diff --git a/graphics/asymptote/LspCpp/LibLsp/lsp/textDocument/did_close.h b/graphics/asymptote/LspCpp/LibLsp/lsp/textDocument/did_close.h deleted file mode 100644 index e2eaa2cfcd..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/lsp/textDocument/did_close.h +++ /dev/null @@ -1,33 +0,0 @@ -#pragma once - - - -#include "LibLsp/JsonRpc/NotificationInMessage.h" - - - - -namespace TextDocumentDidClose { - - struct Params { - lsTextDocumentIdentifier textDocument; - void swap(Params& arg) noexcept - { - textDocument.swap(arg.textDocument); - } - - }; - -}; - -MAKE_REFLECT_STRUCT(TextDocumentDidClose::Params, textDocument); - -/** - * The document close notification is sent from the client to the server - * when the document got closed in the client. The document's truth now - * exists where the document's uri points to (e.g. if the document's uri is - * a file uri the truth now exists on disk). - * - * Registration Options: TextDocumentRegistrationOptions - */ -DEFINE_NOTIFICATION_TYPE(Notify_TextDocumentDidClose, TextDocumentDidClose::Params, "textDocument/didClose"); diff --git a/graphics/asymptote/LspCpp/LibLsp/lsp/textDocument/did_open.h b/graphics/asymptote/LspCpp/LibLsp/lsp/textDocument/did_open.h deleted file mode 100644 index 7be7a735d6..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/lsp/textDocument/did_open.h +++ /dev/null @@ -1,39 +0,0 @@ -#pragma once - - -#include "LibLsp/JsonRpc/NotificationInMessage.h" - -#include "LibLsp/lsp/lsTextDocumentItem.h" - -// Open, view, change, close file -namespace TextDocumentDidOpen { - - struct Params { - lsTextDocumentItem textDocument; - - - - /** - * Legacy property to support protocol version 1.0 requests. - */ - boost::optional text; - - MAKE_SWAP_METHOD(TextDocumentDidOpen::Params, textDocument, text); - - }; - -} -MAKE_REFLECT_STRUCT(TextDocumentDidOpen::Params, textDocument, text); - -/** - * The document open notification is sent from the client to the server to - * signal newly opened text documents. The document's truth is now managed - * by the client and the server must not try to read the document's truth - * using the document's uri. - * - * Registration Options: TextDocumentRegistrationOptions - */; - - -DEFINE_NOTIFICATION_TYPE(Notify_TextDocumentDidOpen, TextDocumentDidOpen::Params, "textDocument/didOpen"); - diff --git a/graphics/asymptote/LspCpp/LibLsp/lsp/textDocument/did_save.h b/graphics/asymptote/LspCpp/LibLsp/lsp/textDocument/did_save.h deleted file mode 100644 index 1ce386c415..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/lsp/textDocument/did_save.h +++ /dev/null @@ -1,31 +0,0 @@ -#pragma once - - - -#include "LibLsp/JsonRpc/NotificationInMessage.h" - - -namespace TextDocumentDidSave { - - struct Params { - // The document that was saved. - lsTextDocumentIdentifier textDocument; - - // Optional the content when saved. Depends on the includeText value - // when the save notifcation was requested. - boost::optional text; - - MAKE_SWAP_METHOD(TextDocumentDidSave::Params, textDocument, text); - }; - -}; -MAKE_REFLECT_STRUCT(TextDocumentDidSave::Params, textDocument, text); - -/** - * The document save notification is sent from the client to the server when - * the document for saved in the client. - * - * Registration Options: TextDocumentSaveRegistrationOptions - */ -DEFINE_NOTIFICATION_TYPE(Notify_TextDocumentDidSave, TextDocumentDidSave::Params, "textDocument/didSave"); - diff --git a/graphics/asymptote/LspCpp/LibLsp/lsp/textDocument/documentColor.h b/graphics/asymptote/LspCpp/LibLsp/lsp/textDocument/documentColor.h deleted file mode 100644 index 23a6d08d87..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/lsp/textDocument/documentColor.h +++ /dev/null @@ -1,73 +0,0 @@ -#pragma once - -#include "LibLsp/JsonRpc/RequestInMessage.h" -#include "LibLsp/JsonRpc/lsResponseMessage.h" - -#include "LibLsp/lsp/lsTextDocumentIdentifier.h" -#include "LibLsp/lsp/lsRange.h" -#include -struct DocumentColorParams { - /** - * The text document. - */ - - lsTextDocumentIdentifier textDocument; - MAKE_SWAP_METHOD(DocumentColorParams, textDocument); -}; -MAKE_REFLECT_STRUCT(DocumentColorParams, textDocument); - -/** - * The document color request is sent from the client to the server to list all color references found in a given text - * document. Along with the range, a color value in RGB is returned. - * - * Clients can use the result to decorate color references in an editor. For example: - * - Color boxes showing the actual color next to the reference - * - Show a color picker when a color reference is edited - * - * Since version 3.6.0 - */ - -namespace TextDocument { - struct Color { - /** - * The red component of this color in the range [0-1]. - */ - double red = 0; - - /** - * The green component of this color in the range [0-1]. - */ - double green = 0; - - /** - * The blue component of this color in the range [0-1]. - */ - double blue = 0; - - /** - * The alpha component of this color in the range [0-1]. - */ - double alpha = 0; - MAKE_SWAP_METHOD(TextDocument::Color, red, green, blue, alpha) - }; -} -MAKE_REFLECT_STRUCT(TextDocument::Color, red, green, blue, alpha) - - -struct ColorInformation { - /** - * The range in the document where this color appers. - */ - - lsRange range; - - /** - * The actual color value for this color range. - */ - - TextDocument::Color color; - MAKE_SWAP_METHOD(ColorInformation, range, color) -}; -MAKE_REFLECT_STRUCT(ColorInformation,range,color) - -DEFINE_REQUEST_RESPONSE_TYPE(td_documentColor, DocumentColorParams,std::vector, "textDocument/documentColor"); \ No newline at end of file diff --git a/graphics/asymptote/LspCpp/LibLsp/lsp/textDocument/document_link.h b/graphics/asymptote/LspCpp/LibLsp/lsp/textDocument/document_link.h deleted file mode 100644 index 536a625c4c..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/lsp/textDocument/document_link.h +++ /dev/null @@ -1,44 +0,0 @@ -#pragma once - -#include "LibLsp/JsonRpc/RequestInMessage.h" -#include "LibLsp/JsonRpc/lsResponseMessage.h" - - -namespace TextDocumentDocumentLink { - - struct Params { - // The document to provide document links for. - lsTextDocumentIdentifier textDocument; - MAKE_SWAP_METHOD(Params, textDocument) - }; - -}; -MAKE_REFLECT_STRUCT(TextDocumentDocumentLink::Params, textDocument); - - - - -// A document link is a range in a text document that links to an internal or -// external resource, like another text document or a web site. -struct lsDocumentLink { - // The range this link applies to. - lsRange range; - // The uri this link points to. If missing a resolve request is sent later. - boost::optional target; - - boost::optional data; - - MAKE_SWAP_METHOD(lsDocumentLink, range, target, data) - -}; -MAKE_REFLECT_STRUCT(lsDocumentLink, range, target,data); - - -DEFINE_REQUEST_RESPONSE_TYPE(td_links, TextDocumentDocumentLink::Params, lsDocumentLink, "textDocument/documentLink"); - - -/** - * The document link resolve request is sent from the client to the server to resolve the target of a given document link. - */ -DEFINE_REQUEST_RESPONSE_TYPE(td_linkResolve, std::vector, lsDocumentLink, "documentLink/resolve"); - diff --git a/graphics/asymptote/LspCpp/LibLsp/lsp/textDocument/document_symbol.h b/graphics/asymptote/LspCpp/LibLsp/lsp/textDocument/document_symbol.h deleted file mode 100644 index 8aa6e8b00e..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/lsp/textDocument/document_symbol.h +++ /dev/null @@ -1,55 +0,0 @@ -#pragma once - - -#include "LibLsp/JsonRpc/RequestInMessage.h" -#include "LibLsp/JsonRpc/lsResponseMessage.h" - -#include "LibLsp/lsp/symbol.h" -#include "LibLsp/lsp/lsTextDocumentIdentifier.h" - /** - * The document symbol request is sent from the client to the server to list all symbols found in a given text document. - */ -struct lsDocumentSymbolParams { - lsTextDocumentIdentifier textDocument; - MAKE_SWAP_METHOD(lsDocumentSymbolParams, textDocument) -}; -MAKE_REFLECT_STRUCT(lsDocumentSymbolParams, textDocument); - - - -struct TextDocumentDocumentSymbol{ - typedef std::pair< boost::optional , boost::optional > Either; -}; -void Reflect(Reader& visitor, TextDocumentDocumentSymbol::Either& value); - - - -/** - * The document symbol request is sent from the client to the server to list all - * symbols found in a given text document. - * - * Registration Options: {@link TextDocumentRegistrationOptions} - * - *

- * Caveat: although the return type allows mixing the - * {@link DocumentSymbol} and {@link SymbolInformation} instances into a list do - * not do it because the clients cannot accept a heterogeneous list. A list of - * {@code DocumentSymbol} instances is only a valid return value if the - * {@link DocumentSymbolCapabilities#getHierarchicalDocumentSymbolSupport() - * textDocument.documentSymbol.hierarchicalDocumentSymbolSupport} is - * {@code true}. More details on this difference between the LSP and the LSP4J - * can be found here. - *

- */ - -//DEFINE_REQUEST_RESPONSE_TYPE(td_symbol, -// lsDocumentSymbolParams, -// std::vector ); -// - -DEFINE_REQUEST_RESPONSE_TYPE(td_symbol, - lsDocumentSymbolParams, - std::vector< lsDocumentSymbol >,"textDocument/documentSymbol" ); - - - diff --git a/graphics/asymptote/LspCpp/LibLsp/lsp/textDocument/foldingRange.h b/graphics/asymptote/LspCpp/LibLsp/lsp/textDocument/foldingRange.h deleted file mode 100644 index 27977a4517..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/lsp/textDocument/foldingRange.h +++ /dev/null @@ -1,62 +0,0 @@ -#pragma once - - -#include "LibLsp/JsonRpc/RequestInMessage.h" -#include "LibLsp/JsonRpc/lsResponseMessage.h" - -#include "document_symbol.h" -#include "LibLsp/lsp/lsTextDocumentIdentifier.h" - - -struct FoldingRangeRequestParams { - /** - * The text document. - */ - - lsTextDocumentIdentifier textDocument; - MAKE_SWAP_METHOD(FoldingRangeRequestParams, textDocument) -}; -MAKE_REFLECT_STRUCT(FoldingRangeRequestParams, textDocument) - - -struct FoldingRange { - /** - * The zero-based line number from where the folded range starts. - */ - int startLine; - - /** - * The zero-based line number where the folded range ends. - */ - int endLine; - - /** - * The zero-based character offset from where the folded range starts. If not defined, defaults - * to the length of the start line. - */ - int startCharacter; - - /** - * The zero-based character offset before the folded range ends. If not defined, defaults to the - * length of the end line. - */ - int endCharacter; - - /** - * Describes the kind of the folding range such as `comment' or 'region'. The kind - * is used to categorize folding ranges and used by commands like 'Fold all comments'. See - * FoldingRangeKind for an enumeration of standardized kinds. - */ - std::string kind; - - MAKE_SWAP_METHOD(FoldingRange, startLine, endLine, startCharacter, endCharacter, kind) -}; -MAKE_REFLECT_STRUCT(FoldingRange,startLine,endLine,startCharacter,endCharacter,kind) - - -/** - * The folding range request is sent from the client to the server to return all folding - * ranges found in a given text document. - */ -DEFINE_REQUEST_RESPONSE_TYPE(td_foldingRange, FoldingRangeRequestParams, std::vector, "textDocument/foldingRange"); - diff --git a/graphics/asymptote/LspCpp/LibLsp/lsp/textDocument/formatting.h b/graphics/asymptote/LspCpp/LibLsp/lsp/textDocument/formatting.h deleted file mode 100644 index ad54e24bf9..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/lsp/textDocument/formatting.h +++ /dev/null @@ -1,32 +0,0 @@ -#pragma once -#include "LibLsp/lsp/lsFormattingOptions.h" - -#include "LibLsp/JsonRpc/RequestInMessage.h" -#include "LibLsp/JsonRpc/lsResponseMessage.h" - - -namespace TextDocumentFormatting { - - struct Params { - /** - * The document to format. - */ - lsTextDocumentIdentifier textDocument; - /** - * The format options. - */ - lsFormattingOptions options; - MAKE_SWAP_METHOD(Params, textDocument, options); - }; - -}; -MAKE_REFLECT_STRUCT(TextDocumentFormatting::Params, textDocument, options); -/** - * The document formatting request is sent from the client to the server to - * format a whole document. - * - * Registration Options: TextDocumentRegistrationOptions - */ -DEFINE_REQUEST_RESPONSE_TYPE(td_formatting, TextDocumentFormatting::Params, - std::vector, "textDocument/formatting"); - diff --git a/graphics/asymptote/LspCpp/LibLsp/lsp/textDocument/highlight.h b/graphics/asymptote/LspCpp/LibLsp/lsp/textDocument/highlight.h deleted file mode 100644 index 332baf69e1..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/lsp/textDocument/highlight.h +++ /dev/null @@ -1,18 +0,0 @@ -#pragma once - -#include "LibLsp/JsonRpc/RequestInMessage.h" -#include "LibLsp/JsonRpc/lsResponseMessage.h" -#include "LibLsp/lsp/lsTextDocumentPositionParams.h" -#include "document_symbol.h" - -/** - * The references request is sent from the client to the server to resolve - * project-wide references for the symbol denoted by the given text document - * position. - * - * Registration Options: TextDocumentRegistrationOptions - */ - -DEFINE_REQUEST_RESPONSE_TYPE(td_highlight, lsTextDocumentPositionParams, - std::vector, "textDocument/documentHighlight"); - diff --git a/graphics/asymptote/LspCpp/LibLsp/lsp/textDocument/hover.h b/graphics/asymptote/LspCpp/LibLsp/lsp/textDocument/hover.h deleted file mode 100644 index 5302316c6f..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/lsp/textDocument/hover.h +++ /dev/null @@ -1,55 +0,0 @@ -#pragma once - - -#include "LibLsp/JsonRpc/RequestInMessage.h" -#include "LibLsp/JsonRpc/lsResponseMessage.h" - -#include "LibLsp/lsp/lsMarkedString.h" -#include "LibLsp/lsp/lsTextDocumentPositionParams.h" -#include "LibLsp/lsp/lsRange.h" -/** - * The hover request is sent from the client to the server to request hover - * information at a given text document position. - * - * Registration Options: TextDocumentRegistrationOptions - */ - -namespace TextDocumentHover -{ - typedef boost::optional< std::vector< std::pair, boost::optional> > > Left; - typedef std::pair< Left, boost::optional > Either; - struct Result { - /** - * The hover's content as markdown - */ - Either contents; - - /** - * An boost::optional range - */ - boost::optional range; - - MAKE_SWAP_METHOD(Result, contents, range) - }; -} -MAKE_REFLECT_STRUCT(TextDocumentHover::Result, contents, range); - -extern void Reflect(Reader& visitor, std::pair, boost::optional>& value); -extern void Reflect(Reader& visitor, TextDocumentHover::Either& value); - - -DEFINE_REQUEST_RESPONSE_TYPE(td_hover, lsTextDocumentPositionParams, TextDocumentHover::Result, "textDocument/hover") - -//struct Rsp_TextDocumentHover : ResponseMessage< TextDocumentHover::Result, Rsp_TextDocumentHover> { -// -//}; -//MAKE_REFLECT_STRUCT(Rsp_TextDocumentHover, -// jsonrpc, -// id, -// result); - -//MAKE_REFLECT_STRUCT_OPTIONALS_MANDATORY(Rsp_TextDocumentHover, -// jsonrpc, -// id, -// result); - diff --git a/graphics/asymptote/LspCpp/LibLsp/lsp/textDocument/implementation.h b/graphics/asymptote/LspCpp/LibLsp/lsp/textDocument/implementation.h deleted file mode 100644 index 0d7851cb81..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/lsp/textDocument/implementation.h +++ /dev/null @@ -1,16 +0,0 @@ -#pragma once - - -#include "LibLsp/JsonRpc/RequestInMessage.h" -#include "LibLsp/lsp/out_list.h" - - -/** - * The goto implementation request is sent from the client to the server to resolve - * the implementation location of a symbol at a given text document position. - * - * Registration Options: TextDocumentRegistrationOptions - * - * Since version 3.6.0 - */ -DEFINE_REQUEST_RESPONSE_TYPE(td_implementation, lsTextDocumentPositionParams, LocationListEither::Either, "textDocument/implementation"); \ No newline at end of file diff --git a/graphics/asymptote/LspCpp/LibLsp/lsp/textDocument/linkedEditingRange.h b/graphics/asymptote/LspCpp/LibLsp/lsp/textDocument/linkedEditingRange.h deleted file mode 100644 index e4055d359f..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/lsp/textDocument/linkedEditingRange.h +++ /dev/null @@ -1,51 +0,0 @@ -#pragma once - - -#include "LibLsp/JsonRpc/RequestInMessage.h" -#include "LibLsp/JsonRpc/lsResponseMessage.h" -#include "LibLsp/lsp/lsAny.h" -#include "LibLsp/lsp/symbol.h" -#include "LibLsp/lsp/lsTextDocumentPositionParams.h" -#include "LibLsp/lsp/lsRange.h" - - - -struct LinkedEditingRangeParams -{ - lsTextDocumentIdentifier textDocument; - lsPosition position; - - MAKE_SWAP_METHOD(LinkedEditingRangeParams, - textDocument, - position) -}; -MAKE_REFLECT_STRUCT(LinkedEditingRangeParams, - textDocument, - position) - - -struct LinkedEditingRanges -{ - /** - * A list of ranges that can be renamed together. The ranges must have - * identical length and contain identical text content. The ranges cannot overlap. - */ - std::vector ranges; - - /** - * An optional word pattern (regular expression) that describes valid contents for - * the given ranges. If no pattern is provided, the client configuration's word - * pattern will be used. - */ - - boost::optional wordPattern; - MAKE_SWAP_METHOD(LinkedEditingRanges, - ranges, - wordPattern) -}; - -MAKE_REFLECT_STRUCT(LinkedEditingRanges, - ranges, - wordPattern) -DEFINE_REQUEST_RESPONSE_TYPE(td_linkedEditingRange, LinkedEditingRangeParams, - boost::optional>,"textDocument/linkedEditingRange") \ No newline at end of file diff --git a/graphics/asymptote/LspCpp/LibLsp/lsp/textDocument/onTypeFormatting.h b/graphics/asymptote/LspCpp/LibLsp/lsp/textDocument/onTypeFormatting.h deleted file mode 100644 index df14ea5d3d..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/lsp/textDocument/onTypeFormatting.h +++ /dev/null @@ -1,44 +0,0 @@ -#pragma once - - -#include "LibLsp/JsonRpc/RequestInMessage.h" -#include "LibLsp/JsonRpc/lsResponseMessage.h" - -#include "LibLsp/lsp/lsFormattingOptions.h" -#include "LibLsp/lsp/lsTextDocumentIdentifier.h" -#include "LibLsp/lsp/lsRange.h" -#include "LibLsp/lsp/lsTextEdit.h" - - -struct lsDocumentOnTypeFormattingParams -{ - lsTextDocumentIdentifier textDocument; - lsFormattingOptions options; - - lsPosition position; - - /** - * The character that has been typed. - */ - - std::string ch; - - MAKE_SWAP_METHOD(lsDocumentOnTypeFormattingParams, - textDocument, - position, - options, ch); -}; -MAKE_REFLECT_STRUCT(lsDocumentOnTypeFormattingParams, - textDocument, - position, - options,ch); - -/** - * The document range formatting request is sent from the client to the - * server to format a given range in a document. - * - * Registration Options: TextDocumentRegistrationOptions - */ -DEFINE_REQUEST_RESPONSE_TYPE(td_onTypeFormatting, - lsDocumentOnTypeFormattingParams, std::vector, "textDocument/onTypeFormatting"); - diff --git a/graphics/asymptote/LspCpp/LibLsp/lsp/textDocument/prepareRename.h b/graphics/asymptote/LspCpp/LibLsp/lsp/textDocument/prepareRename.h deleted file mode 100644 index 8c653d9864..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/lsp/textDocument/prepareRename.h +++ /dev/null @@ -1,40 +0,0 @@ -#pragma once - -#include "LibLsp/JsonRpc/RequestInMessage.h" -#include "LibLsp/JsonRpc/lsResponseMessage.h" - -#include "LibLsp/lsp/lsWorkspaceEdit.h" -#include "LibLsp/lsp/lsTextDocumentPositionParams.h" - -/** - * The rename request is sent from the client to the server to do a - * workspace wide rename of a symbol. - * - * Registration Options: TextDocumentRegistrationOptions - */ -struct PrepareRenameResult{ - /** - * The range of the string to rename - */ - - lsRange range; - -/** - * A placeholder text of the string content to be renamed. - */ - - std::string placeholder; - - MAKE_SWAP_METHOD(PrepareRenameResult, range, placeholder) - -}; -MAKE_REFLECT_STRUCT(PrepareRenameResult,range,placeholder) - - - -typedef std::pair< boost::optional< lsRange>, boost::optional> TextDocumentPrepareRenameResult; -extern void Reflect(Reader& visitor, TextDocumentPrepareRenameResult& value); - - -DEFINE_REQUEST_RESPONSE_TYPE(td_prepareRename, - lsTextDocumentPositionParams, TextDocumentPrepareRenameResult, "textDocument/prepareRename"); \ No newline at end of file diff --git a/graphics/asymptote/LspCpp/LibLsp/lsp/textDocument/publishDiagnostics.h b/graphics/asymptote/LspCpp/LibLsp/lsp/textDocument/publishDiagnostics.h deleted file mode 100644 index bf28104bbb..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/lsp/textDocument/publishDiagnostics.h +++ /dev/null @@ -1,28 +0,0 @@ -#pragma once - -#include "LibLsp/JsonRpc/NotificationInMessage.h" -#include "LibLsp/lsp/lsp_diagnostic.h" - -// Diagnostics -namespace TextDocumentPublishDiagnostics{ - struct Params { - // The URI for which diagnostic information is reported. - lsDocumentUri uri; - - // An array of diagnostic information items. - std::vector diagnostics; - MAKE_SWAP_METHOD(Params,uri,diagnostics); - }; - - -}; -MAKE_REFLECT_STRUCT(TextDocumentPublishDiagnostics::Params, - uri, - diagnostics); - -/** - * Diagnostics notifications are sent from the server to the client to - * signal results of validation runs. - */ -DEFINE_NOTIFICATION_TYPE(Notify_TextDocumentPublishDiagnostics, TextDocumentPublishDiagnostics::Params, "textDocument/publishDiagnostics"); - diff --git a/graphics/asymptote/LspCpp/LibLsp/lsp/textDocument/range_formatting.h b/graphics/asymptote/LspCpp/LibLsp/lsp/textDocument/range_formatting.h deleted file mode 100644 index b2fe750af1..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/lsp/textDocument/range_formatting.h +++ /dev/null @@ -1,35 +0,0 @@ -#pragma once - - -#include "LibLsp/JsonRpc/RequestInMessage.h" -#include "LibLsp/JsonRpc/lsResponseMessage.h" - -#include "LibLsp/lsp/lsFormattingOptions.h" - - -struct lsTextDocumentRangeFormattingParams { - lsTextDocumentIdentifier textDocument; - lsRange range; - lsFormattingOptions options; - - MAKE_SWAP_METHOD(lsTextDocumentRangeFormattingParams, - textDocument, - range, - options) -}; -MAKE_REFLECT_STRUCT(lsTextDocumentRangeFormattingParams, - textDocument, - range, - options); - -/** - * The document range formatting request is sent from the client to the - * server to format a given range in a document. - * - * Registration Options: TextDocumentRegistrationOptions - */ -DEFINE_REQUEST_RESPONSE_TYPE(td_rangeFormatting, lsTextDocumentRangeFormattingParams, std::vector, - "textDocument/rangeFormatting"); - - - diff --git a/graphics/asymptote/LspCpp/LibLsp/lsp/textDocument/references.h b/graphics/asymptote/LspCpp/LibLsp/lsp/textDocument/references.h deleted file mode 100644 index 2376912756..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/lsp/textDocument/references.h +++ /dev/null @@ -1,48 +0,0 @@ -#pragma once - - -#include "LibLsp/JsonRpc/RequestInMessage.h" -#include "LibLsp/JsonRpc/lsResponseMessage.h" - -#include "LibLsp/lsp/symbol.h" - - -namespace TextDocumentReferences { - - struct lsReferenceContext { - // Include the declaration of the current symbol. - boost::optional includeDeclaration; - MAKE_REFLECT_STRUCT(lsReferenceContext, - includeDeclaration) - }; - struct Params { - lsTextDocumentIdentifier textDocument; - lsPosition position; - lsReferenceContext context; - MAKE_SWAP_METHOD(Params, - textDocument, - position, - context) - - }; - -}; -MAKE_REFLECT_STRUCT(TextDocumentReferences::lsReferenceContext, - includeDeclaration); -MAKE_REFLECT_STRUCT(TextDocumentReferences::Params, - textDocument, - position, - context); - - - - -/** - * The references request is sent from the client to the server to resolve - * project-wide references for the symbol denoted by the given text document - * position. - * - * Registration Options: TextDocumentRegistrationOptions - */ -DEFINE_REQUEST_RESPONSE_TYPE(td_references, TextDocumentReferences::Params, - std::vector, "textDocument/references"); diff --git a/graphics/asymptote/LspCpp/LibLsp/lsp/textDocument/rename.h b/graphics/asymptote/LspCpp/LibLsp/lsp/textDocument/rename.h deleted file mode 100644 index 35895f0f4f..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/lsp/textDocument/rename.h +++ /dev/null @@ -1,41 +0,0 @@ -#pragma once - - -#include "LibLsp/JsonRpc/RequestInMessage.h" -#include "LibLsp/JsonRpc/lsResponseMessage.h" - -#include "LibLsp/lsp/lsWorkspaceEdit.h" -#include "LibLsp/lsp/lsTextDocumentIdentifier.h" - -namespace TextDocumentRename { - - struct Params { - // The document to format. - lsTextDocumentIdentifier textDocument; - - // The position at which this request was sent. - lsPosition position; - - // The new name of the symbol. If the given name is not valid the - // request must return a [ResponseError](#ResponseError) with an - // appropriate message set. - std::string newName; - MAKE_SWAP_METHOD(Params, - textDocument, - position, - newName); - }; - -}; -MAKE_REFLECT_STRUCT(TextDocumentRename::Params, - textDocument, - position, - newName); -/** - * The rename request is sent from the client to the server to do a - * workspace wide rename of a symbol. - * - * Registration Options: TextDocumentRegistrationOptions - */ -DEFINE_REQUEST_RESPONSE_TYPE(td_rename, TextDocumentRename::Params, lsWorkspaceEdit, "textDocument/rename"); - diff --git a/graphics/asymptote/LspCpp/LibLsp/lsp/textDocument/resolveCodeLens.h b/graphics/asymptote/LspCpp/LibLsp/lsp/textDocument/resolveCodeLens.h deleted file mode 100644 index 0723985160..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/lsp/textDocument/resolveCodeLens.h +++ /dev/null @@ -1,10 +0,0 @@ -#pragma once - - -#include "LibLsp/JsonRpc/RequestInMessage.h" -#include "LibLsp/JsonRpc/lsResponseMessage.h" - -#include "code_lens.h" - -DEFINE_REQUEST_RESPONSE_TYPE(codeLens_resolve, lsCodeLens, lsCodeLens, "codeLens/resolve") - diff --git a/graphics/asymptote/LspCpp/LibLsp/lsp/textDocument/resolveCompletionItem.h b/graphics/asymptote/LspCpp/LibLsp/lsp/textDocument/resolveCompletionItem.h deleted file mode 100644 index f5576894ed..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/lsp/textDocument/resolveCompletionItem.h +++ /dev/null @@ -1,21 +0,0 @@ -#pragma once - - -#include "LibLsp/JsonRpc/RequestInMessage.h" -#include "LibLsp/JsonRpc/lsResponseMessage.h" - -#include -#include "LibLsp/lsp/lsp_completion.h" -#include "LibLsp/lsp/lsTextDocumentPositionParams.h" -#include "completion.h" - -/** - * The request is sent from the client to the server to resolve additional - * information for a given completion item. - */ -DEFINE_REQUEST_RESPONSE_TYPE(completionItem_resolve, lsCompletionItem, lsCompletionItem, "completionItem/resolve"); - - - - - diff --git a/graphics/asymptote/LspCpp/LibLsp/lsp/textDocument/resolveTypeHierarchy.h b/graphics/asymptote/LspCpp/LibLsp/lsp/textDocument/resolveTypeHierarchy.h deleted file mode 100644 index eab5f838fc..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/lsp/textDocument/resolveTypeHierarchy.h +++ /dev/null @@ -1,31 +0,0 @@ -#pragma once - - - -#include "LibLsp/JsonRpc/RequestInMessage.h" -#include "LibLsp/JsonRpc/lsResponseMessage.h" - -#include "LibLsp/lsp/symbol.h" -#include "typeHierarchy.h" - -struct ResolveTypeHierarchyItemParams { - /** - * The hierarchy item to resolve. - */ - - TypeHierarchyItem item; - - /** - * The number of hierarchy levels to resolve. {@code 0} indicates no hierarchy level. - */ - boost::optional resolve; - - /** - * The direction of the type hierarchy resolution. - */ - - TypeHierarchyDirection direction; - MAKE_SWAP_METHOD(ResolveTypeHierarchyItemParams, item, resolve, direction) -}; -MAKE_REFLECT_STRUCT(ResolveTypeHierarchyItemParams,item,resolve,direction) -DEFINE_REQUEST_RESPONSE_TYPE(typeHierarchy_resolve, ResolveTypeHierarchyItemParams, TypeHierarchyItem, "typeHierarchy/resolve") diff --git a/graphics/asymptote/LspCpp/LibLsp/lsp/textDocument/selectionRange.h b/graphics/asymptote/LspCpp/LibLsp/lsp/textDocument/selectionRange.h deleted file mode 100644 index 47590e4152..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/lsp/textDocument/selectionRange.h +++ /dev/null @@ -1,52 +0,0 @@ -#pragma once - - -#include "LibLsp/JsonRpc/RequestInMessage.h" -#include "LibLsp/JsonRpc/lsResponseMessage.h" - -#include "LibLsp/lsp/lsPosition.h" -#include "LibLsp/lsp/lsTextDocumentIdentifier.h" - -struct SelectionRangeParams { - /** - * The text document. - */ - - lsTextDocumentIdentifier textDocument; - - /** - * The positions inside the text document. - */ - - std::vector positions; - - MAKE_SWAP_METHOD(SelectionRangeParams, textDocument, positions) - -}; -MAKE_REFLECT_STRUCT(SelectionRangeParams, textDocument, positions) - -struct SelectionRange { - /** - * The [range](#Range) of this selection range. - */ - - lsRange range; - - /** - * The parent selection range containing this range. Therefore `parent.range` must contain `this.range`. - */ - boost::optional parent; - MAKE_SWAP_METHOD(SelectionRange, range, parent) -}; - -extern void Reflect(Reader& visitor, boost::optional& value); -extern void Reflect(Writer& visitor, SelectionRange* value); - -MAKE_REFLECT_STRUCT(SelectionRange,range,parent) -/** - * The {@code textDocument/selectionRange} request is sent from the client to the server to return - * suggested selection ranges at an array of given positions. A selection range is a range around - * the cursor position which the user might be interested in selecting. - */ -DEFINE_REQUEST_RESPONSE_TYPE(td_selectionRange, SelectionRangeParams, std::vector, "textDocument/selectionRange"); - diff --git a/graphics/asymptote/LspCpp/LibLsp/lsp/textDocument/semanticHighlighting.h b/graphics/asymptote/LspCpp/LibLsp/lsp/textDocument/semanticHighlighting.h deleted file mode 100644 index 32bc86f5fb..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/lsp/textDocument/semanticHighlighting.h +++ /dev/null @@ -1,66 +0,0 @@ -#pragma once -#include "LibLsp/lsp/lsDocumentUri.h" -#include "LibLsp/lsp/lsVersionedTextDocumentIdentifier.h" - -#include "LibLsp/JsonRpc/NotificationInMessage.h" -#include "LibLsp/JsonRpc/lsResponseMessage.h" - -/** - * Represents a semantic highlighting information that has to be applied on a specific line of the text document. - */ - -struct SemanticHighlightingInformation { - /** - * The zero-based line position in the text document. - */ - int line = 0; - - /** - * A base64 encoded string representing every single highlighted ranges in the line with its start position, length - * and the "lookup table" index of of the semantic highlighting - * TextMate scopes. If the {@code tokens} is empty or not defined, then no highlighted positions are available for the line. - */ - std::string tokens; - - MAKE_SWAP_METHOD(SemanticHighlightingInformation, line, tokens) -}; - -MAKE_REFLECT_STRUCT(SemanticHighlightingInformation, line, tokens); - -/** - * Parameters for the semantic highlighting (server-side) push notification. - */ - -struct SemanticHighlightingParams { - /** - * The text document that has to be decorated with the semantic highlighting information. - */ - - lsVersionedTextDocumentIdentifier textDocument; - - /** - * An array of semantic highlighting information. - */ - - std::vector lines; - - MAKE_SWAP_METHOD(SemanticHighlightingParams, textDocument, lines) - -}; -MAKE_REFLECT_STRUCT(SemanticHighlightingParams, textDocument, lines); -/** - * The {@code textDocument/semanticHighlighting} notification is pushed from the server to the client - * to inform the client about additional semantic highlighting information that has to be applied - * on the text document. It is the server's responsibility to decide which lines are included in - * the highlighting information. In other words, the server is capable of sending only a delta - * information. For instance, after opening the text document ({@code DidOpenTextDocumentNotification}) - * the server sends the semantic highlighting information for the entire document, but if the server - * receives a {@code DidChangeTextDocumentNotification}, it pushes the information only about - * the affected lines in the document. - * - *

- * Note: the {@code textDocument/semanticHighlighting} - * language feature is not yet part of the official LSP specification. - */ -DEFINE_NOTIFICATION_TYPE(Notify_semanticHighlighting, SemanticHighlightingParams, "textDocument/semanticHighlighting"); \ No newline at end of file diff --git a/graphics/asymptote/LspCpp/LibLsp/lsp/textDocument/signature_help.h b/graphics/asymptote/LspCpp/LibLsp/lsp/textDocument/signature_help.h deleted file mode 100644 index 2a83645901..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/lsp/textDocument/signature_help.h +++ /dev/null @@ -1,92 +0,0 @@ -#pragma once - - -#include "LibLsp/JsonRpc/RequestInMessage.h" -#include "LibLsp/JsonRpc/lsResponseMessage.h" -#include "LibLsp/lsp/lsMarkedString.h" -#include "LibLsp/lsp/lsTextDocumentPositionParams.h" - -extern void Reflect(Reader& visitor, - std::pair, boost::optional>& value); - - - -// Represents a parameter of a callable-signature. A parameter can -// have a label and a doc-comment. -struct lsParameterInformation { - // The label of this parameter. Will be shown in - // the UI. - std::string label; - - // The human-readable doc-comment of this parameter. Will be shown - // in the UI but can be omitted. - boost::optional< std::pair< boost::optional , boost::optional > > documentation; - - MAKE_SWAP_METHOD(lsParameterInformation, label, documentation) -}; -MAKE_REFLECT_STRUCT(lsParameterInformation, label, documentation); - -// Represents the signature of something callable. A signature -// can have a label, like a function-name, a doc-comment, and -// a set of parameters. -struct lsSignatureInformation { - // The label of this signature. Will be shown in - // the UI. - std::string label; - - // The human-readable doc-comment of this signature. Will be shown - // in the UI but can be omitted. - boost::optional< std::pair< boost::optional, boost::optional > > documentation; - - // The parameters of this signature. - std::vector parameters; - - MAKE_SWAP_METHOD(lsSignatureInformation, label, documentation, parameters) -}; -MAKE_REFLECT_STRUCT(lsSignatureInformation, label, documentation, parameters); - -// Signature help represents the signature of something -// callable. There can be multiple signature but only one -// active and only one active parameter. -struct lsSignatureHelp { - // One or more signatures. - std::vector signatures; - - // The active signature. If omitted or the value lies outside the - // range of `signatures` the value defaults to zero or is ignored if - // `signatures.length === 0`. Whenever possible implementors should - // make an active decision about the active signature and shouldn't - // rely on a default value. - // In future version of the protocol this property might become - // mandantory to better express this. - boost::optional activeSignature; - - // The active parameter of the active signature. If omitted or the value - // lies outside the range of `signatures[activeSignature].parameters` - // defaults to 0 if the active signature has parameters. If - // the active signature has no parameters it is ignored. - // In future version of the protocol this property might become - // mandantory to better express the active parameter if the - // active signature does have any. - boost::optional activeParameter; - - - MAKE_SWAP_METHOD(lsSignatureHelp, - signatures, - activeSignature, - activeParameter) -}; -MAKE_REFLECT_STRUCT(lsSignatureHelp, - signatures, - activeSignature, - activeParameter); - - - -/** - * The signature help request is sent from the client to the server to - * request signature information at a given cursor position. - * - * Registration Options: SignatureHelpRegistrationOptions - */ -DEFINE_REQUEST_RESPONSE_TYPE(td_signatureHelp, lsTextDocumentPositionParams, lsSignatureHelp, "textDocument/signatureHelp"); \ No newline at end of file diff --git a/graphics/asymptote/LspCpp/LibLsp/lsp/textDocument/textDocument.cpp b/graphics/asymptote/LspCpp/LibLsp/lsp/textDocument/textDocument.cpp deleted file mode 100644 index 32f647436d..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/lsp/textDocument/textDocument.cpp +++ /dev/null @@ -1,349 +0,0 @@ -#include "completion.h" -#include "document_symbol.h" -#include "LibLsp/lsp/lsMarkedString.h" -#include "hover.h" -#include "prepareRename.h" -#include - -#include "semanticHighlighting.h" -#include "SemanticTokens.h" -#include "LibLsp/JsonRpc/json.h" - - -constexpr unsigned SemanticTokenEncodingSize = 5; - -std::string to_string(SemanticTokenType _type) -{ - switch (_type) { - - case ls_namespace: return "namespace"; - /** - * Represents a generic type. Acts as a fallback for types which - * can"t be mapped to a specific type like class or enum. - */ - case ls_type: return "type"; - case ls_class: return "class"; - case ls_enum: return "enum"; - case ls_interface: return "interface"; - case ls_struct: return "struct"; - case ls_typeParameter: return "typeParameter"; - case ls_parameter: return "parameter"; - case ls_variable: return "variable"; - case ls_property: return "property"; - case ls_enumMember: return "enumMember"; - case ls_event: return "event"; - case ls_function: return "function"; - case ls_method: return "method"; - case ls_macro: return "macro"; - case ls_keyword: return "keyword"; - case ls_modifier: return "modifier"; - case ls_comment: return "comment"; - case ls_string: return "string"; - case ls_number: return "number"; - case ls_regexp: return "regexp"; - case ls_operator: return "operator"; - default: - return "unknown"; - } -} - -unsigned toSemanticTokenType(std::vector& modifiers) -{ - unsigned encode_type = 0; - for (auto bit : modifiers) { - encode_type = encode_type | (0b00000001 << bit); - } - return encode_type; -} - -std::string to_string(TokenType_JDT _type) -{ - switch (_type) - { - case PACKAGE_JDT:return "namespace"; - case CLASS_JDT:return "class"; - case INTERFACE_JDT:return "interface"; - case ENUM_JDT:return "enum"; - case ENUM_MEMBER_JDT:return "enumMember"; - case TYPE_JDT:return "type"; - case TYPE_PARAMETER_JDT:return "typeParameter"; - case ANNOTATION_JDT:return "annotation"; - case ANNOTATION_MEMBER_JDT:return "annotationMember"; - case METHOD_JDT:return "function"; - case PROPERTY_JDT:return "property"; - case VARIABLE_JDT:return "variable"; - case PARAMETER_JDT:return "parameter"; - } - return "unknown"; -} - -std::string to_string(SemanticTokenModifier modifier) -{ - switch (modifier) { - case ls_declaration: return "declaration"; - case ls_definition: return "definition"; - case ls_readonly: return "readonly"; - case ls_static: return "static"; - case ls_deprecated: return "deprecated"; - case ls_abstract: return "abstract"; - case ls_async: return "async"; - case ls_modification: return "modification"; - case ls_documentation: return "documentation"; - case ls_defaultLibrary: return "defaultLibrary"; - default: - return "unknown"; - } -} - -unsigned toSemanticTokenModifiers(std::vector& modifiers) -{ - unsigned encodedModifiers = 0; - for (auto bit : modifiers) { - encodedModifiers = encodedModifiers | (0b00000001 << bit); - } - return encodedModifiers; -} - - -std::string toSemanticTokenType(HighlightingKind_clangD kind) { - switch (kind) { - case HighlightingKind_clangD::Variable: - case HighlightingKind_clangD::LocalVariable: - case HighlightingKind_clangD::StaticField: - return "variable"; - case HighlightingKind_clangD::Parameter: - return "parameter"; - case HighlightingKind_clangD::Function: - return "function"; - case HighlightingKind_clangD::Method: - return "method"; - case HighlightingKind_clangD::StaticMethod: - // FIXME: better method with static modifier? - return "function"; - case HighlightingKind_clangD::Field: - return "property"; - case HighlightingKind_clangD::Class: - return "class"; - case HighlightingKind_clangD::Interface: - return "interface"; - case HighlightingKind_clangD::Enum: - return "enum"; - case HighlightingKind_clangD::EnumConstant: - return "enumMember"; - case HighlightingKind_clangD::Typedef: - case HighlightingKind_clangD::Type: - return "type"; - case HighlightingKind_clangD::Unknown: - return "unknown"; // nonstandard - case HighlightingKind_clangD::Namespace: - return "namespace"; - case HighlightingKind_clangD::TemplateParameter: - return "typeParameter"; - case HighlightingKind_clangD::Concept: - return "concept"; // nonstandard - case HighlightingKind_clangD::Primitive: - return "type"; - case HighlightingKind_clangD::Macro: - return "macro"; - case HighlightingKind_clangD::InactiveCode: - return "comment"; - } - return ("unhandled HighlightingKind_clangD"); -} - -std::string toSemanticTokenModifier(HighlightingModifier_clangD modifier) { - switch (modifier) { - case HighlightingModifier_clangD::Declaration: - return "declaration"; - case HighlightingModifier_clangD::Deprecated: - return "deprecated"; - case HighlightingModifier_clangD::Readonly: - return "readonly"; - case HighlightingModifier_clangD::Static: - return "static"; - case HighlightingModifier_clangD::Deduced: - return "deduced"; // nonstandard - case HighlightingModifier_clangD::Abstract: - return "abstract"; - case HighlightingModifier_clangD::DependentName: - return "dependentName"; // nonstandard - case HighlightingModifier_clangD::DefaultLibrary: - return "defaultLibrary"; - case HighlightingModifier_clangD::FunctionScope: - return "functionScope"; // nonstandard - case HighlightingModifier_clangD::ClassScope: - return "classScope"; // nonstandard - case HighlightingModifier_clangD::FileScope: - return "fileScope"; // nonstandard - case HighlightingModifier_clangD::GlobalScope: - return "globalScope"; // nonstandard - } - return ("unhandled HighlightingModifier_clangD"); -} - - - -bool operator==(const SemanticToken& l, const SemanticToken& r) { - return std::tie(l.deltaLine, l.deltaStart, l.length, l.tokenType, - l.tokenModifiers) == std::tie(r.deltaLine, r.deltaStart, - r.length, r.tokenType, - r.tokenModifiers); -} - -std::vector SemanticTokens::encodeTokens(std::vector& tokens) -{ - std::vector result; - result.reserve(SemanticTokenEncodingSize * tokens.size()); - for (const auto& tok : tokens) - { - result.push_back(tok.deltaLine); - result.push_back(tok.deltaStart); - result.push_back(tok.length); - result.push_back(tok.tokenType); - result.push_back(tok.tokenModifiers); - } - assert(result.size() == SemanticTokenEncodingSize * tokens.size()); - return result; -} - -void Reflect(Reader& visitor, TextDocumentComplete::Either& value) -{ - if(visitor.IsArray()) - { - Reflect(visitor, value.first); - } - else - { - - Reflect(visitor, value.second); - } - -} -void Reflect(Reader& visitor, TextDocumentDocumentSymbol::Either& value) -{ - if (visitor.HasMember("location")) - { - Reflect(visitor, value.first); - } - else - { - Reflect(visitor, value.second); - } -} - -void Reflect(Reader& visitor, std::pair, boost::optional>& value) -{ - - if (!visitor.IsString()) - { - Reflect(visitor, value.second); - } - else - { - Reflect(visitor, value.first); - } -} - -void Reflect(Reader& visitor, std::pair, boost::optional>& value) -{ - if (!visitor.IsString()) - { - Reflect(visitor, value.second); - } - else - { - Reflect(visitor, value.first); - } -} - void Reflect(Reader& visitor, TextDocumentHover::Either& value) -{ - JsonReader& reader = dynamic_cast(visitor); - if (reader.IsArray()) - { - Reflect(visitor, value.first); - } - else if(reader.m_->IsObject()) - { - Reflect(visitor, value.second); - } -} - - void Reflect(Reader& visitor, TextDocumentPrepareRenameResult& value) -{ - if (visitor.HasMember("placeholder")) - { - Reflect(visitor, value.second); - } - else - { - Reflect(visitor, value.first); - } -} - - namespace - RefactorProposalUtility - { - const char* APPLY_REFACTORING_COMMAND_ID = "java.action.applyRefactoringCommand"; - const char* EXTRACT_VARIABLE_ALL_OCCURRENCE_COMMAND = "extractVariableAllOccurrence"; - const char* EXTRACT_VARIABLE_COMMAND = "extractVariable"; - const char* EXTRACT_CONSTANT_COMMAND = "extractConstant"; - const char* EXTRACT_METHOD_COMMAND = "extractMethod"; - const char* EXTRACT_FIELD_COMMAND = "extractField"; - const char* CONVERT_VARIABLE_TO_FIELD_COMMAND = "convertVariableToField"; - const char* MOVE_FILE_COMMAND = "moveFile"; - const char* MOVE_INSTANCE_METHOD_COMMAND = "moveInstanceMethod"; - const char* MOVE_STATIC_MEMBER_COMMAND = "moveStaticMember"; - const char* MOVE_TYPE_COMMAND = "moveType"; - }; - namespace QuickAssistProcessor { - - const char* SPLIT_JOIN_VARIABLE_DECLARATION_ID = "org.eclipse.jdt.ls.correction.splitJoinVariableDeclaration.assist"; //$NON-NLS-1$ - const char* CONVERT_FOR_LOOP_ID = "org.eclipse.jdt.ls.correction.convertForLoop.assist"; //$NON-NLS-1$ - const char* ASSIGN_TO_LOCAL_ID = "org.eclipse.jdt.ls.correction.assignToLocal.assist"; //$NON-NLS-1$ - const char* ASSIGN_TO_FIELD_ID = "org.eclipse.jdt.ls.correction.assignToField.assist"; //$NON-NLS-1$ - const char* ASSIGN_PARAM_TO_FIELD_ID = "org.eclipse.jdt.ls.correction.assignParamToField.assist"; //$NON-NLS-1$ - const char* ASSIGN_ALL_PARAMS_TO_NEW_FIELDS_ID = "org.eclipse.jdt.ls.correction.assignAllParamsToNewFields.assist"; //$NON-NLS-1$ - const char* ADD_BLOCK_ID = "org.eclipse.jdt.ls.correction.addBlock.assist"; //$NON-NLS-1$ - const char* EXTRACT_LOCAL_ID = "org.eclipse.jdt.ls.correction.extractLocal.assist"; //$NON-NLS-1$ - const char* EXTRACT_LOCAL_NOT_REPLACE_ID = "org.eclipse.jdt.ls.correction.extractLocalNotReplaceOccurrences.assist"; //$NON-NLS-1$ - const char* EXTRACT_CONSTANT_ID = "org.eclipse.jdt.ls.correction.extractConstant.assist"; //$NON-NLS-1$ - const char* INLINE_LOCAL_ID = "org.eclipse.jdt.ls.correction.inlineLocal.assist"; //$NON-NLS-1$ - const char* CONVERT_LOCAL_TO_FIELD_ID = "org.eclipse.jdt.ls.correction.convertLocalToField.assist"; //$NON-NLS-1$ - const char* CONVERT_ANONYMOUS_TO_LOCAL_ID = "org.eclipse.jdt.ls.correction.convertAnonymousToLocal.assist"; //$NON-NLS-1$ - const char* CONVERT_TO_STRING_BUFFER_ID = "org.eclipse.jdt.ls.correction.convertToStringBuffer.assist"; //$NON-NLS-1$ - const char* CONVERT_TO_MESSAGE_FORMAT_ID = "org.eclipse.jdt.ls.correction.convertToMessageFormat.assist"; //$NON-NLS-1$; - const char* EXTRACT_METHOD_INPLACE_ID = "org.eclipse.jdt.ls.correction.extractMethodInplace.assist"; //$NON-NLS-1$; - - const char* CONVERT_ANONYMOUS_CLASS_TO_NESTED_COMMAND = "convertAnonymousClassToNestedCommand"; - }; - - void Reflect(Reader& reader, TypeHierarchyDirection& value) { - if (!reader.IsString()) - { - value = TypeHierarchyDirection::Both; - return; - } - std::string v = reader.GetString(); - if (v == "Children") - value = TypeHierarchyDirection::Both; - else if (v == "Parents") - value = TypeHierarchyDirection::Parents; - else if (v == "Both") - value = TypeHierarchyDirection::Both; - } - - - void Reflect(Writer& writer, TypeHierarchyDirection& value) { - switch (value) - { - case TypeHierarchyDirection::Children: - writer.String("Children"); - break; - case TypeHierarchyDirection::Parents: - writer.String("Parents"); - break; - case TypeHierarchyDirection::Both: - writer.String("Both"); - break; - } - } diff --git a/graphics/asymptote/LspCpp/LibLsp/lsp/textDocument/typeHierarchy.h b/graphics/asymptote/LspCpp/LibLsp/lsp/textDocument/typeHierarchy.h deleted file mode 100644 index b554d751f3..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/lsp/textDocument/typeHierarchy.h +++ /dev/null @@ -1,133 +0,0 @@ -#pragma once - -#include "LibLsp/JsonRpc/RequestInMessage.h" -#include "LibLsp/JsonRpc/lsResponseMessage.h" -#include "LibLsp/lsp/lsTextDocumentPositionParams.h" -#include "LibLsp/lsp/symbol.h" -#include "LibLsp/lsp/lsAny.h" -/** - * The {@code textDocument/typeHierarchy} request is sent from the client to the - * server to retrieve a {@link TypeHierarchyItem type hierarchy item} based on - * the {@link TypeHierarchyParams cursor position in the text document}. This - * request would also allow to specify if the item should be resolved and - * whether sub- or supertypes are to be resolved. If no type hierarchy item can - * be found under the given text document position, resolves to {@code null}. - * - *

- * Note: the {@code textDocument/typeHierarchy} - * language feature is not yet part of the official LSP specification. - */ -enum class TypeHierarchyDirection : uint32_t{ - - /** - * Flag for retrieving/resolving the subtypes. Value: {@code 0}. - */ - Children = 0, - - /** - * Flag to use when retrieving/resolving the supertypes. Value: {@code 1}. - */ - Parents =1, - - /** - * Flag for resolving both the super- and subtypes. Value: {@code 2}. - */ - Both=2 -}; -void Reflect(Reader& reader, TypeHierarchyDirection& value); - - -void Reflect(Writer& writer, TypeHierarchyDirection& value); - -struct TypeHierarchyParams :public lsTextDocumentPositionParams -{ - boost::optional resolve; - boost::optional direction ; - - MAKE_SWAP_METHOD(TypeHierarchyParams, textDocument, position, resolve, direction) -}; -MAKE_REFLECT_STRUCT(TypeHierarchyParams, textDocument, position, resolve, direction); - - - - - -/** - * Representation of an item that carries type information (such as class, interface, enumeration, etc) with additional parentage details. - */ - -struct TypeHierarchyItem { - /** - * The human readable name of the hierarchy item. - */ - - std::string name; - - /** - * Optional detail for the hierarchy item. It can be, for instance, the signature of a function or method. - */ - boost::optional - detail; - - /** - * The kind of the hierarchy item. For instance, class or interface. - */ - - SymbolKind kind; - - /** - * {@code true} if the hierarchy item is deprecated. Otherwise, {@code false}. It is {@code false} by default. - */ - - boost::optional deprecated; - - /** - * The URI of the text document where this type hierarchy item belongs to. - */ - - lsDocumentUri uri; - - /** - * The range enclosing this type hierarchy item not including leading/trailing whitespace but everything else - * like comments. This information is typically used to determine if the clients cursor is inside the type - * hierarchy item to reveal in the symbol in the UI. - * - * @see TypeHierarchyItem#selectionRange - */ - - lsRange range; - - /** - * The range that should be selected and revealed when this type hierarchy item is being picked, e.g the name of a function. - * Must be contained by the the {@link TypeHierarchyItem#getRange range}. - * - * @see TypeHierarchyItem#range - */ - - lsRange selectionRange; - - /** - * If this type hierarchy item is resolved, it contains the direct parents. Could be empty if the item does not have any - * direct parents. If not defined, the parents have not been resolved yet. - */ - boost::optional< std::vector > parents; - - /** - * If this type hierarchy item is resolved, it contains the direct children of the current item. - * Could be empty if the item does not have any descendants. If not defined, the children have not been resolved. - */ - boost::optional< std::vector > children; - - /** - * An boost::optional data field can be used to identify a type hierarchy item in a resolve request. - */ - boost::optional data; - - MAKE_SWAP_METHOD(TypeHierarchyItem, name, detail, kind, deprecated, uri, range, selectionRange, parents, children, data) -}; -MAKE_REFLECT_STRUCT(TypeHierarchyItem, name, detail, kind, deprecated, uri, range, selectionRange, parents, children, data); - - - -DEFINE_REQUEST_RESPONSE_TYPE(td_typeHierarchy, TypeHierarchyParams, TypeHierarchyItem, "textDocument/typeHierarchy"); \ No newline at end of file diff --git a/graphics/asymptote/LspCpp/LibLsp/lsp/textDocument/type_definition.h b/graphics/asymptote/LspCpp/LibLsp/lsp/textDocument/type_definition.h deleted file mode 100644 index 38ced43b42..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/lsp/textDocument/type_definition.h +++ /dev/null @@ -1,16 +0,0 @@ -#pragma once - - -#include "LibLsp/JsonRpc/RequestInMessage.h" -#include "LibLsp/lsp/out_list.h" - -/** - * The goto type definition request is sent from the client to the server to resolve - * the type definition location of a symbol at a given text document position. - * - * Registration Options: TextDocumentRegistrationOptions - * - * Since version 3.6.0 - */ -DEFINE_REQUEST_RESPONSE_TYPE(td_typeDefinition, - lsTextDocumentPositionParams, LocationListEither::Either, "textDocument/typeDefinition"); \ No newline at end of file diff --git a/graphics/asymptote/LspCpp/LibLsp/lsp/textDocument/willSave.h b/graphics/asymptote/LspCpp/LibLsp/lsp/textDocument/willSave.h deleted file mode 100644 index 84aa0badaa..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/lsp/textDocument/willSave.h +++ /dev/null @@ -1,71 +0,0 @@ -#pragma once - - -#include "LibLsp/JsonRpc/RequestInMessage.h" -#include "LibLsp/JsonRpc/lsResponseMessage.h" - -#include "LibLsp/lsp/lsTextDocumentIdentifier.h" - -namespace WillSaveTextDocumentParams { - - /** - * Represents reasons why a text document is saved. - */ - enum class TextDocumentSaveReason { - - /** - * Manually triggered, e.g. by the user pressing save, by starting debugging, - * or by an API call. - */ - Manual=(1), - - /** - * Automatic after a delay. - */ - AfterDelay=(2), - - /** - * When the editor lost focus. - */ - FocusOut=(3) - }; - - struct Params { - /** - * The document that will be saved. - */ - lsTextDocumentIdentifier textDocument; - - /* - * A reason why a text document is saved. - */ - - boost::optional reason; - - MAKE_SWAP_METHOD(Params, textDocument, reason); - }; - -}; -MAKE_REFLECT_TYPE_PROXY(WillSaveTextDocumentParams::TextDocumentSaveReason); - -MAKE_REFLECT_STRUCT(WillSaveTextDocumentParams::Params, textDocument, reason); - -/** - * The document save notification is sent from the client to the server when - * the document for saved in the client. - * - * Registration Options: TextDocumentSaveRegistrationOptions - */ -DEFINE_NOTIFICATION_TYPE(td_willSave, WillSaveTextDocumentParams::Params, "textDocument/willSave"); - -/** - * The document will save request is sent from the client to the server before the document is actually saved. - * The request can return an array of TextEdits which will be applied to the text document before it is saved. - * Please note that clients might drop results if computing the text edits took too long or if a server constantly fails on this request. - * This is done to keep the save fast and reliable. - * - * Registration Options: TextDocumentRegistrationOptions - */ -DEFINE_REQUEST_RESPONSE_TYPE(td_willSaveWaitUntil, - WillSaveTextDocumentParams::Params, std::vector, "textDocument/willSaveWaitUntil"); - diff --git a/graphics/asymptote/LspCpp/LibLsp/lsp/utils.cpp b/graphics/asymptote/LspCpp/LibLsp/lsp/utils.cpp deleted file mode 100644 index 532f4bf6d7..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/lsp/utils.cpp +++ /dev/null @@ -1,602 +0,0 @@ -#include "utils.h" - -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -#include "lsPosition.h" -#include "utf8.h" -#ifdef _WIN32 -#include -#endif - - -// DEFAULT_RESOURCE_DIRECTORY is passed with quotes for non-MSVC compilers, ie, -// foo vs "foo". -#if defined(_MSC_VER) -#define _STRINGIFY(x) #x -#define ENSURE_STRING_MACRO_ARGUMENT(x) _STRINGIFY(x) -#else -#define ENSURE_STRING_MACRO_ARGUMENT(x) x -#endif -#include -#include -#include -namespace lsp -{ - - -// See http://stackoverflow.com/a/2072890 -bool EndsWith(std::string value, std::string ending) { - if (ending.size() > value.size()) - return false; - return std::equal(ending.rbegin(), ending.rend(), value.rbegin()); -} - -bool StartsWith(std::string value, std::string start) { - if (start.size() > value.size()) - return false; - return std::equal(start.begin(), start.end(), value.begin()); -} - -bool AnyStartsWith(const std::vector& values, - const std::string& start) { - return std::any_of( - std::begin(values), std::end(values), - [&start](const std::string& value) { return StartsWith(value, start); }); -} - -bool StartsWithAny(const std::string& value, - const std::vector& startings) { - return std::any_of(std::begin(startings), std::end(startings), - [&value](const std::string& starting) { - return StartsWith(value, starting); - }); -} - -bool EndsWithAny(const std::string& value, - const std::vector& endings) { - return std::any_of( - std::begin(endings), std::end(endings), - [&value](const std::string& ending) { return EndsWith(value, ending); }); -} - -bool FindAnyPartial(const std::string& value, - const std::vector& values) { - return std::any_of(std::begin(values), std::end(values), - [&value](const std::string& v) { - return value.find(v) != std::string::npos; - }); -} - -std::string GetDirName(std::string path) { - - ReplaceAll(path, "\\", "/"); - if (path.size() && path.back() == '/') - path.pop_back(); - size_t last_slash = path.find_last_of('/'); - if (last_slash == std::string::npos) - return "./"; - return path.substr(0, last_slash + 1); -} - -std::string GetBaseName(const std::string& path) { - size_t last_slash = path.find_last_of('/'); - if (last_slash != std::string::npos && (last_slash + 1) < path.size()) - return path.substr(last_slash + 1); - return path; -} - -std::string StripFileType(const std::string& path) { - size_t last_period = path.find_last_of('.'); - if (last_period != std::string::npos) - return path.substr(0, last_period); - return path; -} - -// See http://stackoverflow.com/a/29752943 -std::string ReplaceAll(const std::string& source, - const std::string& from, - const std::string& to) { - std::string result; - result.reserve(source.length()); // avoids a few memory allocations - - std::string::size_type last_pos = 0; - std::string::size_type find_pos; - - while (std::string::npos != (find_pos = source.find(from, last_pos))) { - result.append(source, last_pos, find_pos - last_pos); - result += to; - last_pos = find_pos + from.length(); - } - - // Care for the rest after last occurrence - result += source.substr(last_pos); - - return result; -} - -std::vector SplitString(const std::string& str, - const std::string& delimiter) { - // http://stackoverflow.com/a/13172514 - std::vector strings; - - std::string::size_type pos = 0; - std::string::size_type prev = 0; - while ((pos = str.find(delimiter, prev)) != std::string::npos) { - strings.emplace_back(str.substr(prev, pos - prev)); - prev = pos + 1; - } - - // To get the last substring (or only, if delimiter is not found) - strings.emplace_back(str.substr(prev)); - - return strings; -} - -void EnsureEndsInSlash(std::string& path) { - if (path.empty() || path[path.size() - 1] != '/') - path += '/'; -} - -std::string EscapeFileName(std::string path) { - if (path.size() && path.back() == '/') - path.pop_back(); - std::replace(path.begin(), path.end(), '\\', '@'); - std::replace(path.begin(), path.end(), '/', '@'); - std::replace(path.begin(), path.end(), ':', '@'); - return path; -} - -// http://stackoverflow.com/a/6089413 -std::istream& SafeGetline(std::istream& is, std::string& t) { - t.clear(); - - // The characters in the stream are read one-by-one using a std::streambuf. - // That is faster than reading them one-by-one using the std::istream. Code - // that uses streambuf this way must be guarded by a sentry object. The sentry - // object performs various tasks, such as thread synchronization and updating - // the stream state. - - std::istream::sentry se(is, true); - std::streambuf* sb = is.rdbuf(); - - for (;;) { - int c = sb->sbumpc(); - if (c == EOF) { - // Also handle the case when the last line has no line ending - if (t.empty()) - is.setstate(std::ios::eofbit); - return is; - } - - t += (char)c; - - if (c == '\n') - return is; - } -} - -bool FileExists(const std::string& filename) { - std::ifstream cache(filename); - return cache.is_open(); -} - -boost::optional ReadContent(const AbsolutePath& filename) { - - std::ifstream cache; - cache.open(filename.path); - - try { - return std::string(std::istreambuf_iterator(cache), - std::istreambuf_iterator()); - } catch (std::ios_base::failure&) { - return {}; - } -} - -std::vector ReadLinesWithEnding(const AbsolutePath& filename) { - std::vector result; - - std::ifstream input(filename.path); - for (std::string line; SafeGetline(input, line);) - result.emplace_back(line); - - return result; -} - -bool WriteToFile(const std::string& filename, const std::string& content) { - std::ofstream file(filename, - std::ios::out | std::ios::trunc | std::ios::binary); - if (!file.good()) { - - return false; - } - - file << content; - return true; -} - - -std::string FormatMicroseconds(long long microseconds) { - long long milliseconds = microseconds / 1000; - long long remaining = microseconds - milliseconds; - - // Only show two digits after the dot. - while (remaining >= 100) - remaining /= 10; - - return std::to_string(milliseconds) + "." + std::to_string(remaining) + "ms"; -} - - - -std::string UpdateToRnNewlines(std::string output) { - size_t idx = 0; - while (true) { - idx = output.find('\n', idx); - - // No more matches. - if (idx == std::string::npos) - break; - - // Skip an existing "\r\n" match. - if (idx > 0 && output[idx - 1] == '\r') { - ++idx; - continue; - } - - // Replace "\n" with "\r|n". - output.replace(output.begin() + idx, output.begin() + idx + 1, "\r\n"); - } - - return output; -} - - - -bool IsAbsolutePath(const std::string& path) { - return IsUnixAbsolutePath(path) || IsWindowsAbsolutePath(path); -} - -bool IsUnixAbsolutePath(const std::string& path) { - return !path.empty() && path[0] == '/'; -} - -bool IsWindowsAbsolutePath(const std::string& path) { - auto is_drive_letter = [](char c) { - return (c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z'); - }; - - return path.size() > 3 && path[1] == ':' && - (path[2] == '/' || path[2] == '\\') && is_drive_letter(path[0]); -} - -bool IsDirectory(const std::string& path) { - struct stat path_stat; - - if (stat(path.c_str(), &path_stat) != 0) { - perror("cannot access path"); - return false; - } - - return path_stat.st_mode & S_IFDIR; -} - - -std::string ws2s(std::wstring const& wstr) { - - std::string narrow; - utf8::utf32to8(wstr.begin(), wstr.end(), std::back_inserter(narrow)); - return narrow; -} -std::wstring s2ws(const std::string& str) { - std::wstring wide; - utf8::utf8to32(str.begin(), str.end(), std::back_inserter(wide)); - return wide; -} - - -#ifdef _WIN32 - -#else -// Returns the canonicalized absolute pathname, without expanding symbolic -// links. This is a variant of realpath(2), C++ rewrite of -// https://github.com/freebsd/freebsd/blob/master/lib/libc/stdlib/realpath.c -AbsolutePath RealPathNotExpandSymlink(std::string path, - bool ensure_exists) { - if (path.empty()) { - errno = EINVAL; - return {}; - } - if (path[0] == '\0') { - errno = ENOENT; - return {}; - } - - // Do not use PATH_MAX because it is tricky on Linux. - // See https://eklitzke.org/path-max-is-tricky - char tmp[1024]; - std::string resolved; - size_t i = 0; - struct stat sb; - if (path[0] == '/') { - resolved = "/"; - i = 1; - } - else { - if (!getcwd(tmp, sizeof tmp) && ensure_exists) - return {}; - resolved = tmp; - } - - while (i < path.size()) { - auto j = path.find('/', i); - if (j == std::string::npos) - j = path.size(); - auto next_token = path.substr(i, j - i); - i = j + 1; - if (resolved.back() != '/') - resolved += '/'; - if (next_token.empty() || next_token == ".") { - // Handle consequential slashes and "." - continue; - } - else if (next_token == "..") { - // Strip the last path component except when it is single "/" - if (resolved.size() > 1) - resolved.resize(resolved.rfind('/', resolved.size() - 2) + 1); - continue; - } - // Append the next path component. - // Here we differ from realpath(3), we use stat(2) instead of - // lstat(2) because we do not want to resolve symlinks. - resolved += next_token; - if (stat(resolved.c_str(), &sb) != 0 && ensure_exists) - return {}; - if (!S_ISDIR(sb.st_mode) && j < path.size() && ensure_exists) { - errno = ENOTDIR; - return {}; - } - } - - // Remove trailing slash except when a single "/". - if (resolved.size() > 1 && resolved.back() == '/') - resolved.pop_back(); - return AbsolutePath(resolved, true /*validate*/); -} -#endif - - -AbsolutePath NormalizePath(const std::string& path0, - bool ensure_exists , - bool force_lower_on_windows) { -#ifdef _WIN32 - - std::wstring path = lsp::s2ws(path0); - - wchar_t buffer[MAX_PATH] = (L""); - - // Normalize the path name, ie, resolve `..`. - unsigned long len = GetFullPathNameW(path.c_str(), MAX_PATH, buffer, nullptr); - if (!len) - return {}; - path = std::wstring(buffer, len); - - // Get the actual casing of the path, ie, if the file on disk is `C:\FooBar` - // and this function is called with `c:\fooBar` this will return `c:\FooBar`. - // (drive casing is lowercase). - if (ensure_exists) { - len = GetLongPathNameW(path.c_str(), buffer, MAX_PATH); - if (!len) - return {}; - path = std::wstring(buffer, len); - } - - // Empty paths have no meaning. - if (path.empty()) - return {}; - - // We may need to normalize the drive name to upper-case; at the moment - // vscode sends lower-case path names. - /* - path[0] = toupper(path[0]); - */ - // Make the path all lower-case, since windows is case-insensitive. - if (force_lower_on_windows) { - for (size_t i = 0; i < path.size(); ++i) - path[i] = (wchar_t)tolower(path[i]); - } - - // cquery assumes forward-slashes. - std::replace(path.begin(), path.end(), '\\', '/'); - - - return AbsolutePath(lsp::ws2s(path), false /*validate*/); -#else - - return RealPathNotExpandSymlink(path0, ensure_exists); - -#endif - - -} - -// VSCode (UTF-16) disagrees with Emacs lsp-mode (UTF-8) on how to represent -// text documents. -// We use a UTF-8 iterator to approximate UTF-16 in the specification (weird). -// This is good enough and fails only for UTF-16 surrogate pairs. -int GetOffsetForPosition(lsPosition position, const std::string& content) { - size_t i = 0; - // Iterate lines until we have found the correct line. - while (position.line > 0 && i < content.size()) { - if (content[i] == '\n') - position.line--; - i++; - } - // Iterate characters on the target line. - while (position.character > 0 && i < content.size()) { - if (uint8_t(content[i++]) >= 128) { - // Skip 0b10xxxxxx - while (i < content.size() && uint8_t(content[i]) >= 128 && - uint8_t(content[i]) < 192) - i++; - } - position.character--; - } - return int(i); -} - - -lsPosition GetPositionForOffset(size_t offset,const std::string& content) { - lsPosition result; - for (size_t i = 0; i < offset && i < content.length(); ++i) { - if (content[i] == '\n') { - result.line++; - result.character = 0; - } - else { - result.character++; - } - } - return result; -} - -lsPosition CharPos(const std::string& search, - char character, - int character_offset) { - lsPosition result; - size_t index = 0; - while (index < search.size()) { - char c = search[index]; - if (c == character) - break; - if (c == '\n') { - result.line += 1; - result.character = 0; - } - else { - result.character += 1; - } - ++index; - } - assert(index < search.size()); - result.character += character_offset; - return result; -} - -void scanDirsUseRecursive(const std::wstring& rootPath, std::vector& ret) -{ - namespace fs = boost::filesystem; - fs::path fullpath(rootPath); - if (!fs::exists(fullpath)) { return; } - fs::recursive_directory_iterator end_iter; - for (fs::recursive_directory_iterator iter(fullpath); iter != end_iter; iter++) { - try { - if (fs::is_directory(*iter)) { - ret.push_back(iter->path().wstring()); - } - } - catch (const std::exception& ex) { - continue; - } - } -} - -void scanDirsNoRecursive(const std::wstring& rootPath, std::vector& ret) -{ - namespace fs = boost::filesystem; - boost::filesystem::path myPath(rootPath); - if (!fs::exists(rootPath)) { return; } - boost::filesystem::directory_iterator endIter; - for (boost::filesystem::directory_iterator iter(myPath); iter != endIter; iter++) { - if (boost::filesystem::is_directory(*iter)) { - ret.push_back(iter->path().wstring()); - } - } -} - -void scanFilesUseRecursive( - const std::wstring& rootPath, - std::vector& ret, - std::wstring suf) { - namespace fs = boost::filesystem; - boost::to_lower(suf); - - fs::path fullpath(rootPath); - if (!fs::exists(fullpath)) { return; } - fs::recursive_directory_iterator end_iter; - for (fs::recursive_directory_iterator iter(fullpath); iter != end_iter; iter++) { - try { - if (!fs::is_directory(*iter) && fs::is_regular_file(*iter)) { - auto temp_path = iter->path().wstring(); - auto size = suf.size(); - if (!size) - { - ret.push_back(std::move(temp_path)); - } - else - { - - if (temp_path.size() < size) continue; - auto suf_temp = temp_path.substr(temp_path.size() - size); - boost::to_lower(suf_temp); - if (suf_temp == suf) - { - ret.push_back(std::move(temp_path)); - } - } - } - } - catch (const std::exception&) { - continue; - } - } -} - -void scanFileNamesUseRecursive(const std::wstring& rootPath, std::vector& ret, - std::wstring strSuf) -{ - scanFilesUseRecursive(rootPath, ret, strSuf); - std::vector names; - for (auto& it : ret) - { - if (it.size() >= rootPath.size()) - { - names.push_back(it.substr(rootPath.size())); - } - } - ret.swap(names); -} - -void scanFileNamesUseRecursive(const std::string& rootPath, std::vector& ret, std::string strSuf) -{ - std::vector out; - scanFileNamesUseRecursive(s2ws(rootPath), out, s2ws(strSuf)); - for (auto& it : out) - { - ret.push_back(ws2s(it)); - } -} - -void scanFilesUseRecursive(const std::string& rootPath, std::vector& ret, std::string strSuf) -{ - std::vector out; - scanFilesUseRecursive(s2ws(rootPath), out, s2ws(strSuf)); - for (auto& it : out) - { - ret.push_back(ws2s(it)); - } -} - - -} diff --git a/graphics/asymptote/LspCpp/LibLsp/lsp/utils.h b/graphics/asymptote/LspCpp/LibLsp/lsp/utils.h deleted file mode 100644 index 796b5d2569..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/lsp/utils.h +++ /dev/null @@ -1,141 +0,0 @@ -#pragma once -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "lsPosition.h" - - -namespace lsp -{ - - -// Returns true if |value| starts/ends with |start| or |ending|. -bool StartsWith(std::string value, std::string start); -bool EndsWith(std::string value, std::string ending); -bool AnyStartsWith(const std::vector& values, - const std::string& start); -bool StartsWithAny(const std::string& value, - const std::vector& startings); -bool EndsWithAny(const std::string& value, - const std::vector& endings); -bool FindAnyPartial(const std::string& value, - const std::vector& values); -// Returns the dirname of |path|, i.e. "foo/bar.cc" => "foo/", "foo" => "./", -// "/foo" => "/". The result always ends in '/'. -std::string GetDirName(std::string path); -// Returns the basename of |path|, ie, "foo/bar.cc" => "bar.cc". -std::string GetBaseName(const std::string& path); -// Returns |path| without the filetype, ie, "foo/bar.cc" => "foo/bar". -std::string StripFileType(const std::string& path); - -std::string ReplaceAll(const std::string& source, - const std::string& from, - const std::string& to); - -std::vector SplitString(const std::string& str, - const std::string& delimiter); - -template -std::string StringJoinMap(const TValues& values, - const TMap& map, - const std::string& sep = ", ") { - std::string result; - bool first = true; - for (auto& entry : values) { - if (!first) - result += sep; - first = false; - result += map(entry); - } - return result; -} - -template -std::string StringJoin(const TValues& values, const std::string& sep = ", ") { - return StringJoinMap(values, [](const std::string& entry) { return entry; }, - sep); -} - -template -bool ContainsValue(const TCollection& collection, const TValue& value) { - return std::find(std::begin(collection), std::end(collection), value) != - std::end(collection); -} - - -// Ensures that |path| ends in a slash. -void EnsureEndsInSlash(std::string& path); - -// Converts a file path to one that can be used as filename. -// e.g. foo/bar.c => foo_bar.c -std::string EscapeFileName(std::string path); - -// FIXME: Move ReadContent into ICacheManager? -bool FileExists(const std::string& filename); -boost::optional ReadContent(const AbsolutePath& filename); -std::vector ReadLinesWithEnding(const AbsolutePath& filename); - -bool WriteToFile(const std::string& filename, const std::string& content); - - -template -void RemoveIf(std::vector* vec, Fn predicate) { - vec->erase(std::remove_if(vec->begin(), vec->end(), predicate), vec->end()); -} - -std::string FormatMicroseconds(long long microseconds); - -// Makes sure all newlines in |output| are in \r\n format. -std::string UpdateToRnNewlines(std::string output); - -// Utility methods to check if |path| is absolute. -bool IsAbsolutePath(const std::string& path); -bool IsUnixAbsolutePath(const std::string& path); -bool IsWindowsAbsolutePath(const std::string& path); - -bool IsDirectory(const std::string& path); - -// string <-> wstring conversion (UTF-16), e.g. for use with Window's wide APIs. - std::string ws2s(std::wstring const& wstr); - std::wstring s2ws(std::string const& str); - -AbsolutePath NormalizePath(const std::string& path, - bool ensure_exists = true, - bool force_lower_on_windows = true); - - -int GetOffsetForPosition(lsPosition position, const std::string& content); - -// Finds the position for an |offset| in |content|. -lsPosition GetPositionForOffset(int offset, const std::string& content); - -// Utility method to find a position for the given character. -lsPosition CharPos(const std::string& search, - char character, - int character_offset = 0); - - - void scanDirsNoRecursive(const std::wstring& rootPath, std::vector& ret); - - void scanFilesUseRecursive(const std::wstring& rootPath, std::vector& ret, - std::wstring strSuf = L""); - - void scanFileNamesUseRecursive(const std::wstring& rootPath, std::vector& ret, - std::wstring strSuf = L""); - void scanFileNamesUseRecursive(const std::string& rootPath, std::vector& ret, - std::string strSuf = ""); - - void scanFilesUseRecursive(const std::string& rootPath, std::vector& ret, - std::string strSuf = ""); - - void scanDirsUseRecursive(const std::wstring& rootPath, std::vector& ret); - -} diff --git a/graphics/asymptote/LspCpp/LibLsp/lsp/windows/MessageNotify.h b/graphics/asymptote/LspCpp/LibLsp/lsp/windows/MessageNotify.h deleted file mode 100644 index 8499304f55..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/lsp/windows/MessageNotify.h +++ /dev/null @@ -1,83 +0,0 @@ -#pragma once - -#include "LibLsp/JsonRpc/NotificationInMessage.h" -#include "LibLsp/JsonRpc/RequestInMessage.h" -#include "LibLsp/JsonRpc/lsResponseMessage.h" - -// Show a message to the user. -enum class lsMessageType : int { Error = 1, Warning = 2, Info = 3, Log = 4 }; -MAKE_REFLECT_TYPE_PROXY(lsMessageType) -struct MessageParams { -/** - * The message type. - */ - - lsMessageType type = lsMessageType::Error; - -/** - * The actual message. - */ - std::string message; - - void swap(MessageParams& arg) noexcept { - lsMessageType temp = type; - type = arg.type; - arg.type = temp; - message.swap(arg.message); - } -}; -MAKE_REFLECT_STRUCT(MessageParams, type, message) - - /** - * The log message notification is send from the server to the client to ask - * the client to log a particular message. - */ -DEFINE_NOTIFICATION_TYPE(Notify_LogMessage, MessageParams, "window/logMessage") - - -/** - * The show message notification is sent from a server to a client to ask - * the client to display a particular message in the user interface. - */ -DEFINE_NOTIFICATION_TYPE(Notify_ShowMessage, MessageParams, "window/showMessage") - - - -/** - * The show message request is sent from a server to a client to ask the client to display a particular message in the - * user class. In addition to the show message notification the request allows to pass actions and to wait for an - * answer from the client. - */ -struct MessageActionItem { - /** - * A short title like 'Retry', 'Open Log' etc. - */ - - std::string title; - MAKE_SWAP_METHOD(MessageActionItem, title) -}; -MAKE_REFLECT_STRUCT(MessageActionItem, title); - - -struct ShowMessageRequestParams :public MessageParams { - /** - * The message action items to present. - */ - std::vector actions; - - MAKE_SWAP_METHOD(ShowMessageRequestParams, type, message, actions) - -}; -MAKE_REFLECT_STRUCT(ShowMessageRequestParams, type, message, actions) - -/** -* The show message request is sent from a server to a client to ask the -* client to display a particular message in the user interface. In addition -* to the show message notification the request allows to pass actions and -* to wait for an answer from the client. -*/ - -DEFINE_REQUEST_RESPONSE_TYPE(WindowShowMessage, ShowMessageRequestParams, MessageActionItem, "window/showMessage") - - - diff --git a/graphics/asymptote/LspCpp/LibLsp/lsp/working_files.cpp b/graphics/asymptote/LspCpp/LibLsp/lsp/working_files.cpp deleted file mode 100644 index 370a038274..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/lsp/working_files.cpp +++ /dev/null @@ -1,186 +0,0 @@ -#include "working_files.h" -#include -#include -#include -#include "utils.h" -#include -#include "LibLsp/lsp/AbsolutePath.h" -using namespace lsp; -struct WorkingFilesData -{ - std::map > files; - std::mutex files_mutex; // Protects |d_ptr->files|. -}; - -WorkingFile::WorkingFile(WorkingFiles& _parent, const AbsolutePath& filename, - const std::string& buffer_content) - : filename(filename), directory(filename), parent(_parent), counter(0), buffer_content(buffer_content) -{ - directory = Directory(GetDirName(filename.path)); -} - -WorkingFile::WorkingFile(WorkingFiles& _parent, const AbsolutePath& filename, - std::string&& buffer_content) - : filename(filename), directory(filename), parent(_parent), counter(0), buffer_content(buffer_content) -{ - directory = Directory(GetDirName(filename.path)); -} - -WorkingFiles::WorkingFiles():d_ptr(new WorkingFilesData()) -{ -} - -WorkingFiles::~WorkingFiles() -{ - delete d_ptr; - -} - - - -void WorkingFiles::CloseFilesInDirectory(const std::vector& directories) -{ - std::lock_guard lock(d_ptr->files_mutex); - std::vector files_to_be_delete; - - for(auto& it : d_ptr->files) - { - for (auto& dir : directories) - { - if (it.second->directory == dir) { - files_to_be_delete.emplace_back(it.first); - } - } - } - - for(auto& it : files_to_be_delete) - { - d_ptr->files.erase(it); - } -} - - - - -std::shared_ptr WorkingFiles::GetFileByFilename(const AbsolutePath& filename) { - std::lock_guard lock(d_ptr->files_mutex); - return GetFileByFilenameNoLock(filename); -} - -std::shared_ptr WorkingFiles::GetFileByFilenameNoLock( - const AbsolutePath& filename) { - const auto findIt = d_ptr->files.find(filename); - if ( findIt != d_ptr->files.end()) - { - return findIt->second; - } - return nullptr; -} - - - -std::shared_ptr WorkingFiles::OnOpen( lsTextDocumentItem& open) { - std::lock_guard lock(d_ptr->files_mutex); - - AbsolutePath filename = open.uri.GetAbsolutePath(); - - // The file may already be open. - if (auto file = GetFileByFilenameNoLock(filename)) { - file->version = open.version; - file->buffer_content.swap(open.text); - - return file; - } - - const auto& it = d_ptr->files.insert({ filename,std::make_shared(*this,filename, std::move(open.text)) }); - return it.first->second; -} - - -std::shared_ptr WorkingFiles::OnChange(const lsTextDocumentDidChangeParams& change) { - std::lock_guard lock(d_ptr->files_mutex); - - AbsolutePath filename = change.textDocument.uri.GetAbsolutePath(); - auto file = GetFileByFilenameNoLock(filename); - if (!file) { - return {}; - } - - if (change.textDocument.version) - file->version = *change.textDocument.version; - file->counter.fetch_add(1, std::memory_order_relaxed); - for (const lsTextDocumentContentChangeEvent& diff : change.contentChanges) { - // Per the spec replace everything if the rangeLength and range are not set. - // See https://github.com/Microsoft/language-server-protocol/issues/9. - if (!diff.range) { - file->buffer_content = diff.text; - - } else { - int start_offset = - GetOffsetForPosition(diff.range->start, file->buffer_content); - // Ignore TextDocumentContentChangeEvent.rangeLength which causes trouble - // when UTF-16 surrogate pairs are used. - int end_offset = - GetOffsetForPosition(diff.range->end, file->buffer_content); - file->buffer_content.replace(file->buffer_content.begin() + start_offset, - file->buffer_content.begin() + end_offset, - diff.text); - - } - } - return file; -} - -bool WorkingFiles::OnClose(const lsTextDocumentIdentifier& close) { - std::lock_guard lock(d_ptr->files_mutex); - - AbsolutePath filename = close.uri.GetAbsolutePath(); - const auto findIt = d_ptr->files.find(filename); - if( findIt != d_ptr->files.end()) - { - d_ptr->files.erase(findIt); - return true; - } - return false; -} - -std::shared_ptr WorkingFiles::OnSave(const lsTextDocumentIdentifier& _save) -{ - std::lock_guard lock(d_ptr->files_mutex); - - AbsolutePath filename = _save.uri.GetAbsolutePath(); - const auto findIt = d_ptr->files.find(filename); - if (findIt != d_ptr->files.end()) - { - std::shared_ptr& file = findIt->second; - lsp::WriteToFile(file->filename, file->GetContentNoLock()); - return findIt->second; - } - return {}; - -} - -bool WorkingFiles::GetFileBufferContent(std::shared_ptr&file, std::string& out) -{ - std::lock_guard lock(d_ptr->files_mutex); - if (file) - { - out = file->buffer_content; - return true; - } - return false; -} -bool WorkingFiles::GetFileBufferContent(std::shared_ptr& file, std::wstring& out) -{ - std::lock_guard lock(d_ptr->files_mutex); - if (file) - { - out = lsp::s2ws(file->buffer_content); - return true; - } - return false; -} -void WorkingFiles::Clear() { - std::lock_guard lock(d_ptr->files_mutex); - d_ptr->files.clear(); -} \ No newline at end of file diff --git a/graphics/asymptote/LspCpp/LibLsp/lsp/working_files.h b/graphics/asymptote/LspCpp/LibLsp/lsp/working_files.h deleted file mode 100644 index e305fee8d0..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/lsp/working_files.h +++ /dev/null @@ -1,72 +0,0 @@ -#pragma once - -#include "LibLsp/lsp/lsp_diagnostic.h" -#include "LibLsp/lsp/AbsolutePath.h" -#include "LibLsp/lsp/textDocument/did_change.h" -#include "LibLsp/lsp/textDocument/did_close.h" -#include "LibLsp/lsp/textDocument/did_open.h" -#include -#include -#include -#include "Directory.h" - -struct WorkingFiles; -struct WorkingFilesData; -struct WorkingFile { - - int version = 0; - AbsolutePath filename; - Directory directory; - WorkingFiles& parent; - std::atomic counter; - WorkingFile(WorkingFiles& ,const AbsolutePath& filename, const std::string& buffer_content); - WorkingFile(WorkingFiles&, const AbsolutePath& filename, std::string&& buffer_content); - const std::string& GetContentNoLock() const - { - return buffer_content; - } -protected: - friend struct WorkingFiles; - std::string buffer_content; -}; - -struct WorkingFiles { - - WorkingFiles(); - ~WorkingFiles(); - - void CloseFilesInDirectory(const std::vector&); - std::shared_ptr OnOpen(lsTextDocumentItem& open); - std::shared_ptr OnChange(const lsTextDocumentDidChangeParams& change); - bool OnClose(const lsTextDocumentIdentifier& close); - std::shared_ptr OnSave(const lsTextDocumentIdentifier& _save); - - bool GetFileBufferContent(const AbsolutePath& filename, std::wstring& out) - { - auto file = GetFileByFilename(filename); - if(!file) - return false; - return GetFileBufferContent(file, out); - } - bool GetFileBufferContent(const AbsolutePath& filename,std::string& out) - { - auto file = GetFileByFilename(filename); - if (!file) - return false; - return GetFileBufferContent(file, out); - } - bool GetFileBufferContent(std::shared_ptr&, std::string& out); - bool GetFileBufferContent(std::shared_ptr&, std::wstring& out); - - - // Find the file with the given filename. - std::shared_ptr GetFileByFilename(const AbsolutePath& filename); - - void Clear(); -private: - std::shared_ptr GetFileByFilenameNoLock(const AbsolutePath& filename); - - WorkingFilesData* d_ptr; - - -}; diff --git a/graphics/asymptote/LspCpp/LibLsp/lsp/workspace/applyEdit.h b/graphics/asymptote/LspCpp/LibLsp/lsp/workspace/applyEdit.h deleted file mode 100644 index 7e2d8bee0a..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/lsp/workspace/applyEdit.h +++ /dev/null @@ -1,42 +0,0 @@ -#pragma once - -#include "LibLsp/JsonRpc/RequestInMessage.h" -#include "LibLsp/JsonRpc/lsResponseMessage.h" - -#include "LibLsp/lsp/lsDocumentUri.h" -#include "LibLsp/lsp/lsWorkspaceEdit.h" - -struct ApplyWorkspaceEditParams -{ - /** - * The edits to apply. - */ - - lsWorkspaceEdit edit; - - /** - * An optional label of the workspace edit. This label is - * presented in the user interface for example on an undo - * stack to undo the workspace edit. - */ - std::string label; - - MAKE_SWAP_METHOD(ApplyWorkspaceEditParams, edit, label) -}; -/** - * The workspace/applyEdit request is sent from the server to the client to modify resource on the client side. - */ -MAKE_REFLECT_STRUCT(ApplyWorkspaceEditParams, edit, label); - - - -struct ApplyWorkspaceEditResponse -{ - bool applied; - boost::optional failureReason; - MAKE_SWAP_METHOD(ApplyWorkspaceEditResponse, applied, failureReason) -}; -MAKE_REFLECT_STRUCT(ApplyWorkspaceEditResponse, applied, failureReason); - - -DEFINE_REQUEST_RESPONSE_TYPE(WorkspaceApply, ApplyWorkspaceEditParams, ApplyWorkspaceEditResponse, "workspace/applyEdit"); diff --git a/graphics/asymptote/LspCpp/LibLsp/lsp/workspace/configuration.h b/graphics/asymptote/LspCpp/LibLsp/lsp/workspace/configuration.h deleted file mode 100644 index f7709aa607..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/lsp/workspace/configuration.h +++ /dev/null @@ -1,37 +0,0 @@ -#pragma once - -#include "LibLsp/JsonRpc/RequestInMessage.h" -#include "LibLsp/JsonRpc/lsResponseMessage.h" - -#include "LibLsp/lsp/lsDocumentUri.h" - - -struct ConfigurationItem { - /** - * The scope to get the configuration section for. - */ - lsDocumentUri scopeUri; - - /** - * The configuration section asked for. - */ - std::string section; - MAKE_SWAP_METHOD(ConfigurationItem, scopeUri, section); -}; -MAKE_REFLECT_STRUCT(ConfigurationItem, scopeUri, section); -struct ConfigurationParams -{ - std::vector items; - MAKE_SWAP_METHOD(ConfigurationParams, items) -}; - -MAKE_REFLECT_STRUCT(ConfigurationParams, items); - -/** - * The workspace/configuration request is sent from the server to the client to fetch - * configuration settings from the client. The request can fetch n configuration settings - * in one roundtrip. The order of the returned configuration settings correspond to the - * order of the passed ConfigurationItems (e.g. the first item in the response is the - * result for the first configuration item in the params). - */ -DEFINE_REQUEST_RESPONSE_TYPE(WorkspaceConfiguration, ConfigurationParams,std::vector, "workspace/configuration"); \ No newline at end of file diff --git a/graphics/asymptote/LspCpp/LibLsp/lsp/workspace/didChangeWorkspaceFolders.h b/graphics/asymptote/LspCpp/LibLsp/lsp/workspace/didChangeWorkspaceFolders.h deleted file mode 100644 index 78f000f30d..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/lsp/workspace/didChangeWorkspaceFolders.h +++ /dev/null @@ -1,48 +0,0 @@ -#pragma once -#include "LibLsp/JsonRpc/NotificationInMessage.h" -#include "LibLsp/lsp/workspace/workspaceFolders.h" -/** - * The workspace folder change event. - */ -struct WorkspaceFoldersChangeEvent { - /** - * The array of added workspace folders - */ - - std::vector added; - - /** - * The array of the removed workspace folders - */ - - std::vector removed; - MAKE_SWAP_METHOD(WorkspaceFoldersChangeEvent, added, removed); - -}; -MAKE_REFLECT_STRUCT(WorkspaceFoldersChangeEvent, added, removed); - -struct DidChangeWorkspaceFoldersParams { - /** - * The actual workspace folder change event. - */ - - WorkspaceFoldersChangeEvent event; - - MAKE_SWAP_METHOD(DidChangeWorkspaceFoldersParams, event); -}; -MAKE_REFLECT_STRUCT(DidChangeWorkspaceFoldersParams, event); - - -/** - * The workspace/didChangeWorkspaceFolders notification is sent from the client - * to the server to inform the server about workspace folder configuration changes. - * The notification is sent by default if both ServerCapabilities/workspaceFolders - * and ClientCapabilities/workspace/workspaceFolders are true; or if the server has - * registered to receive this notification it first. - */ -DEFINE_NOTIFICATION_TYPE(Notify_WorkspaceDidChangeWorkspaceFolders, - DidChangeWorkspaceFoldersParams, "workspace/didChangeWorkspaceFolders"); - - - - diff --git a/graphics/asymptote/LspCpp/LibLsp/lsp/workspace/did_change_configuration.h b/graphics/asymptote/LspCpp/LibLsp/lsp/workspace/did_change_configuration.h deleted file mode 100644 index 8f8acceea4..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/lsp/workspace/did_change_configuration.h +++ /dev/null @@ -1,25 +0,0 @@ -#pragma once - -#include "LibLsp/JsonRpc/NotificationInMessage.h" - - -#include "workspaceFolders.h" - - - - -struct lsDidChangeConfigurationParams { - /** - * The actual changed settings. - */ - lsp::Any settings; - MAKE_SWAP_METHOD(lsDidChangeConfigurationParams, settings); -}; - -MAKE_REFLECT_STRUCT(lsDidChangeConfigurationParams, settings); - -/** - * A notification sent from the client to the server to signal the change of - * configuration settings. - */ -DEFINE_NOTIFICATION_TYPE(Notify_WorkspaceDidChangeConfiguration, lsDidChangeConfigurationParams, "workspace/didChangeConfiguration"); diff --git a/graphics/asymptote/LspCpp/LibLsp/lsp/workspace/did_change_watched_files.h b/graphics/asymptote/LspCpp/LibLsp/lsp/workspace/did_change_watched_files.h deleted file mode 100644 index c14a7e0eda..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/lsp/workspace/did_change_watched_files.h +++ /dev/null @@ -1,46 +0,0 @@ -#pragma once - -#include "LibLsp/JsonRpc/NotificationInMessage.h" -#include "LibLsp/lsp/lsDocumentUri.h" -enum class lsFileChangeType { - Created = 1, - Changed = 2, - Deleted = 3, -}; - -#ifdef _WIN32 -MAKE_REFLECT_TYPE_PROXY(lsFileChangeType); -#else -//#pragma clang diagnostic push -//#pragma clang diagnostic ignored "-Wunused-function" -MAKE_REFLECT_TYPE_PROXY(lsFileChangeType); -//#pragma clang diagnostic pop -#endif - - -/** - * An event describing a file change. - */ -struct lsFileEvent { - lsDocumentUri uri; - lsFileChangeType type; - - MAKE_SWAP_METHOD(lsFileEvent, uri, type) -}; -MAKE_REFLECT_STRUCT(lsFileEvent, uri, type); - -struct lsDidChangeWatchedFilesParams { - std::vector changes; - MAKE_SWAP_METHOD(lsDidChangeWatchedFilesParams, changes); -}; -MAKE_REFLECT_STRUCT(lsDidChangeWatchedFilesParams, changes); - - /** - * The workspace/didChangeWorkspaceFolders notification is sent from the client - * to the server to inform the server about workspace folder configuration changes. - * The notification is sent by default if both ServerCapabilities/workspaceFolders - * and ClientCapabilities/workspace/workspaceFolders are true; or if the server has - * registered to receive this notification it first. - */ - -DEFINE_NOTIFICATION_TYPE(Notify_WorkspaceDidChangeWatchedFiles, lsDidChangeWatchedFilesParams, "workspace/didChangeWatchedFiles"); diff --git a/graphics/asymptote/LspCpp/LibLsp/lsp/workspace/execute_command.h b/graphics/asymptote/LspCpp/LibLsp/lsp/workspace/execute_command.h deleted file mode 100644 index c656ee5ef7..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/lsp/workspace/execute_command.h +++ /dev/null @@ -1,24 +0,0 @@ -#pragma once - -#include "LibLsp/lsp/ExecuteCommandParams.h" - -#include "LibLsp/JsonRpc/RequestInMessage.h" -#include "LibLsp/JsonRpc/lsResponseMessage.h" - -#include "LibLsp/JsonRpc/NotificationInMessage.h" - - - -/** - * The workspace/executeCommand request is sent from the client to the - * server to trigger command execution on the server. In most cases the - * server creates a WorkspaceEdit structure and applies the changes to the - * workspace using the request workspace/applyEdit which is sent from the - * server to the client. - * - * Registration Options: ExecuteCommandRegistrationOptions - */ -DEFINE_REQUEST_RESPONSE_TYPE(wp_executeCommand, ExecuteCommandParams, lsp::Any, "workspace/executeCommand"); - - -DEFINE_NOTIFICATION_TYPE(Notify_sendNotification, ExecuteCommandParams, "workspace/notify") \ No newline at end of file diff --git a/graphics/asymptote/LspCpp/LibLsp/lsp/workspace/symbol.h b/graphics/asymptote/LspCpp/LibLsp/lsp/workspace/symbol.h deleted file mode 100644 index 129fb5e822..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/lsp/workspace/symbol.h +++ /dev/null @@ -1,16 +0,0 @@ -#pragma once - -#include "LibLsp/lsp/symbol.h" - -#include "LibLsp/JsonRpc/RequestInMessage.h" -#include "LibLsp/JsonRpc/lsResponseMessage.h" - -/** - * The workspace symbol request is sent from the client to the server to - * list project-wide symbols matching the query string. - * - * Registration Options: void - */ - -DEFINE_REQUEST_RESPONSE_TYPE(wp_symbol, WorkspaceSymbolParams, std::vector, "workspace/symbol"); - diff --git a/graphics/asymptote/LspCpp/LibLsp/lsp/workspace/workspaceFolders.h b/graphics/asymptote/LspCpp/LibLsp/lsp/workspace/workspaceFolders.h deleted file mode 100644 index 7cedcfa5f4..0000000000 --- a/graphics/asymptote/LspCpp/LibLsp/lsp/workspace/workspaceFolders.h +++ /dev/null @@ -1,34 +0,0 @@ -#pragma once - -#include "LibLsp/JsonRpc/RequestInMessage.h" -#include "LibLsp/JsonRpc/lsResponseMessage.h" - -#include "LibLsp/lsp/lsDocumentUri.h" -struct WorkspaceFolder { - /** - * The associated URI for this workspace folder. - */ - - lsDocumentUri uri; - - /** - * The name of the workspace folder. Defaults to the uri's basename. - */ - std::string name; - - MAKE_SWAP_METHOD(WorkspaceFolder, uri, name) -}; -MAKE_REFLECT_STRUCT(WorkspaceFolder, uri, name); - - -/** - * The workspace/workspaceFolders request is sent from the server to the client - * to fetch the current open list of workspace folders. - * - * @return null in the response if only a single file is open in the tool, - * an empty array if a workspace is open but no folders are configured, - * the workspace folders otherwise. - */ -DEFINE_REQUEST_RESPONSE_TYPE(WorkspaceFolders, - boost::optional, boost::optional>, "workspace/workspaceFolders"); - diff --git a/graphics/asymptote/LspCpp/LspCpp.filters b/graphics/asymptote/LspCpp/LspCpp.filters deleted file mode 100644 index 795e500f14..0000000000 --- a/graphics/asymptote/LspCpp/LspCpp.filters +++ /dev/null @@ -1,465 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hh;hpp;hxx;hm;inl;inc;ipp;xsd - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - - - {16f3c0fa-d78b-48de-ad07-3faced48badc} - - - {0b7b623e-2177-4c50-9364-51bad4e3a96d} - - - {05d4a0be-21a5-4e0e-92eb-f3246dc60fb0} - - - {555e2484-f11d-466e-b41c-263b68eda142} - - - {80aef1a6-c03b-4b19-ac86-7ec9f89dcf34} - - - {db50dfa7-d3d1-45db-9c35-6274c624de32} - - - {3fe59184-4ce8-42c3-95f8-c4af6bfef674} - - - {9f073965-fffb-414e-acc3-0b61c54a2404} - - - - - 源文件 - - - JsonRpc - - - JsonRpc - - - JsonRpc - - - JsonRpc - - - JsonRpc - - - JsonRpc - - - JsonRpc - - - lsp - - - lsp - - - lsp - - - lsp - - - lsp - - - lsp - - - lsp\general - - - lsp\textDocument - - - - - JsonRpc - - - JsonRpc - - - JsonRpc - - - JsonRpc - - - JsonRpc - - - JsonRpc - - - JsonRpc - - - JsonRpc - - - JsonRpc - - - JsonRpc - - - JsonRpc - - - JsonRpc - - - lsp - - - lsp - - - lsp - - - lsp - - - lsp - - - lsp - - - lsp - - - lsp - - - lsp - - - lsp - - - lsp - - - lsp - - - lsp - - - lsp - - - lsp - - - lsp - - - lsp - - - lsp - - - lsp - - - lsp - - - lsp - - - lsp - - - lsp - - - lsp - - - lsp - - - lsp - - - lsp - - - lsp - - - lsp\general - - - lsp\general - - - lsp\general - - - lsp\general - - - lsp\textDocument - - - lsp\textDocument - - - lsp\textDocument - - - lsp\textDocument - - - lsp\textDocument - - - lsp\textDocument - - - lsp\textDocument - - - lsp\textDocument - - - lsp\textDocument - - - lsp\textDocument - - - lsp\textDocument - - - lsp\textDocument - - - lsp\textDocument - - - lsp\textDocument - - - lsp\textDocument - - - lsp\textDocument - - - lsp\textDocument - - - lsp\textDocument - - - lsp\textDocument - - - lsp\textDocument - - - lsp\workspace - - - lsp\workspace - - - lsp\workspace - - - lsp\workspace - - - lsp - - - lsp - - - lsp\JavaExtentions - - - lsp\JavaExtentions - - - lsp\JavaExtentions - - - lsp\JavaExtentions - - - lsp\JavaExtentions - - - lsp\JavaExtentions - - - lsp\workspace - - - lsp\workspace - - - lsp\workspace - - - lsp\textDocument - - - lsp\client - - - lsp\client - - - lsp\textDocument - - - lsp\windows - - - lsp\workspace - - - lsp\textDocument - - - lsp\textDocument - - - lsp - - - lsp\JavaExtentions - - - lsp\JavaExtentions - - - lsp\JavaExtentions - - - lsp\JavaExtentions - - - lsp\JavaExtentions - - - lsp\JavaExtentions - - - lsp - - - lsp\JavaExtentions - - - lsp\JavaExtentions - - - lsp\JavaExtentions - - - lsp\JavaExtentions - - - lsp\JavaExtentions - - - lsp\JavaExtentions - - - lsp\JavaExtentions - - - lsp\JavaExtentions - - - lsp\JavaExtentions - - - lsp\JavaExtentions - - - lsp\JavaExtentions - - - lsp\JavaExtentions - - - lsp\JavaExtentions - - - lsp\general - - - lsp\general - - - lsp\general - - - lsp\general - - - lsp\general - - - lsp - - - lsp\textDocument - - - lsp\textDocument - - - lsp\textDocument - - - lsp\textDocument - - - lsp\textDocument - - - lsp\textDocument - - - lsp\textDocument - - - lsp\textDocument - - - lsp\textDocument - - - - - - \ No newline at end of file diff --git a/graphics/asymptote/LspCpp/LspCpp.user b/graphics/asymptote/LspCpp/LspCpp.user deleted file mode 100644 index 88a550947e..0000000000 --- a/graphics/asymptote/LspCpp/LspCpp.user +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/graphics/asymptote/LspCpp/LspCpp.vcxproj b/graphics/asymptote/LspCpp/LspCpp.vcxproj deleted file mode 100644 index e363e2a027..0000000000 --- a/graphics/asymptote/LspCpp/LspCpp.vcxproj +++ /dev/null @@ -1,668 +0,0 @@ - - - - - Debug - Win32 - - - Release - Win32 - - - Debug - x64 - - - Release - x64 - - - STDIO_CLIENT_EXAMPLE - Win32 - - - STDIO_CLIENT_EXAMPLE - x64 - - - STDIO_SERVER_EXAMPLE - Win32 - - - STDIO_SERVER_EXAMPLE - x64 - - - TCP_SERVER_EXAMPLE - Win32 - - - TCP_SERVER_EXAMPLE - x64 - - - WEBSOCKET_SERVER_EXAMPLE - Win32 - - - WEBSOCKET_SERVER_EXAMPLE - x64 - - - - 16.0 - {F45A78DC-E57C-4AF6-8719-29833E3BFE07} - Win32Proj - LspCpp - 7.0 - - - - StaticLibrary - true - v141_xp - Unicode - - - Application - true - v141_xp - Unicode - - - Application - true - v141_xp - Unicode - - - Application - true - v141_xp - Unicode - - - Application - true - v141_xp - Unicode - - - StaticLibrary - false - v141_xp - true - Unicode - - - Application - true - v142 - Unicode - - - Application - true - v142 - Unicode - - - Application - true - v142 - Unicode - - - Application - true - v142 - Unicode - - - Application - true - v142 - Unicode - - - Application - false - v142 - true - Unicode - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - true - .\third_party\rapidjson\include;.\third_party\utfcpp\source;.\;.\third_party\threadpool;$(IncludePath) - ..\Our_lib_V3 - LspCppMDD - .lib - - - true - .\third_party\rapidjson\include;.\third_party\utfcpp\source;.\;.\third_party\threadpool;$(IncludePath) - TCP_SERVER_EXAMPLE - - - true - .\third_party\rapidjson\include;.\third_party\utfcpp\source;.\;.\third_party\threadpool;$(IncludePath) - STDIO_SERVER_EXAMPLE - .\bin - - - true - .\third_party\rapidjson\include;.\third_party\utfcpp\source;.\;.\third_party\threadpool;$(IncludePath) - STDIO_CLIENT_EXAMPLE - .\bin - - - true - .\third_party\rapidjson\include;.\third_party\utfcpp\source;.\;.\third_party\threadpool;$(IncludePath) - WEBSOCKET_SERVER_EXAMPLE - - - true - - - true - - - true - - - true - - - true - - - false - ..\Our_lib_V3 - LspCppMD - .\third_party\rapidjson\include;.\third_party\utfcpp\source;.\;.\third_party\threadpool;$(IncludePath) - - - false - - - - - - Level3 - Disabled - false - WIN32;_DEBUG;%(PreprocessorDefinitions) - false - stdcpp14 - /Zc:__cplusplus %(AdditionalOptions) - - - Windows - true - - - - - - - Level3 - Disabled - false - WIN32;_DEBUG;TCP_SERVER_EXAMPLE;%(PreprocessorDefinitions) - false - stdcpp14 - /Zc:__cplusplus %(AdditionalOptions) - - - Console - true - - - - - - - Level3 - Disabled - false - WIN32;_DEBUG;STDIO_SERVER_EXAMPLE;%(PreprocessorDefinitions) - false - stdcpp14 - /Zc:__cplusplus %(AdditionalOptions) - - - Console - true - - - - - - - Level3 - Disabled - false - WIN32;_DEBUG;STDIO_CLIENT_EXAMPLE;%(PreprocessorDefinitions) - false - stdcpp14 - /Zc:__cplusplus %(AdditionalOptions) - - - Console - true - - - - - - - Level3 - Disabled - false - WIN32;_DEBUG;WEBSOCKET_SERVER_EXAMPLE;%(PreprocessorDefinitions) - false - stdcpp14 - /Zc:__cplusplus %(AdditionalOptions) - - - Console - true - - - - - - - Level3 - Disabled - true - _DEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - - - Console - true - - - - - - - Level3 - Disabled - true - _DEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - - - Console - true - - - - - - - Level3 - Disabled - true - _DEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - - - Console - true - - - - - - - Level3 - Disabled - true - _DEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - - - Console - true - - - - - - - Level3 - Disabled - true - _DEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - - - Console - true - - - - - - - Level3 - MaxSpeed - true - true - true - WIN32;NDEBUG;_SILENCE_CXX17_ALLOCATOR_VOID_DEPRECATION_WARNING;%(PreprocessorDefinitions) - false - /Zc:__cplusplus %(AdditionalOptions) - stdcpp14 - - - Console - true - true - true - - - - - - - Level3 - MaxSpeed - true - true - true - NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - - - Console - true - true - true - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 这台计算机上缺少此项目引用的 NuGet 程序包。使用“NuGet 程序包还原”可下载这些程序包。有关更多信息,请参见 http://go.microsoft.com/fwlink/?LinkID=322105。缺少的文件是 {0}。 - - - - - - - - - - - - - \ No newline at end of file diff --git a/graphics/asymptote/LspCpp/LspCpp.vcxproj.filters b/graphics/asymptote/LspCpp/LspCpp.vcxproj.filters deleted file mode 100644 index 6402988303..0000000000 --- a/graphics/asymptote/LspCpp/LspCpp.vcxproj.filters +++ /dev/null @@ -1,669 +0,0 @@ - - - - - JsonRpc - - - JsonRpc - - - JsonRpc - - - JsonRpc - - - JsonRpc - - - lsp - - - lsp\general - - - lsp\textDocument - - - network\uri\detail - - - network\uri\detail - - - network\uri\detail - - - network\uri\detail - - - network\uri\detail - - - network\uri - - - network\uri - - - network\uri - - - JsonRpc - - - JsonRpc - - - example - - - example - - - example - - - example - - - lsp\extention\sct - - - JsonRpc - - - JsonRpc - - - lsp - - - lsp - - - lsp - - - lsp - - - lsp - - - JsonRpc - - - lsp\markdown - - - JsonRpc - - - - - JsonRpc - - - JsonRpc - - - JsonRpc - - - JsonRpc - - - JsonRpc - - - JsonRpc - - - JsonRpc - - - JsonRpc - - - JsonRpc - - - lsp - - - lsp - - - lsp - - - lsp - - - lsp - - - lsp - - - lsp - - - lsp - - - lsp - - - lsp - - - lsp - - - lsp - - - lsp - - - lsp - - - lsp - - - lsp - - - lsp - - - lsp - - - lsp - - - lsp - - - lsp - - - lsp - - - lsp - - - lsp\general - - - lsp\general - - - lsp\general - - - lsp\textDocument - - - lsp\textDocument - - - lsp\textDocument - - - lsp\textDocument - - - lsp\textDocument - - - lsp\textDocument - - - lsp\textDocument - - - lsp\textDocument - - - lsp\textDocument - - - lsp\textDocument - - - lsp\textDocument - - - lsp\textDocument - - - lsp\textDocument - - - lsp\textDocument - - - lsp\textDocument - - - lsp\textDocument - - - lsp\textDocument - - - lsp\textDocument - - - lsp\textDocument - - - lsp\textDocument - - - lsp\workspace - - - lsp\workspace - - - lsp\workspace - - - lsp\workspace - - - lsp - - - lsp - - - lsp\workspace - - - lsp\workspace - - - lsp\workspace - - - lsp\textDocument - - - lsp\textDocument - - - lsp\workspace - - - lsp\textDocument - - - lsp\textDocument - - - lsp - - - lsp - - - lsp\general - - - lsp\general - - - lsp\general - - - lsp\general - - - lsp\general - - - lsp - - - lsp\textDocument - - - lsp\textDocument - - - lsp\textDocument - - - lsp\textDocument - - - lsp\textDocument - - - lsp\textDocument - - - lsp\textDocument - - - lsp\textDocument - - - lsp\textDocument - - - JsonRpc - - - JsonRpc - - - JsonRpc - - - JsonRpc - - - JsonRpc - - - JsonRpc - - - lsp\windows - - - lsp - - - JsonRpc - - - lsp\general - - - network - - - network - - - network - - - network\uri\detail - - - network\uri\detail - - - network\uri\detail - - - network\uri\detail - - - network\uri\detail - - - network\uri\detail - - - network\uri\detail - - - network\uri\detail - - - network\uri\detail - - - network\uri\detail - - - network\uri\detail - - - network\uri\detail - - - network\uri - - - network\uri - - - network\uri - - - network\uri - - - network\uri - - - lsp\language - - - lsp\client - - - lsp\client - - - JsonRpc - - - lsp\textDocument - - - JsonRpc - - - JsonRpc - - - lsp\extention\jdtls - - - lsp\extention\jdtls - - - lsp\extention\jdtls - - - lsp\extention\jdtls - - - lsp\extention\jdtls - - - lsp\extention\jdtls - - - lsp\extention\jdtls - - - lsp\extention\jdtls - - - lsp\extention\jdtls - - - lsp\extention\jdtls - - - lsp\extention\jdtls - - - lsp\extention\jdtls - - - lsp\extention\jdtls - - - lsp\extention\jdtls - - - lsp\extention\jdtls - - - lsp\extention\jdtls - - - lsp\extention\jdtls - - - lsp\extention\jdtls - - - lsp\extention\jdtls - - - lsp\extention\jdtls - - - lsp\extention\jdtls - - - lsp\extention\jdtls - - - lsp\extention\jdtls - - - lsp\extention\jdtls - - - lsp\extention\jdtls - - - lsp\extention\sct - - - lsp\extention\sct - - - lsp\extention\sct - - - lsp\extention\sonarlint - - - lsp - - - lsp - - - lsp - - - lsp - - - lsp\general - - - lsp - - - lsp - - - JsonRpc - - - JsonRpc - - - lsp\textDocument - - - lsp\textDocument - - - lsp - - - lsp\markdown - - - lsp\markdown - - - JsonRpc - - - JsonRpc - - - lsp - - - - - {1da4afb3-155d-423f-96b0-1b8da9acc00a} - - - {e7d76738-44b8-4a69-a1c4-2faa28c9a4e4} - - - {b79907e9-c622-4c4a-ba4a-856d5a924cb3} - - - {b5ab5370-6e7b-4a19-b08a-0d60880be5c2} - - - {24b7fc1b-1430-4833-afc1-7215028d56b3} - - - {09427494-f677-443b-b1f9-20cf6e6976f5} - - - {43293649-591a-46e4-ae6d-93de432e5202} - - - {8e1c4f26-61b7-45f3-9fca-8a709d53e924} - - - {fca88b35-e5ec-4b6c-8e48-e7ddb54f6c5f} - - - {c2661f3d-8e6b-4e9c-9f8f-7b1c533198a9} - - - {7dc366bb-0edc-4d01-b61b-b9a25911ab44} - - - {50042bb3-ac58-43e1-8cbe-0af2d1c58599} - - - {0091cb64-52d3-4c82-a25a-0a9b976182fe} - - - {9a310695-9678-42c9-9085-412e178574d4} - - - {b2e6e5b5-343f-4098-8105-4f054b3e9b38} - - - {11198774-b392-4339-b654-17aee0eeaa21} - - - {4ce2a4b8-aa8d-462b-a6c9-c11b56e3bb2d} - - - - - - \ No newline at end of file diff --git a/graphics/asymptote/LspCpp/LspCpp.vcxproj.user b/graphics/asymptote/LspCpp/LspCpp.vcxproj.user deleted file mode 100644 index 88a550947e..0000000000 --- a/graphics/asymptote/LspCpp/LspCpp.vcxproj.user +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/graphics/asymptote/LspCpp/Makefile b/graphics/asymptote/LspCpp/Makefile index 72d5c3fedf..9883a49942 100644 --- a/graphics/asymptote/LspCpp/Makefile +++ b/graphics/asymptote/LspCpp/Makefile @@ -1,40 +1,771 @@ -CXX=g++ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 3.20 -CFLAGS = -Wall -fPIE -INCLUDES=-I. -ILibLsp/lsp/extention/jdtls/ -ILibLsp/JsonRpc/ -ILibLsp/JsonRpc/lsp/extention/jdtls \ - -Ithird_party/threadpool -Ithird_party/utfcpp/source -Ithird_party/rapidjson/include -CXXFLAGS = -std=c++14 -OPTFLAGS = -O3 +# Default target executed when no arguments are given to make. +default_target: all +.PHONY : default_target -ALL_CXXFLAGS = $(CFLAGS) $(CXXFLAGS) $(CPPFLAGS) $(INCLUDES) $(OPTFLAGS) +# Allow only one "make -f Makefile2" at a time, but pass parallelism. +.NOTPARALLEL: -NETWORKS_DETAIL = $(addprefix detail/, uri_advance_parts.o \ - uri_normalize.o uri_parse.o uri_parse_authority.o uri_resolve.o) -NETWORK_FILES = $(addprefix uri/, uri.o uri_builder.o uri_errors.o $(NETWORKS_DETAIL)) -LSP_FILES = extention/sct/sct.o general/initialize.o lsp.o lsp_diagnostic.o \ - ProtocolJsonHandler.o textDocument/textDocument.o Markup/Markup.o ParentProcessWatcher.o \ - utils.o working_files.o -JSONRPC_FILES = TcpServer.o threaded_queue.o WebSocketServer.o RemoteEndPoint.o \ - Endpoint.o message.o MessageJsonHandler.o serializer.o StreamMessageProducer.o \ - Context.o GCThreadContext.o +#============================================================================= +# Special targets provided by cmake. -OFILES = $(addprefix ./network/,$(NETWORK_FILES)) \ - $(addprefix ./LibLsp/lsp/, $(LSP_FILES)) \ - $(addprefix ./LibLsp/JsonRpc/, $(JSONRPC_FILES)) +# Disable implicit rules so canonical targets will work. +.SUFFIXES: -HEADERS = $(shell find ./LibLsp ./network -regex ".*\.\(h\|hpp\)") +# Disable VCS-based implicit rules. +% : %,v -default: liblspcpp.a headers.tar.gz +# Disable VCS-based implicit rules. +% : RCS/% -liblspcpp.a: $(OFILES) - ar -r $@ $^ +# Disable VCS-based implicit rules. +% : RCS/%,v -headers.tar.gz: $(HEADERS) macro_map.h - tar -czf $@ $^ +# Disable VCS-based implicit rules. +% : SCCS/s.% -%.o: %.cpp - $(CXX) $(ALL_CXXFLAGS) $< -c -o $@ +# Disable VCS-based implicit rules. +% : s.% +.SUFFIXES: .hpux_make_needs_suffix_list + +# Command-line flag to silence nested $(MAKE). +$(VERBOSE)MAKESILENT = -s + +#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 rm -f + +# Escaping for special characters. +EQUALS = = + +# The top-level source directory on which CMake was run. +CMAKE_SOURCE_DIR = /usr/local/src/asymptote-2.78/LspCpp + +# The top-level build directory on which CMake was run. +CMAKE_BINARY_DIR = /usr/local/src/asymptote-2.78/LspCpp + +#============================================================================= +# Targets provided globally by CMake. + +# Special rule for the target install/strip +install/strip: preinstall + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing the project stripped..." + /usr/bin/cmake -DCMAKE_INSTALL_DO_STRIP=1 -P cmake_install.cmake +.PHONY : install/strip + +# Special rule for the target install/strip +install/strip/fast: preinstall/fast + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing the project stripped..." + /usr/bin/cmake -DCMAKE_INSTALL_DO_STRIP=1 -P cmake_install.cmake +.PHONY : install/strip/fast + +# Special rule for the target install/local +install/local: preinstall + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing only the local directory..." + /usr/bin/cmake -DCMAKE_INSTALL_LOCAL_ONLY=1 -P cmake_install.cmake +.PHONY : install/local + +# Special rule for the target install/local +install/local/fast: preinstall/fast + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing only the local directory..." + /usr/bin/cmake -DCMAKE_INSTALL_LOCAL_ONLY=1 -P cmake_install.cmake +.PHONY : install/local/fast + +# Special rule for the target install +install: preinstall + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Install the project..." + /usr/bin/cmake -P cmake_install.cmake +.PHONY : install + +# Special rule for the target install +install/fast: preinstall/fast + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Install the project..." + /usr/bin/cmake -P cmake_install.cmake +.PHONY : install/fast + +# Special rule for the target list_install_components +list_install_components: + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Available install components are: \"Unspecified\"" +.PHONY : list_install_components + +# Special rule for the target list_install_components +list_install_components/fast: list_install_components +.PHONY : list_install_components/fast + +# 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 --regenerate-during-build -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 "Running CMake cache editor..." + /usr/bin/ccmake -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) +.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 /usr/local/src/asymptote-2.78/LspCpp/CMakeFiles /usr/local/src/asymptote-2.78/LspCpp//CMakeFiles/progress.marks + $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 all + $(CMAKE_COMMAND) -E cmake_progress_start /usr/local/src/asymptote-2.78/LspCpp/CMakeFiles 0 +.PHONY : all + +# The main clean target clean: - find ./ -name *.o | xargs rm -rf - rm -rf *.a *.tar.gz + $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 clean +.PHONY : clean + +# The main clean target +clean/fast: clean +.PHONY : clean/fast + +# Prepare targets for installation. +preinstall: all + $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 preinstall +.PHONY : preinstall + +# Prepare targets for installation. +preinstall/fast: + $(MAKE) $(MAKESILENT) -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 lspcpp + +# Build rule for target. +lspcpp: cmake_check_build_system + $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 lspcpp +.PHONY : lspcpp + +# fast build rule for target. +lspcpp/fast: + $(MAKE) $(MAKESILENT) -f CMakeFiles/lspcpp.dir/build.make CMakeFiles/lspcpp.dir/build +.PHONY : lspcpp/fast + +#============================================================================= +# Target rules for targets named doc + +# Build rule for target. +doc: cmake_check_build_system + $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 doc +.PHONY : doc + +# fast build rule for target. +doc/fast: + $(MAKE) $(MAKESILENT) -f third_party/uri/CMakeFiles/doc.dir/build.make third_party/uri/CMakeFiles/doc.dir/build +.PHONY : doc/fast + +#============================================================================= +# Target rules for targets named network-uri + +# Build rule for target. +network-uri: cmake_check_build_system + $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 network-uri +.PHONY : network-uri + +# fast build rule for target. +network-uri/fast: + $(MAKE) $(MAKESILENT) -f third_party/uri/src/CMakeFiles/network-uri.dir/build.make third_party/uri/src/CMakeFiles/network-uri.dir/build +.PHONY : network-uri/fast + +src/jsonrpc/Context.o: src/jsonrpc/Context.cpp.o +.PHONY : src/jsonrpc/Context.o + +# target to build an object file +src/jsonrpc/Context.cpp.o: + $(MAKE) $(MAKESILENT) -f CMakeFiles/lspcpp.dir/build.make CMakeFiles/lspcpp.dir/src/jsonrpc/Context.cpp.o +.PHONY : src/jsonrpc/Context.cpp.o + +src/jsonrpc/Context.i: src/jsonrpc/Context.cpp.i +.PHONY : src/jsonrpc/Context.i + +# target to preprocess a source file +src/jsonrpc/Context.cpp.i: + $(MAKE) $(MAKESILENT) -f CMakeFiles/lspcpp.dir/build.make CMakeFiles/lspcpp.dir/src/jsonrpc/Context.cpp.i +.PHONY : src/jsonrpc/Context.cpp.i + +src/jsonrpc/Context.s: src/jsonrpc/Context.cpp.s +.PHONY : src/jsonrpc/Context.s + +# target to generate assembly for a file +src/jsonrpc/Context.cpp.s: + $(MAKE) $(MAKESILENT) -f CMakeFiles/lspcpp.dir/build.make CMakeFiles/lspcpp.dir/src/jsonrpc/Context.cpp.s +.PHONY : src/jsonrpc/Context.cpp.s + +src/jsonrpc/Endpoint.o: src/jsonrpc/Endpoint.cpp.o +.PHONY : src/jsonrpc/Endpoint.o + +# target to build an object file +src/jsonrpc/Endpoint.cpp.o: + $(MAKE) $(MAKESILENT) -f CMakeFiles/lspcpp.dir/build.make CMakeFiles/lspcpp.dir/src/jsonrpc/Endpoint.cpp.o +.PHONY : src/jsonrpc/Endpoint.cpp.o + +src/jsonrpc/Endpoint.i: src/jsonrpc/Endpoint.cpp.i +.PHONY : src/jsonrpc/Endpoint.i + +# target to preprocess a source file +src/jsonrpc/Endpoint.cpp.i: + $(MAKE) $(MAKESILENT) -f CMakeFiles/lspcpp.dir/build.make CMakeFiles/lspcpp.dir/src/jsonrpc/Endpoint.cpp.i +.PHONY : src/jsonrpc/Endpoint.cpp.i + +src/jsonrpc/Endpoint.s: src/jsonrpc/Endpoint.cpp.s +.PHONY : src/jsonrpc/Endpoint.s + +# target to generate assembly for a file +src/jsonrpc/Endpoint.cpp.s: + $(MAKE) $(MAKESILENT) -f CMakeFiles/lspcpp.dir/build.make CMakeFiles/lspcpp.dir/src/jsonrpc/Endpoint.cpp.s +.PHONY : src/jsonrpc/Endpoint.cpp.s + +src/jsonrpc/GCThreadContext.o: src/jsonrpc/GCThreadContext.cpp.o +.PHONY : src/jsonrpc/GCThreadContext.o + +# target to build an object file +src/jsonrpc/GCThreadContext.cpp.o: + $(MAKE) $(MAKESILENT) -f CMakeFiles/lspcpp.dir/build.make CMakeFiles/lspcpp.dir/src/jsonrpc/GCThreadContext.cpp.o +.PHONY : src/jsonrpc/GCThreadContext.cpp.o + +src/jsonrpc/GCThreadContext.i: src/jsonrpc/GCThreadContext.cpp.i +.PHONY : src/jsonrpc/GCThreadContext.i + +# target to preprocess a source file +src/jsonrpc/GCThreadContext.cpp.i: + $(MAKE) $(MAKESILENT) -f CMakeFiles/lspcpp.dir/build.make CMakeFiles/lspcpp.dir/src/jsonrpc/GCThreadContext.cpp.i +.PHONY : src/jsonrpc/GCThreadContext.cpp.i + +src/jsonrpc/GCThreadContext.s: src/jsonrpc/GCThreadContext.cpp.s +.PHONY : src/jsonrpc/GCThreadContext.s + +# target to generate assembly for a file +src/jsonrpc/GCThreadContext.cpp.s: + $(MAKE) $(MAKESILENT) -f CMakeFiles/lspcpp.dir/build.make CMakeFiles/lspcpp.dir/src/jsonrpc/GCThreadContext.cpp.s +.PHONY : src/jsonrpc/GCThreadContext.cpp.s + +src/jsonrpc/MessageJsonHandler.o: src/jsonrpc/MessageJsonHandler.cpp.o +.PHONY : src/jsonrpc/MessageJsonHandler.o + +# target to build an object file +src/jsonrpc/MessageJsonHandler.cpp.o: + $(MAKE) $(MAKESILENT) -f CMakeFiles/lspcpp.dir/build.make CMakeFiles/lspcpp.dir/src/jsonrpc/MessageJsonHandler.cpp.o +.PHONY : src/jsonrpc/MessageJsonHandler.cpp.o + +src/jsonrpc/MessageJsonHandler.i: src/jsonrpc/MessageJsonHandler.cpp.i +.PHONY : src/jsonrpc/MessageJsonHandler.i + +# target to preprocess a source file +src/jsonrpc/MessageJsonHandler.cpp.i: + $(MAKE) $(MAKESILENT) -f CMakeFiles/lspcpp.dir/build.make CMakeFiles/lspcpp.dir/src/jsonrpc/MessageJsonHandler.cpp.i +.PHONY : src/jsonrpc/MessageJsonHandler.cpp.i + +src/jsonrpc/MessageJsonHandler.s: src/jsonrpc/MessageJsonHandler.cpp.s +.PHONY : src/jsonrpc/MessageJsonHandler.s + +# target to generate assembly for a file +src/jsonrpc/MessageJsonHandler.cpp.s: + $(MAKE) $(MAKESILENT) -f CMakeFiles/lspcpp.dir/build.make CMakeFiles/lspcpp.dir/src/jsonrpc/MessageJsonHandler.cpp.s +.PHONY : src/jsonrpc/MessageJsonHandler.cpp.s + +src/jsonrpc/RemoteEndPoint.o: src/jsonrpc/RemoteEndPoint.cpp.o +.PHONY : src/jsonrpc/RemoteEndPoint.o + +# target to build an object file +src/jsonrpc/RemoteEndPoint.cpp.o: + $(MAKE) $(MAKESILENT) -f CMakeFiles/lspcpp.dir/build.make CMakeFiles/lspcpp.dir/src/jsonrpc/RemoteEndPoint.cpp.o +.PHONY : src/jsonrpc/RemoteEndPoint.cpp.o + +src/jsonrpc/RemoteEndPoint.i: src/jsonrpc/RemoteEndPoint.cpp.i +.PHONY : src/jsonrpc/RemoteEndPoint.i + +# target to preprocess a source file +src/jsonrpc/RemoteEndPoint.cpp.i: + $(MAKE) $(MAKESILENT) -f CMakeFiles/lspcpp.dir/build.make CMakeFiles/lspcpp.dir/src/jsonrpc/RemoteEndPoint.cpp.i +.PHONY : src/jsonrpc/RemoteEndPoint.cpp.i + +src/jsonrpc/RemoteEndPoint.s: src/jsonrpc/RemoteEndPoint.cpp.s +.PHONY : src/jsonrpc/RemoteEndPoint.s + +# target to generate assembly for a file +src/jsonrpc/RemoteEndPoint.cpp.s: + $(MAKE) $(MAKESILENT) -f CMakeFiles/lspcpp.dir/build.make CMakeFiles/lspcpp.dir/src/jsonrpc/RemoteEndPoint.cpp.s +.PHONY : src/jsonrpc/RemoteEndPoint.cpp.s + +src/jsonrpc/StreamMessageProducer.o: src/jsonrpc/StreamMessageProducer.cpp.o +.PHONY : src/jsonrpc/StreamMessageProducer.o + +# target to build an object file +src/jsonrpc/StreamMessageProducer.cpp.o: + $(MAKE) $(MAKESILENT) -f CMakeFiles/lspcpp.dir/build.make CMakeFiles/lspcpp.dir/src/jsonrpc/StreamMessageProducer.cpp.o +.PHONY : src/jsonrpc/StreamMessageProducer.cpp.o + +src/jsonrpc/StreamMessageProducer.i: src/jsonrpc/StreamMessageProducer.cpp.i +.PHONY : src/jsonrpc/StreamMessageProducer.i + +# target to preprocess a source file +src/jsonrpc/StreamMessageProducer.cpp.i: + $(MAKE) $(MAKESILENT) -f CMakeFiles/lspcpp.dir/build.make CMakeFiles/lspcpp.dir/src/jsonrpc/StreamMessageProducer.cpp.i +.PHONY : src/jsonrpc/StreamMessageProducer.cpp.i + +src/jsonrpc/StreamMessageProducer.s: src/jsonrpc/StreamMessageProducer.cpp.s +.PHONY : src/jsonrpc/StreamMessageProducer.s + +# target to generate assembly for a file +src/jsonrpc/StreamMessageProducer.cpp.s: + $(MAKE) $(MAKESILENT) -f CMakeFiles/lspcpp.dir/build.make CMakeFiles/lspcpp.dir/src/jsonrpc/StreamMessageProducer.cpp.s +.PHONY : src/jsonrpc/StreamMessageProducer.cpp.s + +src/jsonrpc/TcpServer.o: src/jsonrpc/TcpServer.cpp.o +.PHONY : src/jsonrpc/TcpServer.o + +# target to build an object file +src/jsonrpc/TcpServer.cpp.o: + $(MAKE) $(MAKESILENT) -f CMakeFiles/lspcpp.dir/build.make CMakeFiles/lspcpp.dir/src/jsonrpc/TcpServer.cpp.o +.PHONY : src/jsonrpc/TcpServer.cpp.o + +src/jsonrpc/TcpServer.i: src/jsonrpc/TcpServer.cpp.i +.PHONY : src/jsonrpc/TcpServer.i + +# target to preprocess a source file +src/jsonrpc/TcpServer.cpp.i: + $(MAKE) $(MAKESILENT) -f CMakeFiles/lspcpp.dir/build.make CMakeFiles/lspcpp.dir/src/jsonrpc/TcpServer.cpp.i +.PHONY : src/jsonrpc/TcpServer.cpp.i + +src/jsonrpc/TcpServer.s: src/jsonrpc/TcpServer.cpp.s +.PHONY : src/jsonrpc/TcpServer.s + +# target to generate assembly for a file +src/jsonrpc/TcpServer.cpp.s: + $(MAKE) $(MAKESILENT) -f CMakeFiles/lspcpp.dir/build.make CMakeFiles/lspcpp.dir/src/jsonrpc/TcpServer.cpp.s +.PHONY : src/jsonrpc/TcpServer.cpp.s + +src/jsonrpc/WebSocketServer.o: src/jsonrpc/WebSocketServer.cpp.o +.PHONY : src/jsonrpc/WebSocketServer.o + +# target to build an object file +src/jsonrpc/WebSocketServer.cpp.o: + $(MAKE) $(MAKESILENT) -f CMakeFiles/lspcpp.dir/build.make CMakeFiles/lspcpp.dir/src/jsonrpc/WebSocketServer.cpp.o +.PHONY : src/jsonrpc/WebSocketServer.cpp.o + +src/jsonrpc/WebSocketServer.i: src/jsonrpc/WebSocketServer.cpp.i +.PHONY : src/jsonrpc/WebSocketServer.i + +# target to preprocess a source file +src/jsonrpc/WebSocketServer.cpp.i: + $(MAKE) $(MAKESILENT) -f CMakeFiles/lspcpp.dir/build.make CMakeFiles/lspcpp.dir/src/jsonrpc/WebSocketServer.cpp.i +.PHONY : src/jsonrpc/WebSocketServer.cpp.i + +src/jsonrpc/WebSocketServer.s: src/jsonrpc/WebSocketServer.cpp.s +.PHONY : src/jsonrpc/WebSocketServer.s + +# target to generate assembly for a file +src/jsonrpc/WebSocketServer.cpp.s: + $(MAKE) $(MAKESILENT) -f CMakeFiles/lspcpp.dir/build.make CMakeFiles/lspcpp.dir/src/jsonrpc/WebSocketServer.cpp.s +.PHONY : src/jsonrpc/WebSocketServer.cpp.s + +src/jsonrpc/message.o: src/jsonrpc/message.cpp.o +.PHONY : src/jsonrpc/message.o + +# target to build an object file +src/jsonrpc/message.cpp.o: + $(MAKE) $(MAKESILENT) -f CMakeFiles/lspcpp.dir/build.make CMakeFiles/lspcpp.dir/src/jsonrpc/message.cpp.o +.PHONY : src/jsonrpc/message.cpp.o + +src/jsonrpc/message.i: src/jsonrpc/message.cpp.i +.PHONY : src/jsonrpc/message.i + +# target to preprocess a source file +src/jsonrpc/message.cpp.i: + $(MAKE) $(MAKESILENT) -f CMakeFiles/lspcpp.dir/build.make CMakeFiles/lspcpp.dir/src/jsonrpc/message.cpp.i +.PHONY : src/jsonrpc/message.cpp.i + +src/jsonrpc/message.s: src/jsonrpc/message.cpp.s +.PHONY : src/jsonrpc/message.s + +# target to generate assembly for a file +src/jsonrpc/message.cpp.s: + $(MAKE) $(MAKESILENT) -f CMakeFiles/lspcpp.dir/build.make CMakeFiles/lspcpp.dir/src/jsonrpc/message.cpp.s +.PHONY : src/jsonrpc/message.cpp.s + +src/jsonrpc/serializer.o: src/jsonrpc/serializer.cpp.o +.PHONY : src/jsonrpc/serializer.o + +# target to build an object file +src/jsonrpc/serializer.cpp.o: + $(MAKE) $(MAKESILENT) -f CMakeFiles/lspcpp.dir/build.make CMakeFiles/lspcpp.dir/src/jsonrpc/serializer.cpp.o +.PHONY : src/jsonrpc/serializer.cpp.o + +src/jsonrpc/serializer.i: src/jsonrpc/serializer.cpp.i +.PHONY : src/jsonrpc/serializer.i + +# target to preprocess a source file +src/jsonrpc/serializer.cpp.i: + $(MAKE) $(MAKESILENT) -f CMakeFiles/lspcpp.dir/build.make CMakeFiles/lspcpp.dir/src/jsonrpc/serializer.cpp.i +.PHONY : src/jsonrpc/serializer.cpp.i + +src/jsonrpc/serializer.s: src/jsonrpc/serializer.cpp.s +.PHONY : src/jsonrpc/serializer.s + +# target to generate assembly for a file +src/jsonrpc/serializer.cpp.s: + $(MAKE) $(MAKESILENT) -f CMakeFiles/lspcpp.dir/build.make CMakeFiles/lspcpp.dir/src/jsonrpc/serializer.cpp.s +.PHONY : src/jsonrpc/serializer.cpp.s + +src/jsonrpc/threaded_queue.o: src/jsonrpc/threaded_queue.cpp.o +.PHONY : src/jsonrpc/threaded_queue.o + +# target to build an object file +src/jsonrpc/threaded_queue.cpp.o: + $(MAKE) $(MAKESILENT) -f CMakeFiles/lspcpp.dir/build.make CMakeFiles/lspcpp.dir/src/jsonrpc/threaded_queue.cpp.o +.PHONY : src/jsonrpc/threaded_queue.cpp.o + +src/jsonrpc/threaded_queue.i: src/jsonrpc/threaded_queue.cpp.i +.PHONY : src/jsonrpc/threaded_queue.i + +# target to preprocess a source file +src/jsonrpc/threaded_queue.cpp.i: + $(MAKE) $(MAKESILENT) -f CMakeFiles/lspcpp.dir/build.make CMakeFiles/lspcpp.dir/src/jsonrpc/threaded_queue.cpp.i +.PHONY : src/jsonrpc/threaded_queue.cpp.i + +src/jsonrpc/threaded_queue.s: src/jsonrpc/threaded_queue.cpp.s +.PHONY : src/jsonrpc/threaded_queue.s + +# target to generate assembly for a file +src/jsonrpc/threaded_queue.cpp.s: + $(MAKE) $(MAKESILENT) -f CMakeFiles/lspcpp.dir/build.make CMakeFiles/lspcpp.dir/src/jsonrpc/threaded_queue.cpp.s +.PHONY : src/jsonrpc/threaded_queue.cpp.s + +src/lsp/Markup.o: src/lsp/Markup.cpp.o +.PHONY : src/lsp/Markup.o + +# target to build an object file +src/lsp/Markup.cpp.o: + $(MAKE) $(MAKESILENT) -f CMakeFiles/lspcpp.dir/build.make CMakeFiles/lspcpp.dir/src/lsp/Markup.cpp.o +.PHONY : src/lsp/Markup.cpp.o + +src/lsp/Markup.i: src/lsp/Markup.cpp.i +.PHONY : src/lsp/Markup.i + +# target to preprocess a source file +src/lsp/Markup.cpp.i: + $(MAKE) $(MAKESILENT) -f CMakeFiles/lspcpp.dir/build.make CMakeFiles/lspcpp.dir/src/lsp/Markup.cpp.i +.PHONY : src/lsp/Markup.cpp.i + +src/lsp/Markup.s: src/lsp/Markup.cpp.s +.PHONY : src/lsp/Markup.s + +# target to generate assembly for a file +src/lsp/Markup.cpp.s: + $(MAKE) $(MAKESILENT) -f CMakeFiles/lspcpp.dir/build.make CMakeFiles/lspcpp.dir/src/lsp/Markup.cpp.s +.PHONY : src/lsp/Markup.cpp.s + +src/lsp/ParentProcessWatcher.o: src/lsp/ParentProcessWatcher.cpp.o +.PHONY : src/lsp/ParentProcessWatcher.o + +# target to build an object file +src/lsp/ParentProcessWatcher.cpp.o: + $(MAKE) $(MAKESILENT) -f CMakeFiles/lspcpp.dir/build.make CMakeFiles/lspcpp.dir/src/lsp/ParentProcessWatcher.cpp.o +.PHONY : src/lsp/ParentProcessWatcher.cpp.o + +src/lsp/ParentProcessWatcher.i: src/lsp/ParentProcessWatcher.cpp.i +.PHONY : src/lsp/ParentProcessWatcher.i + +# target to preprocess a source file +src/lsp/ParentProcessWatcher.cpp.i: + $(MAKE) $(MAKESILENT) -f CMakeFiles/lspcpp.dir/build.make CMakeFiles/lspcpp.dir/src/lsp/ParentProcessWatcher.cpp.i +.PHONY : src/lsp/ParentProcessWatcher.cpp.i + +src/lsp/ParentProcessWatcher.s: src/lsp/ParentProcessWatcher.cpp.s +.PHONY : src/lsp/ParentProcessWatcher.s + +# target to generate assembly for a file +src/lsp/ParentProcessWatcher.cpp.s: + $(MAKE) $(MAKESILENT) -f CMakeFiles/lspcpp.dir/build.make CMakeFiles/lspcpp.dir/src/lsp/ParentProcessWatcher.cpp.s +.PHONY : src/lsp/ParentProcessWatcher.cpp.s + +src/lsp/ProtocolJsonHandler.o: src/lsp/ProtocolJsonHandler.cpp.o +.PHONY : src/lsp/ProtocolJsonHandler.o + +# target to build an object file +src/lsp/ProtocolJsonHandler.cpp.o: + $(MAKE) $(MAKESILENT) -f CMakeFiles/lspcpp.dir/build.make CMakeFiles/lspcpp.dir/src/lsp/ProtocolJsonHandler.cpp.o +.PHONY : src/lsp/ProtocolJsonHandler.cpp.o + +src/lsp/ProtocolJsonHandler.i: src/lsp/ProtocolJsonHandler.cpp.i +.PHONY : src/lsp/ProtocolJsonHandler.i + +# target to preprocess a source file +src/lsp/ProtocolJsonHandler.cpp.i: + $(MAKE) $(MAKESILENT) -f CMakeFiles/lspcpp.dir/build.make CMakeFiles/lspcpp.dir/src/lsp/ProtocolJsonHandler.cpp.i +.PHONY : src/lsp/ProtocolJsonHandler.cpp.i + +src/lsp/ProtocolJsonHandler.s: src/lsp/ProtocolJsonHandler.cpp.s +.PHONY : src/lsp/ProtocolJsonHandler.s + +# target to generate assembly for a file +src/lsp/ProtocolJsonHandler.cpp.s: + $(MAKE) $(MAKESILENT) -f CMakeFiles/lspcpp.dir/build.make CMakeFiles/lspcpp.dir/src/lsp/ProtocolJsonHandler.cpp.s +.PHONY : src/lsp/ProtocolJsonHandler.cpp.s + +src/lsp/initialize.o: src/lsp/initialize.cpp.o +.PHONY : src/lsp/initialize.o + +# target to build an object file +src/lsp/initialize.cpp.o: + $(MAKE) $(MAKESILENT) -f CMakeFiles/lspcpp.dir/build.make CMakeFiles/lspcpp.dir/src/lsp/initialize.cpp.o +.PHONY : src/lsp/initialize.cpp.o + +src/lsp/initialize.i: src/lsp/initialize.cpp.i +.PHONY : src/lsp/initialize.i + +# target to preprocess a source file +src/lsp/initialize.cpp.i: + $(MAKE) $(MAKESILENT) -f CMakeFiles/lspcpp.dir/build.make CMakeFiles/lspcpp.dir/src/lsp/initialize.cpp.i +.PHONY : src/lsp/initialize.cpp.i + +src/lsp/initialize.s: src/lsp/initialize.cpp.s +.PHONY : src/lsp/initialize.s + +# target to generate assembly for a file +src/lsp/initialize.cpp.s: + $(MAKE) $(MAKESILENT) -f CMakeFiles/lspcpp.dir/build.make CMakeFiles/lspcpp.dir/src/lsp/initialize.cpp.s +.PHONY : src/lsp/initialize.cpp.s + +src/lsp/lsp.o: src/lsp/lsp.cpp.o +.PHONY : src/lsp/lsp.o + +# target to build an object file +src/lsp/lsp.cpp.o: + $(MAKE) $(MAKESILENT) -f CMakeFiles/lspcpp.dir/build.make CMakeFiles/lspcpp.dir/src/lsp/lsp.cpp.o +.PHONY : src/lsp/lsp.cpp.o + +src/lsp/lsp.i: src/lsp/lsp.cpp.i +.PHONY : src/lsp/lsp.i + +# target to preprocess a source file +src/lsp/lsp.cpp.i: + $(MAKE) $(MAKESILENT) -f CMakeFiles/lspcpp.dir/build.make CMakeFiles/lspcpp.dir/src/lsp/lsp.cpp.i +.PHONY : src/lsp/lsp.cpp.i + +src/lsp/lsp.s: src/lsp/lsp.cpp.s +.PHONY : src/lsp/lsp.s + +# target to generate assembly for a file +src/lsp/lsp.cpp.s: + $(MAKE) $(MAKESILENT) -f CMakeFiles/lspcpp.dir/build.make CMakeFiles/lspcpp.dir/src/lsp/lsp.cpp.s +.PHONY : src/lsp/lsp.cpp.s + +src/lsp/lsp_diagnostic.o: src/lsp/lsp_diagnostic.cpp.o +.PHONY : src/lsp/lsp_diagnostic.o + +# target to build an object file +src/lsp/lsp_diagnostic.cpp.o: + $(MAKE) $(MAKESILENT) -f CMakeFiles/lspcpp.dir/build.make CMakeFiles/lspcpp.dir/src/lsp/lsp_diagnostic.cpp.o +.PHONY : src/lsp/lsp_diagnostic.cpp.o + +src/lsp/lsp_diagnostic.i: src/lsp/lsp_diagnostic.cpp.i +.PHONY : src/lsp/lsp_diagnostic.i + +# target to preprocess a source file +src/lsp/lsp_diagnostic.cpp.i: + $(MAKE) $(MAKESILENT) -f CMakeFiles/lspcpp.dir/build.make CMakeFiles/lspcpp.dir/src/lsp/lsp_diagnostic.cpp.i +.PHONY : src/lsp/lsp_diagnostic.cpp.i + +src/lsp/lsp_diagnostic.s: src/lsp/lsp_diagnostic.cpp.s +.PHONY : src/lsp/lsp_diagnostic.s + +# target to generate assembly for a file +src/lsp/lsp_diagnostic.cpp.s: + $(MAKE) $(MAKESILENT) -f CMakeFiles/lspcpp.dir/build.make CMakeFiles/lspcpp.dir/src/lsp/lsp_diagnostic.cpp.s +.PHONY : src/lsp/lsp_diagnostic.cpp.s + +src/lsp/textDocument.o: src/lsp/textDocument.cpp.o +.PHONY : src/lsp/textDocument.o + +# target to build an object file +src/lsp/textDocument.cpp.o: + $(MAKE) $(MAKESILENT) -f CMakeFiles/lspcpp.dir/build.make CMakeFiles/lspcpp.dir/src/lsp/textDocument.cpp.o +.PHONY : src/lsp/textDocument.cpp.o + +src/lsp/textDocument.i: src/lsp/textDocument.cpp.i +.PHONY : src/lsp/textDocument.i + +# target to preprocess a source file +src/lsp/textDocument.cpp.i: + $(MAKE) $(MAKESILENT) -f CMakeFiles/lspcpp.dir/build.make CMakeFiles/lspcpp.dir/src/lsp/textDocument.cpp.i +.PHONY : src/lsp/textDocument.cpp.i + +src/lsp/textDocument.s: src/lsp/textDocument.cpp.s +.PHONY : src/lsp/textDocument.s + +# target to generate assembly for a file +src/lsp/textDocument.cpp.s: + $(MAKE) $(MAKESILENT) -f CMakeFiles/lspcpp.dir/build.make CMakeFiles/lspcpp.dir/src/lsp/textDocument.cpp.s +.PHONY : src/lsp/textDocument.cpp.s + +src/lsp/utils.o: src/lsp/utils.cpp.o +.PHONY : src/lsp/utils.o + +# target to build an object file +src/lsp/utils.cpp.o: + $(MAKE) $(MAKESILENT) -f CMakeFiles/lspcpp.dir/build.make CMakeFiles/lspcpp.dir/src/lsp/utils.cpp.o +.PHONY : src/lsp/utils.cpp.o + +src/lsp/utils.i: src/lsp/utils.cpp.i +.PHONY : src/lsp/utils.i + +# target to preprocess a source file +src/lsp/utils.cpp.i: + $(MAKE) $(MAKESILENT) -f CMakeFiles/lspcpp.dir/build.make CMakeFiles/lspcpp.dir/src/lsp/utils.cpp.i +.PHONY : src/lsp/utils.cpp.i + +src/lsp/utils.s: src/lsp/utils.cpp.s +.PHONY : src/lsp/utils.s + +# target to generate assembly for a file +src/lsp/utils.cpp.s: + $(MAKE) $(MAKESILENT) -f CMakeFiles/lspcpp.dir/build.make CMakeFiles/lspcpp.dir/src/lsp/utils.cpp.s +.PHONY : src/lsp/utils.cpp.s + +src/lsp/working_files.o: src/lsp/working_files.cpp.o +.PHONY : src/lsp/working_files.o + +# target to build an object file +src/lsp/working_files.cpp.o: + $(MAKE) $(MAKESILENT) -f CMakeFiles/lspcpp.dir/build.make CMakeFiles/lspcpp.dir/src/lsp/working_files.cpp.o +.PHONY : src/lsp/working_files.cpp.o + +src/lsp/working_files.i: src/lsp/working_files.cpp.i +.PHONY : src/lsp/working_files.i + +# target to preprocess a source file +src/lsp/working_files.cpp.i: + $(MAKE) $(MAKESILENT) -f CMakeFiles/lspcpp.dir/build.make CMakeFiles/lspcpp.dir/src/lsp/working_files.cpp.i +.PHONY : src/lsp/working_files.cpp.i + +src/lsp/working_files.s: src/lsp/working_files.cpp.s +.PHONY : src/lsp/working_files.s + +# target to generate assembly for a file +src/lsp/working_files.cpp.s: + $(MAKE) $(MAKESILENT) -f CMakeFiles/lspcpp.dir/build.make CMakeFiles/lspcpp.dir/src/lsp/working_files.cpp.s +.PHONY : src/lsp/working_files.cpp.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 "... edit_cache" + @echo "... install" + @echo "... install/local" + @echo "... install/strip" + @echo "... list_install_components" + @echo "... rebuild_cache" + @echo "... doc" + @echo "... lspcpp" + @echo "... network-uri" + @echo "... src/jsonrpc/Context.o" + @echo "... src/jsonrpc/Context.i" + @echo "... src/jsonrpc/Context.s" + @echo "... src/jsonrpc/Endpoint.o" + @echo "... src/jsonrpc/Endpoint.i" + @echo "... src/jsonrpc/Endpoint.s" + @echo "... src/jsonrpc/GCThreadContext.o" + @echo "... src/jsonrpc/GCThreadContext.i" + @echo "... src/jsonrpc/GCThreadContext.s" + @echo "... src/jsonrpc/MessageJsonHandler.o" + @echo "... src/jsonrpc/MessageJsonHandler.i" + @echo "... src/jsonrpc/MessageJsonHandler.s" + @echo "... src/jsonrpc/RemoteEndPoint.o" + @echo "... src/jsonrpc/RemoteEndPoint.i" + @echo "... src/jsonrpc/RemoteEndPoint.s" + @echo "... src/jsonrpc/StreamMessageProducer.o" + @echo "... src/jsonrpc/StreamMessageProducer.i" + @echo "... src/jsonrpc/StreamMessageProducer.s" + @echo "... src/jsonrpc/TcpServer.o" + @echo "... src/jsonrpc/TcpServer.i" + @echo "... src/jsonrpc/TcpServer.s" + @echo "... src/jsonrpc/WebSocketServer.o" + @echo "... src/jsonrpc/WebSocketServer.i" + @echo "... src/jsonrpc/WebSocketServer.s" + @echo "... src/jsonrpc/message.o" + @echo "... src/jsonrpc/message.i" + @echo "... src/jsonrpc/message.s" + @echo "... src/jsonrpc/serializer.o" + @echo "... src/jsonrpc/serializer.i" + @echo "... src/jsonrpc/serializer.s" + @echo "... src/jsonrpc/threaded_queue.o" + @echo "... src/jsonrpc/threaded_queue.i" + @echo "... src/jsonrpc/threaded_queue.s" + @echo "... src/lsp/Markup.o" + @echo "... src/lsp/Markup.i" + @echo "... src/lsp/Markup.s" + @echo "... src/lsp/ParentProcessWatcher.o" + @echo "... src/lsp/ParentProcessWatcher.i" + @echo "... src/lsp/ParentProcessWatcher.s" + @echo "... src/lsp/ProtocolJsonHandler.o" + @echo "... src/lsp/ProtocolJsonHandler.i" + @echo "... src/lsp/ProtocolJsonHandler.s" + @echo "... src/lsp/initialize.o" + @echo "... src/lsp/initialize.i" + @echo "... src/lsp/initialize.s" + @echo "... src/lsp/lsp.o" + @echo "... src/lsp/lsp.i" + @echo "... src/lsp/lsp.s" + @echo "... src/lsp/lsp_diagnostic.o" + @echo "... src/lsp/lsp_diagnostic.i" + @echo "... src/lsp/lsp_diagnostic.s" + @echo "... src/lsp/textDocument.o" + @echo "... src/lsp/textDocument.i" + @echo "... src/lsp/textDocument.s" + @echo "... src/lsp/utils.o" + @echo "... src/lsp/utils.i" + @echo "... src/lsp/utils.s" + @echo "... src/lsp/working_files.o" + @echo "... src/lsp/working_files.i" + @echo "... src/lsp/working_files.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: + $(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/graphics/asymptote/LspCpp/README.md b/graphics/asymptote/LspCpp/README.md old mode 100644 new mode 100755 index 4c279f7f4a..38868872de --- a/graphics/asymptote/LspCpp/README.md +++ b/graphics/asymptote/LspCpp/README.md @@ -1,48 +1,63 @@ -# LspCpp - -## Dependencies -`LspCpp` depends on the boost and rapidjson,utfcpp,and threadpool - -## Build - -### Linux - 1. Install boost - ```shell - $ sudo apt-get install libboost-dev - ``` - 2. [Restore the submodules][4]. - ```shell - $ git submodule init - $ git submodule update - ``` - 3. Build it. - ```shell - $ make - ``` -### Windows - 1. Open project with Vistual Studio. - 2. [Restore packages][3] with Vistual Studio. - 3. [Restore the submodules][4]. - ```shell - git submodule init - git submodule update - ``` - 4. Build it with Vistual Studio. - -## Reference - Some code from :[cquery][1] - -## Projects using LspCpp: -* [JCIDE](https://www.javacardos.com/tools) -* [LPG-language-server](https://github.com/kuafuwang/LPG-language-server) -## License - MIT - -## Example: -[It's here](https://github.com/kuafuwang/LspCpp/tree/master/example) - - -[1]: https://github.com/cquery-project/cquery "cquery:" -[2]: https://www.javacardos.com/tools "JcKit:" -[3]: https://docs.microsoft.com/en-us/nuget/consume-packages/package-restore "Package Restore" -[4]: https://git-scm.com/book/en/v2/Git-Tools-Submodules "Git-Tools-Submodules" +# LspCpp + +## Dependencies +`LspCpp` depends on the boost and rapidjson,utfcpp,uri and threadpool + +## Build + +### Linux / Mac +1. On linux ,install boost + ```shell + $ sudo apt-get install libboost-dev + ``` + On Mac,install boost on Mac + ```shell + $ brew install boost + ``` + +2. [Restore the submodules][4]. + ```shell + $ git submodule init + $ git submodule update + ``` +3. Building with ``CMake`` +----------------------- + $ mkdir _build + $ cd _build + $ cmake -DUri_BUILD_TESTS=OFF .. + $ make -j4 + +### Windows + + 1. [Restore the submodules][4]. + ```shell + git submodule init + git submodule update + ``` + 2. Open cmd or powershell and generate visual studio project with ``CMake``. + ----------------------- + mkdir _build + cd _build + cmake -DUri_BUILD_TESTS=OFF -DUri_USE_STATIC_CRT=OFF .. + + 3. "cmake -help" is useful if you are not familiar with cmake. + + 4. Build it with Visual Studio. + +## Reference + Some code from :[cquery][1] + +## Projects using LspCpp: +* [JCIDE](https://www.javacardos.com/tools) +* [LPG-language-server](https://github.com/kuafuwang/LPG-language-server) +## License + MIT + +## Example: +[It's here](https://github.com/kuafuwang/LspCpp/tree/master/examples) + + +[1]: https://github.com/cquery-project/cquery "cquery:" +[2]: https://www.javacardos.com/tools "JcKit:" +[3]: https://docs.microsoft.com/en-us/nuget/consume-packages/package-restore "Package Restore" +[4]: https://git-scm.com/book/en/v2/Git-Tools-Submodules "Git-Tools-Submodules" diff --git a/graphics/asymptote/LspCpp/cmake_install.cmake b/graphics/asymptote/LspCpp/cmake_install.cmake new file mode 100644 index 0000000000..3016c5e0a2 --- /dev/null +++ b/graphics/asymptote/LspCpp/cmake_install.cmake @@ -0,0 +1,60 @@ +# Install script for directory: /usr/local/src/asymptote-2.78/LspCpp + +# 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 "RelWithDebInfo") + 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 "0") +endif() + +# Is this installation the result of a crosscompile? +if(NOT DEFINED CMAKE_CROSSCOMPILING) + set(CMAKE_CROSSCOMPILING "FALSE") +endif() + +# Set default install directory permissions. +if(NOT DEFINED CMAKE_OBJDUMP) + set(CMAKE_OBJDUMP "/bin/objdump") +endif() + +if(NOT CMAKE_INSTALL_LOCAL_ONLY) + # Include the install script for each subdirectory. + include("/usr/local/src/asymptote-2.78/LspCpp/third_party/uri/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 "/usr/local/src/asymptote-2.78/LspCpp/${CMAKE_INSTALL_MANIFEST}" + "${CMAKE_INSTALL_MANIFEST_CONTENT}") diff --git a/graphics/asymptote/LspCpp/example/StdIOClientExample.cpp b/graphics/asymptote/LspCpp/example/StdIOClientExample.cpp deleted file mode 100644 index 1c73626a45..0000000000 --- a/graphics/asymptote/LspCpp/example/StdIOClientExample.cpp +++ /dev/null @@ -1,221 +0,0 @@ - -#include "LibLsp/lsp/ProcessIoService.h" -#ifdef STDIO_CLIENT_EXAMPLE - -#include -#include "LibLsp/lsp/general/exit.h" -#include "LibLsp/lsp/textDocument/declaration_definition.h" - -#include "LibLsp/lsp/textDocument/signature_help.h" -#include "LibLsp/lsp/general/initialize.h" -#include "LibLsp/lsp/ProtocolJsonHandler.h" -#include "LibLsp/lsp/textDocument/typeHierarchy.h" -#include "LibLsp/lsp/AbsolutePath.h" -#include "LibLsp/lsp/textDocument/resolveCompletionItem.h" -#include -#include "LibLsp/JsonRpc/Endpoint.h" -#include "LibLsp/JsonRpc/stream.h" -#include "LibLsp/JsonRpc/TcpServer.h" -#include "LibLsp/lsp/textDocument/document_symbol.h" -#include "LibLsp/lsp/workspace/execute_command.h" -#include -#include -#include -#include -#include - - -using namespace boost::asio::ip; -using namespace std; -class DummyLog :public lsp::Log -{ -public: - - void log(Level level, std::wstring&& msg) - { - - std::wcerr << msg << std::endl; - }; - void log(Level level, const std::wstring& msg) - { - std::wcerr << msg << std::endl; - }; - void log(Level level, std::string&& msg) - { - std::cerr << msg << std::endl; - }; - void log(Level level, const std::string& msg) - { - std::cerr << msg << std::endl; - }; -}; - -struct boost_process_ipstream : lsp::base_istream< boost::process::ipstream > -{ - explicit boost_process_ipstream(boost::process::ipstream& _t) - : base_istream(_t) - { - } - - std::string what() override - { - return {}; - } - void clear() override - { - - } -}; -struct boost_process_opstream : lsp::base_ostream< boost::process::opstream > -{ - explicit boost_process_opstream(boost::process::opstream& _t) - : lsp::base_ostream(_t) - { - } - - std::string what() override - { - return {}; - } - void clear() override - { - - } -}; -class Client -{ -public: - Client(std::string& execPath,const std::vector& args) - :point(protocol_json_handler, endpoint, _log) - { - std::error_code ec; - namespace bp = boost::process; - c = std::make_shared(asio_io.getIOService(), execPath, - bp::args = args, - ec, - bp::windows::show_normal, - bp::std_out > read_from_service, - bp::std_in < write_to_service, - bp::on_exit([&](int exit_code, const std::error_code& ec_in){ - - })); - if (ec) - { - // fail - _log.log(lsp::Log::Level::SEVERE, "Start server failed."); - } - else { - //success - point.startProcessingMessages(read_from_service_proxy, write_to_service_proxy); - } - } - ~Client() - { - point.Stop(); - ::Sleep(1000); - - } - - lsp::ProcessIoService asio_io; - std::shared_ptr < lsp::ProtocolJsonHandler > protocol_json_handler = std::make_shared< lsp::ProtocolJsonHandler>(); - DummyLog _log; - - std::shared_ptr endpoint = std::make_shared(_log); - - boost::process::opstream write_to_service; - boost::process::ipstream read_from_service; - - std::shared_ptr write_to_service_proxy = std::make_shared(write_to_service); - std::shared_ptr read_from_service_proxy = std::make_shared< boost_process_ipstream >(read_from_service); - - std::shared_ptr c; - RemoteEndPoint point; -}; - -int main(int argc, char* argv[]) -{ - using namespace boost::program_options; - options_description desc("Allowed options"); - desc.add_options() - ("help,h", "produce help message") - ("execPath", value(), "LSP server's path"); - - - - variables_map vm; - try { - store(parse_command_line(argc, argv, desc), vm); - } - catch (std::exception& e) { - std::cout << "Undefined input.Reason:" << e.what() << std::endl; - return 0; - } - notify(vm); - - - if (vm.count("help")) - { - cout << desc << endl; - return 1; - } - string execPath; - if (vm.count("execPath")) - { - execPath = vm["execPath"].as(); - } - else - { - execPath = "STDIO_SERVER_EXAMPLE.exe"; - } - - Client client(execPath, {}); - { - td_initialize::request req; - auto rsp = client.point.waitResponse(req); - if (rsp) - { - std::cerr << rsp->ToJson() << std::endl; - } - else - { - std::cerr << "get initialze response time out" << std::endl; - } - } - { - td_definition::request req; - auto future_rsp = client.point.send(req); - auto state = future_rsp.wait_for(std::chrono::seconds(4)); - if (std::future_status::timeout == state) - { - std::cerr << "get textDocument/definition response time out" << std::endl; - return 0; - } - auto rsp = future_rsp.get(); - if (rsp.is_error) - { - std::cerr << "get textDocument/definition response error" << std::endl; - - } - else - { - std::cerr << rsp.response.ToJson() << std::endl; - } - } - { - td_initialize::request req; - auto rsp = client.point.waitResponse(req); - if (rsp) - { - std::cerr << rsp->ToJson() << std::endl; - } - else - { - std::cerr << "get initialze response time out" << std::endl; - } - } - Notify_Exit::notify notify; - client.point.send(notify); - return 0; -} -#endif - diff --git a/graphics/asymptote/LspCpp/example/StdIOServerExample.cpp b/graphics/asymptote/LspCpp/example/StdIOServerExample.cpp deleted file mode 100644 index 60b0d04db0..0000000000 --- a/graphics/asymptote/LspCpp/example/StdIOServerExample.cpp +++ /dev/null @@ -1,162 +0,0 @@ -#include "LibLsp/JsonRpc/Condition.h" -#ifdef STDIO_SERVER_EXAMPLE - -#include "LibLsp/lsp/general/exit.h" -#include "LibLsp/lsp/textDocument/declaration_definition.h" -#include -#include "LibLsp/lsp/textDocument/signature_help.h" -#include "LibLsp/lsp/general/initialize.h" -#include "LibLsp/lsp/ProtocolJsonHandler.h" -#include "LibLsp/lsp/textDocument/typeHierarchy.h" -#include "LibLsp/lsp/AbsolutePath.h" -#include "LibLsp/lsp/textDocument/resolveCompletionItem.h" -#include - - -#include "LibLsp/JsonRpc/Endpoint.h" -#include "LibLsp/JsonRpc/stream.h" -#include "LibLsp/JsonRpc/TcpServer.h" -#include "LibLsp/lsp/textDocument/document_symbol.h" -#include "LibLsp/lsp/workspace/execute_command.h" -#include -#include -#include -#include -#include -using namespace boost::asio::ip; -using namespace std; -class DummyLog :public lsp::Log -{ -public: - - void log(Level level, std::wstring&& msg) - { - - std::wcerr << msg << std::endl; - }; - void log(Level level, const std::wstring& msg) - { - std::wcerr << msg << std::endl; - }; - void log(Level level, std::string&& msg) - { - std::cerr << msg << std::endl; - }; - void log(Level level, const std::string& msg) - { - std::cerr << msg << std::endl; - }; -}; - - -class StdIOServer -{ -public: - - StdIOServer() : remote_end_point_(protocol_json_handler, endpoint, _log) - { - remote_end_point_.registerHandler([&](const td_initialize::request& req) - { - td_initialize::response rsp; - rsp.id = req.id; - CodeLensOptions code_lens_options; - code_lens_options.resolveProvider = true; - rsp.result.capabilities.codeLensProvider = code_lens_options; - return rsp; - }); - - remote_end_point_.registerHandler([&](Notify_Exit::notify& notify) - { - remote_end_point_.Stop(); - esc_event.notify(std::make_unique(true)); - }); - remote_end_point_.registerHandler([&](const td_definition::request& req, - const CancelMonitor& monitor) - { - td_definition::response rsp; - rsp.result.first = std::vector(); - if (monitor && monitor()) - { - _log.info("textDocument/definition request had been cancel."); - } - return rsp; - }); - - remote_end_point_.startProcessingMessages(input, output); - } - ~StdIOServer() - { - - } - - struct ostream : lsp::base_ostream - { - explicit ostream(std::ostream& _t) - : base_ostream(_t) - { - - } - - std::string what() override - { - return {}; - } - }; - struct istream :lsp::base_istream - { - explicit istream(std::istream& _t) - : base_istream(_t) - { - } - - std::string what() override - { - return {}; - } - }; - std::shared_ptr < lsp::ProtocolJsonHandler > protocol_json_handler = std::make_shared < lsp::ProtocolJsonHandler >(); - DummyLog _log; - - std::shared_ptr output = std::make_shared(std::cout); - std::shared_ptr input = std::make_shared(std::cin); - - std::shared_ptr < GenericEndpoint > endpoint = std::make_shared(_log); - RemoteEndPoint remote_end_point_; - Condition esc_event; -}; - - - - -int main(int argc, char* argv[]) -{ - using namespace boost::program_options; - options_description desc("Allowed options"); - desc.add_options() - ("help,h", "produce help message"); - - - - variables_map vm; - try { - store(parse_command_line(argc, argv, desc), vm); - } - catch (std::exception& e) { - std::cout << "Undefined input.Reason:" << e.what() << std::endl; - return 0; - } - notify(vm); - - - if (vm.count("help")) - { - cout << desc << endl; - return 1; - } - StdIOServer server; - server.esc_event.wait(); - - return 0; -} -#endif - diff --git a/graphics/asymptote/LspCpp/example/TcpServerExample.cpp b/graphics/asymptote/LspCpp/example/TcpServerExample.cpp deleted file mode 100644 index 1b717aeca4..0000000000 --- a/graphics/asymptote/LspCpp/example/TcpServerExample.cpp +++ /dev/null @@ -1,200 +0,0 @@ -#ifdef TCP_SERVER_EXAMPLE - -#include "LibLsp/lsp/general/exit.h" -#include "LibLsp/lsp/textDocument/declaration_definition.h" -#include "LibLsp/lsp/textDocument/signature_help.h" -#include "LibLsp/lsp/general/initialize.h" -#include "LibLsp/lsp/ProtocolJsonHandler.h" -#include "LibLsp/lsp/textDocument/typeHierarchy.h" -#include "LibLsp/lsp/AbsolutePath.h" -#include "LibLsp/lsp/textDocument/resolveCompletionItem.h" -#include - - -#include "LibLsp/JsonRpc/Endpoint.h" -#include "LibLsp/JsonRpc/stream.h" -#include "LibLsp/JsonRpc/TcpServer.h" -#include "LibLsp/lsp/textDocument/document_symbol.h" -#include "LibLsp/lsp/workspace/execute_command.h" - -#include -#include -#include -using namespace boost::asio::ip; -using namespace std; -class DummyLog :public lsp::Log -{ -public: - - void log(Level level, std::wstring&& msg) - { - std::wcout << msg << std::endl; - }; - void log(Level level, const std::wstring& msg) - { - std::wcout << msg << std::endl; - }; - void log(Level level, std::string&& msg) - { - std::cout << msg << std::endl; - }; - void log(Level level, const std::string& msg) - { - std::cout << msg << std::endl; - }; -}; - -std::string _address = "127.0.0.1"; -std::string _port = "9333"; - -class Server -{ -public: - - - Server():server(_address,_port,protocol_json_handler, endpoint, _log) - { - server.point.registerHandler( - [&](const td_initialize::request& req) - ->lsp::ResponseOrError< td_initialize::response >{ - - td_initialize::response rsp; - CodeLensOptions code_lens_options; - code_lens_options.resolveProvider = true; - rsp.result.capabilities.codeLensProvider = code_lens_options; - - return rsp; - }); - server.point.registerHandler([&](const td_definition::request& req - ,const CancelMonitor& monitor) - { - td_definition::response rsp; - rsp.result.first= std::vector(); - std::this_thread::sleep_for(std::chrono::seconds(8)); - if(monitor && monitor()) - { - _log.info("textDocument/definition request had been cancel."); - } - return rsp; - }); - - server.point.registerHandler([=](Notify_Exit::notify& notify) - { - std::cout << notify.ToJson() << std::endl; - }); - std::thread([&]() - { - server.run(); - }).detach(); - } - ~Server() - { - server.stop(); - } - std::shared_ptr < lsp::ProtocolJsonHandler > protocol_json_handler = std::make_shared < lsp::ProtocolJsonHandler >(); - DummyLog _log; - - std::shared_ptr < GenericEndpoint > endpoint = std::make_shared(_log); - lsp::TcpServer server; - -}; - -class Client -{ -public: - struct iostream :public lsp::base_iostream - { - explicit iostream(boost::asio::basic_socket_iostream& _t) - : base_iostream>(_t) - { - } - - std::string what() override - { - auto msg = _impl.error().message(); - return msg; - } - - }; - Client() :remote_end_point_(protocol_json_handler, endpoint, _log) - { - tcp::endpoint end_point( address::from_string(_address), 9333); - - socket_ = std::make_shared(); - socket_->connect(end_point); - if (!socket_) - { - string temp = "Unable to connect: " + socket_->error().message(); - std::cout << temp << std::endl; - } - - vector args; - socket_proxy = std::make_shared(*socket_.get()); - - remote_end_point_.startProcessingMessages(socket_proxy, socket_proxy); - } - ~Client() - { - remote_end_point_.Stop(); - ::Sleep(1000); - socket_->close(); - } - - std::shared_ptr < lsp::ProtocolJsonHandler > protocol_json_handler = std::make_shared< lsp::ProtocolJsonHandler>(); - DummyLog _log; - - std::shared_ptr endpoint = std::make_shared(_log); - - std::shared_ptr < iostream> socket_proxy; - std::shared_ptr socket_; - RemoteEndPoint remote_end_point_; -}; - -int main() -{ - - Server server; - Client client; - - { - td_initialize::request req; - auto rsp = client.remote_end_point_.waitResponse(req); - if (rsp) - { - std::cout << rsp->response.ToJson() << std::endl; - } - else - { - std::cout << "get initialze response time out" << std::endl; - } - } - { - td_definition::request req; - auto future_rsp = client.remote_end_point_.send(req); - Notify_Cancellation::notify cancel_notify; - cancel_notify.params.id = req.id; - client.remote_end_point_.send(cancel_notify); - - auto state = future_rsp.wait_for(std::chrono::seconds(16)); - if (std::future_status::timeout == state) - { - std::cout << "get textDocument/definition response time out" << std::endl; - return 0; - } - auto rsp = future_rsp.get(); - if (rsp.is_error) - { - std::cout << "get textDocument/definition response error" << std::endl; - - } - else - { - std::cout << rsp.response.ToJson() << std::endl; - } - } - Notify_Exit::notify notify; - client.remote_end_point_.send(notify); - return 0; -} -#endif - diff --git a/graphics/asymptote/LspCpp/example/WebsocketExample.cpp b/graphics/asymptote/LspCpp/example/WebsocketExample.cpp deleted file mode 100644 index e82f0a96f9..0000000000 --- a/graphics/asymptote/LspCpp/example/WebsocketExample.cpp +++ /dev/null @@ -1,297 +0,0 @@ -#ifdef WEBSOCKET_SERVER_EXAMPLE - -#include "LibLsp/JsonRpc/WebSocketServer.h" -#include "LibLsp/lsp/textDocument/signature_help.h" -#include "LibLsp/lsp/general/initialize.h" -#include "LibLsp/lsp/ProtocolJsonHandler.h" -#include "LibLsp/lsp/textDocument/typeHierarchy.h" -#include "LibLsp/lsp/AbsolutePath.h" -#include "LibLsp/lsp/textDocument/resolveCompletionItem.h" -#include - - -#include "LibLsp/JsonRpc/Endpoint.h" -#include "LibLsp/JsonRpc/stream.h" -#include "LibLsp/JsonRpc/TcpServer.h" -#include "LibLsp/lsp/textDocument/document_symbol.h" -#include "LibLsp/lsp/workspace/execute_command.h" - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include "LibLsp/JsonRpc/Endpoint.h" -#include "LibLsp/JsonRpc/RemoteEndPoint.h" -#include "LibLsp/JsonRpc/stream.h" -#include "LibLsp/lsp/ProtocolJsonHandler.h" - -namespace beast = boost::beast; // from -namespace http = beast::http; // from -namespace websocket = beast::websocket; // from -namespace net = boost::asio; // from -using tcp = boost::asio::ip::tcp; // from - -//------------------------------------------------------------------------------ - -std::string _address = "127.0.0.1"; -std::string _port = "9333"; - - - - -using namespace std; -class DummyLog :public lsp::Log -{ -public: - - void log(Level level, std::wstring&& msg) - { - std::wcout << msg << std::endl; - }; - void log(Level level, const std::wstring& msg) - { - std::wcout << msg << std::endl; - }; - void log(Level level, std::string&& msg) - { - std::cout << msg << std::endl; - }; - void log(Level level, const std::string& msg) - { - std::cout << msg << std::endl; - }; -}; - - - -// Sends a WebSocket message and prints the response -class Client : public std::enable_shared_from_this -{ - net::io_context ioc; - tcp::resolver resolver_; - websocket::stream ws_; - beast::flat_buffer buffer_; - std::string host_; - std::string user_agent_; - std::shared_ptr < lsp::ProtocolJsonHandler > protocol_json_handler = std::make_shared< lsp::ProtocolJsonHandler>(); - DummyLog _log; - - std::shared_ptr endpoint = std::make_shared(_log); - - std::shared_ptr proxy_; -public: - RemoteEndPoint point; - -public: - // Resolver and socket require an io_context - explicit - Client() - : resolver_(net::make_strand(ioc)) - , ws_(net::make_strand(ioc)),point(protocol_json_handler, endpoint, _log) - { - proxy_ = std::make_shared(ws_); - - } - - // Start the asynchronous operation - void - run( - char const* host, - char const* port, char const* user_agent) - { - // Save these for later - host_ = host; - user_agent_ = user_agent; - // Look up the domain name - resolver_.async_resolve( - host, - port, - beast::bind_front_handler( - &Client::on_resolve, - shared_from_this())); - std::thread([&] - { - ioc.run(); - }).detach(); - while (!point.IsWorking()) - { - ::Sleep(50); - } - } - - void - on_resolve( - beast::error_code ec, - tcp::resolver::results_type results) - { - if (ec) - return; - - // Set the timeout for the operation - beast::get_lowest_layer(ws_).expires_after(std::chrono::seconds(30)); - - // Make the connection on the IP address we get from a lookup - beast::get_lowest_layer(ws_).async_connect( - results, - beast::bind_front_handler( - &Client::on_connect, - shared_from_this())); - } - - void - on_connect(beast::error_code ec, tcp::resolver::results_type::endpoint_type) - { - if (ec) - return; - - // Turn off the timeout on the tcp_stream, because - // the websocket stream has its own timeout system. - beast::get_lowest_layer(ws_).expires_never(); - - // Set suggested timeout settings for the websocket - ws_.set_option( - websocket::stream_base::timeout::suggested( - beast::role_type::client)); - - // Set a decorator to change the User-Agent of the handshake - ws_.set_option(websocket::stream_base::decorator( - [=](websocket::request_type& req) - { - req.set(http::field::user_agent, - user_agent_.c_str()); - })); - - // Perform the websocket handshake - ws_.async_handshake(host_, "/", - beast::bind_front_handler( - &Client::on_handshake, - shared_from_this())); - } - - void - on_handshake(beast::error_code ec) - { - if (ec) - return; - - // Send the message - - - point.startProcessingMessages(proxy_, proxy_); - // Read a message into our buffer - ws_.async_read( - buffer_, - beast::bind_front_handler( - &Client::on_read, - shared_from_this())); - } - - - void - on_read( - beast::error_code ec, - std::size_t bytes_transferred) - { - boost::ignore_unused(bytes_transferred); - - if (ec) - return; - - char* data = reinterpret_cast(buffer_.data().data()); - std::vector elements(data, data + bytes_transferred); - buffer_.clear(); - proxy_->on_request.EnqueueAll(std::move(elements), false); - - ws_.async_read( - buffer_, - beast::bind_front_handler( - &Client::on_read, - shared_from_this())); - } - - void - on_close(beast::error_code ec) - { - if (ec) - return; - - // If we get here then the connection is closed gracefully - - // The make_printable() function helps print a ConstBufferSequence - std::cout << beast::make_printable(buffer_.data()) << std::endl; - } -}; - -class Server -{ -public: - Server(const std::string& user_agent) : server(user_agent,_address, _port, protocol_json_handler, endpoint, _log) - { - server.point.registerHandler( - [&](const td_initialize::request& req) - { - td_initialize::response rsp; - CodeLensOptions code_lens_options; - code_lens_options.resolveProvider = true; - rsp.result.capabilities.codeLensProvider = code_lens_options; - return rsp; - }); - std::thread([&]() - { - server.run(); - }).detach(); - } - ~Server() - { - server.stop(); - } - std::shared_ptr < lsp::ProtocolJsonHandler > protocol_json_handler = std::make_shared < lsp::ProtocolJsonHandler >(); - DummyLog _log; - - std::shared_ptr < GenericEndpoint > endpoint = std::make_shared(_log); - lsp::WebSocketServer server; - -}; - -int main() -{ - std::string user_agent = std::string(BOOST_BEAST_VERSION_STRING) +" websocket-server-async"; - Server server(user_agent); - - auto client = std::make_shared(); - user_agent = std::string(BOOST_BEAST_VERSION_STRING) + " websocket-client-async"; - client->run(_address.c_str(), _port.c_str(), user_agent.c_str()); - - td_initialize::request req; - - auto rsp = client->point.waitResponse(req); - if (rsp) - { - std::cout << rsp->ToJson() << std::endl; - } - return 0; -} - - - - - -#endif - - - diff --git a/graphics/asymptote/LspCpp/examples/StdIOClientExample.cpp b/graphics/asymptote/LspCpp/examples/StdIOClientExample.cpp new file mode 100755 index 0000000000..fa70120373 --- /dev/null +++ b/graphics/asymptote/LspCpp/examples/StdIOClientExample.cpp @@ -0,0 +1,218 @@ + +#include "LibLsp/lsp/ProcessIoService.h" + +#include +#include "LibLsp/lsp/general/exit.h" +#include "LibLsp/lsp/textDocument/declaration_definition.h" + +#include "LibLsp/lsp/textDocument/signature_help.h" +#include "LibLsp/lsp/general/initialize.h" +#include "LibLsp/lsp/ProtocolJsonHandler.h" +#include "LibLsp/lsp/textDocument/typeHierarchy.h" +#include "LibLsp/lsp/AbsolutePath.h" +#include "LibLsp/lsp/textDocument/resolveCompletionItem.h" +#include +#include "LibLsp/JsonRpc/Endpoint.h" +#include "LibLsp/JsonRpc/stream.h" +#include "LibLsp/JsonRpc/TcpServer.h" +#include "LibLsp/lsp/textDocument/document_symbol.h" +#include "LibLsp/lsp/workspace/execute_command.h" +#include +#include +#include +#include + + +using namespace boost::asio::ip; +using namespace std; +class DummyLog :public lsp::Log +{ +public: + + void log(Level level, std::wstring&& msg) + { + + std::wcerr << msg << std::endl; + }; + void log(Level level, const std::wstring& msg) + { + std::wcerr << msg << std::endl; + }; + void log(Level level, std::string&& msg) + { + std::cerr << msg << std::endl; + }; + void log(Level level, const std::string& msg) + { + std::cerr << msg << std::endl; + }; +}; + +struct boost_process_ipstream : lsp::base_istream< boost::process::ipstream > +{ + explicit boost_process_ipstream(boost::process::ipstream& _t) + : base_istream(_t) + { + } + + std::string what() override + { + return {}; + } + void clear() override + { + + } +}; +struct boost_process_opstream : lsp::base_ostream< boost::process::opstream > +{ + explicit boost_process_opstream(boost::process::opstream& _t) + : lsp::base_ostream(_t) + { + } + + std::string what() override + { + return {}; + } + void clear() override + { + + } +}; +class Client +{ +public: + Client(std::string& execPath,const std::vector& args) + :point(protocol_json_handler, endpoint, _log) + { + std::error_code ec; + namespace bp = boost::process; + c = std::make_shared(asio_io.getIOService(), execPath, + bp::args = args, + ec, + + bp::std_out > read_from_service, + bp::std_in < write_to_service, + bp::on_exit([&](int exit_code, const std::error_code& ec_in){ + + })); + if (ec) + { + // fail + _log.log(lsp::Log::Level::SEVERE, "Start server failed."); + } + else { + //success + point.startProcessingMessages(read_from_service_proxy, write_to_service_proxy); + } + } + ~Client() + { + point.Stop(); + std::this_thread::sleep_for(std::chrono::milliseconds (1000)); + } + + lsp::ProcessIoService asio_io; + std::shared_ptr < lsp::ProtocolJsonHandler > protocol_json_handler = std::make_shared< lsp::ProtocolJsonHandler>(); + DummyLog _log; + + std::shared_ptr endpoint = std::make_shared(_log); + + boost::process::opstream write_to_service; + boost::process::ipstream read_from_service; + + std::shared_ptr write_to_service_proxy = std::make_shared(write_to_service); + std::shared_ptr read_from_service_proxy = std::make_shared< boost_process_ipstream >(read_from_service); + + std::shared_ptr c; + RemoteEndPoint point; +}; + +int main(int argc, char* argv[]) +{ + using namespace boost::program_options; + options_description desc("Allowed options"); + desc.add_options() + ("help,h", "produce help message") + ("execPath", value(), "LSP server's path"); + + + + variables_map vm; + try { + store(parse_command_line(argc, argv, desc), vm); + } + catch (std::exception& e) { + std::cout << "Undefined input.Reason:" << e.what() << std::endl; + return 0; + } + notify(vm); + + + if (vm.count("help")) + { + cout << desc << endl; + return 1; + } + string execPath; + if (vm.count("execPath")) + { + execPath = vm["execPath"].as(); + } + else + { + execPath = "STDIO_SERVER_EXAMPLE.exe"; + } + + Client client(execPath, {}); + { + td_initialize::request req; + auto rsp = client.point.waitResponse(req); + if (rsp) + { + std::cerr << rsp->ToJson() << std::endl; + } + else + { + std::cerr << "get initialze response time out" << std::endl; + } + } + { + td_definition::request req; + auto future_rsp = client.point.send(req); + auto state = future_rsp.wait_for(std::chrono::seconds(4)); + if (std::future_status::timeout == state) + { + std::cerr << "get textDocument/definition response time out" << std::endl; + return 0; + } + auto rsp = future_rsp.get(); + if (rsp.is_error) + { + std::cerr << "get textDocument/definition response error" << std::endl; + + } + else + { + std::cerr << rsp.response.ToJson() << std::endl; + } + } + { + td_initialize::request req; + auto rsp = client.point.waitResponse(req); + if (rsp) + { + std::cerr << rsp->ToJson() << std::endl; + } + else + { + std::cerr << "get initialze response time out" << std::endl; + } + } + Notify_Exit::notify notify; + client.point.send(notify); + return 0; +} + + diff --git a/graphics/asymptote/LspCpp/examples/StdIOServerExample.cpp b/graphics/asymptote/LspCpp/examples/StdIOServerExample.cpp new file mode 100755 index 0000000000..ab194e6ecf --- /dev/null +++ b/graphics/asymptote/LspCpp/examples/StdIOServerExample.cpp @@ -0,0 +1,159 @@ + +#include "LibLsp/JsonRpc/Condition.h" +#include "LibLsp/lsp/general/exit.h" +#include "LibLsp/lsp/textDocument/declaration_definition.h" +#include +#include "LibLsp/lsp/textDocument/signature_help.h" +#include "LibLsp/lsp/general/initialize.h" +#include "LibLsp/lsp/ProtocolJsonHandler.h" +#include "LibLsp/lsp/textDocument/typeHierarchy.h" +#include "LibLsp/lsp/AbsolutePath.h" +#include "LibLsp/lsp/textDocument/resolveCompletionItem.h" +#include + +#include "LibLsp/JsonRpc/Endpoint.h" +#include "LibLsp/JsonRpc/stream.h" +#include "LibLsp/JsonRpc/TcpServer.h" +#include "LibLsp/lsp/textDocument/document_symbol.h" +#include "LibLsp/lsp/workspace/execute_command.h" +#include +#include +#include +#include +using namespace boost::asio::ip; +using namespace std; +class DummyLog :public lsp::Log +{ +public: + + void log(Level level, std::wstring&& msg) + { + + std::wcerr << msg << std::endl; + }; + void log(Level level, const std::wstring& msg) + { + std::wcerr << msg << std::endl; + }; + void log(Level level, std::string&& msg) + { + std::cerr << msg << std::endl; + }; + void log(Level level, const std::string& msg) + { + std::cerr << msg << std::endl; + }; +}; + + +class StdIOServer +{ +public: + + StdIOServer() : remote_end_point_(protocol_json_handler, endpoint, _log) + { + remote_end_point_.registerHandler([&](const td_initialize::request& req) + { + td_initialize::response rsp; + rsp.id = req.id; + CodeLensOptions code_lens_options; + code_lens_options.resolveProvider = true; + rsp.result.capabilities.codeLensProvider = code_lens_options; + return rsp; + }); + + remote_end_point_.registerHandler([&](Notify_Exit::notify& notify) + { + remote_end_point_.Stop(); + esc_event.notify(std::make_unique(true)); + }); + remote_end_point_.registerHandler([&](const td_definition::request& req, + const CancelMonitor& monitor) + { + td_definition::response rsp; + rsp.result.first = std::vector(); + if (monitor && monitor()) + { + _log.info("textDocument/definition request had been cancel."); + } + return rsp; + }); + + remote_end_point_.startProcessingMessages(input, output); + } + ~StdIOServer() + { + + } + + struct ostream : lsp::base_ostream + { + explicit ostream(std::ostream& _t) + : base_ostream(_t) + { + + } + + std::string what() override + { + return {}; + } + }; + struct istream :lsp::base_istream + { + explicit istream(std::istream& _t) + : base_istream(_t) + { + } + + std::string what() override + { + return {}; + } + }; + std::shared_ptr < lsp::ProtocolJsonHandler > protocol_json_handler = std::make_shared < lsp::ProtocolJsonHandler >(); + DummyLog _log; + + std::shared_ptr output = std::make_shared(std::cout); + std::shared_ptr input = std::make_shared(std::cin); + + std::shared_ptr < GenericEndpoint > endpoint = std::make_shared(_log); + RemoteEndPoint remote_end_point_; + Condition esc_event; +}; + + + + +int main(int argc, char* argv[]) +{ + using namespace boost::program_options; + options_description desc("Allowed options"); + desc.add_options() + ("help,h", "produce help message"); + + + + variables_map vm; + try { + store(parse_command_line(argc, argv, desc), vm); + } + catch (std::exception& e) { + std::cout << "Undefined input.Reason:" << e.what() << std::endl; + return 0; + } + notify(vm); + + + if (vm.count("help")) + { + cout << desc << endl; + return 1; + } + StdIOServer server; + server.esc_event.wait(); + + return 0; +} + + diff --git a/graphics/asymptote/LspCpp/examples/TcpServerExample.cpp b/graphics/asymptote/LspCpp/examples/TcpServerExample.cpp new file mode 100755 index 0000000000..093be31798 --- /dev/null +++ b/graphics/asymptote/LspCpp/examples/TcpServerExample.cpp @@ -0,0 +1,199 @@ + +#include "LibLsp/lsp/general/exit.h" +#include "LibLsp/lsp/textDocument/declaration_definition.h" +#include "LibLsp/lsp/textDocument/signature_help.h" +#include "LibLsp/lsp/general/initialize.h" +#include "LibLsp/lsp/ProtocolJsonHandler.h" +#include "LibLsp/lsp/textDocument/typeHierarchy.h" +#include "LibLsp/lsp/AbsolutePath.h" +#include "LibLsp/lsp/textDocument/resolveCompletionItem.h" +#include + + +#include "LibLsp/JsonRpc/Endpoint.h" +#include "LibLsp/JsonRpc/stream.h" +#include "LibLsp/JsonRpc/TcpServer.h" +#include "LibLsp/lsp/textDocument/document_symbol.h" +#include "LibLsp/lsp/workspace/execute_command.h" + +#include +#include +#include +using namespace boost::asio::ip; +using namespace std; +class DummyLog :public lsp::Log +{ +public: + + void log(Level level, std::wstring&& msg) + { + std::wcout << msg << std::endl; + }; + void log(Level level, const std::wstring& msg) + { + std::wcout << msg << std::endl; + }; + void log(Level level, std::string&& msg) + { + std::cout << msg << std::endl; + }; + void log(Level level, const std::string& msg) + { + std::cout << msg << std::endl; + }; +}; + +std::string _address = "127.0.0.1"; +std::string _port = "9333"; + +class Server +{ +public: + + + Server():server(_address,_port,protocol_json_handler, endpoint, _log) + { + server.point.registerHandler( + [&](const td_initialize::request& req) + ->lsp::ResponseOrError< td_initialize::response >{ + + td_initialize::response rsp; + CodeLensOptions code_lens_options; + code_lens_options.resolveProvider = true; + rsp.result.capabilities.codeLensProvider = code_lens_options; + + return rsp; + }); + server.point.registerHandler([&](const td_definition::request& req + ,const CancelMonitor& monitor) + { + td_definition::response rsp; + rsp.result.first= std::vector(); + std::this_thread::sleep_for(std::chrono::seconds(8)); + if(monitor && monitor()) + { + _log.info("textDocument/definition request had been cancel."); + } + return rsp; + }); + + server.point.registerHandler([=](Notify_Exit::notify& notify) + { + std::cout << notify.ToJson() << std::endl; + }); + std::thread([&]() + { + server.run(); + }).detach(); + } + ~Server() + { + server.stop(); + } + std::shared_ptr < lsp::ProtocolJsonHandler > protocol_json_handler = std::make_shared < lsp::ProtocolJsonHandler >(); + DummyLog _log; + + std::shared_ptr < GenericEndpoint > endpoint = std::make_shared(_log); + lsp::TcpServer server; + +}; + +class Client +{ +public: + struct iostream :public lsp::base_iostream + { + explicit iostream(boost::asio::basic_socket_iostream& _t) + : base_iostream>(_t) + { + } + + std::string what() override + { + auto msg = _impl.error().message(); + return msg; + } + + }; + Client() :remote_end_point_(protocol_json_handler, endpoint, _log) + { + tcp::endpoint end_point( address::from_string(_address), 9333); + + socket_ = std::make_shared(); + socket_->connect(end_point); + if (!socket_) + { + string temp = "Unable to connect: " + socket_->error().message(); + std::cout << temp << std::endl; + } + + vector args; + socket_proxy = std::make_shared(*socket_.get()); + + remote_end_point_.startProcessingMessages(socket_proxy, socket_proxy); + } + ~Client() + { + remote_end_point_.Stop(); + std::this_thread::sleep_for(std::chrono::milliseconds (1000)); + socket_->close(); + } + + std::shared_ptr < lsp::ProtocolJsonHandler > protocol_json_handler = std::make_shared< lsp::ProtocolJsonHandler>(); + DummyLog _log; + + std::shared_ptr endpoint = std::make_shared(_log); + + std::shared_ptr < iostream> socket_proxy; + std::shared_ptr socket_; + RemoteEndPoint remote_end_point_; +}; + +int main() +{ + + Server server; + Client client; + + { + td_initialize::request req; + auto rsp = client.remote_end_point_.waitResponse(req); + if (rsp) + { + std::cout << rsp->response.ToJson() << std::endl; + } + else + { + std::cout << "get initialze response time out" << std::endl; + } + } + { + td_definition::request req; + auto future_rsp = client.remote_end_point_.send(req); + Notify_Cancellation::notify cancel_notify; + cancel_notify.params.id = req.id; + client.remote_end_point_.send(cancel_notify); + + auto state = future_rsp.wait_for(std::chrono::seconds(16)); + if (std::future_status::timeout == state) + { + std::cout << "get textDocument/definition response time out" << std::endl; + return 0; + } + auto rsp = future_rsp.get(); + if (rsp.is_error) + { + std::cout << "get textDocument/definition response error" << std::endl; + + } + else + { + std::cout << rsp.response.ToJson() << std::endl; + } + } + Notify_Exit::notify notify; + client.remote_end_point_.send(notify); + return 0; +} + + diff --git a/graphics/asymptote/LspCpp/examples/WebsocketExample.cpp b/graphics/asymptote/LspCpp/examples/WebsocketExample.cpp new file mode 100755 index 0000000000..d79569f536 --- /dev/null +++ b/graphics/asymptote/LspCpp/examples/WebsocketExample.cpp @@ -0,0 +1,296 @@ + +#include "LibLsp/JsonRpc/WebSocketServer.h" +#include "LibLsp/lsp/textDocument/signature_help.h" +#include "LibLsp/lsp/general/initialize.h" +#include "LibLsp/lsp/ProtocolJsonHandler.h" +#include "LibLsp/lsp/textDocument/typeHierarchy.h" +#include "LibLsp/lsp/AbsolutePath.h" +#include "LibLsp/lsp/textDocument/resolveCompletionItem.h" +#include + + +#include "LibLsp/JsonRpc/Endpoint.h" +#include "LibLsp/JsonRpc/stream.h" +#include "LibLsp/JsonRpc/TcpServer.h" +#include "LibLsp/lsp/textDocument/document_symbol.h" +#include "LibLsp/lsp/workspace/execute_command.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include "LibLsp/JsonRpc/Endpoint.h" +#include "LibLsp/JsonRpc/RemoteEndPoint.h" +#include "LibLsp/JsonRpc/stream.h" +#include "LibLsp/lsp/ProtocolJsonHandler.h" + +namespace beast = boost::beast; // from +namespace http = beast::http; // from +namespace websocket = beast::websocket; // from +namespace net = boost::asio; // from +using tcp = boost::asio::ip::tcp; // from + +//------------------------------------------------------------------------------ + +std::string _address = "127.0.0.1"; +std::string _port = "9333"; + + + + +using namespace std; +class DummyLog :public lsp::Log +{ +public: + + void log(Level level, std::wstring&& msg) + { + std::wcout << msg << std::endl; + }; + void log(Level level, const std::wstring& msg) + { + std::wcout << msg << std::endl; + }; + void log(Level level, std::string&& msg) + { + std::cout << msg << std::endl; + }; + void log(Level level, const std::string& msg) + { + std::cout << msg << std::endl; + }; +}; + + + +// Sends a WebSocket message and prints the response +class Client : public std::enable_shared_from_this +{ + net::io_context ioc; + tcp::resolver resolver_; + websocket::stream ws_; + beast::flat_buffer buffer_; + std::string host_; + std::string user_agent_; + std::shared_ptr < lsp::ProtocolJsonHandler > protocol_json_handler = std::make_shared< lsp::ProtocolJsonHandler>(); + DummyLog _log; + + std::shared_ptr endpoint = std::make_shared(_log); + + std::shared_ptr proxy_; +public: + RemoteEndPoint point; + +public: + // Resolver and socket require an io_context + explicit + Client() + : resolver_(net::make_strand(ioc)) + , ws_(net::make_strand(ioc)),point(protocol_json_handler, endpoint, _log) + { + proxy_ = std::make_shared(ws_); + + } + + // Start the asynchronous operation + void + run( + char const* host, + char const* port, char const* user_agent) + { + // Save these for later + host_ = host; + user_agent_ = user_agent; + // Look up the domain name + resolver_.async_resolve( + host, + port, + beast::bind_front_handler( + &Client::on_resolve, + shared_from_this())); + std::thread([&] + { + ioc.run(); + }).detach(); + while (!point.IsWorking()) + { + std::this_thread::sleep_for(std::chrono::milliseconds (50)); + } + } + + void + on_resolve( + beast::error_code ec, + tcp::resolver::results_type results) + { + if (ec) + return; + + // Set the timeout for the operation + beast::get_lowest_layer(ws_).expires_after(std::chrono::seconds(30)); + + // Make the connection on the IP address we get from a lookup + beast::get_lowest_layer(ws_).async_connect( + results, + beast::bind_front_handler( + &Client::on_connect, + shared_from_this())); + } + + void + on_connect(beast::error_code ec, tcp::resolver::results_type::endpoint_type) + { + if (ec) + return; + + // Turn off the timeout on the tcp_stream, because + // the websocket stream has its own timeout system. + beast::get_lowest_layer(ws_).expires_never(); + + // Set suggested timeout settings for the websocket + ws_.set_option( + websocket::stream_base::timeout::suggested( + beast::role_type::client)); + + // Set a decorator to change the User-Agent of the handshake + ws_.set_option(websocket::stream_base::decorator( + [=](websocket::request_type& req) + { + req.set(http::field::user_agent, + user_agent_.c_str()); + })); + + // Perform the websocket handshake + ws_.async_handshake(host_, "/", + beast::bind_front_handler( + &Client::on_handshake, + shared_from_this())); + } + + void + on_handshake(beast::error_code ec) + { + if (ec) + return; + + // Send the message + + + point.startProcessingMessages(proxy_, proxy_); + // Read a message into our buffer + ws_.async_read( + buffer_, + beast::bind_front_handler( + &Client::on_read, + shared_from_this())); + } + + + void + on_read( + beast::error_code ec, + std::size_t bytes_transferred) + { + boost::ignore_unused(bytes_transferred); + + if (ec) + return; + + char* data = reinterpret_cast(buffer_.data().data()); + std::vector elements(data, data + bytes_transferred); + buffer_.clear(); + proxy_->on_request.EnqueueAll(std::move(elements), false); + + ws_.async_read( + buffer_, + beast::bind_front_handler( + &Client::on_read, + shared_from_this())); + } + + void + on_close(beast::error_code ec) + { + if (ec) + return; + + // If we get here then the connection is closed gracefully + + // The make_printable() function helps print a ConstBufferSequence + std::cout << beast::make_printable(buffer_.data()) << std::endl; + } +}; + +class Server +{ +public: + Server(const std::string& user_agent) : server(user_agent,_address, _port, protocol_json_handler, endpoint, _log) + { + server.point.registerHandler( + [&](const td_initialize::request& req) + { + td_initialize::response rsp; + CodeLensOptions code_lens_options; + code_lens_options.resolveProvider = true; + rsp.result.capabilities.codeLensProvider = code_lens_options; + return rsp; + }); + std::thread([&]() + { + server.run(); + }).detach(); + } + ~Server() + { + server.stop(); + } + std::shared_ptr < lsp::ProtocolJsonHandler > protocol_json_handler = std::make_shared < lsp::ProtocolJsonHandler >(); + DummyLog _log; + + std::shared_ptr < GenericEndpoint > endpoint = std::make_shared(_log); + lsp::WebSocketServer server; + +}; + +int main() +{ + std::string user_agent = std::string(BOOST_BEAST_VERSION_STRING) +" websocket-server-async"; + Server server(user_agent); + + auto client = std::make_shared(); + user_agent = std::string(BOOST_BEAST_VERSION_STRING) + " websocket-client-async"; + client->run(_address.c_str(), _port.c_str(), user_agent.c_str()); + + td_initialize::request req; + + auto rsp = client->point.waitResponse(req); + if (rsp) + { + std::cout << rsp->ToJson() << std::endl; + } + return 0; +} + + + + + + + + + diff --git a/graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/Cancellation.h b/graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/Cancellation.h new file mode 100644 index 0000000000..b89f32f166 --- /dev/null +++ b/graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/Cancellation.h @@ -0,0 +1,23 @@ +#pragma once +#include +#include "lsRequestId.h" +#include +using CancelMonitor = std::function; +namespace Cancellation +{ + + struct Params { + /** + * The request id to cancel. + */ + lsRequestId id; + + MAKE_SWAP_METHOD(Cancellation::Params, id); + }; + +}; +MAKE_REFLECT_STRUCT(Cancellation::Params, id); + +DEFINE_NOTIFICATION_TYPE(Notify_Cancellation, Cancellation::Params,"$/cancelRequest"); + + diff --git a/graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/Condition.h b/graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/Condition.h new file mode 100644 index 0000000000..a5f550041d --- /dev/null +++ b/graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/Condition.h @@ -0,0 +1,48 @@ +#pragma once +#include +template +class Condition +{ +public: + + std::mutex m_mutex; + std::condition_variable m_condition; + ~Condition() { + m_condition.notify_all(); + } + void notify(std::unique_ptr data) noexcept + { + { + std::lock_guard eventLock(m_mutex); + any.swap(data); + } + // wake up one waiter + m_condition.notify_one(); + }; + + + std::unique_ptr wait(unsigned timeout=0) + { + std::unique_lock ul(m_mutex); + if (!timeout) { + m_condition.wait(ul,[&]() { + if (!any) + return false; + return true; + }); + } + else{ + if(!any){ + std::cv_status status = m_condition.wait_for(ul, std::chrono::milliseconds(timeout)); + if (status == std::cv_status::timeout) + { + return {}; + } + } + } + return std::unique_ptr(any.release()); + + } +private: + std::unique_ptr any; +}; diff --git a/graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/Context.h b/graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/Context.h new file mode 100644 index 0000000000..20edf71b1c --- /dev/null +++ b/graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/Context.h @@ -0,0 +1,216 @@ +//===--- Context.h - Mechanism for passing implicit data --------*- C++-*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// +// Context for storing and retrieving implicit data. Useful for passing implicit +// parameters on a per-request basis. +// +//===----------------------------------------------------------------------===// + +#pragma once + +#include +#include + +namespace lsp { + + +/// Values in a Context are indexed by typed keys. +/// Key serves two purposes: +/// - it provides a lookup key for the context (each Key is unique), +/// - it makes lookup type-safe: a Key can only map to a T (or nothing). +/// +/// Example: +/// Key RequestID; +/// Key Version; +/// +/// Context Ctx = Context::empty().derive(RequestID, 10).derive(Version, 3); +/// assert(*Ctx.get(RequestID) == 10); +/// assert(*Ctx.get(Version) == 3); +/// +/// Keys are typically used across multiple functions, so most of the time you +/// would want to make them static class members or global variables. +template class Key { +public: + static_assert(!std::is_reference::value, + "Reference arguments to Key<> are not allowed"); + + constexpr Key() = default; + + Key(Key const &) = delete; + Key &operator=(Key const &) = delete; + Key(Key &&) = delete; + Key &operator=(Key &&) = delete; +}; + +/// A context is an immutable container for per-request data that must be +/// propagated through layers that don't care about it. An example is a request +/// ID that we may want to use when logging. +/// +/// Conceptually, a context is a heterogeneous map, T>. Each key has +/// an associated value type, which allows the map to be typesafe. +/// +/// There is an "ambient" context for each thread, Context::current(). +/// Most functions should read from this, and use WithContextValue or +/// WithContext to extend or replace the context within a block scope. +/// Only code dealing with threads and extension points should need to use +/// other Context objects. +/// +/// You can't add data to an existing context, instead you create a new +/// immutable context derived from it with extra data added. When you retrieve +/// data, the context will walk up the parent chain until the key is found. +class Context { +public: + /// Returns an empty root context that contains no data. + static Context empty(); + /// Returns the context for the current thread, creating it if needed. + static const Context ¤t(); + // Sets the current() context to Replacement, and returns the old context. + // Prefer to use WithContext or WithContextValue to do this safely. + static Context swapCurrent(Context Replacement); + +private: + struct Data; + Context(std::shared_ptr DataPtr); + +public: + /// Same as Context::empty(), please use Context::empty() instead. + Context() = default; + + /// Copy operations for this class are deleted, use an explicit clone() method + /// when you need a copy of the context instead. + Context(Context const &) = delete; + Context &operator=(const Context &) = delete; + + Context(Context &&) = default; + Context &operator=(Context &&) = default; + + /// Get data stored for a typed \p Key. If values are not found + /// \returns Pointer to the data associated with \p Key. If no data is + /// specified for \p Key, return null. + template const Type *get(const Key &Key) const { + for (const Data *DataPtr = this->dataPtr.get(); DataPtr != nullptr; + DataPtr = DataPtr->parent.get()) { + if (DataPtr->KeyPtr == &Key) + return static_cast(DataPtr->value->getValuePtr()); + } + return nullptr; + } + + /// A helper to get a reference to a \p Key that must exist in the map. + /// Must not be called for keys that are not in the map. + template const Type &getExisting(const Key &Key) const { + auto Val = get(Key); + assert(Val && "Key does not exist"); + return *Val; + } + + /// Derives a child context + /// It is safe to move or destroy a parent context after calling derive(). + /// The child will keep its parent alive, and its data remains accessible. + template + Context derive(const Key &Key, + typename std::decay::type Value) const & { + return Context(std::make_shared( + Data{/*parent=*/dataPtr, &Key, + std::make_unique::type>>( + std::move(Value))})); + } + + template + Context + derive(const Key &Key, + typename std::decay::type Value) && /* takes ownership */ { + return Context(std::make_shared( + Data{/*parent=*/std::move(dataPtr), &Key, + std::make_unique::type>>( + std::move(Value))})); + } + + /// Derives a child context, using an anonymous key. + /// Intended for objects stored only for their destructor's side-effect. + template Context derive(Type &&Value) const & { + static Key::type> Private; + return derive(Private, std::forward(Value)); + } + + template Context derive(Type &&Value) && { + static Key::type> Private; + return std::move(*this).derive(Private, std::forward(Value)); + } + + /// Clone this context object. + Context clone() const; + +private: + class AnyStorage { + public: + virtual ~AnyStorage() = default; + virtual void *getValuePtr() = 0; + }; + + template class TypedAnyStorage : public Context::AnyStorage { + static_assert(std::is_same::type, T>::value, + "Argument to TypedAnyStorage must be decayed"); + + public: + TypedAnyStorage(T &&Value) : value(std::move(Value)) {} + + void *getValuePtr() override { return &value; } + + private: + T value; + }; + + struct Data { + // We need to make sure parent outlives the value, so the order of members + // is important. We do that to allow classes stored in Context's child + // layers to store references to the data in the parent layers. + std::shared_ptr parent; + const void *KeyPtr; + std::unique_ptr value; + }; + + std::shared_ptr dataPtr; +}; + +/// WithContext replaces Context::current() with a provided scope. +/// When the WithContext is destroyed, the original scope is restored. +/// For extending the current context with new value, prefer WithContextValue. +class WithContext { +public: + WithContext(Context C) : restore(Context::swapCurrent(std::move(C))) {} + ~WithContext() { Context::swapCurrent(std::move(restore)); } + WithContext(const WithContext &) = delete; + WithContext &operator=(const WithContext &) = delete; + WithContext(WithContext &&) = delete; + WithContext &operator=(WithContext &&) = delete; + +private: + Context restore; +}; + +/// WithContextValue extends Context::current() with a single value. +/// When the WithContextValue is destroyed, the original scope is restored. +class WithContextValue { +public: + template + WithContextValue(const Key &K, typename std::decay::type V) + : restore(Context::current().derive(K, std::move(V))) {} + + // Anonymous values can be used for the destructor side-effect. + template + WithContextValue(T &&V) + : restore(Context::current().derive(std::forward(V))) {} + +private: + WithContext restore; +}; + + +} // namespace lsp + diff --git a/graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/Endpoint.h b/graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/Endpoint.h new file mode 100644 index 0000000000..01d8e8ca91 --- /dev/null +++ b/graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/Endpoint.h @@ -0,0 +1,53 @@ +#pragma once +#include +#include +#include +#include "MessageIssue.h" +struct LspMessage; +struct NotificationInMessage; +struct lsBaseOutMessage; +struct RequestInMessage; + +using GenericResponseHandler = std::function< bool(std::unique_ptr) >; +using GenericRequestHandler = std::function< bool(std::unique_ptr) >; +using GenericNotificationHandler = std::function< bool(std::unique_ptr) >; + +class Endpoint +{ +public: + virtual ~Endpoint() = default; + virtual bool onRequest(std::unique_ptr) = 0; + virtual bool notify(std::unique_ptr) = 0; + + virtual bool onResponse(const std::string&, std::unique_ptr) = 0; + virtual void registerRequestHandler(const std::string&, GenericResponseHandler ) = 0; + virtual void registerNotifyHandler(const std::string&, GenericNotificationHandler ) = 0; +}; + +class GenericEndpoint :public Endpoint +{ + +public: + GenericEndpoint(lsp::Log& l):log(l){} + bool notify(std::unique_ptr) override; + bool onResponse(const std::string&, std::unique_ptr) override; + + bool onRequest(std::unique_ptr) override; + std::map< std::string, GenericRequestHandler > method2request; + std::map< std::string, GenericResponseHandler > method2response; + std::map< std::string, GenericNotificationHandler > method2notification; + + void registerRequestHandler(const std::string& method, GenericResponseHandler cb) override + { + method2request[method] = cb; + } + + void registerNotifyHandler(const std::string& method, GenericNotificationHandler cb) override + { + method2notification[method] = cb; + } + lsp::Log& log; + + + +}; diff --git a/graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/GCThreadContext.h b/graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/GCThreadContext.h new file mode 100644 index 0000000000..a0f7db288d --- /dev/null +++ b/graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/GCThreadContext.h @@ -0,0 +1,19 @@ +#pragma once + +#if defined(USEGC) +#define GC_THREADS +#include +#endif + +class GCThreadContext +{ +public: + GCThreadContext(); + ~GCThreadContext(); + +private: +#if defined(USEGC) + GC_stack_base gsb; +#endif + +}; \ No newline at end of file diff --git a/graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/MessageIssue.h b/graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/MessageIssue.h new file mode 100644 index 0000000000..bda6e65d46 --- /dev/null +++ b/graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/MessageIssue.h @@ -0,0 +1,182 @@ +#pragma once +#include +#include +#include +namespace lsp +{ + class Log + { + public: + virtual ~Log() = default; + + enum class Level + { + /** + * OFF is a special level that can be used to turn off logging. + + */ + OFF = 1, + + /** + * SEVERE is a message level indicating a serious failure. + *

+ * In general SEVERE messages should describe events that are + * of considerable importance and which will prevent normal + * program execution. They should be reasonably intelligible + * to end users and to system administrators. + + */ + SEVERE = 2, + + /** + * WARNING is a message level indicating a potential problem. + *

+ * In general WARNING messages should describe events that will + * be of interest to end users or system managers, or which + * indicate potential problems. + + * + */ + WARNING = 3, + /** + * INFO is a message level for informational messages. + *

+ * Typically INFO messages will be written to the console + * or its equivalent. So the INFO level should only be + * used for reasonably significant messages that will + * make sense to end users and system administrators. + + */ + INFO = 3, + /** + * CONFIG is a message level for static configuration messages. + *

+ * CONFIG messages are intended to provide a variety of static + * configuration information, to assist in debugging problems + * that may be associated with particular configurations. + * For example, CONFIG message might include the CPU type, + * the graphics depth, the GUI look-and-feel, etc. + * This level is initialized to 4. + */ + + CONFIG = 4, + + + + /** + * FINE is a message level providing tracing information. + *

+ * All of FINE, FINER, and FINEST are intended for relatively + * detailed tracing. The exact meaning of the three levels will + * vary between subsystems, but in general, FINEST should be used + * for the most voluminous detailed output, FINER for somewhat + * less detailed output, and FINE for the lowest volume (and + * most important) messages. + *

+ * In general the FINE level should be used for information + * that will be broadly interesting to developers who do not have + * a specialized interest in the specific subsystem. + *

+ * FINE messages might include things like minor (recoverable) + * failures. Issues indicating potential performance problems + * are also worth logging as FINE. + * This level is initialized to 5. + */ + FINE = 5, + + /** + * FINER indicates a fairly detailed tracing message. + * By default logging calls for entering, returning, or throwing + * an exception are traced at this level. + * This level is initialized to 400. + */ + FINER = 6, + + /** + * FINEST indicates a highly detailed tracing message. + * This level is initialized to 300. + */ + FINEST = 7, + + /** + * ALL indicates that all messages should be logged. + * This level is initialized to Integer.MIN_VALUE. + */ + ALL, + }; + virtual void log(Level level, std::wstring&& msg) = 0; + virtual void log(Level level, const std::wstring& msg) = 0; + virtual void log(Level level, std::string&& msg) = 0; + virtual void log(Level level, const std::string& msg) = 0; + + void info(const std::string& msg) + { + log(Level::INFO, msg); + } + void info(const std::wstring& msg) + { + log(Level::INFO, msg); + } + void error(const std::string& msg) + { + log(Level::SEVERE, msg); + } + void error(const std::wstring& msg) + { + log(Level::SEVERE, msg); + } + void warning(const std::string& msg) + { + log(Level::WARNING, msg); + } + void warning(const std::wstring& msg) + { + log(Level::WARNING, msg); + } + }; +} + +class MessageIssue { + +public: + std::string text; + + lsp::Log::Level code; + + MessageIssue(const std::string& text, lsp::Log::Level code) :text(text), code(code) + { + + + } + MessageIssue(std::string&& text, lsp::Log::Level code) :text(text), code(code) + { + + + } + + + std::string getText() { + return text; + } + + lsp::Log::Level getIssueCode() { + return code; + } + + + std::string toString() { + return getText(); + } + +}; +class MessageIssueHandler +{ +public: + /** + * Handle issues found while parsing or validating a message. The list of issues must not be empty. + */ + virtual ~MessageIssueHandler() = default; + + virtual void handle(std::vector&&) = 0; + virtual void handle( MessageIssue&&) = 0; +}; diff --git a/graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/MessageJsonHandler.h b/graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/MessageJsonHandler.h new file mode 100644 index 0000000000..7e238b0cf6 --- /dev/null +++ b/graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/MessageJsonHandler.h @@ -0,0 +1,61 @@ +#pragma once +#include +#include +#include +#include +class Reader; + + +using GenericRequestJsonHandler = std::function< std::unique_ptr(Reader&) >; +using GenericResponseJsonHandler = std::function< std::unique_ptr(Reader&) >; +using GenericNotificationJsonHandler = std::function< std::unique_ptr(Reader&) >; + +class MessageJsonHandler +{ +public: + std::map< std::string, GenericRequestJsonHandler > method2request; + std::map< std::string, GenericResponseJsonHandler > method2response; + std::map< std::string, GenericNotificationJsonHandler > method2notification; + + + const GenericRequestJsonHandler* GetRequestJsonHandler(const char* methodInfo) const + { + const auto findIt = method2request.find(methodInfo); + return findIt == method2request.end() ? nullptr : &findIt->second; + } + + void SetRequestJsonHandler(const std::string& methodInfo, GenericRequestJsonHandler handler) + { + method2request[methodInfo] = handler; + } + + const GenericResponseJsonHandler* GetResponseJsonHandler(const char* methodInfo) const + { + const auto findIt = method2response.find(methodInfo); + return findIt == method2response.end() ? nullptr : &findIt->second; + } + + void SetResponseJsonHandler(const std::string& methodInfo,GenericResponseJsonHandler handler) + { + method2response[methodInfo] = handler; + } + + const GenericNotificationJsonHandler* GetNotificationJsonHandler(const char* methodInfo) const + { + const auto findIt = method2notification.find(methodInfo); + return findIt == method2notification.end() ? nullptr : &findIt->second; + } + + void SetNotificationJsonHandler(const std::string& methodInfo, GenericNotificationJsonHandler handler) + { + method2notification[methodInfo] = handler; + } + + + + std::unique_ptr parseResponseMessage(const std::string&, Reader&); + std::unique_ptr parseRequstMessage(const std::string&, Reader&); + bool resovleResponseMessage(Reader&, std::pair>& result); + std::unique_ptr parseNotificationMessage(const std::string&, Reader&); +}; + diff --git a/graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/MessageProducer.h b/graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/MessageProducer.h new file mode 100644 index 0000000000..ab7a29a17f --- /dev/null +++ b/graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/MessageProducer.h @@ -0,0 +1,13 @@ +#pragma once +#include +#include + +class MessageProducer +{ +public: + + + typedef std::function< void(std::string&&) > MessageConsumer; + virtual ~MessageProducer() = default; + virtual void listen(MessageConsumer) = 0; +}; diff --git a/graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/NotificationInMessage.h b/graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/NotificationInMessage.h new file mode 100644 index 0000000000..e4841b5703 --- /dev/null +++ b/graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/NotificationInMessage.h @@ -0,0 +1,62 @@ +#pragma once + + +#include "lsRequestId.h" +#include "LibLsp/JsonRpc/message.h" + + + +// NotificationInMessage does not have |id|. +struct NotificationInMessage : public LspMessage { + + Kind GetKid() override + { + return NOTIFICATION_MESSAGE; + } + MethodType GetMethodType() const override + { + return method.c_str(); + } + void SetMethodType(MethodType _t) override + { + method = _t; + } + std::string method; +}; +template +struct lsNotificationInMessage : NotificationInMessage { + + void ReflectWriter(Writer& writer) override { + Reflect(writer, static_cast(*this)); + } + lsNotificationInMessage(MethodType _method) + { + method = _method; + } + + static std::unique_ptr ReflectReader(Reader& visitor) { + + TDerived* temp = new TDerived(); + + std::unique_ptr message = std::unique_ptr(temp); + // Reflect may throw and *message will be partially deserialized. + Reflect(visitor, static_cast(*temp)); + return message; + + } + void swap(lsNotificationInMessage& arg) noexcept + { + method.swap(method); + std::swap(params, arg.params); + } + T params; +}; + +#define DEFINE_NOTIFICATION_TYPE(MSG,paramType,methodInfo)\ +namespace MSG {\ + struct notify : public lsNotificationInMessage< paramType , notify >{\ + static constexpr MethodType kMethodInfo = methodInfo;\ + notify():lsNotificationInMessage(kMethodInfo){} \ + };\ +};\ +MAKE_REFLECT_STRUCT(MSG::notify, jsonrpc,method, params) diff --git a/graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/RemoteEndPoint.h b/graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/RemoteEndPoint.h new file mode 100644 index 0000000000..3ae6b567a5 --- /dev/null +++ b/graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/RemoteEndPoint.h @@ -0,0 +1,340 @@ +#pragma once +#include "LibLsp/lsp/lsp_diagnostic.h" +#include "LibLsp/JsonRpc/Cancellation.h" +#include "LibLsp/JsonRpc/lsResponseMessage.h" +#include "LibLsp/JsonRpc/RequestInMessage.h" +#include "LibLsp/JsonRpc/NotificationInMessage.h" +#include "traits.h" +#include +#include +#include "threaded_queue.h" +#include +#include "MessageIssue.h" +#include "LibLsp/JsonRpc/MessageJsonHandler.h" +#include "Endpoint.h" + + +class MessageJsonHandler; +class Endpoint; +struct LspMessage; +class RemoteEndPoint; +namespace lsp { + class ostream; + class istream; + + //////////////////////////////////////////////////////////////////////////////// + // ResponseOrError + //////////////////////////////////////////////////////////////////////////////// + + // ResponseOrError holds either the response to a request or an error + // message. + template + struct ResponseOrError { + using Request = T; + ResponseOrError(); + ResponseOrError(const T& response); + ResponseOrError(T&& response); + ResponseOrError(const Rsp_Error& error); + ResponseOrError(Rsp_Error&& error); + ResponseOrError(const ResponseOrError& other); + ResponseOrError(ResponseOrError&& other) noexcept; + + ResponseOrError& operator=(const ResponseOrError& other); + ResponseOrError& operator=(ResponseOrError&& other) noexcept; + bool IsError() const { return is_error; } + std::string ToJson() + { + if (is_error) return error.ToJson(); + return response.ToJson(); + } + T response; + Rsp_Error error; // empty represents success. + bool is_error; + }; + + template + ResponseOrError::ResponseOrError(): is_error(false) + { + } + + template + ResponseOrError::ResponseOrError(const T& resp) : response(resp), is_error(false) {} + template + ResponseOrError::ResponseOrError(T&& resp) : response(std::move(resp)), is_error(false) {} + template + ResponseOrError::ResponseOrError(const Rsp_Error& err) : error(err), is_error(true) {} + template + ResponseOrError::ResponseOrError(Rsp_Error&& err) : error(std::move(err)), is_error(true) {} + template + ResponseOrError::ResponseOrError(const ResponseOrError& other) + : response(other.response), error(other.error), is_error(other.is_error) {} + template + ResponseOrError::ResponseOrError(ResponseOrError&& other) noexcept + : response(std::move(other.response)), error(std::move(other.error)), is_error(other.is_error) {} + template + ResponseOrError& ResponseOrError::operator=( + const ResponseOrError& other) { + response = other.response; + error = other.error; + is_error = other.is_error; + return *this; + } + template + ResponseOrError& ResponseOrError::operator=(ResponseOrError&& other) noexcept + { + response = std::move(other.response); + error = std::move(other.error); + is_error = other.is_error; + return *this; + } + +} + + +class RemoteEndPoint :MessageIssueHandler +{ + + template + using ParamType = lsp::traits::ParameterType; + + template + using IsRequest = lsp::traits::EnableIfIsType; + + template + using IsResponse = lsp::traits::EnableIfIsType; + + template + using IsNotify = lsp::traits::EnableIfIsType; + + + template + using IsRequestHandler = lsp::traits::EnableIf>:: + value>; + + template + using IsRequestHandlerWithMonitor = lsp::traits::EnableIf>:: + value>; + +public: + + + RemoteEndPoint(const std::shared_ptr & json_handler, + const std::shared_ptr < Endpoint >& localEndPoint, + lsp::Log& _log, uint8_t max_workers = 2); + + ~RemoteEndPoint() override; + template , typename ResponseType = typename RequestType::Response> + IsRequestHandler< F, lsp::ResponseOrError > registerHandler(F&& handler) + { + ProcessRequestJsonHandler(handler); + local_endpoint->registerRequestHandler(RequestType::kMethodInfo, [=](std::unique_ptr msg) { + auto req = reinterpret_cast(msg.get()); + lsp::ResponseOrError res(handler(*req)); + if (res.is_error) { + res.error.id = req->id; + send(res.error); + } + else + { + res.response.id = req->id; + send(res.response); + } + return true; + }); + } + template , typename ResponseType = typename RequestType::Response> + IsRequestHandlerWithMonitor< F, lsp::ResponseOrError > registerHandler(F&& handler) { + ProcessRequestJsonHandler(handler); + local_endpoint->registerRequestHandler(RequestType::kMethodInfo, [=](std::unique_ptr msg) { + auto req = static_cast(msg.get()); + lsp::ResponseOrError res(handler(*req , getCancelMonitor(req->id))); + if (res.is_error) { + res.error.id = req->id; + send(res.error); + } + else + { + res.response.id = req->id; + send(res.response); + } + return true; + }); + } + using RequestErrorCallback = std::function; + + template > + void send(T& request, F&& handler, RequestErrorCallback onError) + { + ProcessRequestJsonHandler(handler); + auto cb = [=](std::unique_ptr msg) { + if (!msg) + return true; + const auto result = msg.get(); + + if (static_cast(result)->IsErrorType()) { + const auto rsp_error = static_cast(result); + onError(*rsp_error); + } + else { + handler(*static_cast(result)); + } + + return true; + }; + internalSendRequest(request, cb); + } + + + template > + IsNotify registerHandler(F&& handler) { + { + std::lock_guard lock(m_sendMutex); + if (!jsonHandler->GetNotificationJsonHandler(NotifyType::kMethodInfo)) + { + jsonHandler->SetNotificationJsonHandler(NotifyType::kMethodInfo, + [](Reader& visitor) + { + return NotifyType::ReflectReader(visitor); + }); + } + } + local_endpoint->registerNotifyHandler(NotifyType::kMethodInfo, [=](std::unique_ptr msg) { + handler(*static_cast(msg.get())); + return true; + }); + } + + template > + std::future< lsp::ResponseOrError > send(T& request) { + + ProcessResponseJsonHandler(request); + using Response = typename T::Response; + auto promise = std::make_shared< std::promise>>(); + auto cb = [=](std::unique_ptr msg) { + if (!msg) + return true; + auto result = msg.get(); + + if (reinterpret_cast(result)->IsErrorType()) + { + Rsp_Error* rsp_error = static_cast(result); + Rsp_Error temp; + std::swap(temp, *rsp_error); + promise->set_value(std::move(lsp::ResponseOrError(std::move(temp)))); + } + else + { + Response temp; + std::swap(temp, *static_cast(result)); + promise->set_value(std::move(lsp::ResponseOrError(std::move(temp)))); + } + return true; + }; + internalSendRequest(request, cb); + return promise->get_future(); + } + + template > + std::unique_ptr> waitResponse(T& request, const unsigned time_out = 0) + { + auto future_rsp = send(request); + if (time_out == 0) + { + future_rsp.wait(); + } + else + { + auto state = future_rsp.wait_for(std::chrono::milliseconds(time_out)); + if (std::future_status::timeout == state) + { + return {}; + } + } + + using Response = typename T::Response; + return std::make_unique>(std::move(future_rsp.get())); + } + + void send(NotificationInMessage& msg) + { + sendMsg(msg); + } + + void send(ResponseInMessage& msg) + { + sendMsg(msg); + } + + void sendNotification(NotificationInMessage& msg) + { + send(msg); + } + void sendResponse(ResponseInMessage& msg) + { + send(msg); + } + void startProcessingMessages(std::shared_ptr r, + std::shared_ptr w); + + bool IsWorking() const + { + if (message_producer_thread_) + return true; + return false; + } + void Stop(); + + std::unique_ptr internalWaitResponse(RequestInMessage&, unsigned time_out = 0); + + void internalSendRequest(RequestInMessage&, GenericResponseHandler); + + void handle(std::vector&&) override; + void handle(MessageIssue&&) override; +private: + CancelMonitor getCancelMonitor(const lsRequestId&); + void sendMsg(LspMessage& msg); + void mainLoop(std::unique_ptr); + bool dispatch(const std::string&); + template > + IsRequest ProcessRequestJsonHandler(const F& handler) { + std::lock_guard lock(m_sendMutex); + if (!jsonHandler->GetRequestJsonHandler(RequestType::kMethodInfo)) + { + jsonHandler->SetRequestJsonHandler(RequestType::kMethodInfo, + [](Reader& visitor) + { + return RequestType::ReflectReader(visitor); + }); + } + } + template > + void ProcessResponseJsonHandler(T& request) + { + using Response = typename T::Response; + std::lock_guard lock(m_sendMutex); + if (!jsonHandler->GetResponseJsonHandler(T::kMethodInfo)) + { + jsonHandler->SetResponseJsonHandler(T::kMethodInfo, [](Reader& visitor) + { + if (visitor.HasMember("error")) + return Rsp_Error::ReflectReader(visitor); + return Response::ReflectReader(visitor); + }); + } + } + + struct Data; + + Data* d_ptr; + + std::shared_ptr < MessageJsonHandler> jsonHandler; + std::mutex m_sendMutex; + + std::shared_ptr < Endpoint > local_endpoint; +public: + std::shared_ptr < std::thread > message_producer_thread_; +}; diff --git a/graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/RequestInMessage.h b/graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/RequestInMessage.h new file mode 100644 index 0000000000..163d038a2e --- /dev/null +++ b/graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/RequestInMessage.h @@ -0,0 +1,70 @@ +#pragma once + + +#include "serializer.h" +#include +#include +#include "lsRequestId.h" +#include "LibLsp/JsonRpc/message.h" +#include "LibLsp/lsp/method_type.h" +#include "lsResponseMessage.h" + +struct RequestInMessage : public LspMessage { + // number or string, actually no null + lsRequestId id; + std::string method; + Kind GetKid() override + { + return REQUEST_MESSAGE; + } + +}; + + + +template +struct lsRequest : public RequestInMessage +{ + lsRequest(MethodType _method) + { + method = _method; + } + MethodType GetMethodType() const override { return method.c_str(); } + void SetMethodType(MethodType _method) override + { + method = _method; + } \ + void ReflectWriter(Writer& writer) override { + Reflect(writer, static_cast(*this)); + } + + static std::unique_ptr ReflectReader(Reader& visitor) { + + TDerived* temp = new TDerived(); + std::unique_ptr message = std::unique_ptr(temp); + // Reflect may throw and *message will be partially deserialized. + Reflect(visitor, static_cast(*temp)); + return message; + } + void swap(lsRequest& arg) noexcept + { + id.swap(arg.id); + method.swap(method); + std::swap(params, arg.params); + } + T params; +}; + + +#define DEFINE_REQUEST_RESPONSE_TYPE(MSG,request_param,response_result,methodInfo)\ +namespace MSG {\ + struct response :public ResponseMessage< response_result, response> {}; \ + struct request : public lsRequest< request_param , request >{\ + static constexpr MethodType kMethodInfo = methodInfo;\ + request():lsRequest(kMethodInfo){} \ + using Response = response;\ + };\ +};\ +MAKE_REFLECT_STRUCT(MSG::request, jsonrpc, id, method, params);\ +MAKE_REFLECT_STRUCT(MSG::response, jsonrpc, id, result); + diff --git a/graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/ScopeExit.h b/graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/ScopeExit.h new file mode 100644 index 0000000000..024b700b4a --- /dev/null +++ b/graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/ScopeExit.h @@ -0,0 +1,59 @@ +//===- llvm/ADT/ScopeExit.h - Execute code at scope exit --------*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// +// This file defines the make_scope_exit function, which executes user-defined +// cleanup logic at scope exit. +// +//===----------------------------------------------------------------------===// +#pragma once +#include +#include + +namespace lsp { +namespace detail { + +template class scope_exit { + Callable ExitFunction; + bool Engaged = true; // False once moved-from or release()d. + +public: + template + explicit scope_exit(Fp &&F) : ExitFunction(std::forward(F)) {} + + scope_exit(scope_exit &&Rhs) + : ExitFunction(std::move(Rhs.ExitFunction)), Engaged(Rhs.Engaged) { + Rhs.release(); + } + scope_exit(const scope_exit &) = delete; + scope_exit &operator=(scope_exit &&) = delete; + scope_exit &operator=(const scope_exit &) = delete; + + void release() { Engaged = false; } + + ~scope_exit() { + if (Engaged) + ExitFunction(); + } +}; + +} // end namespace detail + +// Keeps the callable object that is passed in, and execute it at the +// destruction of the returned object (usually at the scope exit where the +// returned object is kept). +// +// Interface is specified by p0052r2. +template + detail::scope_exit::type> +make_scope_exit(Callable &&F) { + return detail::scope_exit::type>( + std::forward(F)); +} + +} // end namespace lsp + diff --git a/graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/StreamMessageProducer.h b/graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/StreamMessageProducer.h new file mode 100644 index 0000000000..439a9f1b0e --- /dev/null +++ b/graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/StreamMessageProducer.h @@ -0,0 +1,48 @@ +#pragma once +#include +#include +#include "MessageProducer.h" +#include +#include +#include "MessageIssue.h" + +namespace lsp { + class istream; +} + +class StreamMessageProducer : public MessageProducer +{ +public: + struct Headers + { + int contentLength = -1; + std::string charset; + void clear() + { + contentLength = -1; + charset.clear(); + } + }; + bool handleMessage(Headers& headers, MessageConsumer callBack); + StreamMessageProducer( + MessageIssueHandler& message_issue_handler, std::shared_ptr < lsp::istream> _input) + : issueHandler(message_issue_handler), + input(_input) + { + } + StreamMessageProducer( + MessageIssueHandler& message_issue_handler) + : issueHandler(message_issue_handler) + { + } + + bool keepRunning = false; + void listen(MessageConsumer) override; + void bind(std::shared_ptr < lsp::istream>); + void parseHeader(std::string& line, Headers& headers); +private: + MessageIssueHandler& issueHandler; + std::shared_ptr < lsp::istream> input; + + +}; diff --git a/graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/TcpServer.h b/graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/TcpServer.h new file mode 100644 index 0000000000..e533acf056 --- /dev/null +++ b/graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/TcpServer.h @@ -0,0 +1,40 @@ +#pragma once + +#include +#include +#include "RemoteEndPoint.h" + +namespace lsp { + class Log; +} +namespace lsp +{ + /// The top-level class of the HTTP server. + class TcpServer + { + public: + TcpServer(const TcpServer&) = delete; + TcpServer& operator=(const TcpServer&) = delete; + ~TcpServer(); + /// Construct the server to listen on the specified TCP address and port, and + /// serve up files from the given directory. + explicit TcpServer(const std::string& address, const std::string& port, + std::shared_ptr < MessageJsonHandler> json_handler, + std::shared_ptr < Endpoint> localEndPoint, lsp::Log& ,uint32_t _max_workers = 2); + + /// Run the server's io_context loop. + void run(); + void stop(); + + RemoteEndPoint point; + private: + struct Data; + /// Perform an asynchronous accept operation. + void do_accept(); + + /// Wait for a request to stop the server. + void do_stop(); + Data* d_ptr = nullptr; + }; +} // namespace + diff --git a/graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/WebSocketServer.h b/graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/WebSocketServer.h new file mode 100644 index 0000000000..5206525ceb --- /dev/null +++ b/graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/WebSocketServer.h @@ -0,0 +1,87 @@ +#pragma once + +#include +#include +#include +#include + + +#include "RemoteEndPoint.h" +#include "stream.h" +#include "threaded_queue.h" + +namespace lsp { + class Log; +} + + +namespace lsp +{ + + + + class websocket_stream_wrapper :public istream, public ostream + { + public: + + websocket_stream_wrapper(boost::beast::websocket::stream& _w); + + boost::beast::websocket::stream& ws_; + std::atomic quit{}; + std::shared_ptr < MultiQueueWaiter> request_waiter; + ThreadedQueue< char > on_request; + std::string error_message; + bool fail() override; + + bool eof() override; + + bool good() override; + + websocket_stream_wrapper& read(char* str, std::streamsize count) override; + + int get() override; + + bool bad() override; + + websocket_stream_wrapper& write(const std::string& c) override; + + websocket_stream_wrapper& write(std::streamsize _s) override; + + websocket_stream_wrapper& flush() override; + + void clear() override; + + std::string what() override; + }; + + /// The top-level class of the HTTP server. + class WebSocketServer + { + public: + WebSocketServer(const WebSocketServer&) = delete; + WebSocketServer& operator=(const WebSocketServer&) = delete; + ~WebSocketServer(); + /// Construct the server to listen on the specified TCP address and port, and + /// serve up files from the given directory. + explicit WebSocketServer(const std::string& user_agent, const std::string& address, const std::string& port, + std::shared_ptr < MessageJsonHandler> json_handler, + std::shared_ptr < Endpoint> localEndPoint, lsp::Log& ,uint32_t _max_workers = 2); + + /// Run the server's io_context loop. + void run(); + void stop(); + + RemoteEndPoint point; + private: + struct Data; + /// Perform an asynchronous accept operation. + void do_accept(); + + /// Wait for a request to stop the server. + void do_stop(); + Data* d_ptr = nullptr; + + + }; + + } // namespace diff --git a/graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/json.h b/graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/json.h new file mode 100644 index 0000000000..98ee91b544 --- /dev/null +++ b/graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/json.h @@ -0,0 +1,81 @@ +#pragma once + +#include "serializer.h" + +#include +#include + +class JsonReader : public Reader { + + std::vector path_; + + public: + rapidjson::GenericValue>* m_; + JsonReader(rapidjson::GenericValue>* m) : m_(m) {} + SerializeFormat Format() const override { return SerializeFormat::Json; } + + bool IsBool() override { return m_->IsBool(); } + bool IsNull() override { return m_->IsNull(); } + bool IsArray() override { return m_->IsArray(); } + bool IsInt() override { return m_->IsInt(); } + bool IsInt64() override { return m_->IsInt64(); } + bool IsUint64() override { return m_->IsUint64(); } + bool IsDouble() override { return m_->IsDouble(); } + bool IsNumber() override { return m_->IsNumber(); } + bool IsString() override { return m_->IsString(); } + + void GetNull() override {} + bool GetBool() override { return m_->GetBool(); } + int GetInt() override { return m_->GetInt(); } + uint32_t GetUint32() override { return uint32_t(m_->GetUint64()); } + int64_t GetInt64() override { return m_->GetInt64(); } + uint64_t GetUint64() override { return m_->GetUint64(); } + double GetDouble() override { return m_->GetDouble(); } + std::string GetString() override { return m_->GetString(); } + + bool HasMember(const char* x) override + { + if (m_->IsObject()) + return m_->HasMember(x); + else + return false; + } + std::unique_ptr operator[](const char* x) override { + auto& sub = (*m_)[x]; + return std::unique_ptr(new JsonReader(&sub)); + } + + std::string ToString() const override; + + void IterMap(std::function fn) override; + + void IterArray(std::function fn) override; + + void DoMember(const char* name, std::function fn) override; + + std::string GetPath() const; +}; + +class JsonWriter : public Writer { + + public: + rapidjson::Writer* m_; + + JsonWriter(rapidjson::Writer* m) : m_(m) {} + SerializeFormat Format() const override { return SerializeFormat::Json; } + + void Null() override { m_->Null(); } + void Bool(bool x) override { m_->Bool(x); } + void Int(int x) override { m_->Int(x); } + void Uint32(uint32_t x) override { m_->Uint64(x); } + void Int64(int64_t x) override { m_->Int64(x); } + void Uint64(uint64_t x) override { m_->Uint64(x); } + void Double(double x) override { m_->Double(x); } + void String(const char* x) override { m_->String(x); } + void String(const char* x, size_t len) override { m_->String(x, len); } + void StartArray(size_t) override { m_->StartArray(); } + void EndArray() override { m_->EndArray(); } + void StartObject() override { m_->StartObject(); } + void EndObject() override { m_->EndObject(); } + void Key(const char* name) override { m_->Key(name); } +}; diff --git a/graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/lsRequestId.h b/graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/lsRequestId.h new file mode 100644 index 0000000000..87e94669ab --- /dev/null +++ b/graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/lsRequestId.h @@ -0,0 +1,51 @@ +#pragma once + +#include "LibLsp/JsonRpc/serializer.h" + +struct lsRequestId { + // The client can send the request id as an int or a string. We should output + // the same format we received. + enum Type { kNone, kInt, kString }; + Type type = kNone; + + int value = -1; + std::string k_string; + bool has_value() const { return type != kNone; } + void swap(lsRequestId& arg) noexcept + { + std::swap(arg, *this); + } + void set(int v) + { + value = v; + type = kInt; + } + void set(const std::string& v) + { + k_string = v; + type = kString; + } + bool operator==(const lsRequestId& rhs) const + { + if (type != rhs.type) return false; + if (type == kInt) + return value == rhs.value; + return k_string == rhs.k_string; + } + bool operator!=(const lsRequestId& rhs) const + { + return !operator==(rhs); + } + bool operator<(const lsRequestId& rhs) const + { + if (type != rhs.type) return false; + if (type == kInt) + return value < rhs.value; + return k_string < rhs.k_string; + } +}; +void Reflect(Reader& visitor, lsRequestId& value); +void Reflect(Writer& visitor, lsRequestId& value); + +// Debug method to convert an id to a string. +std::string ToString(const lsRequestId& id); \ No newline at end of file diff --git a/graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/lsResponseMessage.h b/graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/lsResponseMessage.h new file mode 100644 index 0000000000..ba94167cf8 --- /dev/null +++ b/graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/lsResponseMessage.h @@ -0,0 +1,71 @@ +#pragma once +#include "serializer.h" +#include "lsRequestId.h" +#include "LibLsp/JsonRpc/message.h" +#include "LibLsp/lsp/method_type.h" + + +struct ResponseInMessage :public LspMessage { + + lsRequestId id; + std::string m_methodType; + + virtual MethodType GetMethodType() const override + { + return m_methodType.data(); + }; + virtual void SetMethodType(MethodType _type) override + { + m_methodType = _type; + }; + + Kind GetKid() override + { + return RESPONCE_MESSAGE; + } + virtual bool IsErrorType() + { + return false; + } +}; +template +struct BaseResponseMessage : ResponseInMessage { + + void ReflectWriter(Writer& writer) override { + Reflect(writer, static_cast(*this)); + } + static std::unique_ptr ReflectReader(Reader& visitor) { + + TDerived* temp = new TDerived(); + std::unique_ptr message = std::unique_ptr(temp); + // Reflect may throw and *message will be partially deserialized. + Reflect(visitor, static_cast(*temp)); + return message; + } + +}; + + +template +struct ResponseMessage : BaseResponseMessage { + T result; + void swap(ResponseMessage& arg) noexcept + { + std::swap(result, arg.result); + this->id.swap(arg.id); + this->m_methodType.swap(arg.m_methodType); + } +}; + +template +struct ResponseError : BaseResponseMessage { + T error; + bool IsErrorType() override { return true; } + void swap(ResponseError& arg) noexcept + { + + this->id.swap(arg.id); + this->m_methodType.swap(arg.m_methodType); + std::swap(error, arg.error); + } +}; diff --git a/graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/macro_map.h b/graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/macro_map.h new file mode 100644 index 0000000000..f09ba5b1a7 --- /dev/null +++ b/graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/macro_map.h @@ -0,0 +1,134 @@ +/* +Boost Software License - Version 1.0 - August 17th, 2003 + +Permission is hereby granted, free of charge, to any person or organization +obtaining a copy of the software and accompanying documentation covered by +this license (the "Software") to use, reproduce, display, distribute, +execute, and transmit the Software, and to prepare derivative works of the +Software, and to permit third-parties to whom the Software is furnished to +do so, all subject to the following: + +The copyright notices in the Software and this entire statement, including +the above license grant, this restriction and the following disclaimer, +must be included in all copies of the Software, in whole or in part, and +all derivative works of the Software, unless such copies or derivative +works are solely in the form of machine-executable object code generated by +a source language processor. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT +SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE +FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. +*/ + +// Taken from https://github.com/cbeck88/visit_struct. +// +// Usage +// +// #define PRINT_DOUBLE(x) printf(#x " = %d\n", x); +// +// MACRO_MAP(PRINT_DOUBLE, 1, 2, 3) +// #define PRINT_DOUBLES(...) MACRO_MAP(PRINT_DOUBLE, __VA_ARGS__) + +#pragma once + +static constexpr const int max_visitable_members = 69; + +#define VISIT_STRUCT_EXPAND(x) x +#define VISIT_STRUCT_PP_ARG_N( \ + _1, _2, _3, _4, _5, _6, _7, _8, _9, _10,\ + _11, _12, _13, _14, _15, _16, _17, _18, _19, _20,\ + _21, _22, _23, _24, _25, _26, _27, _28, _29, _30,\ + _31, _32, _33, _34, _35, _36, _37, _38, _39, _40,\ + _41, _42, _43, _44, _45, _46, _47, _48, _49, _50,\ + _51, _52, _53, _54, _55, _56, _57, _58, _59, _60,\ + _61, _62, _63, _64, _65, _66, _67, _68, _69, N, ...) N +#define VISIT_STRUCT_PP_NARG(...) VISIT_STRUCT_EXPAND(VISIT_STRUCT_PP_ARG_N(__VA_ARGS__, \ + 69, 68, 67, 66, 65, 64, 63, 62, 61, 60, \ + 59, 58, 57, 56, 55, 54, 53, 52, 51, 50, \ + 49, 48, 47, 46, 45, 44, 43, 42, 41, 40, \ + 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, \ + 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, \ + 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, \ + 9, 8, 7, 6, 5, 4, 3, 2, 1, 0)) + +/* need extra level to force extra eval */ +#define VISIT_STRUCT_CONCAT_(a,b) a ## b +#define VISIT_STRUCT_CONCAT(a,b) VISIT_STRUCT_CONCAT_(a,b) + +#define VISIT_STRUCT_APPLYF0(f) +#define VISIT_STRUCT_APPLYF1(f,_1) f(_1) +#define VISIT_STRUCT_APPLYF2(f,_1,_2) f(_1) f(_2) +#define VISIT_STRUCT_APPLYF3(f,_1,_2,_3) f(_1) f(_2) f(_3) +#define VISIT_STRUCT_APPLYF4(f,_1,_2,_3,_4) f(_1) f(_2) f(_3) f(_4) +#define VISIT_STRUCT_APPLYF5(f,_1,_2,_3,_4,_5) f(_1) f(_2) f(_3) f(_4) f(_5) +#define VISIT_STRUCT_APPLYF6(f,_1,_2,_3,_4,_5,_6) f(_1) f(_2) f(_3) f(_4) f(_5) f(_6) +#define VISIT_STRUCT_APPLYF7(f,_1,_2,_3,_4,_5,_6,_7) f(_1) f(_2) f(_3) f(_4) f(_5) f(_6) f(_7) +#define VISIT_STRUCT_APPLYF8(f,_1,_2,_3,_4,_5,_6,_7,_8) f(_1) f(_2) f(_3) f(_4) f(_5) f(_6) f(_7) f(_8) +#define VISIT_STRUCT_APPLYF9(f,_1,_2,_3,_4,_5,_6,_7,_8,_9) f(_1) f(_2) f(_3) f(_4) f(_5) f(_6) f(_7) f(_8) f(_9) +#define VISIT_STRUCT_APPLYF10(f,_1,_2,_3,_4,_5,_6,_7,_8,_9,_10) f(_1) f(_2) f(_3) f(_4) f(_5) f(_6) f(_7) f(_8) f(_9) f(_10) +#define VISIT_STRUCT_APPLYF11(f,_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11) f(_1) f(_2) f(_3) f(_4) f(_5) f(_6) f(_7) f(_8) f(_9) f(_10) f(_11) +#define VISIT_STRUCT_APPLYF12(f,_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12) f(_1) f(_2) f(_3) f(_4) f(_5) f(_6) f(_7) f(_8) f(_9) f(_10) f(_11) f(_12) +#define VISIT_STRUCT_APPLYF13(f,_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13) f(_1) f(_2) f(_3) f(_4) f(_5) f(_6) f(_7) f(_8) f(_9) f(_10) f(_11) f(_12) f(_13) +#define VISIT_STRUCT_APPLYF14(f,_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14) f(_1) f(_2) f(_3) f(_4) f(_5) f(_6) f(_7) f(_8) f(_9) f(_10) f(_11) f(_12) f(_13) f(_14) +#define VISIT_STRUCT_APPLYF15(f,_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15) f(_1) f(_2) f(_3) f(_4) f(_5) f(_6) f(_7) f(_8) f(_9) f(_10) f(_11) f(_12) f(_13) f(_14) f(_15) +#define VISIT_STRUCT_APPLYF16(f,_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16) f(_1) f(_2) f(_3) f(_4) f(_5) f(_6) f(_7) f(_8) f(_9) f(_10) f(_11) f(_12) f(_13) f(_14) f(_15) f(_16) +#define VISIT_STRUCT_APPLYF17(f,_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17) f(_1) f(_2) f(_3) f(_4) f(_5) f(_6) f(_7) f(_8) f(_9) f(_10) f(_11) f(_12) f(_13) f(_14) f(_15) f(_16) f(_17) +#define VISIT_STRUCT_APPLYF18(f,_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18) f(_1) f(_2) f(_3) f(_4) f(_5) f(_6) f(_7) f(_8) f(_9) f(_10) f(_11) f(_12) f(_13) f(_14) f(_15) f(_16) f(_17) f(_18) +#define VISIT_STRUCT_APPLYF19(f,_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19) f(_1) f(_2) f(_3) f(_4) f(_5) f(_6) f(_7) f(_8) f(_9) f(_10) f(_11) f(_12) f(_13) f(_14) f(_15) f(_16) f(_17) f(_18) f(_19) +#define VISIT_STRUCT_APPLYF20(f,_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,_20) f(_1) f(_2) f(_3) f(_4) f(_5) f(_6) f(_7) f(_8) f(_9) f(_10) f(_11) f(_12) f(_13) f(_14) f(_15) f(_16) f(_17) f(_18) f(_19) f(_20) +#define VISIT_STRUCT_APPLYF21(f,_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,_20,_21) f(_1) f(_2) f(_3) f(_4) f(_5) f(_6) f(_7) f(_8) f(_9) f(_10) f(_11) f(_12) f(_13) f(_14) f(_15) f(_16) f(_17) f(_18) f(_19) f(_20) f(_21) +#define VISIT_STRUCT_APPLYF22(f,_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,_20,_21,_22) f(_1) f(_2) f(_3) f(_4) f(_5) f(_6) f(_7) f(_8) f(_9) f(_10) f(_11) f(_12) f(_13) f(_14) f(_15) f(_16) f(_17) f(_18) f(_19) f(_20) f(_21) f(_22) +#define VISIT_STRUCT_APPLYF23(f,_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,_20,_21,_22,_23) f(_1) f(_2) f(_3) f(_4) f(_5) f(_6) f(_7) f(_8) f(_9) f(_10) f(_11) f(_12) f(_13) f(_14) f(_15) f(_16) f(_17) f(_18) f(_19) f(_20) f(_21) f(_22) f(_23) +#define VISIT_STRUCT_APPLYF24(f,_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,_20,_21,_22,_23,_24) f(_1) f(_2) f(_3) f(_4) f(_5) f(_6) f(_7) f(_8) f(_9) f(_10) f(_11) f(_12) f(_13) f(_14) f(_15) f(_16) f(_17) f(_18) f(_19) f(_20) f(_21) f(_22) f(_23) f(_24) +#define VISIT_STRUCT_APPLYF25(f,_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,_20,_21,_22,_23,_24,_25) f(_1) f(_2) f(_3) f(_4) f(_5) f(_6) f(_7) f(_8) f(_9) f(_10) f(_11) f(_12) f(_13) f(_14) f(_15) f(_16) f(_17) f(_18) f(_19) f(_20) f(_21) f(_22) f(_23) f(_24) f(_25) +#define VISIT_STRUCT_APPLYF26(f,_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,_20,_21,_22,_23,_24,_25,_26) f(_1) f(_2) f(_3) f(_4) f(_5) f(_6) f(_7) f(_8) f(_9) f(_10) f(_11) f(_12) f(_13) f(_14) f(_15) f(_16) f(_17) f(_18) f(_19) f(_20) f(_21) f(_22) f(_23) f(_24) f(_25) f(_26) +#define VISIT_STRUCT_APPLYF27(f,_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,_20,_21,_22,_23,_24,_25,_26,_27) f(_1) f(_2) f(_3) f(_4) f(_5) f(_6) f(_7) f(_8) f(_9) f(_10) f(_11) f(_12) f(_13) f(_14) f(_15) f(_16) f(_17) f(_18) f(_19) f(_20) f(_21) f(_22) f(_23) f(_24) f(_25) f(_26) f(_27) +#define VISIT_STRUCT_APPLYF28(f,_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,_20,_21,_22,_23,_24,_25,_26,_27,_28) f(_1) f(_2) f(_3) f(_4) f(_5) f(_6) f(_7) f(_8) f(_9) f(_10) f(_11) f(_12) f(_13) f(_14) f(_15) f(_16) f(_17) f(_18) f(_19) f(_20) f(_21) f(_22) f(_23) f(_24) f(_25) f(_26) f(_27) f(_28) +#define VISIT_STRUCT_APPLYF29(f,_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,_20,_21,_22,_23,_24,_25,_26,_27,_28,_29) f(_1) f(_2) f(_3) f(_4) f(_5) f(_6) f(_7) f(_8) f(_9) f(_10) f(_11) f(_12) f(_13) f(_14) f(_15) f(_16) f(_17) f(_18) f(_19) f(_20) f(_21) f(_22) f(_23) f(_24) f(_25) f(_26) f(_27) f(_28) f(_29) +#define VISIT_STRUCT_APPLYF30(f,_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,_20,_21,_22,_23,_24,_25,_26,_27,_28,_29,_30) f(_1) f(_2) f(_3) f(_4) f(_5) f(_6) f(_7) f(_8) f(_9) f(_10) f(_11) f(_12) f(_13) f(_14) f(_15) f(_16) f(_17) f(_18) f(_19) f(_20) f(_21) f(_22) f(_23) f(_24) f(_25) f(_26) f(_27) f(_28) f(_29) f(_30) +#define VISIT_STRUCT_APPLYF31(f,_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,_20,_21,_22,_23,_24,_25,_26,_27,_28,_29,_30,_31) f(_1) f(_2) f(_3) f(_4) f(_5) f(_6) f(_7) f(_8) f(_9) f(_10) f(_11) f(_12) f(_13) f(_14) f(_15) f(_16) f(_17) f(_18) f(_19) f(_20) f(_21) f(_22) f(_23) f(_24) f(_25) f(_26) f(_27) f(_28) f(_29) f(_30) f(_31) +#define VISIT_STRUCT_APPLYF32(f,_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,_20,_21,_22,_23,_24,_25,_26,_27,_28,_29,_30,_31,_32) f(_1) f(_2) f(_3) f(_4) f(_5) f(_6) f(_7) f(_8) f(_9) f(_10) f(_11) f(_12) f(_13) f(_14) f(_15) f(_16) f(_17) f(_18) f(_19) f(_20) f(_21) f(_22) f(_23) f(_24) f(_25) f(_26) f(_27) f(_28) f(_29) f(_30) f(_31) f(_32) +#define VISIT_STRUCT_APPLYF33(f,_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,_20,_21,_22,_23,_24,_25,_26,_27,_28,_29,_30,_31,_32,_33) f(_1) f(_2) f(_3) f(_4) f(_5) f(_6) f(_7) f(_8) f(_9) f(_10) f(_11) f(_12) f(_13) f(_14) f(_15) f(_16) f(_17) f(_18) f(_19) f(_20) f(_21) f(_22) f(_23) f(_24) f(_25) f(_26) f(_27) f(_28) f(_29) f(_30) f(_31) f(_32) f(_33) +#define VISIT_STRUCT_APPLYF34(f,_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,_20,_21,_22,_23,_24,_25,_26,_27,_28,_29,_30,_31,_32,_33,_34) f(_1) f(_2) f(_3) f(_4) f(_5) f(_6) f(_7) f(_8) f(_9) f(_10) f(_11) f(_12) f(_13) f(_14) f(_15) f(_16) f(_17) f(_18) f(_19) f(_20) f(_21) f(_22) f(_23) f(_24) f(_25) f(_26) f(_27) f(_28) f(_29) f(_30) f(_31) f(_32) f(_33) f(_34) +#define VISIT_STRUCT_APPLYF35(f,_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,_20,_21,_22,_23,_24,_25,_26,_27,_28,_29,_30,_31,_32,_33,_34,_35) f(_1) f(_2) f(_3) f(_4) f(_5) f(_6) f(_7) f(_8) f(_9) f(_10) f(_11) f(_12) f(_13) f(_14) f(_15) f(_16) f(_17) f(_18) f(_19) f(_20) f(_21) f(_22) f(_23) f(_24) f(_25) f(_26) f(_27) f(_28) f(_29) f(_30) f(_31) f(_32) f(_33) f(_34) f(_35) +#define VISIT_STRUCT_APPLYF36(f,_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,_20,_21,_22,_23,_24,_25,_26,_27,_28,_29,_30,_31,_32,_33,_34,_35,_36) f(_1) f(_2) f(_3) f(_4) f(_5) f(_6) f(_7) f(_8) f(_9) f(_10) f(_11) f(_12) f(_13) f(_14) f(_15) f(_16) f(_17) f(_18) f(_19) f(_20) f(_21) f(_22) f(_23) f(_24) f(_25) f(_26) f(_27) f(_28) f(_29) f(_30) f(_31) f(_32) f(_33) f(_34) f(_35) f(_36) +#define VISIT_STRUCT_APPLYF37(f,_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,_20,_21,_22,_23,_24,_25,_26,_27,_28,_29,_30,_31,_32,_33,_34,_35,_36,_37) f(_1) f(_2) f(_3) f(_4) f(_5) f(_6) f(_7) f(_8) f(_9) f(_10) f(_11) f(_12) f(_13) f(_14) f(_15) f(_16) f(_17) f(_18) f(_19) f(_20) f(_21) f(_22) f(_23) f(_24) f(_25) f(_26) f(_27) f(_28) f(_29) f(_30) f(_31) f(_32) f(_33) f(_34) f(_35) f(_36) f(_37) +#define VISIT_STRUCT_APPLYF38(f,_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,_20,_21,_22,_23,_24,_25,_26,_27,_28,_29,_30,_31,_32,_33,_34,_35,_36,_37,_38) f(_1) f(_2) f(_3) f(_4) f(_5) f(_6) f(_7) f(_8) f(_9) f(_10) f(_11) f(_12) f(_13) f(_14) f(_15) f(_16) f(_17) f(_18) f(_19) f(_20) f(_21) f(_22) f(_23) f(_24) f(_25) f(_26) f(_27) f(_28) f(_29) f(_30) f(_31) f(_32) f(_33) f(_34) f(_35) f(_36) f(_37) f(_38) +#define VISIT_STRUCT_APPLYF39(f,_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,_20,_21,_22,_23,_24,_25,_26,_27,_28,_29,_30,_31,_32,_33,_34,_35,_36,_37,_38,_39) f(_1) f(_2) f(_3) f(_4) f(_5) f(_6) f(_7) f(_8) f(_9) f(_10) f(_11) f(_12) f(_13) f(_14) f(_15) f(_16) f(_17) f(_18) f(_19) f(_20) f(_21) f(_22) f(_23) f(_24) f(_25) f(_26) f(_27) f(_28) f(_29) f(_30) f(_31) f(_32) f(_33) f(_34) f(_35) f(_36) f(_37) f(_38) f(_39) +#define VISIT_STRUCT_APPLYF40(f,_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,_20,_21,_22,_23,_24,_25,_26,_27,_28,_29,_30,_31,_32,_33,_34,_35,_36,_37,_38,_39,_40) f(_1) f(_2) f(_3) f(_4) f(_5) f(_6) f(_7) f(_8) f(_9) f(_10) f(_11) f(_12) f(_13) f(_14) f(_15) f(_16) f(_17) f(_18) f(_19) f(_20) f(_21) f(_22) f(_23) f(_24) f(_25) f(_26) f(_27) f(_28) f(_29) f(_30) f(_31) f(_32) f(_33) f(_34) f(_35) f(_36) f(_37) f(_38) f(_39) f(_40) +#define VISIT_STRUCT_APPLYF41(f,_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,_20,_21,_22,_23,_24,_25,_26,_27,_28,_29,_30,_31,_32,_33,_34,_35,_36,_37,_38,_39,_40,_41) f(_1) f(_2) f(_3) f(_4) f(_5) f(_6) f(_7) f(_8) f(_9) f(_10) f(_11) f(_12) f(_13) f(_14) f(_15) f(_16) f(_17) f(_18) f(_19) f(_20) f(_21) f(_22) f(_23) f(_24) f(_25) f(_26) f(_27) f(_28) f(_29) f(_30) f(_31) f(_32) f(_33) f(_34) f(_35) f(_36) f(_37) f(_38) f(_39) f(_40) f(_41) +#define VISIT_STRUCT_APPLYF42(f,_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,_20,_21,_22,_23,_24,_25,_26,_27,_28,_29,_30,_31,_32,_33,_34,_35,_36,_37,_38,_39,_40,_41,_42) f(_1) f(_2) f(_3) f(_4) f(_5) f(_6) f(_7) f(_8) f(_9) f(_10) f(_11) f(_12) f(_13) f(_14) f(_15) f(_16) f(_17) f(_18) f(_19) f(_20) f(_21) f(_22) f(_23) f(_24) f(_25) f(_26) f(_27) f(_28) f(_29) f(_30) f(_31) f(_32) f(_33) f(_34) f(_35) f(_36) f(_37) f(_38) f(_39) f(_40) f(_41) f(_42) +#define VISIT_STRUCT_APPLYF43(f,_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,_20,_21,_22,_23,_24,_25,_26,_27,_28,_29,_30,_31,_32,_33,_34,_35,_36,_37,_38,_39,_40,_41,_42,_43) f(_1) f(_2) f(_3) f(_4) f(_5) f(_6) f(_7) f(_8) f(_9) f(_10) f(_11) f(_12) f(_13) f(_14) f(_15) f(_16) f(_17) f(_18) f(_19) f(_20) f(_21) f(_22) f(_23) f(_24) f(_25) f(_26) f(_27) f(_28) f(_29) f(_30) f(_31) f(_32) f(_33) f(_34) f(_35) f(_36) f(_37) f(_38) f(_39) f(_40) f(_41) f(_42) f(_43) +#define VISIT_STRUCT_APPLYF44(f,_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,_20,_21,_22,_23,_24,_25,_26,_27,_28,_29,_30,_31,_32,_33,_34,_35,_36,_37,_38,_39,_40,_41,_42,_43,_44) f(_1) f(_2) f(_3) f(_4) f(_5) f(_6) f(_7) f(_8) f(_9) f(_10) f(_11) f(_12) f(_13) f(_14) f(_15) f(_16) f(_17) f(_18) f(_19) f(_20) f(_21) f(_22) f(_23) f(_24) f(_25) f(_26) f(_27) f(_28) f(_29) f(_30) f(_31) f(_32) f(_33) f(_34) f(_35) f(_36) f(_37) f(_38) f(_39) f(_40) f(_41) f(_42) f(_43) f(_44) +#define VISIT_STRUCT_APPLYF45(f,_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,_20,_21,_22,_23,_24,_25,_26,_27,_28,_29,_30,_31,_32,_33,_34,_35,_36,_37,_38,_39,_40,_41,_42,_43,_44,_45) f(_1) f(_2) f(_3) f(_4) f(_5) f(_6) f(_7) f(_8) f(_9) f(_10) f(_11) f(_12) f(_13) f(_14) f(_15) f(_16) f(_17) f(_18) f(_19) f(_20) f(_21) f(_22) f(_23) f(_24) f(_25) f(_26) f(_27) f(_28) f(_29) f(_30) f(_31) f(_32) f(_33) f(_34) f(_35) f(_36) f(_37) f(_38) f(_39) f(_40) f(_41) f(_42) f(_43) f(_44) f(_45) +#define VISIT_STRUCT_APPLYF46(f,_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,_20,_21,_22,_23,_24,_25,_26,_27,_28,_29,_30,_31,_32,_33,_34,_35,_36,_37,_38,_39,_40,_41,_42,_43,_44,_45,_46) f(_1) f(_2) f(_3) f(_4) f(_5) f(_6) f(_7) f(_8) f(_9) f(_10) f(_11) f(_12) f(_13) f(_14) f(_15) f(_16) f(_17) f(_18) f(_19) f(_20) f(_21) f(_22) f(_23) f(_24) f(_25) f(_26) f(_27) f(_28) f(_29) f(_30) f(_31) f(_32) f(_33) f(_34) f(_35) f(_36) f(_37) f(_38) f(_39) f(_40) f(_41) f(_42) f(_43) f(_44) f(_45) f(_46) +#define VISIT_STRUCT_APPLYF47(f,_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,_20,_21,_22,_23,_24,_25,_26,_27,_28,_29,_30,_31,_32,_33,_34,_35,_36,_37,_38,_39,_40,_41,_42,_43,_44,_45,_46,_47) f(_1) f(_2) f(_3) f(_4) f(_5) f(_6) f(_7) f(_8) f(_9) f(_10) f(_11) f(_12) f(_13) f(_14) f(_15) f(_16) f(_17) f(_18) f(_19) f(_20) f(_21) f(_22) f(_23) f(_24) f(_25) f(_26) f(_27) f(_28) f(_29) f(_30) f(_31) f(_32) f(_33) f(_34) f(_35) f(_36) f(_37) f(_38) f(_39) f(_40) f(_41) f(_42) f(_43) f(_44) f(_45) f(_46) f(_47) +#define VISIT_STRUCT_APPLYF48(f,_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,_20,_21,_22,_23,_24,_25,_26,_27,_28,_29,_30,_31,_32,_33,_34,_35,_36,_37,_38,_39,_40,_41,_42,_43,_44,_45,_46,_47,_48) f(_1) f(_2) f(_3) f(_4) f(_5) f(_6) f(_7) f(_8) f(_9) f(_10) f(_11) f(_12) f(_13) f(_14) f(_15) f(_16) f(_17) f(_18) f(_19) f(_20) f(_21) f(_22) f(_23) f(_24) f(_25) f(_26) f(_27) f(_28) f(_29) f(_30) f(_31) f(_32) f(_33) f(_34) f(_35) f(_36) f(_37) f(_38) f(_39) f(_40) f(_41) f(_42) f(_43) f(_44) f(_45) f(_46) f(_47) f(_48) +#define VISIT_STRUCT_APPLYF49(f,_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,_20,_21,_22,_23,_24,_25,_26,_27,_28,_29,_30,_31,_32,_33,_34,_35,_36,_37,_38,_39,_40,_41,_42,_43,_44,_45,_46,_47,_48,_49) f(_1) f(_2) f(_3) f(_4) f(_5) f(_6) f(_7) f(_8) f(_9) f(_10) f(_11) f(_12) f(_13) f(_14) f(_15) f(_16) f(_17) f(_18) f(_19) f(_20) f(_21) f(_22) f(_23) f(_24) f(_25) f(_26) f(_27) f(_28) f(_29) f(_30) f(_31) f(_32) f(_33) f(_34) f(_35) f(_36) f(_37) f(_38) f(_39) f(_40) f(_41) f(_42) f(_43) f(_44) f(_45) f(_46) f(_47) f(_48) f(_49) +#define VISIT_STRUCT_APPLYF50(f,_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,_20,_21,_22,_23,_24,_25,_26,_27,_28,_29,_30,_31,_32,_33,_34,_35,_36,_37,_38,_39,_40,_41,_42,_43,_44,_45,_46,_47,_48,_49,_50) f(_1) f(_2) f(_3) f(_4) f(_5) f(_6) f(_7) f(_8) f(_9) f(_10) f(_11) f(_12) f(_13) f(_14) f(_15) f(_16) f(_17) f(_18) f(_19) f(_20) f(_21) f(_22) f(_23) f(_24) f(_25) f(_26) f(_27) f(_28) f(_29) f(_30) f(_31) f(_32) f(_33) f(_34) f(_35) f(_36) f(_37) f(_38) f(_39) f(_40) f(_41) f(_42) f(_43) f(_44) f(_45) f(_46) f(_47) f(_48) f(_49) f(_50) +#define VISIT_STRUCT_APPLYF51(f,_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,_20,_21,_22,_23,_24,_25,_26,_27,_28,_29,_30,_31,_32,_33,_34,_35,_36,_37,_38,_39,_40,_41,_42,_43,_44,_45,_46,_47,_48,_49,_50,_51) f(_1) f(_2) f(_3) f(_4) f(_5) f(_6) f(_7) f(_8) f(_9) f(_10) f(_11) f(_12) f(_13) f(_14) f(_15) f(_16) f(_17) f(_18) f(_19) f(_20) f(_21) f(_22) f(_23) f(_24) f(_25) f(_26) f(_27) f(_28) f(_29) f(_30) f(_31) f(_32) f(_33) f(_34) f(_35) f(_36) f(_37) f(_38) f(_39) f(_40) f(_41) f(_42) f(_43) f(_44) f(_45) f(_46) f(_47) f(_48) f(_49) f(_50) f(_51) +#define VISIT_STRUCT_APPLYF52(f,_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,_20,_21,_22,_23,_24,_25,_26,_27,_28,_29,_30,_31,_32,_33,_34,_35,_36,_37,_38,_39,_40,_41,_42,_43,_44,_45,_46,_47,_48,_49,_50,_51,_52) f(_1) f(_2) f(_3) f(_4) f(_5) f(_6) f(_7) f(_8) f(_9) f(_10) f(_11) f(_12) f(_13) f(_14) f(_15) f(_16) f(_17) f(_18) f(_19) f(_20) f(_21) f(_22) f(_23) f(_24) f(_25) f(_26) f(_27) f(_28) f(_29) f(_30) f(_31) f(_32) f(_33) f(_34) f(_35) f(_36) f(_37) f(_38) f(_39) f(_40) f(_41) f(_42) f(_43) f(_44) f(_45) f(_46) f(_47) f(_48) f(_49) f(_50) f(_51) f(_52) +#define VISIT_STRUCT_APPLYF53(f,_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,_20,_21,_22,_23,_24,_25,_26,_27,_28,_29,_30,_31,_32,_33,_34,_35,_36,_37,_38,_39,_40,_41,_42,_43,_44,_45,_46,_47,_48,_49,_50,_51,_52,_53) f(_1) f(_2) f(_3) f(_4) f(_5) f(_6) f(_7) f(_8) f(_9) f(_10) f(_11) f(_12) f(_13) f(_14) f(_15) f(_16) f(_17) f(_18) f(_19) f(_20) f(_21) f(_22) f(_23) f(_24) f(_25) f(_26) f(_27) f(_28) f(_29) f(_30) f(_31) f(_32) f(_33) f(_34) f(_35) f(_36) f(_37) f(_38) f(_39) f(_40) f(_41) f(_42) f(_43) f(_44) f(_45) f(_46) f(_47) f(_48) f(_49) f(_50) f(_51) f(_52) f(_53) +#define VISIT_STRUCT_APPLYF54(f,_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,_20,_21,_22,_23,_24,_25,_26,_27,_28,_29,_30,_31,_32,_33,_34,_35,_36,_37,_38,_39,_40,_41,_42,_43,_44,_45,_46,_47,_48,_49,_50,_51,_52,_53,_54) f(_1) f(_2) f(_3) f(_4) f(_5) f(_6) f(_7) f(_8) f(_9) f(_10) f(_11) f(_12) f(_13) f(_14) f(_15) f(_16) f(_17) f(_18) f(_19) f(_20) f(_21) f(_22) f(_23) f(_24) f(_25) f(_26) f(_27) f(_28) f(_29) f(_30) f(_31) f(_32) f(_33) f(_34) f(_35) f(_36) f(_37) f(_38) f(_39) f(_40) f(_41) f(_42) f(_43) f(_44) f(_45) f(_46) f(_47) f(_48) f(_49) f(_50) f(_51) f(_52) f(_53) f(_54) +#define VISIT_STRUCT_APPLYF55(f,_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,_20,_21,_22,_23,_24,_25,_26,_27,_28,_29,_30,_31,_32,_33,_34,_35,_36,_37,_38,_39,_40,_41,_42,_43,_44,_45,_46,_47,_48,_49,_50,_51,_52,_53,_54,_55) f(_1) f(_2) f(_3) f(_4) f(_5) f(_6) f(_7) f(_8) f(_9) f(_10) f(_11) f(_12) f(_13) f(_14) f(_15) f(_16) f(_17) f(_18) f(_19) f(_20) f(_21) f(_22) f(_23) f(_24) f(_25) f(_26) f(_27) f(_28) f(_29) f(_30) f(_31) f(_32) f(_33) f(_34) f(_35) f(_36) f(_37) f(_38) f(_39) f(_40) f(_41) f(_42) f(_43) f(_44) f(_45) f(_46) f(_47) f(_48) f(_49) f(_50) f(_51) f(_52) f(_53) f(_54) f(_55) +#define VISIT_STRUCT_APPLYF56(f,_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,_20,_21,_22,_23,_24,_25,_26,_27,_28,_29,_30,_31,_32,_33,_34,_35,_36,_37,_38,_39,_40,_41,_42,_43,_44,_45,_46,_47,_48,_49,_50,_51,_52,_53,_54,_55,_56) f(_1) f(_2) f(_3) f(_4) f(_5) f(_6) f(_7) f(_8) f(_9) f(_10) f(_11) f(_12) f(_13) f(_14) f(_15) f(_16) f(_17) f(_18) f(_19) f(_20) f(_21) f(_22) f(_23) f(_24) f(_25) f(_26) f(_27) f(_28) f(_29) f(_30) f(_31) f(_32) f(_33) f(_34) f(_35) f(_36) f(_37) f(_38) f(_39) f(_40) f(_41) f(_42) f(_43) f(_44) f(_45) f(_46) f(_47) f(_48) f(_49) f(_50) f(_51) f(_52) f(_53) f(_54) f(_55) f(_56) +#define VISIT_STRUCT_APPLYF57(f,_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,_20,_21,_22,_23,_24,_25,_26,_27,_28,_29,_30,_31,_32,_33,_34,_35,_36,_37,_38,_39,_40,_41,_42,_43,_44,_45,_46,_47,_48,_49,_50,_51,_52,_53,_54,_55,_56,_57) f(_1) f(_2) f(_3) f(_4) f(_5) f(_6) f(_7) f(_8) f(_9) f(_10) f(_11) f(_12) f(_13) f(_14) f(_15) f(_16) f(_17) f(_18) f(_19) f(_20) f(_21) f(_22) f(_23) f(_24) f(_25) f(_26) f(_27) f(_28) f(_29) f(_30) f(_31) f(_32) f(_33) f(_34) f(_35) f(_36) f(_37) f(_38) f(_39) f(_40) f(_41) f(_42) f(_43) f(_44) f(_45) f(_46) f(_47) f(_48) f(_49) f(_50) f(_51) f(_52) f(_53) f(_54) f(_55) f(_56) f(_57) +#define VISIT_STRUCT_APPLYF58(f,_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,_20,_21,_22,_23,_24,_25,_26,_27,_28,_29,_30,_31,_32,_33,_34,_35,_36,_37,_38,_39,_40,_41,_42,_43,_44,_45,_46,_47,_48,_49,_50,_51,_52,_53,_54,_55,_56,_57,_58) f(_1) f(_2) f(_3) f(_4) f(_5) f(_6) f(_7) f(_8) f(_9) f(_10) f(_11) f(_12) f(_13) f(_14) f(_15) f(_16) f(_17) f(_18) f(_19) f(_20) f(_21) f(_22) f(_23) f(_24) f(_25) f(_26) f(_27) f(_28) f(_29) f(_30) f(_31) f(_32) f(_33) f(_34) f(_35) f(_36) f(_37) f(_38) f(_39) f(_40) f(_41) f(_42) f(_43) f(_44) f(_45) f(_46) f(_47) f(_48) f(_49) f(_50) f(_51) f(_52) f(_53) f(_54) f(_55) f(_56) f(_57) f(_58) +#define VISIT_STRUCT_APPLYF59(f,_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,_20,_21,_22,_23,_24,_25,_26,_27,_28,_29,_30,_31,_32,_33,_34,_35,_36,_37,_38,_39,_40,_41,_42,_43,_44,_45,_46,_47,_48,_49,_50,_51,_52,_53,_54,_55,_56,_57,_58,_59) f(_1) f(_2) f(_3) f(_4) f(_5) f(_6) f(_7) f(_8) f(_9) f(_10) f(_11) f(_12) f(_13) f(_14) f(_15) f(_16) f(_17) f(_18) f(_19) f(_20) f(_21) f(_22) f(_23) f(_24) f(_25) f(_26) f(_27) f(_28) f(_29) f(_30) f(_31) f(_32) f(_33) f(_34) f(_35) f(_36) f(_37) f(_38) f(_39) f(_40) f(_41) f(_42) f(_43) f(_44) f(_45) f(_46) f(_47) f(_48) f(_49) f(_50) f(_51) f(_52) f(_53) f(_54) f(_55) f(_56) f(_57) f(_58) f(_59) +#define VISIT_STRUCT_APPLYF60(f,_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,_20,_21,_22,_23,_24,_25,_26,_27,_28,_29,_30,_31,_32,_33,_34,_35,_36,_37,_38,_39,_40,_41,_42,_43,_44,_45,_46,_47,_48,_49,_50,_51,_52,_53,_54,_55,_56,_57,_58,_59,_60) f(_1) f(_2) f(_3) f(_4) f(_5) f(_6) f(_7) f(_8) f(_9) f(_10) f(_11) f(_12) f(_13) f(_14) f(_15) f(_16) f(_17) f(_18) f(_19) f(_20) f(_21) f(_22) f(_23) f(_24) f(_25) f(_26) f(_27) f(_28) f(_29) f(_30) f(_31) f(_32) f(_33) f(_34) f(_35) f(_36) f(_37) f(_38) f(_39) f(_40) f(_41) f(_42) f(_43) f(_44) f(_45) f(_46) f(_47) f(_48) f(_49) f(_50) f(_51) f(_52) f(_53) f(_54) f(_55) f(_56) f(_57) f(_58) f(_59) f(_60) +#define VISIT_STRUCT_APPLYF61(f,_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,_20,_21,_22,_23,_24,_25,_26,_27,_28,_29,_30,_31,_32,_33,_34,_35,_36,_37,_38,_39,_40,_41,_42,_43,_44,_45,_46,_47,_48,_49,_50,_51,_52,_53,_54,_55,_56,_57,_58,_59,_60,_61) f(_1) f(_2) f(_3) f(_4) f(_5) f(_6) f(_7) f(_8) f(_9) f(_10) f(_11) f(_12) f(_13) f(_14) f(_15) f(_16) f(_17) f(_18) f(_19) f(_20) f(_21) f(_22) f(_23) f(_24) f(_25) f(_26) f(_27) f(_28) f(_29) f(_30) f(_31) f(_32) f(_33) f(_34) f(_35) f(_36) f(_37) f(_38) f(_39) f(_40) f(_41) f(_42) f(_43) f(_44) f(_45) f(_46) f(_47) f(_48) f(_49) f(_50) f(_51) f(_52) f(_53) f(_54) f(_55) f(_56) f(_57) f(_58) f(_59) f(_60) f(_61) +#define VISIT_STRUCT_APPLYF62(f,_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,_20,_21,_22,_23,_24,_25,_26,_27,_28,_29,_30,_31,_32,_33,_34,_35,_36,_37,_38,_39,_40,_41,_42,_43,_44,_45,_46,_47,_48,_49,_50,_51,_52,_53,_54,_55,_56,_57,_58,_59,_60,_61,_62) f(_1) f(_2) f(_3) f(_4) f(_5) f(_6) f(_7) f(_8) f(_9) f(_10) f(_11) f(_12) f(_13) f(_14) f(_15) f(_16) f(_17) f(_18) f(_19) f(_20) f(_21) f(_22) f(_23) f(_24) f(_25) f(_26) f(_27) f(_28) f(_29) f(_30) f(_31) f(_32) f(_33) f(_34) f(_35) f(_36) f(_37) f(_38) f(_39) f(_40) f(_41) f(_42) f(_43) f(_44) f(_45) f(_46) f(_47) f(_48) f(_49) f(_50) f(_51) f(_52) f(_53) f(_54) f(_55) f(_56) f(_57) f(_58) f(_59) f(_60) f(_61) f(_62) +#define VISIT_STRUCT_APPLYF63(f,_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,_20,_21,_22,_23,_24,_25,_26,_27,_28,_29,_30,_31,_32,_33,_34,_35,_36,_37,_38,_39,_40,_41,_42,_43,_44,_45,_46,_47,_48,_49,_50,_51,_52,_53,_54,_55,_56,_57,_58,_59,_60,_61,_62,_63) f(_1) f(_2) f(_3) f(_4) f(_5) f(_6) f(_7) f(_8) f(_9) f(_10) f(_11) f(_12) f(_13) f(_14) f(_15) f(_16) f(_17) f(_18) f(_19) f(_20) f(_21) f(_22) f(_23) f(_24) f(_25) f(_26) f(_27) f(_28) f(_29) f(_30) f(_31) f(_32) f(_33) f(_34) f(_35) f(_36) f(_37) f(_38) f(_39) f(_40) f(_41) f(_42) f(_43) f(_44) f(_45) f(_46) f(_47) f(_48) f(_49) f(_50) f(_51) f(_52) f(_53) f(_54) f(_55) f(_56) f(_57) f(_58) f(_59) f(_60) f(_61) f(_62) f(_63) +#define VISIT_STRUCT_APPLYF64(f,_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,_20,_21,_22,_23,_24,_25,_26,_27,_28,_29,_30,_31,_32,_33,_34,_35,_36,_37,_38,_39,_40,_41,_42,_43,_44,_45,_46,_47,_48,_49,_50,_51,_52,_53,_54,_55,_56,_57,_58,_59,_60,_61,_62,_63,_64) f(_1) f(_2) f(_3) f(_4) f(_5) f(_6) f(_7) f(_8) f(_9) f(_10) f(_11) f(_12) f(_13) f(_14) f(_15) f(_16) f(_17) f(_18) f(_19) f(_20) f(_21) f(_22) f(_23) f(_24) f(_25) f(_26) f(_27) f(_28) f(_29) f(_30) f(_31) f(_32) f(_33) f(_34) f(_35) f(_36) f(_37) f(_38) f(_39) f(_40) f(_41) f(_42) f(_43) f(_44) f(_45) f(_46) f(_47) f(_48) f(_49) f(_50) f(_51) f(_52) f(_53) f(_54) f(_55) f(_56) f(_57) f(_58) f(_59) f(_60) f(_61) f(_62) f(_63) f(_64) +#define VISIT_STRUCT_APPLYF65(f,_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,_20,_21,_22,_23,_24,_25,_26,_27,_28,_29,_30,_31,_32,_33,_34,_35,_36,_37,_38,_39,_40,_41,_42,_43,_44,_45,_46,_47,_48,_49,_50,_51,_52,_53,_54,_55,_56,_57,_58,_59,_60,_61,_62,_63,_64,_65) f(_1) f(_2) f(_3) f(_4) f(_5) f(_6) f(_7) f(_8) f(_9) f(_10) f(_11) f(_12) f(_13) f(_14) f(_15) f(_16) f(_17) f(_18) f(_19) f(_20) f(_21) f(_22) f(_23) f(_24) f(_25) f(_26) f(_27) f(_28) f(_29) f(_30) f(_31) f(_32) f(_33) f(_34) f(_35) f(_36) f(_37) f(_38) f(_39) f(_40) f(_41) f(_42) f(_43) f(_44) f(_45) f(_46) f(_47) f(_48) f(_49) f(_50) f(_51) f(_52) f(_53) f(_54) f(_55) f(_56) f(_57) f(_58) f(_59) f(_60) f(_61) f(_62) f(_63) f(_64) f(_65) +#define VISIT_STRUCT_APPLYF66(f,_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,_20,_21,_22,_23,_24,_25,_26,_27,_28,_29,_30,_31,_32,_33,_34,_35,_36,_37,_38,_39,_40,_41,_42,_43,_44,_45,_46,_47,_48,_49,_50,_51,_52,_53,_54,_55,_56,_57,_58,_59,_60,_61,_62,_63,_64,_65,_66) f(_1) f(_2) f(_3) f(_4) f(_5) f(_6) f(_7) f(_8) f(_9) f(_10) f(_11) f(_12) f(_13) f(_14) f(_15) f(_16) f(_17) f(_18) f(_19) f(_20) f(_21) f(_22) f(_23) f(_24) f(_25) f(_26) f(_27) f(_28) f(_29) f(_30) f(_31) f(_32) f(_33) f(_34) f(_35) f(_36) f(_37) f(_38) f(_39) f(_40) f(_41) f(_42) f(_43) f(_44) f(_45) f(_46) f(_47) f(_48) f(_49) f(_50) f(_51) f(_52) f(_53) f(_54) f(_55) f(_56) f(_57) f(_58) f(_59) f(_60) f(_61) f(_62) f(_63) f(_64) f(_65) f(_66) +#define VISIT_STRUCT_APPLYF67(f,_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,_20,_21,_22,_23,_24,_25,_26,_27,_28,_29,_30,_31,_32,_33,_34,_35,_36,_37,_38,_39,_40,_41,_42,_43,_44,_45,_46,_47,_48,_49,_50,_51,_52,_53,_54,_55,_56,_57,_58,_59,_60,_61,_62,_63,_64,_65,_66,_67) f(_1) f(_2) f(_3) f(_4) f(_5) f(_6) f(_7) f(_8) f(_9) f(_10) f(_11) f(_12) f(_13) f(_14) f(_15) f(_16) f(_17) f(_18) f(_19) f(_20) f(_21) f(_22) f(_23) f(_24) f(_25) f(_26) f(_27) f(_28) f(_29) f(_30) f(_31) f(_32) f(_33) f(_34) f(_35) f(_36) f(_37) f(_38) f(_39) f(_40) f(_41) f(_42) f(_43) f(_44) f(_45) f(_46) f(_47) f(_48) f(_49) f(_50) f(_51) f(_52) f(_53) f(_54) f(_55) f(_56) f(_57) f(_58) f(_59) f(_60) f(_61) f(_62) f(_63) f(_64) f(_65) f(_66) f(_67) +#define VISIT_STRUCT_APPLYF68(f,_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,_20,_21,_22,_23,_24,_25,_26,_27,_28,_29,_30,_31,_32,_33,_34,_35,_36,_37,_38,_39,_40,_41,_42,_43,_44,_45,_46,_47,_48,_49,_50,_51,_52,_53,_54,_55,_56,_57,_58,_59,_60,_61,_62,_63,_64,_65,_66,_67,_68) f(_1) f(_2) f(_3) f(_4) f(_5) f(_6) f(_7) f(_8) f(_9) f(_10) f(_11) f(_12) f(_13) f(_14) f(_15) f(_16) f(_17) f(_18) f(_19) f(_20) f(_21) f(_22) f(_23) f(_24) f(_25) f(_26) f(_27) f(_28) f(_29) f(_30) f(_31) f(_32) f(_33) f(_34) f(_35) f(_36) f(_37) f(_38) f(_39) f(_40) f(_41) f(_42) f(_43) f(_44) f(_45) f(_46) f(_47) f(_48) f(_49) f(_50) f(_51) f(_52) f(_53) f(_54) f(_55) f(_56) f(_57) f(_58) f(_59) f(_60) f(_61) f(_62) f(_63) f(_64) f(_65) f(_66) f(_67) f(_68) +#define VISIT_STRUCT_APPLYF69(f,_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,_20,_21,_22,_23,_24,_25,_26,_27,_28,_29,_30,_31,_32,_33,_34,_35,_36,_37,_38,_39,_40,_41,_42,_43,_44,_45,_46,_47,_48,_49,_50,_51,_52,_53,_54,_55,_56,_57,_58,_59,_60,_61,_62,_63,_64,_65,_66,_67,_68,_69) f(_1) f(_2) f(_3) f(_4) f(_5) f(_6) f(_7) f(_8) f(_9) f(_10) f(_11) f(_12) f(_13) f(_14) f(_15) f(_16) f(_17) f(_18) f(_19) f(_20) f(_21) f(_22) f(_23) f(_24) f(_25) f(_26) f(_27) f(_28) f(_29) f(_30) f(_31) f(_32) f(_33) f(_34) f(_35) f(_36) f(_37) f(_38) f(_39) f(_40) f(_41) f(_42) f(_43) f(_44) f(_45) f(_46) f(_47) f(_48) f(_49) f(_50) f(_51) f(_52) f(_53) f(_54) f(_55) f(_56) f(_57) f(_58) f(_59) f(_60) f(_61) f(_62) f(_63) f(_64) f(_65) f(_66) f(_67) f(_68) f(_69) + +#define VISIT_STRUCT_APPLY_F_(M, ...) VISIT_STRUCT_EXPAND(M(__VA_ARGS__)) +#define MACRO_MAP(f, ...) VISIT_STRUCT_EXPAND(VISIT_STRUCT_APPLY_F_(VISIT_STRUCT_CONCAT(VISIT_STRUCT_APPLYF, VISIT_STRUCT_PP_NARG(__VA_ARGS__)), f, __VA_ARGS__)) diff --git a/graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/message.h b/graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/message.h new file mode 100644 index 0000000000..6603f3fb3a --- /dev/null +++ b/graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/message.h @@ -0,0 +1,34 @@ +#pragma once + +#include +#include +#include +#include +#include "LibLsp/lsp/method_type.h" + +struct LspMessage +{ +public: + std::string jsonrpc = "2.0"; + virtual void ReflectWriter(Writer&) = 0; + + // Send the message to the language client by writing it to stdout. + void Write(std::ostream& out); + + + virtual MethodType GetMethodType() const = 0; + virtual void SetMethodType(MethodType) = 0; + + virtual ~LspMessage()=default; + enum Kind + { + REQUEST_MESSAGE, + RESPONCE_MESSAGE, + NOTIFICATION_MESSAGE + }; + + virtual Kind GetKid() = 0; + virtual std::string ToJson() ; + +}; + diff --git a/graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/serializer.h b/graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/serializer.h new file mode 100644 index 0000000000..71b6bede59 --- /dev/null +++ b/graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/serializer.h @@ -0,0 +1,378 @@ +#pragma once + +#include "macro_map.h" +#ifdef boost +#include "optional.hpp" +#else +#include +#endif + +#include +#include +#include +#include +#include +#include +#include +#include + + +struct AbsolutePath; + +enum class SerializeFormat { Json, MessagePack }; + +// A tag type that can be used to write `null` to json. +struct JsonNull +{ + void swap(JsonNull& arg) noexcept; +}; + + + +class Reader { +public: + virtual ~Reader() {} + virtual SerializeFormat Format() const = 0; + + virtual bool IsBool() = 0; + virtual bool IsNull() = 0; + virtual bool IsArray() = 0; + virtual bool IsInt() = 0; + virtual bool IsInt64() = 0; + virtual bool IsUint64() = 0; + virtual bool IsDouble() = 0; + virtual bool IsNumber() = 0; + virtual bool IsString() = 0; + + virtual void GetNull() = 0; + virtual bool GetBool() = 0; + virtual int GetInt() = 0; + virtual uint32_t GetUint32() = 0; + virtual int64_t GetInt64() = 0; + virtual uint64_t GetUint64() = 0; + virtual double GetDouble() = 0; + virtual std::string GetString() = 0; + + virtual bool HasMember(const char* x) = 0; + virtual std::unique_ptr operator[](const char* x) = 0; + virtual void IterMap( std::function fn) = 0; + virtual void IterArray(std::function fn) = 0; + virtual void DoMember(const char* name, std::function fn) = 0; + virtual std::string ToString() const = 0; +}; + + + +class Writer { +public: + virtual ~Writer() {} + virtual SerializeFormat Format() const = 0; + + virtual void Null() = 0; + virtual void Bool(bool x) = 0; + virtual void Int(int x) = 0; + virtual void Uint32(uint32_t x) = 0; + virtual void Int64(int64_t x) = 0; + virtual void Uint64(uint64_t x) = 0; + virtual void Double(double x) = 0; + virtual void String(const char* x) = 0; + virtual void String(const char* x, size_t len) = 0; + virtual void StartArray(size_t) = 0; + virtual void EndArray() = 0; + virtual void StartObject() = 0; + virtual void EndObject() = 0; + virtual void Key(const char* name) = 0; +}; + + + +struct optionals_mandatory_tag {}; + +#define REFLECT_MEMBER_START() ReflectMemberStart(visitor, value) +#define REFLECT_MEMBER_END() ReflectMemberEnd(visitor, value); +#define REFLECT_MEMBER_END1(value) ReflectMemberEnd(visitor, value); +#define REFLECT_MEMBER(name) ReflectMember(visitor, #name, value.name) +#define REFLECT_MEMBER_OPTIONALS(name) \ + ReflectMember(visitor, #name, value.name, optionals_mandatory_tag{}) +#define REFLECT_MEMBER2(name, value) ReflectMember(visitor, name, value) + +#define MAKE_REFLECT_TYPE_PROXY(type_name) \ + MAKE_REFLECT_TYPE_PROXY2(type_name, std::underlying_type::type) +#define MAKE_REFLECT_TYPE_PROXY2(type, as_type) \ + inline void Reflect(Reader& visitor, type& value) { \ + as_type value0; \ + ::Reflect(visitor, value0); \ + value = static_cast(value0); \ + } \ + inline void Reflect(Writer& visitor, type& value) { \ + auto value0 = static_cast(value); \ + ::Reflect(visitor, value0); \ + } + +#define _MAPPABLE_REFLECT_MEMBER(name) REFLECT_MEMBER(name); +#define _MAPPABLE_REFLECT_MEMBER_OPTIONALS(name) REFLECT_MEMBER_OPTIONALS(name); + +#define MAKE_REFLECT_EMPTY_STRUCT(type, ...) \ + template \ + void Reflect(TVisitor& visitor, type& value) { \ + REFLECT_MEMBER_START(); \ + REFLECT_MEMBER_END(); \ + } + +#define MAKE_REFLECT_STRUCT(type, ...) \ + template \ + void Reflect(TVisitor& visitor, type& value) { \ + REFLECT_MEMBER_START(); \ + MACRO_MAP(_MAPPABLE_REFLECT_MEMBER, __VA_ARGS__) \ + REFLECT_MEMBER_END(); \ + } + + +#define _MAPPABLE_SWAP_MEMBER(name) std::swap(name,arg.name); + +#define MAKE_SWAP_METHOD(type, ...) \ +void swap(type& arg) noexcept{ \ + MACRO_MAP(_MAPPABLE_SWAP_MEMBER, __VA_ARGS__) \ +} + +#define MAKE_REFLECT_STRUCT_OPTIONALS_MANDATORY(type, ...) \ + template \ + void Reflect(TVisitor& visitor, type& value) { \ + REFLECT_MEMBER_START(); \ + MACRO_MAP(_MAPPABLE_REFLECT_MEMBER_OPTIONALS, __VA_ARGS__) \ + REFLECT_MEMBER_END(); \ + } + +// clang-format off +// Config has many fields, we need to support at least its number of fields. +#define NUM_VA_ARGS_IMPL(_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,_20,_21,_22,_23,_24,_25,_26,_27,_28,_29,_30,N,...) N +#define NUM_VA_ARGS(...) NUM_VA_ARGS_IMPL(__VA_ARGS__,30,29,28,27,26,25,24,23,22,21,20,19,18,17,16,15,14,13,12,11,10,9,8,7,6,5,4,3,2,1) +// clang-format on + +#define _MAPPABLE_REFLECT_ARRAY(name) Reflect(visitor, value.name); + +// Reflects the struct so it is serialized as an array instead of an object. +// This currently only supports writers. +#define MAKE_REFLECT_STRUCT_WRITER_AS_ARRAY(type, ...) \ + inline void Reflect(Writer& visitor, type& value) { \ + visitor.StartArray(NUM_VA_ARGS(__VA_ARGS__)); \ + MACRO_MAP(_MAPPABLE_REFLECT_ARRAY, __VA_ARGS__) \ + visitor.EndArray(); \ + } + +//// Elementary types + +void Reflect(Reader& visitor, uint8_t& value); +void Reflect(Writer& visitor, uint8_t& value); + +void Reflect(Reader& visitor, short& value); +void Reflect(Writer& visitor, short& value); + +void Reflect(Reader& visitor, unsigned short& value); +void Reflect(Writer& visitor, unsigned short& value); + +void Reflect(Reader& visitor, int& value); +void Reflect(Writer& visitor, int& value); + +void Reflect(Reader& visitor, unsigned& value); +void Reflect(Writer& visitor, unsigned& value); + +void Reflect(Reader& visitor, long& value); +void Reflect(Writer& visitor, long& value); + +void Reflect(Reader& visitor, unsigned long& value); +void Reflect(Writer& visitor, unsigned long& value); + +void Reflect(Reader& visitor, long long& value); +void Reflect(Writer& visitor, long long& value); + +void Reflect(Reader& visitor, unsigned long long& value); +void Reflect(Writer& visitor, unsigned long long& value); + +void Reflect(Reader& visitor, double& value); +void Reflect(Writer& visitor, double& value); + +void Reflect(Reader& visitor, bool& value); +void Reflect(Writer& visitor, bool& value); + +void Reflect(Reader& visitor, std::string& value); +void Reflect(Writer& visitor, std::string& value); + +void Reflect(Reader& visitor, JsonNull& value); +void Reflect(Writer& visitor, JsonNull& value); + +void Reflect(Reader& visitor, SerializeFormat& value); +void Reflect(Writer& visitor, SerializeFormat& value); + +//// Type constructors + +template +void Reflect(Reader& visitor, boost::optional& value) { + if (visitor.IsNull()) { + visitor.GetNull(); + return; + } + T real_value; + Reflect(visitor, real_value); + value = std::move(real_value); +} +template +void Reflect(Writer& visitor, boost::optional& value) { + if (value) + Reflect(visitor, *value); + else + visitor.Null(); +} + + +template +void ReflectMember(Writer& visitor, const char* name, boost::optional& value) { + // For TypeScript optional property key?: value in the spec, + // We omit both key and value if value is std::nullopt (null) for JsonWriter + // to reduce output. But keep it for other serialization formats. + if (value || visitor.Format() != SerializeFormat::Json) { + visitor.Key(name); + Reflect(visitor, value); + } +} + + + +template +void ReflectMember(Writer& visitor, + const char* name, + T& value, + optionals_mandatory_tag) { + visitor.Key(name); + Reflect(visitor, value); +} +template +void ReflectMember(Reader& visitor, + const char* name, + T& value, + optionals_mandatory_tag) { + Reflect(visitor, value); +} + +template +void Reflect(Reader& visitor, std::map& value) +{ + visitor.IterMap([&](const char* name,Reader& entry) { + T entry_value; + Reflect(entry, entry_value); + value[name]=(std::move(entry_value)); + }); +} +template +void Reflect(Writer& visitor, std::map& value) +{ + REFLECT_MEMBER_START(); + for (auto& it : value) + { + visitor.Key(it.first.c_str()); + Reflect(visitor, it.second); + } + REFLECT_MEMBER_END(); +} + +// std::vector +template +void Reflect(Reader& visitor, std::vector& values) { + visitor.IterArray([&](Reader& entry) { + T entry_value; + Reflect(entry, entry_value); + values.push_back(std::move(entry_value)); + }); +} + + +template +void Reflect(Writer& visitor, std::vector& values) { + visitor.StartArray(values.size()); + for (auto& value : values) + Reflect(visitor, value); + visitor.EndArray(); +} + +// ReflectMember + +inline void DefaultReflectMemberStart(Writer& visitor) { + visitor.StartObject(); +} +inline void DefaultReflectMemberStart(Reader& visitor) {} + +template +bool ReflectMemberStart(Reader& visitor, T& value) { + return false; +} +template +bool ReflectMemberStart(Writer& visitor, T& value) { + visitor.StartObject(); + return true; +} + +template +void ReflectMemberEnd(Reader& visitor, T& value) {} +template +void ReflectMemberEnd(Writer& visitor, T& value) { + visitor.EndObject(); +} + +template +void ReflectMember(Reader& visitor, const char* name, T& value) { + visitor.DoMember(name, [&](Reader& child) { Reflect(child, value); }); +} +template +void ReflectMember(Writer& visitor, const char* name, T& value) { + visitor.Key(name); + Reflect(visitor, value); +} + +template +void Reflect(Writer& visitor, std::pair< boost::optional<_Ty1>, boost::optional<_Ty2> >& value) +{ + if (value.first) + { + Reflect(visitor, value.first); + } + else + { + Reflect(visitor, value.second); + } +} +template +void Reflect(Reader& visitor, std::pair< boost::optional, boost::optional<_Ty2> >& value) +{ + if(visitor.IsBool()) + { + Reflect(visitor, value.first); + return; + } + + Reflect(visitor, value.second); +} +template +void Reflect(Reader& visitor, std::pair< boost::optional, boost::optional<_Ty2> >& value) +{ + if (visitor.IsString()) + { + Reflect(visitor, value.first); + return; + } + + Reflect(visitor, value.second); +} + + +template +void Reflect(Reader& visitor, std::pair< boost::optional<_Ty1>, boost::optional<_Ty2> >& value) +{ + try + { + Reflect(visitor, value.second); + } + catch (...) + { + Reflect(visitor, value.first); + } +} diff --git a/graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/stream.h b/graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/stream.h new file mode 100644 index 0000000000..549c361950 --- /dev/null +++ b/graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/stream.h @@ -0,0 +1,196 @@ +#pragma once +#include +#include +namespace lsp +{ + class stream + { + public: + virtual ~stream() = default; + virtual bool fail() = 0; + virtual bool bad() = 0; + virtual bool eof() = 0; + virtual bool good() = 0; + virtual void clear() = 0; + virtual std::string what() = 0; + virtual bool need_to_clear_the_state() + { + return false; + } + + bool operator!() + { + return bad(); + } + }; + class istream : public stream + { + public: + virtual int get() = 0; + virtual ~istream() = default; + virtual istream& read(char* str, std::streamsize count) = 0; + }; + template + class base_istream : public istream + { + public: + explicit base_istream(T& _t) :_impl(_t) + { + + } + + int get() override + { + return _impl.get(); + } + bool fail() override + { + return _impl.fail(); + } + bool bad() override + { + return _impl.bad(); + } + bool eof() override + { + return _impl.eof(); + } + bool good() override + { + return _impl.good(); + } + istream& read(char* str, std::streamsize count) override + { + _impl.read(str, count); + return *this; + } + + void clear() override + { + _impl.clear(); + } + T& _impl; + }; + class ostream : public stream + { + public: + virtual ~ostream() = default; + + virtual ostream& write(const std::string&) = 0; + virtual ostream& write(std::streamsize) = 0; + virtual ostream& flush() = 0; + + }; + template + class base_ostream : public ostream + { + public: + explicit base_ostream(T& _t) :_impl(_t) + { + + } + + bool fail() override + { + return _impl.fail(); + } + bool good() override + { + return _impl.good(); + } + bool bad() override + { + return _impl.bad(); + } + bool eof() override + { + return _impl.eof(); + } + + ostream& write(const std::string& c) override + { + _impl << c; + return *this; + } + + ostream& write(std::streamsize _s) override + { + + _impl << std::to_string(_s); + return *this; + } + + ostream& flush() override + { + _impl.flush(); + return *this; + } + + void clear() override + { + _impl.clear(); + } + protected: + T& _impl; + }; + + template + class base_iostream : public istream, public ostream + { + public: + explicit base_iostream(T& _t) :_impl(_t) + { + + } + + int get() override + { + return _impl.get(); + } + bool fail() override + { + return _impl.fail(); + } + bool bad() override + { + return _impl.bad(); + } + bool eof() override + { + return _impl.eof(); + } + bool good() override + { + return _impl.good(); + } + istream& read(char* str, std::streamsize count) override + { + _impl.read(str, count); + return *this; + } + ostream& write(const std::string& c) override + { + _impl << c; + return *this; + } + + ostream& write(std::streamsize _s) override + { + _impl << std::to_string(_s); + return *this; + } + + ostream& flush() override + { + _impl.flush(); + return *this; + } + + void clear() override + { + _impl.clear(); + } + protected: + T& _impl; + }; +} diff --git a/graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/threaded_queue.h b/graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/threaded_queue.h new file mode 100644 index 0000000000..cca9f9a486 --- /dev/null +++ b/graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/threaded_queue.h @@ -0,0 +1,249 @@ +#pragma once + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + + +struct MultiQueueWaiter; + +struct BaseThreadQueue { + virtual ~BaseThreadQueue() = default; + + virtual bool IsEmpty() = 0; + + std::shared_ptr waiter; +}; + +// std::lock accepts two or more arguments. We define an overload for one +// argument. +namespace std { +template +void lock(Lockable& l) { + l.lock(); +} +} // namespace std + +template +struct MultiQueueLock { + MultiQueueLock(Queue... lockable) : tuple_{lockable...} { lock(); } + ~MultiQueueLock() { unlock(); } + void lock() { lock_impl(typename std::index_sequence_for{}); } + void unlock() { unlock_impl(typename std::index_sequence_for{}); } + + private: + template + void lock_impl(std::index_sequence) { + std::lock(std::get(tuple_)->mutex...); + } + + template + void unlock_impl(std::index_sequence) { + (void)std::initializer_list{ + (std::get(tuple_)->mutex.unlock(), 0)...}; + } + + std::tuple tuple_; +}; + +struct MultiQueueWaiter { + static bool HasState(std::initializer_list queues); + + bool ValidateWaiter(std::initializer_list queues); + + template + bool Wait(std::atomic& quit, BaseThreadQueue... queues) { + MultiQueueLock l(queues...); + while (!quit.load(std::memory_order_relaxed)) { + if (HasState({ queues... })) + return false; + cv.wait(l); + } + return true; + } + template + void WaitUntil(std::chrono::steady_clock::time_point t, + BaseThreadQueue... queues) { + MultiQueueLock l(queues...); + if (!HasState({ queues... })) + cv.wait_until(l, t); + } + template + void Wait(BaseThreadQueue... queues) { + assert(ValidateWaiter({queues...})); + + MultiQueueLock l(queues...); + while (!HasState({queues...})) + cv.wait(l); + } + + std::condition_variable_any cv; +}; + +// A threadsafe-queue. http://stackoverflow.com/a/16075550 +template +struct ThreadedQueue : public BaseThreadQueue { + public: + ThreadedQueue() : ThreadedQueue(std::make_shared()) {} + + explicit ThreadedQueue(std::shared_ptr waiter) + : total_count_(0) { + this->waiter = waiter; + } + + // Returns the number of elements in the queue. This is lock-free. + size_t Size() const { return total_count_; } + + // Add an element to the queue. + void Enqueue(T&& t, bool priority) { + { + std::lock_guard lock(mutex); + if (priority) + priority_.push_back(std::move(t)); + else + queue_.push_back(std::move(t)); + ++total_count_; + } + waiter->cv.notify_one(); + } + + // Add a set of elements to the queue. + void EnqueueAll(std::vector&& elements, bool priority) { + if (elements.empty()) + return; + + { + std::lock_guard lock(mutex); + total_count_ += elements.size(); + for (T& element : elements) { + if (priority) + priority_.push_back(std::move(element)); + else + queue_.push_back(std::move(element)); + } + elements.clear(); + } + + waiter->cv.notify_all(); + } + + // Returns true if the queue is empty. This is lock-free. + bool IsEmpty() { return total_count_ == 0; } + + // Get the first element from the queue. Blocks until one is available. + T Dequeue() { + std::unique_lock lock(mutex); + waiter->cv.wait(lock, + [&]() { return !priority_.empty() || !queue_.empty(); }); + + auto execute = [&](std::deque* q) { + auto val = std::move(q->front()); + q->pop_front(); + --total_count_; + return std::move(val); + }; + if (!priority_.empty()) + return execute(&priority_); + return execute(&queue_); + } + + // Get the first element from the queue without blocking. Returns a null + // value if the queue is empty. + boost::optional TryDequeue(bool priority) { + std::lock_guard lock(mutex); + + auto pop = [&](std::deque* q) { + auto val = std::move(q->front()); + q->pop_front(); + --total_count_; + return std::move(val); + }; + + auto get_result = [&](std::deque* first, + std::deque* second) -> boost::optional { + if (!first->empty()) + return pop(first); + if (!second->empty()) + return pop(second); + return {}; + }; + + if (priority) + return get_result(&priority_, &queue_); + return get_result(&queue_, &priority_); + } + // Return all elements in the queue. + std::vector DequeueAll() { + std::lock_guard lock(mutex); + + total_count_ = 0; + + std::vector result; + result.reserve(priority_.size() + queue_.size()); + while (!priority_.empty()) { + result.emplace_back(std::move(priority_.front())); + priority_.pop_front(); + } + while (!queue_.empty()) { + result.emplace_back(std::move(queue_.front())); + queue_.pop_front(); + } + + return result; + } + std::vector TryDequeueSome(size_t num) { + std::lock_guard lock(mutex); + + std::vector result; + num = std::min(num, priority_.size() + queue_.size()); + total_count_ -= num; + result.reserve(num); + while (num) + { + if(!priority_.empty()) { + result.emplace_back(std::move(priority_.front())); + priority_.pop_front(); + } + else + { + break; + } + num -= 1; + } + while (num) + { + if (!queue_.empty()) { + result.emplace_back(std::move(queue_.front())); + queue_.pop_front(); + } + else + { + break; + } + num -= 1; + } + return result; + } + template + void Iterate(Fn fn) { + std::lock_guard lock(mutex); + for (auto& entry : priority_) + fn(entry); + for (auto& entry : queue_) + fn(entry); + } + + mutable std::mutex mutex; + + private: + std::atomic total_count_; + std::deque priority_; + std::deque queue_; +}; diff --git a/graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/traits.h b/graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/traits.h new file mode 100644 index 0000000000..ce8905a840 --- /dev/null +++ b/graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/traits.h @@ -0,0 +1,158 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#pragma once + + +#include +#include + +namespace lsp { +namespace traits { + +// NthTypeOf returns the `N`th type in `Types` +template +using NthTypeOf = typename std::tuple_element>::type; + +// `IsTypeOrDerived::value` is true iff `T` is of type `BASE`, or +// derives from `BASE`. +template +using IsTypeOrDerived = std::integral_constant< + bool, + std::is_base_of::type>::value || + std::is_same::type>::value>; + +// `EachIsTypeOrDerived::value` is true iff all of the types in +// the std::tuple `TYPES` is of, or derives from the corresponding indexed type +// in the std::tuple `BASES`. +// `N` must be equal to the number of types in both the std::tuple `BASES` and +// `TYPES`. +template +struct EachIsTypeOrDerived { + using base = typename std::tuple_element::type; + using type = typename std::tuple_element::type; + using last_matches = IsTypeOrDerived; + using others_match = EachIsTypeOrDerived; + static constexpr bool value = last_matches::value && others_match::value; +}; + +// EachIsTypeOrDerived specialization for N = 1 +template +struct EachIsTypeOrDerived<1, BASES, TYPES> { + using base = typename std::tuple_element<0, BASES>::type; + using type = typename std::tuple_element<0, TYPES>::type; + static constexpr bool value = IsTypeOrDerived::value; +}; + +// EachIsTypeOrDerived specialization for N = 0 +template +struct EachIsTypeOrDerived<0, BASES, TYPES> { + static constexpr bool value = true; +}; + +// Signature describes the signature of a function. +template +struct Signature { + // The return type of the function signature + using ret = RETURN; + // The parameters of the function signature held in a std::tuple + using parameters = std::tuple; + // The type of the Nth parameter of function signature + template + using parameter = NthTypeOf; + // The total number of parameters + static constexpr std::size_t parameter_count = sizeof...(PARAMETERS); +}; + +// SignatureOf is a traits helper that infers the signature of the function, +// method, static method, lambda, or function-like object `F`. +template +struct SignatureOf { + // The signature of the function-like object `F` + using type = typename SignatureOf::type; +}; + +// SignatureOf specialization for a regular function or static method. +template +struct SignatureOf { + // The signature of the function-like object `F` + using type = Signature::type, + typename std::decay::type...>; +}; + +// SignatureOf specialization for a non-static method. +template +struct SignatureOf { + // The signature of the function-like object `F` + using type = Signature::type, + typename std::decay::type...>; +}; + +// SignatureOf specialization for a non-static, const method. +template +struct SignatureOf { + // The signature of the function-like object `F` + using type = Signature::type, + typename std::decay::type...>; +}; + +// SignatureOfT is an alias to `typename SignatureOf::type`. +template +using SignatureOfT = typename SignatureOf::type; + +// ParameterType is an alias to `typename SignatureOf::type::parameter`. +template +using ParameterType = typename SignatureOfT::template parameter; + +// `HasSignature::value` is true iff the function-like `F` has a matching +// signature to the function-like `S`. +template +using HasSignature = std::integral_constant< + bool, + std::is_same, SignatureOfT>::value>; + +// `Min::value` resolves to the smaller value of A and B. +template +using Min = std::integral_constant; + +// `CompatibleWith::value` is true iff the function-like `F` +// can be called with the argument types of the function-like `S`. Return type +// of the two functions are not considered. +template +using CompatibleWith = std::integral_constant< + bool, + (SignatureOfT::parameter_count == SignatureOfT::parameter_count) && + EachIsTypeOrDerived::parameter_count, + SignatureOfT::parameter_count>::value, + typename SignatureOfT::parameters, + typename SignatureOfT::parameters>::value>; + +// If `CONDITION` is true then EnableIf resolves to type T, otherwise an +// invalid type. +template +using EnableIf = typename std::enable_if::type; + +// If `BASE` is a base of `T` then EnableIfIsType resolves to type `TRUE`, +// otherwise an invalid type. +template +using EnableIfIsType = EnableIf::value, TRUE_>; + +// If the function-like `F` has a matching signature to the function-like `S` +// then EnableIfHasSignature resolves to type `TRUE`, otherwise an invalid type. +template +using EnableIfHasSignature = EnableIf::value, TRUE_>; + +} // namespace traits +} // namespace lsp + diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/AbsolutePath.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/AbsolutePath.h new file mode 100644 index 0000000000..ef1ee43860 --- /dev/null +++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/AbsolutePath.h @@ -0,0 +1,27 @@ +#pragma once + +#include +#include + +struct AbsolutePath { + static AbsolutePath BuildDoNotUse(const std::string& path); + + // Try not to use this. + AbsolutePath(); + + // Provide implicit conversions to std::string for the time being. + AbsolutePath(const std::string& path, bool validate = true); + operator std::string() const; + + bool operator==(const AbsolutePath& rhs) const; + bool operator!=(const AbsolutePath& rhs) const; + bool operator<(const AbsolutePath& rhs) const; + bool operator>(const AbsolutePath& rhs) const; + std::string path; + bool qualify = true; +}; + + +void Reflect(Reader& visitor, AbsolutePath& value); +void Reflect(Writer& visitor, AbsolutePath& value); + diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/ClientPreferences.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/ClientPreferences.h new file mode 100644 index 0000000000..7adf557f83 --- /dev/null +++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/ClientPreferences.h @@ -0,0 +1,306 @@ +#pragma once +#include +#include +#include +#include +#include + +class ClientPreferences +{ +public: + + std::shared_ptr workspace; + lsTextDocumentClientCapabilities textDocument ; + + ClientPreferences(const lsClientCapabilities& capabilities) + { + v3supported = capabilities.textDocument.has_value(); + if (v3supported) + textDocument = capabilities.textDocument.value(); + if(capabilities.workspace) + { + workspace = std::make_shared(capabilities.workspace.value()); + } + } + + bool v3supported=false; + + bool isSignatureHelpSupported() { + + return v3supported && (textDocument.signatureHelp); + } + bool isWorkspaceDidChangeConfigurationSupported() const + { + return workspace && isDynamicRegistrationSupported(workspace->didChangeConfiguration); + } + bool isWorkspaceFoldersSupported() { + return workspace != nullptr && isTrue(workspace->workspaceFolders); + } + + bool isCompletionDynamicRegistered() { + return v3supported && isDynamicRegistrationSupported(textDocument.completion); + } + + bool isCompletionSnippetsSupported() { + //@formatter:off + if(!v3supported || !textDocument.completion) + { + return false; + } + const auto& completion = textDocument.completion.value(); + if(completion.completionItem) + { + return isTrue(completion.completionItem.value().snippetSupport); + } + return false; + } + + bool isV3Supported() { + return v3supported; + } + + bool isFormattingDynamicRegistrationSupported() { + return v3supported && isDynamicRegistrationSupported(textDocument.formatting); + } + + bool isRangeFormattingDynamicRegistrationSupported() { + return v3supported && isDynamicRegistrationSupported(textDocument.rangeFormatting); + } + + bool isOnTypeFormattingDynamicRegistrationSupported() { + return v3supported && isDynamicRegistrationSupported(textDocument.onTypeFormatting); + } + + bool isCodeLensDynamicRegistrationSupported() { + return v3supported && isDynamicRegistrationSupported(textDocument.codeLens); + } + + bool isSignatureHelpDynamicRegistrationSupported() { + return v3supported && isDynamicRegistrationSupported(textDocument.signatureHelp); + } + template + static bool isDynamicRegistrationSupported(boost::optional& capability) + { + if(capability) + return (capability.value().dynamicRegistration.value()); + return false; + } + + bool isTrue(const boost::optional& value) + { + return value.get_value_or(false); + } + + bool isRenameDynamicRegistrationSupported() { + return v3supported && isDynamicRegistrationSupported(textDocument.rename); + } + + bool isExecuteCommandDynamicRegistrationSupported() { + return v3supported && workspace != nullptr && isDynamicRegistrationSupported(workspace->executeCommand); + } + + bool isWorkspaceSymbolDynamicRegistered() { + return v3supported && workspace != nullptr && isDynamicRegistrationSupported(workspace->symbol); + } + + bool isWorkspaceChangeWatchedFilesDynamicRegistered() { + return v3supported && workspace != nullptr && isDynamicRegistrationSupported(workspace->didChangeWatchedFiles); + } + + bool isDocumentSymbolDynamicRegistered() { + return v3supported && isDynamicRegistrationSupported(textDocument.documentSymbol); + } + + bool isCodeActionDynamicRegistered() { + return v3supported && isDynamicRegistrationSupported(textDocument.codeAction); + } + + bool isDefinitionDynamicRegistered() { + return v3supported && isDynamicRegistrationSupported(textDocument.definition); + } + + bool isTypeDefinitionDynamicRegistered() { + return v3supported && isDynamicRegistrationSupported(textDocument.typeDefinition); + } + + bool isHoverDynamicRegistered() { + return v3supported && isDynamicRegistrationSupported(textDocument.hover); + } + + bool isReferencesDynamicRegistered() { + return v3supported && isDynamicRegistrationSupported(textDocument.references); + } + + bool isDocumentHighlightDynamicRegistered() { + return v3supported && isDynamicRegistrationSupported(textDocument.documentHighlight); + } + + bool isFoldgingRangeDynamicRegistered() { + return v3supported && isDynamicRegistrationSupported(textDocument.foldingRange); + } + + bool isImplementationDynamicRegistered() { + return v3supported && isDynamicRegistrationSupported(textDocument.implementation); + } + + bool isSelectionRangeDynamicRegistered() { + return v3supported && isDynamicRegistrationSupported(textDocument.selectionRange); + } + + bool isWillSaveRegistered() { + return v3supported && isTrue(textDocument.synchronization.willSave); + } + + bool isWillSaveWaitUntilRegistered() { + return v3supported && isTrue(textDocument.synchronization.willSaveWaitUntil); + } + + bool isWorkspaceApplyEditSupported() { + return workspace != nullptr && isTrue(workspace->applyEdit); + } + + bool isSupportsCompletionDocumentationMarkdown() { + + if (!v3supported || !textDocument.completion) + { + return false; + } + const auto& completion = textDocument.completion.value(); + if (completion.completionItem) + { + auto& documentationFormat = completion.completionItem.value().documentationFormat; + if(documentationFormat) + { + auto& data = documentationFormat.value(); + for(auto& it : data) + { + if(it == "markdown") + { + return true; + } + } + } + } + return false; + + } + + + bool isWorkspaceEditResourceChangesSupported() { + if(!workspace) return false; + + if(workspace->workspaceEdit) + { + return isTrue(workspace->workspaceEdit.value().resourceChanges); + } + return false; + } + static bool contains(const std::vector& v, const std::string& target) + { + for(auto& it : v) + { + if(it == target) return true; + } + return false; + } + bool isResourceOperationSupported() const + { + if (!workspace) return false; + if (!workspace->workspaceEdit) + { + return false; + } + auto& it = (workspace->workspaceEdit.value()); + if(!it.resourceOperations) return false; + const auto& resourceOperations = it.resourceOperations.value(); + return contains(resourceOperations, "create") && contains(resourceOperations, "rename") && contains(resourceOperations, "delete"); + + } + + /** + * {@code true} if the client has explicitly set the + * {@code textDocument.documentSymbol.hierarchicalDocumentSymbolSupport} to + * {@code true} when initializing the LS. Otherwise, {@code false}. + */ + bool isHierarchicalDocumentSymbolSupported() { + if(!v3supported || !textDocument.documentSymbol) return false; + return isTrue(textDocument.documentSymbol.value().hierarchicalDocumentSymbolSupport); + + } + + bool isSemanticHighlightingSupported() { + //@formatter:off + if (!v3supported || !textDocument.semanticHighlightingCapabilities) return false; + return isTrue(textDocument.semanticHighlightingCapabilities.value().semanticHighlighting); + //@formatter:on + } + + /** + * {@code true} if the client has explicitly set the + * {@code textDocument.codeAction.codeActionLiteralSupport.codeActionKind.valueSet} + * value. Otherwise, {@code false}. + */ + bool isSupportedCodeActionKind(const std::string& kind) { + if (!v3supported || !textDocument.codeAction) return false; + //@formatter:off + const auto& codeAction = textDocument.codeAction.value(); + if(codeAction.codeActionLiteralSupport) + { + const auto& codeActionKind = codeAction.codeActionLiteralSupport.value().codeActionKind; + if(codeActionKind) + { + const auto& valueSet = codeActionKind.value().valueSet; + if(valueSet) + { + for(auto& k : valueSet.value()) + { + if(lsp::StartsWith(kind,k)) + { + return true; + } + } + } + } + } + return false; + + //@formatter:on + } + + /** + * {@code true} if the client has explicitly set the + * {@code textDocument.publishDiagnostics.tagSupport} to + * {@code true} when initializing the LS. Otherwise, {@code false}. + */ + bool isDiagnosticTagSupported() { + if (!v3supported || !textDocument.publishDiagnostics) return false; + const auto& publishDiagnostics = textDocument.publishDiagnostics.value(); + if(publishDiagnostics.tagSupport) + { + isTagSupported(publishDiagnostics.tagSupport); + } + return false; + } + + bool isTagSupported(const boost::optional < std::pair, + boost::optional > >& tagSupport) { + if(tagSupport) + { + auto &v = tagSupport.value(); + if (v.first) + { + return v.first.value(); + } + if (v.second) { + return !v.second.value().valueSet.empty(); + } + } + return false; + } + + bool isCallHierarchyDynamicRegistered() { + return v3supported && isDynamicRegistrationSupported(textDocument.callHierarchy); + } + +}; + diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/CodeActionParams.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/CodeActionParams.h new file mode 100644 index 0000000000..a1e3f1dcc1 --- /dev/null +++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/CodeActionParams.h @@ -0,0 +1,114 @@ +#pragma once +#include "LibLsp/lsp/method_type.h" +#include "LibLsp/JsonRpc/message.h" +#include "LibLsp/lsp/lsp_diagnostic.h" +#include "LibLsp/lsp/workspace/execute_command.h" +#include "LibLsp/lsp/lsTextDocumentIdentifier.h" +#include "LibLsp/lsp/lsCodeAction.h" +namespace JDT +{ + namespace CodeActionKind { + + + /** + * Base kind for quickfix actions: 'quickfix' + */ + extern const char* QuickFix; + + /** + * Base kind for refactoring actions: 'refactor' + */ + extern const char* Refactor; + + /** + * Base kind for refactoring extraction actions: 'refactor.extract' + * + * Example extract actions: + * + * - Extract method - Extract function - Extract variable - Extract interface + * from class - ... + */ + extern const char* RefactorExtract; + + /** + * Base kind for refactoring inline actions: 'refactor.inline' + * + * Example inline actions: + * + * - Inline function - Inline variable - Inline constant - ... + */ + extern const char* RefactorInline; + + /** + * Base kind for refactoring rewrite actions: 'refactor.rewrite' + * + * Example rewrite actions: + * + * - Convert JavaScript function to class - Add or remove parameter - + * Encapsulate field - Make method static - Move method to base class - ... + */ + extern const char* RefactorRewrite; + + /** + * Base kind for source actions: `source` + * + * Source code actions apply to the entire file. + */ + extern const char* Source ; + + /** + * Base kind for an organize imports source action: `source.organizeImports` + */ + extern const char* SourceOrganizeImports; + + extern const char* COMMAND_ID_APPLY_EDIT; + }; + + +} +struct lsCodeActionContext { + // An array of diagnostics. + std::vector diagnostics; + /** + * Requested kind of actions to return. + * + * Actions not of this kind are filtered out by the client before being shown. So servers + * can omit computing them. + * + * See {@link CodeActionKind} for allowed values. + */ + boost::optional> only; + + MAKE_SWAP_METHOD(lsCodeActionContext, + diagnostics, only); +}; +MAKE_REFLECT_STRUCT(lsCodeActionContext, + diagnostics, only); + + +// Params for the CodeActionRequest +struct lsCodeActionParams { + // The document in which the command was invoked. + lsTextDocumentIdentifier textDocument; + // The range for which the command was invoked. + lsRange range; + // Context carrying additional information. + lsCodeActionContext context; + + MAKE_SWAP_METHOD(lsCodeActionParams, + textDocument, + range, + context); +}; +MAKE_REFLECT_STRUCT(lsCodeActionParams, + textDocument, + range, + context); + + + + + + + + diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/Directory.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/Directory.h new file mode 100644 index 0000000000..93f2c0807d --- /dev/null +++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/Directory.h @@ -0,0 +1,13 @@ +#pragma once +#include + +struct AbsolutePath; + +struct Directory { + explicit Directory(const AbsolutePath& path); + + bool operator==(const Directory& rhs) const; + bool operator!=(const Directory& rhs) const; + + std::string path; +}; diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/ExecuteCommandParams.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/ExecuteCommandParams.h new file mode 100644 index 0000000000..c06eed4b1c --- /dev/null +++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/ExecuteCommandParams.h @@ -0,0 +1,20 @@ +#pragma once + +#include "lsAny.h" +struct ExecuteCommandParams { + /** + * The identifier of the actual command handler. + */ + + std::string command; + + /** + * Arguments that the command should be invoked with. + * The arguments are typically specified when a command is returned from the server to the client. + * Example requests that return a command are textDocument/codeAction or textDocument/codeLens. + */ + boost::optional> arguments; + + MAKE_SWAP_METHOD(ExecuteCommandParams, command, arguments); +}; +MAKE_REFLECT_STRUCT(ExecuteCommandParams,command,arguments) diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/IProgressMonitor.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/IProgressMonitor.h new file mode 100644 index 0000000000..bf1337e44f --- /dev/null +++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/IProgressMonitor.h @@ -0,0 +1,145 @@ +#pragma once + + +#include +namespace lsp { +/** + * The IProgressMonitor interface is implemented + * by objects that monitor the progress of an activity; the methods + * in this interface are invoked by code that performs the activity. + *

+ * All activity is broken down into a linear sequence of tasks against + * which progress is reported. When a task begins, a beginTask(const wstring&, int) + * notification is reported, followed by any number and mixture of + * progress reports (worked()) and subtask notifications + * (subTask(const wstring&)). When the task is eventually completed, a + * done() notification is reported. After the done() + * notification, the progress monitor cannot be reused; i.e., + * beginTask(const wstring&, int) cannot be called again after the call to + * done(). + *

+ *

+ * A request to cancel an operation can be signaled using the + * setCanceled method. Operations taking a progress + * monitor are expected to poll the monitor (using isCanceled) + * periodically and abort at their earliest convenience. Operation can however + * choose to ignore cancelation requests. + *

+ *

+ * Since notification is synchronous with the activity itself, the listener should + * provide a fast and robust implementation. If the handling of notifications would + * involve blocking operations, or operations which might throw uncaught exceptions, + * the notifications should be queued, and the actual processing deferred (or perhaps + * delegated to a separate thread). + *

+ *

+ * Clients may implement this interface. + *

+ */ + class IProgressMonitor { + public: + virtual ~IProgressMonitor() + { + } + + /** Constant indicating an unknown amount of work. + */ + + const static int UNKNOWN = -1; + + /** + * Notifies that the main task is beginning. This must only be called once + * on a given progress monitor instance. + * + * @param name the name (or description) of the main task + * @param totalWork the total number of work units into which + * the main task is been subdivided. If the value is UNKNOWN + * the implemenation is free to indicate progress in a way which + * doesn't require the total number of work units in advance. + */ + virtual void beginTask(void* , int totalWork) + { + + }; + /** + * Notifies that the work is done; that is, either the main task is completed + * or the user canceled it. This method may be called more than once + * (implementations should be prepared to handle this case). + */ + + virtual void endTask(void*, int totalWork) + { + + } + + virtual void done(void*) = 0; + + /** + * Internal method to handle scaling correctly. This method + * must not be called by a client. Clients should + * always use the method worked(int). + */ + virtual void internalWorked(double work) + { + + } + /** + * Returns whether cancelation of current operation has been requested. + * Long-running operations should poll to see if cancelation + * has been requested. + * + * @return true if cancellation has been requested, + * and false otherwise + * @see #setCanceled + */ + virtual bool isCanceled() = 0; + /** + * Sets the cancel state to the given value. + * + * @param value true indicates that cancelation has + * been requested (but not necessarily acknowledged); + * false clears this flag + * + * @see #isCanceled + */ + virtual void setCanceled(bool value) = 0; + /** + * Sets the task name to the given value. This method is used to + * restore the task label after a nested operation was executed. + * Normally there is no need for clients to call this method. + * + * @param name the name (or description) of the main task + * @see #beginTask(java.lang.const wstring&, int) + */ + virtual void setTaskName(void*) + { + + }; + /** + * Notifies that a subtask of the main task is beginning. + * Subtasks are optional; the main task might not have subtasks. + * + * @param name the name (or description) of the subtask + */ + virtual void subTask(void* ) + { + + } + /** + * Notifies that a given number of work unit of the main task + * has been completed. Note that this amount represents an + * installment, as opposed to a cumulative amount of work done + * to date. + * + * @param work the number of work units just completed + */ + virtual void worked(int work) + { + + }; + + virtual void catch_exception(void*) = 0; + }; +} + + diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/Markup/Markup.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/Markup/Markup.h new file mode 100644 index 0000000000..92d773db0c --- /dev/null +++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/Markup/Markup.h @@ -0,0 +1,119 @@ +#pragma once +#include +#include +#include +#include +#include +#include +#include + +#include "string_ref.h" + +namespace lsp +{ + +/// Holds text and knows how to lay it out. Multiple blocks can be grouped to +/// form a document. Blocks include their own trailing newlines, std::string_ref +/// should trim them if need be. +class Block { +public: + virtual void renderMarkdown(std::ostringstream &OS) const = 0; + virtual void renderPlainText(std::ostringstream &OS) const = 0; + virtual std::unique_ptr clone() const = 0; + std::string_ref asMarkdown() const; + std::string_ref asPlainText() const; + + virtual bool isRuler() const { return false; } + virtual ~Block() = default; +}; + +/// Represents parts of the markup that can contain strings, like inline code, +/// code block or plain text. +/// One must introduce different paragraphs to create separate blocks. +class Paragraph : public Block { +public: + void renderMarkdown(std::ostringstream &OS) const override; + void renderPlainText(std::ostringstream &OS) const override; + std::unique_ptr clone() const override; + + /// Append plain text to the end of the string. + Paragraph &appendText(const std::string_ref& Text); + + /// Append inline code, this translates to the ` block in markdown. + /// \p Preserve indicates the code span must be apparent even in plaintext. + Paragraph &appendCode(const std::string_ref& Code, bool Preserve = false); + + /// Ensure there is space between the surrounding chunks. + /// Has no effect at the beginning or end of a paragraph. + Paragraph &appendSpace(); + +private: + struct Chunk { + enum { + PlainText, + InlineCode, + } Kind = PlainText; + // Preserve chunk markers in plaintext. + bool Preserve = false; + std::string_ref Contents; + // Whether this chunk should be surrounded by whitespace. + // Consecutive SpaceAfter and SpaceBefore will be collapsed into one space. + // Code spans don't usually set this: their spaces belong "inside" the span. + bool SpaceBefore = false; + bool SpaceAfter = false; + }; + std::vector Chunks; +}; + +/// Represents a sequence of one or more documents. Knows how to print them in a +/// list like format, e.g. by prepending with "- " and indentation. +class BulletList : public Block { +public: + void renderMarkdown(std::ostringstream &OS) const override; + void renderPlainText(std::ostringstream &OS) const override; + std::unique_ptr clone() const override; + + class Document &addItem(); + +private: + std::vector Items; +}; + +/// A format-agnostic representation for structured text. Allows rendering into +/// markdown and plaintext. +class Document { +public: + Document() = default; + Document(const Document &Other) { *this = Other; } + Document &operator=(const Document &); + Document(Document &&) = default; + Document &operator=(Document &&) = default; + + void append(Document Other); + + /// Adds a semantical block that will be separate from others. + Paragraph &addParagraph(); + /// Inserts a horizontal separator to the document. + void addRuler(); + /// Adds a block of code. This translates to a ``` block in markdown. In plain + /// text representation, the code block will be surrounded by newlines. + void addCodeBlock( std::string_ref Code, std::string_ref Language = "cpp"); + /// Heading is a special type of paragraph that will be prepended with \p + /// Level many '#'s in markdown. + Paragraph &addHeading(size_t Level); + + BulletList &addBulletList(); + + /// Doesn't contain any trailing newlines. + /// We try to make the markdown human-readable, e.g. avoid extra escaping. + /// At least one client (coc.nvim) displays the markdown verbatim! + std::string_ref asMarkdown() const; + /// Doesn't contain any trailing newlines. + std::string_ref asPlainText() const; + +private: + std::vector> Children; +}; + + +} diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/Markup/string_ref.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/Markup/string_ref.h new file mode 100644 index 0000000000..220817a1a2 --- /dev/null +++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/Markup/string_ref.h @@ -0,0 +1,1061 @@ + +#pragma once +#include +#include +#include +#include +#include + +#ifndef _WIN32 +#include +#endif +namespace std +{ + + /** + * An extension of STL's string providing additional functionality that is often availiable in + * higher-level languages such as Python. + */ + class string_ref : public string + { + public: + + //static unsigned GetAutoSenseRadix(string_ref& Str) { + // if (Str.empty()) + // return 10; + + // if (Str.start_with("0x") || Str.start_with("0X")) { + // Str = Str.substr(2); + // return 16; + // } + + // if (Str.start_with("0b") || Str.start_with("0B")) { + // Str = Str.substr(2); + // return 2; + // } + + // if (Str.start_with("0o")) { + // Str = Str.substr(2); + // return 8; + // } + + // if (Str[0] == '0' && Str.size() > 1 && std::isdigit(Str[1])) { + // Str = Str.substr(1); + // return 8; + // } + + // return 10; + //} + + //static bool consumeUnsignedInteger(string_ref& Str, unsigned Radix, + // unsigned long long& Result) { + // // Autosense radix if not specified. + // if (Radix == 0) + // Radix = GetAutoSenseRadix(Str); + + // // Empty strings (after the radix autosense) are invalid. + // if (Str.empty()) return true; + + // // Parse all the bytes of the string given this radix. Watch for overflow. + // string_ref Str2 = Str; + // Result = 0; + // while (!Str2.empty()) { + // unsigned CharVal; + // if (Str2[0] >= '0' && Str2[0] <= '9') + // CharVal = Str2[0] - '0'; + // else if (Str2[0] >= 'a' && Str2[0] <= 'z') + // CharVal = Str2[0] - 'a' + 10; + // else if (Str2[0] >= 'A' && Str2[0] <= 'Z') + // CharVal = Str2[0] - 'A' + 10; + // else + // break; + + // // If the parsed value is larger than the integer radix, we cannot + // // consume any more characters. + // if (CharVal >= Radix) + // break; + + // // Add in this character. + // unsigned long long PrevResult = Result; + // Result = Result * Radix + CharVal; + + // // Check for overflow by shifting back and seeing if bits were lost. + // if (Result / Radix < PrevResult) + // return true; + + // Str2 = Str2.substr(1); + // } + + // // We consider the operation a failure if no characters were consumed + // // successfully. + // if (Str.size() == Str2.size()) + // return true; + + // Str = Str2; + // return false; + //} + + //static bool consumeSignedInteger(string_ref& Str, unsigned Radix, + // long long& Result) { + // unsigned long long ULLVal; + + // // Handle positive strings first. + // if (Str.empty() || Str.front() != '-') { + // if (consumeUnsignedInteger(Str, Radix, ULLVal) || + // // Check for value so large it overflows a signed value. + // (long long)ULLVal < 0) + // return true; + // Result = ULLVal; + // return false; + // } + + // // Get the positive part of the value. + // string_ref Str2 = Str.drop_front(1); + // if (consumeUnsignedInteger(Str2, Radix, ULLVal) || + // // Reject values so large they'd overflow as negative signed, but allow + // // "-0". This negates the unsigned so that the negative isn't undefined + // // on signed overflow. + // (long long)-ULLVal > 0) + // return true; + + // Str = Str2; + // Result = -ULLVal; + // return false; + //} + + ///// GetAsUnsignedInteger - Workhorse method that converts a integer character + ///// sequence of radix up to 36 to an unsigned long long value. + //static bool getAsUnsignedInteger(string_ref Str, unsigned Radix, + // unsigned long long& Result) { + // if (consumeUnsignedInteger(Str, Radix, Result)) + // return true; + + // // For getAsUnsignedInteger, we require the whole string to be consumed or + // // else we consider it a failure. + // return !Str.empty(); + //} + + //static bool getAsSignedInteger(string_ref Str, unsigned Radix, + // long long& Result) { + // if (consumeSignedInteger(Str, Radix, Result)) + // return true; + + // // For getAsSignedInteger, we require the whole string to be consumed or else + // // we consider it a failure. + // return !Str.empty(); + //} + + + ///// Parse the current string as an integer of the specified radix. If + ///// \p Radix is specified as zero, this does radix autosensing using + ///// extended C rules: 0 is octal, 0x is hex, 0b is binary. + ///// + ///// If the string is invalid or if only a subset of the string is valid, + ///// this returns true to signify the error. The string is considered + ///// erroneous if empty or if it overflows T. + //template + //std::enable_if_t::is_signed, bool> + // getAsInteger(unsigned Radix, T& Result) const { + // long long LLVal; + // if (getAsSignedInteger(*this, Radix, LLVal) || + // static_cast(LLVal) != LLVal) + // return true; + // Result = LLVal; + // return false; + //} + + //template + //std::enable_if_t::is_signed, bool> + // getAsInteger(unsigned Radix, T& Result) const { + // unsigned long long ULLVal; + // // The additional cast to unsigned long long is required to avoid the + // // Visual C++ warning C4805: '!=' : unsafe mix of type 'bool' and type + // // 'unsigned __int64' when instantiating getAsInteger with T = bool. + // if (getAsUnsignedInteger(*this, Radix, ULLVal) || + // static_cast(static_cast(ULLVal)) != ULLVal) + // return true; + // Result = ULLVal; + // return false; + //} + + + + /**` + * Default constructor + * + * Constructs an empty string_ref ("") + */ + string_ref() : string() { } + + /** + * Duplicate the STL string copy constructor + * + * @param[in] s The string to copy + * @param[in] pos The starting position in the string to copy from + * @param[in] n The number of characters to copy + */ + string_ref(const string &s, size_type pos = 0, size_type n = npos) : string(s, pos, npos) { } + + /** + * Construct an string_ref from a null-terminated character array + * + * @param[in] s The character array to copy into the new string + */ + string_ref(const value_type *s) : string(s) { } + + /** + * Construct an string_ref from a character array and a length + * + * @param[in] s The character array to copy into the new string + * @param[in] n The number of characters to copy + */ + string_ref(const value_type *s, size_type n) : string(s, n) { } + + /** + * Create an string_ref with @p n copies of @p c + * + * @param[in] n The number of copies + * @param[in] c The character to copy @p n times + */ + string_ref(size_type n, value_type c) : string(n, c) { } + + /** + * Create a string from a range + * + * @param[in] first The first element to copy in + * @param[in] last The last element to copy in + */ + template + string_ref(InputIterator first, InputIterator last) : string(first, last) { } + + /** + * The destructor + */ + ~string_ref() { } + + /** + * Split a string by whitespace + * + * @return A vector of strings, each of which is a substring of the string + */ + vector split(size_type limit = npos) const + { + vector v; + + const_iterator + i = begin(), + last = i; + for (; i != end(); i++) + { + if (*i == ' ' || *i == '\n' || *i == '\t' || *i == '\r') + { + if (i + 1 != end() && (i[1] == ' ' || i[1] == '\n' || i[1] == '\t' || i[1] == '\r')) + continue; + v.push_back(string_ref(last, i)); + last = i + 1; + if (v.size() >= limit - 1) + { + v.push_back(string_ref(last, end())); + return v; + } + } + } + + if (last != i) + v.push_back(string_ref(last, i)); + + return v; + } + + /** + * Split a string by a character + * + * Returns a vector of ext_strings, each of which is a substring of the string formed by splitting + * it on boundaries formed by the character @p separator. If @p limit is set, the returned vector + * will contain a maximum of @p limit elements with the last element containing the rest of + * the string. + * + * If @p separator is not found in the string, a single element will be returned in the vector + * containing the entire string. + * + * The separators are removed from the output + * + * @param[in] separator The character separator to split the string on + * @param[in] limit The maximum number of output elements + * @return A vector of strings, each of which is a substring of the string + * + * @section split_ex Example + * @code + * std::string_ref s("This|is|a|test."); + * std::vector v = s.split('|'); + * std::copy(v.begin(), v.end(), std::ostream_iterator(std::cout, "\n")); + * + * This + * is + * a + * test. + * @endcode + */ + vector split(value_type separator, size_type limit = npos) const + { + vector v; + + const_iterator + i = begin(), + last = i; + for (; i != end(); i++) + { + if (*i == separator) + { + v.push_back(string_ref(last, i)); + last = i + 1; + if (v.size() >= limit - 1) + { + v.push_back(string_ref(last, end())); + return v; + } + } + } + + if (last != i) + v.push_back(string_ref(last, i)); + + return v; + } + + /** + * Split a string by another string + * + * Returns a vector of ext_strings, each of which is a substring of the string formed by + * splitting it on boundaries formed by the string @p separator. If @p limit is set, the + * returned vector will contain a maximum of @p limit elements with the last element + * containing the rest of the string. + * + * If @p separator is not found in the string, a single element will be returned in the + * vector containing the entire string. + * + * The separators are removed from the output + * + * @param[in] separator The string separator to split the string on + * @param[in] limit The maximum number of output elements + * @return A vector of strings, each of which is a substring of the string + * + * @ref split_ex + */ + vector split(const string &separator, size_type limit = npos) const + { + vector v; + + const_iterator + i = begin(), + last = i; + for (; i != end(); i++) + { + if (string(i, i + separator.length()) == separator) + { + v.push_back(string_ref(last, i)); + last = i + separator.length(); + + if (v.size() >= limit - 1) + { + v.push_back(string_ref(last, end())); + return v; + } + } + } + + if (last != i) + v.push_back(string_ref(last, i)); + + return v; + } + + /** + * Convert a string into an integer + * + * Convert the initial portion of a string into a signed integer. Once a non-numeric + * character is reached, the remainder of @p string is ignored and the integer that was + * read returned. + * + * @param s The string to convert + * @return The integer converted from @p string + */ + static long int integer(const string &s) + { + long int retval = 0; + bool neg = false; + + for (const_iterator i = s.begin(); i != s.end(); i++) + { + if (i == s.begin()) + { + if (*i == '-') + { + neg = true; + continue; + } + else if (*i == '+') + continue; + } + if (*i >= '0' && *i <= '9') + { + retval *= 10; + retval += *i - '0'; + } + else + break; + } + + if (neg) + retval *= -1; + + return retval; + } + + /** + * Convert the string to an integer + * + * Convert the initial portion of the string into a signed integer. Once a non-numeric + * character is reached, the remainder of the string is ignored and the integer that had + * been read thus far is returned. + * + * @return The integer converted from the string + */ + long int integer() const + { + return integer(*this); + } + + /** + * Split a string into chunks of size @p chunklen. Returns a vector of strings. + * + * Splits a string into chunks of the given size. The final chunk may not fill its + * entire allocated number of characters. + * + * @param[in] chunklen The number of characters per chunk + * @return A vector of strings, each of length <= chunklen + * + * @section chunk_split-ex Example + * @code + * std::string_ref s("abcdefghijk"); + * std::vector v = s.chunk_split(3); + * std::copy(v.begin(), v.end(), ostream_iterator(cout, " ")); + * + * abc def ghi jk + * @endcode + */ + vector chunk_split(size_type chunklen) const + { + vector retval; + retval.reserve(size() / chunklen + 1); + + size_type count = 0; + const_iterator + i = begin(), + last = i; + for (; i != end(); i++, count++) + { + if (count == chunklen) + { + count = 0; + retval.push_back(string_ref(last, i)); + last = i; + } + } + + if (last != i) + retval.push_back(string_ref(last, i)); + + return retval; + } + + /** + * Join a sequence of strings by some glue to create a new string + * + * Glue is not added to the end of the string. + * + * @pre [first, last) is a valid range + * @pre InputIterator is a model of STL's Input Iterator + * @pre InputIterator must point to a string type (std::string, std::string_ref, char *) + * + * @param[in] glue The glue to join strings with + * @param[in] first The beginning of the range to join + * @param[in] last The end of the range to join + * @return A string constructed of each element of the range connected together with @p glue + * + * @section join_ex Example + * @code + * std::vector v; + * v.push_back("This"); + * v.push_back("is"); + * v.push_back("a"); + * v.push_back("test."); + * std::cout << std::string_ref::join("|", v.begin(), v.end()) << std::endl; + * + * This|is|a|test. + * @endcode + */ + template + static string_ref join(const string &glue, InputIterator first, InputIterator last) + { + string_ref retval; + + for (; first != last; ++first) + { + retval.append(*first); + retval.append(glue); + } + retval.erase(retval.length() - glue.length()); + + return retval; + } + + /** + * Join a sequence of strings by some glue to create a new string + * + * @copydoc join + * @ref join_ex + */ + template + static string_ref join(value_type glue, InputIterator first, InputIterator last) + { + string_ref retval; + + for (; first != last; ++first) + { + retval.append(*first); + retval.append(1, glue); + } + retval.erase(retval.length() - 1); + + return retval; + } + + /** + * Search for any instances of @p needle and replace them with @p s + * + * @param[in] needle The string to replace + * @param[in] s The replacement string + * @return *this + * @post All instances of @p needle in the string are replaced with @p s + * + * @section replace-ex Example + * @code + * std::string_ref s("This is a test."); + * s.replace("is", "ere"); + * std::cout << s << std::endl; + * + * There ere a test. + * @endcode + */ + string_ref &replace(const string &needle, const string &s) + { + size_type + lastpos = 0, + thispos; + + while ((thispos = find(needle, lastpos)) != npos) + { + string::replace(thispos, needle.length(), s); + lastpos = thispos + 1; + } + return *this; + } + string_ref &replace_first(const string &needle, const string &s) + { + size_type + lastpos = 0, + thispos; + + if ((thispos = find(needle, lastpos)) != npos) + { + string::replace(thispos, needle.length(), s); + lastpos = thispos + 1; + } + return *this; + } + /** + * Search of any instances of @p needle and replace them with @p c + * + * @param[in] needle The character to replace + * @param[in] c The replacement character + * @return *this + * @post All instances of @p needle in the string are replaced with @p c + * + * @ref replace-ex + */ + string_ref &replace(value_type needle, value_type c) + { + for (iterator i = begin(); i != end(); i++) + if (*i == needle) + *i = c; + + return *this; + } + + /** + * Repeat a string @p n times + * + * @param[in] n The number of times to repeat the string + * @return string_ref containing @p n copies of the string + * + * @section repeat-ex Example + * @code + * std::string_ref s("123"); + * s = s * 3; + * std::cout << s << std::endl; + * + * 123123123 + * @endcode + */ + string_ref operator*(size_type n) + { + string_ref retval; + for (size_type i = 0; i < n; i++) + retval.append(*this); + + return retval; + } + + /** + * Convert the string to lowercase + * + * @return *this + * @post The string is converted to lowercase + */ + string_ref &tolower() + { + for (iterator i = begin(); i != end(); i++) + if (*i >= 'A' && *i <= 'Z') + *i = (*i) + ('a' - 'A'); + return *this; + } + + /** + * Convert the string to uppercase + * + * @return *this + * @post The string is converted to uppercase + */ + string_ref &toupper() + { + for (iterator i = begin(); i != end(); i++) + if (*i >= 'a' && *i <= 'z') + *i = (*i) - ('a' - 'A'); + return *this; + } + + /** + * Count the occurances of @p str in the string. + * + * @return The count of substrings @p str in the string + */ + size_type count(const string &str) const + { + size_type + count = 0, + last = 0, + cur = 0; + + while ((cur = find(str, last + 1)) != npos) + { + count++; + last = cur; + } + + return count; + } + + /** + * Determine if the string is alphanumeric + * + * @return true if the string contains only characters between a-z, A-Z and 0-9 and + * contains at least one character, else false + */ + bool is_alnum() const + { + if (length() == 0) + return false; + + for (const_iterator i = begin(); i != end(); i++) + { + if (*i < 'A' || *i > 'Z') + if (*i < '0' || *i > '9') + if (*i < 'a' || *i > 'z') + return false; + } + + return true; + } + + /** + * Determine if the string is alphabetic only + * + * @return true of the string contains only characters between a-z and A-Z and contains at + * least one character, else false + */ + bool is_alpha() const + { + if (length() == 0) + return false; + + for (const_iterator i = begin(); i != end(); i++) + if (*i < 'A' || (*i > 'Z' && (*i < 'a' || *i > 'z'))) + return false; + + return true; + } + + /** + * Determine if the string is numeric only + * + * @return true if the string contains only characters between 0-9 and contains at least + * one character, else false + */ + bool is_numeric() const + { + if (length() == 0) + return false; + + for (const_iterator i = begin(); i != end(); i++) + if (*i < '0' || *i > '9') + return false; + + return true; + } + + /** + * Determine if a string is all lower case + * + * @return true if there is at least one character, and all characters are lowercase + * letters, else false + */ + bool is_lower() const + { + if (length() == 0) + return false; + + for (const_iterator i = begin(); i != end(); i++) + if (*i < 'a' || *i < 'z') + return false; + + return true; + } + + /** + * Determine if a string is all upper case + * + * @return true if there is at least one character, and all characters are uppercase + * letters, else false + */ + bool is_upper() const + { + if (length() == 0) + return false; + + for (const_iterator i = begin(); i != end(); i++) + if (*i < 'A' || *i > 'Z') + return false; + + return true; + } + + /** + * Swap the case of a string + * + * @post Converts all uppercase to lowercase, and all lowercase to uppercase in the string + * @return *this + */ + string_ref &swapcase() + { + for (iterator i = begin(); i != end(); i++) + if (*i >= 'A' && *i <= 'Z') + *i += ('a' - 'A'); + else if (*i >= 'a' && *i <= 'z') + *i -= ('a' - 'A'); + + return *this; + } + + /******************************************************************************* + Function: std::string_ref::start_with + Access: public + Qualifier: const + Parameter: const string & str + Returns: bool + + Purpose: is the string start with str + *******************************************************************************/ + bool start_with(const string& str) const + { + return ( this->find(str) == 0 ); + } + + /// Return a string_ref equal to 'this' but with only the last \p N + /// elements remaining. If \p N is greater than the length of the + /// string, the entire string is returned. + + string_ref take_back(size_t N = 1) const { + if (N >= size()) + return *this; + return drop_front(size() - N); + } + /// Return a string_ref equal to 'this' but with the first \p N elements + /// dropped. + + string_ref drop_front(size_t N = 1) const { + //assert(size() >= N && "Dropping more elements than exist"); + return substr(N); + } + + + + /// Return a string_ref equal to 'this' but with the last \p N elements + /// dropped. + + string_ref drop_back(size_t N = 1) const { + + return substr(0, size() - N); + } + + /// Return a string_ref equal to 'this', but with all characters satisfying + /// the given predicate dropped from the beginning of the string. + + string_ref drop_while(std::function F) const { + return substr(std::find_if_not(begin(),end(),F)-begin()); + } + + /// Return a string_ref equal to 'this', but with all characters not + /// satisfying the given predicate dropped from the beginning of the string. + + string_ref drop_until(std::function F) const { + return substr(std::find_if(begin(), end(), F) - begin()); + } + + /// Returns true if this string_ref has the given prefix and removes that + /// prefix. + bool consume_front(string_ref Prefix) { + if (!start_with(Prefix)) + return false; + + *this = drop_front(Prefix.size()); + return true; + } + + /// Returns true if this string_ref has the given suffix and removes that + /// suffix. + bool consume_back(string_ref Suffix) { + if (!end_with(Suffix)) + return false; + + *this = drop_back(Suffix.size()); + return true; + } + + /******************************************************************************* + Function: std::string_ref::end_with + Access: public + Qualifier: const + Parameter: const string & str + Returns: bool + + Purpose: is the string end with str + *******************************************************************************/ + bool end_with(const string& str) const + { + if (str.length() > this->length()) + { + return false; + } + size_type off = this->length() - str.length(); + return ( find(str, off) == off); + } + + /******************************************************************************* + Function: hl_lib::string_ref::format + Access: public + Qualifier: + Parameter: const char * format_string + Parameter: ... + Returns: string_ref& + + Purpose: format the string + *******************************************************************************/ + string_ref& format(const char* format_string, ...) + { + if (format_string == 0) + { + return *this; + } + + va_list argList; + va_start( argList, format_string ); + +#ifdef _WIN32 + int len = _vscprintf( format_string, argList ); + char* pbuf = new char[len + 1]; + if (pbuf != 0) + { + vsprintf_s( pbuf, len + 1, format_string, argList ); + *this = pbuf; + delete[] pbuf; + } +#else + const int INLINE_FORMAT_BUFFER_LEN =2048; + char* buf = new char[INLINE_FORMAT_BUFFER_LEN + 1]; + if (buf != 0) + { + int len =vsnprintf(buf,INLINE_FORMAT_BUFFER_LEN, format_string, argList); + assign(buf,buf+len); + delete[] buf; + } +#endif + va_end( argList ); + return *this; + } + + /******************************************************************************* + Function: hl_lib::string_ref::trim_left + Access: public + Qualifier: + Parameter: value_type ch + Returns: string_ref& + + Purpose: delete all char which is ch at the left of the string + *******************************************************************************/ + string_ref& trim_left(value_type ch = ' ') + { + size_type off = this->find_first_not_of(ch); + if (off != string::npos) + { + this->erase(0, off); + } + return *this; + } + + /******************************************************************************* + Function: hl_lib::string_ref::trim_right + Access: public + Qualifier: + Parameter: value_type ch + Returns: string_ref& + + Purpose: delete all char which is ch at the right of the string + *******************************************************************************/ + string_ref& trim_right(value_type ch = ' ') + { + size_type off = this->find_last_not_of(ch); + if (off == string::npos) + { + off = 0; + } + else + { + off++; + } + this->erase(off, length() - off); + return *this; + } + + /******************************************************************************* + Function: hl_lib::string_ref::trim + Access: public + Qualifier: + Parameter: value_type ch + Returns: string_ref& + + Purpose: delete all char which is ch at the left and right of the string + *******************************************************************************/ + string_ref& trim(value_type ch = ' ') + { + trim_left(ch); + trim_right(ch); + return *this; + } + + /******************************************************************************* + Function: hl_lib::string_ref::float_num + Access: public static + Qualifier: + Parameter: const string & str + Returns: double + + Purpose: parse str to a float number + *******************************************************************************/ + static double float_num(const string& str) + { + return atof(str.c_str()); + } + + /******************************************************************************* + Function: hl_lib::string_ref::float_num + Access: public static + Qualifier: + Returns: double + + Purpose: parse this to a float number + *******************************************************************************/ + double float_num() const + { + return float_num(*this); + } + + /******************************************************************************* + Function: hl_lib::string_ref::compare_nocase + Access: public + Qualifier: const + Parameter: const string & str + Returns: int + + Purpose: compare string no case + *******************************************************************************/ + int compare_nocase(const string& str) const + { +#ifdef _WIN32 + return _stricmp(this->c_str(), str.c_str()); +#else + return strcasecmp(this->c_str(), str.c_str()); +#endif + } + + /******************************************************************************* + Function: hl_lib::string_ref::compare_nocase + Access: public + Qualifier: const + Parameter: size_type index + Parameter: size_type length + Parameter: const string & str + Returns: int + + Purpose: compare substring no case + *******************************************************************************/ + int compare_nocase( size_type index, size_type length, const string &str ) const + { + string_ref temp = this->substr(index, length); + return temp.compare_nocase(str); + } + + /******************************************************************************* + Function: hl_lib::string_ref::compare_nocase + Access: public + Qualifier: const + Parameter: size_type index + Parameter: size_type length + Parameter: const string & str + Parameter: size_type index2 + Parameter: size_type length2 + Returns: int + + Purpose: compare two substring no case + *******************************************************************************/ + int compare_nocase( size_type index, size_type length, const string &str, size_type index2, size_type length2) const + { + string_ref temp1 = this->substr(index, length); + string_ref temp2 = str.substr(index2, length2); + return temp1.compare_nocase(temp2); + } + + }; + +} + diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/ParentProcessWatcher.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/ParentProcessWatcher.h new file mode 100644 index 0000000000..fa84e4109a --- /dev/null +++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/ParentProcessWatcher.h @@ -0,0 +1,17 @@ +#pragma once + +#include "LibLsp/JsonRpc/MessageIssue.h" +#include + +class ParentProcessWatcher +{ +public: + struct ParentProcessWatcherData; + + ParentProcessWatcher(lsp::Log& log, int pid, const std::function&& callback, uint32_t poll_delay_secs = 10); + + ~ParentProcessWatcher(); + + std::shared_ptr d_ptr; +}; + diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/ProcessIoService.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/ProcessIoService.h new file mode 100644 index 0000000000..1389a1d5b7 --- /dev/null +++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/ProcessIoService.h @@ -0,0 +1,48 @@ +#pragma once +#include +#include + +namespace lsp +{ + class ProcessIoService + { + public: + using IOService = boost::asio::io_service; + using Work = boost::asio::io_service::work; + using WorkPtr = std::unique_ptr; + + ProcessIoService() { + + work_ = std::unique_ptr(new Work(ioService_)); + auto temp_thread_ = new std::thread([this] + { + ioService_.run(); + }); + thread_ = std::unique_ptr(temp_thread_); + } + + ProcessIoService(const ProcessIoService&) = delete; + ProcessIoService& operator=(const ProcessIoService&) = delete; + + boost::asio::io_service& getIOService() + { + return ioService_; + } + + void stop() + { + + work_.reset(); + + thread_->join(); + + } + + private: + IOService ioService_; + WorkPtr work_; + std::unique_ptr thread_; + + }; + +} diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/ProtocolJsonHandler.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/ProtocolJsonHandler.h new file mode 100644 index 0000000000..b563f810d2 --- /dev/null +++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/ProtocolJsonHandler.h @@ -0,0 +1,11 @@ +#pragma once + +#include "LibLsp/JsonRpc/MessageJsonHandler.h" +namespace lsp { + class ProtocolJsonHandler : public MessageJsonHandler + { + public: + ProtocolJsonHandler(); + }; + +} diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/ResourceOperation.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/ResourceOperation.h new file mode 100644 index 0000000000..caf2ea5d5f --- /dev/null +++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/ResourceOperation.h @@ -0,0 +1,121 @@ +#pragma once + +#include "LibLsp/JsonRpc/serializer.h" +#include +#include "lsDocumentUri.h" +#include "LibLsp/lsp/lsAny.h" +#include "LibLsp/lsp/lsTextEdit.h" +struct ResourceOperation { + std::string kind; + virtual ~ResourceOperation() = default; + + MAKE_SWAP_METHOD(ResourceOperation, kind); +}; +MAKE_REFLECT_STRUCT(ResourceOperation, kind); +extern void Reflect(Writer& visitor, ResourceOperation* value); +struct CreateFileOptions{ + + /** + * Overwrite existing file. Overwrite wins over `ignoreIfExists` + */ + boost::optional overwrite = false; + + /** + * Ignore if exists. + */ + boost::optional< bool> ignoreIfExists =false; + + MAKE_SWAP_METHOD(CreateFileOptions, overwrite, ignoreIfExists) +}; +MAKE_REFLECT_STRUCT(CreateFileOptions, overwrite, ignoreIfExists) +struct lsCreateFile :public ResourceOperation { + + /** + * The resource to create. + */ + lsCreateFile(); + lsDocumentUri uri; + + /** + * Additional options + */ + boost::optional options; + + + /** + * An optional annotation identifer describing the operation. + * + * @since 3.16.0 + */ + boost::optional annotationId; + + MAKE_SWAP_METHOD(lsCreateFile, kind, uri, options, annotationId) +}; +MAKE_REFLECT_STRUCT(lsCreateFile, kind, uri,options, annotationId) + + +struct DeleteFileOptions { + /** + * Delete the content recursively if a folder is denoted. + */ + boost::optional recursive = false; + + /** + * Ignore the operation if the file doesn't exist. + */ + boost::optional ignoreIfNotExists = false; + + + MAKE_SWAP_METHOD(DeleteFileOptions, recursive, ignoreIfNotExists); +}; + +MAKE_REFLECT_STRUCT(DeleteFileOptions, recursive, ignoreIfNotExists) + +struct lsDeleteFile :public ResourceOperation { + /** + * The file to delete. + */ + lsDeleteFile(); + lsDocumentUri uri; + + /** + * Delete options. + */ + boost::optional options; + + MAKE_SWAP_METHOD(lsDeleteFile, kind, uri, options); +}; +MAKE_REFLECT_STRUCT(lsDeleteFile, kind, uri,options); + +typedef CreateFileOptions RenameFileOptions; +struct lsRenameFile :public ResourceOperation { + /** + * The old (existing) location. + */ + lsRenameFile(); + lsDocumentUri oldUri; + + /** + * The new location. + */ + + lsDocumentUri newUri; + + /** + * Rename options. + */ + boost::optional options; + + /** + * An optional annotation identifer describing the operation. + * + * @since 3.16.0 + */ + boost::optional annotationId; + + MAKE_SWAP_METHOD(lsRenameFile, kind, oldUri, newUri, options, annotationId) +}; +MAKE_REFLECT_STRUCT(lsRenameFile, kind, oldUri, newUri, options, annotationId); + + +extern ResourceOperation* GetResourceOperation(lsp::Any& lspAny); \ No newline at end of file diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/SimpleTimer.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/SimpleTimer.h new file mode 100644 index 0000000000..0a2707979d --- /dev/null +++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/SimpleTimer.h @@ -0,0 +1,49 @@ +#pragma once +#include +#include +#include +#include + +template +class SimpleTimer +{ +public: + SimpleTimer(unsigned int duration,const std::function& _call_back) + :is_running_(true), call_back(_call_back), _deadline_timer(_ios, Duration(duration)) + { + _deadline_timer.async_wait([&](const boost::system::error_code& e) + { + if (e.value() == boost::asio::error::operation_aborted) + { + return; + } + if(is_running_.load(std::memory_order_relaxed)) + { + call_back(); + } + + }); + _thread = std::thread([this] { _ios.run(); }); + } + ~SimpleTimer() + { + Stop(); + } + void Stop() + { + is_running_.store(false, std::memory_order_relaxed); + _ios.stop(); + if (_thread.joinable()) + { + _thread.join(); + } + } +private: + std::atomic_bool is_running_; + std::function call_back; + boost::asio::io_service _ios; + boost::asio::deadline_timer _deadline_timer; + std::thread _thread; + + +}; diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/client/registerCapability.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/client/registerCapability.h new file mode 100644 index 0000000000..fa5d111403 --- /dev/null +++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/client/registerCapability.h @@ -0,0 +1,49 @@ +#pragma once +#include "LibLsp/JsonRpc/message.h" +#include "LibLsp/lsp/lsDocumentUri.h" + +/** + * General parameters to register for a capability. + */ + +struct Registration { + static Registration Create(const std::string& method); + /** + * The id used to register the request. The id can be used to deregister + * the request again. + */ + std::string id; + + /** + * The method / capability to register for. + */ + + std::string method; + + MAKE_SWAP_METHOD(Registration, id, method); +}; + + +MAKE_REFLECT_STRUCT(Registration, id, method); + +/** + * The client/registerCapability request is sent from the server to the client to register + * for a new capability on the client side. Not all clients need to support dynamic + * capability registration. A client opts in via the dynamicRegistration property on the + * specific client capabilities. A client can even provide dynamic registration for + * capability A but not for capability B (see TextDocumentClientCapabilities as an example). + */ +struct RegistrationParams +{ + std::vector registrations; + MAKE_SWAP_METHOD(RegistrationParams, registrations); +}; +/** + * The client/registerCapability request is sent from the server to the client + * to register for a new capability on the client side. + * Not all clients need to support dynamic capability registration. + * A client opts in via the ClientCapabilities.dynamicRegistration property + */ +MAKE_REFLECT_STRUCT(RegistrationParams, registrations); + +DEFINE_REQUEST_RESPONSE_TYPE(Req_ClientRegisterCapability, RegistrationParams,JsonNull, "client/registerCapability"); \ No newline at end of file diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/client/unregisterCapability.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/client/unregisterCapability.h new file mode 100644 index 0000000000..aa51d7efee --- /dev/null +++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/client/unregisterCapability.h @@ -0,0 +1,41 @@ +#pragma once + +#include "LibLsp/lsp/lsDocumentUri.h" + +#include "LibLsp/JsonRpc/RequestInMessage.h" +#include "LibLsp/JsonRpc/lsResponseMessage.h" + +/** + * General parameters to unregister a capability. + */ + +struct Unregistration { + /** + * The id used to unregister the request or notification. Usually an id + * provided during the register request. + */ + + std::string id; + + /** + * The method / capability to unregister for. + */ + + std::string method; + + MAKE_SWAP_METHOD(Unregistration, id, method); +}; +MAKE_REFLECT_STRUCT(Unregistration, id, method); +/** + * The client/unregisterCapability request is sent from the server to the client to unregister + * a previously registered capability. + */ +struct UnregistrationParams +{ + std::vector unregisterations; + MAKE_SWAP_METHOD(UnregistrationParams, unregisterations); +}; + +MAKE_REFLECT_STRUCT(UnregistrationParams, unregisterations); + +DEFINE_REQUEST_RESPONSE_TYPE(Req_ClientUnregisterCapability, UnregistrationParams,JsonNull, "client/unregisterCapability"); \ No newline at end of file diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/Move.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/Move.h new file mode 100644 index 0000000000..c0beb625f2 --- /dev/null +++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/Move.h @@ -0,0 +1,14 @@ +#pragma once + +#include "LibLsp/JsonRpc/RequestInMessage.h" +#include "LibLsp/JsonRpc/lsResponseMessage.h" +#include +#include "LibLsp/lsp/CodeActionParams.h" +#include "getMoveDestinations.h" +#include "getRefactorEdit.h" + + +DEFINE_REQUEST_RESPONSE_TYPE(java_move, MoveParams, RefactorWorkspaceEdit, "java/move"); + + + diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/OverridableMethod.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/OverridableMethod.h new file mode 100644 index 0000000000..cfb17fdf34 --- /dev/null +++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/OverridableMethod.h @@ -0,0 +1,34 @@ +#pragma once + +#include "LibLsp/JsonRpc/serializer.h" +#include +struct OverridableMethod +{ + std::string bindingKey; + std::string name; + std::vector parameters; + bool unimplemented = false; + std::string declaringClass; + std::string declaringClassType; + + void swap(OverridableMethod& arg) noexcept + { + bindingKey.swap(arg.bindingKey); + name.swap(arg.name); + parameters.swap(arg.parameters); + declaringClass.swap(arg.declaringClass); + declaringClassType.swap(arg.declaringClassType); + std::swap(unimplemented, arg.unimplemented); + } +}; +MAKE_REFLECT_STRUCT(OverridableMethod, bindingKey, name, parameters, unimplemented, declaringClass, declaringClassType); + +struct OverridableMethodsResponse +{ + std::string type; + std::vector methods; + + MAKE_SWAP_METHOD(OverridableMethodsResponse, type, methods) +}; + +MAKE_REFLECT_STRUCT(OverridableMethodsResponse, type, methods) diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/WorkspaceSymbolParams.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/WorkspaceSymbolParams.h new file mode 100644 index 0000000000..c7faa94d6c --- /dev/null +++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/WorkspaceSymbolParams.h @@ -0,0 +1,13 @@ +#pragma once + +#include "LibLsp/JsonRpc/serializer.h" +#include + + +struct WorkspaceSymbolParams +{ + std::string query; + MAKE_SWAP_METHOD(WorkspaceSymbolParams, query); +}; +MAKE_REFLECT_STRUCT(WorkspaceSymbolParams, query); + diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/addOverridableMethods.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/addOverridableMethods.h new file mode 100644 index 0000000000..5da14a452a --- /dev/null +++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/addOverridableMethods.h @@ -0,0 +1,19 @@ +#pragma once + +#include "LibLsp/JsonRpc/message.h" +#include "OverridableMethod.h" +#include "LibLsp/lsp/CodeActionParams.h" +#include "LibLsp/JsonRpc/RequestInMessage.h" +#include "LibLsp/JsonRpc/lsResponseMessage.h" +struct AddOverridableMethodParams { + lsCodeActionParams context; + std::vector overridableMethods; + + MAKE_SWAP_METHOD(AddOverridableMethodParams, context, overridableMethods); +}; + +MAKE_REFLECT_STRUCT(AddOverridableMethodParams, context, overridableMethods); + +DEFINE_REQUEST_RESPONSE_TYPE(java_addOverridableMethods, AddOverridableMethodParams, lsWorkspaceEdit, "java/addOverridableMethods"); + + diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/buildWorkspace.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/buildWorkspace.h new file mode 100644 index 0000000000..a2c2c062cc --- /dev/null +++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/buildWorkspace.h @@ -0,0 +1,17 @@ +#pragma once + +#include "WorkspaceSymbolParams.h" +#include "LibLsp/JsonRpc/RequestInMessage.h" +#include "LibLsp/JsonRpc/lsResponseMessage.h" + + + + + +enum class BuildWorkspaceStatus : uint8_t{ + + FAILED, SUCCEED, WITH_ERROR, CANCELLED, +}; +MAKE_REFLECT_TYPE_PROXY(BuildWorkspaceStatus) + +DEFINE_REQUEST_RESPONSE_TYPE(java_buildWorkspace, bool, BuildWorkspaceStatus, "java/buildWorkspace"); \ No newline at end of file diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/checkConstructorsStatus.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/checkConstructorsStatus.h new file mode 100644 index 0000000000..261a0cc551 --- /dev/null +++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/checkConstructorsStatus.h @@ -0,0 +1,29 @@ +#pragma once + +#include "LibLsp/JsonRpc/RequestInMessage.h" +#include "LibLsp/JsonRpc/lsResponseMessage.h" +#include "LibLsp/lsp/CodeActionParams.h" +#include "checkHashCodeEqualsStatus.h" + +struct LspMethodBinding { + std::string bindingKey; + std::string name; + std::vector< std::string> parameters; + + MAKE_SWAP_METHOD(LspMethodBinding, bindingKey, name, parameters); +}; +MAKE_REFLECT_STRUCT(LspMethodBinding, bindingKey, name, parameters); + + +struct CheckConstructorsResponse { + std::vector constructors; + std::vector fields; + MAKE_SWAP_METHOD(CheckConstructorsResponse, constructors, fields) +}; +MAKE_REFLECT_STRUCT(CheckConstructorsResponse, constructors,fields) + +DEFINE_REQUEST_RESPONSE_TYPE(java_checkConstructorsStatus, lsCodeActionParams, CheckConstructorsResponse,"java/checkConstructorsStatus") + + + + diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/checkDelegateMethodsStatus.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/checkDelegateMethodsStatus.h new file mode 100644 index 0000000000..729639eafa --- /dev/null +++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/checkDelegateMethodsStatus.h @@ -0,0 +1,29 @@ +#pragma once + +#include "LibLsp/JsonRpc/RequestInMessage.h" +#include "LibLsp/JsonRpc/lsResponseMessage.h" + +#include "LibLsp/lsp/CodeActionParams.h" +#include "checkHashCodeEqualsStatus.h" +#include "checkConstructorsStatus.h" + +struct LspDelegateField { + LspVariableBinding field; + std::vector delegateMethods; + + MAKE_SWAP_METHOD(LspDelegateField, field, delegateMethods); +}; +MAKE_REFLECT_STRUCT(LspDelegateField, field, delegateMethods); + + +struct CheckDelegateMethodsResponse { + std::vector delegateFields; + + MAKE_SWAP_METHOD(CheckDelegateMethodsResponse, delegateFields) +}; +MAKE_REFLECT_STRUCT(CheckDelegateMethodsResponse, delegateFields) + +DEFINE_REQUEST_RESPONSE_TYPE(java_checkDelegateMethodsStatus, + lsCodeActionParams, CheckDelegateMethodsResponse, "java/checkDelegateMethodsStatus"); + + diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/checkHashCodeEqualsStatus.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/checkHashCodeEqualsStatus.h new file mode 100644 index 0000000000..1d9652dd44 --- /dev/null +++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/checkHashCodeEqualsStatus.h @@ -0,0 +1,36 @@ +#pragma once + +#include "LibLsp/JsonRpc/RequestInMessage.h" +#include "LibLsp/JsonRpc/lsResponseMessage.h" + +#include + +#include "LibLsp/lsp/CodeActionParams.h" + +struct LspVariableBinding { + std::string bindingKey; + std::string name; + std::string type; + bool isField; + void swap(LspVariableBinding& arg) noexcept + { + bindingKey.swap(arg.bindingKey); + name.swap(arg.name); + type.swap(arg.type); + std::swap(isField, arg.isField); + } +}; +MAKE_REFLECT_STRUCT(LspVariableBinding, bindingKey, name, type, isField) + +struct CheckHashCodeEqualsResponse { + std::string type; + std::vector fields; + std::vector existingMethods; + MAKE_SWAP_METHOD(CheckHashCodeEqualsResponse, type, fields, type, existingMethods) +}; +MAKE_REFLECT_STRUCT(CheckHashCodeEqualsResponse, type, fields, type, existingMethods) + +DEFINE_REQUEST_RESPONSE_TYPE(java_checkHashCodeEqualsStatus, + lsCodeActionParams, CheckHashCodeEqualsResponse, "java/checkHashCodeEqualsStatus") + + diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/checkToStringStatus.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/checkToStringStatus.h new file mode 100644 index 0000000000..24580d94c0 --- /dev/null +++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/checkToStringStatus.h @@ -0,0 +1,24 @@ +#pragma once + +#include "LibLsp/JsonRpc/RequestInMessage.h" +#include "LibLsp/JsonRpc/lsResponseMessage.h" + +#include "LibLsp/lsp/CodeActionParams.h" +#include "checkHashCodeEqualsStatus.h" +struct CheckToStringResponse { + std::string type; + std::vector fields; + bool exists; + void swap(CheckToStringResponse& arg) noexcept + { + type.swap(arg.type); + fields.swap(arg.fields); + std::swap(exists, arg.exists); + } +}; +MAKE_REFLECT_STRUCT(CheckToStringResponse,type,fields,exists) + +DEFINE_REQUEST_RESPONSE_TYPE(java_checkToStringStatus, + lsCodeActionParams, CheckToStringResponse ,"java/checkToStringStatus") + + diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/classFileContents.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/classFileContents.h new file mode 100644 index 0000000000..70eb121b99 --- /dev/null +++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/classFileContents.h @@ -0,0 +1,10 @@ +#pragma once + +#include "LibLsp/JsonRpc/RequestInMessage.h" +#include "LibLsp/JsonRpc/lsResponseMessage.h" + +#include +#include "LibLsp/lsp/lsTextDocumentIdentifier.h" + +DEFINE_REQUEST_RESPONSE_TYPE(java_classFileContents, lsTextDocumentIdentifier, std::string ,"java/classFileContents"); + diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/codeActionResult.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/codeActionResult.h new file mode 100644 index 0000000000..02024e3d93 --- /dev/null +++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/codeActionResult.h @@ -0,0 +1,22 @@ +#pragma once + +#include "LibLsp/JsonRpc/serializer.h" +#include "LibLsp/JsonRpc/message.h" +#include "LibLsp/lsp/lsCodeAction.h" +#include "LibLsp/lsp/workspace/execute_command.h" +#include +#include "LibLsp/lsp/textDocument/code_action.h" + +namespace SourceAssistProcessor { + + /*std::set UNSUPPORTED_RESOURCES = { "module-info.java", "package-info.java" + };*/ + +// static const char* COMMAND_ID_ACTION_OVERRIDEMETHODSPROMPT = "java.action.overrideMethodsPrompt"; +// static const char* COMMAND_ID_ACTION_HASHCODEEQUALSPROMPT = "java.action.hashCodeEqualsPrompt"; +// static const char* COMMAND_ID_ACTION_ORGANIZEIMPORTS = "java.action.organizeImports"; +// static const char* COMMAND_ID_ACTION_GENERATETOSTRINGPROMPT = "java.action.generateToStringPrompt"; +// static const char* COMMAND_ID_ACTION_GENERATEACCESSORSPROMPT = "java.action.generateAccessorsPrompt"; +// static const char* COMMAND_ID_ACTION_GENERATECONSTRUCTORSPROMPT = "java.action.generateConstructorsPrompt"; +// static const char* COMMAND_ID_ACTION_GENERATEDELEGATEMETHODSPROMPT = "java.action.generateDelegateMethodsPrompt"; +}; diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/executeCommand.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/executeCommand.h new file mode 100644 index 0000000000..92d4a3627b --- /dev/null +++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/executeCommand.h @@ -0,0 +1,29 @@ +#pragma once +#include "LibLsp/JsonRpc/RequestInMessage.h" +#include "LibLsp/JsonRpc/lsResponseMessage.h" +#include +#include "LibLsp/lsp/lsWorkspaceEdit.h" +#include "LibLsp/lsp/ExecuteCommandParams.h" +namespace buildpath +{ +// static const char* EDIT_ORGNIZEIMPORTS = "java.edit.organizeImports"; +// static const char* RESOLVE_SOURCE_ATTACHMENT = "java.project.resolveSourceAttachment"; + +// static const char* UPDATE_SOURCE_ATTACHMENT = "java.project.updateSourceAttachment"; + +// static const char* ADD_TO_SOURCEPATH = "java.project.addToSourcePath"; + +// static const char* REMOVE_FROM_SOURCEPATH = "java.project.removeFromSourcePath"; + +// static const char* LIST_SOURCEPATHS = "java.project.listSourcePaths"; + struct Result { + bool status; + std::string message; + }; + + + +} + + +DEFINE_REQUEST_RESPONSE_TYPE(java_executeCommand, ExecuteCommandParams, lsWorkspaceEdit, "java/executeCommand"); diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/findLinks.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/findLinks.h new file mode 100644 index 0000000000..d184c675d8 --- /dev/null +++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/findLinks.h @@ -0,0 +1,22 @@ +#pragma once + +#include "LibLsp/JsonRpc/RequestInMessage.h" +#include "LibLsp/JsonRpc/lsResponseMessage.h" +#include +#include "LibLsp/lsp/CodeActionParams.h" +#include "getRefactorEdit.h" +#include "LibLsp/lsp/lsTextDocumentPositionParams.h" + +struct FindLinksParams { + // Supported link types: superImplementation + std::string type; + lsTextDocumentPositionParams position; + + MAKE_SWAP_METHOD(FindLinksParams, type, position) +}; +MAKE_REFLECT_STRUCT(FindLinksParams,type,position) + +DEFINE_REQUEST_RESPONSE_TYPE(java_findLinks, FindLinksParams,lsp::Any, "java/findLinks"); + + + diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/generateAccessors.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/generateAccessors.h new file mode 100644 index 0000000000..200d840e94 --- /dev/null +++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/generateAccessors.h @@ -0,0 +1,19 @@ +#pragma once + +#include "LibLsp/JsonRpc/RequestInMessage.h" +#include "LibLsp/JsonRpc/lsResponseMessage.h" +#include +#include "checkHashCodeEqualsStatus.h" +#include "resolveUnimplementedAccessors.h" + + +struct GenerateAccessorsParams { + lsCodeActionParams context; + std::vector accessors; + + + MAKE_SWAP_METHOD(GenerateAccessorsParams, context, accessors) +}; +MAKE_REFLECT_STRUCT(GenerateAccessorsParams, context, accessors) + +DEFINE_REQUEST_RESPONSE_TYPE(java_generateAccessors, GenerateAccessorsParams, lsWorkspaceEdit, "java/generateAccessors"); diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/generateConstructors.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/generateConstructors.h new file mode 100644 index 0000000000..77c49a66a2 --- /dev/null +++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/generateConstructors.h @@ -0,0 +1,19 @@ +#pragma once + +#include "LibLsp/JsonRpc/RequestInMessage.h" +#include "LibLsp/JsonRpc/lsResponseMessage.h" +#include +#include "checkHashCodeEqualsStatus.h" +#include "checkConstructorsStatus.h" + + +struct GenerateConstructorsParams { + lsCodeActionParams context; + std::vector constructors; + std::vector< LspVariableBinding >fields; + MAKE_SWAP_METHOD(GenerateConstructorsParams, context, fields) +}; +MAKE_REFLECT_STRUCT(GenerateConstructorsParams, context, fields) + +DEFINE_REQUEST_RESPONSE_TYPE(java_generateConstructors, GenerateConstructorsParams, lsWorkspaceEdit, "java/generateConstructors"); + diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/generateDelegateMethods.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/generateDelegateMethods.h new file mode 100644 index 0000000000..8958ae4d7e --- /dev/null +++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/generateDelegateMethods.h @@ -0,0 +1,25 @@ +#pragma once + +#include "LibLsp/JsonRpc/RequestInMessage.h" +#include "LibLsp/JsonRpc/lsResponseMessage.h" +#include +#include "checkHashCodeEqualsStatus.h" +#include "checkConstructorsStatus.h" + +struct LspDelegateEntry { + LspVariableBinding field; + LspMethodBinding delegateMethod; + MAKE_SWAP_METHOD(LspDelegateEntry, field, delegateMethod); +}; +MAKE_REFLECT_STRUCT(LspDelegateEntry, field, delegateMethod); + + +struct GenerateDelegateMethodsParams { + lsCodeActionParams context; + std::vector delegateEntries; + MAKE_SWAP_METHOD(GenerateDelegateMethodsParams, context, delegateEntries) +}; +MAKE_REFLECT_STRUCT(GenerateDelegateMethodsParams, context, delegateEntries) + +DEFINE_REQUEST_RESPONSE_TYPE(java_generateDelegateMethods, GenerateDelegateMethodsParams, lsWorkspaceEdit, "java/generateDelegateMethods"); + diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/generateHashCodeEquals.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/generateHashCodeEquals.h new file mode 100644 index 0000000000..937c358733 --- /dev/null +++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/generateHashCodeEquals.h @@ -0,0 +1,25 @@ +#pragma once + +#include "LibLsp/JsonRpc/RequestInMessage.h" +#include "LibLsp/JsonRpc/lsResponseMessage.h" +#include + +#include "LibLsp/lsp/CodeActionParams.h" +#include "checkHashCodeEqualsStatus.h" + +struct GenerateHashCodeEqualsParams { + lsCodeActionParams context; + std::vector fields; + bool regenerate= false; + void swap(GenerateHashCodeEqualsParams& arg) noexcept + { + context.swap(arg.context); + fields.swap(arg.fields); + std::swap(regenerate, arg.regenerate); + } +}; +MAKE_REFLECT_STRUCT(GenerateHashCodeEqualsParams, context, fields, regenerate); + +DEFINE_REQUEST_RESPONSE_TYPE(java_generateHashCodeEquals, GenerateHashCodeEqualsParams, lsWorkspaceEdit, "java/generateHashCodeEquals") + + diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/generateToString.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/generateToString.h new file mode 100644 index 0000000000..1f8ccc73b8 --- /dev/null +++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/generateToString.h @@ -0,0 +1,18 @@ +#pragma once + +#include "LibLsp/JsonRpc/RequestInMessage.h" +#include "LibLsp/JsonRpc/lsResponseMessage.h" +#include +#include "checkHashCodeEqualsStatus.h" + + +struct GenerateToStringParams { + lsCodeActionParams context; + std::vector< LspVariableBinding >fields; + + MAKE_SWAP_METHOD(GenerateToStringParams, context, fields) + +}; +MAKE_REFLECT_STRUCT(GenerateToStringParams, context, fields) + +DEFINE_REQUEST_RESPONSE_TYPE(java_generateToString, GenerateToStringParams, lsWorkspaceEdit, "java/generateToString"); diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/getMoveDestinations.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/getMoveDestinations.h new file mode 100644 index 0000000000..bcbf6f8c2b --- /dev/null +++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/getMoveDestinations.h @@ -0,0 +1,65 @@ +#pragma once + +#include "LibLsp/JsonRpc/RequestInMessage.h" +#include "LibLsp/JsonRpc/lsResponseMessage.h" +#include +#include "LibLsp/lsp/lsAny.h" +#include "LibLsp/lsp/CodeActionParams.h" + +struct MoveKindInfo +{ + static std::string moveResource() + { + return "moveResource"; + } + static std::string moveInstanceMethod() + { + return "moveInstanceMethod"; + } + static std::string moveStaticMember() + { + return "moveStaticMember"; + } +}; + +struct MoveParams { + /** + * The supported move kind: moveResource, moveInstanceMethod, moveStaticMember, + * moveTypeToNewFile. + */ + std::string moveKind; + /** + * The selected resource uris when the move operation is triggered. + */ + std::vector sourceUris; + /** + * The code action params when the move operation is triggered. + */ + boost::optional params; + /** + * The possible destination: a folder/package, class, instanceDeclaration. + */ + lsp::Any destination; + bool updateReferences; + void swap(MoveParams& arg) noexcept + { + moveKind.swap(arg.moveKind); + sourceUris.swap(arg.sourceUris); + params.swap(arg.params); + destination.swap(arg.destination); + std::swap(updateReferences, arg.updateReferences); + } +}; +MAKE_REFLECT_STRUCT(MoveParams, moveKind, sourceUris, params, destination, updateReferences); + +struct MoveDestinationsResponse { + std::string errorMessage; + std::vector destinations; + MAKE_SWAP_METHOD(MoveDestinationsResponse, errorMessage, destinations); +}; +MAKE_REFLECT_STRUCT(MoveDestinationsResponse, errorMessage, destinations); + +DEFINE_REQUEST_RESPONSE_TYPE(java_getMoveDestinations, MoveParams, MoveDestinationsResponse, "java/getMoveDestinations"); + + + diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/getRefactorEdit.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/getRefactorEdit.h new file mode 100644 index 0000000000..e46327075a --- /dev/null +++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/getRefactorEdit.h @@ -0,0 +1,77 @@ +#pragma once + +#include "LibLsp/JsonRpc/RequestInMessage.h" +#include "LibLsp/JsonRpc/lsResponseMessage.h" + + + +#include +#include +#include "WorkspaceSymbolParams.h" +#include "LibLsp/lsp/method_type.h" +#include "LibLsp/lsp/textDocument/code_action.h" +#include "LibLsp/lsp/lsFormattingOptions.h" + +namespace +RefactorProposalUtility +{ + extern const char* APPLY_REFACTORING_COMMAND_ID; + extern const char* EXTRACT_VARIABLE_ALL_OCCURRENCE_COMMAND; + extern const char* EXTRACT_VARIABLE_COMMAND; + extern const char* EXTRACT_CONSTANT_COMMAND; + extern const char* EXTRACT_METHOD_COMMAND; + extern const char* EXTRACT_FIELD_COMMAND; + extern const char* CONVERT_VARIABLE_TO_FIELD_COMMAND; + extern const char* MOVE_FILE_COMMAND; + extern const char* MOVE_INSTANCE_METHOD_COMMAND; + extern const char* MOVE_STATIC_MEMBER_COMMAND; + extern const char* MOVE_TYPE_COMMAND; +}; + + +struct RenamePosition { + lsDocumentUri uri; + int offset = 0; + int length = 0; + void swap(RenamePosition& arg) noexcept + { + uri.swap(arg.uri); + std::swap(offset, arg.offset); + std::swap(length, arg.length); + } +}; +MAKE_REFLECT_STRUCT(RenamePosition, uri, offset, length); + +struct GetRefactorEditParams +{ + std::string command; + std::vector commandArguments; + lsCodeActionParams context; + boost::optional options; + MAKE_SWAP_METHOD(GetRefactorEditParams, command, context, options); +}; +MAKE_REFLECT_STRUCT(GetRefactorEditParams, command, context, options); + + + + +struct RefactorWorkspaceEdit { + /** + * The workspace edit this code action performs. + */ + lsWorkspaceEdit edit; + /** + * A command this code action executes. If a code action provides a edit and a + * command, first the edit is executed and then the command. + */ + + boost::optional errorMessage; + + boost::optional < lsCommandWithAny > command; + + MAKE_SWAP_METHOD(RefactorWorkspaceEdit, edit, command, errorMessage) +}; +MAKE_REFLECT_STRUCT(RefactorWorkspaceEdit,edit,command,errorMessage) + +DEFINE_REQUEST_RESPONSE_TYPE(java_getRefactorEdit, GetRefactorEditParams, RefactorWorkspaceEdit, "java/getRefactorEdit"); + diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/listOverridableMethods.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/listOverridableMethods.h new file mode 100644 index 0000000000..13b73ce5c2 --- /dev/null +++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/listOverridableMethods.h @@ -0,0 +1,17 @@ +#pragma once + +#include "LibLsp/JsonRpc/RequestInMessage.h" +#include "LibLsp/JsonRpc/lsResponseMessage.h" + +#include "LibLsp/lsp/CodeActionParams.h" +#include "OverridableMethod.h" + + + + + +DEFINE_REQUEST_RESPONSE_TYPE(java_listOverridableMethods, lsCodeActionParams, OverridableMethodsResponse, "java/listOverridableMethods"); + + + + diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/organizeImports.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/organizeImports.h new file mode 100644 index 0000000000..817d52d32b --- /dev/null +++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/organizeImports.h @@ -0,0 +1,12 @@ +#pragma once +#include "LibLsp/JsonRpc/RequestInMessage.h" +#include "LibLsp/JsonRpc/lsResponseMessage.h" +#include + +#include "LibLsp/lsp/CodeActionParams.h" + + + +DEFINE_REQUEST_RESPONSE_TYPE(java_organizeImports, lsCodeActionParams, lsWorkspaceEdit, "java/organizeImports"); + + diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/projectConfigurationUpdate.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/projectConfigurationUpdate.h new file mode 100644 index 0000000000..342d167093 --- /dev/null +++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/projectConfigurationUpdate.h @@ -0,0 +1,13 @@ +#pragma once + +#include "LibLsp/JsonRpc/NotificationInMessage.h" + + +#include +#include +#include "WorkspaceSymbolParams.h" + +#include "LibLsp/lsp/lsTextDocumentIdentifier.h" + +DEFINE_NOTIFICATION_TYPE(java_projectConfigurationUpdate, lsTextDocumentIdentifier, "java/projectConfigurationUpdate"); + diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/resolveUnimplementedAccessors.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/resolveUnimplementedAccessors.h new file mode 100644 index 0000000000..ba77041474 --- /dev/null +++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/resolveUnimplementedAccessors.h @@ -0,0 +1,24 @@ +#pragma once + +#include "LibLsp/JsonRpc/RequestInMessage.h" +#include "LibLsp/JsonRpc/lsResponseMessage.h" +#include +#include "checkHashCodeEqualsStatus.h" + + +struct AccessorField { + std::string fieldName; + bool isStatic =false; + bool generateGetter = false; + bool generateSetter = false; + void swap(AccessorField& arg) noexcept{ + fieldName.swap(arg.fieldName); + std::swap(isStatic, arg.isStatic); + std::swap(generateGetter, arg.generateGetter); + std::swap(generateSetter, arg.generateSetter); + } +}; + +MAKE_REFLECT_STRUCT(AccessorField, fieldName,isStatic,generateGetter,generateSetter) + +DEFINE_REQUEST_RESPONSE_TYPE(java_resolveUnimplementedAccessors, lsCodeActionParams, std::vector, "java/resolveUnimplementedAccessors"); diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/searchSymbols.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/searchSymbols.h new file mode 100644 index 0000000000..ac8a2419f6 --- /dev/null +++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/searchSymbols.h @@ -0,0 +1,27 @@ +#pragma once + +#include "LibLsp/JsonRpc/RequestInMessage.h" +#include "LibLsp/JsonRpc/lsResponseMessage.h" + + +#include +#include +#include "WorkspaceSymbolParams.h" +#include "LibLsp/lsp/method_type.h" +#include "LibLsp/lsp/symbol.h" + + +struct SearchSymbolParams :public WorkspaceSymbolParams +{ + boost::optional projectName; + boost::optional< bool >sourceOnly; + boost::optional< int> maxResults; + MAKE_SWAP_METHOD(SearchSymbolParams, query, projectName, sourceOnly, maxResults); +}; +MAKE_REFLECT_STRUCT(SearchSymbolParams, query, projectName, sourceOnly, maxResults); + + +DEFINE_REQUEST_RESPONSE_TYPE(java_searchSymbols, SearchSymbolParams, std::vector, "java/searchSymbols"); + + + diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/sonarlint/protocol.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/sonarlint/protocol.h new file mode 100644 index 0000000000..d81c3eaa63 --- /dev/null +++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/sonarlint/protocol.h @@ -0,0 +1,176 @@ +#pragma once +#include +#include +#include "LibLsp/JsonRpc/RequestInMessage.h" +#include "LibLsp/lsp/lsDocumentUri.h" +#include "LibLsp/lsp/lsAny.h" +#include "LibLsp/JsonRpc/NotificationInMessage.h" +#include "LibLsp/lsp/general/InitializeParams.h" + +struct LintRule +{ + std::string key; + std::string name; + + + std::string Display() const + { + return name + " (" + key + ")"; + } + bool activeByDefault = true; + boost::optional severity; + boost::optional type; + int icon_index = -1; + MAKE_SWAP_METHOD(LintRule, key, name, activeByDefault, severity, type); + +}; +MAKE_REFLECT_STRUCT(LintRule, key, name, activeByDefault, severity, type); + + +struct RuleParameter { + std::string name; + boost::optional description; + boost::optional defaultValue; + +}; +MAKE_REFLECT_STRUCT(RuleParameter, name, description, defaultValue); + +struct ShowRuleDescriptionParams { + + boost::optional key; + + boost::optional name; + + boost::optional htmlDescription; + + boost::optional type; + + boost::optional severity; + + boost::optional< std::vector > parameters; + MAKE_SWAP_METHOD(ShowRuleDescriptionParams, key, name, htmlDescription, type, severity, parameters) + + +}; +MAKE_REFLECT_STRUCT(ShowRuleDescriptionParams, key, name, htmlDescription, type, severity, parameters); + + +struct GetJavaConfigResponse { + std::string projectRoot; + std::string sourceLevel; + std::vector classpath; + bool isTest; + std::string vmLocation; + MAKE_SWAP_METHOD(GetJavaConfigResponse, projectRoot, sourceLevel, classpath, isTest, vmLocation); +}; +MAKE_REFLECT_STRUCT(GetJavaConfigResponse, projectRoot, sourceLevel, classpath, isTest, vmLocation); + +struct SetTraceNotificationParams { + lsInitializeParams::lsTrace value; +}; +MAKE_REFLECT_STRUCT(SetTraceNotificationParams, value); + + +struct ServerConnectionSettings { + + std::string SONARCLOUD_URL = "https://sonarcloud.io"; + std::vectorSONARCLOUD_ALIAS = { "https://sonarqube.com", + "https://www.sonarqube.com", + "https://www.sonarcloud.io", + "https://sonarcloud.io" }; + + std::string connectionId; + std::string serverUrl; + std::string token; + boost::optional organizationKey; + MAKE_SWAP_METHOD(ServerConnectionSettings, connectionId, serverUrl, token, organizationKey) + +}; +MAKE_REFLECT_STRUCT(ServerConnectionSettings, connectionId, serverUrl, token, organizationKey) + +struct RuleSetting +{ + bool IsOn(); + std::string level = "on"; + RuleSetting(bool activate); + RuleSetting() = default; + void toggle(); + void on() + { + level = "on"; + } + void off() + { + level = "off"; + } + void turn(bool activate) + { + if (activate) + { + on(); + } + else + { + off(); + } + } + boost::optional< std::map > parameters; +}; +MAKE_REFLECT_STRUCT(RuleSetting, level, parameters) + +struct ConsoleParams +{ + boost::optional < bool >showAnalyzerLogs; + boost::optional < bool >showVerboseLogs; + MAKE_SWAP_METHOD(ConsoleParams, showAnalyzerLogs, showVerboseLogs) +}; +MAKE_REFLECT_STRUCT(ConsoleParams, showAnalyzerLogs, showVerboseLogs) + +struct SonarLintWorkspaceSettings +{ + boost::optional < bool > disableTelemetry; + boost::optional < std::map >connectedMode; + boost::optional> rules; + boost::optional output; + + boost::optional pathToNodeExecutable; + + boost::optional< std::map > getConfigurationParameters(const std::string& ruleKey); + + +}; + +MAKE_REFLECT_STRUCT(SonarLintWorkspaceSettings, disableTelemetry, connectedMode, + rules, output, pathToNodeExecutable) + + + + DEFINE_REQUEST_RESPONSE_TYPE(slls_listAllRules, JsonNull, lsp::Any, "sonarlint/listAllRules"); + + + +DEFINE_NOTIFICATION_TYPE(Notify_didClasspathUpdate, lsDocumentUri, "sonarlint/didClasspathUpdate") + + +DEFINE_NOTIFICATION_TYPE(Notify_didJavaServerModeChange, std::string, "sonarlint/didJavaServerModeChange") + + + +DEFINE_REQUEST_RESPONSE_TYPE(slls_showSonarLintOutput, JsonNull, JsonNull, "sonarlint/showSonarLintOutput"); + + + +DEFINE_REQUEST_RESPONSE_TYPE(slls_openJavaHomeSettings, JsonNull, JsonNull, "sonarlint/openJavaHomeSettings"); + + + + +DEFINE_REQUEST_RESPONSE_TYPE(slls_openPathToNodeSettings, JsonNull, JsonNull, "sonarlint/openPathToNodeSettings"); + + +DEFINE_REQUEST_RESPONSE_TYPE(slls_showRuleDescription, ShowRuleDescriptionParams, JsonNull, "sonarlint/showRuleDescription"); + +DEFINE_REQUEST_RESPONSE_TYPE(slls_getJavaConfig, lsDocumentUri, GetJavaConfigResponse, "sonarlint/getJavaConfig"); + + +DEFINE_NOTIFICATION_TYPE(slls_setTraceNotification, SetTraceNotificationParams, "$/setTraceNotification") \ No newline at end of file diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/general/InitializeParams.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/general/InitializeParams.h new file mode 100644 index 0000000000..f10080ea21 --- /dev/null +++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/general/InitializeParams.h @@ -0,0 +1,128 @@ +#pragma once + +#include "LibLsp/lsp/lsDocumentUri.h" +#include "LibLsp/lsp/lsAny.h" +#include "lsClientCapabilities.h" +#include "LibLsp/lsp/workspace/workspaceFolders.h" + +struct ClientInfo { + std::string name; + boost::optional version; + + MAKE_SWAP_METHOD(ClientInfo,name,version); +}; +MAKE_REFLECT_STRUCT(ClientInfo,name,version); + +struct lsInitializeParams { + // The process Id of the parent process that started + // the server. Is null if the process has not been started by another process. + // If the parent process is not alive then the server should exit (see exit + // notification) its process. + boost::optional processId; + + /** + * Information about the client + * + * @since 3.15.0 + */ + boost::optional clientInfo; + /** + * The locale the client is currently showing the user interface + * in. This must not necessarily be the locale of the operating + * system. + * + * Uses IETF language tags as the value's syntax + * (See https://en.wikipedia.org/wiki/IETF_language_tag) + * + * @since 3.16.0 + */ + boost::optional locale; + + // The rootPath of the workspace. Is null + // if no folder is open. + // + // @deprecated in favour of rootUri. + boost::optional rootPath; + + // The rootUri of the workspace. Is null if no + // folder is open. If both `rootPath` and `rootUri` are set + // `rootUri` wins. + boost::optional rootUri; + + // User provided initialization options. + boost::optional initializationOptions; + + // The capabilities provided by the client (editor or tool) + lsClientCapabilities capabilities; + + + /** + * An boost::optional extension to the protocol. + * To tell the server what client (editor) is talking to it. + */ + // @Deprecated + boost::optional< std::string >clientName; + + + + enum class lsTrace { + // NOTE: serialized as a string, one of 'off' | 'messages' | 'verbose'; + Off, // off + Messages, // messages + Verbose // verbose + + }; + + // The initial trace setting. If omitted trace is disabled ('off'). + lsTrace trace = lsTrace::Off; + + + /** + * The workspace folders configured in the client when the server starts. + * This property is only available if the client supports workspace folders. + * It can be `null` if the client supports workspace folders but none are + * configured. + * + * Since 3.6.0 + */ + boost::optional< std::vector > workspaceFolders; + + MAKE_SWAP_METHOD(lsInitializeParams, + processId, + rootPath, + rootUri, + initializationOptions, + capabilities, clientName, clientInfo, + trace, workspaceFolders, locale) +}; + +void Reflect(Reader& reader, lsInitializeParams::lsTrace& value); + + +void Reflect(Writer& writer, lsInitializeParams::lsTrace& value); + + +MAKE_REFLECT_STRUCT(lsInitializeParams, + processId, + rootPath, + rootUri, + initializationOptions, + capabilities, clientName, clientInfo, + trace, workspaceFolders, locale) + +struct lsInitializeError { + // Indicates whether the client should retry to send the + // initilize request after showing the message provided + // in the ResponseError. + bool retry; + void swap(lsInitializeError& arg) noexcept + { + auto tem = retry; + retry = arg.retry; + arg.retry = tem; + } +}; +MAKE_REFLECT_STRUCT(lsInitializeError, retry); + + + diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/general/exit.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/general/exit.h new file mode 100644 index 0000000000..02fe216017 --- /dev/null +++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/general/exit.h @@ -0,0 +1,7 @@ +#pragma once + +#include "LibLsp/JsonRpc/NotificationInMessage.h" +/** + * A notification to ask the server to exit its process. + */ +DEFINE_NOTIFICATION_TYPE(Notify_Exit, boost::optional, "exit"); diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/general/initialize.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/general/initialize.h new file mode 100644 index 0000000000..eb8810939a --- /dev/null +++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/general/initialize.h @@ -0,0 +1,39 @@ +#pragma once +#include "LibLsp/JsonRpc/message.h" +#include "InitializeParams.h" +#include "lsServerCapabilities.h" +#include "LibLsp/JsonRpc/lsResponseMessage.h" +#include "LibLsp/JsonRpc/RequestInMessage.h" + + + + + + +/** + * The capabilities the language server provides. + */ + struct InitializeResult { + lsServerCapabilities capabilities; + MAKE_SWAP_METHOD(InitializeResult, capabilities); + }; + +MAKE_REFLECT_STRUCT(InitializeResult, capabilities); + + +/** + * The initialize request is sent as the first request from the client to + * the server. + * + * If the server receives request or notification before the initialize request it should act as follows: + * - for a request the respond should be errored with code: -32001. The message can be picked by the server. + * - notifications should be dropped, except for the exit notification. This will allow the exit a server without an initialize request. + * + * Until the server has responded to the initialize request with an InitializeResult + * the client must not sent any additional requests or notifications to the server. + * + * During the initialize request the server is allowed to sent the notifications window/showMessage, + * window/logMessage and telemetry/event as well as the window/showMessageRequest request to the client. + */ + +DEFINE_REQUEST_RESPONSE_TYPE(td_initialize, lsInitializeParams, InitializeResult, "initialize"); diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/general/initialized.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/general/initialized.h new file mode 100644 index 0000000000..bb6d12511c --- /dev/null +++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/general/initialized.h @@ -0,0 +1,13 @@ +#pragma once + + +#include "LibLsp/JsonRpc/NotificationInMessage.h" +/** + * The initialized notification is sent from the client to the server after + * the client received the result of the initialize request but before the + * client is sending any other request or notification to the server. The + * server can use the initialized notification for example to dynamically + * register capabilities. + */ +DEFINE_NOTIFICATION_TYPE(Notify_InitializedNotification, JsonNull, "initialized"); + diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/general/lsClientCapabilities.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/general/lsClientCapabilities.h new file mode 100644 index 0000000000..fcf6634e13 --- /dev/null +++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/general/lsClientCapabilities.h @@ -0,0 +1,48 @@ +#pragma once + +#include "LibLsp/lsp/lsAny.h" +#include "lsWorkspaceClientCapabilites.h" +#include "lsTextDocumentClientCapabilities.h" + +/** + * Client capabilities specific to the used markdown parser. + * + * @since 3.16.0 + */ +struct MarkdownClientCapabilities { + /** + * The name of the parser. + */ + std::string parser; + + /** + * The version of the parser. + */ + boost::optional version; + MAKE_SWAP_METHOD(MarkdownClientCapabilities, parser, version) + +}; +MAKE_REFLECT_STRUCT(MarkdownClientCapabilities, parser, version) + +struct lsClientCapabilities { + // Workspace specific client capabilities. + boost::optional workspace; + + // Text document specific client capabilities. + boost::optional textDocument; + + /** + * Window specific client capabilities. + */ + boost::optional window; + /** + * Experimental client capabilities. + */ + boost::optional experimental; + + MAKE_SWAP_METHOD(lsClientCapabilities, workspace, textDocument, window, experimental) +}; +MAKE_REFLECT_STRUCT(lsClientCapabilities, workspace, textDocument, window, experimental) + + + diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/general/lsServerCapabilities.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/general/lsServerCapabilities.h new file mode 100644 index 0000000000..66af2ced6b --- /dev/null +++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/general/lsServerCapabilities.h @@ -0,0 +1,589 @@ +#pragma once +#include "LibLsp/lsp/method_type.h" + + +#include +#include "LibLsp/JsonRpc/message.h" +#include "LibLsp/lsp/lsDocumentUri.h" +#include "LibLsp/lsp/lsAny.h" +#include "InitializeParams.h" +#include "LibLsp/lsp/textDocument/SemanticTokens.h" + + +extern void Reflect(Reader&, std::pair, boost::optional >&); + +// + // Code Action options. + // +struct CodeActionOptions : WorkDoneProgressOptions { + // + // CodeActionKinds that this server may return. + // + // The list of kinds may be generic, such as `CodeActionKind.Refactor`, or the server + // may list out every specific kind they provide. + // + typedef std::string CodeActionKind; + std::vector codeActionKinds; + + MAKE_SWAP_METHOD(CodeActionOptions, workDoneProgress, codeActionKinds); +}; +MAKE_REFLECT_STRUCT(CodeActionOptions, workDoneProgress, codeActionKinds) +struct CodeLensOptions : WorkDoneProgressOptions { + // + // Code lens has a resolve provider as well. + // + boost::optional resolveProvider ; + MAKE_SWAP_METHOD(CodeLensOptions, workDoneProgress, resolveProvider); +}; +MAKE_REFLECT_STRUCT(CodeLensOptions, workDoneProgress, resolveProvider) + + +// Format document on type options +struct lsDocumentOnTypeFormattingOptions :WorkDoneProgressOptions { + // A character on which formatting should be triggered, like `}`. + std::string firstTriggerCharacter; + + // More trigger characters. + std::vector moreTriggerCharacter; + MAKE_SWAP_METHOD(lsDocumentOnTypeFormattingOptions, workDoneProgress, + firstTriggerCharacter, + moreTriggerCharacter); +}; +MAKE_REFLECT_STRUCT(lsDocumentOnTypeFormattingOptions, workDoneProgress, + firstTriggerCharacter, + moreTriggerCharacter); +struct RenameOptions : WorkDoneProgressOptions { + // + // Renames should be checked and tested before being executed. + // + boost::optional prepareProvider; + MAKE_SWAP_METHOD(RenameOptions, workDoneProgress, prepareProvider); +}; +MAKE_REFLECT_STRUCT(RenameOptions,workDoneProgress,prepareProvider) + +struct DocumentFilter{ + // + // A language id, like `typescript`. + // + boost::optional language; + // + // A Uri [scheme](#Uri.scheme), like `file` or `untitled`. + // + boost::optionalscheme; + // + // A glob pattern, like `*.{ts,js}`. + // + // Glob patterns can have the following syntax: + // - `*` to match one or more characters in a path segment + // - `?` to match on one character in a path segment + // - `**` to match any number of path segments, including none + // - `{}` to group sub patterns into an OR expression. (e.g. `**/*.{ts,js} + // matches all TypeScript and JavaScript files) + // - `[]` to declare a range of characters to match in a path segment + // (e.g., `example.[0-9]` to match on `example.0`, `example.1`,...) + // - `[!...]` to negate a range of characters to match in a path segment + // (e.g., `example.[!0-9]` to match on `example.a`, `example.b`, but + // not `example.0`) + // + boost::optionalpattern; + MAKE_SWAP_METHOD(DocumentFilter, language, scheme, pattern) +}; +MAKE_REFLECT_STRUCT(DocumentFilter, language, scheme, pattern) + +//A document selector is the combination of one or more document filters. +using DocumentSelector = std::vector; + +// Document link options +struct lsDocumentLinkOptions :WorkDoneProgressOptions { + // Document links have a resolve provider as well. + boost::optional resolveProvider; + MAKE_SWAP_METHOD(lsDocumentLinkOptions, workDoneProgress, resolveProvider); +}; +MAKE_REFLECT_STRUCT(lsDocumentLinkOptions, workDoneProgress,resolveProvider); + +// Execute command options. +struct lsExecuteCommandOptions : WorkDoneProgressOptions { + // The commands to be executed on the server + std::vector commands; + MAKE_SWAP_METHOD(lsExecuteCommandOptions, workDoneProgress, commands); +}; +MAKE_REFLECT_STRUCT(lsExecuteCommandOptions, workDoneProgress, commands); + + +struct TextDocumentRegistrationOptions +{ +// + // A document selector to identify the scope of the registration. If set to null + // the document selector provided on the client side will be used. + // + boost::optional documentSelector; + + MAKE_SWAP_METHOD(TextDocumentRegistrationOptions, documentSelector); +}; +MAKE_REFLECT_STRUCT(TextDocumentRegistrationOptions, documentSelector); + +// + // Static registration options to be returned in the initialize request. + // +struct StaticRegistrationOptions :public TextDocumentRegistrationOptions +{ + // + // The id used to register the request. The id can be used to deregister + // the request again. See also Registration#id. + // + boost::optional id; + MAKE_SWAP_METHOD(StaticRegistrationOptions, documentSelector, id) +}; +MAKE_REFLECT_STRUCT(StaticRegistrationOptions, documentSelector,id) + +// + // The server supports workspace folder. + // + // Since 3.6.0 + // + +struct WorkspaceFoldersOptions { + // + // The server has support for workspace folders + // + boost::optional supported; + + // + // Whether the server wants to receive workspace folder + // change notifications. + // + // If a string is provided, the string is treated as an ID + // under which the notification is registered on the client + // side. The ID can be used to unregister for these events + // using the `client/unregisterCapability` request. + // + boost::optional, boost::optional > > changeNotifications; + MAKE_SWAP_METHOD(WorkspaceFoldersOptions, supported, changeNotifications); +}; +MAKE_REFLECT_STRUCT(WorkspaceFoldersOptions, supported, changeNotifications); + +// + // A pattern kind describing if a glob pattern matches a file a folder or + // both. + // + // @since 3.16.0 + // +enum lsFileOperationPatternKind +{ + file, + folder +}; +MAKE_REFLECT_TYPE_PROXY(lsFileOperationPatternKind) + +// + // Matching options for the file operation pattern. + // + // @since 3.16.0 + // +struct lsFileOperationPatternOptions { + + // + // The pattern should be matched ignoring casing. + // + boost::optional ignoreCase; + MAKE_SWAP_METHOD(lsFileOperationPatternOptions, ignoreCase) +}; +MAKE_REFLECT_STRUCT(lsFileOperationPatternOptions, ignoreCase) +// + // A pattern to describe in which file operation requests or notifications + // the server is interested in. + // + // @since 3.16.0 + // +struct lsFileOperationPattern { + // + // The glob pattern to match. Glob patterns can have the following syntax: + // - `*` to match one or more characters in a path segment + // - `?` to match on one character in a path segment + // - `**` to match any number of path segments, including none + // - `{}` to group sub patterns into an OR expression. (e.g. `**/*.{ts,js}` + // matches all TypeScript and JavaScript files) + // - `[]` to declare a range of characters to match in a path segment + // (e.g., `example.[0-9]` to match on `example.0`, `example.1`,...) + // - `[!...]` to negate a range of characters to match in a path segment + // (e.g., `example.[!0-9]` to match on `example.a`, `example.b`, but + // not `example.0`) + // + std::string glob; + + // + // Whether to match files or folders with this pattern. + // + // Matches both if undefined. + // + boost::optional matches; + + // + // Additional options used during matching. + // + boost::optional options ; + MAKE_SWAP_METHOD(lsFileOperationPattern, glob, matches, options) +}; +MAKE_REFLECT_STRUCT(lsFileOperationPattern, glob, matches, options) +// + // A filter to describe in which file operation requests or notifications + // the server is interested in. + // + // @since 3.16.0 + // +struct lsFileOperationFilter { + + // + // A Uri like `file` or `untitled`. + // + boost::optional scheme; + + // + // The actual file operation pattern. + // + boost::optional pattern; + MAKE_SWAP_METHOD(lsFileOperationFilter, scheme, pattern) +}; +MAKE_REFLECT_STRUCT(lsFileOperationFilter, scheme, pattern) +// + // The options to register for file operations. + // + // @since 3.16.0 + // +struct lsFileOperationRegistrationOptions { + // + // The actual filters. + // + boost::optional> filters; + MAKE_SWAP_METHOD(lsFileOperationRegistrationOptions, filters) +}; +MAKE_REFLECT_STRUCT(lsFileOperationRegistrationOptions, filters) + +struct WorkspaceServerCapabilities { + // + // The server supports workspace folder. + // + // Since 3.6.0 + // + WorkspaceFoldersOptions workspaceFolders; + + + // + // The server is interested in file notifications/requests. + // + // @since 3.16.0 + // + struct lsFileOperations + { + // + // The server is interested in receiving didCreateFiles + // notifications. + // + boost::optional didCreate; + + // + // The server is interested in receiving willCreateFiles requests. + // + boost::optional willCreate; + + // + // The server is interested in receiving didRenameFiles + // notifications. + // + boost::optional didRename; + + // + // The server is interested in receiving willRenameFiles requests. + // + boost::optional willRename; + + // + // The server is interested in receiving didDeleteFiles file + // notifications. + // + boost::optional didDelete; + + // + // The server is interested in receiving willDeleteFiles file + // requests. + // + boost::optional willDelete; + MAKE_SWAP_METHOD(lsFileOperations, didCreate, willCreate, didRename, willRename, didDelete, willDelete) + }; + boost::optionalfileOperations; + + + MAKE_SWAP_METHOD(WorkspaceServerCapabilities, workspaceFolders, fileOperations) +}; +MAKE_REFLECT_STRUCT(WorkspaceServerCapabilities, workspaceFolders, fileOperations) +MAKE_REFLECT_STRUCT(WorkspaceServerCapabilities::lsFileOperations, didCreate, willCreate, didRename, willRename, didDelete, willDelete) + +// + // Semantic highlighting server capabilities. + // + //

+ // Note: the {@code textDocument/semanticHighlighting} + // language feature is not yet part of the official LSP specification. + // + +struct SemanticHighlightingServerCapabilities { + // + // A "lookup table" of semantic highlighting TextMate scopes + // supported by the language server. If not defined or empty, then the server does not support the semantic highlighting + // feature. Otherwise, clients should reuse this "lookup table" when receiving semantic highlighting notifications from + // the server. + // + std::vector< std::vector > scopes; + MAKE_SWAP_METHOD(SemanticHighlightingServerCapabilities, scopes) +}; +MAKE_REFLECT_STRUCT(SemanticHighlightingServerCapabilities, scopes) + +struct SemanticTokensServerFull +{ + // + // The server supports deltas for full documents. + // + bool delta =false; + MAKE_SWAP_METHOD(SemanticTokensServerFull, delta) +}; +MAKE_REFLECT_STRUCT(SemanticTokensServerFull, delta) +struct SemanticTokensWithRegistrationOptions +{ + SemanticTokensLegend legend; + + // + // Server supports providing semantic tokens for a specific range + // of a document. + // + boost::optional< std::pair< boost::optional, boost::optional > > range; + + // + // Server supports providing semantic tokens for a full document. + // + boost::optional< std::pair< boost::optional, + boost::optional > > full; + + // + // A document selector to identify the scope of the registration. If set to null + // the document selector provided on the client side will be used. + // + boost::optional < std::vector > documentSelector; + // + // The id used to register the request. The id can be used to deregister + // the request again. See also Registration#id. + // + boost::optional id; + MAKE_SWAP_METHOD(SemanticTokensWithRegistrationOptions, legend, range, full, documentSelector, id) +}; +MAKE_REFLECT_STRUCT(SemanticTokensWithRegistrationOptions, legend, range, full, documentSelector ,id) + +using DocumentColorOptions = WorkDoneProgressOptions; +using FoldingRangeOptions = WorkDoneProgressOptions; +struct lsServerCapabilities { + // Defines how text documents are synced. Is either a detailed structure + // defining each notification or for backwards compatibility the + + // TextDocumentSyncKind number. + boost::optional< std::pair, + boost::optional >> textDocumentSync; + + // The server provides hover support. + boost::optional hoverProvider; + + // The server provides completion support. + boost::optional < lsCompletionOptions > completionProvider; + + // The server provides signature help support. + boost::optional < lsSignatureHelpOptions > signatureHelpProvider; + + // The server provides goto definition support. + boost::optional< std::pair< boost::optional, boost::optional > > definitionProvider; + + + // + // The server provides Goto Type Definition support. + // + // Since 3.6.0 + // + boost::optional< std::pair< boost::optional, boost::optional > > typeDefinitionProvider ; + + // The server provides implementation support. + boost::optional< std::pair< boost::optional, boost::optional > > implementationProvider ; + + // The server provides find references support. + boost::optional< std::pair< boost::optional, boost::optional > > referencesProvider ; + + // The server provides document highlight support. + boost::optional< std::pair< boost::optional, boost::optional > > documentHighlightProvider ; + + // The server provides document symbol support. + boost::optional< std::pair< boost::optional, boost::optional > > documentSymbolProvider ; + + // The server provides workspace symbol support. + boost::optional< std::pair< boost::optional, boost::optional > > workspaceSymbolProvider ; + + // The server provides code actions. + boost::optional< std::pair< boost::optional, boost::optional > > codeActionProvider ; + + // The server provides code lens. + boost::optional codeLensProvider; + + // The server provides document formatting. + boost::optional< std::pair< boost::optional, boost::optional > > documentFormattingProvider ; + + // The server provides document range formatting. + boost::optional< std::pair< boost::optional, boost::optional > > documentRangeFormattingProvider ; + + // The server provides document formatting on typing. + boost::optional documentOnTypeFormattingProvider; + + // The server provides rename support. + boost::optional< std::pair< boost::optional, boost::optional > > renameProvider; + + + // The server provides document link support. + boost::optional documentLinkProvider; + + + // + // The server provides color provider support. + // + // @since 3.6.0 + // + boost::optional< std::pair< boost::optional, boost::optional > > colorProvider; + + + // + // The server provides folding provider support. + // + // @since 3.10.0 + // + boost::optional < std::pair< boost::optional, boost::optional > > foldingRangeProvider; + + // The server provides execute command support. + boost::optional < lsExecuteCommandOptions >executeCommandProvider; + + + // + // Workspace specific server capabilities + // + boost::optional< WorkspaceServerCapabilities > workspace; + + // + // Semantic highlighting server capabilities. + // + + boost::optional< SemanticHighlightingServerCapabilities >semanticHighlighting; + + // + // Server capability for calculating super- and subtype hierarchies. + // The LS supports the type hierarchy language feature, if this capability is set to {@code true}. + // + //

+ // Note: the {@code textDocument/typeHierarchy} + // language feature is not yet part of the official LSP specification. + // + + boost::optional< std::pair< boost::optional, + boost::optional > > typeHierarchyProvider; + + // + // The server provides Call Hierarchy support. + // + + boost::optional< std::pair< boost::optional, + boost::optional > > callHierarchyProvider; + + // + // The server provides selection range support. + // + // Since 3.15.0 + // + boost::optional< std::pair< boost::optional, + boost::optional > > selectionRangeProvider; + + // + // The server provides linked editing range support. + // + // Since 3.16.0 + // + boost::optional< std::pair< boost::optional, + boost::optional > > linkedEditingRangeProvider; + + + // + // The server provides semantic tokens support. + // + // Since 3.16.0 + // + boost::optional < SemanticTokensWithRegistrationOptions> semanticTokensProvider; + + // + // Whether server provides moniker support. + // + // Since 3.16.0 + // + boost::optional< std::pair< boost::optional, + boost::optional > > monikerProvider; + + boost::optional experimental; + + + MAKE_SWAP_METHOD(lsServerCapabilities, + textDocumentSync, + hoverProvider, + completionProvider, + signatureHelpProvider, + definitionProvider, + typeDefinitionProvider, + implementationProvider, + referencesProvider, + documentHighlightProvider, + documentSymbolProvider, + workspaceSymbolProvider, + codeActionProvider, + codeLensProvider, + documentFormattingProvider, + documentRangeFormattingProvider, + documentOnTypeFormattingProvider, + renameProvider, + documentLinkProvider, + executeCommandProvider, + workspace, + semanticHighlighting, + typeHierarchyProvider, + callHierarchyProvider, + selectionRangeProvider, + experimental, colorProvider, foldingRangeProvider, + linkedEditingRangeProvider, monikerProvider, semanticTokensProvider) + +}; +MAKE_REFLECT_STRUCT(lsServerCapabilities, + textDocumentSync, + hoverProvider, + completionProvider, + signatureHelpProvider, + definitionProvider, + typeDefinitionProvider, + implementationProvider, + referencesProvider, + documentHighlightProvider, + documentSymbolProvider, + workspaceSymbolProvider, + codeActionProvider, + codeLensProvider, + documentFormattingProvider, + documentRangeFormattingProvider, + documentOnTypeFormattingProvider, + renameProvider, + documentLinkProvider, + executeCommandProvider, + workspace, + semanticHighlighting, + typeHierarchyProvider, + callHierarchyProvider, + selectionRangeProvider, + experimental, colorProvider, foldingRangeProvider, + linkedEditingRangeProvider, monikerProvider, semanticTokensProvider) diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/general/lsTextDocumentClientCapabilities.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/general/lsTextDocumentClientCapabilities.h new file mode 100644 index 0000000000..569f203c7a --- /dev/null +++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/general/lsTextDocumentClientCapabilities.h @@ -0,0 +1,713 @@ +#pragma once +#include "LibLsp/lsp/method_type.h" + + +#include +#include "LibLsp/JsonRpc/message.h" +#include "LibLsp/lsp/lsDocumentUri.h" +#include "LibLsp/lsp/lsAny.h" +#include "LibLsp/lsp/extention/jdtls/searchSymbols.h" +#include "lsWorkspaceClientCapabilites.h" +#include "LibLsp/lsp/lsp_completion.h" +#include "LibLsp/lsp/lsp_diagnostic.h" + + +struct WorkDoneProgressOptions +{ + boost::optionalworkDoneProgress; + MAKE_SWAP_METHOD(WorkDoneProgressOptions, workDoneProgress); +}; +MAKE_REFLECT_STRUCT(WorkDoneProgressOptions, workDoneProgress); + +// Completion options. +struct lsCompletionOptions:WorkDoneProgressOptions +{ + // The server provides support to resolve additional + // information for a completion item. + boost::optional resolveProvider = false; + + // + // Most tools trigger completion request automatically without explicitly requesting + // it using a keyboard shortcut (e.g. Ctrl+Space). Typically they do so when the user + // starts to type an identifier. For example if the user types `c` in a JavaScript file + // code complete will automatically pop up present `console` besides others as a + // completion item. Characters that make up identifiers don't need to be listed here. + // + // If code complete should automatically be trigger on characters not being valid inside + // an identifier (for example `.` in JavaScript) list them in `triggerCharacters`. + // + // https://github.com/Microsoft/language-server-protocol/issues/138. + boost::optional< std::vector > triggerCharacters ; + + // + // The list of all possible characters that commit a completion. This field can be used + // if clients don't support individual commmit characters per completion item. See + // `ClientCapabilities.textDocument.completion.completionItem.commitCharactersSupport` + // + boost::optional< std::vector > allCommitCharacters; + + MAKE_SWAP_METHOD(lsCompletionOptions, workDoneProgress, resolveProvider, triggerCharacters, allCommitCharacters); +}; +MAKE_REFLECT_STRUCT(lsCompletionOptions, workDoneProgress, resolveProvider, triggerCharacters,allCommitCharacters); + + + +// Save options. +struct lsSaveOptions { + // The client is supposed to include the content on save. + bool includeText = false; + void swap(lsSaveOptions& arg)noexcept + { + auto temp = includeText; + includeText = arg.includeText; + arg.includeText = temp; + } +}; +MAKE_REFLECT_STRUCT(lsSaveOptions, includeText); + +// Signature help options. +struct lsSignatureHelpOptions : WorkDoneProgressOptions { + // The characters that trigger signature help automatically. + // NOTE: If updating signature help tokens make sure to also update + // WorkingFile::FindClosestCallNameInBuffer. + std::vector triggerCharacters; + MAKE_SWAP_METHOD(lsSignatureHelpOptions, workDoneProgress, triggerCharacters); +}; +MAKE_REFLECT_STRUCT(lsSignatureHelpOptions, workDoneProgress, triggerCharacters); + +// Defines how the host (editor) should sync document changes to the language +// server. +enum class lsTextDocumentSyncKind { + // Documents should not be synced at all. + None = 0, + + // Documents are synced by always sending the full content + // of the document. + Full = 1, + + // Documents are synced by sending the full content on open. + // After that only incremental updates to the document are + // send. + Incremental = 2 +}; + +#if _WIN32 +MAKE_REFLECT_TYPE_PROXY(lsTextDocumentSyncKind) +#else +//#pragma clang diagnostic push +//#pragma clang diagnostic ignored "-Wunused-function" +MAKE_REFLECT_TYPE_PROXY(lsTextDocumentSyncKind) +//#pragma clang diagnostic pop +#endif + +struct lsTextDocumentSyncOptions { + // Open and close notifications are sent to the server. + boost::optional openClose ; + // Change notificatins are sent to the server. See TextDocumentSyncKind.None, + // TextDocumentSyncKind.Full and TextDocumentSyncKindIncremental. + boost::optional< lsTextDocumentSyncKind> change ; + // Will save notifications are sent to the server. + boost::optional willSave; + // Will save wait until requests are sent to the server. + boost::optional willSaveWaitUntil; + // Save notifications are sent to the server. + boost::optional save; + + MAKE_SWAP_METHOD(lsTextDocumentSyncOptions, + openClose, + change, + willSave, + willSaveWaitUntil, + save); +}; +MAKE_REFLECT_STRUCT(lsTextDocumentSyncOptions, + openClose, + change, + willSave, + willSaveWaitUntil, + save); + +struct SynchronizationCapabilities { + // Whether text document synchronization supports dynamic registration. + boost::optional dynamicRegistration; + + // The client supports sending will save notifications. + boost::optional willSave; + + // The client supports sending a will save request and + // waits for a response providing text edits which will + // be applied to the document before it is saved. + boost::optional willSaveWaitUntil; + + // The client supports did save notifications. + boost::optional didSave; + + MAKE_SWAP_METHOD(SynchronizationCapabilities, + dynamicRegistration, + willSave, + willSaveWaitUntil, + didSave); +}; +MAKE_REFLECT_STRUCT(SynchronizationCapabilities, + dynamicRegistration, + willSave, + willSaveWaitUntil, + didSave); + +struct CompletionItemKindCapabilities +{ + boost::optional >valueSet; + MAKE_SWAP_METHOD(CompletionItemKindCapabilities, valueSet); +}; +MAKE_REFLECT_STRUCT(CompletionItemKindCapabilities, valueSet); + +struct CompletionItemCapabilities { + // Client supports snippets as insert text. + // + // A snippet can define tab stops and placeholders with `$1`, `$2` + // and `${3:foo}`. `$0` defines the final tab stop, it defaults to + // the end of the snippet. Placeholders with equal identifiers are linked, + // that is typing in one will update others too. + boost::optional snippetSupport; + + // Client supports commit characters on a completion item. + + boost::optional commitCharactersSupport; + + + // Client supports the following content formats for the documentation + // property. The order describes the preferred format of the client. + + boost::optional< std::vector > documentationFormat; + + // Client supports the deprecated property on a completion item. + + boost::optional deprecatedSupport; + + // + // Client supports the preselect property on a completion item. + // + boost::optional preselectSupport; + + MAKE_SWAP_METHOD(CompletionItemCapabilities, + snippetSupport, + commitCharactersSupport, + documentationFormat, + deprecatedSupport, preselectSupport); +}; +MAKE_REFLECT_STRUCT(CompletionItemCapabilities, + snippetSupport, + commitCharactersSupport, + documentationFormat, + deprecatedSupport, preselectSupport); + + +// + // Capabilities specific to the `textDocument/completion` + // +struct CompletionCapabilities { + // Whether completion supports dynamic registration. + boost::optional dynamicRegistration; + + + + // The client supports the following `CompletionItem` specific + // capabilities. + boost::optional completionItem; + + // + // The client supports the following `CompletionItemKind` specific + // capabilities. + // + boost::optional completionItemKind; + + // + // The client supports sending additional context information for a + // `textDocument/completion` request. + // + boost::optional contextSupport; + + + MAKE_SWAP_METHOD(CompletionCapabilities, + dynamicRegistration, + completionItem, completionItemKind); +}; + +MAKE_REFLECT_STRUCT(CompletionCapabilities, + dynamicRegistration, + completionItem , completionItemKind); + + +struct HoverCapabilities:public DynamicRegistrationCapabilities +{ + // + // Client supports the following content formats for the content + // property. The order describes the preferred format of the client. + // + // See {@link MarkupKind} for allowed values. + // + boost::optional> contentFormat; + + MAKE_SWAP_METHOD(HoverCapabilities, dynamicRegistration, contentFormat); +}; +MAKE_REFLECT_STRUCT(HoverCapabilities, dynamicRegistration, contentFormat); + +// + // Client capabilities specific to parameter information. + // +struct ParameterInformationCapabilities { + // + // The client supports processing label offsets instead of a + // simple label string. + // + // Since 3.14.0 + // + boost::optional labelOffsetSupport; + + MAKE_SWAP_METHOD(ParameterInformationCapabilities, labelOffsetSupport); +}; +MAKE_REFLECT_STRUCT(ParameterInformationCapabilities, labelOffsetSupport) + + +struct SignatureInformationCapabilities { + // + // Client supports the following content formats for the documentation + // property. The order describes the preferred format of the client. + // + // See {@link MarkupKind} for allowed values. + // + std::vector documentationFormat; + + // + // Client capabilities specific to parameter information. + // + ParameterInformationCapabilities parameterInformation; + + MAKE_SWAP_METHOD(SignatureInformationCapabilities, documentationFormat, parameterInformation) +}; +MAKE_REFLECT_STRUCT(SignatureInformationCapabilities,documentationFormat, parameterInformation) + +struct SignatureHelpCapabilities :public DynamicRegistrationCapabilities +{ + // + // The client supports the following `SignatureInformation` + // specific properties. + // + boost::optional< SignatureInformationCapabilities > signatureInformation; + + MAKE_SWAP_METHOD(SignatureHelpCapabilities, dynamicRegistration, signatureInformation) +}; +MAKE_REFLECT_STRUCT(SignatureHelpCapabilities, dynamicRegistration, signatureInformation) + +struct DocumentSymbolCapabilities :public DynamicRegistrationCapabilities { + // + // Specific capabilities for the `SymbolKind`. + // + boost::optional symbolKind; + + // + // The client support hierarchical document symbols. + // + boost::optional hierarchicalDocumentSymbolSupport; + + MAKE_SWAP_METHOD(DocumentSymbolCapabilities, dynamicRegistration, symbolKind, hierarchicalDocumentSymbolSupport) +}; +MAKE_REFLECT_STRUCT(DocumentSymbolCapabilities, dynamicRegistration, symbolKind, hierarchicalDocumentSymbolSupport) + +struct DeclarationCapabilities:public DynamicRegistrationCapabilities{ + // + // The client supports additional metadata in the form of declaration links. + // + boost::optionallinkSupport; + + MAKE_SWAP_METHOD(DeclarationCapabilities, dynamicRegistration, linkSupport); +}; +MAKE_REFLECT_STRUCT(DeclarationCapabilities, dynamicRegistration, linkSupport) + + +struct CodeActionKindCapabilities +{ + // + // The code action kind values the client supports. When this + // property exists the client also guarantees that it will + // handle values outside its set gracefully and falls back + // to a default value when unknown. + // + // See {@link CodeActionKind} for allowed values. + // + boost::optional< std::vector< std::string> >valueSet; + + MAKE_SWAP_METHOD(CodeActionKindCapabilities, valueSet) +}; +MAKE_REFLECT_STRUCT(CodeActionKindCapabilities,valueSet) + +struct CodeActionLiteralSupportCapabilities +{ + boost::optional codeActionKind; + + MAKE_SWAP_METHOD(CodeActionLiteralSupportCapabilities, codeActionKind) +}; +MAKE_REFLECT_STRUCT(CodeActionLiteralSupportCapabilities, codeActionKind) + +struct CodeActionCapabilities:public DynamicRegistrationCapabilities{ + // + // The client support code action literals as a valid + // response of the `textDocument/codeAction` request. + // + boost::optional codeActionLiteralSupport; + + MAKE_SWAP_METHOD(CodeActionCapabilities, dynamicRegistration, codeActionLiteralSupport) +}; +MAKE_REFLECT_STRUCT(CodeActionCapabilities,dynamicRegistration,codeActionLiteralSupport) + +struct RenameCapabilities :public DynamicRegistrationCapabilities { + // + // The client support code action literals as a valid + // response of the `textDocument/codeAction` request. + // + boost::optional prepareSupport; + + MAKE_SWAP_METHOD(RenameCapabilities, dynamicRegistration, prepareSupport) +}; +MAKE_REFLECT_STRUCT(RenameCapabilities, dynamicRegistration, prepareSupport) + +struct DiagnosticsTagSupport { + /** + * The tags supported by the client. + */ + std::vector valueSet; + MAKE_SWAP_METHOD(DiagnosticsTagSupport, valueSet) +}; +MAKE_REFLECT_STRUCT(DiagnosticsTagSupport, valueSet) + +struct PublishDiagnosticsClientCapabilities :public DynamicRegistrationCapabilities { + /** + * The client support code action literals as a valid + * response of the `textDocument/codeAction` request. + */ + boost::optional relatedInformation; + + /** + * Client supports the tag property to provide meta data about a diagnostic. + * Clients supporting tags have to handle unknown tags gracefully. + * + * This property had been added and implemented as boolean before it was + * added to the specification as {@link DiagnosticsTagSupport}. In order to + * keep this implementation compatible with intermediate clients (including + * vscode-language-client < 6.0.0) we add an either type here. + * + * Since 3.15 + */ + boost::optional < std::pair, boost::optional > > tagSupport; + + /** + * Whether the client interprets the version property of the + * `textDocument/publishDiagnostics` notification's parameter. + * + * Since 3.15.0 + */ + boost::optional versionSupport; + + /** + * Client supports a codeDescription property + * + * @since 3.16.0 + */ + boost::optional codeDescriptionSupport ; + + /** + * Whether code action supports the `data` property which is + * preserved between a `textDocument/publishDiagnostics` and + * `textDocument/codeAction` request. + * + * @since 3.16.0 + */ + boost::optional dataSupport ; + + + MAKE_SWAP_METHOD(PublishDiagnosticsClientCapabilities, dynamicRegistration, relatedInformation, tagSupport,versionSupport,codeDescriptionSupport,dataSupport) +}; +MAKE_REFLECT_STRUCT(PublishDiagnosticsClientCapabilities, dynamicRegistration, relatedInformation, tagSupport, versionSupport, codeDescriptionSupport, dataSupport) + + +struct FoldingRangeCapabilities :public DynamicRegistrationCapabilities { + // + // The maximum number of folding ranges that the client prefers to receive per document. The value serves as a + // hint, servers are free to follow the limit. + // + boost::optional rangeLimit; + + // + // If set, the client signals that it only supports folding complete lines. If set, client will + // ignore specified `startCharacter` and `endCharacter` properties in a FoldingRange. + // + boost::optional lineFoldingOnly; + MAKE_SWAP_METHOD(FoldingRangeCapabilities, dynamicRegistration, rangeLimit, lineFoldingOnly) +}; +MAKE_REFLECT_STRUCT(FoldingRangeCapabilities, dynamicRegistration, rangeLimit,lineFoldingOnly) + + +struct SemanticHighlightingCapabilities :public DynamicRegistrationCapabilities { + // + // The client support code action literals as a valid + // response of the `textDocument/codeAction` request. + // + boost::optional semanticHighlighting; + + MAKE_SWAP_METHOD(SemanticHighlightingCapabilities, dynamicRegistration, semanticHighlighting) +}; +MAKE_REFLECT_STRUCT(SemanticHighlightingCapabilities, dynamicRegistration, semanticHighlighting) + +struct SemanticTokensClientCapabilitiesRequestsFull { + + // + // The client will send the `textDocument/semanticTokens/full/delta` request if + // the server provides a corresponding handler. + // + bool delta = false; + MAKE_SWAP_METHOD(SemanticTokensClientCapabilitiesRequestsFull, delta) +}; +MAKE_REFLECT_STRUCT(SemanticTokensClientCapabilitiesRequestsFull, delta) + +struct SemanticTokensClientCapabilities : public DynamicRegistrationCapabilities +{ + //export TokenFormat = 'relative'; + struct lsRequests + { + // + // The client will send the `textDocument/semanticTokens/range` request + // if the server provides a corresponding handler. + // + boost::optional, + boost::optional>> range; + // + // The client will send the `textDocument/semanticTokens/full` request + // if the server provides a corresponding handler. + // + boost::optional, boost::optional>> full; + MAKE_SWAP_METHOD(lsRequests, range, full) + }; + + lsRequests requests; + // + // The token types that the client supports. + // + std::vector tokenTypes; + + // + // The token modifiers that the client supports. + // + std::vector tokenModifiers; + // + // The formats the clients supports. + // + std::vector formats; + // + // Whether the client supports tokens that can overlap each other. + // + boost::optional < bool >overlappingTokenSupport; + + // + // Whether the client supports tokens that can span multiple lines. + // + boost::optional < bool > multilineTokenSupport; + + MAKE_SWAP_METHOD(SemanticTokensClientCapabilities, dynamicRegistration,requests, tokenTypes, tokenModifiers, + formats, overlappingTokenSupport, multilineTokenSupport) + +}; +MAKE_REFLECT_STRUCT(SemanticTokensClientCapabilities::lsRequests, range,full) +MAKE_REFLECT_STRUCT(SemanticTokensClientCapabilities, dynamicRegistration, requests, tokenTypes, tokenModifiers, + formats, overlappingTokenSupport, multilineTokenSupport) + +// Text document specific client capabilities. +struct lsTextDocumentClientCapabilities { + + SynchronizationCapabilities synchronization; + + + // Capabilities specific to the `textDocument/completion` + boost::optional completion; + + + + // Capabilities specific to the `textDocument/hover` + boost::optional hover; + + // Capabilities specific to the `textDocument/signatureHelp` + boost::optional signatureHelp; + + // Capabilities specific to the `textDocument/references` + boost::optional references; + + + + + + // Capabilities specific to the `textDocument/documentHighlight` + boost::optional documentHighlight; + + // Capabilities specific to the `textDocument/documentSymbol` + boost::optional documentSymbol; + + // Capabilities specific to the `textDocument/formatting` + boost::optional formatting; + + // Capabilities specific to the `textDocument/rangeFormatting` + boost::optional rangeFormatting; + + // Capabilities specific to the `textDocument/onTypeFormatting` + boost::optional onTypeFormatting; + + + // + // Capabilities specific to the `textDocument/declaration` + // + // Since 3.14.0 + // + boost::optional< DeclarationCapabilities> declaration; + + + typedef DeclarationCapabilities DefinitionCapabilities; + // Capabilities specific to the `textDocument/definition` + boost::optional definition; + + + + // +// Capabilities specific to the `textDocument/typeDefinition` +// +// Since 3.6.0 +// + typedef DeclarationCapabilities TypeDefinitionCapabilities; + boost::optional typeDefinition; + + + typedef DeclarationCapabilities ImplementationCapabilities; + // Capabilities specific to the `textDocument/implementation` + boost::optional implementation; + + + // Capabilities specific to the `textDocument/codeAction` + boost::optional codeAction; + + + // Capabilities specific to the `textDocument/codeLens` + boost::optional codeLens; + + // Capabilities specific to the `textDocument/documentLink` + boost::optional documentLink; + + // + // Capabilities specific to the `textDocument/documentColor` and the + // `textDocument/colorPresentation` request. + // + // Since 3.6.0 + // + boost::optional colorProvider; + + // Capabilities specific to the `textDocument/rename` + boost::optional rename; + +// +// Capabilities specific to `textDocument/publishDiagnostics`. +// + boost::optional publishDiagnostics; + + // +// Capabilities specific to `textDocument/foldingRange` requests. +// +// Since 3.10.0 +// + boost::optional< FoldingRangeCapabilities > foldingRange; + + + // + // Capabilities specific to {@code textDocument/semanticHighlighting}. + // + boost::optional< SemanticHighlightingCapabilities > semanticHighlightingCapabilities; + + // + // Capabilities specific to {@code textDocument/typeHierarchy}. + // + boost::optional< DynamicRegistrationCapabilities > typeHierarchyCapabilities; + + + + // +// Capabilities specific to `textDocument/selectionRange` requests +// + + boost::optional< DynamicRegistrationCapabilities > selectionRange; + + // + // Capabilities specific to the `textDocument/linkedEditingRange` request. + // + // @since 3.16.0 + // + boost::optional< DynamicRegistrationCapabilities > linkedEditingRange; + + // + // Capabilities specific to the various call hierarchy requests. + // + // @since 3.16.0 + // + boost::optional< DynamicRegistrationCapabilities > callHierarchy; + + // + // Capabilities specific to the various semantic token requests. + // + // @since 3.16.0 + // + boost::optional< SemanticTokensClientCapabilities > semanticTokens; + + // + // Capabilities specific to the `textDocument/moniker` request. + // + // @since 3.16.0 + // + boost::optional< DynamicRegistrationCapabilities > moniker; + + MAKE_SWAP_METHOD(lsTextDocumentClientCapabilities, + synchronization, + completion, + hover, + signatureHelp, + implementation, + references, + documentHighlight, + documentSymbol, + formatting, + rangeFormatting, + onTypeFormatting, + declaration, + definition, typeDefinition, implementation, + codeAction, + codeLens, + documentLink, colorProvider, + rename, publishDiagnostics, foldingRange, + semanticHighlightingCapabilities, typeHierarchyCapabilities, + callHierarchy, selectionRange , linkedEditingRange, semanticTokens, moniker) +}; + + +MAKE_REFLECT_STRUCT(lsTextDocumentClientCapabilities, + synchronization, + completion, + hover, + signatureHelp, + implementation, + references, + documentHighlight, + documentSymbol, + formatting, + rangeFormatting, + onTypeFormatting, + declaration, + definition, typeDefinition, implementation, + codeAction, + codeLens, + documentLink, colorProvider, + rename, publishDiagnostics, foldingRange, + semanticHighlightingCapabilities, typeHierarchyCapabilities, + callHierarchy, selectionRange, linkedEditingRange, semanticTokens, moniker) diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/general/lsWorkspaceClientCapabilites.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/general/lsWorkspaceClientCapabilites.h new file mode 100644 index 0000000000..dd37a1af2f --- /dev/null +++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/general/lsWorkspaceClientCapabilites.h @@ -0,0 +1,256 @@ +#pragma once +#include "LibLsp/lsp/method_type.h" + + +#include + +#include "LibLsp/JsonRpc/message.h" +#include "LibLsp/lsp/lsDocumentUri.h" +#include "LibLsp/lsp/lsAny.h" +#include "LibLsp/lsp/extention/jdtls/searchSymbols.h" + +/** + * Capabilities specific to `WorkspaceEdit`s + */ + +//New in version 3.13: ResourceOperationKind and FailureHandlingKind and the client capability workspace.workspaceEdit. +//resourceOperations as well as workspace.workspaceEdit.failureHandling. + +//The capabilities of a workspace edit has evolved over the time. +//Clients can describe their support using the following client capability : + +struct lschangeAnnotationSupport +{ + /** + * Whether the client groups edits with equal labels into tree nodes, + * for instance all edits labelled with "Changes in Strings" would + * be a tree node. + */ + boost::optional groupsOnLabel; + MAKE_SWAP_METHOD(lschangeAnnotationSupport, groupsOnLabel) +}; +MAKE_REFLECT_STRUCT(lschangeAnnotationSupport, groupsOnLabel) + +struct WorkspaceEditCapabilities { + /** + * The client supports versioned document changes in `WorkspaceEdit`s + */ + boost::optional documentChanges; + + /** + * The client supports resource changes + * in `WorkspaceEdit`s. + * + * @deprecated Since LSP introduces resource operations, use {link #resourceOperations} + */ + + boost::optional resourceChanges; + + /** + * The resource operations the client supports. Clients should at least + * support 'create', 'rename' and 'delete' files and folders. + * + * @since 3.13.0 + */ + boost::optional< std::vector > resourceOperations; + + /** + * The failure handling strategy of a client if applying the workspace edit + * fails. + * + * See {@link FailureHandlingKind} for allowed values. + */ + boost::optional failureHandling; + + /** + * Whether the client normalizes line endings to the client specific + * setting. + * If set to `true` the client will normalize line ending characters + * in a workspace edit to the client specific new line character(s). + * + * @since 3.16.0 + */ + boost::optional normalizesLineEndings;; + + /** + * Whether the client in general supports change annotations on text edits, + * create file, rename file and delete file changes. + * + * @since 3.16.0 + */ + boost::optional changeAnnotationSupport; + + MAKE_SWAP_METHOD(WorkspaceEditCapabilities, documentChanges, resourceChanges, resourceOperations, failureHandling, normalizesLineEndings, changeAnnotationSupport) + +}; +MAKE_REFLECT_STRUCT(WorkspaceEditCapabilities,documentChanges, resourceChanges, resourceOperations, failureHandling, normalizesLineEndings, changeAnnotationSupport) + + +struct DynamicRegistrationCapabilities { + // Did foo notification supports dynamic registration. + boost::optional dynamicRegistration; + + MAKE_SWAP_METHOD(DynamicRegistrationCapabilities, + dynamicRegistration); +}; + +MAKE_REFLECT_STRUCT(DynamicRegistrationCapabilities, + dynamicRegistration); + + + +// Workspace specific client capabilities. +struct SymbolKindCapabilities +{ + boost::optional< std::vector > valueSet; + + MAKE_SWAP_METHOD(SymbolKindCapabilities, valueSet) + + +}; +MAKE_REFLECT_STRUCT(SymbolKindCapabilities, valueSet) + + + + +struct SymbolCapabilities :public DynamicRegistrationCapabilities { + /** + * Specific capabilities for the `SymbolKind` in the `workspace/symbol` request. + */ + boost::optional symbolKind; + + MAKE_SWAP_METHOD(SymbolCapabilities, + symbolKind, dynamicRegistration) +}; +MAKE_REFLECT_STRUCT(SymbolCapabilities, + symbolKind, dynamicRegistration) + + +struct lsFileOperations +{ + /** + * Whether the client supports dynamic registration for file + * requests/notifications. + */ + boost::optional dynamicRegistration ; + + /** + * The client has support for sending didCreateFiles notifications. + */ + boost::optionaldidCreate ; + + /** + * The client has support for sending willCreateFiles requests. + */ + boost::optionalwillCreate ; + + /** + * The client has support for sending didRenameFiles notifications. + */ + boost::optionaldidRename ; + + /** + * The client has support for sending willRenameFiles requests. + */ + boost::optionalwillRename ; + + /** + * The client has support for sending didDeleteFiles notifications. + */ + boost::optionaldidDelete ; + + /** + * The client has support for sending willDeleteFiles requests. + */ + boost::optional willDelete ; + MAKE_SWAP_METHOD(lsFileOperations, dynamicRegistration, didCreate, willCreate, + didRename, willRename, didDelete, willDelete) +}; +MAKE_REFLECT_STRUCT(lsFileOperations, dynamicRegistration, didCreate, willCreate, + didRename, willRename, didDelete, willDelete) + +struct lsWorkspaceClientCapabilites { + // The client supports applying batch edits to the workspace. + boost::optional applyEdit; + + + + // Capabilities specific to `WorkspaceEdit`s + boost::optional workspaceEdit; + + + + // Capabilities specific to the `workspace/didChangeConfiguration` + // notification. + boost::optional didChangeConfiguration; + + // Capabilities specific to the `workspace/didChangeWatchedFiles` + // notification. + boost::optional didChangeWatchedFiles; + + // Capabilities specific to the `workspace/symbol` request. + boost::optional symbol; + + // Capabilities specific to the `workspace/executeCommand` request. + boost::optional executeCommand; + + + /** + * The client has support for workspace folders. + * + * Since 3.6.0 + */ + boost::optional workspaceFolders; + + /** + * The client supports `workspace/configuration` requests. + * + * Since 3.6.0 + */ + boost::optional configuration; + + + /** + * Capabilities specific to the semantic token requests scoped to the + * workspace. + * + * @since 3.16.0 + */ + boost::optional semanticTokens ; + + /** + * Capabilities specific to the code lens requests scoped to the + * workspace. + * + * @since 3.16.0 + */ + boost::optional codeLens ; + + /** + * The client has support for file requests/notifications. + * + * @since 3.16.0 + */ + boost::optional fileOperations; + + MAKE_SWAP_METHOD(lsWorkspaceClientCapabilites, + applyEdit, + workspaceEdit, + didChangeConfiguration, + didChangeWatchedFiles, + symbol,executeCommand, workspaceFolders, + configuration, semanticTokens, codeLens, fileOperations) +}; + +MAKE_REFLECT_STRUCT(lsWorkspaceClientCapabilites, + applyEdit, + workspaceEdit, + didChangeConfiguration, + didChangeWatchedFiles, + symbol, + executeCommand,workspaceFolders, + configuration, semanticTokens, codeLens, fileOperations) + + + + diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/general/progress.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/general/progress.h new file mode 100644 index 0000000000..01cb18d68d --- /dev/null +++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/general/progress.h @@ -0,0 +1,16 @@ +#pragma once + +#include "LibLsp/JsonRpc/NotificationInMessage.h" +#include "LibLsp/lsp/lsAny.h" +//The base protocol offers also support to report progress in a generic fashion. +//This mechanism can be used to report any kind of progress including work done +//progress(usually used to report progress in the user interface using a progress bar) +//and partial result progress to support streaming of results. +struct ProgressParams +{ + std::pair , boost::optional > token; + lsp::Any value; + MAKE_SWAP_METHOD(ProgressParams, token, value) +}; +MAKE_REFLECT_STRUCT(ProgressParams, token, value) +DEFINE_NOTIFICATION_TYPE(Notify_Progress, ProgressParams, "$/progress"); diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/general/shutdown.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/general/shutdown.h new file mode 100644 index 0000000000..5366ff89d6 --- /dev/null +++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/general/shutdown.h @@ -0,0 +1,15 @@ +#pragma once + + +#include "LibLsp/JsonRpc/lsResponseMessage.h" +#include "LibLsp/JsonRpc/RequestInMessage.h" + +/** + * The shutdown request is sent from the client to the server. It asks the + * server to shutdown, but to not exit (otherwise the response might not be + * delivered correctly to the client). There is a separate exit notification + * that asks the server to exit. + */ + +DEFINE_REQUEST_RESPONSE_TYPE(td_shutdown, boost::optional, boost::optional, "shutdown"); + diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/language/language.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/language/language.h new file mode 100644 index 0000000000..b4c7829e95 --- /dev/null +++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/language/language.h @@ -0,0 +1,170 @@ +#pragma once + +#include "LibLsp/JsonRpc/RequestInMessage.h" +#include "LibLsp/JsonRpc/NotificationInMessage.h" + +#include "LibLsp/lsp/lsDocumentUri.h" +#include "LibLsp/lsp/lsCommand.h" + +#ifdef _WIN32 +#include +#endif + +struct StatusReport { + + std::string ToString() const + { + std::string info; + info += "type:" + type + "\n"; + info += "message:" + message + "\n"; + return info; + } + /** + * The message type. See { + * + */ + + std::string type; + /** + * The actual message + * + */ + + std::string message; + MAKE_SWAP_METHOD(StatusReport, type, message); +}; +MAKE_REFLECT_STRUCT(StatusReport, type, message); + +/** + * The show message notification is sent from a server to a client to ask + * the client to display a particular message in the user interface. + */ +DEFINE_NOTIFICATION_TYPE(lang_status, StatusReport, "language/status"); + + +enum class MessageType { + + /** + * An error message. + */ + Error=(1), + + /** + * A warning message. + */ + Warning=(2), + + /** + * An information message. + */ + Info=(3), + + /** + * A log message. + */ + Log=(4) +}; +MAKE_REFLECT_TYPE_PROXY(MessageType); + + +struct ActionableNotification { + + + + /** + * The message type. See { + * + */ + + MessageType severity; + /** + * The actual message + * + */ + + std::string message; + + /** + * Optional data + * + */ + + boost::optional data; + + + /** + * Optional commands + * + */ + + std::vector commands; + + MAKE_SWAP_METHOD(ActionableNotification, severity, message, data, commands) +}; +MAKE_REFLECT_STRUCT(ActionableNotification, severity, message, data, commands) + + +/** + * The actionable notification is sent from a server to a client to ask the + * client to display a particular message in the user interface, and possible + * commands to execute. The commands must be implemented on the client side. + */ +DEFINE_NOTIFICATION_TYPE(lang_actionableNotification, ActionableNotification, "language/actionableNotification"); + + + +struct ProgressReport { + std::string ToString() const; + + std::string id; + + + std::string task; + + + std::string subTask; + + + std::string status; + + int totalWork = 0; + + + int workDone = 0; + + + bool complete = false; + MAKE_SWAP_METHOD(ProgressReport, id, task, subTask, status, workDone, complete); +}; + + +MAKE_REFLECT_STRUCT(ProgressReport, id, task, subTask, status, workDone, complete); + +/** + * The progress report notification is sent from a server to be handled by the + * client. + */ +DEFINE_NOTIFICATION_TYPE(lang_progressReport, ProgressReport, "language/progressReport"); + +enum EventType { + /** + * classpath updated event. + */ + ClasspathUpdated = (100), + + /** + * projects imported event. + */ + ProjectsImported = (200) +}; + +struct EventNotification +{ + int eventType; + lsp::Any data; + std::string ToString() const; + MAKE_SWAP_METHOD(EventNotification, eventType, data) +}; +MAKE_REFLECT_STRUCT(EventNotification, eventType, data); + +DEFINE_NOTIFICATION_TYPE(lang_eventNotification, EventNotification, "language/eventNotification"); \ No newline at end of file diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/location_type.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/location_type.h new file mode 100644 index 0000000000..14e130f571 --- /dev/null +++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/location_type.h @@ -0,0 +1,63 @@ +#pragma once + +#include "lsDocumentUri.h" +#include "lsRange.h" +//Represents a location inside a resource, such as a line inside a text file. +struct lsLocation { + lsLocation(); + lsLocation(lsDocumentUri uri, lsRange range); + + bool operator==(const lsLocation& other) const; + bool operator<(const lsLocation& o) const; + + lsDocumentUri uri; + lsRange range; + MAKE_SWAP_METHOD(lsLocation, uri, range) +}; +MAKE_REFLECT_STRUCT(lsLocation, uri, range) + + + +struct LinkLocation :public lsLocation +{ + std::string displayName; + std::string kind; + MAKE_REFLECT_STRUCT(LinkLocation, uri, range, displayName, kind) +}; +MAKE_REFLECT_STRUCT(LinkLocation, uri, range, displayName,kind) + +//Represents a link between a sourceand a target location. +struct LocationLink +{ + /** + * Span of the origin of this link. + * + * Used as the underlined span for mouse interaction. Defaults to the word range at + * the mouse position. + */ + boost::optional originSelectionRange; + + /** + * The target resource identifier of this link. + */ + + lsDocumentUri targetUri; + + /** + * The full target range of this link. If the target for example is a symbol then target range is the + * range enclosing this symbol not including leading/trailing whitespace but everything else + * like comments. This information is typically used to highlight the range in the editor. + */ + + lsRange targetRange; + + /** + * The range that should be selected and revealed when this link is being followed, e.g the name of a function. + * Must be contained by the the `targetRange`. See also `DocumentSymbol#range` + */ + + lsRange targetSelectionRange; + + MAKE_SWAP_METHOD(LocationLink, originSelectionRange, targetUri, targetRange, targetSelectionRange); +}; +MAKE_REFLECT_STRUCT(LocationLink, originSelectionRange, targetUri, targetRange, targetSelectionRange); \ No newline at end of file diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/lru_cache.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/lru_cache.h new file mode 100644 index 0000000000..f33bc5627a --- /dev/null +++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/lru_cache.h @@ -0,0 +1,151 @@ +#pragma once + +#include +#include +#include +#include +#include + +// Cache that evicts old entries which have not been used recently. Implemented +// using array/linear search so this works well for small array sizes. +template +struct LruCache { + explicit LruCache(int max_entries); + + // Fetches an entry for |key|. If it does not exist, |allocator| will be + // invoked to create one. + template + TValue Get(const TKey& key, TAllocator allocator); + // Returns true if there is an entry for |key|. + bool Has(const TKey& key); + // Fetches the entry for |filename| and updates it's usage so it is less + // likely to be evicted. + bool TryGet(const TKey& key, TValue* dest); + // TryGetEntry, except the entry is removed from the cache. + bool TryTake(const TKey& key, TValue* dest); + // Inserts an entry. Evicts the oldest unused entry if there is no space. + void Insert(const TKey& key, const TValue& value); + + // Call |func| on existing entries. If |func| returns false iteration + // terminates early. + template + void IterateValues(TFunc func); + + // Empties the cache + void Clear(void); + + private: + // There is a global score counter, when we access an element we increase + // its score to the current global value, so it has the highest overall + // score. This means that the oldest/least recently accessed value has the + // lowest score. + // + // There is a bit of special logic to handle score overlow. + struct Entry { + uint32_t score = 0; + TKey key; + TValue value; + bool operator<(const Entry& other) const { return score < other.score; } + }; + + void IncrementScore(); + + std::vector entries_; + int max_entries_ = 1; + uint32_t next_score_ = 0; +}; + +template +LruCache::LruCache(int max_entries) : max_entries_(max_entries) { + assert(max_entries > 0); +} + +template +template +TValue LruCache::Get(const TKey& key, TAllocator allocator) { + for (Entry& entry : entries_) { + if (entry.key == key) + return entry.value; + } + + auto result = allocator(); + Insert(key, result); + return result; +} + +template +bool LruCache::Has(const TKey& key) { + for (Entry& entry : entries_) { + if (entry.key == key) + return true; + } + return false; +} + +template +bool LruCache::TryGet(const TKey& key, TValue* dest) { + // Assign new score. + for (Entry& entry : entries_) { + if (entry.key == key) { + entry.score = next_score_; + IncrementScore(); + if (dest) + *dest = entry.value; + return true; + } + } + + return false; +} + +template +bool LruCache::TryTake(const TKey& key, TValue* dest) { + for (size_t i = 0; i < entries_.size(); ++i) { + if (entries_[i].key == key) { + if (dest) + *dest = entries_[i].value; + entries_.erase(entries_.begin() + i); + return true; + } + } + + return false; +} + +template +void LruCache::Insert(const TKey& key, const TValue& value) { + if ((int)entries_.size() >= max_entries_) + entries_.erase(std::min_element(entries_.begin(), entries_.end())); + + Entry entry; + entry.score = next_score_; + IncrementScore(); + entry.key = key; + entry.value = value; + entries_.push_back(entry); +} + +template +template +void LruCache::IterateValues(TFunc func) { + for (Entry& entry : entries_) { + if (!func(entry.value)) + break; + } +} + +template +void LruCache::IncrementScore() { + // Overflow. + if (++next_score_ == 0) { + std::sort(entries_.begin(), entries_.end()); + for (Entry& entry : entries_) + entry.score = next_score_++; + } +} + +template +void LruCache::Clear(void) { + entries_.clear(); + next_score_ = 0; +} diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/lsAny.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/lsAny.h new file mode 100644 index 0000000000..3335aa86dc --- /dev/null +++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/lsAny.h @@ -0,0 +1,159 @@ +#pragma once + +#include "LibLsp/JsonRpc/serializer.h" +#include +#include "LibLsp/JsonRpc/message.h" +namespace lsp +{ + struct Any + { + //! Type of JSON value + enum Type { + kUnKnown=-1, + kNullType = 0, //!< null + kFalseType = 1, //!< false + kTrueType = 2, //!< true + kObjectType = 3, //!< object + kArrayType = 4, //!< array + kStringType = 5, //!< string + kNumberType = 6 //!< number + }; + + + + template + bool Get(T& value); + + template + void Set(T& value); + + int GuessType(); + int GetType(); + + void Set(std::unique_ptr value); + + void SetJsonString(std::string&& _data, Type _type); + + void SetJsonString(const std::string& _data, Type _type); + + const std::string& Data()const + { + return data; + } + + void swap(Any& arg) noexcept; + + /* + *Example for GetFromMap + struct A{ + std::string visitor; + bool verbose; + } + REFLECT_MAP_TO_STRUCT(A,visitor,verbose) + + std::string data = "{\"visitor\":\"default\",\"verbose\":\"true\"}; + lsp:Any any; + any.SetJsonString(data, static_cast(-1)); + A a_object; + any.GetFromMap(a_object); + */ + template + bool GetFromMap(T& value); + + + template + bool GetForMapHelper(T& value); + bool GetForMapHelper(std::string& value); + bool GetForMapHelper(boost::optional& value); + private: + std::unique_ptr GetReader(); + std::unique_ptr GetWriter() const; + void SetData(std::unique_ptr&); + + std::string data; + int jsonType = kUnKnown; + + }; + +}; + + +extern void Reflect(Reader& visitor, lsp::Any& value); +extern void Reflect(Writer& visitor, lsp::Any& value); + +template +void ReflectMember(std::map < std::string, lsp::Any>& visitor, const char* name, T& value) { + + auto it = visitor.find(name); + if (it != visitor.end()) + { + it->second.GetForMapHelper(value); + } +} +template +void ReflectMember(std::map < std::string, std::string>& visitor, const char* name, T& value) { + + auto it = visitor.find(name); + if (it != visitor.end()) + { + lsp::Any any; + any.SetJsonString(it->second, static_cast(-1)); + any.Get(value); + } +} + +#define REFLECT_MAP_TO_STRUCT(type, ...) \ + template \ + void ReflectMap(TVisitor& visitor, type& value) { \ + MACRO_MAP(_MAPPABLE_REFLECT_MEMBER, __VA_ARGS__) \ + } + + +namespace lsp +{ + template + bool Any::Get(T& value) + { + const auto visitor = GetReader(); + Reflect(*visitor, value); + return true; + } + + template + void Any::Set(T& value) + { + auto visitor = GetWriter(); + Reflect(*visitor, value); + SetData(visitor); + } + + template + bool Any::GetFromMap(T& value) + { + const auto visitor = GetReader(); + std::map < std::string, lsp::Any> _temp; + Reflect(*visitor, _temp); + ReflectMap(_temp, value); + return true; + } + + template + bool Any::GetForMapHelper(T& value) + { + jsonType = GetType(); + if (jsonType == kStringType) + { + auto copy = data; + copy.erase(copy.find_last_not_of('"') + 1); + copy.erase(0, copy.find_first_not_of('"')); + lsp::Any any; + any.SetJsonString(copy, kUnKnown); + any.Get(value); + } + else + { + Get(value); + } + return true; + } +} diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/lsCodeAction.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/lsCodeAction.h new file mode 100644 index 0000000000..06a14f1540 --- /dev/null +++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/lsCodeAction.h @@ -0,0 +1,58 @@ +#pragma once + +#include "LibLsp/JsonRpc/serializer.h" + + + +#include +#include +#include "lsPosition.h" +#include "lsWorkspaceEdit.h" +#include "lsp_diagnostic.h" +#include "lsCommand.h" + +struct CodeAction +{ + /** + * A short, human-readable, title for this code action. + */ + + std::string title; + + /** + * The kind of the code action. + * + * Used to filter code actions. + */ + boost::optional < std::string> kind; + + /** + * The diagnostics that this code action resolves. + */ + boost::optional < std::vector> diagnostics; + + /** + * The workspace edit this code action performs. + */ + boost::optional < lsWorkspaceEdit >edit; + + /** + * A command this code action executes. If a code action + * provides a edit and a command, first the edit is + * executed and then the command. + */ + boost::optional< lsCommandWithAny > command; + + MAKE_SWAP_METHOD(CodeAction, title, kind, diagnostics, edit, command) +}; +MAKE_REFLECT_STRUCT(CodeAction, title, kind, diagnostics, edit, command) +struct TextDocumentCodeAction + +{ + + typedef std::pair, boost::optional > Either; + +}; + + +extern void Reflect(Reader& visitor, TextDocumentCodeAction::Either& value); \ No newline at end of file diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/lsCommand.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/lsCommand.h new file mode 100644 index 0000000000..94307f1479 --- /dev/null +++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/lsCommand.h @@ -0,0 +1,44 @@ +#pragma once + +#include "LibLsp/JsonRpc/serializer.h" + + + +#include +#include +#include "lsAny.h" +// +//Represents a reference to a command.Provides a title which will be used to represent a command in the UI. +//Commands are identified by a string identifier. +//The recommended way to handle commands is to implement their execution on the server side +//if the clientand server provides the corresponding capabilities.Alternatively the tool +//extension code could handle the command.The protocol currently doesnt specify a set of well - known commands. +template +struct lsCommand { + // Title of the command (ie, 'save') + std::string title; + // Actual command identifier. + std::string command; + // Arguments to run the command with. + // **NOTE** This must be serialized as an array. Use + // MAKE_REFLECT_STRUCT_WRITER_AS_ARRAY. + boost::optional arguments; + + void swap(lsCommand& arg) noexcept + { + title.swap(arg.title); + command.swap(arg.command); + arguments.swap(arg.arguments); + } +}; +template +void Reflect(TVisitor& visitor, lsCommand& value) { + REFLECT_MEMBER_START(); + REFLECT_MEMBER(title); + REFLECT_MEMBER(command); + REFLECT_MEMBER(arguments); + REFLECT_MEMBER_END(); +} + + +using lsCommandWithAny = lsCommand< std::vector>; diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/lsDocumentUri.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/lsDocumentUri.h new file mode 100644 index 0000000000..5d24f59e3a --- /dev/null +++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/lsDocumentUri.h @@ -0,0 +1,26 @@ +#pragma once +#include "LibLsp/JsonRpc/serializer.h" +#include +struct lsDocumentUri { + static lsDocumentUri FromPath(const AbsolutePath& path); + + lsDocumentUri(); + + lsDocumentUri(const AbsolutePath& path); + lsDocumentUri(const lsDocumentUri& other);; + bool operator==(const lsDocumentUri& other) const; + bool operator==(const std::string& other) const; + void SetPath(const AbsolutePath& path); + std::string GetRawPath() const; + AbsolutePath GetAbsolutePath() const; + + + std::string raw_uri_; + void swap(lsDocumentUri& arg) noexcept + { + raw_uri_.swap(arg.raw_uri_); + } +}; +extern void Reflect(Writer& visitor, lsDocumentUri& value); +extern void Reflect(Reader& visitor, lsDocumentUri& value); +extern std::string make_file_scheme_uri(const std::string& absolute_path); diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/lsFormattingOptions.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/lsFormattingOptions.h new file mode 100644 index 0000000000..a92df9b077 --- /dev/null +++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/lsFormattingOptions.h @@ -0,0 +1,43 @@ +#pragma once + +#include "LibLsp/JsonRpc/serializer.h" + +struct lsFormattingOptions { + struct KeyData { + boost::optional _boolean; + boost::optional _integer; + boost::optional _string; + }; + + // Size of a tab in spaces. + int tabSize =4; + // Prefer spaces over tabs. + bool insertSpaces = true; + + /** + * Trim trailing whitespace on a line. + * + * @since 3.15.0 + */ + boost::optional trimTrailingWhitespace; + + /** + * Insert a newline character at the end of the file if one does not exist. + * + * @since 3.15.0 + */ + boost::optional insertFinalNewline; + + /** + * Trim all newlines after the final newline at the end of the file. + * + * @since 3.15.0 + */ + boost::optional trimFinalNewlines; + boost::optional key; + MAKE_SWAP_METHOD(lsFormattingOptions, tabSize, insertSpaces, trimTrailingWhitespace, insertFinalNewline, trimFinalNewlines, key) +}; +MAKE_REFLECT_STRUCT(lsFormattingOptions, tabSize, insertSpaces, trimTrailingWhitespace, insertFinalNewline, trimFinalNewlines, key); + +extern void Reflect(Reader& visitor, lsFormattingOptions::KeyData& value); +extern void Reflect(Writer& visitor, lsFormattingOptions::KeyData& value); \ No newline at end of file diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/lsMarkedString.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/lsMarkedString.h new file mode 100644 index 0000000000..9191aa66d1 --- /dev/null +++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/lsMarkedString.h @@ -0,0 +1,45 @@ +#pragma once + +#include "LibLsp/JsonRpc/serializer.h" + +#include +#include + + +// MarkedString can be used to render human readable text. It is either a +// markdown string or a code-block that provides a language and a code snippet. +// The language identifier is sematically equal to the optional language +// identifier in fenced code blocks in GitHub issues. See +// https://help.github.com/articles/creating-and-highlighting-code-blocks/#syntax-highlighting +// +// The pair of a language and a value is an equivalent to markdown: +// ```${language} +// ${value} +// ``` +// +// Note that markdown strings will be sanitized - that means html will be +// escaped. +struct lsMarkedString { + boost::optional language; + std::string value; +}; + +struct MarkupContent { + /** + * The type of the Markup. + */ + + std::string kind; + + /** + * The content itself. + */ + + std::string value; + + MAKE_SWAP_METHOD(MarkupContent, kind, value); +}; +MAKE_REFLECT_STRUCT(MarkupContent,kind,value); + +void Reflect(Writer& visitor, lsMarkedString& value); +void Reflect(Reader& visitor, lsMarkedString& value); diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/lsPosition.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/lsPosition.h new file mode 100644 index 0000000000..8c2106e16e --- /dev/null +++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/lsPosition.h @@ -0,0 +1,40 @@ +#pragma once + +#include "LibLsp/JsonRpc/serializer.h" + + + +#include +#include + +//Position in a text document expressed as zero - based line and zero - based character offset. +//A position is between two characters like an insert cursor in a editor.Special values like +//for example - 1 to denote the end of a line are not supported. +struct lsPosition { + lsPosition(); + lsPosition(int line, int character); + + bool operator==(const lsPosition& other) const; + bool operator<(const lsPosition& other) const; + + std::string ToString() const; + + /** + * Line position in a document (zero-based). + */ + // Note: these are 0-based. + unsigned line = 0; + /** + * Character offset on a line in a document (zero-based). Assuming that + * the line is represented as a string, the `character` value represents + * the gap between the `character` and `character + 1`. + * + * If the character value is greater than the line length it defaults back + * to the line length. + */ + unsigned character = 0; + static const lsPosition kZeroPosition; + + MAKE_SWAP_METHOD(lsPosition, line, character) +}; +MAKE_REFLECT_STRUCT(lsPosition, line, character); \ No newline at end of file diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/lsRange.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/lsRange.h new file mode 100644 index 0000000000..6cc01e37a7 --- /dev/null +++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/lsRange.h @@ -0,0 +1,32 @@ +#pragma once + +#include "LibLsp/JsonRpc/serializer.h" + + + +#include +#include +#include "lsPosition.h" +//A range in a text document expressed as(zero - based) startand end positions. +//A range is comparable to a selection in an editor.Therefore the end position is exclusive. +//If you want to specify a range that contains a line including the line ending character(s) +//then use an end position denoting the start of the next line. +struct lsRange { + lsRange(); + lsRange(lsPosition start, lsPosition end); + + bool operator==(const lsRange& other) const; + bool operator<(const lsRange& other) const; + /** + * The range's start position. + */ + lsPosition start; + /** + * The range's end position. + */ + lsPosition end; + std::string ToString()const; + MAKE_SWAP_METHOD(lsRange, start, end) +}; + +MAKE_REFLECT_STRUCT(lsRange, start, end) \ No newline at end of file diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/lsResponseError.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/lsResponseError.h new file mode 100644 index 0000000000..6146d6188f --- /dev/null +++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/lsResponseError.h @@ -0,0 +1,117 @@ +#pragma once + +#include "LibLsp/JsonRpc/serializer.h" +#include +#include "LibLsp/lsp/lsAny.h" + +enum class lsErrorCodes:int32_t { + // Defined by JSON RPC + ParseError = -32700, + InvalidRequest = -32600, + MethodNotFound = -32601, + InvalidParams = -32602, + InternalError = -32603, + + /** + * This is the start range of JSON RPC reserved error codes. + * It doesn't denote a real error code. No LSP error codes should + * be defined between the start and end range. For backwards + * compatibility the `ServerNotInitialized` and the `UnknownErrorCode` + * are left in the range. + * + * @since 3.16.0 + */ + jsonrpcReservedErrorRangeStart = -32099, + /** @deprecated use jsonrpcReservedErrorRangeStart */ + serverErrorStart = jsonrpcReservedErrorRangeStart, + + /** + * This is the start range of JSON RPC reserved error codes. + * It doesn't denote a real error code. + * + * @since 3.16.0 + */ + jsonrpcReservedErrorRangeEnd = -32000, + /** @deprecated use jsonrpcReservedErrorRangeEnd */ + serverErrorEnd = jsonrpcReservedErrorRangeEnd, + + /** + * Error code indicating that a server received a notification or + * request before the server has received the `initialize` request. + */ + ServerNotInitialized = -32002, + UnknownErrorCode = -32001, + + /** + * This is the start range of LSP reserved error codes. + * It doesn't denote a real error code. + * + * @since 3.16.0 + */ + lspReservedErrorRangeStart= -32899, + + /** + * The server cancelled the request. This error code should + * only be used for requests that explicitly support being + * server cancellable. + * + * @since 3.17.0 + */ + ServerCancelled = -32802, + + /** + * The server detected that the content of a document got + * modified outside normal conditions. A server should + * NOT send this error code if it detects a content change + * in it unprocessed messages. The result even computed + * on an older state might still be useful for the client. + * + * If a client decides that a result is not of any use anymore + * the client should cancel the request. + */ + ContentModified = -32801, + + /** + * The client has canceled a request and a server as detected + * the cancel. + */ + RequestCancelled = -32800, + + /** + * This is the end range of LSP reserved error codes. + * It doesn't denote a real error code. + * + * @since 3.16.0 + */ + lspReservedErrorRangeEnd = -32800, + + + +}; +MAKE_REFLECT_TYPE_PROXY(lsErrorCodes); +struct lsResponseError { + lsResponseError(): code(lsErrorCodes::UnknownErrorCode) + { + } + + /** + * A number indicating the error type that occurred. + */ + lsErrorCodes code; + // Short description. + /** + * A string providing a short description of the error. + */ + std::string message; + + /** + * A primitive or structured value that contains additional + * information about the error. Can be omitted. + */ + boost::optional data; + std::string ToString(); + void Write(Writer& visitor); + + MAKE_SWAP_METHOD(lsResponseError, code, message, data) +}; +MAKE_REFLECT_STRUCT(lsResponseError, code, message, data) \ No newline at end of file diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/lsTextDocumentEdit.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/lsTextDocumentEdit.h new file mode 100644 index 0000000000..0bab8bc3d8 --- /dev/null +++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/lsTextDocumentEdit.h @@ -0,0 +1,24 @@ +#pragma once + +#include "LibLsp/JsonRpc/serializer.h" +#include +#include "LibLsp/JsonRpc/message.h" +#include "lsVersionedTextDocumentIdentifier.h" +#include "lsTextEdit.h" + + +struct lsTextDocumentEdit { + // The text document to change. + lsVersionedTextDocumentIdentifier textDocument; + + /** + * The edits to be applied. + * + * @since 3.16.0 - support for AnnotatedTextEdit. This is guarded by the + * client capability `workspace.workspaceEdit.changeAnnotationSupport` + */ + // The edits to be applied. + std::vector< lsAnnotatedTextEdit > edits; + MAKE_SWAP_METHOD(lsTextDocumentEdit, textDocument, edits); +}; +MAKE_REFLECT_STRUCT(lsTextDocumentEdit, textDocument, edits); \ No newline at end of file diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/lsTextDocumentIdentifier.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/lsTextDocumentIdentifier.h new file mode 100644 index 0000000000..bb316eae5a --- /dev/null +++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/lsTextDocumentIdentifier.h @@ -0,0 +1,14 @@ +#pragma once + +#include "LibLsp/JsonRpc/serializer.h" +#include "lsDocumentUri.h" +//Text documents are identified using a URI.On the protocol level, +//URIs are passed as strings.The corresponding JSON structure looks like this: +struct lsTextDocumentIdentifier { + /** + * The text document's URI. + */ + lsDocumentUri uri; + MAKE_SWAP_METHOD(lsTextDocumentIdentifier, uri) +}; +MAKE_REFLECT_STRUCT(lsTextDocumentIdentifier, uri) \ No newline at end of file diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/lsTextDocumentItem.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/lsTextDocumentItem.h new file mode 100644 index 0000000000..4d9b4ccc9f --- /dev/null +++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/lsTextDocumentItem.h @@ -0,0 +1,26 @@ +#pragma once + +#include "LibLsp/JsonRpc/serializer.h" +#include +#include +#include "lsDocumentUri.h" + +//An item to transfer a text document from the client to the server. +struct lsTextDocumentItem { + // The text document's URI. + lsDocumentUri uri; + + // The text document's language identifier. + std::string languageId; + + // The version number of this document (it will strictly increase after each + // change, including undo/redo). + int version = 0; + + // The content of the opened text document. + std::string text; + + MAKE_SWAP_METHOD(lsTextDocumentItem, uri, languageId, version, text) +}; + +MAKE_REFLECT_STRUCT(lsTextDocumentItem, uri, languageId, version, text) \ No newline at end of file diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/lsTextDocumentPositionParams.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/lsTextDocumentPositionParams.h new file mode 100644 index 0000000000..52d291351e --- /dev/null +++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/lsTextDocumentPositionParams.h @@ -0,0 +1,26 @@ +#pragma once + +#include "LibLsp/JsonRpc/message.h" + +#include "lsTextDocumentIdentifier.h" +#include "lsPosition.h" + +/** + * A parameter literal used in requests to pass a text document and a position inside that document. + */ +struct lsTextDocumentPositionParams { + // The text document. + lsTextDocumentIdentifier textDocument; + + // The position inside the text document. + lsPosition position; + + /** + * Legacy property to support protocol version 1.0 requests. + */ + boost::optional uri; + + MAKE_SWAP_METHOD(lsTextDocumentPositionParams, textDocument, position, uri); + +}; +MAKE_REFLECT_STRUCT(lsTextDocumentPositionParams, textDocument, position, uri); diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/lsTextEdit.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/lsTextEdit.h new file mode 100644 index 0000000000..8785e0dcbc --- /dev/null +++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/lsTextEdit.h @@ -0,0 +1,87 @@ +#pragma once + +#include "LibLsp/JsonRpc/serializer.h" + + + +#include +#include "lsRange.h" + + +//Since 3.16.0 there is also the concept of an annotated text edit which supports to add an annotation to a text edit. +//The annotation can add information describing the change to the text edit. +/** + * Additional information that describes document changes. + * + * @since 3.16.0 + */ +struct lsChangeAnnotation +{ + /** + * A human-readable string describing the actual change. The string + * is rendered prominent in the user interface. + */ + std::string label; + + /** + * A flag which indicates that user confirmation is needed + * before applying the change. + */ + boost::optional needsConfirmation; + + /** + * A human-readable string which is rendered less prominent in + * the user interface. + */ + boost::optional < std::string > description; + MAKE_REFLECT_STRUCT(lsChangeAnnotation, label, needsConfirmation, description) +}; +MAKE_REFLECT_STRUCT(lsChangeAnnotation, label, needsConfirmation, description) + + +//Usually clients provide options to group the changes along the annotations they are associated with. +//To support this in the protocol an edit or resource operation refers to a change annotation +//using an identifier and not the change annotation literal directly.This allows servers to use +//the identical annotation across multiple edits or resource operations which then allows clients +//to group the operations under that change annotation.The actual change annotations together with +//their identifers are managed by the workspace edit via the new property changeAnnotations. + + + +/** + * An identifier referring to a change annotation managed by a workspace + * edit. + * + * @since 3.16.0. + */ +using lsChangeAnnotationIdentifier = std::string; +/** + * A special text edit with an additional change annotation. + * + * @since 3.16.0. + */ + + +//A textual edit applicable to a text document. +struct lsTextEdit { + // The range of the text document to be manipulated. To insert + // text into a document create a range where start === end. + lsRange range; + + // The string to be inserted. For delete operations use an + // empty string. + std::string newText; + + /** + * The actual annotation identifier. + */ + boost::optional annotationId; + + + bool operator==(const lsTextEdit& that); + std::string ToString() const; + MAKE_SWAP_METHOD(lsTextEdit, range, newText, annotationId) +}; +MAKE_REFLECT_STRUCT(lsTextEdit, range, newText, annotationId) + +using lsAnnotatedTextEdit = lsTextEdit; diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/lsVersionedTextDocumentIdentifier.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/lsVersionedTextDocumentIdentifier.h new file mode 100644 index 0000000000..8a858053b1 --- /dev/null +++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/lsVersionedTextDocumentIdentifier.h @@ -0,0 +1,32 @@ +#pragma once + +#include "LibLsp/JsonRpc/serializer.h" + +#include "LibLsp/JsonRpc/message.h" +#include "LibLsp/lsp/lsDocumentUri.h" +#include "LibLsp/lsp/lsTextDocumentIdentifier.h" + +struct lsVersionedTextDocumentIdentifier +{ + lsDocumentUri uri; + // The version number of this document. number | null + boost::optional version; + + lsTextDocumentIdentifier AsTextDocumentIdentifier() const; + + MAKE_SWAP_METHOD(lsVersionedTextDocumentIdentifier, uri, version) +}; +MAKE_REFLECT_STRUCT(lsVersionedTextDocumentIdentifier, uri, version) + +/** + * The version number of this document. If an optional versioned text document + * identifier is sent from the server to the client and the file is not + * open in the editor (the server has not received an open notification + * before) the server can send `null` to indicate that the version is + * known and the content on disk is the master (as specified with document + * content ownership). + * + * The version number of a document will increase after each change, + * including undo/redo. The number doesn't need to be consecutive. + */ +using lsOptionalVersionedTextDocumentIdentifier = lsVersionedTextDocumentIdentifier; \ No newline at end of file diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/lsWorkspaceEdit.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/lsWorkspaceEdit.h new file mode 100644 index 0000000000..c7fb73930a --- /dev/null +++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/lsWorkspaceEdit.h @@ -0,0 +1,57 @@ +#pragma once + +#include "LibLsp/JsonRpc/serializer.h" +#include +#include "lsTextDocumentEdit.h" +#include "LibLsp/lsp/ResourceOperation.h" +#include "lsAny.h" + +//A workspace edit represents changes to many resources managed in the workspace. +//The edit should either provide changes or documentChanges. +//If the client can handle versioned document edits and if documentChanges are present, the latter are preferred over changes. + +//Since version 3.13.0 a workspace edit can contain resource operations(create, delete or rename files and folders) as well. +//If resource operations are present clients need to execute the operations in the order in which they are provided. +//So a workspace edit for example can consist of the following two changes : (1) create file a.txt and (2) a text document edit which insert text into file a. +//txt.An invalid sequence(e.g. (1) delete file a.txt and (2) insert text into file a.txt) will cause failure of the operation. +//How the client recovers from the failure is described by the client capability : workspace.workspaceEdit.failureHandling + + + +struct lsChangeAnnotations +{ + lsChangeAnnotation id; + MAKE_SWAP_METHOD(lsChangeAnnotations, id) +}; +MAKE_REFLECT_STRUCT(lsChangeAnnotations, id) +struct lsWorkspaceEdit { + // Holds changes to existing resources. + // changes ? : { [uri:string]: TextEdit[]; }; + // std::unordered_map> changes; + + // An array of `TextDocumentEdit`s to express changes to specific a specific + // version of a text document. Whether a client supports versioned document + // edits is expressed via `WorkspaceClientCapabilites.versionedWorkspaceEdit`. + // + boost::optional< std::map > > changes; + typedef std::pair < boost::optional, boost::optional > Either; + + boost::optional < std::vector< Either > > documentChanges; + /** + * A map of change annotations that can be referenced in + * `AnnotatedTextEdit`s or create, rename and delete file / folder + * operations. + * + * Whether clients honor this property depends on the client capability + * `workspace.changeAnnotationSupport`. + * + * @since 3.16.0 + */ + boost::optional< lsChangeAnnotations > changeAnnotations; + + MAKE_SWAP_METHOD(lsWorkspaceEdit, changes, documentChanges, changeAnnotations) +}; +MAKE_REFLECT_STRUCT(lsWorkspaceEdit, changes, documentChanges, changeAnnotations) + +extern void Reflect(Reader& visitor, lsWorkspaceEdit::Either& value); + diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/lsp_code_action.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/lsp_code_action.h new file mode 100644 index 0000000000..37acc6ca61 --- /dev/null +++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/lsp_code_action.h @@ -0,0 +1,64 @@ +#pragma once + + +#include "location_type.h" +#include "lsDocumentUri.h" +#include "lsTextEdit.h" +#include "lsPosition.h" + +// codeAction +struct CommandArgs { + lsDocumentUri textDocumentUri; + std::vector edits; +}; +MAKE_REFLECT_STRUCT_WRITER_AS_ARRAY(CommandArgs, textDocumentUri, edits); +inline void Reflect(Reader& visitor, CommandArgs& value) { + int i = 0; + visitor.IterArray([&](Reader& visitor) { + switch (i++) { + case 0: + Reflect(visitor, value.textDocumentUri); + break; + case 1: + Reflect(visitor, value.edits); + break; + + } + }); +} + +// codeLens +struct lsCodeLensUserData {}; +MAKE_REFLECT_EMPTY_STRUCT(lsCodeLensUserData); + +struct lsCodeLensCommandArguments { + lsDocumentUri uri; + lsPosition position; + std::vector locations; +}; + +// FIXME Don't use array in vscode-cquery +inline void Reflect(Writer& visitor, lsCodeLensCommandArguments& value) { + visitor.StartArray(3); + Reflect(visitor, value.uri); + Reflect(visitor, value.position); + Reflect(visitor, value.locations); + visitor.EndArray(); +} + +inline void Reflect(Reader& visitor, lsCodeLensCommandArguments& value) { + int i = 0; + visitor.IterArray([&](Reader& visitor) { + switch (i++) { + case 0: + Reflect(visitor, value.uri); + break; + case 1: + Reflect(visitor, value.position); + break; + case 2: + Reflect(visitor, value.locations); + break; + } + }); +} diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/lsp_completion.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/lsp_completion.h new file mode 100644 index 0000000000..250699a44a --- /dev/null +++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/lsp_completion.h @@ -0,0 +1,224 @@ +#pragma once +#include "lsTextEdit.h" +#include "lsMarkedString.h" +#include "lsCommand.h" + + +// The kind of a completion entry. +enum class lsCompletionItemKind { + Text = 1, + Method = 2, + Function = 3, + Constructor = 4, + Field = 5, + Variable = 6, + Class = 7, + Interface = 8, + Module = 9, + Property = 10, + Unit = 11, + Value = 12, + Enum = 13, + Keyword = 14, + Snippet = 15, + Color = 16, + File = 17, + Reference = 18, + Folder = 19, + EnumMember = 20, + Constant = 21, + Struct = 22, + Event = 23, + Operator = 24, + TypeParameter = 25, +}; +MAKE_REFLECT_TYPE_PROXY(lsCompletionItemKind); + + + +// Defines whether the insert text in a completion item should be interpreted as +// plain text or a snippet. +enum class lsInsertTextFormat { + // The primary text to be inserted is treated as a plain string. + PlainText = 1, + + // The primary text to be inserted is treated as a snippet. + // + // A snippet can define tab stops and placeholders with `$1`, `$2` + // and `${3:foo}`. `$0` defines the final tab stop, it defaults to + // the end of the snippet. Placeholders with equal identifiers are linked, + // that is typing in one will update others too. + // + // See also: + // https://github.com/Microsoft/vscode/blob/master/src/vs/editor/contrib/snippet/common/snippet.md + Snippet = 2 +}; +MAKE_REFLECT_TYPE_PROXY(lsInsertTextFormat); + +namespace lsp +{ + std::string ToString(lsCompletionItemKind); + std::string ToString(lsInsertTextFormat); +} +/** + * The Completion request is sent from the client to the server to compute completion items at a given cursor position. + * Completion items are presented in the IntelliSense user class. If computing complete completion items is expensive + * servers can additional provide a handler for the resolve completion item request. This request is send when a + * completion item is selected in the user class. + */ +struct lsCompletionItem { + + // The label of this completion item. By default + // also the text that is inserted when selecting + // this completion. + std::string label; + + // The kind of this completion item. Based of the kind + // an icon is chosen by the editor. + boost::optional kind ; + + // A human-readable string with additional information + // about this item, like type or symbol information. + boost::optional < std::string > detail; + + // A human-readable string that represents a doc-comment. + boost::optional< std::pair , boost::optional > > documentation; + + + /** + * Indicates if this item is deprecated. + */ + boost::optional< bool >deprecated; + + + /** + * Select this item when showing. + * + * *Note* that only one completion item can be selected and that the + * tool / client decides which item that is. The rule is that the *first + * item of those that match best is selected. + */ + boost::optional< bool > preselect; + + + // Internal information to order candidates. + int relevance = 0; + + // A string that shoud be used when comparing this item + // with other items. When `falsy` the label is used. + boost::optional< std::string > sortText; + + // A string that should be used when filtering a set of + // completion items. When `falsy` the label is used. + boost::optional filterText; + + // A string that should be inserted a document when selecting + // this completion. When `falsy` the label is used. + boost::optional insertText; + + // The format of the insert text. The format applies to both the `insertText` + // property and the `newText` property of a provided `textEdit`. + boost::optional< lsInsertTextFormat> insertTextFormat ; + + // An edit which is applied to a document when selecting this completion. When + // an edit is provided the value of `insertText` is ignored. + // + // *Note:* The range of the edit must be a single line range and it must + // contain the position at which completion has been requested. + boost::optional textEdit; + + // An boost::optional array of additional text edits that are applied when + // selecting this completion. Edits must not overlap with the main edit + // nor with themselves. + // std::vector additionalTextEdits; + + // An boost::optional command that is executed *after* inserting this completion. + // *Note* that additional modifications to the current document should be + // described with the additionalTextEdits-property. Command command; + + // An data entry field that is preserved on a completion item between + // a completion and a completion resolve request. + // data ? : any + + // Use this helper to figure out what content the completion item will insert + // into the document, as it could live in either |textEdit|, |insertText|, or + // |label|. + const std::string& InsertedContent() const; + + std::string DisplayText(); + /** + * An boost::optional array of additional text edits that are applied when + * selecting this completion. Edits must not overlap (including the same insert position) + * with the main edit nor with themselves. + * + * Additional text edits should be used to change text unrelated to the current cursor position + * (for example adding an import statement at the top of the file if the completion item will + * insert an unqualified type). + */ + boost::optional >additionalTextEdits; + + /** +* An boost::optional set of characters that when pressed while this completion is active will accept it first and +* then type that character. *Note* that all commit characters should have `length=1` and that superfluous +* characters will be ignored. +*/ + boost::optional< std::vector > commitCharacters; + + /** +* An boost::optional command that is executed *after* inserting this completion. *Note* that +* additional modifications to the current document should be described with the +* additionalTextEdits-property. +*/ + boost::optional command; + + /** +* An data entry field that is preserved on a completion item between a completion and a completion resolve request. +*/ + boost::optional data; + std::string ToString(); + MAKE_SWAP_METHOD(lsCompletionItem, + label, + kind, + detail, + documentation, + sortText, + insertText, + filterText, + insertTextFormat, + textEdit, + deprecated, preselect, additionalTextEdits, commitCharacters, + command, data); + +}; + + + +MAKE_REFLECT_STRUCT(lsCompletionItem, + label, + kind, + detail, + documentation, + sortText, + insertText, + filterText, + insertTextFormat, + textEdit, + deprecated, preselect, additionalTextEdits, commitCharacters, + command, data); + + + +struct CompletionList { + // This list it not complete. Further typing should result in recomputing + // this list. + bool isIncomplete = false; + // The completion items. + std::vector items; + + void swap(CompletionList& arg) noexcept + { + items.swap(arg.items); + std::swap(isIncomplete, arg.isIncomplete); + } +}; +MAKE_REFLECT_STRUCT(CompletionList, isIncomplete, items); \ No newline at end of file diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/lsp_diagnostic.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/lsp_diagnostic.h new file mode 100644 index 0000000000..d1b1d1ba78 --- /dev/null +++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/lsp_diagnostic.h @@ -0,0 +1,151 @@ +#pragma once +#include "lsRange.h" +#include "lsTextEdit.h" +#include "lsDocumentUri.h" + +#include "lsResponseError.h" +#include "location_type.h" + +#include "LibLsp/JsonRpc/RequestInMessage.h" +#include "LibLsp/JsonRpc/lsResponseMessage.h" + +enum class lsDiagnosticSeverity { + // Reports an error. + Error = 1, + // Reports a warning. + Warning = 2, + // Reports an information. + Information = 3, + // Reports a hint. + Hint = 4 +}; +MAKE_REFLECT_TYPE_PROXY(lsDiagnosticSeverity); + +/** + * The diagnostic tags. + * + * @since 3.15.0 + */ +enum class DiagnosticTag :uint8_t { + + /** + * Unused or unnecessary code. + * + * Clients are allowed to render diagnostics with this tag faded out instead of having + * an error squiggle. + */ + Unnecessary=(1), + + /** + * Deprecated or obsolete code. + * + * Clients are allowed to rendered diagnostics with this tag strike through. + */ + Deprecated=(2), +}; +MAKE_REFLECT_TYPE_PROXY(DiagnosticTag); + + + +/** + * Represents a related message and source code location for a diagnostic. This should be + * used to point to code locations that cause or related to a diagnostics, e.g when duplicating + * a symbol in a scope. + * + * Since 3.7.0 + */ + +struct DiagnosticRelatedInformation { + /** + * The location of this related diagnostic information. + */ + + lsLocation location; + + /** + * The message of this related diagnostic information. + */ + + std::string message; + + MAKE_SWAP_METHOD(DiagnosticRelatedInformation, location, message) +}; +MAKE_REFLECT_STRUCT(DiagnosticRelatedInformation, location, message) +/** + * Structure to capture a description for an error code. + * + * @since 3.16.0 + */ +struct DiagnosticCodeDescription { + /** + * An URI to open with more information about the diagnostic error. + */ + std::string href; + MAKE_SWAP_METHOD(DiagnosticCodeDescription, href) +}; +MAKE_REFLECT_STRUCT(DiagnosticCodeDescription, href) + +//Represents a diagnostic, such as a compiler error or warning.Diagnostic objects are only valid in the scope of a resource. +struct lsDiagnostic { + // The range at which the message applies. + lsRange range; + + // The diagnostic's severity. Can be omitted. If omitted it is up to the + // client to interpret diagnostics as error, warning, info or hint. + boost::optional severity; + + // The diagnostic's code. Can be omitted. + boost::optional< std::pair, boost::optional> > code; + + boost::optional codeDescription; + // A human-readable string describing the source of this + // diagnostic, e.g. 'typescript' or 'super lint'. + boost::optional < std::string >source ; + + // The diagnostic's message. + std::string message; + + // Non-serialized set of fixits. + std::vector fixits_; + + /** + * Additional metadata about the diagnostic. + * + * @since 3.15.0 + */ + boost::optional> tags; + + + /** + * An array of related diagnostic information, e.g. when symbol-names within a scope collide + * all definitions can be marked via this property. + * + * Since 3.7.0 + */ + boost::optional> relatedInformation; + + /** + * A data entry field that is preserved between a + * `textDocument/publishDiagnostics` notification and + * `textDocument/codeAction` request. + * + * @since 3.16.0 + */ + boost::optional data; + bool operator==(const lsDiagnostic& rhs) const; + bool operator!=(const lsDiagnostic& rhs) const; + + MAKE_SWAP_METHOD(lsDiagnostic, range, severity, code, codeDescription, source, message, tags, data) +}; +MAKE_REFLECT_STRUCT(lsDiagnostic, range, severity, code, codeDescription, source, message, tags, data) + + + +struct Rsp_Error : ResponseError { + + MAKE_SWAP_METHOD(Rsp_Error, jsonrpc, id, error) +}; +MAKE_REFLECT_STRUCT(Rsp_Error, jsonrpc, id, error) + + + diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/method_type.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/method_type.h new file mode 100644 index 0000000000..dcbb4a851a --- /dev/null +++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/method_type.h @@ -0,0 +1,7 @@ +#pragma once +#include + +using MethodType = const char* const; + + + diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/out_list.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/out_list.h new file mode 100644 index 0000000000..36c4aa78ba --- /dev/null +++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/out_list.h @@ -0,0 +1,22 @@ +#pragma once + + +#include "location_type.h" + + +#include "LibLsp/JsonRpc/RequestInMessage.h" +#include "LibLsp/JsonRpc/lsResponseMessage.h" + + + +//DEFINE_RESPONCE_TYPE(Rsp_FindLinkLocationList, std::vector); +//DEFINE_RESPONCE_TYPE(Rsp_LocationList, std::vector); + + +namespace LocationListEither{ + + typedef std::pair< boost::optional> , boost::optional > > Either; + +}; +extern void Reflect(Reader& visitor, LocationListEither::Either& value); +//DEFINE_RESPONCE_TYPE(Rsp_LocationListEither, LocationListEither::Either); diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/symbol.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/symbol.h new file mode 100644 index 0000000000..57298b8d7f --- /dev/null +++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/symbol.h @@ -0,0 +1,164 @@ +#pragma once +#include "LibLsp/lsp/location_type.h" + + +enum class lsSymbolKind : uint8_t { + Unknown = 0, + + File = 1, + Module = 2, + Namespace = 3, + Package = 4, + Class = 5, + Method = 6, + Property = 7, + Field = 8, + Constructor = 9, + Enum = 10, + Interface = 11, + Function = 12, + Variable = 13, + Constant = 14, + String = 15, + Number = 16, + Boolean = 17, + Array = 18, + Object = 19, + Key = 20, + Null = 21, + EnumMember = 22, + Struct = 23, + Event = 24, + Operator = 25, + + // For C++, this is interpreted as "template parameter" (including + // non-type template parameters). + TypeParameter = 26, + + // cquery extensions + // See also https://github.com/Microsoft/language-server-protocol/issues/344 + // for new SymbolKind clang/Index/IndexSymbol.h clang::index::SymbolKind + TypeAlias = 252, + Parameter = 253, + StaticMethod = 254, + Macro = 255, +}; +MAKE_REFLECT_TYPE_PROXY(lsSymbolKind); + +typedef lsSymbolKind SymbolKind; + +// A document highlight kind. +enum class lsDocumentHighlightKind { + // A textual occurrence. + Text = 1, + // Read-access of a symbol, like reading a variable. + Read = 2, + // Write-access of a symbol, like writing to a variable. + Write = 3 +}; +MAKE_REFLECT_TYPE_PROXY(lsDocumentHighlightKind); + +// A document highlight is a range inside a text document which deserves +// special attention. Usually a document highlight is visualized by changing +// the background color of its range. +struct lsDocumentHighlight { + // The range this highlight applies to. + lsRange range; + + // The highlight kind, default is DocumentHighlightKind.Text. + boost::optional kind ; + + MAKE_SWAP_METHOD(lsDocumentHighlight, range, kind) +}; +MAKE_REFLECT_STRUCT(lsDocumentHighlight, range, kind); + +struct lsSymbolInformation { + +/** + * The name of this symbol. + */ + std::string name; + /** + * The kind of this symbol. + */ + lsSymbolKind kind; + /** +* Indicates if this symbol is deprecated. +*/ + boost::optional deprecated; + /** + * The location of this symbol. The location's range is used by a tool + * to reveal the location in the editor. If the symbol is selected in the + * tool the range's start information is used to position the cursor. So + * the range usually spans more then the actual symbol's name and does + * normally include things like visibility modifiers. + * + * The range doesn't have to denote a node range in the sense of a abstract + * syntax tree. It can therefore not be used to re-construct a hierarchy of + * the symbols. + */ + lsLocation location; + /** + * The name of the symbol containing this symbol. This information is for + * user interface purposes (e.g. to render a qualifier in the user interface + * if necessary). It can't be used to re-infer a hierarchy for the document + * symbols. + */ + boost::optional containerName; + + + MAKE_SWAP_METHOD(lsSymbolInformation, name, kind, deprecated, location, containerName); +}; +MAKE_REFLECT_STRUCT(lsSymbolInformation, name, kind, deprecated, location, containerName); + + +struct lsDocumentSymbol { + /** + * The name of this symbol. + */ + + std::string name; + + /** + * The kind of this symbol. + */ + + lsSymbolKind kind = lsSymbolKind::Unknown; + + /** + * The range enclosing this symbol not including leading/trailing whitespace but everything else + * like comments. This information is typically used to determine if the clients cursor is + * inside the symbol to reveal in the symbol in the UI. + */ + + lsRange range; + + /** + * The range that should be selected and revealed when this symbol is being picked, e.g the name of a function. + * Must be contained by the `range`. + */ + + lsRange selectionRange; + + /** + * More detail for this symbol, e.g the signature of a function. If not provided the + * name is used. + */ + boost::optional< std::string > detail; + + /** + * Indicates if this symbol is deprecated. + */ + boost::optional< bool > deprecated; + + /** + * Children of this symbol, e.g. properties of a class. + */ + boost::optional < std::vector > children; + + //internal use + int flags=0; + + MAKE_SWAP_METHOD(lsDocumentSymbol, name, kind, range, selectionRange, detail, deprecated, children, flags); +}; +MAKE_REFLECT_STRUCT(lsDocumentSymbol, name, kind, range, selectionRange, detail, deprecated, children, flags); \ No newline at end of file diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/SemanticTokens.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/SemanticTokens.h new file mode 100644 index 0000000000..612d186f6f --- /dev/null +++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/SemanticTokens.h @@ -0,0 +1,267 @@ +#pragma once + +#include "LibLsp/lsp/lsTextDocumentIdentifier.h" +#include "LibLsp/lsp/lsVersionedTextDocumentIdentifier.h" +#include "LibLsp/JsonRpc/RequestInMessage.h" +enum class HighlightingKind_clangD { + Variable = 0, + LocalVariable, + Parameter, + Function, + Method, + StaticMethod, + Field, + StaticField, + Class, + Interface, + Enum, + EnumConstant, + Typedef, + Type, + Unknown, + Namespace, + TemplateParameter, + Concept, + Primitive, + Macro, + + // This one is different from the other kinds as it's a line style + // rather than a token style. + InactiveCode, + + LastKind = InactiveCode +}; +std::string toSemanticTokenType(HighlightingKind_clangD kind); + +enum class HighlightingModifier_clangD { + Declaration, + Deprecated, + Deduced, + Readonly, + Static, + Abstract, + DependentName, + DefaultLibrary, + + FunctionScope, + ClassScope, + FileScope, + GlobalScope, + + LastModifier = GlobalScope +}; +std::string toSemanticTokenModifier(HighlightingModifier_clangD modifier); + +enum SemanticTokenType { + ls_namespace=0,// 'namespace', + /** + * Represents a generic type. Acts as a fallback for types which + * can't be mapped to a specific type like class or enum. + */ + ls_type,// 'type', + ls_class,// 'class', + ls_enum,// 'enum', + ls_interface,// 'interface', + ls_struct,// 'struct', + ls_typeParameter,// 'typeParameter', + ls_parameter,// 'parameter', + ls_variable,// 'variable', + ls_property,// 'property', + ls_enumMember,// 'enumMember', + ls_event,// 'event', + ls_function,// 'function', + ls_method,// 'method', + ls_macro,// 'macro', + ls_keyword,// 'keyword', + ls_modifier,// 'modifier', + ls_comment,// 'comment', + ls_string,// 'string', + ls_number,// 'number', + ls_regexp,// 'regexp', + ls_operator,// 'operator' + lastKind = ls_operator +}; +std::string to_string(SemanticTokenType); +unsigned toSemanticTokenType(std::vector& modifiers); + +enum TokenType_JDT { + PACKAGE_JDT=0, + CLASS_JDT, + INTERFACE_JDT, + ENUM_JDT, + ENUM_MEMBER_JDT, + TYPE_JDT, + TYPE_PARAMETER_JDT, + ANNOTATION_JDT, + ANNOTATION_MEMBER_JDT, + METHOD_JDT, + PROPERTY_JDT, + VARIABLE_JDT, + PARAMETER_JDT +}; +std::string to_string(TokenType_JDT); + +enum SemanticTokenModifier { + ls_declaration=0,// 'declaration', + ls_definition,// 'definition', + ls_readonly,// 'readonly', + ls_static,// 'static', + ls_deprecated,// 'deprecated', + ls_abstract,// 'abstract', + ls_async,// 'async', + ls_modification,// 'modification', + ls_documentation,// 'documentation', + ls_defaultLibrary,// 'defaultLibrary' + LastModifier = ls_defaultLibrary +}; +std::string to_string(SemanticTokenModifier); +unsigned toSemanticTokenModifiers(std::vector&); +/// Specifies a single semantic token in the document. +/// This struct is not part of LSP, which just encodes lists of tokens as +/// arrays of numbers directly. +struct SemanticToken { + /// token line number, relative to the previous token + unsigned deltaLine = 0; + /// token start character, relative to the previous token + /// (relative to 0 or the previous token's start if they are on the same line) + unsigned deltaStart = 0; + /// the length of the token. A token cannot be multiline + unsigned length = 0; + /// will be looked up in `SemanticTokensLegend.tokenTypes` + unsigned tokenType = 0; + /// each set bit will be looked up in `SemanticTokensLegend.tokenModifiers` + unsigned tokenModifiers = 0; +}; +bool operator==(const SemanticToken&, const SemanticToken&); +struct SemanticTokens{ + + /** + * Tokens in a file are represented as an array of integers. The position of each token is expressed relative to + * the token before it, because most tokens remain stable relative to each other when edits are made in a file. + * + * --- + * In short, each token takes 5 integers to represent, so a specific token `i` in the file consists of the following array indices: + * - at index `5*i` - `deltaLine`: token line number, relative to the previous token + * - at index `5*i+1` - `deltaStart`: token start character, relative to the previous token (relative to 0 or the previous token's start if they are on the same line) + * - at index `5*i+2` - `length`: the length of the token. A token cannot be multiline. + * - at index `5*i+3` - `tokenType`: will be looked up in `SemanticTokensLegend.tokenTypes`. We currently ask that `tokenType` < 65536. + * - at index `5*i+4` - `tokenModifiers`: each set bit will be looked up in `SemanticTokensLegend.tokenModifiers` + * + * --- + * ### How to encode tokens + * + * Here is an example for encoding a file with 3 tokens in a uint32 array: + * ``` + * { line: 2, startChar: 5, length: 3, tokenType: "property", tokenModifiers: ["private", "static"] }, + * { line: 2, startChar: 10, length: 4, tokenType: "type", tokenModifiers: [] }, + * { line: 5, startChar: 2, length: 7, tokenType: "class", tokenModifiers: [] } + * ``` + * + * 1. First of all, a legend must be devised. This legend must be provided up-front and capture all possible token types. + * For this example, we will choose the following legend which must be passed in when registering the provider: + * ``` + * tokenTypes: ['property', 'type', 'class'], + * tokenModifiers: ['private', 'static'] + * ``` + * + * 2. The first transformation step is to encode `tokenType` and `tokenModifiers` as integers using the legend. Token types are looked + * up by index, so a `tokenType` value of `1` means `tokenTypes[1]`. Multiple token modifiers can be set by using bit flags, + * so a `tokenModifier` value of `3` is first viewed as binary `0b00000011`, which means `[tokenModifiers[0], tokenModifiers[1]]` because + * bits 0 and 1 are set. Using this legend, the tokens now are: + * ``` + * { line: 2, startChar: 5, length: 3, tokenType: 0, tokenModifiers: 3 }, + * { line: 2, startChar: 10, length: 4, tokenType: 1, tokenModifiers: 0 }, + * { line: 5, startChar: 2, length: 7, tokenType: 2, tokenModifiers: 0 } + * ``` + * + * 3. The next step is to represent each token relative to the previous token in the file. In this case, the second token + * is on the same line as the first token, so the `startChar` of the second token is made relative to the `startChar` + * of the first token, so it will be `10 - 5`. The third token is on a different line than the second token, so the + * `startChar` of the third token will not be altered: + * ``` + * { deltaLine: 2, deltaStartChar: 5, length: 3, tokenType: 0, tokenModifiers: 3 }, + * { deltaLine: 0, deltaStartChar: 5, length: 4, tokenType: 1, tokenModifiers: 0 }, + * { deltaLine: 3, deltaStartChar: 2, length: 7, tokenType: 2, tokenModifiers: 0 } + * ``` + * + * 4. Finally, the last step is to inline each of the 5 fields for a token in a single array, which is a memory friendly representation: + * ``` + * // 1st token, 2nd token, 3rd token + * [ 2,5,3,0,3, 0,5,4,1,0, 3,2,7,2,0 ] + * ``` + */ + std::vector data; + static std::vector encodeTokens(std::vector& tokens); + + /** + * An optional result id. If provided and clients support delta updating + * the client will include the result id in the next semantic token request. + * A server can then instead of computing all semantic tokens again simply + * send a delta. + */ + boost::optional resultId; + MAKE_SWAP_METHOD(SemanticTokens, data, resultId) +}; +MAKE_REFLECT_STRUCT(SemanticTokens, data, resultId) + +/// Body of textDocument/semanticTokens/full request. +struct SemanticTokensParams { + /// The text document. + lsTextDocumentIdentifier textDocument; + MAKE_REFLECT_STRUCT(SemanticTokensParams, textDocument) +}; +MAKE_REFLECT_STRUCT(SemanticTokensParams, textDocument) + + +/// Body of textDocument/semanticTokens/full/delta request. +/// Requests the changes in semantic tokens since a previous response. +struct SemanticTokensDeltaParams { + /// The text document. + lsTextDocumentIdentifier textDocument; + /** + * The result id of a previous response. The result Id can either point to + * a full response or a delta response depending on what was received last. + */ + std::string previousResultId; + + MAKE_REFLECT_STRUCT(SemanticTokensDeltaParams, textDocument, previousResultId) +}; +MAKE_REFLECT_STRUCT(SemanticTokensDeltaParams, textDocument, previousResultId) + +/// Describes a a replacement of a contiguous range of semanticTokens. +struct SemanticTokensEdit { + // LSP specifies `start` and `deleteCount` which are relative to the array + // encoding of the previous tokens. + // We use token counts instead, and translate when serializing this struct. + unsigned startToken = 0; + unsigned deleteTokens = 0; + std::vector tokens; // encoded as a flat integer array + + MAKE_REFLECT_STRUCT(SemanticTokensEdit, startToken, deleteTokens, tokens) +}; +MAKE_REFLECT_STRUCT(SemanticTokensEdit, startToken, deleteTokens, tokens) + + +/// This models LSP SemanticTokensDelta | SemanticTokens, which is the result of +/// textDocument/semanticTokens/full/delta. +struct SemanticTokensOrDelta { + boost::optional resultId; + /// Set if we computed edits relative to a previous set of tokens. + boost::optional< std::vector > edits; + /// Set if we computed a fresh set of tokens. + /// Set if we computed edits relative to a previous set of tokens. + boost::optional> tokens; // encoded as integer array + MAKE_REFLECT_STRUCT(SemanticTokensOrDelta, resultId, edits, tokens) +}; +MAKE_REFLECT_STRUCT(SemanticTokensOrDelta, resultId, edits, tokens) + + +struct SemanticTokensLegend { + std::vector tokenTypes; + std::vector tokenModifiers; + MAKE_REFLECT_STRUCT(SemanticTokensLegend, tokenTypes, tokenModifiers) +}; +MAKE_REFLECT_STRUCT(SemanticTokensLegend, tokenTypes, tokenModifiers) + +DEFINE_REQUEST_RESPONSE_TYPE(td_semanticTokens_full, SemanticTokensParams,boost::optional,"textDocument/semanticTokens/full") +DEFINE_REQUEST_RESPONSE_TYPE(td_semanticTokens_full_delta, SemanticTokensDeltaParams, boost::optional, "textDocument/semanticTokens/full/delta") \ No newline at end of file diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/callHierarchy.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/callHierarchy.h new file mode 100644 index 0000000000..a005c182e1 --- /dev/null +++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/callHierarchy.h @@ -0,0 +1,121 @@ +#pragma once + +#include "LibLsp/lsp/lsAny.h" +#include "LibLsp/JsonRpc/RequestInMessage.h" +#include "LibLsp/JsonRpc/lsResponseMessage.h" +#include "LibLsp/lsp/symbol.h" +#include "LibLsp/lsp/lsTextDocumentPositionParams.h" +#include "LibLsp/lsp/lsRange.h" + +enum class SymbolTag { Deprecated = 1 }; +MAKE_REFLECT_TYPE_PROXY(SymbolTag) + +struct CallHierarchyPrepareParams +{ + lsTextDocumentIdentifier textDocument; + lsPosition position; + + MAKE_SWAP_METHOD(CallHierarchyPrepareParams, + textDocument, + position) +}; +MAKE_REFLECT_STRUCT(CallHierarchyPrepareParams, + textDocument, + position) + + + + /// Represents programming constructs like functions or constructors + /// in the context of call hierarchy. +struct CallHierarchyItem { + /// The name of this item. + std::string name; + + /// The kind of this item. + SymbolKind kind; + + /// Tags for this item. + boost::optional> tags; + + /// More detaill for this item, e.g. the signature of a function. + boost::optional detail; + + /// The resource identifier of this item. + lsDocumentUri uri; + + /** + * The range enclosing this symbol not including leading/trailing whitespace + * but everything else, e.g. comments and code. + */ + lsRange range; + + /** + * The range that should be selected and revealed when this symbol is being + * picked, e.g. the name of a function. Must be contained by the + * [`range`](#CallHierarchyItem.range). + */ + lsRange selectionRange; + + /** + * A data entry field that is preserved between a call hierarchy prepare and + * incoming calls or outgoing calls requests. + */ + boost::optional data; + MAKE_SWAP_METHOD(CallHierarchyItem, name, kind, tags, detail, uri, range, selectionRange, data) +}; +MAKE_REFLECT_STRUCT(CallHierarchyItem, name, kind, tags, detail, uri, range, selectionRange, data) + + + +/// The parameter of a `callHierarchy/incomingCalls` request. +struct CallHierarchyIncomingCallsParams { + CallHierarchyItem item; + MAKE_SWAP_METHOD(CallHierarchyIncomingCallsParams,item) +}; +MAKE_REFLECT_STRUCT(CallHierarchyIncomingCallsParams, item) + + +/// Represents an incoming call, e.g. a caller of a method or constructor. +struct CallHierarchyIncomingCall { + /// The item that makes the call. + CallHierarchyItem from; + + /// The range at which the calls appear. + /// This is relative to the caller denoted by `From`. + std::vector fromRanges; + MAKE_SWAP_METHOD(CallHierarchyIncomingCall, from, fromRanges) +}; +MAKE_REFLECT_STRUCT(CallHierarchyIncomingCall, from, fromRanges) + + + + +/// The parameter of a `callHierarchy/outgoingCalls` request. +struct CallHierarchyOutgoingCallsParams { + CallHierarchyItem item; + MAKE_SWAP_METHOD(CallHierarchyOutgoingCallsParams, item) +}; +MAKE_REFLECT_STRUCT(CallHierarchyOutgoingCallsParams, item) + +/// Represents an outgoing call, e.g. calling a getter from a method or +/// a method from a constructor etc. +struct CallHierarchyOutgoingCall { + /// The item that is called. + CallHierarchyItem to; + + /// The range at which this item is called. + /// This is the range relative to the caller, and not `To`. + std::vector fromRanges; + MAKE_SWAP_METHOD(CallHierarchyOutgoingCall, to, fromRanges) +}; +MAKE_REFLECT_STRUCT(CallHierarchyOutgoingCall, to, fromRanges) + + +DEFINE_REQUEST_RESPONSE_TYPE(td_prepareCallHierarchy, CallHierarchyPrepareParams, + boost::optional>, "textDocument/prepareCallHierarchy") + +DEFINE_REQUEST_RESPONSE_TYPE(td_incomingCalls, CallHierarchyIncomingCallsParams, + boost::optional>, "callHierarchy/incomingCalls") + +DEFINE_REQUEST_RESPONSE_TYPE(td_outgoingCalls, CallHierarchyOutgoingCallsParams, + boost::optional>, "callHierarchy/CallHierarchyOutgoingCall") \ No newline at end of file diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/code_action.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/code_action.h new file mode 100644 index 0000000000..419fdfbc9b --- /dev/null +++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/code_action.h @@ -0,0 +1,37 @@ +#pragma once +#include "LibLsp/lsp/method_type.h" +#include "LibLsp/JsonRpc/RequestInMessage.h" +#include "LibLsp/JsonRpc/lsResponseMessage.h" +#include "LibLsp/lsp/lsTextDocumentIdentifier.h" +#include "LibLsp/lsp/CodeActionParams.h" + +namespace QuickAssistProcessor { + + extern const char* SPLIT_JOIN_VARIABLE_DECLARATION_ID;//$NON-NLS-1$ + extern const char* CONVERT_FOR_LOOP_ID;// ;// "org.eclipse.jdt.ls.correction.convertForLoop.assist"; //$NON-NLS-1$ + extern const char* ASSIGN_TO_LOCAL_ID ;// "org.eclipse.jdt.ls.correction.assignToLocal.assist"; //$NON-NLS-1$ + extern const char* ASSIGN_TO_FIELD_ID ;// "org.eclipse.jdt.ls.correction.assignToField.assist"; //$NON-NLS-1$ + extern const char* ASSIGN_PARAM_TO_FIELD_ID ;// "org.eclipse.jdt.ls.correction.assignParamToField.assist"; //$NON-NLS-1$ + extern const char* ASSIGN_ALL_PARAMS_TO_NEW_FIELDS_ID ;// "org.eclipse.jdt.ls.correction.assignAllParamsToNewFields.assist"; //$NON-NLS-1$ + extern const char* ADD_BLOCK_ID ;// "org.eclipse.jdt.ls.correction.addBlock.assist"; //$NON-NLS-1$ + extern const char* EXTRACT_LOCAL_ID ;// "org.eclipse.jdt.ls.correction.extractLocal.assist"; //$NON-NLS-1$ + extern const char* EXTRACT_LOCAL_NOT_REPLACE_ID ;// "org.eclipse.jdt.ls.correction.extractLocalNotReplaceOccurrences.assist"; //$NON-NLS-1$ + extern const char* EXTRACT_CONSTANT_ID ;// "org.eclipse.jdt.ls.correction.extractConstant.assist"; //$NON-NLS-1$ + extern const char* INLINE_LOCAL_ID ;// "org.eclipse.jdt.ls.correction.inlineLocal.assist"; //$NON-NLS-1$ + extern const char* CONVERT_LOCAL_TO_FIELD_ID ;// "org.eclipse.jdt.ls.correction.convertLocalToField.assist"; //$NON-NLS-1$ + extern const char* CONVERT_ANONYMOUS_TO_LOCAL_ID ;// "org.eclipse.jdt.ls.correction.convertAnonymousToLocal.assist"; //$NON-NLS-1$ + extern const char* CONVERT_TO_STRING_BUFFER_ID ;// "org.eclipse.jdt.ls.correction.convertToStringBuffer.assist"; //$NON-NLS-1$ + extern const char* CONVERT_TO_MESSAGE_FORMAT_ID ;// "org.eclipse.jdt.ls.correction.convertToMessageFormat.assist"; //$NON-NLS-1$; + extern const char* EXTRACT_METHOD_INPLACE_ID ;// "org.eclipse.jdt.ls.correction.extractMethodInplace.assist"; //$NON-NLS-1$; + + extern const char* CONVERT_ANONYMOUS_CLASS_TO_NESTED_COMMAND ;// "convertAnonymousClassToNestedCommand"; +}; +/** + * The code action request is sent from the client to the server to compute + * commands for a given text document and range. These commands are + * typically code fixes to either fix problems or to beautify/refactor code. + * + * Registration Options: TextDocumentRegistrationOptions + */ + +DEFINE_REQUEST_RESPONSE_TYPE(td_codeAction, lsCodeActionParams, std::vector, "textDocument/codeAction"); diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/code_lens.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/code_lens.h new file mode 100644 index 0000000000..7fd5ae0cf9 --- /dev/null +++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/code_lens.h @@ -0,0 +1,42 @@ +#pragma once + +#include "LibLsp/JsonRpc/RequestInMessage.h" +#include "LibLsp/JsonRpc/lsResponseMessage.h" + +struct lsDocumentCodeLensParams { + +/** + * The document to request code lens for. + */ + lsTextDocumentIdentifier textDocument; + + MAKE_SWAP_METHOD(lsDocumentCodeLensParams, textDocument); +}; +MAKE_REFLECT_STRUCT(lsDocumentCodeLensParams, textDocument); + + + + +struct lsCodeLens { + // The range in which this code lens is valid. Should only span a single line. + lsRange range; + // The command this code lens represents. + boost::optional command; + // A data entry field that is preserved on a code lens item between + // a code lens and a code lens resolve request. + boost::optional< lsp::Any> data; + + MAKE_SWAP_METHOD(lsCodeLens, range, command, data) +}; +MAKE_REFLECT_STRUCT(lsCodeLens, range, command, data) + + + +/** + * The code lens request is sent from the client to the server to compute + * code lenses for a given text document. + * + * Registration Options: CodeLensRegistrationOptions + */ +DEFINE_REQUEST_RESPONSE_TYPE(td_codeLens, lsDocumentCodeLensParams, std::vector, "textDocument/codeLens") + diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/colorPresentation.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/colorPresentation.h new file mode 100644 index 0000000000..22574e3e19 --- /dev/null +++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/colorPresentation.h @@ -0,0 +1,63 @@ +#pragma once + + +#include "LibLsp/JsonRpc/RequestInMessage.h" +#include "LibLsp/JsonRpc/lsResponseMessage.h" + +#include "LibLsp/lsp/lsTextDocumentIdentifier.h" +#include "LibLsp/lsp/lsRange.h" +#include "documentColor.h" +#include "LibLsp/lsp/lsTextEdit.h" + + +struct ColorPresentationParams { + + /** + * The text document. + */ + lsTextDocumentIdentifier textDocument; + + /** + * The range in the document where this color appers. + */ + + lsRange range; + + /** + * The actual color value for this color range. + */ + + TextDocument::Color color; + MAKE_SWAP_METHOD(ColorPresentationParams, textDocument, range, color) +}; +MAKE_REFLECT_STRUCT(ColorPresentationParams, textDocument, range, color) + + +struct ColorPresentation { + /** + * The label of this color presentation. It will be shown on the color + * picker header. By default this is also the text that is inserted when selecting + * this color presentation. + */ + + std::string label; + + /** + * An edit which is applied to a document when selecting + * this presentation for the color. When `null` the label is used. + */ + lsTextEdit textEdit; + + /** + * An optional array of additional text edits that are applied when + * selecting this color presentation. Edits must not overlap with the main edit nor with themselves. + */ + std::vector additionalTextEdits; + MAKE_SWAP_METHOD(ColorPresentation, label, textEdit, additionalTextEdits) +}; +MAKE_REFLECT_STRUCT(ColorPresentation, label, textEdit, additionalTextEdits) + + + +DEFINE_REQUEST_RESPONSE_TYPE(td_colorPresentation, + ColorPresentationParams, std::vector, "textDocument/colorPresentation") \ No newline at end of file diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/completion.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/completion.h new file mode 100644 index 0000000000..883c5cfe3a --- /dev/null +++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/completion.h @@ -0,0 +1,82 @@ +#pragma once + + +#include "LibLsp/JsonRpc/RequestInMessage.h" +#include "LibLsp/JsonRpc/lsResponseMessage.h" + +#include +#include "LibLsp/lsp/lsp_completion.h" +#include "LibLsp/lsp/lsTextDocumentPositionParams.h" + + +// How a completion was triggered +enum class lsCompletionTriggerKind { + // Completion was triggered by typing an identifier (24x7 code + // complete), manual invocation (e.g Ctrl+Space) or via API. + Invoked = 1, + + // Completion was triggered by a trigger character specified by + // the `triggerCharacters` properties of the `CompletionRegistrationOptions`. + TriggerCharacter = 2 +}; +MAKE_REFLECT_TYPE_PROXY(lsCompletionTriggerKind); + + +// Contains additional information about the context in which a completion +// request is triggered. +struct lsCompletionContext { + // How the completion was triggered. + lsCompletionTriggerKind triggerKind = lsCompletionTriggerKind::Invoked; + + // The trigger character (a single character) that has trigger code complete. + // Is undefined if `triggerKind !== CompletionTriggerKind.TriggerCharacter` + boost::optional triggerCharacter; + + MAKE_SWAP_METHOD(lsCompletionContext, triggerKind, triggerCharacter); +}; +MAKE_REFLECT_STRUCT(lsCompletionContext, triggerKind, triggerCharacter); + +struct lsCompletionParams : lsTextDocumentPositionParams { + // The completion context. This is only available it the client specifies to + // send this using + // `ClientCapabilities.textDocument.completion.contextSupport === true` + boost::optional context; + + MAKE_SWAP_METHOD(lsCompletionParams, textDocument, position, context); + +}; +MAKE_REFLECT_STRUCT(lsCompletionParams, textDocument, position, context); + + + + + + + + + +namespace TextDocumentComplete{ + + typedef std::pair< boost::optional>, boost::optional > Either; + +}; +extern void Reflect(Reader& visitor, TextDocumentComplete::Either& value); + +/** + * The Completion request is sent from the client to the server to compute + * completion items at a given cursor position. Completion items are + * presented in the IntelliSense user interface. If computing complete + * completion items is expensive servers can additional provide a handler + * for the resolve completion item request. This request is sent when a + * completion item is selected in the user interface. + * + * Registration Options: CompletionRegistrationOptions + */ +DEFINE_REQUEST_RESPONSE_TYPE(td_completion, lsCompletionParams, CompletionList , "textDocument/completion") + + + + + + + diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/declaration_definition.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/declaration_definition.h new file mode 100644 index 0000000000..aa20fce046 --- /dev/null +++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/declaration_definition.h @@ -0,0 +1,29 @@ +#pragma once + + +#include "LibLsp/JsonRpc/RequestInMessage.h" +#include "LibLsp/JsonRpc/lsResponseMessage.h" + +#include "LibLsp/lsp/lsTextDocumentPositionParams.h" +#include "LibLsp/lsp/out_list.h" + + +/** + * The go to declaration request is sent from the client to the server to resolve + * the declaration location of a symbol at a given text document position. + * + * Registration Options: TextDocumentRegistrationOptions + * + * Since version 3.14.0 + */ +DEFINE_REQUEST_RESPONSE_TYPE(td_declaration, lsTextDocumentPositionParams, LocationListEither::Either, "textDocument/declaration"); + +/** + * The goto definition request is sent from the client to the server to resolve + * the definition location of a symbol at a given text document position. + * + * Registration Options: TextDocumentRegistrationOptions + */ +DEFINE_REQUEST_RESPONSE_TYPE(td_definition, lsTextDocumentPositionParams, LocationListEither::Either, "textDocument/definition"); + + diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/didRenameFiles.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/didRenameFiles.h new file mode 100644 index 0000000000..e8a6235a00 --- /dev/null +++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/didRenameFiles.h @@ -0,0 +1,44 @@ +#pragma once + +#include "LibLsp/JsonRpc/RequestInMessage.h" +#include "LibLsp/JsonRpc/lsResponseMessage.h" +#include +#include "LibLsp/lsp/CodeActionParams.h" +#include "LibLsp/lsp/lsWorkspaceEdit.h" + + +class FileRenameEvent { +public: + std::string oldUri; + std::string newUri; + + FileRenameEvent() { + } + + FileRenameEvent(std::string oldUri, std::string newUri) { + this->oldUri = oldUri; + this->newUri = newUri; + } + MAKE_SWAP_METHOD(FileRenameEvent, oldUri, newUri); +}; +MAKE_REFLECT_STRUCT(FileRenameEvent, oldUri, newUri); + +class FileRenameParams { +public: + std::vector files; + + FileRenameParams() { + } + + FileRenameParams(std::vector& files) { + this->files = files; + } + MAKE_SWAP_METHOD(FileRenameParams, files); +}; +MAKE_REFLECT_STRUCT(FileRenameParams, files); + + +DEFINE_REQUEST_RESPONSE_TYPE(td_didRenameFiles, FileRenameParams, boost::optional, "java/didRenameFiles"); + + +DEFINE_REQUEST_RESPONSE_TYPE(td_willRenameFiles, FileRenameParams, boost::optional, "java/willRenameFiles"); diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/did_change.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/did_change.h new file mode 100644 index 0000000000..0887bf6602 --- /dev/null +++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/did_change.h @@ -0,0 +1,51 @@ +#pragma once + + +#include "LibLsp/JsonRpc/NotificationInMessage.h" +#include "LibLsp/JsonRpc/lsResponseMessage.h" + +#include "LibLsp/lsp/lsVersionedTextDocumentIdentifier.h" +#include "LibLsp/lsp/lsRange.h" +#include "LibLsp/lsp/lsDocumentUri.h" +struct lsTextDocumentContentChangeEvent { + // The range of the document that changed. + boost::optional range; + // The length of the range that got replaced. + boost::optional rangeLength; + // The new text of the range/document. + std::string text; + + MAKE_SWAP_METHOD(lsTextDocumentContentChangeEvent, range, rangeLength, text); +}; +MAKE_REFLECT_STRUCT(lsTextDocumentContentChangeEvent, range, rangeLength, text); + + +struct lsTextDocumentDidChangeParams { + lsVersionedTextDocumentIdentifier textDocument; + std::vector contentChanges; + + /** + * Legacy property to support protocol version 1.0 requests. + */ + + boost::optional uri; + + void swap(lsTextDocumentDidChangeParams& arg) noexcept + { + uri.swap(arg.uri); + contentChanges.swap(arg.contentChanges); + textDocument.swap(arg.textDocument); + } +}; +MAKE_REFLECT_STRUCT(lsTextDocumentDidChangeParams, + textDocument, + contentChanges, uri); + +/** + * The document change notification is sent from the client to the server to + * signal changes to a text document. + * + * Registration Options: TextDocumentChangeRegistrationOptions + */ +DEFINE_NOTIFICATION_TYPE(Notify_TextDocumentDidChange, lsTextDocumentDidChangeParams, "textDocument/didChange"); + diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/did_close.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/did_close.h new file mode 100644 index 0000000000..e2eaa2cfcd --- /dev/null +++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/did_close.h @@ -0,0 +1,33 @@ +#pragma once + + + +#include "LibLsp/JsonRpc/NotificationInMessage.h" + + + + +namespace TextDocumentDidClose { + + struct Params { + lsTextDocumentIdentifier textDocument; + void swap(Params& arg) noexcept + { + textDocument.swap(arg.textDocument); + } + + }; + +}; + +MAKE_REFLECT_STRUCT(TextDocumentDidClose::Params, textDocument); + +/** + * The document close notification is sent from the client to the server + * when the document got closed in the client. The document's truth now + * exists where the document's uri points to (e.g. if the document's uri is + * a file uri the truth now exists on disk). + * + * Registration Options: TextDocumentRegistrationOptions + */ +DEFINE_NOTIFICATION_TYPE(Notify_TextDocumentDidClose, TextDocumentDidClose::Params, "textDocument/didClose"); diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/did_open.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/did_open.h new file mode 100644 index 0000000000..7be7a735d6 --- /dev/null +++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/did_open.h @@ -0,0 +1,39 @@ +#pragma once + + +#include "LibLsp/JsonRpc/NotificationInMessage.h" + +#include "LibLsp/lsp/lsTextDocumentItem.h" + +// Open, view, change, close file +namespace TextDocumentDidOpen { + + struct Params { + lsTextDocumentItem textDocument; + + + + /** + * Legacy property to support protocol version 1.0 requests. + */ + boost::optional text; + + MAKE_SWAP_METHOD(TextDocumentDidOpen::Params, textDocument, text); + + }; + +} +MAKE_REFLECT_STRUCT(TextDocumentDidOpen::Params, textDocument, text); + +/** + * The document open notification is sent from the client to the server to + * signal newly opened text documents. The document's truth is now managed + * by the client and the server must not try to read the document's truth + * using the document's uri. + * + * Registration Options: TextDocumentRegistrationOptions + */; + + +DEFINE_NOTIFICATION_TYPE(Notify_TextDocumentDidOpen, TextDocumentDidOpen::Params, "textDocument/didOpen"); + diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/did_save.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/did_save.h new file mode 100644 index 0000000000..1ce386c415 --- /dev/null +++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/did_save.h @@ -0,0 +1,31 @@ +#pragma once + + + +#include "LibLsp/JsonRpc/NotificationInMessage.h" + + +namespace TextDocumentDidSave { + + struct Params { + // The document that was saved. + lsTextDocumentIdentifier textDocument; + + // Optional the content when saved. Depends on the includeText value + // when the save notifcation was requested. + boost::optional text; + + MAKE_SWAP_METHOD(TextDocumentDidSave::Params, textDocument, text); + }; + +}; +MAKE_REFLECT_STRUCT(TextDocumentDidSave::Params, textDocument, text); + +/** + * The document save notification is sent from the client to the server when + * the document for saved in the client. + * + * Registration Options: TextDocumentSaveRegistrationOptions + */ +DEFINE_NOTIFICATION_TYPE(Notify_TextDocumentDidSave, TextDocumentDidSave::Params, "textDocument/didSave"); + diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/documentColor.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/documentColor.h new file mode 100644 index 0000000000..23a6d08d87 --- /dev/null +++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/documentColor.h @@ -0,0 +1,73 @@ +#pragma once + +#include "LibLsp/JsonRpc/RequestInMessage.h" +#include "LibLsp/JsonRpc/lsResponseMessage.h" + +#include "LibLsp/lsp/lsTextDocumentIdentifier.h" +#include "LibLsp/lsp/lsRange.h" +#include +struct DocumentColorParams { + /** + * The text document. + */ + + lsTextDocumentIdentifier textDocument; + MAKE_SWAP_METHOD(DocumentColorParams, textDocument); +}; +MAKE_REFLECT_STRUCT(DocumentColorParams, textDocument); + +/** + * The document color request is sent from the client to the server to list all color references found in a given text + * document. Along with the range, a color value in RGB is returned. + * + * Clients can use the result to decorate color references in an editor. For example: + * - Color boxes showing the actual color next to the reference + * - Show a color picker when a color reference is edited + * + * Since version 3.6.0 + */ + +namespace TextDocument { + struct Color { + /** + * The red component of this color in the range [0-1]. + */ + double red = 0; + + /** + * The green component of this color in the range [0-1]. + */ + double green = 0; + + /** + * The blue component of this color in the range [0-1]. + */ + double blue = 0; + + /** + * The alpha component of this color in the range [0-1]. + */ + double alpha = 0; + MAKE_SWAP_METHOD(TextDocument::Color, red, green, blue, alpha) + }; +} +MAKE_REFLECT_STRUCT(TextDocument::Color, red, green, blue, alpha) + + +struct ColorInformation { + /** + * The range in the document where this color appers. + */ + + lsRange range; + + /** + * The actual color value for this color range. + */ + + TextDocument::Color color; + MAKE_SWAP_METHOD(ColorInformation, range, color) +}; +MAKE_REFLECT_STRUCT(ColorInformation,range,color) + +DEFINE_REQUEST_RESPONSE_TYPE(td_documentColor, DocumentColorParams,std::vector, "textDocument/documentColor"); \ No newline at end of file diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/document_link.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/document_link.h new file mode 100644 index 0000000000..536a625c4c --- /dev/null +++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/document_link.h @@ -0,0 +1,44 @@ +#pragma once + +#include "LibLsp/JsonRpc/RequestInMessage.h" +#include "LibLsp/JsonRpc/lsResponseMessage.h" + + +namespace TextDocumentDocumentLink { + + struct Params { + // The document to provide document links for. + lsTextDocumentIdentifier textDocument; + MAKE_SWAP_METHOD(Params, textDocument) + }; + +}; +MAKE_REFLECT_STRUCT(TextDocumentDocumentLink::Params, textDocument); + + + + +// A document link is a range in a text document that links to an internal or +// external resource, like another text document or a web site. +struct lsDocumentLink { + // The range this link applies to. + lsRange range; + // The uri this link points to. If missing a resolve request is sent later. + boost::optional target; + + boost::optional data; + + MAKE_SWAP_METHOD(lsDocumentLink, range, target, data) + +}; +MAKE_REFLECT_STRUCT(lsDocumentLink, range, target,data); + + +DEFINE_REQUEST_RESPONSE_TYPE(td_links, TextDocumentDocumentLink::Params, lsDocumentLink, "textDocument/documentLink"); + + +/** + * The document link resolve request is sent from the client to the server to resolve the target of a given document link. + */ +DEFINE_REQUEST_RESPONSE_TYPE(td_linkResolve, std::vector, lsDocumentLink, "documentLink/resolve"); + diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/document_symbol.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/document_symbol.h new file mode 100644 index 0000000000..8aa6e8b00e --- /dev/null +++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/document_symbol.h @@ -0,0 +1,55 @@ +#pragma once + + +#include "LibLsp/JsonRpc/RequestInMessage.h" +#include "LibLsp/JsonRpc/lsResponseMessage.h" + +#include "LibLsp/lsp/symbol.h" +#include "LibLsp/lsp/lsTextDocumentIdentifier.h" + /** + * The document symbol request is sent from the client to the server to list all symbols found in a given text document. + */ +struct lsDocumentSymbolParams { + lsTextDocumentIdentifier textDocument; + MAKE_SWAP_METHOD(lsDocumentSymbolParams, textDocument) +}; +MAKE_REFLECT_STRUCT(lsDocumentSymbolParams, textDocument); + + + +struct TextDocumentDocumentSymbol{ + typedef std::pair< boost::optional , boost::optional > Either; +}; +void Reflect(Reader& visitor, TextDocumentDocumentSymbol::Either& value); + + + +/** + * The document symbol request is sent from the client to the server to list all + * symbols found in a given text document. + * + * Registration Options: {@link TextDocumentRegistrationOptions} + * + *

+ * Caveat: although the return type allows mixing the + * {@link DocumentSymbol} and {@link SymbolInformation} instances into a list do + * not do it because the clients cannot accept a heterogeneous list. A list of + * {@code DocumentSymbol} instances is only a valid return value if the + * {@link DocumentSymbolCapabilities#getHierarchicalDocumentSymbolSupport() + * textDocument.documentSymbol.hierarchicalDocumentSymbolSupport} is + * {@code true}. More details on this difference between the LSP and the LSP4J + * can be found here. + *

+ */ + +//DEFINE_REQUEST_RESPONSE_TYPE(td_symbol, +// lsDocumentSymbolParams, +// std::vector ); +// + +DEFINE_REQUEST_RESPONSE_TYPE(td_symbol, + lsDocumentSymbolParams, + std::vector< lsDocumentSymbol >,"textDocument/documentSymbol" ); + + + diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/foldingRange.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/foldingRange.h new file mode 100644 index 0000000000..27977a4517 --- /dev/null +++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/foldingRange.h @@ -0,0 +1,62 @@ +#pragma once + + +#include "LibLsp/JsonRpc/RequestInMessage.h" +#include "LibLsp/JsonRpc/lsResponseMessage.h" + +#include "document_symbol.h" +#include "LibLsp/lsp/lsTextDocumentIdentifier.h" + + +struct FoldingRangeRequestParams { + /** + * The text document. + */ + + lsTextDocumentIdentifier textDocument; + MAKE_SWAP_METHOD(FoldingRangeRequestParams, textDocument) +}; +MAKE_REFLECT_STRUCT(FoldingRangeRequestParams, textDocument) + + +struct FoldingRange { + /** + * The zero-based line number from where the folded range starts. + */ + int startLine; + + /** + * The zero-based line number where the folded range ends. + */ + int endLine; + + /** + * The zero-based character offset from where the folded range starts. If not defined, defaults + * to the length of the start line. + */ + int startCharacter; + + /** + * The zero-based character offset before the folded range ends. If not defined, defaults to the + * length of the end line. + */ + int endCharacter; + + /** + * Describes the kind of the folding range such as `comment' or 'region'. The kind + * is used to categorize folding ranges and used by commands like 'Fold all comments'. See + * FoldingRangeKind for an enumeration of standardized kinds. + */ + std::string kind; + + MAKE_SWAP_METHOD(FoldingRange, startLine, endLine, startCharacter, endCharacter, kind) +}; +MAKE_REFLECT_STRUCT(FoldingRange,startLine,endLine,startCharacter,endCharacter,kind) + + +/** + * The folding range request is sent from the client to the server to return all folding + * ranges found in a given text document. + */ +DEFINE_REQUEST_RESPONSE_TYPE(td_foldingRange, FoldingRangeRequestParams, std::vector, "textDocument/foldingRange"); + diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/formatting.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/formatting.h new file mode 100644 index 0000000000..ad54e24bf9 --- /dev/null +++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/formatting.h @@ -0,0 +1,32 @@ +#pragma once +#include "LibLsp/lsp/lsFormattingOptions.h" + +#include "LibLsp/JsonRpc/RequestInMessage.h" +#include "LibLsp/JsonRpc/lsResponseMessage.h" + + +namespace TextDocumentFormatting { + + struct Params { + /** + * The document to format. + */ + lsTextDocumentIdentifier textDocument; + /** + * The format options. + */ + lsFormattingOptions options; + MAKE_SWAP_METHOD(Params, textDocument, options); + }; + +}; +MAKE_REFLECT_STRUCT(TextDocumentFormatting::Params, textDocument, options); +/** + * The document formatting request is sent from the client to the server to + * format a whole document. + * + * Registration Options: TextDocumentRegistrationOptions + */ +DEFINE_REQUEST_RESPONSE_TYPE(td_formatting, TextDocumentFormatting::Params, + std::vector, "textDocument/formatting"); + diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/highlight.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/highlight.h new file mode 100644 index 0000000000..332baf69e1 --- /dev/null +++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/highlight.h @@ -0,0 +1,18 @@ +#pragma once + +#include "LibLsp/JsonRpc/RequestInMessage.h" +#include "LibLsp/JsonRpc/lsResponseMessage.h" +#include "LibLsp/lsp/lsTextDocumentPositionParams.h" +#include "document_symbol.h" + +/** + * The references request is sent from the client to the server to resolve + * project-wide references for the symbol denoted by the given text document + * position. + * + * Registration Options: TextDocumentRegistrationOptions + */ + +DEFINE_REQUEST_RESPONSE_TYPE(td_highlight, lsTextDocumentPositionParams, + std::vector, "textDocument/documentHighlight"); + diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/hover.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/hover.h new file mode 100644 index 0000000000..5302316c6f --- /dev/null +++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/hover.h @@ -0,0 +1,55 @@ +#pragma once + + +#include "LibLsp/JsonRpc/RequestInMessage.h" +#include "LibLsp/JsonRpc/lsResponseMessage.h" + +#include "LibLsp/lsp/lsMarkedString.h" +#include "LibLsp/lsp/lsTextDocumentPositionParams.h" +#include "LibLsp/lsp/lsRange.h" +/** + * The hover request is sent from the client to the server to request hover + * information at a given text document position. + * + * Registration Options: TextDocumentRegistrationOptions + */ + +namespace TextDocumentHover +{ + typedef boost::optional< std::vector< std::pair, boost::optional> > > Left; + typedef std::pair< Left, boost::optional > Either; + struct Result { + /** + * The hover's content as markdown + */ + Either contents; + + /** + * An boost::optional range + */ + boost::optional range; + + MAKE_SWAP_METHOD(Result, contents, range) + }; +} +MAKE_REFLECT_STRUCT(TextDocumentHover::Result, contents, range); + +extern void Reflect(Reader& visitor, std::pair, boost::optional>& value); +extern void Reflect(Reader& visitor, TextDocumentHover::Either& value); + + +DEFINE_REQUEST_RESPONSE_TYPE(td_hover, lsTextDocumentPositionParams, TextDocumentHover::Result, "textDocument/hover") + +//struct Rsp_TextDocumentHover : ResponseMessage< TextDocumentHover::Result, Rsp_TextDocumentHover> { +// +//}; +//MAKE_REFLECT_STRUCT(Rsp_TextDocumentHover, +// jsonrpc, +// id, +// result); + +//MAKE_REFLECT_STRUCT_OPTIONALS_MANDATORY(Rsp_TextDocumentHover, +// jsonrpc, +// id, +// result); + diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/implementation.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/implementation.h new file mode 100644 index 0000000000..0d7851cb81 --- /dev/null +++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/implementation.h @@ -0,0 +1,16 @@ +#pragma once + + +#include "LibLsp/JsonRpc/RequestInMessage.h" +#include "LibLsp/lsp/out_list.h" + + +/** + * The goto implementation request is sent from the client to the server to resolve + * the implementation location of a symbol at a given text document position. + * + * Registration Options: TextDocumentRegistrationOptions + * + * Since version 3.6.0 + */ +DEFINE_REQUEST_RESPONSE_TYPE(td_implementation, lsTextDocumentPositionParams, LocationListEither::Either, "textDocument/implementation"); \ No newline at end of file diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/linkedEditingRange.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/linkedEditingRange.h new file mode 100644 index 0000000000..e4055d359f --- /dev/null +++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/linkedEditingRange.h @@ -0,0 +1,51 @@ +#pragma once + + +#include "LibLsp/JsonRpc/RequestInMessage.h" +#include "LibLsp/JsonRpc/lsResponseMessage.h" +#include "LibLsp/lsp/lsAny.h" +#include "LibLsp/lsp/symbol.h" +#include "LibLsp/lsp/lsTextDocumentPositionParams.h" +#include "LibLsp/lsp/lsRange.h" + + + +struct LinkedEditingRangeParams +{ + lsTextDocumentIdentifier textDocument; + lsPosition position; + + MAKE_SWAP_METHOD(LinkedEditingRangeParams, + textDocument, + position) +}; +MAKE_REFLECT_STRUCT(LinkedEditingRangeParams, + textDocument, + position) + + +struct LinkedEditingRanges +{ + /** + * A list of ranges that can be renamed together. The ranges must have + * identical length and contain identical text content. The ranges cannot overlap. + */ + std::vector ranges; + + /** + * An optional word pattern (regular expression) that describes valid contents for + * the given ranges. If no pattern is provided, the client configuration's word + * pattern will be used. + */ + + boost::optional wordPattern; + MAKE_SWAP_METHOD(LinkedEditingRanges, + ranges, + wordPattern) +}; + +MAKE_REFLECT_STRUCT(LinkedEditingRanges, + ranges, + wordPattern) +DEFINE_REQUEST_RESPONSE_TYPE(td_linkedEditingRange, LinkedEditingRangeParams, + boost::optional>,"textDocument/linkedEditingRange") \ No newline at end of file diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/onTypeFormatting.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/onTypeFormatting.h new file mode 100644 index 0000000000..df14ea5d3d --- /dev/null +++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/onTypeFormatting.h @@ -0,0 +1,44 @@ +#pragma once + + +#include "LibLsp/JsonRpc/RequestInMessage.h" +#include "LibLsp/JsonRpc/lsResponseMessage.h" + +#include "LibLsp/lsp/lsFormattingOptions.h" +#include "LibLsp/lsp/lsTextDocumentIdentifier.h" +#include "LibLsp/lsp/lsRange.h" +#include "LibLsp/lsp/lsTextEdit.h" + + +struct lsDocumentOnTypeFormattingParams +{ + lsTextDocumentIdentifier textDocument; + lsFormattingOptions options; + + lsPosition position; + + /** + * The character that has been typed. + */ + + std::string ch; + + MAKE_SWAP_METHOD(lsDocumentOnTypeFormattingParams, + textDocument, + position, + options, ch); +}; +MAKE_REFLECT_STRUCT(lsDocumentOnTypeFormattingParams, + textDocument, + position, + options,ch); + +/** + * The document range formatting request is sent from the client to the + * server to format a given range in a document. + * + * Registration Options: TextDocumentRegistrationOptions + */ +DEFINE_REQUEST_RESPONSE_TYPE(td_onTypeFormatting, + lsDocumentOnTypeFormattingParams, std::vector, "textDocument/onTypeFormatting"); + diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/prepareRename.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/prepareRename.h new file mode 100644 index 0000000000..8c653d9864 --- /dev/null +++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/prepareRename.h @@ -0,0 +1,40 @@ +#pragma once + +#include "LibLsp/JsonRpc/RequestInMessage.h" +#include "LibLsp/JsonRpc/lsResponseMessage.h" + +#include "LibLsp/lsp/lsWorkspaceEdit.h" +#include "LibLsp/lsp/lsTextDocumentPositionParams.h" + +/** + * The rename request is sent from the client to the server to do a + * workspace wide rename of a symbol. + * + * Registration Options: TextDocumentRegistrationOptions + */ +struct PrepareRenameResult{ + /** + * The range of the string to rename + */ + + lsRange range; + +/** + * A placeholder text of the string content to be renamed. + */ + + std::string placeholder; + + MAKE_SWAP_METHOD(PrepareRenameResult, range, placeholder) + +}; +MAKE_REFLECT_STRUCT(PrepareRenameResult,range,placeholder) + + + +typedef std::pair< boost::optional< lsRange>, boost::optional> TextDocumentPrepareRenameResult; +extern void Reflect(Reader& visitor, TextDocumentPrepareRenameResult& value); + + +DEFINE_REQUEST_RESPONSE_TYPE(td_prepareRename, + lsTextDocumentPositionParams, TextDocumentPrepareRenameResult, "textDocument/prepareRename"); \ No newline at end of file diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/publishDiagnostics.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/publishDiagnostics.h new file mode 100644 index 0000000000..bf28104bbb --- /dev/null +++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/publishDiagnostics.h @@ -0,0 +1,28 @@ +#pragma once + +#include "LibLsp/JsonRpc/NotificationInMessage.h" +#include "LibLsp/lsp/lsp_diagnostic.h" + +// Diagnostics +namespace TextDocumentPublishDiagnostics{ + struct Params { + // The URI for which diagnostic information is reported. + lsDocumentUri uri; + + // An array of diagnostic information items. + std::vector diagnostics; + MAKE_SWAP_METHOD(Params,uri,diagnostics); + }; + + +}; +MAKE_REFLECT_STRUCT(TextDocumentPublishDiagnostics::Params, + uri, + diagnostics); + +/** + * Diagnostics notifications are sent from the server to the client to + * signal results of validation runs. + */ +DEFINE_NOTIFICATION_TYPE(Notify_TextDocumentPublishDiagnostics, TextDocumentPublishDiagnostics::Params, "textDocument/publishDiagnostics"); + diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/range_formatting.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/range_formatting.h new file mode 100644 index 0000000000..b2fe750af1 --- /dev/null +++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/range_formatting.h @@ -0,0 +1,35 @@ +#pragma once + + +#include "LibLsp/JsonRpc/RequestInMessage.h" +#include "LibLsp/JsonRpc/lsResponseMessage.h" + +#include "LibLsp/lsp/lsFormattingOptions.h" + + +struct lsTextDocumentRangeFormattingParams { + lsTextDocumentIdentifier textDocument; + lsRange range; + lsFormattingOptions options; + + MAKE_SWAP_METHOD(lsTextDocumentRangeFormattingParams, + textDocument, + range, + options) +}; +MAKE_REFLECT_STRUCT(lsTextDocumentRangeFormattingParams, + textDocument, + range, + options); + +/** + * The document range formatting request is sent from the client to the + * server to format a given range in a document. + * + * Registration Options: TextDocumentRegistrationOptions + */ +DEFINE_REQUEST_RESPONSE_TYPE(td_rangeFormatting, lsTextDocumentRangeFormattingParams, std::vector, + "textDocument/rangeFormatting"); + + + diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/references.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/references.h new file mode 100644 index 0000000000..2376912756 --- /dev/null +++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/references.h @@ -0,0 +1,48 @@ +#pragma once + + +#include "LibLsp/JsonRpc/RequestInMessage.h" +#include "LibLsp/JsonRpc/lsResponseMessage.h" + +#include "LibLsp/lsp/symbol.h" + + +namespace TextDocumentReferences { + + struct lsReferenceContext { + // Include the declaration of the current symbol. + boost::optional includeDeclaration; + MAKE_REFLECT_STRUCT(lsReferenceContext, + includeDeclaration) + }; + struct Params { + lsTextDocumentIdentifier textDocument; + lsPosition position; + lsReferenceContext context; + MAKE_SWAP_METHOD(Params, + textDocument, + position, + context) + + }; + +}; +MAKE_REFLECT_STRUCT(TextDocumentReferences::lsReferenceContext, + includeDeclaration); +MAKE_REFLECT_STRUCT(TextDocumentReferences::Params, + textDocument, + position, + context); + + + + +/** + * The references request is sent from the client to the server to resolve + * project-wide references for the symbol denoted by the given text document + * position. + * + * Registration Options: TextDocumentRegistrationOptions + */ +DEFINE_REQUEST_RESPONSE_TYPE(td_references, TextDocumentReferences::Params, + std::vector, "textDocument/references"); diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/rename.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/rename.h new file mode 100644 index 0000000000..35895f0f4f --- /dev/null +++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/rename.h @@ -0,0 +1,41 @@ +#pragma once + + +#include "LibLsp/JsonRpc/RequestInMessage.h" +#include "LibLsp/JsonRpc/lsResponseMessage.h" + +#include "LibLsp/lsp/lsWorkspaceEdit.h" +#include "LibLsp/lsp/lsTextDocumentIdentifier.h" + +namespace TextDocumentRename { + + struct Params { + // The document to format. + lsTextDocumentIdentifier textDocument; + + // The position at which this request was sent. + lsPosition position; + + // The new name of the symbol. If the given name is not valid the + // request must return a [ResponseError](#ResponseError) with an + // appropriate message set. + std::string newName; + MAKE_SWAP_METHOD(Params, + textDocument, + position, + newName); + }; + +}; +MAKE_REFLECT_STRUCT(TextDocumentRename::Params, + textDocument, + position, + newName); +/** + * The rename request is sent from the client to the server to do a + * workspace wide rename of a symbol. + * + * Registration Options: TextDocumentRegistrationOptions + */ +DEFINE_REQUEST_RESPONSE_TYPE(td_rename, TextDocumentRename::Params, lsWorkspaceEdit, "textDocument/rename"); + diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/resolveCodeLens.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/resolveCodeLens.h new file mode 100644 index 0000000000..0723985160 --- /dev/null +++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/resolveCodeLens.h @@ -0,0 +1,10 @@ +#pragma once + + +#include "LibLsp/JsonRpc/RequestInMessage.h" +#include "LibLsp/JsonRpc/lsResponseMessage.h" + +#include "code_lens.h" + +DEFINE_REQUEST_RESPONSE_TYPE(codeLens_resolve, lsCodeLens, lsCodeLens, "codeLens/resolve") + diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/resolveCompletionItem.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/resolveCompletionItem.h new file mode 100644 index 0000000000..f5576894ed --- /dev/null +++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/resolveCompletionItem.h @@ -0,0 +1,21 @@ +#pragma once + + +#include "LibLsp/JsonRpc/RequestInMessage.h" +#include "LibLsp/JsonRpc/lsResponseMessage.h" + +#include +#include "LibLsp/lsp/lsp_completion.h" +#include "LibLsp/lsp/lsTextDocumentPositionParams.h" +#include "completion.h" + +/** + * The request is sent from the client to the server to resolve additional + * information for a given completion item. + */ +DEFINE_REQUEST_RESPONSE_TYPE(completionItem_resolve, lsCompletionItem, lsCompletionItem, "completionItem/resolve"); + + + + + diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/resolveTypeHierarchy.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/resolveTypeHierarchy.h new file mode 100644 index 0000000000..eab5f838fc --- /dev/null +++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/resolveTypeHierarchy.h @@ -0,0 +1,31 @@ +#pragma once + + + +#include "LibLsp/JsonRpc/RequestInMessage.h" +#include "LibLsp/JsonRpc/lsResponseMessage.h" + +#include "LibLsp/lsp/symbol.h" +#include "typeHierarchy.h" + +struct ResolveTypeHierarchyItemParams { + /** + * The hierarchy item to resolve. + */ + + TypeHierarchyItem item; + + /** + * The number of hierarchy levels to resolve. {@code 0} indicates no hierarchy level. + */ + boost::optional resolve; + + /** + * The direction of the type hierarchy resolution. + */ + + TypeHierarchyDirection direction; + MAKE_SWAP_METHOD(ResolveTypeHierarchyItemParams, item, resolve, direction) +}; +MAKE_REFLECT_STRUCT(ResolveTypeHierarchyItemParams,item,resolve,direction) +DEFINE_REQUEST_RESPONSE_TYPE(typeHierarchy_resolve, ResolveTypeHierarchyItemParams, TypeHierarchyItem, "typeHierarchy/resolve") diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/selectionRange.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/selectionRange.h new file mode 100644 index 0000000000..47590e4152 --- /dev/null +++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/selectionRange.h @@ -0,0 +1,52 @@ +#pragma once + + +#include "LibLsp/JsonRpc/RequestInMessage.h" +#include "LibLsp/JsonRpc/lsResponseMessage.h" + +#include "LibLsp/lsp/lsPosition.h" +#include "LibLsp/lsp/lsTextDocumentIdentifier.h" + +struct SelectionRangeParams { + /** + * The text document. + */ + + lsTextDocumentIdentifier textDocument; + + /** + * The positions inside the text document. + */ + + std::vector positions; + + MAKE_SWAP_METHOD(SelectionRangeParams, textDocument, positions) + +}; +MAKE_REFLECT_STRUCT(SelectionRangeParams, textDocument, positions) + +struct SelectionRange { + /** + * The [range](#Range) of this selection range. + */ + + lsRange range; + + /** + * The parent selection range containing this range. Therefore `parent.range` must contain `this.range`. + */ + boost::optional parent; + MAKE_SWAP_METHOD(SelectionRange, range, parent) +}; + +extern void Reflect(Reader& visitor, boost::optional& value); +extern void Reflect(Writer& visitor, SelectionRange* value); + +MAKE_REFLECT_STRUCT(SelectionRange,range,parent) +/** + * The {@code textDocument/selectionRange} request is sent from the client to the server to return + * suggested selection ranges at an array of given positions. A selection range is a range around + * the cursor position which the user might be interested in selecting. + */ +DEFINE_REQUEST_RESPONSE_TYPE(td_selectionRange, SelectionRangeParams, std::vector, "textDocument/selectionRange"); + diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/semanticHighlighting.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/semanticHighlighting.h new file mode 100644 index 0000000000..32bc86f5fb --- /dev/null +++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/semanticHighlighting.h @@ -0,0 +1,66 @@ +#pragma once +#include "LibLsp/lsp/lsDocumentUri.h" +#include "LibLsp/lsp/lsVersionedTextDocumentIdentifier.h" + +#include "LibLsp/JsonRpc/NotificationInMessage.h" +#include "LibLsp/JsonRpc/lsResponseMessage.h" + +/** + * Represents a semantic highlighting information that has to be applied on a specific line of the text document. + */ + +struct SemanticHighlightingInformation { + /** + * The zero-based line position in the text document. + */ + int line = 0; + + /** + * A base64 encoded string representing every single highlighted ranges in the line with its start position, length + * and the "lookup table" index of of the semantic highlighting + * TextMate scopes. If the {@code tokens} is empty or not defined, then no highlighted positions are available for the line. + */ + std::string tokens; + + MAKE_SWAP_METHOD(SemanticHighlightingInformation, line, tokens) +}; + +MAKE_REFLECT_STRUCT(SemanticHighlightingInformation, line, tokens); + +/** + * Parameters for the semantic highlighting (server-side) push notification. + */ + +struct SemanticHighlightingParams { + /** + * The text document that has to be decorated with the semantic highlighting information. + */ + + lsVersionedTextDocumentIdentifier textDocument; + + /** + * An array of semantic highlighting information. + */ + + std::vector lines; + + MAKE_SWAP_METHOD(SemanticHighlightingParams, textDocument, lines) + +}; +MAKE_REFLECT_STRUCT(SemanticHighlightingParams, textDocument, lines); +/** + * The {@code textDocument/semanticHighlighting} notification is pushed from the server to the client + * to inform the client about additional semantic highlighting information that has to be applied + * on the text document. It is the server's responsibility to decide which lines are included in + * the highlighting information. In other words, the server is capable of sending only a delta + * information. For instance, after opening the text document ({@code DidOpenTextDocumentNotification}) + * the server sends the semantic highlighting information for the entire document, but if the server + * receives a {@code DidChangeTextDocumentNotification}, it pushes the information only about + * the affected lines in the document. + * + *

+ * Note: the {@code textDocument/semanticHighlighting} + * language feature is not yet part of the official LSP specification. + */ +DEFINE_NOTIFICATION_TYPE(Notify_semanticHighlighting, SemanticHighlightingParams, "textDocument/semanticHighlighting"); \ No newline at end of file diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/signature_help.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/signature_help.h new file mode 100644 index 0000000000..2a83645901 --- /dev/null +++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/signature_help.h @@ -0,0 +1,92 @@ +#pragma once + + +#include "LibLsp/JsonRpc/RequestInMessage.h" +#include "LibLsp/JsonRpc/lsResponseMessage.h" +#include "LibLsp/lsp/lsMarkedString.h" +#include "LibLsp/lsp/lsTextDocumentPositionParams.h" + +extern void Reflect(Reader& visitor, + std::pair, boost::optional>& value); + + + +// Represents a parameter of a callable-signature. A parameter can +// have a label and a doc-comment. +struct lsParameterInformation { + // The label of this parameter. Will be shown in + // the UI. + std::string label; + + // The human-readable doc-comment of this parameter. Will be shown + // in the UI but can be omitted. + boost::optional< std::pair< boost::optional , boost::optional > > documentation; + + MAKE_SWAP_METHOD(lsParameterInformation, label, documentation) +}; +MAKE_REFLECT_STRUCT(lsParameterInformation, label, documentation); + +// Represents the signature of something callable. A signature +// can have a label, like a function-name, a doc-comment, and +// a set of parameters. +struct lsSignatureInformation { + // The label of this signature. Will be shown in + // the UI. + std::string label; + + // The human-readable doc-comment of this signature. Will be shown + // in the UI but can be omitted. + boost::optional< std::pair< boost::optional, boost::optional > > documentation; + + // The parameters of this signature. + std::vector parameters; + + MAKE_SWAP_METHOD(lsSignatureInformation, label, documentation, parameters) +}; +MAKE_REFLECT_STRUCT(lsSignatureInformation, label, documentation, parameters); + +// Signature help represents the signature of something +// callable. There can be multiple signature but only one +// active and only one active parameter. +struct lsSignatureHelp { + // One or more signatures. + std::vector signatures; + + // The active signature. If omitted or the value lies outside the + // range of `signatures` the value defaults to zero or is ignored if + // `signatures.length === 0`. Whenever possible implementors should + // make an active decision about the active signature and shouldn't + // rely on a default value. + // In future version of the protocol this property might become + // mandantory to better express this. + boost::optional activeSignature; + + // The active parameter of the active signature. If omitted or the value + // lies outside the range of `signatures[activeSignature].parameters` + // defaults to 0 if the active signature has parameters. If + // the active signature has no parameters it is ignored. + // In future version of the protocol this property might become + // mandantory to better express the active parameter if the + // active signature does have any. + boost::optional activeParameter; + + + MAKE_SWAP_METHOD(lsSignatureHelp, + signatures, + activeSignature, + activeParameter) +}; +MAKE_REFLECT_STRUCT(lsSignatureHelp, + signatures, + activeSignature, + activeParameter); + + + +/** + * The signature help request is sent from the client to the server to + * request signature information at a given cursor position. + * + * Registration Options: SignatureHelpRegistrationOptions + */ +DEFINE_REQUEST_RESPONSE_TYPE(td_signatureHelp, lsTextDocumentPositionParams, lsSignatureHelp, "textDocument/signatureHelp"); \ No newline at end of file diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/typeHierarchy.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/typeHierarchy.h new file mode 100644 index 0000000000..b554d751f3 --- /dev/null +++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/typeHierarchy.h @@ -0,0 +1,133 @@ +#pragma once + +#include "LibLsp/JsonRpc/RequestInMessage.h" +#include "LibLsp/JsonRpc/lsResponseMessage.h" +#include "LibLsp/lsp/lsTextDocumentPositionParams.h" +#include "LibLsp/lsp/symbol.h" +#include "LibLsp/lsp/lsAny.h" +/** + * The {@code textDocument/typeHierarchy} request is sent from the client to the + * server to retrieve a {@link TypeHierarchyItem type hierarchy item} based on + * the {@link TypeHierarchyParams cursor position in the text document}. This + * request would also allow to specify if the item should be resolved and + * whether sub- or supertypes are to be resolved. If no type hierarchy item can + * be found under the given text document position, resolves to {@code null}. + * + *

+ * Note: the {@code textDocument/typeHierarchy} + * language feature is not yet part of the official LSP specification. + */ +enum class TypeHierarchyDirection : uint32_t{ + + /** + * Flag for retrieving/resolving the subtypes. Value: {@code 0}. + */ + Children = 0, + + /** + * Flag to use when retrieving/resolving the supertypes. Value: {@code 1}. + */ + Parents =1, + + /** + * Flag for resolving both the super- and subtypes. Value: {@code 2}. + */ + Both=2 +}; +void Reflect(Reader& reader, TypeHierarchyDirection& value); + + +void Reflect(Writer& writer, TypeHierarchyDirection& value); + +struct TypeHierarchyParams :public lsTextDocumentPositionParams +{ + boost::optional resolve; + boost::optional direction ; + + MAKE_SWAP_METHOD(TypeHierarchyParams, textDocument, position, resolve, direction) +}; +MAKE_REFLECT_STRUCT(TypeHierarchyParams, textDocument, position, resolve, direction); + + + + + +/** + * Representation of an item that carries type information (such as class, interface, enumeration, etc) with additional parentage details. + */ + +struct TypeHierarchyItem { + /** + * The human readable name of the hierarchy item. + */ + + std::string name; + + /** + * Optional detail for the hierarchy item. It can be, for instance, the signature of a function or method. + */ + boost::optional + detail; + + /** + * The kind of the hierarchy item. For instance, class or interface. + */ + + SymbolKind kind; + + /** + * {@code true} if the hierarchy item is deprecated. Otherwise, {@code false}. It is {@code false} by default. + */ + + boost::optional deprecated; + + /** + * The URI of the text document where this type hierarchy item belongs to. + */ + + lsDocumentUri uri; + + /** + * The range enclosing this type hierarchy item not including leading/trailing whitespace but everything else + * like comments. This information is typically used to determine if the clients cursor is inside the type + * hierarchy item to reveal in the symbol in the UI. + * + * @see TypeHierarchyItem#selectionRange + */ + + lsRange range; + + /** + * The range that should be selected and revealed when this type hierarchy item is being picked, e.g the name of a function. + * Must be contained by the the {@link TypeHierarchyItem#getRange range}. + * + * @see TypeHierarchyItem#range + */ + + lsRange selectionRange; + + /** + * If this type hierarchy item is resolved, it contains the direct parents. Could be empty if the item does not have any + * direct parents. If not defined, the parents have not been resolved yet. + */ + boost::optional< std::vector > parents; + + /** + * If this type hierarchy item is resolved, it contains the direct children of the current item. + * Could be empty if the item does not have any descendants. If not defined, the children have not been resolved. + */ + boost::optional< std::vector > children; + + /** + * An boost::optional data field can be used to identify a type hierarchy item in a resolve request. + */ + boost::optional data; + + MAKE_SWAP_METHOD(TypeHierarchyItem, name, detail, kind, deprecated, uri, range, selectionRange, parents, children, data) +}; +MAKE_REFLECT_STRUCT(TypeHierarchyItem, name, detail, kind, deprecated, uri, range, selectionRange, parents, children, data); + + + +DEFINE_REQUEST_RESPONSE_TYPE(td_typeHierarchy, TypeHierarchyParams, TypeHierarchyItem, "textDocument/typeHierarchy"); \ No newline at end of file diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/type_definition.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/type_definition.h new file mode 100644 index 0000000000..38ced43b42 --- /dev/null +++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/type_definition.h @@ -0,0 +1,16 @@ +#pragma once + + +#include "LibLsp/JsonRpc/RequestInMessage.h" +#include "LibLsp/lsp/out_list.h" + +/** + * The goto type definition request is sent from the client to the server to resolve + * the type definition location of a symbol at a given text document position. + * + * Registration Options: TextDocumentRegistrationOptions + * + * Since version 3.6.0 + */ +DEFINE_REQUEST_RESPONSE_TYPE(td_typeDefinition, + lsTextDocumentPositionParams, LocationListEither::Either, "textDocument/typeDefinition"); \ No newline at end of file diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/willSave.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/willSave.h new file mode 100644 index 0000000000..84aa0badaa --- /dev/null +++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/textDocument/willSave.h @@ -0,0 +1,71 @@ +#pragma once + + +#include "LibLsp/JsonRpc/RequestInMessage.h" +#include "LibLsp/JsonRpc/lsResponseMessage.h" + +#include "LibLsp/lsp/lsTextDocumentIdentifier.h" + +namespace WillSaveTextDocumentParams { + + /** + * Represents reasons why a text document is saved. + */ + enum class TextDocumentSaveReason { + + /** + * Manually triggered, e.g. by the user pressing save, by starting debugging, + * or by an API call. + */ + Manual=(1), + + /** + * Automatic after a delay. + */ + AfterDelay=(2), + + /** + * When the editor lost focus. + */ + FocusOut=(3) + }; + + struct Params { + /** + * The document that will be saved. + */ + lsTextDocumentIdentifier textDocument; + + /* + * A reason why a text document is saved. + */ + + boost::optional reason; + + MAKE_SWAP_METHOD(Params, textDocument, reason); + }; + +}; +MAKE_REFLECT_TYPE_PROXY(WillSaveTextDocumentParams::TextDocumentSaveReason); + +MAKE_REFLECT_STRUCT(WillSaveTextDocumentParams::Params, textDocument, reason); + +/** + * The document save notification is sent from the client to the server when + * the document for saved in the client. + * + * Registration Options: TextDocumentSaveRegistrationOptions + */ +DEFINE_NOTIFICATION_TYPE(td_willSave, WillSaveTextDocumentParams::Params, "textDocument/willSave"); + +/** + * The document will save request is sent from the client to the server before the document is actually saved. + * The request can return an array of TextEdits which will be applied to the text document before it is saved. + * Please note that clients might drop results if computing the text edits took too long or if a server constantly fails on this request. + * This is done to keep the save fast and reliable. + * + * Registration Options: TextDocumentRegistrationOptions + */ +DEFINE_REQUEST_RESPONSE_TYPE(td_willSaveWaitUntil, + WillSaveTextDocumentParams::Params, std::vector, "textDocument/willSaveWaitUntil"); + diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/utils.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/utils.h new file mode 100644 index 0000000000..796b5d2569 --- /dev/null +++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/utils.h @@ -0,0 +1,141 @@ +#pragma once +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "lsPosition.h" + + +namespace lsp +{ + + +// Returns true if |value| starts/ends with |start| or |ending|. +bool StartsWith(std::string value, std::string start); +bool EndsWith(std::string value, std::string ending); +bool AnyStartsWith(const std::vector& values, + const std::string& start); +bool StartsWithAny(const std::string& value, + const std::vector& startings); +bool EndsWithAny(const std::string& value, + const std::vector& endings); +bool FindAnyPartial(const std::string& value, + const std::vector& values); +// Returns the dirname of |path|, i.e. "foo/bar.cc" => "foo/", "foo" => "./", +// "/foo" => "/". The result always ends in '/'. +std::string GetDirName(std::string path); +// Returns the basename of |path|, ie, "foo/bar.cc" => "bar.cc". +std::string GetBaseName(const std::string& path); +// Returns |path| without the filetype, ie, "foo/bar.cc" => "foo/bar". +std::string StripFileType(const std::string& path); + +std::string ReplaceAll(const std::string& source, + const std::string& from, + const std::string& to); + +std::vector SplitString(const std::string& str, + const std::string& delimiter); + +template +std::string StringJoinMap(const TValues& values, + const TMap& map, + const std::string& sep = ", ") { + std::string result; + bool first = true; + for (auto& entry : values) { + if (!first) + result += sep; + first = false; + result += map(entry); + } + return result; +} + +template +std::string StringJoin(const TValues& values, const std::string& sep = ", ") { + return StringJoinMap(values, [](const std::string& entry) { return entry; }, + sep); +} + +template +bool ContainsValue(const TCollection& collection, const TValue& value) { + return std::find(std::begin(collection), std::end(collection), value) != + std::end(collection); +} + + +// Ensures that |path| ends in a slash. +void EnsureEndsInSlash(std::string& path); + +// Converts a file path to one that can be used as filename. +// e.g. foo/bar.c => foo_bar.c +std::string EscapeFileName(std::string path); + +// FIXME: Move ReadContent into ICacheManager? +bool FileExists(const std::string& filename); +boost::optional ReadContent(const AbsolutePath& filename); +std::vector ReadLinesWithEnding(const AbsolutePath& filename); + +bool WriteToFile(const std::string& filename, const std::string& content); + + +template +void RemoveIf(std::vector* vec, Fn predicate) { + vec->erase(std::remove_if(vec->begin(), vec->end(), predicate), vec->end()); +} + +std::string FormatMicroseconds(long long microseconds); + +// Makes sure all newlines in |output| are in \r\n format. +std::string UpdateToRnNewlines(std::string output); + +// Utility methods to check if |path| is absolute. +bool IsAbsolutePath(const std::string& path); +bool IsUnixAbsolutePath(const std::string& path); +bool IsWindowsAbsolutePath(const std::string& path); + +bool IsDirectory(const std::string& path); + +// string <-> wstring conversion (UTF-16), e.g. for use with Window's wide APIs. + std::string ws2s(std::wstring const& wstr); + std::wstring s2ws(std::string const& str); + +AbsolutePath NormalizePath(const std::string& path, + bool ensure_exists = true, + bool force_lower_on_windows = true); + + +int GetOffsetForPosition(lsPosition position, const std::string& content); + +// Finds the position for an |offset| in |content|. +lsPosition GetPositionForOffset(int offset, const std::string& content); + +// Utility method to find a position for the given character. +lsPosition CharPos(const std::string& search, + char character, + int character_offset = 0); + + + void scanDirsNoRecursive(const std::wstring& rootPath, std::vector& ret); + + void scanFilesUseRecursive(const std::wstring& rootPath, std::vector& ret, + std::wstring strSuf = L""); + + void scanFileNamesUseRecursive(const std::wstring& rootPath, std::vector& ret, + std::wstring strSuf = L""); + void scanFileNamesUseRecursive(const std::string& rootPath, std::vector& ret, + std::string strSuf = ""); + + void scanFilesUseRecursive(const std::string& rootPath, std::vector& ret, + std::string strSuf = ""); + + void scanDirsUseRecursive(const std::wstring& rootPath, std::vector& ret); + +} diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/windows/MessageNotify.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/windows/MessageNotify.h new file mode 100644 index 0000000000..8499304f55 --- /dev/null +++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/windows/MessageNotify.h @@ -0,0 +1,83 @@ +#pragma once + +#include "LibLsp/JsonRpc/NotificationInMessage.h" +#include "LibLsp/JsonRpc/RequestInMessage.h" +#include "LibLsp/JsonRpc/lsResponseMessage.h" + +// Show a message to the user. +enum class lsMessageType : int { Error = 1, Warning = 2, Info = 3, Log = 4 }; +MAKE_REFLECT_TYPE_PROXY(lsMessageType) +struct MessageParams { +/** + * The message type. + */ + + lsMessageType type = lsMessageType::Error; + +/** + * The actual message. + */ + std::string message; + + void swap(MessageParams& arg) noexcept { + lsMessageType temp = type; + type = arg.type; + arg.type = temp; + message.swap(arg.message); + } +}; +MAKE_REFLECT_STRUCT(MessageParams, type, message) + + /** + * The log message notification is send from the server to the client to ask + * the client to log a particular message. + */ +DEFINE_NOTIFICATION_TYPE(Notify_LogMessage, MessageParams, "window/logMessage") + + +/** + * The show message notification is sent from a server to a client to ask + * the client to display a particular message in the user interface. + */ +DEFINE_NOTIFICATION_TYPE(Notify_ShowMessage, MessageParams, "window/showMessage") + + + +/** + * The show message request is sent from a server to a client to ask the client to display a particular message in the + * user class. In addition to the show message notification the request allows to pass actions and to wait for an + * answer from the client. + */ +struct MessageActionItem { + /** + * A short title like 'Retry', 'Open Log' etc. + */ + + std::string title; + MAKE_SWAP_METHOD(MessageActionItem, title) +}; +MAKE_REFLECT_STRUCT(MessageActionItem, title); + + +struct ShowMessageRequestParams :public MessageParams { + /** + * The message action items to present. + */ + std::vector actions; + + MAKE_SWAP_METHOD(ShowMessageRequestParams, type, message, actions) + +}; +MAKE_REFLECT_STRUCT(ShowMessageRequestParams, type, message, actions) + +/** +* The show message request is sent from a server to a client to ask the +* client to display a particular message in the user interface. In addition +* to the show message notification the request allows to pass actions and +* to wait for an answer from the client. +*/ + +DEFINE_REQUEST_RESPONSE_TYPE(WindowShowMessage, ShowMessageRequestParams, MessageActionItem, "window/showMessage") + + + diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/working_files.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/working_files.h new file mode 100644 index 0000000000..e305fee8d0 --- /dev/null +++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/working_files.h @@ -0,0 +1,72 @@ +#pragma once + +#include "LibLsp/lsp/lsp_diagnostic.h" +#include "LibLsp/lsp/AbsolutePath.h" +#include "LibLsp/lsp/textDocument/did_change.h" +#include "LibLsp/lsp/textDocument/did_close.h" +#include "LibLsp/lsp/textDocument/did_open.h" +#include +#include +#include +#include "Directory.h" + +struct WorkingFiles; +struct WorkingFilesData; +struct WorkingFile { + + int version = 0; + AbsolutePath filename; + Directory directory; + WorkingFiles& parent; + std::atomic counter; + WorkingFile(WorkingFiles& ,const AbsolutePath& filename, const std::string& buffer_content); + WorkingFile(WorkingFiles&, const AbsolutePath& filename, std::string&& buffer_content); + const std::string& GetContentNoLock() const + { + return buffer_content; + } +protected: + friend struct WorkingFiles; + std::string buffer_content; +}; + +struct WorkingFiles { + + WorkingFiles(); + ~WorkingFiles(); + + void CloseFilesInDirectory(const std::vector&); + std::shared_ptr OnOpen(lsTextDocumentItem& open); + std::shared_ptr OnChange(const lsTextDocumentDidChangeParams& change); + bool OnClose(const lsTextDocumentIdentifier& close); + std::shared_ptr OnSave(const lsTextDocumentIdentifier& _save); + + bool GetFileBufferContent(const AbsolutePath& filename, std::wstring& out) + { + auto file = GetFileByFilename(filename); + if(!file) + return false; + return GetFileBufferContent(file, out); + } + bool GetFileBufferContent(const AbsolutePath& filename,std::string& out) + { + auto file = GetFileByFilename(filename); + if (!file) + return false; + return GetFileBufferContent(file, out); + } + bool GetFileBufferContent(std::shared_ptr&, std::string& out); + bool GetFileBufferContent(std::shared_ptr&, std::wstring& out); + + + // Find the file with the given filename. + std::shared_ptr GetFileByFilename(const AbsolutePath& filename); + + void Clear(); +private: + std::shared_ptr GetFileByFilenameNoLock(const AbsolutePath& filename); + + WorkingFilesData* d_ptr; + + +}; diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/workspace/applyEdit.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/workspace/applyEdit.h new file mode 100644 index 0000000000..7e2d8bee0a --- /dev/null +++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/workspace/applyEdit.h @@ -0,0 +1,42 @@ +#pragma once + +#include "LibLsp/JsonRpc/RequestInMessage.h" +#include "LibLsp/JsonRpc/lsResponseMessage.h" + +#include "LibLsp/lsp/lsDocumentUri.h" +#include "LibLsp/lsp/lsWorkspaceEdit.h" + +struct ApplyWorkspaceEditParams +{ + /** + * The edits to apply. + */ + + lsWorkspaceEdit edit; + + /** + * An optional label of the workspace edit. This label is + * presented in the user interface for example on an undo + * stack to undo the workspace edit. + */ + std::string label; + + MAKE_SWAP_METHOD(ApplyWorkspaceEditParams, edit, label) +}; +/** + * The workspace/applyEdit request is sent from the server to the client to modify resource on the client side. + */ +MAKE_REFLECT_STRUCT(ApplyWorkspaceEditParams, edit, label); + + + +struct ApplyWorkspaceEditResponse +{ + bool applied; + boost::optional failureReason; + MAKE_SWAP_METHOD(ApplyWorkspaceEditResponse, applied, failureReason) +}; +MAKE_REFLECT_STRUCT(ApplyWorkspaceEditResponse, applied, failureReason); + + +DEFINE_REQUEST_RESPONSE_TYPE(WorkspaceApply, ApplyWorkspaceEditParams, ApplyWorkspaceEditResponse, "workspace/applyEdit"); diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/workspace/configuration.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/workspace/configuration.h new file mode 100644 index 0000000000..f7709aa607 --- /dev/null +++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/workspace/configuration.h @@ -0,0 +1,37 @@ +#pragma once + +#include "LibLsp/JsonRpc/RequestInMessage.h" +#include "LibLsp/JsonRpc/lsResponseMessage.h" + +#include "LibLsp/lsp/lsDocumentUri.h" + + +struct ConfigurationItem { + /** + * The scope to get the configuration section for. + */ + lsDocumentUri scopeUri; + + /** + * The configuration section asked for. + */ + std::string section; + MAKE_SWAP_METHOD(ConfigurationItem, scopeUri, section); +}; +MAKE_REFLECT_STRUCT(ConfigurationItem, scopeUri, section); +struct ConfigurationParams +{ + std::vector items; + MAKE_SWAP_METHOD(ConfigurationParams, items) +}; + +MAKE_REFLECT_STRUCT(ConfigurationParams, items); + +/** + * The workspace/configuration request is sent from the server to the client to fetch + * configuration settings from the client. The request can fetch n configuration settings + * in one roundtrip. The order of the returned configuration settings correspond to the + * order of the passed ConfigurationItems (e.g. the first item in the response is the + * result for the first configuration item in the params). + */ +DEFINE_REQUEST_RESPONSE_TYPE(WorkspaceConfiguration, ConfigurationParams,std::vector, "workspace/configuration"); \ No newline at end of file diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/workspace/didChangeWorkspaceFolders.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/workspace/didChangeWorkspaceFolders.h new file mode 100644 index 0000000000..78f000f30d --- /dev/null +++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/workspace/didChangeWorkspaceFolders.h @@ -0,0 +1,48 @@ +#pragma once +#include "LibLsp/JsonRpc/NotificationInMessage.h" +#include "LibLsp/lsp/workspace/workspaceFolders.h" +/** + * The workspace folder change event. + */ +struct WorkspaceFoldersChangeEvent { + /** + * The array of added workspace folders + */ + + std::vector added; + + /** + * The array of the removed workspace folders + */ + + std::vector removed; + MAKE_SWAP_METHOD(WorkspaceFoldersChangeEvent, added, removed); + +}; +MAKE_REFLECT_STRUCT(WorkspaceFoldersChangeEvent, added, removed); + +struct DidChangeWorkspaceFoldersParams { + /** + * The actual workspace folder change event. + */ + + WorkspaceFoldersChangeEvent event; + + MAKE_SWAP_METHOD(DidChangeWorkspaceFoldersParams, event); +}; +MAKE_REFLECT_STRUCT(DidChangeWorkspaceFoldersParams, event); + + +/** + * The workspace/didChangeWorkspaceFolders notification is sent from the client + * to the server to inform the server about workspace folder configuration changes. + * The notification is sent by default if both ServerCapabilities/workspaceFolders + * and ClientCapabilities/workspace/workspaceFolders are true; or if the server has + * registered to receive this notification it first. + */ +DEFINE_NOTIFICATION_TYPE(Notify_WorkspaceDidChangeWorkspaceFolders, + DidChangeWorkspaceFoldersParams, "workspace/didChangeWorkspaceFolders"); + + + + diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/workspace/did_change_configuration.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/workspace/did_change_configuration.h new file mode 100644 index 0000000000..8f8acceea4 --- /dev/null +++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/workspace/did_change_configuration.h @@ -0,0 +1,25 @@ +#pragma once + +#include "LibLsp/JsonRpc/NotificationInMessage.h" + + +#include "workspaceFolders.h" + + + + +struct lsDidChangeConfigurationParams { + /** + * The actual changed settings. + */ + lsp::Any settings; + MAKE_SWAP_METHOD(lsDidChangeConfigurationParams, settings); +}; + +MAKE_REFLECT_STRUCT(lsDidChangeConfigurationParams, settings); + +/** + * A notification sent from the client to the server to signal the change of + * configuration settings. + */ +DEFINE_NOTIFICATION_TYPE(Notify_WorkspaceDidChangeConfiguration, lsDidChangeConfigurationParams, "workspace/didChangeConfiguration"); diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/workspace/did_change_watched_files.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/workspace/did_change_watched_files.h new file mode 100644 index 0000000000..c14a7e0eda --- /dev/null +++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/workspace/did_change_watched_files.h @@ -0,0 +1,46 @@ +#pragma once + +#include "LibLsp/JsonRpc/NotificationInMessage.h" +#include "LibLsp/lsp/lsDocumentUri.h" +enum class lsFileChangeType { + Created = 1, + Changed = 2, + Deleted = 3, +}; + +#ifdef _WIN32 +MAKE_REFLECT_TYPE_PROXY(lsFileChangeType); +#else +//#pragma clang diagnostic push +//#pragma clang diagnostic ignored "-Wunused-function" +MAKE_REFLECT_TYPE_PROXY(lsFileChangeType); +//#pragma clang diagnostic pop +#endif + + +/** + * An event describing a file change. + */ +struct lsFileEvent { + lsDocumentUri uri; + lsFileChangeType type; + + MAKE_SWAP_METHOD(lsFileEvent, uri, type) +}; +MAKE_REFLECT_STRUCT(lsFileEvent, uri, type); + +struct lsDidChangeWatchedFilesParams { + std::vector changes; + MAKE_SWAP_METHOD(lsDidChangeWatchedFilesParams, changes); +}; +MAKE_REFLECT_STRUCT(lsDidChangeWatchedFilesParams, changes); + + /** + * The workspace/didChangeWorkspaceFolders notification is sent from the client + * to the server to inform the server about workspace folder configuration changes. + * The notification is sent by default if both ServerCapabilities/workspaceFolders + * and ClientCapabilities/workspace/workspaceFolders are true; or if the server has + * registered to receive this notification it first. + */ + +DEFINE_NOTIFICATION_TYPE(Notify_WorkspaceDidChangeWatchedFiles, lsDidChangeWatchedFilesParams, "workspace/didChangeWatchedFiles"); diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/workspace/execute_command.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/workspace/execute_command.h new file mode 100644 index 0000000000..c656ee5ef7 --- /dev/null +++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/workspace/execute_command.h @@ -0,0 +1,24 @@ +#pragma once + +#include "LibLsp/lsp/ExecuteCommandParams.h" + +#include "LibLsp/JsonRpc/RequestInMessage.h" +#include "LibLsp/JsonRpc/lsResponseMessage.h" + +#include "LibLsp/JsonRpc/NotificationInMessage.h" + + + +/** + * The workspace/executeCommand request is sent from the client to the + * server to trigger command execution on the server. In most cases the + * server creates a WorkspaceEdit structure and applies the changes to the + * workspace using the request workspace/applyEdit which is sent from the + * server to the client. + * + * Registration Options: ExecuteCommandRegistrationOptions + */ +DEFINE_REQUEST_RESPONSE_TYPE(wp_executeCommand, ExecuteCommandParams, lsp::Any, "workspace/executeCommand"); + + +DEFINE_NOTIFICATION_TYPE(Notify_sendNotification, ExecuteCommandParams, "workspace/notify") \ No newline at end of file diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/workspace/symbol.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/workspace/symbol.h new file mode 100644 index 0000000000..129fb5e822 --- /dev/null +++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/workspace/symbol.h @@ -0,0 +1,16 @@ +#pragma once + +#include "LibLsp/lsp/symbol.h" + +#include "LibLsp/JsonRpc/RequestInMessage.h" +#include "LibLsp/JsonRpc/lsResponseMessage.h" + +/** + * The workspace symbol request is sent from the client to the server to + * list project-wide symbols matching the query string. + * + * Registration Options: void + */ + +DEFINE_REQUEST_RESPONSE_TYPE(wp_symbol, WorkspaceSymbolParams, std::vector, "workspace/symbol"); + diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/workspace/workspaceFolders.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/workspace/workspaceFolders.h new file mode 100644 index 0000000000..7cedcfa5f4 --- /dev/null +++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/workspace/workspaceFolders.h @@ -0,0 +1,34 @@ +#pragma once + +#include "LibLsp/JsonRpc/RequestInMessage.h" +#include "LibLsp/JsonRpc/lsResponseMessage.h" + +#include "LibLsp/lsp/lsDocumentUri.h" +struct WorkspaceFolder { + /** + * The associated URI for this workspace folder. + */ + + lsDocumentUri uri; + + /** + * The name of the workspace folder. Defaults to the uri's basename. + */ + std::string name; + + MAKE_SWAP_METHOD(WorkspaceFolder, uri, name) +}; +MAKE_REFLECT_STRUCT(WorkspaceFolder, uri, name); + + +/** + * The workspace/workspaceFolders request is sent from the server to the client + * to fetch the current open list of workspace folders. + * + * @return null in the response if only a single file is open in the tool, + * an empty array if a workspace is open but no folders are configured, + * the workspace folders otherwise. + */ +DEFINE_REQUEST_RESPONSE_TYPE(WorkspaceFolders, + boost::optional, boost::optional>, "workspace/workspaceFolders"); + diff --git a/graphics/asymptote/LspCpp/include/optional.hpp b/graphics/asymptote/LspCpp/include/optional.hpp new file mode 100644 index 0000000000..86e3b407c6 --- /dev/null +++ b/graphics/asymptote/LspCpp/include/optional.hpp @@ -0,0 +1,1846 @@ +// +// Copyright (c) 2014-2021 Martin Moene +// +// https://github.com/martinmoene/optional-lite +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#pragma once + +#ifndef NONSTD_OPTIONAL_LITE_HPP +#define NONSTD_OPTIONAL_LITE_HPP + +#define optional_lite_MAJOR 3 +#define optional_lite_MINOR 5 +#define optional_lite_PATCH 0 + +#define optional_lite_VERSION optional_STRINGIFY(optional_lite_MAJOR) "." optional_STRINGIFY(optional_lite_MINOR) "." optional_STRINGIFY(optional_lite_PATCH) + +#define optional_STRINGIFY( x ) optional_STRINGIFY_( x ) +#define optional_STRINGIFY_( x ) #x + +// optional-lite configuration: + +#define optional_OPTIONAL_DEFAULT 0 +#define optional_OPTIONAL_NONSTD 1 +#define optional_OPTIONAL_STD 2 + +// tweak header support: + +#ifdef __has_include +# if __has_include() +# include +# endif +#define optional_HAVE_TWEAK_HEADER 1 +#else +#define optional_HAVE_TWEAK_HEADER 0 +//# pragma message("optional.hpp: Note: Tweak header not supported.") +#endif + +// optional selection and configuration: + +#if !defined( optional_CONFIG_SELECT_OPTIONAL ) +# define optional_CONFIG_SELECT_OPTIONAL ( optional_HAVE_STD_OPTIONAL ? optional_OPTIONAL_STD : optional_OPTIONAL_NONSTD ) +#endif + +// Control presence of extensions: + +#ifndef optional_CONFIG_NO_EXTENSIONS +#define optional_CONFIG_NO_EXTENSIONS 0 +#endif + +// Control presence of exception handling (try and auto discover): + +#ifndef optional_CONFIG_NO_EXCEPTIONS +# if defined(_MSC_VER) +# include // for _HAS_EXCEPTIONS +# endif +# if defined(__cpp_exceptions) || defined(__EXCEPTIONS) || (_HAS_EXCEPTIONS) +# define optional_CONFIG_NO_EXCEPTIONS 0 +# else +# define optional_CONFIG_NO_EXCEPTIONS 1 +# endif +#endif + +// C++ language version detection (C++20 is speculative): +// Note: VC14.0/1900 (VS2015) lacks too much from C++14. + +#ifndef optional_CPLUSPLUS +# if defined(_MSVC_LANG ) && !defined(__clang__) +# define optional_CPLUSPLUS (_MSC_VER == 1900 ? 201103L : _MSVC_LANG ) +# else +# define optional_CPLUSPLUS __cplusplus +# endif +#endif + +#define optional_CPP98_OR_GREATER ( optional_CPLUSPLUS >= 199711L ) +#define optional_CPP11_OR_GREATER ( optional_CPLUSPLUS >= 201103L ) +#define optional_CPP11_OR_GREATER_ ( optional_CPLUSPLUS >= 201103L ) +#define optional_CPP14_OR_GREATER ( optional_CPLUSPLUS >= 201402L ) +#define optional_CPP17_OR_GREATER ( optional_CPLUSPLUS >= 201703L ) +#define optional_CPP20_OR_GREATER ( optional_CPLUSPLUS >= 202000L ) + +// C++ language version (represent 98 as 3): + +#define optional_CPLUSPLUS_V ( optional_CPLUSPLUS / 100 - (optional_CPLUSPLUS > 200000 ? 2000 : 1994) ) + +// Use C++17 std::optional if available and requested: + +#if optional_CPP17_OR_GREATER && defined(__has_include ) +# if __has_include( ) +# define optional_HAVE_STD_OPTIONAL 1 +# else +# define optional_HAVE_STD_OPTIONAL 0 +# endif +#else +# define optional_HAVE_STD_OPTIONAL 0 +#endif + +#define optional_USES_STD_OPTIONAL ( (optional_CONFIG_SELECT_OPTIONAL == optional_OPTIONAL_STD) || ((optional_CONFIG_SELECT_OPTIONAL == optional_OPTIONAL_DEFAULT) && optional_HAVE_STD_OPTIONAL) ) + +// +// in_place: code duplicated in any-lite, expected-lite, optional-lite, value-ptr-lite, variant-lite: +// + +#ifndef nonstd_lite_HAVE_IN_PLACE_TYPES +#define nonstd_lite_HAVE_IN_PLACE_TYPES 1 + +// C++17 std::in_place in : + +#if optional_CPP17_OR_GREATER + +#include + +namespace nonstd { + +using std::in_place; +using std::in_place_type; +using std::in_place_index; +using std::in_place_t; +using std::in_place_type_t; +using std::in_place_index_t; + +#define nonstd_lite_in_place_t( T) std::in_place_t +#define nonstd_lite_in_place_type_t( T) std::in_place_type_t +#define nonstd_lite_in_place_index_t(K) std::in_place_index_t + +#define nonstd_lite_in_place( T) std::in_place_t{} +#define nonstd_lite_in_place_type( T) std::in_place_type_t{} +#define nonstd_lite_in_place_index(K) std::in_place_index_t{} + +} // namespace nonstd + +#else // optional_CPP17_OR_GREATER + +#include + +namespace nonstd { +namespace detail { + +template< class T > +struct in_place_type_tag {}; + +template< std::size_t K > +struct in_place_index_tag {}; + +} // namespace detail + +struct in_place_t {}; + +template< class T > +inline in_place_t in_place( detail::in_place_type_tag /*unused*/ = detail::in_place_type_tag() ) +{ + return in_place_t(); +} + +template< std::size_t K > +inline in_place_t in_place( detail::in_place_index_tag /*unused*/ = detail::in_place_index_tag() ) +{ + return in_place_t(); +} + +template< class T > +inline in_place_t in_place_type( detail::in_place_type_tag /*unused*/ = detail::in_place_type_tag() ) +{ + return in_place_t(); +} + +template< std::size_t K > +inline in_place_t in_place_index( detail::in_place_index_tag /*unused*/ = detail::in_place_index_tag() ) +{ + return in_place_t(); +} + +// mimic templated typedef: + +#define nonstd_lite_in_place_t( T) nonstd::in_place_t(&)( nonstd::detail::in_place_type_tag ) +#define nonstd_lite_in_place_type_t( T) nonstd::in_place_t(&)( nonstd::detail::in_place_type_tag ) +#define nonstd_lite_in_place_index_t(K) nonstd::in_place_t(&)( nonstd::detail::in_place_index_tag ) + +#define nonstd_lite_in_place( T) nonstd::in_place_type +#define nonstd_lite_in_place_type( T) nonstd::in_place_type +#define nonstd_lite_in_place_index(K) nonstd::in_place_index + +} // namespace nonstd + +#endif // optional_CPP17_OR_GREATER +#endif // nonstd_lite_HAVE_IN_PLACE_TYPES + +// +// Using std::optional: +// + +#if optional_USES_STD_OPTIONAL + +#include + +namespace nonstd { + + using std::optional; + using std::bad_optional_access; + using std::hash; + + using std::nullopt; + using std::nullopt_t; + + using std::operator==; + using std::operator!=; + using std::operator<; + using std::operator<=; + using std::operator>; + using std::operator>=; + using std::make_optional; + using std::swap; +} + +#else // optional_USES_STD_OPTIONAL + +#include +#include + +// optional-lite alignment configuration: + +#ifndef optional_CONFIG_MAX_ALIGN_HACK +# define optional_CONFIG_MAX_ALIGN_HACK 0 +#endif + +#ifndef optional_CONFIG_ALIGN_AS +// no default, used in #if defined() +#endif + +#ifndef optional_CONFIG_ALIGN_AS_FALLBACK +# define optional_CONFIG_ALIGN_AS_FALLBACK double +#endif + +// Compiler warning suppression: + +#if defined(__clang__) +# pragma clang diagnostic push +# pragma clang diagnostic ignored "-Wundef" +#elif defined(__GNUC__) +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wundef" +#elif defined(_MSC_VER ) +# pragma warning( push ) +#endif + +// half-open range [lo..hi): +#define optional_BETWEEN( v, lo, hi ) ( (lo) <= (v) && (v) < (hi) ) + +// Compiler versions: +// +// MSVC++ 6.0 _MSC_VER == 1200 optional_COMPILER_MSVC_VERSION == 60 (Visual Studio 6.0) +// MSVC++ 7.0 _MSC_VER == 1300 optional_COMPILER_MSVC_VERSION == 70 (Visual Studio .NET 2002) +// MSVC++ 7.1 _MSC_VER == 1310 optional_COMPILER_MSVC_VERSION == 71 (Visual Studio .NET 2003) +// MSVC++ 8.0 _MSC_VER == 1400 optional_COMPILER_MSVC_VERSION == 80 (Visual Studio 2005) +// MSVC++ 9.0 _MSC_VER == 1500 optional_COMPILER_MSVC_VERSION == 90 (Visual Studio 2008) +// MSVC++ 10.0 _MSC_VER == 1600 optional_COMPILER_MSVC_VERSION == 100 (Visual Studio 2010) +// MSVC++ 11.0 _MSC_VER == 1700 optional_COMPILER_MSVC_VERSION == 110 (Visual Studio 2012) +// MSVC++ 12.0 _MSC_VER == 1800 optional_COMPILER_MSVC_VERSION == 120 (Visual Studio 2013) +// MSVC++ 14.0 _MSC_VER == 1900 optional_COMPILER_MSVC_VERSION == 140 (Visual Studio 2015) +// MSVC++ 14.1 _MSC_VER >= 1910 optional_COMPILER_MSVC_VERSION == 141 (Visual Studio 2017) +// MSVC++ 14.2 _MSC_VER >= 1920 optional_COMPILER_MSVC_VERSION == 142 (Visual Studio 2019) + +#if defined(_MSC_VER ) && !defined(__clang__) +# define optional_COMPILER_MSVC_VER (_MSC_VER ) +# define optional_COMPILER_MSVC_VERSION (_MSC_VER / 10 - 10 * ( 5 + (_MSC_VER < 1900 ) ) ) +#else +# define optional_COMPILER_MSVC_VER 0 +# define optional_COMPILER_MSVC_VERSION 0 +#endif + +#define optional_COMPILER_VERSION( major, minor, patch ) ( 10 * (10 * (major) + (minor) ) + (patch) ) + +#if defined(__GNUC__) && !defined(__clang__) +# define optional_COMPILER_GNUC_VERSION optional_COMPILER_VERSION(__GNUC__, __GNUC_MINOR__, __GNUC_PATCHLEVEL__) +#else +# define optional_COMPILER_GNUC_VERSION 0 +#endif + +#if defined(__clang__) +# define optional_COMPILER_CLANG_VERSION optional_COMPILER_VERSION(__clang_major__, __clang_minor__, __clang_patchlevel__) +#else +# define optional_COMPILER_CLANG_VERSION 0 +#endif + +#if optional_BETWEEN(optional_COMPILER_MSVC_VERSION, 70, 140 ) +# pragma warning( disable: 4345 ) // initialization behavior changed +#endif + +#if optional_BETWEEN(optional_COMPILER_MSVC_VERSION, 70, 150 ) +# pragma warning( disable: 4814 ) // in C++14 'constexpr' will not imply 'const' +#endif + +// Presence of language and library features: + +#define optional_HAVE(FEATURE) ( optional_HAVE_##FEATURE ) + +#ifdef _HAS_CPP0X +# define optional_HAS_CPP0X _HAS_CPP0X +#else +# define optional_HAS_CPP0X 0 +#endif + +// Unless defined otherwise below, consider VC14 as C++11 for optional-lite: + +#if optional_COMPILER_MSVC_VER >= 1900 +# undef optional_CPP11_OR_GREATER +# define optional_CPP11_OR_GREATER 1 +#endif + +#define optional_CPP11_90 (optional_CPP11_OR_GREATER_ || optional_COMPILER_MSVC_VER >= 1500) +#define optional_CPP11_100 (optional_CPP11_OR_GREATER_ || optional_COMPILER_MSVC_VER >= 1600) +#define optional_CPP11_110 (optional_CPP11_OR_GREATER_ || optional_COMPILER_MSVC_VER >= 1700) +#define optional_CPP11_120 (optional_CPP11_OR_GREATER_ || optional_COMPILER_MSVC_VER >= 1800) +#define optional_CPP11_140 (optional_CPP11_OR_GREATER_ || optional_COMPILER_MSVC_VER >= 1900) +#define optional_CPP11_141 (optional_CPP11_OR_GREATER_ || optional_COMPILER_MSVC_VER >= 1910) + +#define optional_CPP14_000 (optional_CPP14_OR_GREATER) +#define optional_CPP17_000 (optional_CPP17_OR_GREATER) + +// clang >= 2.9, gcc >= 4.9, msvc >= vc14.0/1900 (vs15): +#define optional_CPP11_140_C290_G490 ((optional_CPP11_OR_GREATER_ && (optional_COMPILER_CLANG_VERSION >= 290 || optional_COMPILER_GNUC_VERSION >= 490)) || (optional_COMPILER_MSVC_VER >= 1900)) + +// clang >= 3.5, msvc >= vc11 (vs12): +#define optional_CPP11_110_C350 ( optional_CPP11_110 && !optional_BETWEEN( optional_COMPILER_CLANG_VERSION, 1, 350 ) ) + +// clang >= 3.5, gcc >= 5.0, msvc >= vc11 (vs12): +#define optional_CPP11_110_C350_G500 \ + ( optional_CPP11_110 && \ + !( optional_BETWEEN( optional_COMPILER_CLANG_VERSION, 1, 350 ) \ + || optional_BETWEEN( optional_COMPILER_GNUC_VERSION , 1, 500 ) ) ) + +// Presence of C++11 language features: + +#define optional_HAVE_CONSTEXPR_11 optional_CPP11_140 +#define optional_HAVE_IS_DEFAULT optional_CPP11_140 +#define optional_HAVE_NOEXCEPT optional_CPP11_140 +#define optional_HAVE_NULLPTR optional_CPP11_100 +#define optional_HAVE_REF_QUALIFIER optional_CPP11_140_C290_G490 +#define optional_HAVE_STATIC_ASSERT optional_CPP11_110 +#define optional_HAVE_INITIALIZER_LIST optional_CPP11_140 + +// Presence of C++14 language features: + +#define optional_HAVE_CONSTEXPR_14 optional_CPP14_000 + +// Presence of C++17 language features: + +#define optional_HAVE_NODISCARD optional_CPP17_000 + +// Presence of C++ library features: + +#define optional_HAVE_CONDITIONAL optional_CPP11_120 +#define optional_HAVE_REMOVE_CV optional_CPP11_120 +#define optional_HAVE_TYPE_TRAITS optional_CPP11_90 + +#define optional_HAVE_TR1_TYPE_TRAITS (!! optional_COMPILER_GNUC_VERSION ) +#define optional_HAVE_TR1_ADD_POINTER (!! optional_COMPILER_GNUC_VERSION ) + +#define optional_HAVE_IS_ASSIGNABLE optional_CPP11_110_C350 +#define optional_HAVE_IS_MOVE_CONSTRUCTIBLE optional_CPP11_110_C350 +#define optional_HAVE_IS_NOTHROW_MOVE_ASSIGNABLE optional_CPP11_110_C350 +#define optional_HAVE_IS_NOTHROW_MOVE_CONSTRUCTIBLE optional_CPP11_110_C350 +#define optional_HAVE_IS_TRIVIALLY_COPY_CONSTRUCTIBLE optional_CPP11_110_C350_G500 +#define optional_HAVE_IS_TRIVIALLY_MOVE_CONSTRUCTIBLE optional_CPP11_110_C350_G500 + +// C++ feature usage: + +#if optional_HAVE( CONSTEXPR_11 ) +# define optional_constexpr constexpr +#else +# define optional_constexpr /*constexpr*/ +#endif + +#if optional_HAVE( IS_DEFAULT ) +# define optional_is_default = default; +#else +# define optional_is_default {} +#endif + +#if optional_HAVE( CONSTEXPR_14 ) +# define optional_constexpr14 constexpr +#else +# define optional_constexpr14 /*constexpr*/ +#endif + +#if optional_HAVE( NODISCARD ) +# define optional_nodiscard [[nodiscard]] +#else +# define optional_nodiscard /*[[nodiscard]]*/ +#endif + +#if optional_HAVE( NOEXCEPT ) +# define optional_noexcept noexcept +#else +# define optional_noexcept /*noexcept*/ +#endif + +#if optional_HAVE( NULLPTR ) +# define optional_nullptr nullptr +#else +# define optional_nullptr NULL +#endif + +#if optional_HAVE( REF_QUALIFIER ) +// NOLINTNEXTLINE( bugprone-macro-parentheses ) +# define optional_ref_qual & +# define optional_refref_qual && +#else +# define optional_ref_qual /*&*/ +# define optional_refref_qual /*&&*/ +#endif + +#if optional_HAVE( STATIC_ASSERT ) +# define optional_static_assert(expr, text) static_assert(expr, text); +#else +# define optional_static_assert(expr, text) /*static_assert(expr, text);*/ +#endif + +// additional includes: + +#if optional_CONFIG_NO_EXCEPTIONS +// already included: +#else +# include +#endif + +#if optional_CPP11_OR_GREATER +# include +#endif + +#if optional_HAVE( INITIALIZER_LIST ) +# include +#endif + +#if optional_HAVE( TYPE_TRAITS ) +# include +#elif optional_HAVE( TR1_TYPE_TRAITS ) +# include +#endif + +// Method enabling + +#if optional_CPP11_OR_GREATER + +#define optional_REQUIRES_0(...) \ + template< bool B = (__VA_ARGS__), typename std::enable_if::type = 0 > + +#define optional_REQUIRES_T(...) \ + , typename std::enable_if< (__VA_ARGS__), int >::type = 0 + +#define optional_REQUIRES_R(R, ...) \ + typename std::enable_if< (__VA_ARGS__), R>::type + +#define optional_REQUIRES_A(...) \ + , typename std::enable_if< (__VA_ARGS__), void*>::type = nullptr + +#endif + +// +// optional: +// + +namespace nonstd { namespace optional_lite { + +namespace std11 { + +template< class T, T v > struct integral_constant { enum { value = v }; }; +template< bool B > struct bool_constant : integral_constant{}; + +typedef bool_constant< true > true_type; +typedef bool_constant< false > false_type; + +#if optional_CPP11_OR_GREATER + using std::move; +#else + template< typename T > T & move( T & t ) { return t; } +#endif + +#if optional_HAVE( CONDITIONAL ) + using std::conditional; +#else + template< bool B, typename T, typename F > struct conditional { typedef T type; }; + template< typename T, typename F > struct conditional { typedef F type; }; +#endif // optional_HAVE_CONDITIONAL + +#if optional_HAVE( IS_ASSIGNABLE ) + using std::is_assignable; +#else + template< class T, class U > struct is_assignable : std11::true_type{}; +#endif + +#if optional_HAVE( IS_MOVE_CONSTRUCTIBLE ) + using std::is_move_constructible; +#else + template< class T > struct is_move_constructible : std11::true_type{}; +#endif + +#if optional_HAVE( IS_NOTHROW_MOVE_ASSIGNABLE ) + using std::is_nothrow_move_assignable; +#else + template< class T > struct is_nothrow_move_assignable : std11::true_type{}; +#endif + +#if optional_HAVE( IS_NOTHROW_MOVE_CONSTRUCTIBLE ) + using std::is_nothrow_move_constructible; +#else + template< class T > struct is_nothrow_move_constructible : std11::true_type{}; +#endif + +#if optional_HAVE( IS_TRIVIALLY_COPY_CONSTRUCTIBLE ) + using std::is_trivially_copy_constructible; +#else + template< class T > struct is_trivially_copy_constructible : std11::true_type{}; +#endif + +#if optional_HAVE( IS_TRIVIALLY_MOVE_CONSTRUCTIBLE ) + using std::is_trivially_move_constructible; +#else + template< class T > struct is_trivially_move_constructible : std11::true_type{}; +#endif + +} // namespace std11 + +#if optional_CPP11_OR_GREATER + +/// type traits C++17: + +namespace std17 { + +#if optional_CPP17_OR_GREATER + +using std::is_swappable; +using std::is_nothrow_swappable; + +#elif optional_CPP11_OR_GREATER + +namespace detail { + +using std::swap; + +struct is_swappable +{ + template< typename T, typename = decltype( swap( std::declval(), std::declval() ) ) > + static std11::true_type test( int /*unused*/ ); + + template< typename > + static std11::false_type test(...); +}; + +struct is_nothrow_swappable +{ + // wrap noexcept(expr) in separate function as work-around for VC140 (VS2015): + + template< typename T > + static constexpr bool satisfies() + { + return noexcept( swap( std::declval(), std::declval() ) ); + } + + template< typename T > + static auto test( int /*unused*/ ) -> std11::integral_constant()>{} + + template< typename > + static auto test(...) -> std11::false_type; +}; + +} // namespace detail + +// is [nothow] swappable: + +template< typename T > +struct is_swappable : decltype( detail::is_swappable::test(0) ){}; + +template< typename T > +struct is_nothrow_swappable : decltype( detail::is_nothrow_swappable::test(0) ){}; + +#endif // optional_CPP17_OR_GREATER + +} // namespace std17 + +/// type traits C++20: + +namespace std20 { + +template< typename T > +struct remove_cvref +{ + typedef typename std::remove_cv< typename std::remove_reference::type >::type type; +}; + +} // namespace std20 + +#endif // optional_CPP11_OR_GREATER + +/// class optional + +template< typename T > +class optional; + +namespace detail { + +// C++11 emulation: + +struct nulltype{}; + +template< typename Head, typename Tail > +struct typelist +{ + typedef Head head; + typedef Tail tail; +}; + +#if optional_CONFIG_MAX_ALIGN_HACK + +// Max align, use most restricted type for alignment: + +#define optional_UNIQUE( name ) optional_UNIQUE2( name, __LINE__ ) +#define optional_UNIQUE2( name, line ) optional_UNIQUE3( name, line ) +#define optional_UNIQUE3( name, line ) name ## line + +#define optional_ALIGN_TYPE( type ) \ + type optional_UNIQUE( _t ); struct_t< type > optional_UNIQUE( _st ) + +template< typename T > +struct struct_t { T _; }; + +union max_align_t +{ + optional_ALIGN_TYPE( char ); + optional_ALIGN_TYPE( short int ); + optional_ALIGN_TYPE( int ); + optional_ALIGN_TYPE( long int ); + optional_ALIGN_TYPE( float ); + optional_ALIGN_TYPE( double ); + optional_ALIGN_TYPE( long double ); + optional_ALIGN_TYPE( char * ); + optional_ALIGN_TYPE( short int * ); + optional_ALIGN_TYPE( int * ); + optional_ALIGN_TYPE( long int * ); + optional_ALIGN_TYPE( float * ); + optional_ALIGN_TYPE( double * ); + optional_ALIGN_TYPE( long double * ); + optional_ALIGN_TYPE( void * ); + +#ifdef HAVE_LONG_LONG + optional_ALIGN_TYPE( long long ); +#endif + + struct Unknown; + + Unknown ( * optional_UNIQUE(_) )( Unknown ); + Unknown * Unknown::* optional_UNIQUE(_); + Unknown ( Unknown::* optional_UNIQUE(_) )( Unknown ); + + struct_t< Unknown ( * )( Unknown) > optional_UNIQUE(_); + struct_t< Unknown * Unknown::* > optional_UNIQUE(_); + struct_t< Unknown ( Unknown::* )(Unknown) > optional_UNIQUE(_); +}; + +#undef optional_UNIQUE +#undef optional_UNIQUE2 +#undef optional_UNIQUE3 + +#undef optional_ALIGN_TYPE + +#elif defined( optional_CONFIG_ALIGN_AS ) // optional_CONFIG_MAX_ALIGN_HACK + +// Use user-specified type for alignment: + +#define optional_ALIGN_AS( unused ) \ + optional_CONFIG_ALIGN_AS + +#else // optional_CONFIG_MAX_ALIGN_HACK + +// Determine POD type to use for alignment: + +#define optional_ALIGN_AS( to_align ) \ + typename type_of_size< alignment_types, alignment_of< to_align >::value >::type + +template< typename T > +struct alignment_of; + +template< typename T > +struct alignment_of_hack +{ + char c; + T t; + alignment_of_hack(); +}; + +template< size_t A, size_t S > +struct alignment_logic +{ + enum { value = A < S ? A : S }; +}; + +template< typename T > +struct alignment_of +{ + enum { value = alignment_logic< + sizeof( alignment_of_hack ) - sizeof(T), sizeof(T) >::value }; +}; + +template< typename List, size_t N > +struct type_of_size +{ + typedef typename std11::conditional< + N == sizeof( typename List::head ), + typename List::head, + typename type_of_size::type >::type type; +}; + +template< size_t N > +struct type_of_size< nulltype, N > +{ + typedef optional_CONFIG_ALIGN_AS_FALLBACK type; +}; + +template< typename T> +struct struct_t { T _; }; + +#define optional_ALIGN_TYPE( type ) \ + typelist< type , typelist< struct_t< type > + +struct Unknown; + +typedef + optional_ALIGN_TYPE( char ), + optional_ALIGN_TYPE( short ), + optional_ALIGN_TYPE( int ), + optional_ALIGN_TYPE( long ), + optional_ALIGN_TYPE( float ), + optional_ALIGN_TYPE( double ), + optional_ALIGN_TYPE( long double ), + + optional_ALIGN_TYPE( char *), + optional_ALIGN_TYPE( short * ), + optional_ALIGN_TYPE( int * ), + optional_ALIGN_TYPE( long * ), + optional_ALIGN_TYPE( float * ), + optional_ALIGN_TYPE( double * ), + optional_ALIGN_TYPE( long double * ), + + optional_ALIGN_TYPE( Unknown ( * )( Unknown ) ), + optional_ALIGN_TYPE( Unknown * Unknown::* ), + optional_ALIGN_TYPE( Unknown ( Unknown::* )( Unknown ) ), + + nulltype + > > > > > > > > > > > > > > + > > > > > > > > > > > > > > + > > > > > > + alignment_types; + +#undef optional_ALIGN_TYPE + +#endif // optional_CONFIG_MAX_ALIGN_HACK + +/// C++03 constructed union to hold value. + +template< typename T > +union storage_t +{ +//private: +// template< typename > friend class optional; + + typedef T value_type; + + storage_t() optional_is_default + + explicit storage_t( value_type const & v ) + { + construct_value( v ); + } + + void construct_value( value_type const & v ) + { + ::new( value_ptr() ) value_type( v ); + } + +#if optional_CPP11_OR_GREATER + + explicit storage_t( value_type && v ) + { + construct_value( std::move( v ) ); + } + + void construct_value( value_type && v ) + { + ::new( value_ptr() ) value_type( std::move( v ) ); + } + + template< class... Args > + storage_t( nonstd_lite_in_place_t(T), Args&&... args ) + { + emplace( std::forward(args)... ); + } + + template< class... Args > + void emplace( Args&&... args ) + { + ::new( value_ptr() ) value_type( std::forward(args)... ); + } + + template< class U, class... Args > + void emplace( std::initializer_list il, Args&&... args ) + { + ::new( value_ptr() ) value_type( il, std::forward(args)... ); + } + +#endif + + void destruct_value() + { + value_ptr()->~T(); + } + + optional_nodiscard value_type const * value_ptr() const + { + return as(); + } + + value_type * value_ptr() + { + return as(); + } + + optional_nodiscard value_type const & value() const optional_ref_qual + { + return * value_ptr(); + } + + value_type & value() optional_ref_qual + { + return * value_ptr(); + } + +#if optional_HAVE( REF_QUALIFIER ) + + optional_nodiscard value_type const && value() const optional_refref_qual + { + return std::move( value() ); + } + + value_type && value() optional_refref_qual + { + return std::move( value() ); + } + +#endif + +#if optional_CPP11_OR_GREATER + + using aligned_storage_t = typename std::aligned_storage< sizeof(value_type), alignof(value_type) >::type; + aligned_storage_t data; + +#elif optional_CONFIG_MAX_ALIGN_HACK + + typedef struct { unsigned char data[ sizeof(value_type) ]; } aligned_storage_t; + + max_align_t hack; + aligned_storage_t data; + +#else + typedef optional_ALIGN_AS(value_type) align_as_type; + + typedef struct { align_as_type data[ 1 + ( sizeof(value_type) - 1 ) / sizeof(align_as_type) ]; } aligned_storage_t; + aligned_storage_t data; + +# undef optional_ALIGN_AS + +#endif // optional_CONFIG_MAX_ALIGN_HACK + + optional_nodiscard void * ptr() optional_noexcept + { + return &data; + } + + optional_nodiscard void const * ptr() const optional_noexcept + { + return &data; + } + + template + optional_nodiscard U * as() + { + return reinterpret_cast( ptr() ); + } + + template + optional_nodiscard U const * as() const + { + return reinterpret_cast( ptr() ); + } +}; + +} // namespace detail + +/// disengaged state tag + +struct nullopt_t +{ + struct init{}; + explicit optional_constexpr nullopt_t( init /*unused*/ ) optional_noexcept {} +}; + +#if optional_HAVE( CONSTEXPR_11 ) +constexpr nullopt_t nullopt{ nullopt_t::init{} }; +#else +// extra parenthesis to prevent the most vexing parse: +const nullopt_t nullopt(( nullopt_t::init() )); +#endif + +/// optional access error + +#if ! optional_CONFIG_NO_EXCEPTIONS + +class bad_optional_access : public std::logic_error +{ +public: + explicit bad_optional_access() + : logic_error( "bad optional access" ) {} +}; + +#endif //optional_CONFIG_NO_EXCEPTIONS + +/// optional + +template< typename T> +class optional +{ + optional_static_assert(( !std::is_same::type, nullopt_t>::value ), + "T in optional must not be of type 'nullopt_t'.") + + optional_static_assert(( !std::is_same::type, in_place_t>::value ), + "T in optional must not be of type 'in_place_t'.") + + optional_static_assert(( std::is_object::value && std::is_destructible::value && !std::is_array::value ), + "T in optional must meet the Cpp17Destructible requirements.") + +private: + template< typename > friend class optional; + + typedef void (optional::*safe_bool)() const; + +public: + typedef T value_type; + + // x.x.3.1, constructors + + // 1a - default construct + optional_constexpr optional() optional_noexcept + : has_value_( false ) + , contained() + {} + + // 1b - construct explicitly empty + // NOLINTNEXTLINE( google-explicit-constructor, hicpp-explicit-conversions ) + optional_constexpr optional( nullopt_t /*unused*/ ) optional_noexcept + : has_value_( false ) + , contained() + {} + + // 2 - copy-construct +#if optional_CPP11_OR_GREATER + // template< typename U = T + // optional_REQUIRES_T( + // std::is_copy_constructible::value + // || std11::is_trivially_copy_constructible::value + // ) + // > +#endif + optional_constexpr14 optional( optional const & other ) + : has_value_( other.has_value() ) + { + if ( other.has_value() ) + { + contained.construct_value( other.contained.value() ); + } + } + +#if optional_CPP11_OR_GREATER + + // 3 (C++11) - move-construct from optional + template< typename U = T + optional_REQUIRES_T( + std11::is_move_constructible::value + || std11::is_trivially_move_constructible::value + ) + > + optional_constexpr14 optional( optional && other ) + // NOLINTNEXTLINE( performance-noexcept-move-constructor ) + noexcept( std11::is_nothrow_move_constructible::value ) + : has_value_( other.has_value() ) + { + if ( other.has_value() ) + { + contained.construct_value( std::move( other.contained.value() ) ); + } + } + + // 4a (C++11) - explicit converting copy-construct from optional + template< typename U + optional_REQUIRES_T( + std::is_constructible::value + && !std::is_constructible & >::value + && !std::is_constructible && >::value + && !std::is_constructible const & >::value + && !std::is_constructible const && >::value + && !std::is_convertible< optional & , T>::value + && !std::is_convertible< optional && , T>::value + && !std::is_convertible< optional const & , T>::value + && !std::is_convertible< optional const &&, T>::value + && !std::is_convertible< U const & , T>::value /*=> explicit */ + ) + > + explicit optional( optional const & other ) + : has_value_( other.has_value() ) + { + if ( other.has_value() ) + { + contained.construct_value( T{ other.contained.value() } ); + } + } +#endif // optional_CPP11_OR_GREATER + + // 4b (C++98 and later) - non-explicit converting copy-construct from optional + template< typename U +#if optional_CPP11_OR_GREATER + optional_REQUIRES_T( + std::is_constructible::value + && !std::is_constructible & >::value + && !std::is_constructible && >::value + && !std::is_constructible const & >::value + && !std::is_constructible const && >::value + && !std::is_convertible< optional & , T>::value + && !std::is_convertible< optional && , T>::value + && !std::is_convertible< optional const & , T>::value + && !std::is_convertible< optional const &&, T>::value + && std::is_convertible< U const & , T>::value /*=> non-explicit */ + ) +#endif // optional_CPP11_OR_GREATER + > + // NOLINTNEXTLINE( google-explicit-constructor, hicpp-explicit-conversions ) + /*non-explicit*/ optional( optional const & other ) + : has_value_( other.has_value() ) + { + if ( other.has_value() ) + { + contained.construct_value( other.contained.value() ); + } + } + +#if optional_CPP11_OR_GREATER + + // 5a (C++11) - explicit converting move-construct from optional + template< typename U + optional_REQUIRES_T( + std::is_constructible::value + && !std::is_constructible & >::value + && !std::is_constructible && >::value + && !std::is_constructible const & >::value + && !std::is_constructible const && >::value + && !std::is_convertible< optional & , T>::value + && !std::is_convertible< optional && , T>::value + && !std::is_convertible< optional const & , T>::value + && !std::is_convertible< optional const &&, T>::value + && !std::is_convertible< U &&, T>::value /*=> explicit */ + ) + > + explicit optional( optional && other + ) + : has_value_( other.has_value() ) + { + if ( other.has_value() ) + { + contained.construct_value( T{ std::move( other.contained.value() ) } ); + } + } + + // 5a (C++11) - non-explicit converting move-construct from optional + template< typename U + optional_REQUIRES_T( + std::is_constructible::value + && !std::is_constructible & >::value + && !std::is_constructible && >::value + && !std::is_constructible const & >::value + && !std::is_constructible const && >::value + && !std::is_convertible< optional & , T>::value + && !std::is_convertible< optional && , T>::value + && !std::is_convertible< optional const & , T>::value + && !std::is_convertible< optional const &&, T>::value + && std::is_convertible< U &&, T>::value /*=> non-explicit */ + ) + > + // NOLINTNEXTLINE( google-explicit-constructor, hicpp-explicit-conversions ) + /*non-explicit*/ optional( optional && other ) + : has_value_( other.has_value() ) + { + if ( other.has_value() ) + { + contained.construct_value( std::move( other.contained.value() ) ); + } + } + + // 6 (C++11) - in-place construct + template< typename... Args + optional_REQUIRES_T( + std::is_constructible::value + ) + > + optional_constexpr explicit optional( nonstd_lite_in_place_t(T), Args&&... args ) + : has_value_( true ) + , contained( in_place, std::forward(args)... ) + {} + + // 7 (C++11) - in-place construct, initializer-list + template< typename U, typename... Args + optional_REQUIRES_T( + std::is_constructible&, Args&&...>::value + ) + > + optional_constexpr explicit optional( nonstd_lite_in_place_t(T), std::initializer_list il, Args&&... args ) + : has_value_( true ) + , contained( T( il, std::forward(args)...) ) + {} + + // 8a (C++11) - explicit move construct from value + template< typename U = T + optional_REQUIRES_T( + std::is_constructible::value + && !std::is_same::type, nonstd_lite_in_place_t(U)>::value + && !std::is_same::type, optional>::value + && !std::is_convertible::value /*=> explicit */ + ) + > + optional_constexpr explicit optional( U && value ) + : has_value_( true ) + , contained( nonstd_lite_in_place(T), std::forward( value ) ) + {} + + // 8b (C++11) - non-explicit move construct from value + template< typename U = T + optional_REQUIRES_T( + std::is_constructible::value + && !std::is_same::type, nonstd_lite_in_place_t(U)>::value + && !std::is_same::type, optional>::value + && std::is_convertible::value /*=> non-explicit */ + ) + > + // NOLINTNEXTLINE( google-explicit-constructor, hicpp-explicit-conversions ) + optional_constexpr /*non-explicit*/ optional( U && value ) + : has_value_( true ) + , contained( nonstd_lite_in_place(T), std::forward( value ) ) + {} + +#else // optional_CPP11_OR_GREATER + + // 8 (C++98) + optional( value_type const & value ) + : has_value_( true ) + , contained( value ) + {} + +#endif // optional_CPP11_OR_GREATER + + // x.x.3.2, destructor + + ~optional() + { + if ( has_value() ) + { + contained.destruct_value(); + } + } + + // x.x.3.3, assignment + + // 1 (C++98and later) - assign explicitly empty + optional & operator=( nullopt_t /*unused*/) optional_noexcept + { + reset(); + return *this; + } + + // 2 (C++98and later) - copy-assign from optional +#if optional_CPP11_OR_GREATER + // NOLINTNEXTLINE( cppcoreguidelines-c-copy-assignment-signature, misc-unconventional-assign-operator ) + optional_REQUIRES_R( + optional &, + true +// std::is_copy_constructible::value +// && std::is_copy_assignable::value + ) + operator=( optional const & other ) + noexcept( + std11::is_nothrow_move_assignable::value + && std11::is_nothrow_move_constructible::value + ) +#else + optional & operator=( optional const & other ) +#endif + { + if ( (has_value() == true ) && (other.has_value() == false) ) { reset(); } + else if ( (has_value() == false) && (other.has_value() == true ) ) { initialize( *other ); } + else if ( (has_value() == true ) && (other.has_value() == true ) ) { contained.value() = *other; } + return *this; + } + +#if optional_CPP11_OR_GREATER + + // 3 (C++11) - move-assign from optional + // NOLINTNEXTLINE( cppcoreguidelines-c-copy-assignment-signature, misc-unconventional-assign-operator ) + optional_REQUIRES_R( + optional &, + true +// std11::is_move_constructible::value +// && std::is_move_assignable::value + ) + operator=( optional && other ) noexcept + { + if ( (has_value() == true ) && (other.has_value() == false) ) { reset(); } + else if ( (has_value() == false) && (other.has_value() == true ) ) { initialize( std::move( *other ) ); } + else if ( (has_value() == true ) && (other.has_value() == true ) ) { contained.value() = std::move( *other ); } + return *this; + } + + // 4 (C++11) - move-assign from value + template< typename U = T > + // NOLINTNEXTLINE( cppcoreguidelines-c-copy-assignment-signature, misc-unconventional-assign-operator ) + optional_REQUIRES_R( + optional &, + std::is_constructible::value + && std11::is_assignable::value + && !std::is_same::type, nonstd_lite_in_place_t(U)>::value + && !std::is_same::type, optional>::value + && !(std::is_scalar::value && std::is_same::type>::value) + ) + operator=( U && value ) + { + if ( has_value() ) + { + contained.value() = std::forward( value ); + } + else + { + initialize( T( std::forward( value ) ) ); + } + return *this; + } + +#else // optional_CPP11_OR_GREATER + + // 4 (C++98) - copy-assign from value + template< typename U /*= T*/ > + optional & operator=( U const & value ) + { + if ( has_value() ) contained.value() = value; + else initialize( T( value ) ); + return *this; + } + +#endif // optional_CPP11_OR_GREATER + + // 5 (C++98 and later) - converting copy-assign from optional + template< typename U > +#if optional_CPP11_OR_GREATER + // NOLINTNEXTLINE( cppcoreguidelines-c-copy-assignment-signature, misc-unconventional-assign-operator ) + optional_REQUIRES_R( + optional&, + std::is_constructible< T , U const &>::value + && std11::is_assignable< T&, U const &>::value + && !std::is_constructible & >::value + && !std::is_constructible && >::value + && !std::is_constructible const & >::value + && !std::is_constructible const && >::value + && !std::is_convertible< optional & , T>::value + && !std::is_convertible< optional && , T>::value + && !std::is_convertible< optional const & , T>::value + && !std::is_convertible< optional const &&, T>::value + && !std11::is_assignable< T&, optional & >::value + && !std11::is_assignable< T&, optional && >::value + && !std11::is_assignable< T&, optional const & >::value + && !std11::is_assignable< T&, optional const && >::value + ) +#else + optional& +#endif // optional_CPP11_OR_GREATER + operator=( optional const & other ) + { + return *this = optional( other ); + } + +#if optional_CPP11_OR_GREATER + + // 6 (C++11) - converting move-assign from optional + template< typename U > + // NOLINTNEXTLINE( cppcoreguidelines-c-copy-assignment-signature, misc-unconventional-assign-operator ) + optional_REQUIRES_R( + optional&, + std::is_constructible< T , U>::value + && std11::is_assignable< T&, U>::value + && !std::is_constructible & >::value + && !std::is_constructible && >::value + && !std::is_constructible const & >::value + && !std::is_constructible const && >::value + && !std::is_convertible< optional & , T>::value + && !std::is_convertible< optional && , T>::value + && !std::is_convertible< optional const & , T>::value + && !std::is_convertible< optional const &&, T>::value + && !std11::is_assignable< T&, optional & >::value + && !std11::is_assignable< T&, optional && >::value + && !std11::is_assignable< T&, optional const & >::value + && !std11::is_assignable< T&, optional const && >::value + ) + operator=( optional && other ) + { + return *this = optional( std::move( other ) ); + } + + // 7 (C++11) - emplace + template< typename... Args + optional_REQUIRES_T( + std::is_constructible::value + ) + > + T& emplace( Args&&... args ) + { + *this = nullopt; + contained.emplace( std::forward(args)... ); + has_value_ = true; + return contained.value(); + } + + // 8 (C++11) - emplace, initializer-list + template< typename U, typename... Args + optional_REQUIRES_T( + std::is_constructible&, Args&&...>::value + ) + > + T& emplace( std::initializer_list il, Args&&... args ) + { + *this = nullopt; + contained.emplace( il, std::forward(args)... ); + has_value_ = true; + return contained.value(); + } + +#endif // optional_CPP11_OR_GREATER + + // x.x.3.4, swap + + void swap( optional & other ) +#if optional_CPP11_OR_GREATER + noexcept( + std11::is_nothrow_move_constructible::value + && std17::is_nothrow_swappable::value + ) +#endif + { + using std::swap; + if ( (has_value() == true ) && (other.has_value() == true ) ) { swap( **this, *other ); } + else if ( (has_value() == false) && (other.has_value() == true ) ) { initialize( std11::move(*other) ); other.reset(); } + else if ( (has_value() == true ) && (other.has_value() == false) ) { other.initialize( std11::move(**this) ); reset(); } + } + + // x.x.3.5, observers + + optional_constexpr value_type const * operator ->() const + { + return assert( has_value() ), + contained.value_ptr(); + } + + optional_constexpr14 value_type * operator ->() + { + return assert( has_value() ), + contained.value_ptr(); + } + + optional_constexpr value_type const & operator *() const optional_ref_qual + { + return assert( has_value() ), + contained.value(); + } + + optional_constexpr14 value_type & operator *() optional_ref_qual + { + return assert( has_value() ), + contained.value(); + } + +#if optional_HAVE( REF_QUALIFIER ) + + optional_constexpr value_type const && operator *() const optional_refref_qual + { + return std::move( **this ); + } + + optional_constexpr14 value_type && operator *() optional_refref_qual + { + return std::move( **this ); + } + +#endif + +#if optional_CPP11_OR_GREATER + optional_constexpr explicit operator bool() const optional_noexcept + { + return has_value(); + } +#else + optional_constexpr operator safe_bool() const optional_noexcept + { + return has_value() ? &optional::this_type_does_not_support_comparisons : 0; + } +#endif + + // NOLINTNEXTLINE( modernize-use-nodiscard ) + /*optional_nodiscard*/ optional_constexpr bool has_value() const optional_noexcept + { + return has_value_; + } + + // NOLINTNEXTLINE( modernize-use-nodiscard ) + /*optional_nodiscard*/ optional_constexpr14 value_type const & value() const optional_ref_qual + { +#if optional_CONFIG_NO_EXCEPTIONS + assert( has_value() ); +#else + if ( ! has_value() ) + { + throw bad_optional_access(); + } +#endif + return contained.value(); + } + + optional_constexpr14 value_type & value() optional_ref_qual + { +#if optional_CONFIG_NO_EXCEPTIONS + assert( has_value() ); +#else + if ( ! has_value() ) + { + throw bad_optional_access(); + } +#endif + return contained.value(); + } + +#if optional_HAVE( REF_QUALIFIER ) && ( !optional_COMPILER_GNUC_VERSION || optional_COMPILER_GNUC_VERSION >= 490 ) + + // NOLINTNEXTLINE( modernize-use-nodiscard ) + /*optional_nodiscard*/ optional_constexpr value_type const && value() const optional_refref_qual + { + return std::move( value() ); + } + + optional_constexpr14 value_type && value() optional_refref_qual + { + return std::move( value() ); + } + +#endif + +#if optional_HAVE( REF_QUALIFIER ) + + template< typename U > + optional_constexpr value_type value_or( U && v ) const optional_ref_qual + { + return has_value() ? contained.value() : static_cast(std::forward( v ) ); + } + + template< typename U > + optional_constexpr14 value_type value_or( U && v ) optional_refref_qual + { +#if optional_COMPILER_CLANG_VERSION + return has_value() ? /*std::move*/( contained.value() ) : static_cast(std::forward( v ) ); +#else + return has_value() ? std::move( contained.value() ) : static_cast(std::forward( v ) ); +#endif + } + +#else + + template< typename U > + optional_constexpr value_type value_or( U const & v ) const + { + return has_value() ? contained.value() : static_cast( v ); + } + +#endif // optional_HAVE( REF_QUALIFIER ) + +#if !optional_CONFIG_NO_EXTENSIONS +#if optional_HAVE( REF_QUALIFIER ) + + template< typename F > + optional_constexpr value_type value_or_eval( F f ) const & + { + return has_value() ? contained.value() : f(); + } + + template< typename F > + optional_constexpr14 value_type value_or_eval( F f ) && + { + if ( has_value() ) + { + return std::move( contained.value() ); + } + else + { + return f(); + } + } + +#else + + template< typename F > + optional_constexpr value_type value_or_eval( F f ) const + { + return has_value() ? contained.value() : f(); + } + +#endif // optional_HAVE( REF_QUALIFIER ) +#endif // !optional_CONFIG_NO_EXTENSIONS + + // x.x.3.6, modifiers + + void reset() optional_noexcept + { + if ( has_value() ) + { + contained.destruct_value(); + } + + has_value_ = false; + } + +private: + void this_type_does_not_support_comparisons() const {} + + template< typename V > + void initialize( V const & value ) + { + assert( ! has_value() ); + contained.construct_value( value ); + has_value_ = true; + } + +#if optional_CPP11_OR_GREATER + template< typename V > + void initialize( V && value ) + { + assert( ! has_value() ); + contained.construct_value( std::move( value ) ); + has_value_ = true; + } + +#endif + +private: + bool has_value_; + detail::storage_t< value_type > contained; + +}; + +// Relational operators + +template< typename T, typename U > +optional_nodiscard optional_constexpr bool operator==( optional const & x, optional const & y ) +{ + return bool(x) != bool(y) ? false : !bool( x ) ? true : *x == *y; +} + +template< typename T, typename U > +optional_nodiscard optional_constexpr bool operator!=( optional const & x, optional const & y ) +{ + return !(x == y); +} + +template< typename T, typename U > +optional_nodiscard optional_constexpr bool operator<( optional const & x, optional const & y ) +{ + return (!y) ? false : (!x) ? true : *x < *y; +} + +template< typename T, typename U > +optional_nodiscard optional_constexpr bool operator>( optional const & x, optional const & y ) +{ + return (y < x); +} + +template< typename T, typename U > +optional_nodiscard optional_constexpr bool operator<=( optional const & x, optional const & y ) +{ + return !(y < x); +} + +template< typename T, typename U > +optional_nodiscard optional_constexpr bool operator>=( optional const & x, optional const & y ) +{ + return !(x < y); +} + +// Comparison with nullopt + +template< typename T > +optional_nodiscard optional_constexpr bool operator==( optional const & x, nullopt_t /*unused*/ ) optional_noexcept +{ + return (!x); +} + +template< typename T > +optional_nodiscard optional_constexpr bool operator==( nullopt_t /*unused*/, optional const & x ) optional_noexcept +{ + return (!x); +} + +template< typename T > +optional_nodiscard optional_constexpr bool operator!=( optional const & x, nullopt_t /*unused*/ ) optional_noexcept +{ + return bool(x); +} + +template< typename T > +optional_nodiscard optional_constexpr bool operator!=( nullopt_t /*unused*/, optional const & x ) optional_noexcept +{ + return bool(x); +} + +template< typename T > +optional_nodiscard optional_constexpr bool operator<( optional const & /*unused*/, nullopt_t /*unused*/ ) optional_noexcept +{ + return false; +} + +template< typename T > +optional_nodiscard optional_constexpr bool operator<( nullopt_t /*unused*/, optional const & x ) optional_noexcept +{ + return bool(x); +} + +template< typename T > +optional_nodiscard optional_constexpr bool operator<=( optional const & x, nullopt_t /*unused*/ ) optional_noexcept +{ + return (!x); +} + +template< typename T > +optional_nodiscard optional_constexpr bool operator<=( nullopt_t /*unused*/, optional const & /*unused*/ ) optional_noexcept +{ + return true; +} + +template< typename T > +optional_nodiscard optional_constexpr bool operator>( optional const & x, nullopt_t /*unused*/ ) optional_noexcept +{ + return bool(x); +} + +template< typename T > +optional_nodiscard optional_constexpr bool operator>( nullopt_t /*unused*/, optional const & /*unused*/ ) optional_noexcept +{ + return false; +} + +template< typename T > +optional_nodiscard optional_constexpr bool operator>=( optional const & /*unused*/, nullopt_t /*unused*/ ) optional_noexcept +{ + return true; +} + +template< typename T > +optional_nodiscard optional_constexpr bool operator>=( nullopt_t /*unused*/, optional const & x ) optional_noexcept +{ + return (!x); +} + +// Comparison with T + +template< typename T, typename U > +optional_nodiscard optional_constexpr bool operator==( optional const & x, U const & v ) +{ + return bool(x) ? *x == v : false; +} + +template< typename T, typename U > +optional_nodiscard optional_constexpr bool operator==( U const & v, optional const & x ) +{ + return bool(x) ? v == *x : false; +} + +template< typename T, typename U > +optional_nodiscard optional_constexpr bool operator!=( optional const & x, U const & v ) +{ + return bool(x) ? *x != v : true; +} + +template< typename T, typename U > +optional_nodiscard optional_constexpr bool operator!=( U const & v, optional const & x ) +{ + return bool(x) ? v != *x : true; +} + +template< typename T, typename U > +optional_nodiscard optional_constexpr bool operator<( optional const & x, U const & v ) +{ + return bool(x) ? *x < v : true; +} + +template< typename T, typename U > +optional_nodiscard optional_constexpr bool operator<( U const & v, optional const & x ) +{ + return bool(x) ? v < *x : false; +} + +template< typename T, typename U > +optional_nodiscard optional_constexpr bool operator<=( optional const & x, U const & v ) +{ + return bool(x) ? *x <= v : true; +} + +template< typename T, typename U > +optional_nodiscard optional_constexpr bool operator<=( U const & v, optional const & x ) +{ + return bool(x) ? v <= *x : false; +} + +template< typename T, typename U > +optional_nodiscard optional_constexpr bool operator>( optional const & x, U const & v ) +{ + return bool(x) ? *x > v : false; +} + +template< typename T, typename U > +optional_nodiscard optional_constexpr bool operator>( U const & v, optional const & x ) +{ + return bool(x) ? v > *x : true; +} + +template< typename T, typename U > +optional_nodiscard optional_constexpr bool operator>=( optional const & x, U const & v ) +{ + return bool(x) ? *x >= v : false; +} + +template< typename T, typename U > +optional_nodiscard optional_constexpr bool operator>=( U const & v, optional const & x ) +{ + return bool(x) ? v >= *x : true; +} + +// Specialized algorithms + +template< typename T +#if optional_CPP11_OR_GREATER + optional_REQUIRES_T( + std11::is_move_constructible::value + && std17::is_swappable::value ) +#endif +> +void swap( optional & x, optional & y ) +#if optional_CPP11_OR_GREATER + noexcept( noexcept( x.swap(y) ) ) +#endif +{ + x.swap( y ); +} + +#if optional_CPP11_OR_GREATER + +template< typename T > +optional_constexpr optional< typename std::decay::type > make_optional( T && value ) +{ + return optional< typename std::decay::type >( std::forward( value ) ); +} + +template< typename T, typename...Args > +optional_constexpr optional make_optional( Args&&... args ) +{ + return optional( nonstd_lite_in_place(T), std::forward(args)...); +} + +template< typename T, typename U, typename... Args > +optional_constexpr optional make_optional( std::initializer_list il, Args&&... args ) +{ + return optional( nonstd_lite_in_place(T), il, std::forward(args)...); +} + +#else + +template< typename T > +optional make_optional( T const & value ) +{ + return optional( value ); +} + +#endif // optional_CPP11_OR_GREATER + +} // namespace optional_lite + +using optional_lite::optional; +using optional_lite::nullopt_t; +using optional_lite::nullopt; + +#if ! optional_CONFIG_NO_EXCEPTIONS +using optional_lite::bad_optional_access; +#endif + +using optional_lite::make_optional; + +} // namespace nonstd + +#if optional_CPP11_OR_GREATER + +// specialize the std::hash algorithm: + +namespace std { + +template< class T > +struct hash< nonstd::optional > +{ +public: + std::size_t operator()( nonstd::optional const & v ) const optional_noexcept + { + return bool( v ) ? std::hash{}( *v ) : 0; + } +}; + +} //namespace std + +#endif // optional_CPP11_OR_GREATER + +#if defined(__clang__) +# pragma clang diagnostic pop +#elif defined(__GNUC__) +# pragma GCC diagnostic pop +#elif defined(_MSC_VER ) +# pragma warning( pop ) +#endif + +#endif // optional_USES_STD_OPTIONAL + +#endif // NONSTD_OPTIONAL_LITE_HPP diff --git a/graphics/asymptote/LspCpp/macro_map.h b/graphics/asymptote/LspCpp/macro_map.h deleted file mode 100644 index f09ba5b1a7..0000000000 --- a/graphics/asymptote/LspCpp/macro_map.h +++ /dev/null @@ -1,134 +0,0 @@ -/* -Boost Software License - Version 1.0 - August 17th, 2003 - -Permission is hereby granted, free of charge, to any person or organization -obtaining a copy of the software and accompanying documentation covered by -this license (the "Software") to use, reproduce, display, distribute, -execute, and transmit the Software, and to prepare derivative works of the -Software, and to permit third-parties to whom the Software is furnished to -do so, all subject to the following: - -The copyright notices in the Software and this entire statement, including -the above license grant, this restriction and the following disclaimer, -must be included in all copies of the Software, in whole or in part, and -all derivative works of the Software, unless such copies or derivative -works are solely in the form of machine-executable object code generated by -a source language processor. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT -SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE -FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, -ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -DEALINGS IN THE SOFTWARE. -*/ - -// Taken from https://github.com/cbeck88/visit_struct. -// -// Usage -// -// #define PRINT_DOUBLE(x) printf(#x " = %d\n", x); -// -// MACRO_MAP(PRINT_DOUBLE, 1, 2, 3) -// #define PRINT_DOUBLES(...) MACRO_MAP(PRINT_DOUBLE, __VA_ARGS__) - -#pragma once - -static constexpr const int max_visitable_members = 69; - -#define VISIT_STRUCT_EXPAND(x) x -#define VISIT_STRUCT_PP_ARG_N( \ - _1, _2, _3, _4, _5, _6, _7, _8, _9, _10,\ - _11, _12, _13, _14, _15, _16, _17, _18, _19, _20,\ - _21, _22, _23, _24, _25, _26, _27, _28, _29, _30,\ - _31, _32, _33, _34, _35, _36, _37, _38, _39, _40,\ - _41, _42, _43, _44, _45, _46, _47, _48, _49, _50,\ - _51, _52, _53, _54, _55, _56, _57, _58, _59, _60,\ - _61, _62, _63, _64, _65, _66, _67, _68, _69, N, ...) N -#define VISIT_STRUCT_PP_NARG(...) VISIT_STRUCT_EXPAND(VISIT_STRUCT_PP_ARG_N(__VA_ARGS__, \ - 69, 68, 67, 66, 65, 64, 63, 62, 61, 60, \ - 59, 58, 57, 56, 55, 54, 53, 52, 51, 50, \ - 49, 48, 47, 46, 45, 44, 43, 42, 41, 40, \ - 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, \ - 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, \ - 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, \ - 9, 8, 7, 6, 5, 4, 3, 2, 1, 0)) - -/* need extra level to force extra eval */ -#define VISIT_STRUCT_CONCAT_(a,b) a ## b -#define VISIT_STRUCT_CONCAT(a,b) VISIT_STRUCT_CONCAT_(a,b) - -#define VISIT_STRUCT_APPLYF0(f) -#define VISIT_STRUCT_APPLYF1(f,_1) f(_1) -#define VISIT_STRUCT_APPLYF2(f,_1,_2) f(_1) f(_2) -#define VISIT_STRUCT_APPLYF3(f,_1,_2,_3) f(_1) f(_2) f(_3) -#define VISIT_STRUCT_APPLYF4(f,_1,_2,_3,_4) f(_1) f(_2) f(_3) f(_4) -#define VISIT_STRUCT_APPLYF5(f,_1,_2,_3,_4,_5) f(_1) f(_2) f(_3) f(_4) f(_5) -#define VISIT_STRUCT_APPLYF6(f,_1,_2,_3,_4,_5,_6) f(_1) f(_2) f(_3) f(_4) f(_5) f(_6) -#define VISIT_STRUCT_APPLYF7(f,_1,_2,_3,_4,_5,_6,_7) f(_1) f(_2) f(_3) f(_4) f(_5) f(_6) f(_7) -#define VISIT_STRUCT_APPLYF8(f,_1,_2,_3,_4,_5,_6,_7,_8) f(_1) f(_2) f(_3) f(_4) f(_5) f(_6) f(_7) f(_8) -#define VISIT_STRUCT_APPLYF9(f,_1,_2,_3,_4,_5,_6,_7,_8,_9) f(_1) f(_2) f(_3) f(_4) f(_5) f(_6) f(_7) f(_8) f(_9) -#define VISIT_STRUCT_APPLYF10(f,_1,_2,_3,_4,_5,_6,_7,_8,_9,_10) f(_1) f(_2) f(_3) f(_4) f(_5) f(_6) f(_7) f(_8) f(_9) f(_10) -#define VISIT_STRUCT_APPLYF11(f,_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11) f(_1) f(_2) f(_3) f(_4) f(_5) f(_6) f(_7) f(_8) f(_9) f(_10) f(_11) -#define VISIT_STRUCT_APPLYF12(f,_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12) f(_1) f(_2) f(_3) f(_4) f(_5) f(_6) f(_7) f(_8) f(_9) f(_10) f(_11) f(_12) -#define VISIT_STRUCT_APPLYF13(f,_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13) f(_1) f(_2) f(_3) f(_4) f(_5) f(_6) f(_7) f(_8) f(_9) f(_10) f(_11) f(_12) f(_13) -#define VISIT_STRUCT_APPLYF14(f,_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14) f(_1) f(_2) f(_3) f(_4) f(_5) f(_6) f(_7) f(_8) f(_9) f(_10) f(_11) f(_12) f(_13) f(_14) -#define VISIT_STRUCT_APPLYF15(f,_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15) f(_1) f(_2) f(_3) f(_4) f(_5) f(_6) f(_7) f(_8) f(_9) f(_10) f(_11) f(_12) f(_13) f(_14) f(_15) -#define VISIT_STRUCT_APPLYF16(f,_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16) f(_1) f(_2) f(_3) f(_4) f(_5) f(_6) f(_7) f(_8) f(_9) f(_10) f(_11) f(_12) f(_13) f(_14) f(_15) f(_16) -#define VISIT_STRUCT_APPLYF17(f,_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17) f(_1) f(_2) f(_3) f(_4) f(_5) f(_6) f(_7) f(_8) f(_9) f(_10) f(_11) f(_12) f(_13) f(_14) f(_15) f(_16) f(_17) -#define VISIT_STRUCT_APPLYF18(f,_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18) f(_1) f(_2) f(_3) f(_4) f(_5) f(_6) f(_7) f(_8) f(_9) f(_10) f(_11) f(_12) f(_13) f(_14) f(_15) f(_16) f(_17) f(_18) -#define VISIT_STRUCT_APPLYF19(f,_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19) f(_1) f(_2) f(_3) f(_4) f(_5) f(_6) f(_7) f(_8) f(_9) f(_10) f(_11) f(_12) f(_13) f(_14) f(_15) f(_16) f(_17) f(_18) f(_19) -#define VISIT_STRUCT_APPLYF20(f,_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,_20) f(_1) f(_2) f(_3) f(_4) f(_5) f(_6) f(_7) f(_8) f(_9) f(_10) f(_11) f(_12) f(_13) f(_14) f(_15) f(_16) f(_17) f(_18) f(_19) f(_20) -#define VISIT_STRUCT_APPLYF21(f,_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,_20,_21) f(_1) f(_2) f(_3) f(_4) f(_5) f(_6) f(_7) f(_8) f(_9) f(_10) f(_11) f(_12) f(_13) f(_14) f(_15) f(_16) f(_17) f(_18) f(_19) f(_20) f(_21) -#define VISIT_STRUCT_APPLYF22(f,_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,_20,_21,_22) f(_1) f(_2) f(_3) f(_4) f(_5) f(_6) f(_7) f(_8) f(_9) f(_10) f(_11) f(_12) f(_13) f(_14) f(_15) f(_16) f(_17) f(_18) f(_19) f(_20) f(_21) f(_22) -#define VISIT_STRUCT_APPLYF23(f,_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,_20,_21,_22,_23) f(_1) f(_2) f(_3) f(_4) f(_5) f(_6) f(_7) f(_8) f(_9) f(_10) f(_11) f(_12) f(_13) f(_14) f(_15) f(_16) f(_17) f(_18) f(_19) f(_20) f(_21) f(_22) f(_23) -#define VISIT_STRUCT_APPLYF24(f,_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,_20,_21,_22,_23,_24) f(_1) f(_2) f(_3) f(_4) f(_5) f(_6) f(_7) f(_8) f(_9) f(_10) f(_11) f(_12) f(_13) f(_14) f(_15) f(_16) f(_17) f(_18) f(_19) f(_20) f(_21) f(_22) f(_23) f(_24) -#define VISIT_STRUCT_APPLYF25(f,_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,_20,_21,_22,_23,_24,_25) f(_1) f(_2) f(_3) f(_4) f(_5) f(_6) f(_7) f(_8) f(_9) f(_10) f(_11) f(_12) f(_13) f(_14) f(_15) f(_16) f(_17) f(_18) f(_19) f(_20) f(_21) f(_22) f(_23) f(_24) f(_25) -#define VISIT_STRUCT_APPLYF26(f,_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,_20,_21,_22,_23,_24,_25,_26) f(_1) f(_2) f(_3) f(_4) f(_5) f(_6) f(_7) f(_8) f(_9) f(_10) f(_11) f(_12) f(_13) f(_14) f(_15) f(_16) f(_17) f(_18) f(_19) f(_20) f(_21) f(_22) f(_23) f(_24) f(_25) f(_26) -#define VISIT_STRUCT_APPLYF27(f,_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,_20,_21,_22,_23,_24,_25,_26,_27) f(_1) f(_2) f(_3) f(_4) f(_5) f(_6) f(_7) f(_8) f(_9) f(_10) f(_11) f(_12) f(_13) f(_14) f(_15) f(_16) f(_17) f(_18) f(_19) f(_20) f(_21) f(_22) f(_23) f(_24) f(_25) f(_26) f(_27) -#define VISIT_STRUCT_APPLYF28(f,_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,_20,_21,_22,_23,_24,_25,_26,_27,_28) f(_1) f(_2) f(_3) f(_4) f(_5) f(_6) f(_7) f(_8) f(_9) f(_10) f(_11) f(_12) f(_13) f(_14) f(_15) f(_16) f(_17) f(_18) f(_19) f(_20) f(_21) f(_22) f(_23) f(_24) f(_25) f(_26) f(_27) f(_28) -#define VISIT_STRUCT_APPLYF29(f,_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,_20,_21,_22,_23,_24,_25,_26,_27,_28,_29) f(_1) f(_2) f(_3) f(_4) f(_5) f(_6) f(_7) f(_8) f(_9) f(_10) f(_11) f(_12) f(_13) f(_14) f(_15) f(_16) f(_17) f(_18) f(_19) f(_20) f(_21) f(_22) f(_23) f(_24) f(_25) f(_26) f(_27) f(_28) f(_29) -#define VISIT_STRUCT_APPLYF30(f,_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,_20,_21,_22,_23,_24,_25,_26,_27,_28,_29,_30) f(_1) f(_2) f(_3) f(_4) f(_5) f(_6) f(_7) f(_8) f(_9) f(_10) f(_11) f(_12) f(_13) f(_14) f(_15) f(_16) f(_17) f(_18) f(_19) f(_20) f(_21) f(_22) f(_23) f(_24) f(_25) f(_26) f(_27) f(_28) f(_29) f(_30) -#define VISIT_STRUCT_APPLYF31(f,_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,_20,_21,_22,_23,_24,_25,_26,_27,_28,_29,_30,_31) f(_1) f(_2) f(_3) f(_4) f(_5) f(_6) f(_7) f(_8) f(_9) f(_10) f(_11) f(_12) f(_13) f(_14) f(_15) f(_16) f(_17) f(_18) f(_19) f(_20) f(_21) f(_22) f(_23) f(_24) f(_25) f(_26) f(_27) f(_28) f(_29) f(_30) f(_31) -#define VISIT_STRUCT_APPLYF32(f,_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,_20,_21,_22,_23,_24,_25,_26,_27,_28,_29,_30,_31,_32) f(_1) f(_2) f(_3) f(_4) f(_5) f(_6) f(_7) f(_8) f(_9) f(_10) f(_11) f(_12) f(_13) f(_14) f(_15) f(_16) f(_17) f(_18) f(_19) f(_20) f(_21) f(_22) f(_23) f(_24) f(_25) f(_26) f(_27) f(_28) f(_29) f(_30) f(_31) f(_32) -#define VISIT_STRUCT_APPLYF33(f,_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,_20,_21,_22,_23,_24,_25,_26,_27,_28,_29,_30,_31,_32,_33) f(_1) f(_2) f(_3) f(_4) f(_5) f(_6) f(_7) f(_8) f(_9) f(_10) f(_11) f(_12) f(_13) f(_14) f(_15) f(_16) f(_17) f(_18) f(_19) f(_20) f(_21) f(_22) f(_23) f(_24) f(_25) f(_26) f(_27) f(_28) f(_29) f(_30) f(_31) f(_32) f(_33) -#define VISIT_STRUCT_APPLYF34(f,_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,_20,_21,_22,_23,_24,_25,_26,_27,_28,_29,_30,_31,_32,_33,_34) f(_1) f(_2) f(_3) f(_4) f(_5) f(_6) f(_7) f(_8) f(_9) f(_10) f(_11) f(_12) f(_13) f(_14) f(_15) f(_16) f(_17) f(_18) f(_19) f(_20) f(_21) f(_22) f(_23) f(_24) f(_25) f(_26) f(_27) f(_28) f(_29) f(_30) f(_31) f(_32) f(_33) f(_34) -#define VISIT_STRUCT_APPLYF35(f,_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,_20,_21,_22,_23,_24,_25,_26,_27,_28,_29,_30,_31,_32,_33,_34,_35) f(_1) f(_2) f(_3) f(_4) f(_5) f(_6) f(_7) f(_8) f(_9) f(_10) f(_11) f(_12) f(_13) f(_14) f(_15) f(_16) f(_17) f(_18) f(_19) f(_20) f(_21) f(_22) f(_23) f(_24) f(_25) f(_26) f(_27) f(_28) f(_29) f(_30) f(_31) f(_32) f(_33) f(_34) f(_35) -#define VISIT_STRUCT_APPLYF36(f,_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,_20,_21,_22,_23,_24,_25,_26,_27,_28,_29,_30,_31,_32,_33,_34,_35,_36) f(_1) f(_2) f(_3) f(_4) f(_5) f(_6) f(_7) f(_8) f(_9) f(_10) f(_11) f(_12) f(_13) f(_14) f(_15) f(_16) f(_17) f(_18) f(_19) f(_20) f(_21) f(_22) f(_23) f(_24) f(_25) f(_26) f(_27) f(_28) f(_29) f(_30) f(_31) f(_32) f(_33) f(_34) f(_35) f(_36) -#define VISIT_STRUCT_APPLYF37(f,_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,_20,_21,_22,_23,_24,_25,_26,_27,_28,_29,_30,_31,_32,_33,_34,_35,_36,_37) f(_1) f(_2) f(_3) f(_4) f(_5) f(_6) f(_7) f(_8) f(_9) f(_10) f(_11) f(_12) f(_13) f(_14) f(_15) f(_16) f(_17) f(_18) f(_19) f(_20) f(_21) f(_22) f(_23) f(_24) f(_25) f(_26) f(_27) f(_28) f(_29) f(_30) f(_31) f(_32) f(_33) f(_34) f(_35) f(_36) f(_37) -#define VISIT_STRUCT_APPLYF38(f,_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,_20,_21,_22,_23,_24,_25,_26,_27,_28,_29,_30,_31,_32,_33,_34,_35,_36,_37,_38) f(_1) f(_2) f(_3) f(_4) f(_5) f(_6) f(_7) f(_8) f(_9) f(_10) f(_11) f(_12) f(_13) f(_14) f(_15) f(_16) f(_17) f(_18) f(_19) f(_20) f(_21) f(_22) f(_23) f(_24) f(_25) f(_26) f(_27) f(_28) f(_29) f(_30) f(_31) f(_32) f(_33) f(_34) f(_35) f(_36) f(_37) f(_38) -#define VISIT_STRUCT_APPLYF39(f,_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,_20,_21,_22,_23,_24,_25,_26,_27,_28,_29,_30,_31,_32,_33,_34,_35,_36,_37,_38,_39) f(_1) f(_2) f(_3) f(_4) f(_5) f(_6) f(_7) f(_8) f(_9) f(_10) f(_11) f(_12) f(_13) f(_14) f(_15) f(_16) f(_17) f(_18) f(_19) f(_20) f(_21) f(_22) f(_23) f(_24) f(_25) f(_26) f(_27) f(_28) f(_29) f(_30) f(_31) f(_32) f(_33) f(_34) f(_35) f(_36) f(_37) f(_38) f(_39) -#define VISIT_STRUCT_APPLYF40(f,_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,_20,_21,_22,_23,_24,_25,_26,_27,_28,_29,_30,_31,_32,_33,_34,_35,_36,_37,_38,_39,_40) f(_1) f(_2) f(_3) f(_4) f(_5) f(_6) f(_7) f(_8) f(_9) f(_10) f(_11) f(_12) f(_13) f(_14) f(_15) f(_16) f(_17) f(_18) f(_19) f(_20) f(_21) f(_22) f(_23) f(_24) f(_25) f(_26) f(_27) f(_28) f(_29) f(_30) f(_31) f(_32) f(_33) f(_34) f(_35) f(_36) f(_37) f(_38) f(_39) f(_40) -#define VISIT_STRUCT_APPLYF41(f,_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,_20,_21,_22,_23,_24,_25,_26,_27,_28,_29,_30,_31,_32,_33,_34,_35,_36,_37,_38,_39,_40,_41) f(_1) f(_2) f(_3) f(_4) f(_5) f(_6) f(_7) f(_8) f(_9) f(_10) f(_11) f(_12) f(_13) f(_14) f(_15) f(_16) f(_17) f(_18) f(_19) f(_20) f(_21) f(_22) f(_23) f(_24) f(_25) f(_26) f(_27) f(_28) f(_29) f(_30) f(_31) f(_32) f(_33) f(_34) f(_35) f(_36) f(_37) f(_38) f(_39) f(_40) f(_41) -#define VISIT_STRUCT_APPLYF42(f,_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,_20,_21,_22,_23,_24,_25,_26,_27,_28,_29,_30,_31,_32,_33,_34,_35,_36,_37,_38,_39,_40,_41,_42) f(_1) f(_2) f(_3) f(_4) f(_5) f(_6) f(_7) f(_8) f(_9) f(_10) f(_11) f(_12) f(_13) f(_14) f(_15) f(_16) f(_17) f(_18) f(_19) f(_20) f(_21) f(_22) f(_23) f(_24) f(_25) f(_26) f(_27) f(_28) f(_29) f(_30) f(_31) f(_32) f(_33) f(_34) f(_35) f(_36) f(_37) f(_38) f(_39) f(_40) f(_41) f(_42) -#define VISIT_STRUCT_APPLYF43(f,_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,_20,_21,_22,_23,_24,_25,_26,_27,_28,_29,_30,_31,_32,_33,_34,_35,_36,_37,_38,_39,_40,_41,_42,_43) f(_1) f(_2) f(_3) f(_4) f(_5) f(_6) f(_7) f(_8) f(_9) f(_10) f(_11) f(_12) f(_13) f(_14) f(_15) f(_16) f(_17) f(_18) f(_19) f(_20) f(_21) f(_22) f(_23) f(_24) f(_25) f(_26) f(_27) f(_28) f(_29) f(_30) f(_31) f(_32) f(_33) f(_34) f(_35) f(_36) f(_37) f(_38) f(_39) f(_40) f(_41) f(_42) f(_43) -#define VISIT_STRUCT_APPLYF44(f,_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,_20,_21,_22,_23,_24,_25,_26,_27,_28,_29,_30,_31,_32,_33,_34,_35,_36,_37,_38,_39,_40,_41,_42,_43,_44) f(_1) f(_2) f(_3) f(_4) f(_5) f(_6) f(_7) f(_8) f(_9) f(_10) f(_11) f(_12) f(_13) f(_14) f(_15) f(_16) f(_17) f(_18) f(_19) f(_20) f(_21) f(_22) f(_23) f(_24) f(_25) f(_26) f(_27) f(_28) f(_29) f(_30) f(_31) f(_32) f(_33) f(_34) f(_35) f(_36) f(_37) f(_38) f(_39) f(_40) f(_41) f(_42) f(_43) f(_44) -#define VISIT_STRUCT_APPLYF45(f,_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,_20,_21,_22,_23,_24,_25,_26,_27,_28,_29,_30,_31,_32,_33,_34,_35,_36,_37,_38,_39,_40,_41,_42,_43,_44,_45) f(_1) f(_2) f(_3) f(_4) f(_5) f(_6) f(_7) f(_8) f(_9) f(_10) f(_11) f(_12) f(_13) f(_14) f(_15) f(_16) f(_17) f(_18) f(_19) f(_20) f(_21) f(_22) f(_23) f(_24) f(_25) f(_26) f(_27) f(_28) f(_29) f(_30) f(_31) f(_32) f(_33) f(_34) f(_35) f(_36) f(_37) f(_38) f(_39) f(_40) f(_41) f(_42) f(_43) f(_44) f(_45) -#define VISIT_STRUCT_APPLYF46(f,_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,_20,_21,_22,_23,_24,_25,_26,_27,_28,_29,_30,_31,_32,_33,_34,_35,_36,_37,_38,_39,_40,_41,_42,_43,_44,_45,_46) f(_1) f(_2) f(_3) f(_4) f(_5) f(_6) f(_7) f(_8) f(_9) f(_10) f(_11) f(_12) f(_13) f(_14) f(_15) f(_16) f(_17) f(_18) f(_19) f(_20) f(_21) f(_22) f(_23) f(_24) f(_25) f(_26) f(_27) f(_28) f(_29) f(_30) f(_31) f(_32) f(_33) f(_34) f(_35) f(_36) f(_37) f(_38) f(_39) f(_40) f(_41) f(_42) f(_43) f(_44) f(_45) f(_46) -#define VISIT_STRUCT_APPLYF47(f,_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,_20,_21,_22,_23,_24,_25,_26,_27,_28,_29,_30,_31,_32,_33,_34,_35,_36,_37,_38,_39,_40,_41,_42,_43,_44,_45,_46,_47) f(_1) f(_2) f(_3) f(_4) f(_5) f(_6) f(_7) f(_8) f(_9) f(_10) f(_11) f(_12) f(_13) f(_14) f(_15) f(_16) f(_17) f(_18) f(_19) f(_20) f(_21) f(_22) f(_23) f(_24) f(_25) f(_26) f(_27) f(_28) f(_29) f(_30) f(_31) f(_32) f(_33) f(_34) f(_35) f(_36) f(_37) f(_38) f(_39) f(_40) f(_41) f(_42) f(_43) f(_44) f(_45) f(_46) f(_47) -#define VISIT_STRUCT_APPLYF48(f,_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,_20,_21,_22,_23,_24,_25,_26,_27,_28,_29,_30,_31,_32,_33,_34,_35,_36,_37,_38,_39,_40,_41,_42,_43,_44,_45,_46,_47,_48) f(_1) f(_2) f(_3) f(_4) f(_5) f(_6) f(_7) f(_8) f(_9) f(_10) f(_11) f(_12) f(_13) f(_14) f(_15) f(_16) f(_17) f(_18) f(_19) f(_20) f(_21) f(_22) f(_23) f(_24) f(_25) f(_26) f(_27) f(_28) f(_29) f(_30) f(_31) f(_32) f(_33) f(_34) f(_35) f(_36) f(_37) f(_38) f(_39) f(_40) f(_41) f(_42) f(_43) f(_44) f(_45) f(_46) f(_47) f(_48) -#define VISIT_STRUCT_APPLYF49(f,_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,_20,_21,_22,_23,_24,_25,_26,_27,_28,_29,_30,_31,_32,_33,_34,_35,_36,_37,_38,_39,_40,_41,_42,_43,_44,_45,_46,_47,_48,_49) f(_1) f(_2) f(_3) f(_4) f(_5) f(_6) f(_7) f(_8) f(_9) f(_10) f(_11) f(_12) f(_13) f(_14) f(_15) f(_16) f(_17) f(_18) f(_19) f(_20) f(_21) f(_22) f(_23) f(_24) f(_25) f(_26) f(_27) f(_28) f(_29) f(_30) f(_31) f(_32) f(_33) f(_34) f(_35) f(_36) f(_37) f(_38) f(_39) f(_40) f(_41) f(_42) f(_43) f(_44) f(_45) f(_46) f(_47) f(_48) f(_49) -#define VISIT_STRUCT_APPLYF50(f,_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,_20,_21,_22,_23,_24,_25,_26,_27,_28,_29,_30,_31,_32,_33,_34,_35,_36,_37,_38,_39,_40,_41,_42,_43,_44,_45,_46,_47,_48,_49,_50) f(_1) f(_2) f(_3) f(_4) f(_5) f(_6) f(_7) f(_8) f(_9) f(_10) f(_11) f(_12) f(_13) f(_14) f(_15) f(_16) f(_17) f(_18) f(_19) f(_20) f(_21) f(_22) f(_23) f(_24) f(_25) f(_26) f(_27) f(_28) f(_29) f(_30) f(_31) f(_32) f(_33) f(_34) f(_35) f(_36) f(_37) f(_38) f(_39) f(_40) f(_41) f(_42) f(_43) f(_44) f(_45) f(_46) f(_47) f(_48) f(_49) f(_50) -#define VISIT_STRUCT_APPLYF51(f,_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,_20,_21,_22,_23,_24,_25,_26,_27,_28,_29,_30,_31,_32,_33,_34,_35,_36,_37,_38,_39,_40,_41,_42,_43,_44,_45,_46,_47,_48,_49,_50,_51) f(_1) f(_2) f(_3) f(_4) f(_5) f(_6) f(_7) f(_8) f(_9) f(_10) f(_11) f(_12) f(_13) f(_14) f(_15) f(_16) f(_17) f(_18) f(_19) f(_20) f(_21) f(_22) f(_23) f(_24) f(_25) f(_26) f(_27) f(_28) f(_29) f(_30) f(_31) f(_32) f(_33) f(_34) f(_35) f(_36) f(_37) f(_38) f(_39) f(_40) f(_41) f(_42) f(_43) f(_44) f(_45) f(_46) f(_47) f(_48) f(_49) f(_50) f(_51) -#define VISIT_STRUCT_APPLYF52(f,_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,_20,_21,_22,_23,_24,_25,_26,_27,_28,_29,_30,_31,_32,_33,_34,_35,_36,_37,_38,_39,_40,_41,_42,_43,_44,_45,_46,_47,_48,_49,_50,_51,_52) f(_1) f(_2) f(_3) f(_4) f(_5) f(_6) f(_7) f(_8) f(_9) f(_10) f(_11) f(_12) f(_13) f(_14) f(_15) f(_16) f(_17) f(_18) f(_19) f(_20) f(_21) f(_22) f(_23) f(_24) f(_25) f(_26) f(_27) f(_28) f(_29) f(_30) f(_31) f(_32) f(_33) f(_34) f(_35) f(_36) f(_37) f(_38) f(_39) f(_40) f(_41) f(_42) f(_43) f(_44) f(_45) f(_46) f(_47) f(_48) f(_49) f(_50) f(_51) f(_52) -#define VISIT_STRUCT_APPLYF53(f,_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,_20,_21,_22,_23,_24,_25,_26,_27,_28,_29,_30,_31,_32,_33,_34,_35,_36,_37,_38,_39,_40,_41,_42,_43,_44,_45,_46,_47,_48,_49,_50,_51,_52,_53) f(_1) f(_2) f(_3) f(_4) f(_5) f(_6) f(_7) f(_8) f(_9) f(_10) f(_11) f(_12) f(_13) f(_14) f(_15) f(_16) f(_17) f(_18) f(_19) f(_20) f(_21) f(_22) f(_23) f(_24) f(_25) f(_26) f(_27) f(_28) f(_29) f(_30) f(_31) f(_32) f(_33) f(_34) f(_35) f(_36) f(_37) f(_38) f(_39) f(_40) f(_41) f(_42) f(_43) f(_44) f(_45) f(_46) f(_47) f(_48) f(_49) f(_50) f(_51) f(_52) f(_53) -#define VISIT_STRUCT_APPLYF54(f,_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,_20,_21,_22,_23,_24,_25,_26,_27,_28,_29,_30,_31,_32,_33,_34,_35,_36,_37,_38,_39,_40,_41,_42,_43,_44,_45,_46,_47,_48,_49,_50,_51,_52,_53,_54) f(_1) f(_2) f(_3) f(_4) f(_5) f(_6) f(_7) f(_8) f(_9) f(_10) f(_11) f(_12) f(_13) f(_14) f(_15) f(_16) f(_17) f(_18) f(_19) f(_20) f(_21) f(_22) f(_23) f(_24) f(_25) f(_26) f(_27) f(_28) f(_29) f(_30) f(_31) f(_32) f(_33) f(_34) f(_35) f(_36) f(_37) f(_38) f(_39) f(_40) f(_41) f(_42) f(_43) f(_44) f(_45) f(_46) f(_47) f(_48) f(_49) f(_50) f(_51) f(_52) f(_53) f(_54) -#define VISIT_STRUCT_APPLYF55(f,_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,_20,_21,_22,_23,_24,_25,_26,_27,_28,_29,_30,_31,_32,_33,_34,_35,_36,_37,_38,_39,_40,_41,_42,_43,_44,_45,_46,_47,_48,_49,_50,_51,_52,_53,_54,_55) f(_1) f(_2) f(_3) f(_4) f(_5) f(_6) f(_7) f(_8) f(_9) f(_10) f(_11) f(_12) f(_13) f(_14) f(_15) f(_16) f(_17) f(_18) f(_19) f(_20) f(_21) f(_22) f(_23) f(_24) f(_25) f(_26) f(_27) f(_28) f(_29) f(_30) f(_31) f(_32) f(_33) f(_34) f(_35) f(_36) f(_37) f(_38) f(_39) f(_40) f(_41) f(_42) f(_43) f(_44) f(_45) f(_46) f(_47) f(_48) f(_49) f(_50) f(_51) f(_52) f(_53) f(_54) f(_55) -#define VISIT_STRUCT_APPLYF56(f,_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,_20,_21,_22,_23,_24,_25,_26,_27,_28,_29,_30,_31,_32,_33,_34,_35,_36,_37,_38,_39,_40,_41,_42,_43,_44,_45,_46,_47,_48,_49,_50,_51,_52,_53,_54,_55,_56) f(_1) f(_2) f(_3) f(_4) f(_5) f(_6) f(_7) f(_8) f(_9) f(_10) f(_11) f(_12) f(_13) f(_14) f(_15) f(_16) f(_17) f(_18) f(_19) f(_20) f(_21) f(_22) f(_23) f(_24) f(_25) f(_26) f(_27) f(_28) f(_29) f(_30) f(_31) f(_32) f(_33) f(_34) f(_35) f(_36) f(_37) f(_38) f(_39) f(_40) f(_41) f(_42) f(_43) f(_44) f(_45) f(_46) f(_47) f(_48) f(_49) f(_50) f(_51) f(_52) f(_53) f(_54) f(_55) f(_56) -#define VISIT_STRUCT_APPLYF57(f,_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,_20,_21,_22,_23,_24,_25,_26,_27,_28,_29,_30,_31,_32,_33,_34,_35,_36,_37,_38,_39,_40,_41,_42,_43,_44,_45,_46,_47,_48,_49,_50,_51,_52,_53,_54,_55,_56,_57) f(_1) f(_2) f(_3) f(_4) f(_5) f(_6) f(_7) f(_8) f(_9) f(_10) f(_11) f(_12) f(_13) f(_14) f(_15) f(_16) f(_17) f(_18) f(_19) f(_20) f(_21) f(_22) f(_23) f(_24) f(_25) f(_26) f(_27) f(_28) f(_29) f(_30) f(_31) f(_32) f(_33) f(_34) f(_35) f(_36) f(_37) f(_38) f(_39) f(_40) f(_41) f(_42) f(_43) f(_44) f(_45) f(_46) f(_47) f(_48) f(_49) f(_50) f(_51) f(_52) f(_53) f(_54) f(_55) f(_56) f(_57) -#define VISIT_STRUCT_APPLYF58(f,_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,_20,_21,_22,_23,_24,_25,_26,_27,_28,_29,_30,_31,_32,_33,_34,_35,_36,_37,_38,_39,_40,_41,_42,_43,_44,_45,_46,_47,_48,_49,_50,_51,_52,_53,_54,_55,_56,_57,_58) f(_1) f(_2) f(_3) f(_4) f(_5) f(_6) f(_7) f(_8) f(_9) f(_10) f(_11) f(_12) f(_13) f(_14) f(_15) f(_16) f(_17) f(_18) f(_19) f(_20) f(_21) f(_22) f(_23) f(_24) f(_25) f(_26) f(_27) f(_28) f(_29) f(_30) f(_31) f(_32) f(_33) f(_34) f(_35) f(_36) f(_37) f(_38) f(_39) f(_40) f(_41) f(_42) f(_43) f(_44) f(_45) f(_46) f(_47) f(_48) f(_49) f(_50) f(_51) f(_52) f(_53) f(_54) f(_55) f(_56) f(_57) f(_58) -#define VISIT_STRUCT_APPLYF59(f,_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,_20,_21,_22,_23,_24,_25,_26,_27,_28,_29,_30,_31,_32,_33,_34,_35,_36,_37,_38,_39,_40,_41,_42,_43,_44,_45,_46,_47,_48,_49,_50,_51,_52,_53,_54,_55,_56,_57,_58,_59) f(_1) f(_2) f(_3) f(_4) f(_5) f(_6) f(_7) f(_8) f(_9) f(_10) f(_11) f(_12) f(_13) f(_14) f(_15) f(_16) f(_17) f(_18) f(_19) f(_20) f(_21) f(_22) f(_23) f(_24) f(_25) f(_26) f(_27) f(_28) f(_29) f(_30) f(_31) f(_32) f(_33) f(_34) f(_35) f(_36) f(_37) f(_38) f(_39) f(_40) f(_41) f(_42) f(_43) f(_44) f(_45) f(_46) f(_47) f(_48) f(_49) f(_50) f(_51) f(_52) f(_53) f(_54) f(_55) f(_56) f(_57) f(_58) f(_59) -#define VISIT_STRUCT_APPLYF60(f,_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,_20,_21,_22,_23,_24,_25,_26,_27,_28,_29,_30,_31,_32,_33,_34,_35,_36,_37,_38,_39,_40,_41,_42,_43,_44,_45,_46,_47,_48,_49,_50,_51,_52,_53,_54,_55,_56,_57,_58,_59,_60) f(_1) f(_2) f(_3) f(_4) f(_5) f(_6) f(_7) f(_8) f(_9) f(_10) f(_11) f(_12) f(_13) f(_14) f(_15) f(_16) f(_17) f(_18) f(_19) f(_20) f(_21) f(_22) f(_23) f(_24) f(_25) f(_26) f(_27) f(_28) f(_29) f(_30) f(_31) f(_32) f(_33) f(_34) f(_35) f(_36) f(_37) f(_38) f(_39) f(_40) f(_41) f(_42) f(_43) f(_44) f(_45) f(_46) f(_47) f(_48) f(_49) f(_50) f(_51) f(_52) f(_53) f(_54) f(_55) f(_56) f(_57) f(_58) f(_59) f(_60) -#define VISIT_STRUCT_APPLYF61(f,_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,_20,_21,_22,_23,_24,_25,_26,_27,_28,_29,_30,_31,_32,_33,_34,_35,_36,_37,_38,_39,_40,_41,_42,_43,_44,_45,_46,_47,_48,_49,_50,_51,_52,_53,_54,_55,_56,_57,_58,_59,_60,_61) f(_1) f(_2) f(_3) f(_4) f(_5) f(_6) f(_7) f(_8) f(_9) f(_10) f(_11) f(_12) f(_13) f(_14) f(_15) f(_16) f(_17) f(_18) f(_19) f(_20) f(_21) f(_22) f(_23) f(_24) f(_25) f(_26) f(_27) f(_28) f(_29) f(_30) f(_31) f(_32) f(_33) f(_34) f(_35) f(_36) f(_37) f(_38) f(_39) f(_40) f(_41) f(_42) f(_43) f(_44) f(_45) f(_46) f(_47) f(_48) f(_49) f(_50) f(_51) f(_52) f(_53) f(_54) f(_55) f(_56) f(_57) f(_58) f(_59) f(_60) f(_61) -#define VISIT_STRUCT_APPLYF62(f,_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,_20,_21,_22,_23,_24,_25,_26,_27,_28,_29,_30,_31,_32,_33,_34,_35,_36,_37,_38,_39,_40,_41,_42,_43,_44,_45,_46,_47,_48,_49,_50,_51,_52,_53,_54,_55,_56,_57,_58,_59,_60,_61,_62) f(_1) f(_2) f(_3) f(_4) f(_5) f(_6) f(_7) f(_8) f(_9) f(_10) f(_11) f(_12) f(_13) f(_14) f(_15) f(_16) f(_17) f(_18) f(_19) f(_20) f(_21) f(_22) f(_23) f(_24) f(_25) f(_26) f(_27) f(_28) f(_29) f(_30) f(_31) f(_32) f(_33) f(_34) f(_35) f(_36) f(_37) f(_38) f(_39) f(_40) f(_41) f(_42) f(_43) f(_44) f(_45) f(_46) f(_47) f(_48) f(_49) f(_50) f(_51) f(_52) f(_53) f(_54) f(_55) f(_56) f(_57) f(_58) f(_59) f(_60) f(_61) f(_62) -#define VISIT_STRUCT_APPLYF63(f,_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,_20,_21,_22,_23,_24,_25,_26,_27,_28,_29,_30,_31,_32,_33,_34,_35,_36,_37,_38,_39,_40,_41,_42,_43,_44,_45,_46,_47,_48,_49,_50,_51,_52,_53,_54,_55,_56,_57,_58,_59,_60,_61,_62,_63) f(_1) f(_2) f(_3) f(_4) f(_5) f(_6) f(_7) f(_8) f(_9) f(_10) f(_11) f(_12) f(_13) f(_14) f(_15) f(_16) f(_17) f(_18) f(_19) f(_20) f(_21) f(_22) f(_23) f(_24) f(_25) f(_26) f(_27) f(_28) f(_29) f(_30) f(_31) f(_32) f(_33) f(_34) f(_35) f(_36) f(_37) f(_38) f(_39) f(_40) f(_41) f(_42) f(_43) f(_44) f(_45) f(_46) f(_47) f(_48) f(_49) f(_50) f(_51) f(_52) f(_53) f(_54) f(_55) f(_56) f(_57) f(_58) f(_59) f(_60) f(_61) f(_62) f(_63) -#define VISIT_STRUCT_APPLYF64(f,_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,_20,_21,_22,_23,_24,_25,_26,_27,_28,_29,_30,_31,_32,_33,_34,_35,_36,_37,_38,_39,_40,_41,_42,_43,_44,_45,_46,_47,_48,_49,_50,_51,_52,_53,_54,_55,_56,_57,_58,_59,_60,_61,_62,_63,_64) f(_1) f(_2) f(_3) f(_4) f(_5) f(_6) f(_7) f(_8) f(_9) f(_10) f(_11) f(_12) f(_13) f(_14) f(_15) f(_16) f(_17) f(_18) f(_19) f(_20) f(_21) f(_22) f(_23) f(_24) f(_25) f(_26) f(_27) f(_28) f(_29) f(_30) f(_31) f(_32) f(_33) f(_34) f(_35) f(_36) f(_37) f(_38) f(_39) f(_40) f(_41) f(_42) f(_43) f(_44) f(_45) f(_46) f(_47) f(_48) f(_49) f(_50) f(_51) f(_52) f(_53) f(_54) f(_55) f(_56) f(_57) f(_58) f(_59) f(_60) f(_61) f(_62) f(_63) f(_64) -#define VISIT_STRUCT_APPLYF65(f,_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,_20,_21,_22,_23,_24,_25,_26,_27,_28,_29,_30,_31,_32,_33,_34,_35,_36,_37,_38,_39,_40,_41,_42,_43,_44,_45,_46,_47,_48,_49,_50,_51,_52,_53,_54,_55,_56,_57,_58,_59,_60,_61,_62,_63,_64,_65) f(_1) f(_2) f(_3) f(_4) f(_5) f(_6) f(_7) f(_8) f(_9) f(_10) f(_11) f(_12) f(_13) f(_14) f(_15) f(_16) f(_17) f(_18) f(_19) f(_20) f(_21) f(_22) f(_23) f(_24) f(_25) f(_26) f(_27) f(_28) f(_29) f(_30) f(_31) f(_32) f(_33) f(_34) f(_35) f(_36) f(_37) f(_38) f(_39) f(_40) f(_41) f(_42) f(_43) f(_44) f(_45) f(_46) f(_47) f(_48) f(_49) f(_50) f(_51) f(_52) f(_53) f(_54) f(_55) f(_56) f(_57) f(_58) f(_59) f(_60) f(_61) f(_62) f(_63) f(_64) f(_65) -#define VISIT_STRUCT_APPLYF66(f,_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,_20,_21,_22,_23,_24,_25,_26,_27,_28,_29,_30,_31,_32,_33,_34,_35,_36,_37,_38,_39,_40,_41,_42,_43,_44,_45,_46,_47,_48,_49,_50,_51,_52,_53,_54,_55,_56,_57,_58,_59,_60,_61,_62,_63,_64,_65,_66) f(_1) f(_2) f(_3) f(_4) f(_5) f(_6) f(_7) f(_8) f(_9) f(_10) f(_11) f(_12) f(_13) f(_14) f(_15) f(_16) f(_17) f(_18) f(_19) f(_20) f(_21) f(_22) f(_23) f(_24) f(_25) f(_26) f(_27) f(_28) f(_29) f(_30) f(_31) f(_32) f(_33) f(_34) f(_35) f(_36) f(_37) f(_38) f(_39) f(_40) f(_41) f(_42) f(_43) f(_44) f(_45) f(_46) f(_47) f(_48) f(_49) f(_50) f(_51) f(_52) f(_53) f(_54) f(_55) f(_56) f(_57) f(_58) f(_59) f(_60) f(_61) f(_62) f(_63) f(_64) f(_65) f(_66) -#define VISIT_STRUCT_APPLYF67(f,_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,_20,_21,_22,_23,_24,_25,_26,_27,_28,_29,_30,_31,_32,_33,_34,_35,_36,_37,_38,_39,_40,_41,_42,_43,_44,_45,_46,_47,_48,_49,_50,_51,_52,_53,_54,_55,_56,_57,_58,_59,_60,_61,_62,_63,_64,_65,_66,_67) f(_1) f(_2) f(_3) f(_4) f(_5) f(_6) f(_7) f(_8) f(_9) f(_10) f(_11) f(_12) f(_13) f(_14) f(_15) f(_16) f(_17) f(_18) f(_19) f(_20) f(_21) f(_22) f(_23) f(_24) f(_25) f(_26) f(_27) f(_28) f(_29) f(_30) f(_31) f(_32) f(_33) f(_34) f(_35) f(_36) f(_37) f(_38) f(_39) f(_40) f(_41) f(_42) f(_43) f(_44) f(_45) f(_46) f(_47) f(_48) f(_49) f(_50) f(_51) f(_52) f(_53) f(_54) f(_55) f(_56) f(_57) f(_58) f(_59) f(_60) f(_61) f(_62) f(_63) f(_64) f(_65) f(_66) f(_67) -#define VISIT_STRUCT_APPLYF68(f,_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,_20,_21,_22,_23,_24,_25,_26,_27,_28,_29,_30,_31,_32,_33,_34,_35,_36,_37,_38,_39,_40,_41,_42,_43,_44,_45,_46,_47,_48,_49,_50,_51,_52,_53,_54,_55,_56,_57,_58,_59,_60,_61,_62,_63,_64,_65,_66,_67,_68) f(_1) f(_2) f(_3) f(_4) f(_5) f(_6) f(_7) f(_8) f(_9) f(_10) f(_11) f(_12) f(_13) f(_14) f(_15) f(_16) f(_17) f(_18) f(_19) f(_20) f(_21) f(_22) f(_23) f(_24) f(_25) f(_26) f(_27) f(_28) f(_29) f(_30) f(_31) f(_32) f(_33) f(_34) f(_35) f(_36) f(_37) f(_38) f(_39) f(_40) f(_41) f(_42) f(_43) f(_44) f(_45) f(_46) f(_47) f(_48) f(_49) f(_50) f(_51) f(_52) f(_53) f(_54) f(_55) f(_56) f(_57) f(_58) f(_59) f(_60) f(_61) f(_62) f(_63) f(_64) f(_65) f(_66) f(_67) f(_68) -#define VISIT_STRUCT_APPLYF69(f,_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,_20,_21,_22,_23,_24,_25,_26,_27,_28,_29,_30,_31,_32,_33,_34,_35,_36,_37,_38,_39,_40,_41,_42,_43,_44,_45,_46,_47,_48,_49,_50,_51,_52,_53,_54,_55,_56,_57,_58,_59,_60,_61,_62,_63,_64,_65,_66,_67,_68,_69) f(_1) f(_2) f(_3) f(_4) f(_5) f(_6) f(_7) f(_8) f(_9) f(_10) f(_11) f(_12) f(_13) f(_14) f(_15) f(_16) f(_17) f(_18) f(_19) f(_20) f(_21) f(_22) f(_23) f(_24) f(_25) f(_26) f(_27) f(_28) f(_29) f(_30) f(_31) f(_32) f(_33) f(_34) f(_35) f(_36) f(_37) f(_38) f(_39) f(_40) f(_41) f(_42) f(_43) f(_44) f(_45) f(_46) f(_47) f(_48) f(_49) f(_50) f(_51) f(_52) f(_53) f(_54) f(_55) f(_56) f(_57) f(_58) f(_59) f(_60) f(_61) f(_62) f(_63) f(_64) f(_65) f(_66) f(_67) f(_68) f(_69) - -#define VISIT_STRUCT_APPLY_F_(M, ...) VISIT_STRUCT_EXPAND(M(__VA_ARGS__)) -#define MACRO_MAP(f, ...) VISIT_STRUCT_EXPAND(VISIT_STRUCT_APPLY_F_(VISIT_STRUCT_CONCAT(VISIT_STRUCT_APPLYF, VISIT_STRUCT_PP_NARG(__VA_ARGS__)), f, __VA_ARGS__)) diff --git a/graphics/asymptote/LspCpp/network/optional.hpp b/graphics/asymptote/LspCpp/network/optional.hpp deleted file mode 100644 index 43b1cf1fd8..0000000000 --- a/graphics/asymptote/LspCpp/network/optional.hpp +++ /dev/null @@ -1,711 +0,0 @@ -// Copyright 2016 Glyn Matthews. -// Copyright (C) 2011 - 2012 Andrzej Krzemienski. -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -/** - * \file - * \brief Contains an implementation of C++17 optional (n3793). - * - * \sa https://github.com/akrzemi1/Optional - * \sa http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n3848.html - */ - -#ifndef NETWORK_OPTIONAL_INC -#define NETWORK_OPTIONAL_INC - -#include -#include -#include -#include -#include - -#if !defined(DOXYGEN_SHOULD_SKIP_THIS) -#ifdef NDEBUG -#define NETWORK_ASSERTED_EXPRESSION(CHECK, EXPR) (EXPR) -#else -#define NETWORK_ASSERTED_EXPRESSION(CHECK, EXPR) \ - ((CHECK) ? (EXPR) : (fail(#CHECK, __FILE__, __LINE__), (EXPR))) -inline void fail(const char*, const char*, unsigned) {} -#endif // NDEBUG -#endif // !defined(DOXYGEN_SHOULD_SKIP_THIS) - -namespace network { -/** - * \ingroup optional - * \class nullopt_t optional.hpp network/uri.hpp - * \brief Disengaged state indicator. - * \sa optional - */ -struct nullopt_t { -#if !defined(DOXYGEN_SHOULD_SKIP_THIS) - struct init {}; - constexpr nullopt_t(init) {} -#endif // !defined(DOXYGEN_SHOULD_SKIP_THIS) -}; - -/** - * \ingroup optional - * \brief Used to indicate a *disengaged* state for optional objects. - */ -constexpr nullopt_t nullopt{nullopt_t::init{}}; - -/** - * \ingroup optional - * \class bad_optional_access optional.hpp network/uri.hpp - * \brief Exception thrown when the value member function is called when the - * optional object is disengaged. - */ -class bad_optional_access : public std::logic_error { - public: - - /** - * \brief Constructor. - * \param what_arg The error message. - */ - explicit bad_optional_access(const std::string& what_arg) - : std::logic_error(what_arg) {} - - /** - * \brief Constructor. - * \param what_arg The error message. - */ - explicit bad_optional_access(const char* what_arg) - : std::logic_error(what_arg) {} -}; - -#if !defined(DOXYGEN_SHOULD_SKIP_THIS) -namespace details { -struct dummy_t {}; - -template -union trivially_destructible_optional_storage { - static_assert(std::is_trivially_destructible::value, ""); - - dummy_t dummy_; - T value_; - - constexpr trivially_destructible_optional_storage() : dummy_{} {} - - constexpr trivially_destructible_optional_storage(const T& v) : value_{v} {} - - ~trivially_destructible_optional_storage() = default; -}; - -template -union optional_storage { - dummy_t dummy_; - T value_; - - constexpr optional_storage() : dummy_{} {} - - constexpr optional_storage(const T& v) : value_{v} {} - - ~optional_storage() {} -}; - -template -class trivially_destructible_optional_base { -public: - typedef T value_type; - - constexpr trivially_destructible_optional_base() noexcept - : init_(false), - storage_{} {} - - constexpr trivially_destructible_optional_base(const T& v) - : init_(true), storage_{v} {} - - constexpr trivially_destructible_optional_base(T&& v) - : init_(true), storage_{std::move(v)} {} - - ~trivially_destructible_optional_base() = default; - -protected: - - bool init_; - optional_storage storage_; -}; - -template -class optional_base { -public: - typedef T value_type; - - constexpr optional_base() noexcept - : init_(false), - storage_{} {} - - constexpr optional_base(const T& v) - : init_(true), storage_{v} {} - - constexpr optional_base(T&& v) - : init_(true), storage_{std::move(v)} {} - - ~optional_base() { - if (init_) { - storage_.value_.T::~T(); - } - } - -protected: - - bool init_; - optional_storage storage_; -}; -} // namespace details -#endif // !defined(DOXYGEN_SHOULD_SKIP_THIS) - -/** - * \ingroup optional - * \class optional optional.hpp network/uri.hpp - * \brief An implementation of C++17 optional (n3793) - */ -#if !defined(DOXYGEN_SHOULD_SKIP_THIS) -template -using optional_base = typename std::conditional< - std::is_trivially_destructible::value, - details::trivially_destructible_optional_base, - details::optional_base>::type; -#endif // !defined(DOXYGEN_SHOULD_SKIP_THIS) - -template -#if !defined(DOXYGEN_SHOULD_SKIP_THIS) -class optional : optional_base { -#else -class optional { -#endif // !defined(DOXYGEN_SHOULD_SKIP_THIS) - typedef optional_base base_type; - - public: - /** - * \brief Optional value type. - */ - typedef T value_type; - - /** - * \brief Constructor. - * \post *disengaged*. - */ - constexpr optional() : optional_base() {} - - /** - * \brief Constructor. - * \post *disengaged*. - */ - constexpr optional(nullopt_t) noexcept : optional_base() {} - - /** - * \brief Copy constructor. - * \param other The other optional object. - */ - optional(const optional& other) { - if (other) { - ::new(static_cast(ptr())) T(*other); - base_type::init_ = true; - } - } - - /** - * \brief Move constructor. - * \param other The other optional object. - */ - optional(optional&& other) noexcept { - if (other) { - ::new(static_cast(ptr())) T(std::move(other.storage_.value_)); - base_type::init_ = true; - } - } - - /** - * \brief Constructor. - * \param value The value with which to initialize the optional object. - * \post *engaged* - */ - constexpr optional(const T& value) : optional_base(value) {} - - /** - * \brief Constructor. - * \param value The value with which to initialize the optional object. - * \post *engaged* - */ - constexpr optional(T&& value) : optional_base(std::move(value)) {} - - /** - * \brief Assignment operator. - * \post *disengaged*. - * \returns \c *this. - */ - optional& operator=(nullopt_t) noexcept { - if (base_type::init_) { - ptr()->T::~T(); - } - base_type::init_ = false; - return *this; - } - - /** - * \brief Copy assignment operator. - * \param other The other optional object. - * \returns \c *this. - */ - optional& operator=(const optional& other) { - if (bool(*this) && !other) { - ptr()->T::~T(); - base_type::init_ = false; - } - else if (!(*this) && bool(other)) { - ::new(static_cast(ptr())) T(*other); - base_type::init_ = true; - } - else if (bool(*this) && bool(other)) { - base_type::storage_.value_ = *other; - } - return *this; - } - - /** - * \brief Move assignment operator. - * \param other The other optional object. - * \returns \c *this. - */ - optional& operator=(optional&& other) noexcept { - if (bool(*this) && !other) { - ptr()->T::~T(); - base_type::init_ = false; - } - else if (!(*this) && bool(other)) { - ::new(static_cast(ptr())) T(std::move(*other)); - base_type::init_ = true; - } - else if (bool(*this) && bool(other)) { - base_type::storage_.value_ = std::move(*other); - } - return *this; - } - - /** - * \brief Destructor. - */ - ~optional() = default; - - /** - * \brief Swap function. - * \param other The other optional object. - */ - void swap(optional& other) noexcept { - if (bool(*this) && !other) { - ::new(static_cast(other.ptr())) T(std::move(**this)); - ptr()->T::~T(); - std::swap(base_type::init_, other.base_type::init_); - } - else if (!(*this) && bool(other)) { - ::new(static_cast(ptr())) T(std::move(*other)); - other.ptr()->T::~T(); - std::swap(base_type::init_, other.init_); - } - else if (bool(*this) && bool(other)) { - std::swap(**this, *other); - } - } - - /** - * \brief Observer. - * \pre *engaged* - * \returns The underlying optional value. - */ - constexpr T const* operator->() const { - return NETWORK_ASSERTED_EXPRESSION(bool(*this), ptr()); - } - - /** - * \brief Observer. - * \pre *engaged* - * \returns The underlying optional value. - */ - T* operator->() { - return NETWORK_ASSERTED_EXPRESSION(bool(*this), ptr()); - } - - /** - * \brief Observer. - * \pre *engaged* - * \returns The underlying optional value. - */ - constexpr T const& operator*() const { - return NETWORK_ASSERTED_EXPRESSION(bool(*this), base_type::storage_.value_); - } - - /** - * \brief Observer. - * \pre *engaged* - * \returns The underlying optional value. - */ - T& operator*() { - return NETWORK_ASSERTED_EXPRESSION(bool(*this), base_type::storage_.value_); - } - - /** - * \brief Operator bool overloads. - * \returns \c true if the optional is *engaged*, \c false if it is *disengaged*. - */ - constexpr explicit operator bool() const noexcept { return base_type::init_; } - - /** - * \returns The underlying optional value, if \c bool(*this). - * \throws A bad_optional_access if \c !*this. - */ - constexpr T const& value() const { - return *this ? base_type::storage_.value_ - : (throw bad_optional_access("Uninitialized optional value"), - base_type::storage_.value_); - } - /** - * \returns The underlying optional value, if \c bool(*this). - * \throws A bad_optional_access if \c !*this. - */ - T& value() { - return *this ? base_type::storage_.value_ - : (throw bad_optional_access("Uninitialized optional value"), - base_type::storage_.value_); - } - - /** - * \returns bool(*this) ? **this : static_cast(std::forward(v)). - * \pre \c std::is_copy_constructible::value is \c true and std::is_convertible::value is \c true. - */ - template - T value_or(U&& other) const & { - static_assert(std::is_copy_constructible::value, "Must be copy constructible."); - static_assert(std::is_convertible::value, "U must be convertible to T."); - return bool(*this) ? **this : static_cast(std::forward(other)); - } - - /** - * \returns bool(*this) ? std::move(**this) : static_cast(std::forward(v)). - * \pre std::is_move_constructible::value is \c true and std::is_convertible::value is \c true. - */ - template - T value_or(U&& other) && { - static_assert(std::is_copy_constructible::value, "Must be copy constructible."); - static_assert(std::is_convertible::value, "U must be convertible to T."); - return bool(*this) ? std::move(**this) : static_cast(std::forward(other)); - } - - private: - - T* ptr() { - return std::addressof(base_type::storage_.value_); - } - -}; - -/** - * \brief Equality operator. - */ -template -bool operator==(const optional& lhs, const optional& rhs) { - if (bool(lhs) != bool(rhs)) { - return false; - } else if (!bool(lhs)) { - return true; - } else { - return *lhs == *rhs; - } -} - -/** - * \brief Inequality operator. - */ -template -bool operator!=(const optional& lhs, const optional& rhs) { - return !(lhs == rhs); -} - -/** - * \brief Comparison operator. - */ -template -bool operator<(const optional& lhs, const optional& rhs) { - if (!rhs) { - return false; - } else if (!lhs) { - return true; - } else { - return *lhs < *rhs; - } -} - -/** - * \brief Comparison operator. - * \returns rhs < lhs. - */ -template -bool operator>(const optional& lhs, const optional& rhs) { - return rhs < lhs; -} - -/** - * \brief Comparison operator. - * \returns !(rhs < lhs). - */ -template -bool operator<=(const optional& lhs, const optional& rhs) { - return !(rhs < lhs); -} - -/** - * \brief Comparison operator. - * \returns !(rhs > lhs). - */ -template -bool operator>=(const optional& lhs, const optional& rhs) { - return !(lhs < rhs); -} - -/** - * \brief Equality operator. - * \returns \c !x. - */ -template -bool operator==(const optional& x, nullopt_t) noexcept { - return !x; -} - -/** - * \brief Equality operator. - * \returns \c !x. - */ -template -bool operator==(nullopt_t, const optional& x) noexcept { - return !x; -} - -/** - * \brief Inequality operator. - * \returns \c bool(x). - */ -template -bool operator!=(const optional& x, nullopt_t) noexcept { - return bool(x); -} - -/** - * \brief Inequality operator. - * \returns \c bool(x). - */ -template -bool operator!=(nullopt_t, const optional& x) noexcept { - return bool(x); -} - -/** - * \brief Comparison operator. - * \returns \c false. - */ -template -bool operator<(const optional& x, nullopt_t) noexcept { - return false; -} - -/** - * \brief Comparison operator. - * \returns \c bool(x). - */ -template -bool operator<(nullopt_t, const optional& x) noexcept { - return bool(x); -} - -/** - * \brief Comparison operator. - * \returns \c !x. - */ -template -bool operator<=(const optional& x, nullopt_t) noexcept { - return !x; -} - -/** - * \brief Comparison operator. - * \returns \c true. - */ -template -bool operator<=(nullopt_t, const optional& x) noexcept { - return true; -} - -/** - * \brief Comparison operator. - * \returns \c bool(x). - */ -template -bool operator>(const optional& x, nullopt_t) noexcept { - return bool(x); -} - -/** - * \brief Comparison operator. - * \returns \c false. - */ -template -bool operator>(nullopt_t, const optional& x) noexcept { - return false; -} - -/** - * \brief Comparison operator. - * \returns \c true. - */ -template -bool operator>=(const optional& x, nullopt_t) noexcept { - return true; -} - -/** - * \brief Comparison operator. - * \returns \c !x. - */ -template -bool operator>=(nullopt_t, const optional& x) noexcept { - return !x; -} - -/** - * \brief Equality operator. - * \returns bool(x) ? *x == v : false. - */ -template -bool operator==(const optional& x, const T& v) { - return bool(x) ? *x == v : false; -} - -/** - * \brief Equality operator. - * \returns bool(x) ? v == *x : false. - */ -template -bool operator==(const T& v, const optional& x) { - return bool(x) ? v == *x : false; -} - -/** - * \brief Inequality operator. - * \returns bool(x) ? !(*x == v) : true. - */ -template -bool operator!=(const optional& x, const T& v) { - return bool(x) ? !(*x == v) : true; -} - -/** - * \brief Inequality operator. - * \returns bool(x) ? !(v == *x) : true. - */ -template -bool operator!=(const T& v, const optional& x) { - return bool(x) ? !(v == *x) : true; -} - -/** - * \brief Comparison operator. - * \returns bool(x) ? *x < v : true. - */ -template -bool operator<(const optional& x, const T& v) { - return bool(x) ? *x < v : true; -} - -/** - * \brief Comparison operator. - * \returns bool(x) ? v < *x : false. - */ -template -bool operator<(const T& v, const optional& x) { - return bool(x) ? v < *x : false; -} - -/** - * \brief Comparison operator. - * \returns bool(x) ? *x < v : true. - */ -template -bool operator>(const optional& x, const T& v) { - return bool(x) ? *x < v : true; -} - -/** - * \brief Comparison operator. - * \returns bool(x) ? v < *x : false. - */ -template -bool operator>(const T& v, const optional& x) { - return bool(x) ? v < *x : false; -} - -/** - * \brief Comparison operator. - * \returns !(x < v). - */ -template -bool operator>=(const optional& x, const T& v) { - return !(x < v); -} - -/** - * \brief Comparison operator. - * \returns !(v < x). - */ -template -bool operator>=(const T& v, const optional& x) { - return !(v < x); -} - -/** - * \brief Comparison operator. - * \returns !(x > v). - */ -template -bool operator<=(const optional& x, const T& v) { - return !(x > v); -} - -/** - * \brief Comparison operator. - * \returns !(v > x). - */ -template -bool operator<=(const T& v, const optional& x) { - return !(v > x); -} - -/** - * \ingroup optional - * \brief Swap function. - * \param lhs The first optional object. - * \param rhs The second optional object. - * - * Calls: - * \code{.cpp} - * lhs.swap(rhs); - * \endcode - */ -template -inline void swap(optional& lhs, - optional& rhs) noexcept(noexcept(lhs.swap(rhs))) { - return lhs.swap(rhs); -} - -/** - * \ingroup optional - * \brief A helper function to contruct an optional object. - * \returns optional::type>(std::forward(value)). - */ -template -inline constexpr optional::type> make_optional(T&& value) { - return optional::type>(std::forward(value)); -} -} // namespace network - -#endif // NETWORK_OPTIONAL_INC diff --git a/graphics/asymptote/LspCpp/network/string_view.hpp b/graphics/asymptote/LspCpp/network/string_view.hpp deleted file mode 100644 index df54e7aa35..0000000000 --- a/graphics/asymptote/LspCpp/network/string_view.hpp +++ /dev/null @@ -1,273 +0,0 @@ -// Copyright 2016 Glyn Matthews. -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -#ifndef NETWORK_STRING_VIEW_INC -#define NETWORK_STRING_VIEW_INC - -/** - * \file - * \brief Contains an implementation of C++17 string_view (n3921). - */ - -#include -#include -#include -#include -#include - -namespace network { -/** - * \class basic_string_view string_view.hpp network/uri/string_view.hpp - * \brief An implementation of C++17 string_view (n3921) - */ -template > -class basic_string_view { - public: - typedef traits traits_type; - typedef charT value_type; - typedef charT* pointer; - typedef const charT* const_pointer; - typedef charT& reference; - typedef const charT& const_reference; - typedef const charT* const_iterator; - typedef const_iterator iterator; - typedef std::reverse_iterator const_reverse_iterator; - typedef const_reverse_iterator reverse_iterator; - typedef std::size_t size_type; - typedef std::ptrdiff_t difference_type; - static constexpr size_type npos = size_type(-1); - - /** - * \brief Constructor. - */ - constexpr basic_string_view() noexcept : data_(nullptr), size_(0) {} - - /** - * \brief Copy constructor. - */ - constexpr basic_string_view(const basic_string_view&) noexcept = default; - - /** - * \brief Assignment operator. - */ - basic_string_view& operator=(const basic_string_view&) noexcept = default; - - /** - * \brief Constructor. - */ - template - basic_string_view( - const std::basic_string& str) noexcept - : data_(str.data()), - size_(str.size()) {} - - /** - * \brief Constructor. - */ - constexpr basic_string_view(const charT* str) - : data_(str), size_(traits::length(str)) {} - - /** - * \brief Constructor. - */ - constexpr basic_string_view(const charT* str, size_type len) - : data_(str), size_(len) {} - - constexpr const_iterator begin() const noexcept { return data_; } - - constexpr const_iterator end() const noexcept { return data_ + size_; } - - constexpr const_iterator cbegin() const noexcept { return begin(); } - - constexpr const_iterator cend() const noexcept { return end(); } - - const_reverse_iterator rbegin() const noexcept { - return const_reverse_iterator(end()); - } - const_reverse_iterator rend() const noexcept { - return const_reverse_iterator(begin()); - } - const_reverse_iterator crbegin() const noexcept { return rbegin(); } - - const_reverse_iterator crend() const noexcept { return rend(); } - - constexpr size_type size() const noexcept { return size_; } - - constexpr size_type length() const noexcept { return size_; } - - constexpr size_type max_size() const noexcept { return size_; } - - constexpr bool empty() const noexcept { return size_ == 0; } - - constexpr const_reference operator[](size_type pos) const { - return data_[pos]; - } - - const_reference at(size_type pos) const { - if (pos >= size_) { - throw std::out_of_range("Index out of range."); - } - return data_[pos]; - } - - const_reference front() const { return *begin(); } - - const_reference back() const { - auto last = (end()) - 1; - return *last; - } - - constexpr const_pointer data() const noexcept { return data_; } - - void clear() noexcept { - data_ = nullptr; - size_ = 0; - } - - void remove_prefix(size_type n) { - data_ += n; - size_ -= n; - } - - void remove_suffix(size_type n) { size_ -= n; } - - void swap(basic_string_view& s) noexcept { - std::swap(data_, s.data_); - std::swap(size_, s.size_); - } - - template - explicit operator std::basic_string() const { - return to_string(); - } - - template > - std::basic_string to_string( - const Allocator& a = Allocator()) const { - return std::basic_string(begin(), end(), a); - } - - size_type copy(charT* s, size_type n, size_type pos = 0) const { - size_type rlen = std::min(n, size() - pos); - std::copy_n(begin() + pos, rlen, s); - return rlen; - } - - constexpr basic_string_view substr(size_type pos = 0, - size_type n = npos) const { - return basic_string_view(data() + pos, std::min(n, size() - pos)); - } - - constexpr int compare(basic_string_view s) const noexcept { - return size() == s.size() - ? traits::compare(data(), s.data(), size()) - : (size() < s.size() - ? (traits::compare(data(), s.data(), size()) > 0 ? 1 : -1) - : (traits::compare(data(), s.data(), size()) < 0 ? -1 - : 1)); - } - - constexpr int compare(size_type pos1, size_type n1, - basic_string_view s) const { - return substr(pos1, n1).compare(s); - } - - constexpr int compare(size_type pos1, size_type n1, basic_string_view s, - size_type pos2, size_type n2) const { - return substr(pos1, n1).compare(s.substr(pos2, n2)); - } - - constexpr int compare(const charT* s) const { - return compare(basic_string_view(s)); - } - - constexpr int compare(size_type pos1, size_type n1, const charT* s) const { - return substr(pos1, n1).compare(basic_string_view(s)); - } - - constexpr int compare(size_type pos1, size_type n1, const charT* s, - size_type n2) const { - return substr(pos1, n1).compare(basic_string_view(s, n2)); - } - - private: - const_pointer data_; - size_type size_; -}; - -/** - * \brief Equality operator. - * \returns lhs.compare(rhs) == 0. - */ -template -constexpr bool operator==(basic_string_view lhs, - basic_string_view rhs) noexcept { - return lhs.compare(rhs) == 0; -} - -/** - * \brief Inequality operator. - * \returns !(lhs == rhs). - */ -template -constexpr bool operator!=(basic_string_view lhs, - basic_string_view rhs) noexcept { - return !(lhs == rhs); -} - -/** - * \brief Comparison operator. - * \returns lhs.compare(rhs) < 0. - */ -template -constexpr bool operator<(basic_string_view lhs, - basic_string_view rhs) noexcept { - return lhs.compare(rhs) < 0; -} - -/** - * \brief Comparison operator. - * \returns rhs < lhs. - */ -template -constexpr bool operator>(basic_string_view lhs, - basic_string_view rhs) noexcept { - return rhs < lhs; -} - -/** - * \brief Comparison operator. - * \returns !(lhs > rhs). - */ -template -constexpr bool operator<=(basic_string_view lhs, - basic_string_view rhs) noexcept { - return !(lhs > rhs); -} - -/** - * \brief Comparison operator. - * \returns !(lhs < rhs). - */ -template -constexpr bool operator>=(basic_string_view lhs, - basic_string_view rhs) noexcept { - return !(lhs < rhs); -} - -/** - * \brief Output stream operator. - */ -template -std::basic_ostream& operator<<( - std::basic_ostream& os, - basic_string_view str) { - return os << str.to_string(); -} - -typedef basic_string_view string_view; -} // namespace network - -#endif // NETWORK_STRING_VIEW_INC diff --git a/graphics/asymptote/LspCpp/network/uri.hpp b/graphics/asymptote/LspCpp/network/uri.hpp deleted file mode 100644 index f3d86e09ec..0000000000 --- a/graphics/asymptote/LspCpp/network/uri.hpp +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Glyn Matthews 2012-2016. -// Copyright 2012 Dean Michael Berris -// Copyright 2012 Google, Inc. -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -#ifndef NETWORK_URI_HPP -#define NETWORK_URI_HPP - -/** - * \defgroup uri URI - * - * This module contains a class encapsulating a URI, a URI builder and - * percent encoding and decoding functions. - * - * \defgroup optional Optional - * - * This module contains a utility to represent optional values. - * - * \defgroup string String - * - * This module contains a class for a non-owning reference to a string. - * - * \namespace network - * - * The \c network namespace contains all the classes and functions for - * the URI in this library. - * - * \file - * \brief Contains the uri, uri_builder classes and functions - * for percent encoding and decoding. - */ - -#include -#include - -#endif // NETWORK_URI_HPP diff --git a/graphics/asymptote/LspCpp/network/uri/config.hpp b/graphics/asymptote/LspCpp/network/uri/config.hpp deleted file mode 100644 index 39c3b58c28..0000000000 --- a/graphics/asymptote/LspCpp/network/uri/config.hpp +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) Glyn Matthews 2012-2016. -// Copyright 2012 Dean Michael Berris -// Copyright 2012 Google, Inc. -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -/** - * \file - * \brief Contains macros to configure compiler or platform-specific workarounds. - */ - -#ifndef NETWORK_URI_CONFIG_INC -#define NETWORK_URI_CONFIG_INC - -#ifdef _MSC_VER -#define NETWORK_URI_MSVC _MSC_VER -#endif // _MSC_VER - -#endif // NETWORK_URI_CONFIG_INC diff --git a/graphics/asymptote/LspCpp/network/uri/detail/algorithm.hpp b/graphics/asymptote/LspCpp/network/uri/detail/algorithm.hpp deleted file mode 100644 index 2358af9a04..0000000000 --- a/graphics/asymptote/LspCpp/network/uri/detail/algorithm.hpp +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright 2016 Glyn Matthews. -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -#ifndef NETWORK_DETAIL_RANGE_INC -#define NETWORK_DETAIL_RANGE_INC - -#include -#include -#include -#include -#include -#include - -namespace network { -namespace detail { -template -inline void for_each(Rng& rng, Pred&& pred) { - std::for_each(std::begin(rng), std::end(rng), pred); -} - -template -inline void transform(Rng& rng, Iter out, Pred&& pred) { - std::transform(std::begin(rng), std::end(rng), out, pred); -} - -template -inline typename Rng::difference_type distance(Rng& rng) { - return std::distance(std::begin(rng), std::end(rng)); -} - -template -inline bool equal(const Rng1& rng1, const Rng2& rng2) { - return std::equal(std::begin(rng1), std::end(rng1), std::begin(rng2)); -} - -template -inline void remove_erase_if(Rng& rng, Pred&& pred) { - auto first = std::begin(rng), last = std::end(rng); - auto it = std::remove_if(first, last, pred); - rng.erase(it, last); -} - -inline std::string trim_front(const std::string& str) { - auto first = std::begin(str), last = std::end(str); - auto it = std::find_if(first, last, [](char ch) { - return !std::isspace(ch, std::locale()); - }); - return std::string(it, last); -} - -inline std::string trim_back(const std::string& str) { - using reverse_iterator = std::reverse_iterator; - - auto first = reverse_iterator(std::end(str)), - last = reverse_iterator(std::begin(str)); - auto it = std::find_if(first, last, [](char ch) { - return !std::isspace(ch, std::locale()); - }); - std::string result(it, last); - std::reverse(std::begin(result), std::end(result)); - return result; -} - -inline -std::string trim_copy(const std::string &str) { - return trim_back(trim_front(str)); -} -} // namespace detail -} // namespace network - -#endif // NETWORK_DETAIL_RANGE_INC diff --git a/graphics/asymptote/LspCpp/network/uri/detail/decode.hpp b/graphics/asymptote/LspCpp/network/uri/detail/decode.hpp deleted file mode 100644 index 9d0aaaa1b5..0000000000 --- a/graphics/asymptote/LspCpp/network/uri/detail/decode.hpp +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright (c) Glyn Matthews 2011-2016. -// Copyright 2012 Dean Michael Berris -// Copyright 2012 Google, Inc. -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -#ifndef NETWORK_URI_DECODE_INC -#define NETWORK_URI_DECODE_INC - -#include -#include -#include - -namespace network { -namespace detail { -template -CharT letter_to_hex(CharT in) { - if ((in >= '0') && (in <= '9')) { - return in - '0'; - } - - if ((in >= 'a') && (in <= 'f')) { - return in + 10 - 'a'; - } - - if ((in >= 'A') && (in <= 'F')) { - return in + 10 - 'A'; - } - - throw percent_decoding_error(uri_error::non_hex_input); -} - -template -InputIterator decode_char(InputIterator it, charT *out) { - assert(*it == '%'); - ++it; - auto h0 = *it; - auto v0 = detail::letter_to_hex(h0); - ++it; - auto h1 = *it; - auto v1 = detail::letter_to_hex(h1); - ++it; - *out = static_cast((0x10 * v0) + v1); - return it; -} - -template -OutputIterator decode(InputIterator in_begin, InputIterator in_end, - OutputIterator out_begin) { - auto it = in_begin; - auto out = out_begin; - while (it != in_end) { - if (*it == '%') { - if (std::distance(it, in_end) < 3) { - throw percent_decoding_error(uri_error::not_enough_input); - } - char c = '\0'; - it = decode_char(it, &c); - *out = c; - ++out; - } else { - *out++ = *it++; - } - } - return out; -} - -template -String decode(const String &source) { - String unencoded; - decode(std::begin(source), std::end(source), std::back_inserter(unencoded)); - return unencoded; -} -} // namespace detail -} // namespace network - -#endif // NETWORK_URI_DECODE_INC diff --git a/graphics/asymptote/LspCpp/network/uri/detail/encode.hpp b/graphics/asymptote/LspCpp/network/uri/detail/encode.hpp deleted file mode 100644 index be1dec9fd1..0000000000 --- a/graphics/asymptote/LspCpp/network/uri/detail/encode.hpp +++ /dev/null @@ -1,169 +0,0 @@ -// Copyright (c) Glyn Matthews 2011-2016. -// Copyright 2012 Dean Michael Berris -// Copyright 2012 Google, Inc. -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -#ifndef NETWORK_URI_ENCODE_INC -#define NETWORK_URI_ENCODE_INC - -#include -#include -#include -#include -#include - -namespace network { -namespace detail { -template -inline CharT hex_to_letter(CharT in) { - if ((in >= 0) && (in < 10)) { - return in + '0'; - } - - if ((in >= 10) && (in < 16)) { - return in - 10 + 'A'; - } - - return in; -} - -template -void percent_encode(charT in, OutputIterator &out) { - out++ = '%'; - out++ = hex_to_letter((in >> 4) & 0x0f); - out++ = hex_to_letter(in & 0x0f); -} - -template -bool is_unreserved(charT in) { - return ((in >= 'a') && (in <= 'z')) || - ((in >= 'A') && (in <= 'Z')) || - ((in >= '0') && (in <= '9')) || - (in == '-') || - (in == '.') || - (in == '_') || - (in == '~'); -} - -template -void encode_char(charT in, OutputIterator &out, const char *ignore = "") { - if (is_unreserved(in)) { - out++ = in; - } else { - auto first = ignore, last = ignore + std::strlen(ignore); - if (std::find(first, last, in) != last) { - out++ = in; - } else { - percent_encode(in, out); - } - } -} - -template -OutputIterator encode_user_info(InputIterator first, InputIterator last, - OutputIterator out) { - auto it = first; - while (it != last) { - detail::encode_char(*it, out, ":"); - ++it; - } - return out; -} - -template -OutputIterator encode_host(InputIterator first, InputIterator last, - OutputIterator out) { - auto it = first; - while (it != last) { - detail::encode_char(*it, out, "[:]"); - ++it; - } - return out; -} - -template -OutputIterator encode_port(InputIterator first, InputIterator last, - OutputIterator out) { - auto it = first; - while (it != last) { - detail::encode_char(*it, out); - ++it; - } - return out; -} - -template -OutputIterator encode_path(InputIterator first, InputIterator last, - OutputIterator out) { - auto it = first; - while (it != last) { - detail::encode_char(*it, out, "/.@%;="); - ++it; - } - return out; -} - -template -OutputIterator encode_query_component(InputIterator first, InputIterator last, - OutputIterator out) { - auto it = first; - while (it != last) { - detail::encode_char(*it, out, "/?"); - ++it; - } - return out; -} - -template -OutputIterator encode_fragment(InputIterator first, InputIterator last, - OutputIterator out) { - auto it = first; - while (it != last) { - detail::encode_char(*it, out, "/.@&l;=%"); - ++it; - } - return out; -} - -template -String encode_user_info(const String &user_info) { - String encoded; - encode_user_info(std::begin(user_info), std::end(user_info), - std::back_inserter(encoded)); - return encoded; -} - -template -String encode_host(const String &host) { - String encoded; - encode_host(std::begin(host), std::end(host), std::back_inserter(encoded)); - return encoded; -} - -template -String encode_port(const String &port) { - String encoded; - encode_port(std::begin(port), std::end(port), std::back_inserter(encoded)); - return encoded; -} - -template -String encode_path(const String &path) { - String encoded; - encode_path(std::begin(path), std::end(path), std::back_inserter(encoded)); - return encoded; -} - -template -String encode_fragment(const String &fragment) { - String encoded; - encode_fragment(std::begin(fragment), std::end(fragment), - std::back_inserter(encoded)); - return encoded; -} -} // namespace detail -} // namespace network - -#endif // NETWORK_URI_ENCODE_INC diff --git a/graphics/asymptote/LspCpp/network/uri/detail/grammar.hpp b/graphics/asymptote/LspCpp/network/uri/detail/grammar.hpp deleted file mode 100644 index 7e4a9fe3b8..0000000000 --- a/graphics/asymptote/LspCpp/network/uri/detail/grammar.hpp +++ /dev/null @@ -1,130 +0,0 @@ -// Copyright 2016 Glyn Matthews. -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -#ifndef NETWORK_DETAIL_URI_GRAMMAR_INC -#define NETWORK_DETAIL_URI_GRAMMAR_INC - -#include -#include -#include -#include -#include - -namespace network { -namespace detail { -inline bool isalnum(string_view::const_iterator &it, - string_view::const_iterator last) { - if (it != last) { - if (std::isalnum(*it, std::locale::classic())) { - ++it; - return true; - } - } - return false; -} - -inline bool isdigit(string_view::const_iterator &it, - string_view::const_iterator last) { - if (it != last) { - if (std::isdigit(*it, std::locale::classic())) { - ++it; - return true; - } - } - return false; -} - -inline bool is_in(string_view::const_iterator &it, - string_view::const_iterator last, const char *chars) { - if (it != last) { - auto length = std::strlen(chars); - for (std::size_t i = 0; i < length; ++i) { - if (*it == chars[i]) { - ++it; - return true; - } - } - } - return false; -} - -inline bool is_sub_delim(string_view::const_iterator &it, - string_view::const_iterator last) { - return is_in(it, last, "!$&'()*+,;="); -} - -inline bool is_ucschar(string_view::const_iterator &it, - string_view::const_iterator last) { - if (it == last) { - return false; - } - - - - return false; -} - -inline bool is_private(string_view::const_iterator &it, - string_view::const_iterator last) { - return false; -} - -inline bool is_unreserved(string_view::const_iterator &it, - string_view::const_iterator last) { - return isalnum(it, last) || is_in(it, last, "-._~"); -} - -inline bool is_pct_encoded(string_view::const_iterator &it, - string_view::const_iterator last) { - if (it == last) { - return false; - } - - string_view::const_iterator it_copy = it; - - if (*it_copy == '%') { - ++it_copy; - if (it_copy == last) { - return false; - } - } - - if (std::isxdigit(*it_copy, std::locale::classic())) { - ++it_copy; - if (it_copy == last) { - return false; - } - } - - if (std::isxdigit(*it_copy, std::locale::classic())) { - ++it_copy; - it = it_copy; - return true; - } - - return false; -} - -inline bool is_pchar(string_view::const_iterator &it, - string_view::const_iterator last) { - return - is_unreserved(it, last) || - is_pct_encoded(it, last) || - is_sub_delim(it, last) || - is_in(it, last, ":@") || - is_ucschar(it, last) - ; -} - -inline bool is_valid_port(string_view::const_iterator it) { - const char* port_first = &(*it); - char* port_last = 0; - unsigned long value = std::strtoul(port_first, &port_last, 10); - return (value < std::numeric_limits::max()); -} -} // namespace detail -} // namespace network - -#endif // NETWORK_DETAIL_URI_GRAMMAR_INC diff --git a/graphics/asymptote/LspCpp/network/uri/detail/translate.hpp b/graphics/asymptote/LspCpp/network/uri/detail/translate.hpp deleted file mode 100644 index 7566c258e1..0000000000 --- a/graphics/asymptote/LspCpp/network/uri/detail/translate.hpp +++ /dev/null @@ -1,89 +0,0 @@ -// Copyright (c) Glyn Matthews 2012-2016. -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -#ifndef NETWORK_URI_DETAIL_TRANSLATE_INC -#define NETWORK_URI_DETAIL_TRANSLATE_INC - -#include - -namespace network { -namespace detail { -template -struct translate_impl; - -template <> -struct translate_impl { - std::string operator()(const std::string &source) const { return source; } -}; - -template -struct translate_impl { - std::string operator()(const char *source) const { return source; } -}; - -template <> -struct translate_impl { - std::string operator()(const char *source) const { return source; } -}; - -template <> -struct translate_impl { - std::string operator()(const char *source) const { return source; } -}; - -template -struct translate_impl { - std::string operator()(const char *source) const { return source; } -}; - -template <> -struct translate_impl { - std::string operator()(const std::wstring &source) const { - return std::string(std::begin(source), std::end(source)); - } -}; - -template -struct translate_impl { - std::string operator()(const wchar_t *source) const { - translate_impl impl; - return impl(source); - } -}; - -template -struct translate_impl { - std::string operator()(const wchar_t *source) const { - translate_impl impl; - return impl(source); - } -}; - -template <> -struct translate_impl { - std::string operator()(const wchar_t *source) const { - translate_impl impl; - return impl(source); - } -}; - -template <> -struct translate_impl { - std::string operator()(const wchar_t *source) const { - translate_impl impl; - return impl(source); - } -}; - -template -inline std::string translate(const Source &source) { - translate_impl impl; - return impl(source); -} - -} // namespace detail -} // namespace network - -#endif // NETWORK_URI_DETAIL_TRANSLATE_INC diff --git a/graphics/asymptote/LspCpp/network/uri/detail/uri_advance_parts.cpp b/graphics/asymptote/LspCpp/network/uri/detail/uri_advance_parts.cpp deleted file mode 100644 index 6eec782c82..0000000000 --- a/graphics/asymptote/LspCpp/network/uri/detail/uri_advance_parts.cpp +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright 2016-2017 Glyn Matthews. -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -#include "uri_advance_parts.hpp" -#include -#include -#include - -namespace network { -namespace detail { -namespace { -template -uri_part copy_part(Iterator first, Iterator last, - string_view::const_iterator &it) { - auto part_first = it; - std::advance(it, std::distance(first, last)); - return detail::uri_part(part_first, it); -} -} // namespace - -uri_part copy_part(const std::string &uri, string_view::const_iterator &it) { - return copy_part(std::begin(uri), std::end(uri), it); -} - -void advance_parts(string_view uri_view, uri_parts &parts, - const uri_parts &existing_parts) { - auto first = std::begin(uri_view); - - auto it = first; - if (auto scheme = existing_parts.scheme) { - parts.scheme = copy_part(std::begin(*scheme), std::end(*scheme), it); - - // ignore : for all URIs - if (*it == ':') { - ++it; - } - - // ignore // for hierarchical URIs - if (existing_parts.hier_part.host) { - std::advance(it, 2); - } - } - - if (auto user_info = existing_parts.hier_part.user_info) { - parts.hier_part.user_info = - copy_part(std::begin(*user_info), std::end(*user_info), it); - ++it; // ignore @ - } - - if (auto host = existing_parts.hier_part.host) { - parts.hier_part.host = copy_part(std::begin(*host), std::end(*host), it); - } - - if (auto port = existing_parts.hier_part.port) { - ++it; // ignore : - parts.hier_part.port = copy_part(std::begin(*port), std::end(*port), it); - } - - if (auto path = existing_parts.hier_part.path) { - parts.hier_part.path = copy_part(std::begin(*path), std::end(*path), it); - } - - if (auto query = existing_parts.query) { - ++it; // ignore ? - parts.query = copy_part(std::begin(*query), std::end(*query), it); - } - - if (auto fragment = existing_parts.fragment) { - ++it; // ignore # - parts.fragment = copy_part(std::begin(*fragment), std::end(*fragment), it); - } -} -} // namespace detail -} // namespace network diff --git a/graphics/asymptote/LspCpp/network/uri/detail/uri_advance_parts.hpp b/graphics/asymptote/LspCpp/network/uri/detail/uri_advance_parts.hpp deleted file mode 100644 index 4d9fd76768..0000000000 --- a/graphics/asymptote/LspCpp/network/uri/detail/uri_advance_parts.hpp +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright 2013-2016 Glyn Matthews. -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -#ifndef NETWORK_DETAIL_URI_ADVANCE_INC -#define NETWORK_DETAIL_URI_ADVANCE_INC - -#include - -namespace network { -namespace detail { -uri_part copy_part(const std::string &part, - string_view::const_iterator &it); - -void advance_parts(string_view uri_view, uri_parts &parts, - const uri_parts &existing_parts); -} // namespace detail -} // namespace network - -#endif // NETWORK_DETAIL_URI_ADVANCE_INC diff --git a/graphics/asymptote/LspCpp/network/uri/detail/uri_normalize.cpp b/graphics/asymptote/LspCpp/network/uri/detail/uri_normalize.cpp deleted file mode 100644 index 1c6ca1484b..0000000000 --- a/graphics/asymptote/LspCpp/network/uri/detail/uri_normalize.cpp +++ /dev/null @@ -1,87 +0,0 @@ -// Copyright 2013-2016 Glyn Matthews. -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -#include -#include -#include - -#ifdef NETWORK_URI_EXTERNAL_BOOST -#include -#include -namespace boost = boost; -#else // NETWORK_URI_EXTERNAL_BOOST -#include "boost/algorithm/string/split.hpp" -#include "boost/algorithm/string/join.hpp" -#endif // NETWORK_URI_EXTERNAL_BOOST - -#include "uri_normalize.hpp" -#include "uri_percent_encode.hpp" -#include "algorithm.hpp" - -namespace network { -namespace detail { -std::string normalize_path_segments(string_view path) { - std::string result; - - if (!path.empty()) { - std::vector path_segments; - boost::split(path_segments, path, [](char ch) { - return ch == '/'; - }); - - bool last_segment_is_slash = path_segments.back().empty(); - std::vector normalized_segments; - for (const auto &segment : path_segments) { - if (segment.empty() || (segment == ".")) { - continue; - } - else if (segment == "..") { - if (normalized_segments.empty()) { - throw uri_builder_error(); - } - normalized_segments.pop_back(); - } - else { - normalized_segments.push_back(segment); - } - } - - for (const auto &segment : normalized_segments) { - result += "/" + segment; - } - - if (last_segment_is_slash) { - result += "/"; - } - } - - if (result.empty()) { - result = "/"; - } - - return result; -} - -std::string normalize_path(string_view path, uri_comparison_level level) { - auto result = path.to_string(); - - if (uri_comparison_level::syntax_based == level) { - // case normalization - detail::for_each(result, percent_encoded_to_upper()); - - // % encoding normalization - result.erase( - detail::decode_encoded_unreserved_chars(std::begin(result), - std::end(result)), - std::end(result)); - - // % path segment normalization - result = normalize_path_segments(result); - } - - return result; -} -} // namespace detail -} // namespace network diff --git a/graphics/asymptote/LspCpp/network/uri/detail/uri_normalize.hpp b/graphics/asymptote/LspCpp/network/uri/detail/uri_normalize.hpp deleted file mode 100644 index 3c2e03b11d..0000000000 --- a/graphics/asymptote/LspCpp/network/uri/detail/uri_normalize.hpp +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright 2013-2016 Glyn Matthews. -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -#ifndef NETWORK_DETAIL_NORMALIZE_INC -#define NETWORK_DETAIL_NORMALIZE_INC - -#include -#include - -namespace network { -namespace detail { -std::string normalize_path_segments(string_view path); - -std::string normalize_path(string_view path, uri_comparison_level level); -} // namespace detail -} // namespace network - -#endif // NETWORK_DETAIL_NORMALIZE_INC diff --git a/graphics/asymptote/LspCpp/network/uri/detail/uri_parse.cpp b/graphics/asymptote/LspCpp/network/uri/detail/uri_parse.cpp deleted file mode 100644 index 46dd1b0f26..0000000000 --- a/graphics/asymptote/LspCpp/network/uri/detail/uri_parse.cpp +++ /dev/null @@ -1,424 +0,0 @@ -// Copyright 2016-2017 Glyn Matthews. -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -#include "uri_parse.hpp" -#include -#include -#include "grammar.hpp" -#include - -namespace network { -namespace detail { -namespace { -enum class uri_state { - scheme, - hier_part, - query, - fragment -}; - -enum class hier_part_state { - first_slash, - second_slash, - authority, - host, - host_ipv6, - port, - path -}; - -bool validate_scheme(string_view::const_iterator &it, - string_view::const_iterator last) { - if (it == last) { - return false; - } - - // The first character must be a letter - if (!std::isalpha(*it, std::locale("C"))) { - return false; - } - ++it; - - while (it != last) { - if (*it == ':') { - break; - } - else if (!isalnum(it, last) && !is_in(it, last, "+-.")) { - return false; - } - } - - return true; -} - -bool validate_user_info(string_view::const_iterator it, - string_view::const_iterator last) { - while (it != last) { - if (!is_unreserved(it, last) && - !is_pct_encoded(it, last) && - !is_sub_delim(it, last) && - !is_in(it, last, ":")) { - return false; - } - } - return true; -} - -bool set_host_and_port(string_view::const_iterator first, - string_view::const_iterator last, - string_view::const_iterator last_colon, - uri_parts &parts) { - if (first >= last_colon) { - parts.hier_part.host = uri_part(first, last); - } - else { - auto port_start = last_colon; - ++port_start; - parts.hier_part.host = uri_part(first, last_colon); - if (!is_valid_port(port_start)) { - return false; - } - parts.hier_part.port = uri_part(port_start, last); - } - return true; -} - -bool validate_fragment(string_view::const_iterator &it, - string_view::const_iterator last) { - while (it != last) { - if (!is_pchar(it, last) && !is_in(it, last, "?/")) { - return false; - } - } - return true; -} -} // namespace - -bool parse(string_view::const_iterator &it, string_view::const_iterator last, - uri_parts &parts) { - auto state = uri_state::scheme; - - auto first = it; - - if (it == last) { - return false; - } - - if (validate_scheme(it, last)) { - parts.scheme = uri_part(first, it); - // move past the scheme delimiter - ++it; - state = uri_state::hier_part; - } - else { - return false; - } - - // Hierarchical part - auto hp_state = hier_part_state::first_slash; - // this is used by the user_info/port - auto last_colon = first; - while (it != last) { - if (hp_state == hier_part_state::first_slash) { - if (*it == '/') { - hp_state = hier_part_state::second_slash; - // set the first iterator in case the second slash is not forthcoming - first = it; - ++it; - continue; - } - else { - hp_state = hier_part_state::path; - first = it; - } - } - else if (hp_state == hier_part_state::second_slash) { - if (*it == '/') { - hp_state = hier_part_state::authority; - ++it; - first = it; - continue; - } - else { - // it's a valid URI, and this is the beginning of the path - hp_state = hier_part_state::path; - } - } - else if (hp_state == hier_part_state::authority) { - if (is_in(first, last, "@:")) { - return false; - } - - // reset the last colon - if (first == it) { - last_colon = first; - } - - if (*it == '@') { - if (!validate_user_info(first, it)) { - return false; - } - parts.hier_part.user_info = uri_part(first, it); - hp_state = hier_part_state::host; - ++it; - first = it; - - if (*first == '[') { - // this is an IPv6 address - hp_state = hier_part_state::host_ipv6; - } - - continue; - } - else if (*it == '[') { - // this is an IPv6 address - hp_state = hier_part_state::host_ipv6; - first = it; - continue; - } - else if (*it == ':') { - last_colon = it; - } - else if (*it == '/') { - // we skipped right past the host and port, and are at the path. - if (!set_host_and_port(first, it, last_colon, parts)) { - return false; - } - hp_state = hier_part_state::path; - first = it; - continue; - } - else if (*it == '?') { - // the path is empty, but valid, and the next part is the query - if (!set_host_and_port(first, it, last_colon, parts)) { - return false; - } - parts.hier_part.path = uri_part(it, it); - state = uri_state::query; - ++it; - first = it; - break; - } - else if (*it == '#') { - // the path is empty, but valid, and the next part is the fragment - if (!set_host_and_port(first, it, last_colon, parts)) { - return false; - } - parts.hier_part.path = uri_part(it, it); - state = uri_state::fragment; - ++it; - first = it; - break; - } - } - else if (hp_state == hier_part_state::host) { - if (*first == ':') { - return false; - } - - if (*it == ':') { - parts.hier_part.host = uri_part(first, it); - hp_state = hier_part_state::port; - ++it; - first = it; - continue; - } - else if (*it == '/') { - parts.hier_part.host = uri_part(first, it); - hp_state = hier_part_state::path; - first = it; - continue; - } - else if (*it == '?') { - // the path is empty, but valid, and the next part is the query - parts.hier_part.host = uri_part(first, it); - parts.hier_part.path = uri_part(it, it); - state = uri_state::query; - ++it; - first = it; - break; - } - else if (*it == '#') { - // the path is empty, but valid, and the next part is the fragment - parts.hier_part.host = uri_part(first, it); - parts.hier_part.path = uri_part(it, it); - state = uri_state::fragment; - ++it; - first = it; - break; - } - } - else if (hp_state == hier_part_state::host_ipv6) { - if (*first != '[') { - return false; - } - - if (*it == ']') { - ++it; - // Then test if the next part is a host, part, or the end of the file - if (it == last) { - break; - } - else if (*it == ':') { - parts.hier_part.host = uri_part(first, it); - hp_state = hier_part_state::port; - ++it; - first = it; - } - else if (*it == '/') { - parts.hier_part.host = uri_part(first, it); - hp_state = hier_part_state::path; - first = it; - } - else if (*it == '?') { - parts.hier_part.host = uri_part(first, it); - parts.hier_part.path = uri_part(it, it); - state = uri_state::query; - ++it; - first = it; - break; - } - else if (*it == '#') { - parts.hier_part.host = uri_part(first, it); - parts.hier_part.path = uri_part(it, it); - state = uri_state::fragment; - ++it; - first = it; - break; - } - continue; - } - } - else if (hp_state == hier_part_state::port) { - if (*first == '/') { - // the port is empty, but valid - if (!is_valid_port(first)) { - return false; - } - parts.hier_part.port = uri_part(first, it); - - // the port isn't set, but the path is - hp_state = hier_part_state::path; - continue; - } - - if (*it == '/') { - if (!is_valid_port(first)) { - return false; - } - parts.hier_part.port = uri_part(first, it); - hp_state = hier_part_state::path; - first = it; - continue; - } - else if (!isdigit(it, last)) { - return false; - } - continue; - } - else if (hp_state == hier_part_state::path) { - if (*it == '?') { - parts.hier_part.path = uri_part(first, it); - // move past the query delimiter - ++it; - first = it; - state = uri_state::query; - break; - } - else if (*it == '#') { - parts.hier_part.path = uri_part(first, it); - // move past the fragment delimiter - ++it; - first = it; - state = uri_state::fragment; - break; - } - - if (!is_pchar(it, last) && !is_in(it, last, "/")) { - return false; - } - else { - continue; - } - } - - ++it; - } - - if (state == uri_state::query) { - while (it != last) { - if (!is_pchar(it, last) && !is_in(it, last, "?/")) { - // If this is a fragment, keep going - if (*it == '#') { - parts.query = uri_part(first, it); - // move past the fragment delimiter - ++it; - first = it; - state = uri_state::fragment; - break; - } - else { - return false; - } - } - } - } - - if (state == uri_state::fragment) { - if (!validate_fragment(it, last)) { - return false; - } - } - - // we're done! - if (state == uri_state::hier_part) { - if (hp_state == hier_part_state::authority) { - if (first == last) { - return false; - } - - if (!set_host_and_port(first, last, last_colon, parts)) { - return false; - } - parts.hier_part.path = uri_part(last, last); - } - else if (hp_state == hier_part_state::host) { - if (first == last) { - return false; - } - - if (!set_host_and_port(first, last, last_colon, parts)) { - return false; - } - parts.hier_part.path = uri_part(last, last); - } - else if (hp_state == hier_part_state::host_ipv6) { - if (!set_host_and_port(first, last, last_colon, parts)) { - return false; - } - parts.hier_part.path = uri_part(last, last); - } - else if (hp_state == hier_part_state::port) { - if (!is_valid_port(first)) { - return false; - } - parts.hier_part.port = uri_part(first, last); - parts.hier_part.path = uri_part(last, last); - } - else if (hp_state == hier_part_state::path) { - parts.hier_part.path = uri_part(first, last); - } - } - else if (state == uri_state::query) { - parts.query = uri_part(first, last); - } - else if (state == uri_state::fragment) { - parts.fragment = uri_part(first, last); - } - - return true; -} -} // namespace detail -} // namespace network diff --git a/graphics/asymptote/LspCpp/network/uri/detail/uri_parse.hpp b/graphics/asymptote/LspCpp/network/uri/detail/uri_parse.hpp deleted file mode 100644 index 73835c3656..0000000000 --- a/graphics/asymptote/LspCpp/network/uri/detail/uri_parse.hpp +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright 2013-2016 Glyn Matthews. -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -#ifndef NETWORK_DETAIL_URI_PARSE_INC -#define NETWORK_DETAIL_URI_PARSE_INC - -#include - -namespace network { -namespace detail { -struct uri_parts; - -bool parse(string_view::const_iterator &first, string_view::const_iterator last, uri_parts &parts); -} // namespace detail -} // namespace network - -#endif // NETWORK_DETAIL_URI_PARSE_INC diff --git a/graphics/asymptote/LspCpp/network/uri/detail/uri_parse_authority.cpp b/graphics/asymptote/LspCpp/network/uri/detail/uri_parse_authority.cpp deleted file mode 100644 index 0db307f1f6..0000000000 --- a/graphics/asymptote/LspCpp/network/uri/detail/uri_parse_authority.cpp +++ /dev/null @@ -1,130 +0,0 @@ -// Copyright 2016 Glyn Matthews. -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -#include "uri_parse_authority.hpp" -#include -#include -#include -#include "grammar.hpp" - -namespace network { -namespace detail { -namespace { -enum class authority_state { - user_info, - host, - host_ipv6, - port -}; -} // namespace - -bool parse_authority(string_view::const_iterator &it, - string_view::const_iterator last, - optional &user_info, - optional &host, - optional &port) { - auto first = it; - - auto state = authority_state::user_info; - while (it != last) { - if (state == authority_state::user_info) { - if (is_in(first, last, "@:")) { - return false; - } - - if (*it == '@') { - user_info = uri_part(first, it); - state = authority_state::host; - ++it; - first = it; - continue; - } - else if (*it == '[') { - // this is an IPv6 address - state = authority_state::host_ipv6; - first = it; - continue; - } - else if (*it == ':') { - // this is actually the host, and the next part is expected to be the port - host = uri_part(first, it); - state = authority_state::port; - ++it; - first = it; - continue; - } - } - else if (state == authority_state::host) { - if (*first == ':') { - return false; - } - - if (*it == ':') { - host = uri_part(first, it); - state = authority_state::port; - ++it; - first = it; - continue; - } - } - else if (state == authority_state::host_ipv6) { - if (*first != '[') { - return false; - } - - if (*it == ']') { - host = uri_part(first, it); - ++it; - // Then test if the next part is a host, part, or the end of the file - if (it == last) { - break; - } - else if (*it == ':') { - host = uri_part(first, it); - state = authority_state::port; - ++it; - first = it; - } - } - } - else if (state == authority_state::port) { - if (*first == '/') { - // the port is empty, but valid - port = uri_part(first, it); - if (!is_valid_port(std::begin(*port))) { - return false; - } - - continue; - } - - if (!isdigit(it, last)) { - return false; - } - } - - ++it; - } - - if (state == authority_state::user_info) { - host = uri_part(first, last); - } - else if (state == authority_state::host) { - host = uri_part(first, last); - } - else if (state == authority_state::host_ipv6) { - host = uri_part(first, last); - } - else if (state == authority_state::port) { - port = uri_part(first, last); - if (!is_valid_port(std::begin(*port))) { - return false; - } - } - - return true; -} -} // namespace detail -} // namespace network diff --git a/graphics/asymptote/LspCpp/network/uri/detail/uri_parse_authority.hpp b/graphics/asymptote/LspCpp/network/uri/detail/uri_parse_authority.hpp deleted file mode 100644 index cb37104258..0000000000 --- a/graphics/asymptote/LspCpp/network/uri/detail/uri_parse_authority.hpp +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright 2013-2016 Glyn Matthews. -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -#ifndef NETWORK_DETAIL_URI_PARSE_AUTHORITY_INC -#define NETWORK_DETAIL_URI_PARSE_AUTHORITY_INC - -#include - -namespace network { -namespace detail { -bool parse_authority(string_view::const_iterator &first, - string_view::const_iterator last, - optional &user_info, - optional &host, - optional &port); -} // namespace detail -} // namespace network - -#endif // NETWORK_DETAIL_URI_PARSE_AUTHORITY_INC diff --git a/graphics/asymptote/LspCpp/network/uri/detail/uri_parts.hpp b/graphics/asymptote/LspCpp/network/uri/detail/uri_parts.hpp deleted file mode 100644 index 17a69687fe..0000000000 --- a/graphics/asymptote/LspCpp/network/uri/detail/uri_parts.hpp +++ /dev/null @@ -1,88 +0,0 @@ -// Copyright 2016 Glyn Matthews. -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -#ifndef NETWORK_DETAIL_URI_PARTS_INC -#define NETWORK_DETAIL_URI_PARTS_INC - -#include -#include -#include -#include -#include - -namespace network { -namespace detail { -class uri_part { - public: - typedef string_view::value_type value_type; - typedef string_view::iterator iterator; - typedef string_view::const_iterator const_iterator; - typedef string_view::const_pointer const_pointer; - typedef string_view::size_type size_type; - typedef string_view::difference_type difference_type; - - uri_part() noexcept = default; - - uri_part(const_iterator first, const_iterator last) noexcept - : first(first), last(last) {} - - const_iterator begin() const noexcept { return first; } - - const_iterator end() const noexcept { return last; } - - bool empty() const noexcept { return first == last; } - - std::string to_string() const { return std::string(first, last); } - - const_pointer ptr() const noexcept { - assert(first != last); - return first; - } - - difference_type length() const noexcept { - return last - first; - } - - string_view to_string_view() const noexcept { return string_view(ptr(), length()); } - - private: - const_iterator first, last; -}; - -struct hierarchical_part { - hierarchical_part() = default; - - optional user_info; - optional host; - optional port; - optional path; - - void clear() { - user_info = nullopt; - host = nullopt; - port = nullopt; - path = nullopt; - } -}; - -struct uri_parts { - uri_parts() = default; - - optional scheme; - hierarchical_part hier_part; - optional query; - optional fragment; - - void clear() { - scheme = nullopt; - hier_part.clear(); - query = nullopt; - fragment = nullopt; - } -}; -} // namespace detail -} // namespace network - -#endif // NETWORK_DETAIL_URI_PARTS_INC diff --git a/graphics/asymptote/LspCpp/network/uri/detail/uri_percent_encode.hpp b/graphics/asymptote/LspCpp/network/uri/detail/uri_percent_encode.hpp deleted file mode 100644 index ab5134db9c..0000000000 --- a/graphics/asymptote/LspCpp/network/uri/detail/uri_percent_encode.hpp +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright 2013-2016 Glyn Matthews. -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -#ifndef NETWORK_DETAIL_URI_PERCENT_ENCODE_INC -#define NETWORK_DETAIL_URI_PERCENT_ENCODE_INC - -#include -#include -#include -#include -#include - -namespace network { -namespace detail { - -inline optional percent_encode(std::string::const_iterator it) { - try { - char output = '\0'; - detail::decode_char(it, &output); - return output; - } catch (percent_decoding_error &) { - return optional(); - } -} - -template -struct percent_encoded_to_upper { - percent_encoded_to_upper() : count(0) {} - - void operator()(typename String::value_type &c) { - if (c == '%') { - count = 2; - } else if (count > 0) { - c = std::toupper(c, std::locale()); - --count; - } - } - - unsigned count; -}; - -template -Iter decode_encoded_unreserved_chars(Iter first, Iter last) { - - // unreserved = ALPHA / DIGIT / "-" / "." / "_" / "~" - - const auto is_unreserved = [](char c) - { - return std::isalnum(c, std::locale()) - || '-' == c - || '.' == c - || '_' == c - || '~' == c; - }; - - auto it = first, it2 = first; - while (it != last) { - if (*it == '%') { - const auto sfirst = it; - const auto opt_char = percent_encode(sfirst); - if (opt_char && is_unreserved(*opt_char)) { - *it2 = *opt_char; - ++it; ++it; - } else { - *it2 = *it; - } - } - else { - *it2 = *it; - } - ++it; ++it2; - } - return it2; -} -} // namespace detail -} // namespace network - -#endif // NETWORK_DETAIL_URI_PERCENT_ENCODE_INC diff --git a/graphics/asymptote/LspCpp/network/uri/detail/uri_resolve.cpp b/graphics/asymptote/LspCpp/network/uri/detail/uri_resolve.cpp deleted file mode 100644 index ca66405123..0000000000 --- a/graphics/asymptote/LspCpp/network/uri/detail/uri_resolve.cpp +++ /dev/null @@ -1,91 +0,0 @@ -// Copyright 2013-2016 Glyn Matthews. -// Copyright 2013 Hannes Kamecke. -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -#include "uri_resolve.hpp" -#include - -#ifdef NETWORK_URI_EXTERNAL_BOOST -#include -#include -#include -#include -namespace boost = boost; -#else // NETWORK_URI_EXTERNAL_BOOST -#include "boost/algorithm/string/find.hpp" -#include "boost/algorithm/string/erase.hpp" -#include "boost/algorithm/string/replace.hpp" -#include "boost/algorithm/string/predicate.hpp" -#endif // NETWORK_URI_EXTERNAL_BOOST - -namespace network { -namespace detail { -// remove_dot_segments -inline -void remove_last_segment(std::string& path) { - while (!path.empty()) { - if (path.back() == '/') { - path.pop_back(); - break; - } - path.pop_back(); - } -} - -// implementation of http://tools.ietf.org/html/rfc3986#section-5.2.4 -static -std::string remove_dot_segments(std::string input) { - std::string result; - - while (!input.empty()) { - if (boost::starts_with(input, "../")) { - boost::erase_head(input, 3); - } else if (boost::starts_with(input, "./")) { - boost::erase_head(input, 2); - } else if (boost::starts_with(input, "/./")) { - boost::replace_head(input, 3, "/"); - } else if (input == "/.") { - boost::replace_head(input, 2, "/"); - } else if (boost::starts_with(input, "/../")) { - boost::erase_head(input, 3); - remove_last_segment(result); - } else if (boost::starts_with(input, "/..")) { - boost::replace_head(input, 3, "/"); - remove_last_segment(result); - } else if (boost::algorithm::all(input, [](char ch) { return ch == '.'; })) { - input.clear(); - } - else { - int n = (input.front() == '/')? 1 : 0; - auto slash = boost::find_nth(input, "/", n); - result.append(std::begin(input), std::begin(slash)); - input.erase(std::begin(input), std::begin(slash)); - } - } - return result; -} - -std::string remove_dot_segments(string_view path) { - return remove_dot_segments(path.to_string()); -} - -// implementation of http://tools.ietf.org/html/rfc3986#section-5.2.3 -std::string merge_paths(const uri& base, const uri& reference) { - std::string result; - - if (!base.has_path() || base.path().empty()) { - result = "/"; - } else { - const auto& base_path = base.path(); - auto last_slash = boost::find_last(base_path, "/"); - result.append(std::begin(base_path), std::end(last_slash)); - } - if (reference.has_path()) { - result.append(reference.path().to_string()); - } - return remove_dot_segments(string_view(result)); -} -} // namespace detail -} // namespace network diff --git a/graphics/asymptote/LspCpp/network/uri/detail/uri_resolve.hpp b/graphics/asymptote/LspCpp/network/uri/detail/uri_resolve.hpp deleted file mode 100644 index 898c6d5423..0000000000 --- a/graphics/asymptote/LspCpp/network/uri/detail/uri_resolve.hpp +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright 2013-2016 Glyn Matthews. -// Copyright 2013 Hannes Kamecke. -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -#ifndef NETWORK_DETAIL_RESOLVE_INC -#define NETWORK_DETAIL_RESOLVE_INC - -#include - -namespace network { -namespace detail { -// implementation of http://tools.ietf.org/html/rfc3986#section-5.2.4 -std::string remove_dot_segments(string_view input); - -// implementation of http://tools.ietf.org/html/rfc3986#section-5.2.3 -std::string merge_paths(const uri &base, const uri &reference); -} // namespace detail -} // namespace network - -#endif // NETWORK_DETAIL_RESOLVE_INC diff --git a/graphics/asymptote/LspCpp/network/uri/uri.cpp b/graphics/asymptote/LspCpp/network/uri/uri.cpp deleted file mode 100644 index ee9aee45f1..0000000000 --- a/graphics/asymptote/LspCpp/network/uri/uri.cpp +++ /dev/null @@ -1,701 +0,0 @@ -// Copyright 2012-2017 Glyn Matthews. -// Copyright 2012 Google, Inc. -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - - -#include -#include -#include -#include -#include "network/uri/uri.hpp" -#include "detail/uri_parse.hpp" -#include "detail/uri_advance_parts.hpp" -#include "detail/uri_percent_encode.hpp" -#include "detail/uri_normalize.hpp" -#include "detail/uri_resolve.hpp" -#include "detail/algorithm.hpp" - -namespace network { -namespace { -// With the parser, we use string_views, which are mutable. However, -// there are times (e.g. during normalization), when we want a part -// to be mutable. This function returns a pair of -// std::string::iterators in the same range as the URI part. -// -inline std::pair mutable_part( - std::string &str, detail::uri_part part) { - auto view = string_view(str); - - auto first_index = std::distance(std::begin(view), std::begin(part)); - auto first = std::begin(str); - std::advance(first, first_index); - - auto last_index = std::distance(std::begin(view), std::end(part)); - auto last = std::begin(str); - std::advance(last, last_index); - - return std::make_pair(first, last); -} - -// This is a convenience function that converts a part of a -// std::string to a string_view. -inline string_view to_string_view(const std::string &uri, - detail::uri_part part) { - if (!part.empty()) { - const char *c_str = uri.c_str(); - const char *part_begin = &(*(std::begin(part))); - std::advance(c_str, std::distance(c_str, part_begin)); - return string_view(c_str, std::distance(std::begin(part), std::end(part))); - } - return string_view(); -} - -inline optional make_arg(optional view) { - if (view) { - return view->to_string(); - } - return nullopt; -} - -template -inline void ignore(T) {} -} // namespace - -void uri::initialize(optional scheme, - optional user_info, - optional host, optional port, - optional path, optional query, - optional fragment) { - if (scheme) { - uri_.append(*scheme); - } - - if (user_info || host || port) { - if (scheme) { - uri_.append("://"); - } - - if (user_info) { - uri_.append(*user_info); - uri_.append("@"); - } - - if (host) { - uri_.append(*host); - } else { - throw uri_builder_error(); - } - - if (port) { - uri_.append(":"); - uri_.append(*port); - } - } else { - if (scheme) { - if (path || query || fragment) { - uri_.append(":"); - } else { - throw uri_builder_error(); - } - } - } - - if (path) { - // if the URI is not opaque and the path is not already prefixed - // with a '/', add one. - if (host && (!path->empty() && path->front() != '/')) { - path = "/" + *path; - } - uri_.append(*path); - } - - if (query) { - uri_.append("?"); - uri_.append(*query); - } - - if (fragment) { - uri_.append("#"); - uri_.append(*fragment); - } - - uri_view_ = string_view(uri_); - - auto it = std::begin(uri_view_); - if (scheme) { - uri_parts_.scheme = detail::copy_part(*scheme, it); - // ignore : and :// - if (*it == ':') { - ++it; - } - if (*it == '/' && *(it + 1) == '/') { - it += 2; - } - } - - if (user_info) { - uri_parts_.hier_part.user_info = detail::copy_part(*user_info, it); - ++it; // ignore @ - } - - if (host) { - uri_parts_.hier_part.host = detail::copy_part(*host, it); - } - - if (port) { - ++it; // ignore : - uri_parts_.hier_part.port = detail::copy_part(*port, it); - } - - if (path) { - uri_parts_.hier_part.path = detail::copy_part(*path, it); - } - - if (query) { - ++it; // ignore ? - uri_parts_.query = detail::copy_part(*query, it); - } - - if (fragment) { - ++it; // ignore # - uri_parts_.fragment = detail::copy_part(*fragment, it); - } -} - -uri::uri() : uri_view_(uri_) {} - -uri::uri(const uri &other) : uri_(other.uri_), uri_view_(uri_) { - detail::advance_parts(uri_view_, uri_parts_, other.uri_parts_); -} - -uri::uri(const uri_builder &builder) { - initialize(builder.scheme_, builder.user_info_, builder.host_, builder.port_, - builder.path_, builder.query_, builder.fragment_); -} - -uri::uri(uri &&other) noexcept : uri_(std::move(other.uri_)), - uri_view_(uri_), - uri_parts_(std::move(other.uri_parts_)) { - detail::advance_parts(uri_view_, uri_parts_, other.uri_parts_); - other.uri_.clear(); - other.uri_view_ = string_view(other.uri_); - other.uri_parts_ = detail::uri_parts(); -} - -uri::~uri() {} - -uri &uri::operator=(uri other) { - other.swap(*this); - return *this; -} - -void uri::swap(uri &other) noexcept { - uri_.swap(other.uri_); - uri_view_ = uri_; - other.uri_view_ = other.uri_; - - const auto this_parts = uri_parts_; - uri_parts_.clear(); - detail::advance_parts(uri_view_, uri_parts_, other.uri_parts_); - other.uri_parts_.clear(); - detail::advance_parts(other.uri_view_, other.uri_parts_, this_parts); -} - -uri::const_iterator uri::begin() const noexcept { return uri_view_.begin(); } - -uri::const_iterator uri::end() const noexcept { return uri_view_.end(); } - -bool uri::has_scheme() const noexcept { - return static_cast(uri_parts_.scheme); -} - -uri::string_view uri::scheme() const noexcept { - return has_scheme() ? to_string_view(uri_, *uri_parts_.scheme) - : string_view{}; -} - -bool uri::has_user_info() const noexcept { - return static_cast(uri_parts_.hier_part.user_info); -} - -uri::string_view uri::user_info() const noexcept { - return has_user_info() - ? to_string_view(uri_, *uri_parts_.hier_part.user_info) - : string_view{}; -} - -bool uri::has_host() const noexcept { - return static_cast(uri_parts_.hier_part.host); -} - -uri::string_view uri::host() const noexcept { - return has_host() ? to_string_view(uri_, *uri_parts_.hier_part.host) - : string_view{}; -} - -bool uri::has_port() const noexcept { - return static_cast(uri_parts_.hier_part.port); -} - -uri::string_view uri::port() const noexcept { - return has_port() ? to_string_view(uri_, *uri_parts_.hier_part.port) - : string_view{}; -} - -bool uri::has_path() const noexcept { - return static_cast(uri_parts_.hier_part.path); -} - -uri::string_view uri::path() const noexcept { - return has_path() ? to_string_view(uri_, *uri_parts_.hier_part.path) - : string_view{}; -} - -bool uri::has_query() const noexcept { - return static_cast(uri_parts_.query); -} - -uri::string_view uri::query() const noexcept { - return has_query() ? to_string_view(uri_, *uri_parts_.query) : string_view{}; -} - -uri::query_iterator::query_iterator() : query_{}, kvp_{} {} - -uri::query_iterator::query_iterator(optional query) - : query_(query) - , kvp_{} { - if (query_ && query_->empty()) { - query_ = nullopt; - } - else { - assign_kvp(); - } -} - -uri::query_iterator::query_iterator(const query_iterator &other) - : query_(other.query_) - , kvp_(other.kvp_) {} - -uri::query_iterator &uri::query_iterator::operator = (const query_iterator &other) { - auto tmp(other); - swap(tmp); - return *this; -} - -uri::query_iterator::reference uri::query_iterator::operator ++ () noexcept { - increment(); - return kvp_; -} - -uri::query_iterator::value_type uri::query_iterator::operator ++ (int) noexcept { - auto original = kvp_; - increment(); - return original; -} - -uri::query_iterator::reference uri::query_iterator::operator * () const noexcept { - return kvp_; -} - -uri::query_iterator::pointer uri::query_iterator::operator -> () const noexcept { - return std::addressof(kvp_); -} - -bool uri::query_iterator::operator==(const query_iterator &other) const noexcept { - if (!query_ && !other.query_) { - return true; - } - else if (query_ && other.query_) { - // since we're comparing substrings, the address of the first - // element in each iterator must be the same - return std::addressof(kvp_.first) == std::addressof(other.kvp_.first); - } - return false; -} - -void uri::query_iterator::swap(query_iterator &other) noexcept { - std::swap(query_, other.query_); - std::swap(kvp_, other.kvp_); -} - -void uri::query_iterator::advance_to_next_kvp() noexcept { - auto first = std::begin(*query_), last = std::end(*query_); - - auto sep_it = std::find_if( - first, last, [](char c) -> bool { return c == '&' || c == ';'; }); - - if (sep_it != last) { - ++sep_it; // skip next separator - } - - // reassign query to the next element - query_ = detail::uri_part(sep_it, last); -} - -void uri::query_iterator::assign_kvp() noexcept { - auto first = std::begin(*query_), last = std::end(*query_); - - auto sep_it = std::find_if( - first, last, [](char c) -> bool { return c == '&' || c == ';'; }); - auto eq_it = - std::find_if(first, sep_it, [](char c) -> bool { return c == '='; }); - - kvp_.first = string_view(std::addressof(*first), std::distance(first, eq_it)); - if (eq_it != sep_it) { - ++eq_it; // skip '=' symbol - } - kvp_.second = string_view(std::addressof(*eq_it), std::distance(eq_it, sep_it)); -} - -void uri::query_iterator::increment() noexcept { - assert(query_); - - if (!query_->empty()) { - advance_to_next_kvp(); - assign_kvp(); - } - - if (query_->empty()) { - query_ = nullopt; - } -} - -uri::query_iterator uri::query_begin() const noexcept { - return has_query()? uri::query_iterator{uri_parts_.query} : uri::query_iterator{}; -} - -uri::query_iterator uri::query_end() const noexcept { - return uri::query_iterator{}; -} - -bool uri::has_fragment() const noexcept { - return static_cast(uri_parts_.fragment); -} - -uri::string_view uri::fragment() const noexcept { - return has_fragment() ? to_string_view(uri_, *uri_parts_.fragment) - : string_view{}; -} - -bool uri::has_authority() const noexcept { - return has_host(); -} - -uri::string_view uri::authority() const noexcept { - if (!has_host()) { - return string_view{}; - } - - auto host = this->host(); - - auto user_info = string_view{}; - if (has_user_info()) { - user_info = this->user_info(); - } - - auto port = string_view{}; - if (has_port()) { - port = this->port(); - } - - auto first = std::begin(host), last = std::end(host); - if (has_user_info() && !user_info.empty()) { - first = std::begin(user_info); - } - else if (host.empty() && has_port() && !port.empty()) { - first = std::begin(port); - --first; // include ':' before port - } - - if (host.empty()) { - if (has_port() && !port.empty()) { - last = std::end(port); - } - else if (has_user_info() && !user_info.empty()) { - last = std::end(user_info); - ++last; // include '@' - } - } - else if (has_port()) { - if (port.empty()) { - ++last; // include ':' after host - } - else { - last = std::end(port); - } - } - - return string_view(first, std::distance(first, last)); -} - -std::string uri::string() const { return uri_; } - -std::wstring uri::wstring() const { - return std::wstring(std::begin(*this), std::end(*this)); -} - -std::u16string uri::u16string() const { - return std::u16string(std::begin(*this), std::end(*this)); -} - -std::u32string uri::u32string() const { - return std::u32string(std::begin(*this), std::end(*this)); -} - -uri::string_view uri::view() const noexcept { - return uri_view_; -} - -bool uri::empty() const noexcept { return uri_.empty(); } - -bool uri::is_absolute() const noexcept { return has_scheme(); } - -bool uri::is_opaque() const noexcept { - return (is_absolute() && !has_authority()); -} - -uri uri::normalize(uri_comparison_level level) const { - string_type normalized(uri_); - string_view normalized_view(normalized); - detail::uri_parts parts; - detail::advance_parts(normalized_view, parts, uri_parts_); - - if (uri_comparison_level::syntax_based == level) { - // All alphabetic characters in the scheme and host are - // lower-case... - if (parts.scheme) { - std::string::iterator first, last; - std::tie(first, last) = mutable_part(normalized, *parts.scheme); - std::transform(first, last, first, - [](char ch) { return std::tolower(ch, std::locale()); }); - } - - // if (parts.hier_part.host) { - // std::string::iterator first, last; - // std::tie(first, last) = mutable_part(normalized, *parts.hier_part.host); - // std::transform(first, last, first, - // [](char ch) { return std::tolower(ch, std::locale()); }); - // } - - // ...except when used in percent encoding - detail::for_each(normalized, detail::percent_encoded_to_upper()); - - // parts are invalidated here - // there's got to be a better way of doing this that doesn't - // mean parsing again (twice!) - normalized.erase(detail::decode_encoded_unreserved_chars( - std::begin(normalized), std::end(normalized)), - std::end(normalized)); - normalized_view = string_view(normalized); - - // need to parse the parts again as the underlying string has changed - const_iterator it = std::begin(normalized_view), last = std::end(normalized_view); - bool is_valid = detail::parse(it, last, parts); - ignore(is_valid); - assert(is_valid); - - if (parts.hier_part.path) { - uri::string_type path = detail::normalize_path_segments( - to_string_view(normalized, *parts.hier_part.path)); - - // put the normalized path back into the uri - optional query, fragment; - if (parts.query) { - query = parts.query->to_string(); - } - - if (parts.fragment) { - fragment = parts.fragment->to_string(); - } - - auto path_begin = std::begin(normalized); - auto path_range = mutable_part(normalized, *parts.hier_part.path); - std::advance(path_begin, std::distance(path_begin, path_range.first)); - normalized.erase(path_begin, std::end(normalized)); - normalized.append(path); - - if (query) { - normalized.append("?"); - normalized.append(*query); - } - - if (fragment) { - normalized.append("#"); - normalized.append(*fragment); - } - } - } - - return uri(normalized); -} - -uri uri::make_relative(const uri &other) const { - if (is_opaque() || other.is_opaque()) { - return other; - } - - if ((!has_scheme() || !other.has_scheme()) || - !detail::equal(scheme(), other.scheme())) { - return other; - } - - if ((!has_authority() || !other.has_authority()) || - !detail::equal(authority(), other.authority())) { - return other; - } - - if (!has_path() || !other.has_path()) { - return other; - } - - auto path = - detail::normalize_path(this->path(), uri_comparison_level::syntax_based); - auto other_path = detail::normalize_path(other.path(), - uri_comparison_level::syntax_based); - - optional query, fragment; - if (other.has_query()) { - query = other.query().to_string(); - } - - if (other.has_fragment()) { - fragment = other.fragment().to_string(); - } - - network::uri result; - result.initialize(optional(), optional(), - optional(), optional(), - other_path, query, fragment); - return result; -} - -uri uri::resolve(const uri &base) const { - // This implementation uses the psuedo-code given in - // http://tools.ietf.org/html/rfc3986#section-5.2.2 - - if (is_absolute() && !is_opaque()) { - // throw an exception ? - return *this; - } - - if (is_opaque()) { - // throw an exception ? - return *this; - } - - optional user_info, host, port, path, query, fragment; - - if (has_authority()) { - // g -> http://g - if (has_user_info()) { - user_info = make_arg(this->user_info()); - } - - if (has_host()) { - host = make_arg(this->host()); - } - - if (has_port()) { - port = make_arg(this->port()); - } - - if (has_path()) { - path = detail::remove_dot_segments(this->path()); - } - - if (has_query()) { - query = make_arg(this->query()); - } - } else { - if (!has_path() || this->path().empty()) { - if (base.has_path()) { - path = make_arg(base.path()); - } - - if (has_query()) { - query = make_arg(this->query()); - } else if (base.has_query()) { - query = make_arg(base.query()); - } - } else { - if (this->path().front() == '/') { - path = detail::remove_dot_segments(this->path()); - } else { - path = detail::merge_paths(base, *this); - } - - if (has_query()) { - query = make_arg(this->query()); - } - } - - if (base.has_user_info()) { - user_info = make_arg(base.user_info()); - } - - if (base.has_host()) { - host = make_arg(base.host()); - } - - if (base.has_port()) { - port = make_arg(base.port()); - } - } - - if (has_fragment()) { - fragment = make_arg(this->fragment()); - } - - network::uri result; - result.initialize(make_arg(base.scheme()), std::move(user_info), - std::move(host), std::move(port), std::move(path), - std::move(query), std::move(fragment)); - return result; -} - -int uri::compare(const uri &other, uri_comparison_level level) const noexcept { - // if both URIs are empty, then we should define them as equal - // even though they're still invalid. - if (empty() && other.empty()) { - return 0; - } - - if (empty()) { - return -1; - } - - if (other.empty()) { - return 1; - } - - return normalize(level).uri_.compare(other.normalize(level).uri_); -} - -bool uri::initialize(const string_type &uri) { - uri_ = detail::trim_copy(uri); - if (!uri_.empty()) { - uri_view_ = string_view(uri_); - const_iterator it = std::begin(uri_view_), last = std::end(uri_view_); - bool is_valid = detail::parse(it, last, uri_parts_); - return is_valid; - } - return true; -} - -void swap(uri &lhs, uri &rhs) noexcept { lhs.swap(rhs); } - -bool operator==(const uri &lhs, const uri &rhs) noexcept { - return lhs.view() == rhs.view(); -} - -bool operator==(const uri &lhs, const char *rhs) noexcept { - return lhs.view() == string_view{rhs}; -} - -bool operator<(const uri &lhs, const uri &rhs) noexcept { - return lhs.view() < rhs.view(); -} - -} // namespace network diff --git a/graphics/asymptote/LspCpp/network/uri/uri.hpp b/graphics/asymptote/LspCpp/network/uri/uri.hpp deleted file mode 100644 index 429e2caeff..0000000000 --- a/graphics/asymptote/LspCpp/network/uri/uri.hpp +++ /dev/null @@ -1,758 +0,0 @@ -// Copyright 2009-2010 Jeroen Habraken. -// Copyright 2009-2017 Dean Michael Berris, Glyn Matthews. -// Copyright 2012 Google, Inc. -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -#ifndef NETWORK_URI_INC -#define NETWORK_URI_INC - -/** - * \file - * \brief Contains the uri class. - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#ifdef NETWORK_URI_MSVC -#pragma warning(push) -#pragma warning(disable : 4251 4231 4660) -#endif - -namespace network { -/** - * \enum uri_comparison_level - * \brief Defines the steps on the URI comparison ladder. - */ -enum class uri_comparison_level { - string_comparison, - syntax_based, - scheme_based, -}; - -/** - * \ingroup uri - * \class uri_builder network/uri/uri_builder.hpp network/uri.hpp - * \brief A class that allows complex uri objects to be constructed. - * \sa uri - */ -class uri_builder; - -/** - * \ingroup uri - * \class uri network/uri/uri.hpp network/uri.hpp - * \brief A class that parses a URI (Uniform Resource Identifier) - * into its component parts. - * - * This class conforms to a URI as defined by RFC 3986, RFC 3987 and - * RFC 2732, including scoped IDs. It provides member functions for - * normalizing, comparing and resolving URIs. - * - * A URI has the syntax: - * - * \code - * [scheme:][user_info@][host][:port][path][?query][#fragment] - * \endcode - * - * Example: - * - * \code - * network::uri instance("http://cpp-netlib.org/"); - * assert(instance.is_absolute()); - * assert(!instance.is_opaque()); - * assert(instance.scheme()); - * assert("http" == *instance.scheme()); - * assert(instance.host()); - * assert("cpp-netlib.org" == *instance.host()); - * assert(instance.path()); - * assert("/" == *instance.path()); - * \endcode - */ -class uri { -#if !defined(DOXYGEN_SHOULD_SKIP_THIS) - friend class uri_builder; -#endif // !defined(DOXYGEN_SHOULD_SKIP_THIS) - - public: - /** - * \brief The URI string_type. - */ - typedef std::string string_type; - - /** - * \brief A reference to the underlying string_type parts. - */ - typedef network::string_view string_view; - - /** - * \brief The char traits. - */ - typedef string_view::traits_type traits_type; - - /** - * \brief The URI const_iterator type. - */ - typedef string_view::const_iterator const_iterator; - - /** - * \brief The URI iterator type. - */ - typedef const_iterator iterator; - - /** - * \brief The URI value_type. - */ - typedef std::iterator_traits::value_type value_type; - - /** - * - */ - class query_iterator { - public: - using value_type = std::pair; - using difference_type = std::ptrdiff_t; - using pointer = const value_type *; - using reference = const value_type &; - using iterator_category = std::forward_iterator_tag; - - query_iterator(); - explicit query_iterator(optional); - query_iterator(const query_iterator &); - query_iterator &operator=(const query_iterator &); - reference operator++() noexcept; - value_type operator++(int) noexcept; - reference operator*() const noexcept; - pointer operator->() const noexcept; - bool operator==(const query_iterator &) const noexcept; - inline bool operator!=(const query_iterator &other) const noexcept { - return !(*this == other); - } - - private: - void swap(query_iterator &) noexcept; - void advance_to_next_kvp() noexcept; - void assign_kvp() noexcept; - void increment() noexcept; - - optional query_; - value_type kvp_; - }; - - /** - * \brief Default constructor. - */ - uri(); - - /** - * \brief Constructor. - * \param first The first element in a string sequence. - * \param last The end + 1th element in a string sequence. - * \throws uri_syntax_error if the sequence is not a valid URI. - * \throws std::bad_alloc If the underlying string cannot be allocated. - */ - template - uri(InputIter first, InputIter last) { - if (!initialize(string_type(first, last))) { - throw uri_syntax_error(); - } - } - -#if !defined(DOXYGEN_SHOULD_SKIP_THIS) - template - explicit uri(InputIter first, InputIter last, std::error_code &ec) { - if (!initialize(string_type(first, last))) { - ec = make_error_code(uri_error::invalid_syntax); - } - } -#endif // !defined(DOXYGEN_SHOULD_SKIP_THIS) - - /** - * \brief Constructor. - * \param source A source string that is to be parsed as a URI. - * \throws uri_syntax_error if the source is not a valid URI. - * \throws std::bad_alloc If the underlying string cannot be allocated. - */ - template - explicit uri(const Source &source) { - if (!initialize(detail::translate(source))) { - throw uri_syntax_error(); - } - } - -#if !defined(DOXYGEN_SHOULD_SKIP_THIS) - template - explicit uri(const Source &source, std::error_code &ec) { - if (!initialize(detail::translate(source))) { - ec = make_error_code(uri_error::invalid_syntax); - } - } -#endif // !defined(DOXYGEN_SHOULD_SKIP_THIS) - -#if !defined(DOXYGEN_SHOULD_SKIP_THIS) - explicit uri(const uri_builder &builder); -#endif // !defined(DOXYGEN_SHOULD_SKIP_THIS) - - /** - * \brief Copy constructor. - * \throws std::bad_alloc If the underlying string cannot be allocated. - */ - uri(const uri &other); - - /** - * \brief Move constructor. - */ - uri(uri &&other) noexcept; - - /** - * \brief Destructor. - */ - ~uri(); - - /** - * \brief Assignment operator. - * \throws std::bad_alloc If the underlying string cannot be allocated. - */ - uri &operator=(uri other); - - /** - * \brief Swaps one uri object with another. - * \param other The other uri object. - */ - void swap(uri &other) noexcept; - - /** - * \brief Returns an iterator at the first element in the - * underlying sequence. - * \return An iterator starting at the first element. - */ - const_iterator begin() const noexcept; - - /** - * \brief Returns an iterator at the end + 1th element in the - * underlying sequence. - * \return An iterator starting at the end + 1th element. - */ - const_iterator end() const noexcept; - - /** - * \brief Tests whether this URI has a scheme component. - * \return \c true if the URI has a scheme, \c false otherwise. - */ - bool has_scheme() const noexcept; - - /** - * \brief Returns the URI scheme. - * \return The scheme. - * \pre has_scheme() - */ - string_view scheme() const noexcept; - - /** - * \brief Tests whether this URI has a user info component. - * \return \c true if the URI has a user info, \c false otherwise. - */ - bool has_user_info() const noexcept; - - /** - * \brief Returns the URI user info. - * \return The user info. - * \pre has_user_info() - */ - string_view user_info() const noexcept; - - /** - * \brief Tests whether this URI has a host component. - * \return \c true if the URI has a host, \c false otherwise. - */ - bool has_host() const noexcept; - - /** - * \brief Returns the URI host. - * \return The host. - * \pre has_host() - */ - string_view host() const noexcept; - - /** - * \brief Tests whether this URI has a port component. - * \return \c true if the URI has a port, \c false otherwise. - */ - bool has_port() const noexcept; - - /** - * \brief Returns the URI port. - * \return The port. - * \pre has_port() - */ - string_view port() const noexcept; - - /** - * \brief Returns the URI port as an integer. - * \return The port number. - * \pre has_port() - */ - template - intT port(typename std::is_integral::type * = 0) const { - assert(has_port()); - auto p = port(); - const char *port_first = std::addressof(*p.begin()); - char *port_last = 0; - return static_cast(std::strtoul(port_first, &port_last, 10)); - } - - /** - * \brief Tests whether this URI has a path component. - * \return \c true if the URI has a path, \c false otherwise. - */ - bool has_path() const noexcept; - - /** - * \brief Returns the URI path. - * \return The path. - * \pre has_path() - */ - string_view path() const noexcept; - - /** - * \brief Tests whether this URI has a query component. - * \return \c true if the URI has a query, \c false otherwise. - */ - bool has_query() const noexcept; - - /** - * \brief Returns the URI query. - * \return The query. - * \pre has_query() - */ - string_view query() const noexcept; - - /** - * \brief Returns an iterator to the first key-value pair in the query - * component. - * - * \return query_iterator. - */ - query_iterator query_begin() const noexcept; - - /** - * \brief Returns an iterator to the last key-value pair in the query - * component. - * - * \return query_iterator. - */ - query_iterator query_end() const noexcept; - - /** - * \brief Tests whether this URI has a fragment component. - * \return \c true if the URI has a fragment, \c false otherwise. - */ - bool has_fragment() const noexcept; - - /** - * \brief Returns the URI fragment. - * \return The fragment. - * \pre has_fragment() - */ - string_view fragment() const noexcept; - - /** - * \brief Tests whether this URI has a valid authority. - * \return \c true if the URI has an authority, \c false otherwise. - */ - bool has_authority() const noexcept; - - /** - * \brief Returns the URI authority. - * \return The authority. - */ - string_view authority() const noexcept; - - /** - * \brief Returns the URI as a std::basic_string object. - * \return A URI string. - */ - template , - class Allocator = std::allocator > - std::basic_string to_string( - const Allocator &alloc = Allocator()) const { - return std::basic_string(begin(), end()); - } - - /** - * \brief Returns the URI as a std::string object. - * \returns A URI string. - */ - std::string string() const; - - /** - * \brief Returns the URI as a std::wstring object. - * \returns A URI string. - */ - std::wstring wstring() const; - - /** - * \brief Returns the URI as a std::u16string object. - * \returns A URI string. - */ - std::u16string u16string() const; - - /** - * \brief Returns the URI as a std::u32string object. - * \returns A URI string. - */ - std::u32string u32string() const; - - /** - * \brief Returns the URI as a string_view object. - * \returns A URI string view. - */ - string_view view() const noexcept; - - /** - * \brief Checks if the uri object is empty, i.e. it has no parts. - * \returns \c true if there are no parts, \c false otherwise. - */ - bool empty() const noexcept; - - /** - * \brief Checks if the uri is absolute, i.e. it has a scheme. - * \returns \c true if it is absolute, \c false if it is relative. - */ - bool is_absolute() const noexcept; - - /** - * \brief Checks if the uri is opaque, i.e. if it doesn't have an - * authority. - * \returns \c true if it is opaque, \c false if it is hierarchical. - */ - bool is_opaque() const noexcept; - - /** - * \brief Normalizes a uri object at a given level in the - * comparison ladder. - * \param level The comparison level. - * \returns A normalized uri. - * \post compare(normalize(uri, level), level) == 0 - * \throws std::bad_alloc - */ - uri normalize(uri_comparison_level level) const; - - /** - * \brief Returns a relative reference against the base URI. - * \param base The base URI. - * \returns A relative reference of this URI against the base. - * \throws std::bad_alloc - */ - uri make_relative(const uri &base) const; - - /** - * \brief Resolves a relative reference against the given URI. - * \param base The base URI to resolve against. - * \returns An absolute URI. - * \throws std::bad_alloc - */ - uri resolve(const uri &base) const; - - /** - * \brief Compares this URI against another, corresponding to the - * level in the comparison ladder. - * \param other The other URI. - * \param level The level in the comparison ladder. - * \returns \c 0 if the URIs are considered equal, \c -1 if this is - * less than other and and 1 if this is greater than - * other. - */ - int compare(const uri &other, uri_comparison_level level) const noexcept; - - /** - * \brief Encodes a sequence according to the rules for encoding a - * user info part. - * \param first The iterator at first element in the input - * sequence. - * \param last The iterator at end + 1th element in the input - * sequence. - * \param out The iterator at the first element in the output - * sequence. - * \returns The iterator at the end + 1th in the output sequence. - */ - template - static OutputIter encode_user_info(InputIter first, InputIter last, - OutputIter out) { - return detail::encode_user_info(first, last, out); - } - - /** - * \brief Encodes a sequence according to the rules for encoding a - * host part. - * \param first The iterator at first element in the input - * sequence. - * \param last The iterator at end + 1th element in the input - * sequence. - * \param out The iterator at the first element in the output - * sequence. - * \returns The iterator at the end + 1th in the output sequence. - */ - template - static OutputIter encode_host(InputIter first, InputIter last, - OutputIter out) { - return detail::encode_host(first, last, out); - } - - /** - * \brief Encodes a sequence according to the rules for encoding a - * port part. - * \param first The iterator at first element in the input - * sequence. - * \param last The iterator at end + 1th element in the input - * sequence. - * \param out The iterator at the first element in the output - * sequence. - * \returns The iterator at the end + 1th in the output sequence. - */ - template - static OutputIter encode_port(InputIter first, InputIter last, - OutputIter out) { - return detail::encode_port(first, last, out); - } - - /** - * \brief Encodes a sequence according to the rules for encoding a - * path part. - * \param first The iterator at first element in the input - * sequence. - * \param last The iterator at end + 1th element in the input - * sequence. - * \param out The iterator at the first element in the output - * sequence. - * \returns The iterator at the end + 1th in the output sequence. - */ - template - static OutputIter encode_path(InputIter first, InputIter last, - OutputIter out) { - return detail::encode_path(first, last, out); - } - - /** - * \deprecated Avoid using this function - * \brief Equivalent to \c encode_query_component - * \param first The iterator at first element in the input - * sequence. - * \param last The iterator at end + 1th element in the input - * sequence. - * \param out The iterator at the first element in the output - * sequence. - * \returns The iterator at the end + 1th in the output sequence. - * \sa encode_query_commponent - * \sa encode_query_key_value_pair - */ - template - static OutputIter encode_query(InputIter first, InputIter last, - OutputIter out) { - return encode_query_component(first, last, out); - } - - /** - * \brief Encodes a sequence according to the rules for encoding a - * query component, including the '=' character. - * \param first The iterator at first element in the input - * sequence. - * \param last The iterator at end + 1th element in the input - * sequence. - * \param out The iterator at the first element in the output - * sequence. - * \returns The iterator at the end + 1th in the output sequence. - */ - template - static OutputIter encode_query_component( - InputIter first, InputIter last, OutputIter out) { - return detail::encode_query_component(first, last, out); - } - - /** - * \brief Encodes a sequence according to the rules for encoding a - * query key value pair. - * \param key_first The iterator at first element in the input - * sequence. - * \param key_last The iterator at end + 1th element in the input - * sequence. - * \param out The iterator at the first element in the output - * sequence. - * \returns The iterator at the end + 1th in the output sequence. - */ - template - static OutputIter encode_query_key_value_pair( - InputIter key_first, InputIter key_last, - InputIter value_first, InputIter value_last, - OutputIter out) { - out = detail::encode_query_component(key_first, key_last, out); - out++ = '='; - return detail::encode_query_component(value_first, value_last, out); - } - - /** - * \brief Encodes a sequence according to the rules for encoding a - * fragment part. - * \param first The iterator at first element in the input - * sequence. - * \param last The iterator at end + 1th element in the input - * sequence. - * \param out The iterator at the first element in the output - * sequence. - * \returns The iterator at the end + 1th in the output sequence. - */ - template - static OutputIter encode_fragment(InputIter first, InputIter last, - OutputIter out) { - return detail::encode_fragment(first, last, out); - } - - /** - * \brief Decodes a sequence according to the percent decoding - * rules. - * \param first The iterator at first element in the input - * sequence. - * \param last The iterator at end + 1th element in the input - * sequence. - * \param out The iterator at the first element in the output - * sequence. - * \returns The iterator at the end + 1th in the output sequence. - */ - template - static OutputIter decode(InputIter first, InputIter last, OutputIter out) { - return detail::decode(first, last, out); - } - - private: - bool initialize(const string_type &uri); - - void initialize(optional scheme, optional user_info, - optional host, optional port, - optional path, optional query, - optional fragment); - - string_type uri_; - string_view uri_view_; - detail::uri_parts uri_parts_; -}; - - -/** - * \brief \c uri factory function. - * \param first The first element in a string sequence. - * \param last The end + 1th element in a string sequence. - * \param ec Error code set if the sequence is not a valid URI. - */ -template -inline uri make_uri(InputIter first, InputIter last, std::error_code &ec) { - return uri(first, last, ec); -} - -/** - * \brief \c uri factory function. - * \param source A source string that is to be parsed as a URI. - * \param ec Error code set if the source is not a valid URI. - */ -template -inline uri make_uri(const Source &source, std::error_code &ec) { - return uri(source, ec); -} - -/** - * \brief Swaps one uri object with another. - */ -void swap(uri &lhs, uri &rhs) noexcept; - -/** -* \brief Equality operator for the \c uri. -*/ -bool operator==(const uri &lhs, const uri &rhs) noexcept; - -/** - * \brief Equality operator for the \c uri. - */ -bool operator==(const uri &lhs, const char *rhs) noexcept; - -/** - * \brief Equality operator for the \c uri. - */ -inline bool operator==(const char *lhs, const uri &rhs) noexcept { - return rhs == lhs; -} - -/** - * \brief Inequality operator for the \c uri. - */ -inline bool operator!=(const uri &lhs, const uri &rhs) noexcept { - return !(lhs == rhs); -} - -/** - * \brief Less-than operator for the \c uri. - */ -bool operator<(const uri &lhs, const uri &rhs) noexcept; - -/** - * \brief Greater-than operator for the \c uri. - */ -inline bool operator>(const uri &lhs, const uri &rhs) noexcept { - return rhs < lhs; -} - -/** - * \brief Less-than-or-equal-to operator for the \c uri. - */ -inline bool operator<=(const uri &lhs, const uri &rhs) noexcept { - return !(rhs < lhs); -} - -/** - * \brief Greater-than-or-equal-to operator for the \c uri. - */ -inline bool operator>=(const uri &lhs, const uri &rhs) noexcept { - return !(lhs < rhs); -} -} // namespace network - -#if !defined(DOXYGEN_SHOULD_SKIP_THIS) -namespace std { -template <> -struct is_error_code_enum : public true_type {}; -} // namespace std - -namespace std { -template <> -struct hash { - std::size_t operator()(const network::uri &uri_) const { - std::size_t seed = 0; - std::for_each(std::begin(uri_), std::end(uri_), - [&seed](network::uri::value_type v) { - std::hash hasher; - seed ^= hasher(v) + 0x9e3779b9 + (seed << 6) + (seed >> 2); - }); - return seed; - } -}; -} // namespace std -#endif // !defined(DOXYGEN_SHOULD_SKIP_THIS) - -#ifdef NETWORK_URI_MSVC -#pragma warning(pop) -#endif - -#include - -#endif // NETWORK_URI_INC diff --git a/graphics/asymptote/LspCpp/network/uri/uri_builder.cpp b/graphics/asymptote/LspCpp/network/uri/uri_builder.cpp deleted file mode 100644 index c8d767ab47..0000000000 --- a/graphics/asymptote/LspCpp/network/uri/uri_builder.cpp +++ /dev/null @@ -1,152 +0,0 @@ -// Copyright (c) Glyn Matthews 2012-2016. -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -#include -#include "network/uri/uri_builder.hpp" -#include "detail/uri_normalize.hpp" -#include "detail/uri_parse_authority.hpp" -#include "detail/algorithm.hpp" - -namespace network { -uri_builder::uri_builder(const network::uri &base_uri) { - if (base_uri.has_scheme()) { - scheme_ = base_uri.scheme().to_string(); - } - - if (base_uri.has_user_info()) { - user_info_ = base_uri.user_info().to_string(); - } - - if (base_uri.has_host()) { - host_ = base_uri.host().to_string(); - } - - if (base_uri.has_port()) { - port_ = base_uri.port().to_string(); - } - - if (base_uri.has_path()) { - path_ = base_uri.path().to_string(); - } - - if (base_uri.has_query()) { - query_ = base_uri.query().to_string(); - } - - if (base_uri.has_fragment()) { - fragment_ = base_uri.fragment().to_string(); - } -} - -uri_builder::~uri_builder() noexcept {} - -network::uri uri_builder::uri() const { return network::uri(*this); } - -void uri_builder::set_scheme(string_type &&scheme) { - // validate scheme is valid and normalize - scheme_ = scheme; - detail::transform(*scheme_, std::begin(*scheme_), - [] (char ch) { return std::tolower(ch, std::locale()); }); -} - -void uri_builder::set_user_info(string_type &&user_info) { - user_info_ = string_type(); - network::uri::encode_user_info(std::begin(user_info), std::end(user_info), - std::back_inserter(*user_info_)); -} - -uri_builder &uri_builder::clear_user_info() { - user_info_ = network::nullopt; - return *this; -} - -void uri_builder::set_host(string_type &&host) { - host_ = string_type(); - network::uri::encode_host(std::begin(host), std::end(host), - std::back_inserter(*host_)); - detail::transform(*host_, std::begin(*host_), - [](char ch) { return std::tolower(ch, std::locale()); }); -} - -void uri_builder::set_port(string_type &&port) { - port_ = string_type(); - network::uri::encode_port(std::begin(port), std::end(port), - std::back_inserter(*port_)); -} - -uri_builder &uri_builder::clear_port() { - port_ = network::nullopt; - return *this; -} - -void uri_builder::set_authority(string_type &&authority) { - optional user_info, host, port; - uri::string_view view(authority); - uri::const_iterator it = std::begin(view), last = std::end(view); - detail::parse_authority(it, last, user_info, host, port); - - if (user_info) { - set_user_info(user_info->to_string()); - } - - if (host) { - set_host(host->to_string()); - } - - if (port) { - set_port(port->to_string()); - } -} - -void uri_builder::set_path(string_type &&path) { - path_ = string_type(); - network::uri::encode_path(std::begin(path), std::end(path), - std::back_inserter(*path_)); -} - -uri_builder &uri_builder::clear_path() { - path_ = network::nullopt; - return *this; -} - -void uri_builder::append_query_component(string_type &&name) { - if (!query_) { - query_ = string_type(); - } - else { - query_->append("&"); - } - network::uri::encode_query_component( - std::begin(name), std::end(name), std::back_inserter(*query_)); -} - -void uri_builder::append_query_key_value_pair(string_type &&key, string_type &&value) { - if (!query_) { - query_ = string_type(); - } else { - query_->push_back('&'); - } - network::uri::encode_query_key_value_pair( - std::begin(key), std::end(key), - std::begin(value), std::end(value), - std::back_inserter(*query_)); -} - -uri_builder &uri_builder::clear_query() { - query_ = network::nullopt; - return *this; -} - -void uri_builder::set_fragment(string_type &&fragment) { - fragment_ = string_type(); - network::uri::encode_fragment(std::begin(fragment), std::end(fragment), - std::back_inserter(*fragment_)); -} - -uri_builder &uri_builder::clear_fragment() { - fragment_ = network::nullopt; - return *this; -} -} // namespace network diff --git a/graphics/asymptote/LspCpp/network/uri/uri_builder.hpp b/graphics/asymptote/LspCpp/network/uri/uri_builder.hpp deleted file mode 100644 index 6c6d487b7d..0000000000 --- a/graphics/asymptote/LspCpp/network/uri/uri_builder.hpp +++ /dev/null @@ -1,277 +0,0 @@ -// Copyright (c) Glyn Matthews 2012-2016. -// Copyright 2012 Dean Michael Berris -// Copyright 2012 Google, Inc. -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -/** - * \file - * \brief Contains the definition of the uri_builder. - */ - -#ifndef NETWORK_URI_BUILDER_INC -#define NETWORK_URI_BUILDER_INC - -#include -#include -#include -#include - -#ifdef NETWORK_URI_MSVC -#pragma warning(push) -#pragma warning(disable : 4251 4231 4660) -#endif - -namespace network { -#if !defined(DOXYGEN_SHOULD_SKIP_THIS) -namespace detail { - -template -struct host_converter { - uri::string_type operator()(const T &host) const { - return detail::translate(host); - } -}; - -template -struct port_converter { - uri::string_type operator()(const T &port) const { - return detail::translate(port); - } -}; - -template -struct port_converter::type>::value>::type> { - uri::string_type operator()(std::uint16_t port) const { - return std::to_string(port); - } -}; - -template -struct path_converter { - uri::string_type operator()(const T &path) const { - return detail::translate(path); - } -}; -} // namespace detail -#endif // !defined(DOXYGEN_SHOULD_SKIP_THIS) - -/** - * \ingroup uri - * \class uri_builder network/uri/uri_builder.hpp network/uri.hpp - * \brief A class that allows complex uri objects to be constructed. - * \sa uri - */ -class uri_builder { -#if !defined(DOXYGEN_SHOULD_SKIP_THIS) - friend class uri; -#endif // !defined(DOXYGEN_SHOULD_SKIP_THIS) - - uri_builder(const uri_builder &) = delete; - uri_builder &operator=(const uri_builder &) = delete; - - public: - /** - * \brief The uri_builder string_type. - */ - using string_type = network::uri::string_type; - - /** - * \brief Constructor. - */ - uri_builder() = default; - - /** - * \brief Constructor. - * \param base A URI that is the base on which a new URI is built. - */ - explicit uri_builder(const uri &base); - - /** - * \brief Destructor. - */ - ~uri_builder() noexcept; - - /** - * \brief Adds a new scheme to the uri_builder. - * \param scheme The scheme. - * \returns \c *this - */ - template - uri_builder &scheme(const Source &scheme) { - set_scheme(detail::translate(scheme)); - return *this; - } - - /** - * \brief Adds a new user info to the uri_builder. - * \param user_info The user info. - * \returns \c *this - */ - template - uri_builder &user_info(const Source &user_info) { - set_user_info(detail::translate(user_info)); - return *this; - } - - /** - * \brief Clears the URI user_info part. - * \returns \c *this - */ - uri_builder &clear_user_info(); - - /** - * \brief Adds a new host to the uri_builder. - * \param host The host. - * \returns \c *this - */ - template - uri_builder &host(const Source &host) { - detail::host_converter convert; - set_host(convert(host)); - return *this; - } - - /** - * \brief Adds a new port to the uri_builder. - * \param port The port. - * \returns \c *this - */ - template - uri_builder &port(const Source &port) { - detail::port_converter convert; - set_port(convert(port)); - return *this; - } - - /** - * \brief Clears the URI port part. - * \returns \c *this - */ - uri_builder &clear_port(); - - /** - * \brief Adds a new authority to the uri_builder. - * \param authority The authority. - * \returns \c *this - */ - template - uri_builder &authority(const Source &authority) { - set_authority(detail::translate(authority)); - return *this; - } - - /** - * \brief Adds a new path to the uri_builder. - * \param path The path. - * \returns \c *this - */ - template - uri_builder &path(const Source &path) { - detail::path_converter convert; - set_path(convert(path)); - return *this; - } - - /** - * \brief Clears the URI path part. - * \returns \c *this - */ - uri_builder &clear_path(); - - /** - * \deprecated Use append_query_component - * \warning This function's behaviour has changed and percent encoding - * of the '=' character is not ignored. - * \brief Adds a new query to the uri_builder. - * \param query The query. - * \returns \c *this - * \sa append_query_parameter - */ - template - uri_builder &append_query(const Source &query) { - return append_query_component(query); - } - - /** - * \brief Appends a new query component to the uri_builder. The - * '=' symbol is percent encoded. - * \param component The query component. - * \returns \c *this - * \sa append_query_key_value_pair - */ - template - uri_builder &append_query_component(const Source &component) { - append_query_component(detail::translate(component)); - return *this; - } - - /** - * \brief Adds a new query key/value pair to the uri_builder. - * \param key The query parameter key. - * \param value The query parameter value. - * \returns \c *this - */ - template - uri_builder &append_query_key_value_pair(const Key &key, const Value &value) { - append_query_key_value_pair(detail::translate(key), - detail::translate(value)); - return *this; - } - - /** - * \brief Clears the URI query part. - * \returns \c *this - */ - uri_builder &clear_query(); - - /** - * \brief Adds a new fragment to the uri_builder. - * \param fragment The fragment. - * \returns \c *this - */ - template - uri_builder &fragment(const Source &fragment) { - set_fragment(detail::translate(fragment)); - return *this; - } - - /** - * \brief Clears the URI fragment part. - * \returns \c *this - */ - uri_builder &clear_fragment(); - - /** - * \brief Builds a new uri object. - * \returns A valid uri object. - * \throws uri_builder_error if the uri_builder is unable to build - * a valid URI. - * \throws std::bad_alloc If the underlying string cannot be - * allocated. - */ - network::uri uri() const; - - private: - void set_scheme(string_type &&scheme); - void set_user_info(string_type &&user_info); - void set_host(string_type &&host); - void set_port(string_type &&port); - void set_authority(string_type &&authority); - void set_path(string_type &&path); - void append_query_component(string_type &&name); - void append_query_key_value_pair(string_type &&key, string_type &&value); - void set_fragment(string_type &&fragment); - - optional scheme_, user_info_, host_, port_, path_, query_, - fragment_; -}; -} // namespace network - -#ifdef NETWORK_URI_MSVC -#pragma warning(pop) -#endif - -#endif // NETWORK_URI_BUILDER_INC diff --git a/graphics/asymptote/LspCpp/network/uri/uri_errors.cpp b/graphics/asymptote/LspCpp/network/uri/uri_errors.cpp deleted file mode 100644 index b718cff586..0000000000 --- a/graphics/asymptote/LspCpp/network/uri/uri_errors.cpp +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright 2013-2016 Glyn Matthews. -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -#include -#include - -namespace network { - - class uri_category_impl : public std::error_category { - - public: - - uri_category_impl() = default; - - virtual ~uri_category_impl() noexcept; - - virtual const char *name() const noexcept; - - virtual std::string message(int ev) const; - - }; - - uri_category_impl::~uri_category_impl() noexcept {} - - const char *uri_category_impl::name() const noexcept { - static const char name[] = "uri_error"; - return name; - } - - std::string uri_category_impl::message(int ev) const { - switch (uri_error(ev)) { - case uri_error::invalid_syntax: - return "Unable to parse URI string."; - case uri_error::not_enough_input: - return "Percent decoding: Not enough input."; - case uri_error::non_hex_input: - return "Percent decoding: Non-hex input."; - case uri_error::conversion_failed: - return "Percent decoding: Conversion failed."; - default: - break; - } - return "Unknown URI error."; - } - - const std::error_category &uri_category() { - static uri_category_impl uri_category; - return uri_category; - } - - std::error_code make_error_code(uri_error e) { - return std::error_code(static_cast(e), uri_category()); - } - - uri_syntax_error::uri_syntax_error() - : std::system_error(make_error_code(uri_error::invalid_syntax)) {} - - uri_syntax_error::~uri_syntax_error() noexcept {} - - uri_builder_error::uri_builder_error() - : std::system_error(make_error_code(uri_error::invalid_uri)) {} - - uri_builder_error::~uri_builder_error() noexcept {} - - percent_decoding_error::percent_decoding_error(uri_error error) - : std::system_error(make_error_code(error)) {} - - percent_decoding_error::~percent_decoding_error() noexcept {} - -} // namespace network diff --git a/graphics/asymptote/LspCpp/network/uri/uri_errors.hpp b/graphics/asymptote/LspCpp/network/uri/uri_errors.hpp deleted file mode 100644 index a192533dfd..0000000000 --- a/graphics/asymptote/LspCpp/network/uri/uri_errors.hpp +++ /dev/null @@ -1,122 +0,0 @@ -// Copyright 2013-2016 Glyn Matthews. -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -#ifndef NETWORK_URI_ERRORS_INC -#define NETWORK_URI_ERRORS_INC - -/** - * \file - * \brief Contains functions and exceptions for URI error handling. - */ - -#include -#include - -#ifdef NETWORK_URI_MSVC -# pragma warning(push) -# pragma warning(disable : 4251 4231 4660) - // Disable C4275 too because it's "essentially noise and can be silenced" - // according to Stephen T. Lavavej at Microsoft. See: - // https://connect.microsoft.com/VisualStudio/feedback/details/696593/vc-10-vs-2010-basic-string-exports. -# pragma warning(disable : 4275) -#endif - -namespace network { - -#if !defined(DOXYGEN_SHOULD_SKIP_THIS) - enum class uri_error { - - // parser errors - invalid_syntax = 1, - - // builder errors - invalid_uri, - invalid_scheme, - invalid_user_info, - invalid_host, - invalid_port, - invalid_path, - invalid_query, - invalid_fragment, - - // encoding errors - not_enough_input, - non_hex_input, - conversion_failed, - }; - - const std::error_category &uri_category(); - - std::error_code make_error_code(uri_error e); -#endif // !defined(DOXYGEN_SHOULD_SKIP_THIS) - - /** - * \class uri_syntax_error uri.hpp network/uri.hpp - * \brief An exception thrown by the \c uri constructor when a URI - * cannot be parsed. - */ - class uri_syntax_error : public std::system_error { - - public: - - /** - * \brief Constructor. - */ - uri_syntax_error(); - - /** - * \brief Destructor. - */ - virtual ~uri_syntax_error() noexcept; - - }; - - /** - * \class uri_builder_error uri.hpp network/uri.hpp - * \brief An exception thrown when the \c uri_builder cannot build a - * valid URI. - */ - class uri_builder_error : public std::system_error { - - public: - - /** - * \brief Constructor. - */ - uri_builder_error(); - - /** - * \brief Destructor. - */ - virtual ~uri_builder_error() noexcept; - - }; - - /** - * \class percent_decoding_error uri.hpp network/uri.hpp - * \brief An exception thrown when during percent decoding. - */ - class percent_decoding_error : public std::system_error { - - public: - - /** - * \brief Constructor. - */ - explicit percent_decoding_error(uri_error error); - - /** - * \brief Destructor. - */ - virtual ~percent_decoding_error() noexcept; - - }; -} // namespace network - -#ifdef NETWORK_URI_MSVC -#pragma warning(pop) -#endif - -#endif // NETWORK_URI_ERRORS_INC diff --git a/graphics/asymptote/LspCpp/network/uri/uri_io.hpp b/graphics/asymptote/LspCpp/network/uri/uri_io.hpp deleted file mode 100644 index cb9b243f43..0000000000 --- a/graphics/asymptote/LspCpp/network/uri/uri_io.hpp +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) Glyn Matthews 2011-2016 -// Copyright 2012 Dean Michael Berris -// Copyright 2012 Google, Inc. -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -/** - * \file - * \brief Defines stream overloads for the uri class. - */ - -#ifndef NETWORK_URI_URI_IO_INC -#define NETWORK_URI_URI_IO_INC - -#include -#include -#include - -namespace network { -#if !defined(NETWORK_URI_MSVC) -template > -std::basic_ostream &operator<<( - std::basic_ostream &os, const uri &uri_) { - return os << uri_.to_string(); -} - -template > -std::basic_istream &operator>>( - std::basic_istream &is, uri &uri_) { - std::basic_string uri_string; - is >> uri_string; - uri_ = uri(uri_string); - return is; -} -#else -inline std::ostream &operator<<(std::ostream &os, const uri &uri_) { - return os << uri_.string(); -} - -inline std::wostream &operator<<(std::wostream &os, const uri &uri_) { - return os << uri_.wstring(); -} - -inline std::istream &operator>>(std::istream &is, uri &uri_) { - std::string uri_string; - is >> uri_string; - uri_ = uri(uri_string); - return is; -} - -inline std::wistream &operator>>(std::wistream &is, uri &uri_) { - std::wstring uri_string; - is >> uri_string; - uri_ = uri(uri_string); - return is; -} -#endif // !defined(NETWORK_URI_MSVC) - -} // namespace network - -#endif // NETWORK_URI_URI_IO_INC diff --git a/graphics/asymptote/LspCpp/packages.config b/graphics/asymptote/LspCpp/packages.config deleted file mode 100644 index f4caf6a09e..0000000000 --- a/graphics/asymptote/LspCpp/packages.config +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - - - - - \ No newline at end of file diff --git a/graphics/asymptote/LspCpp/src/jsonrpc/Context.cpp b/graphics/asymptote/LspCpp/src/jsonrpc/Context.cpp new file mode 100755 index 0000000000..8d4094b41a --- /dev/null +++ b/graphics/asymptote/LspCpp/src/jsonrpc/Context.cpp @@ -0,0 +1,35 @@ +//===--- Context.cpp ---------------------------------------------*- C++-*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +#include "LibLsp/JsonRpc/Context.h" +#include + +namespace lsp { + + +Context Context::empty() { return Context(/*dataPtr=*/nullptr); } + +Context::Context(std::shared_ptr DataPtr) + : dataPtr(std::move(DataPtr)) {} + +Context Context::clone() const { return Context(dataPtr); } + +static Context ¤tContext() { + static thread_local auto c = Context::empty(); + return c; +} + +const Context &Context::current() { return currentContext(); } + +Context Context::swapCurrent(Context Replacement) { + std::swap(Replacement, currentContext()); + return Replacement; +} + + +} // lsp clang diff --git a/graphics/asymptote/LspCpp/src/jsonrpc/Endpoint.cpp b/graphics/asymptote/LspCpp/src/jsonrpc/Endpoint.cpp new file mode 100755 index 0000000000..3c7c275d6d --- /dev/null +++ b/graphics/asymptote/LspCpp/src/jsonrpc/Endpoint.cpp @@ -0,0 +1,46 @@ +#include "LibLsp/JsonRpc/Endpoint.h" +#include "LibLsp/JsonRpc/message.h" + + +bool GenericEndpoint::notify(std::unique_ptr msg) +{ + auto findIt = method2notification.find(msg->GetMethodType()); + + if (findIt != method2notification.end()) + { + return findIt->second(std::move(msg)); + } + std::string info = "can't find method2notification for notification:\n" + msg->ToJson() + "\n"; + log.log(lsp::Log::Level::SEVERE, info); + return false; +} + +bool GenericEndpoint::onResponse(const std::string& method, std::unique_ptrmsg) +{ + auto findIt = method2response.find(method); + + if (findIt != method2response.end()) + { + return findIt->second(std::move(msg)); + } + + std::string info = "can't find method2response for response:\n" + msg->ToJson() + "\n"; + log.log(lsp::Log::Level::SEVERE, info); + + return false; +} + + + +bool GenericEndpoint::onRequest(std::unique_ptr request) +{ + auto findIt = method2request.find(request->GetMethodType()); + + if (findIt != method2request.end()) + { + return findIt->second(std::move(request)); + } + std::string info = "can't find method2request for request:\n" + request->ToJson() + "\n"; + log.log(lsp::Log::Level::SEVERE, info); + return false; +} diff --git a/graphics/asymptote/LspCpp/src/jsonrpc/GCThreadContext.cpp b/graphics/asymptote/LspCpp/src/jsonrpc/GCThreadContext.cpp new file mode 100755 index 0000000000..f1420e964b --- /dev/null +++ b/graphics/asymptote/LspCpp/src/jsonrpc/GCThreadContext.cpp @@ -0,0 +1,17 @@ +#include "LibLsp/JsonRpc/GCThreadContext.h" +#include + +GCThreadContext::GCThreadContext() +{ +#ifdef USEGC + GC_get_stack_base(&gsb); + GC_register_my_thread(&gsb); +#endif +} + +GCThreadContext::~GCThreadContext() +{ +#ifdef USEGC + GC_unregister_my_thread(); +#endif +} \ No newline at end of file diff --git a/graphics/asymptote/LspCpp/src/jsonrpc/MessageJsonHandler.cpp b/graphics/asymptote/LspCpp/src/jsonrpc/MessageJsonHandler.cpp new file mode 100755 index 0000000000..4f79312a0c --- /dev/null +++ b/graphics/asymptote/LspCpp/src/jsonrpc/MessageJsonHandler.cpp @@ -0,0 +1,57 @@ +#include "LibLsp/JsonRpc/MessageJsonHandler.h" +#include +#include + + + +std::unique_ptr MessageJsonHandler::parseResponseMessage(const std::string& method, Reader& r) +{ + auto findIt = method2response.find(method); + + if( findIt != method2response.end()) + { + return findIt->second(r); + } + return nullptr; +} + +std::unique_ptr MessageJsonHandler::parseRequstMessage(const std::string& method, Reader&r) +{ + auto findIt = method2request.find(method); + + if (findIt != method2request.end()) + { + return findIt->second(r); + } + return nullptr; +} + +bool MessageJsonHandler::resovleResponseMessage(Reader&r, std::pair>& result) +{ + for (auto& handler : method2response) + { + try + { + auto msg = handler.second(r); + result.first = handler.first; + result.second = std::move(msg); + return true; + } + catch (...) + { + + } + } + return false; +} + +std::unique_ptr MessageJsonHandler::parseNotificationMessage(const std::string& method, Reader& r) +{ + auto findIt = method2notification.find(method); + + if (findIt != method2notification.end()) + { + return findIt->second(r); + } + return nullptr; +} diff --git a/graphics/asymptote/LspCpp/src/jsonrpc/RemoteEndPoint.cpp b/graphics/asymptote/LspCpp/src/jsonrpc/RemoteEndPoint.cpp new file mode 100755 index 0000000000..29ff69b2e2 --- /dev/null +++ b/graphics/asymptote/LspCpp/src/jsonrpc/RemoteEndPoint.cpp @@ -0,0 +1,612 @@ +#include "LibLsp/JsonRpc/MessageJsonHandler.h" +#include "LibLsp/JsonRpc/Endpoint.h" +#include "LibLsp/JsonRpc/message.h" +#include "LibLsp/JsonRpc/RemoteEndPoint.h" +#include +#include "LibLsp/JsonRpc/Cancellation.h" +#include "LibLsp/JsonRpc/StreamMessageProducer.h" +#include "LibLsp/JsonRpc/NotificationInMessage.h" +#include "LibLsp/JsonRpc/lsResponseMessage.h" +#include "LibLsp/JsonRpc/Condition.h" +#include "LibLsp/JsonRpc/Context.h" +#include "rapidjson/error/en.h" +#include "LibLsp/JsonRpc/json.h" +#include "LibLsp/JsonRpc/GCThreadContext.h" +#include "LibLsp/JsonRpc/ScopeExit.h" +#include "LibLsp/JsonRpc/stream.h" + +#define BOOST_BIND_GLOBAL_PLACEHOLDERS +#include "boost/threadpool.hpp" +#include +namespace lsp { + +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +//===----------------------------------------------------------------------===// + +// Cancellation mechanism for long-running tasks. +// +// This manages interactions between: +// +// 1. Client code that starts some long-running work, and maybe cancels later. +// +// std::pair Task = cancelableTask(); +// { +// WithContext Cancelable(std::move(Task.first)); +// Expected +// deepThoughtAsync([](int answer){ errs() << answer; }); +// } +// // ...some time later... +// if (User.fellAsleep()) +// Task.second(); +// +// (This example has an asynchronous computation, but synchronous examples +// work similarly - the Canceler should be invoked from another thread). +// +// 2. Library code that executes long-running work, and can exit early if the +// result is not needed. +// +// void deepThoughtAsync(std::function Callback) { +// runAsync([Callback]{ +// int A = ponder(6); +// if (getCancelledMonitor()) +// return; +// int B = ponder(9); +// if (getCancelledMonitor()) +// return; +// Callback(A * B); +// }); +// } +// +// (A real example may invoke the callback with an error on cancellation, +// the CancelledError is provided for this purpose). +// +// Cancellation has some caveats: +// - the work will only stop when/if the library code next checks for it. +// Code outside clangd such as Sema will not do this. +// - it's inherently racy: client code must be prepared to accept results +// even after requesting cancellation. +// - it's Context-based, so async work must be dispatched to threads in +// ways that preserve the context. (Like runAsync() or TUScheduler). +// + + /// A canceller requests cancellation of a task, when called. + /// Calling it again has no effect. + using Canceler = std::function; + + // We don't want a cancelable scope to "shadow" an enclosing one. + struct CancelState { + std::shared_ptr> cancelled; + const CancelState* parent = nullptr; + lsRequestId id; + }; + static Key g_stateKey; + + /// Defines a new task whose cancellation may be requested. + /// The returned Context defines the scope of the task. + /// When the context is active, getCancelledMonitor() is 0 until the Canceler is + /// invoked, and equal to Reason afterwards. + /// Conventionally, Reason may be the LSP error code to return. + std::pair cancelableTask(const lsRequestId& id,int reason = 1){ + assert(reason != 0 && "Can't detect cancellation if Reason is zero"); + CancelState state; + state.id = id; + state.cancelled = std::make_shared>(); + state.parent = Context::current().get(g_stateKey); + return { + Context::current().derive(g_stateKey, state), + [reason, cancelled(state.cancelled)] { *cancelled = reason; }, + }; + } + /// If the current context is within a cancelled task, returns the reason. +/// (If the context is within multiple nested tasks, true if any are cancelled). +/// Always zero if there is no active cancelable task. +/// This isn't free (context lookup) - don't call it in a tight loop. + boost::optional getCancelledMonitor(const lsRequestId& id, const Context& ctx = Context::current()){ + for (const CancelState* state = ctx.get(g_stateKey); state != nullptr; + state = state->parent) + { + if (id != state->id)continue; + const std::shared_ptr > cancelled = state->cancelled; + std::function temp = [=]{ + return cancelled->load(); + }; + return std::move(temp); + } + + return {}; + } +} // namespace lsp + +using namespace lsp; +class PendingRequestInfo +{ + using RequestCallBack = std::function< bool(std::unique_ptr) >; +public: + PendingRequestInfo(const std::string& md, + const RequestCallBack& callback); + PendingRequestInfo(const std::string& md); + PendingRequestInfo() {} + std::string method; + RequestCallBack futureInfo; +}; + +PendingRequestInfo::PendingRequestInfo(const std::string& _md, + const RequestCallBack& callback) : method(_md), + futureInfo(callback) +{ +} + +PendingRequestInfo::PendingRequestInfo(const std::string& md) : method(md) +{ +} +struct RemoteEndPoint::Data +{ + explicit Data(lsp::Log& _log , RemoteEndPoint* owner) + : m_id(0), next_request_cookie(0), message_producer(new StreamMessageProducer(*owner)), log(_log) + { + + } + ~Data() + { + delete message_producer; + } + std::atomic m_id; + boost::threadpool::pool tp; + // Method calls may be cancelled by ID, so keep track of their state. + // This needs a mutex: handlers may finish on a different thread, and that's + // when we clean up entries in the map. + mutable std::mutex request_cancelers_mutex; + + std::map< lsRequestId, std::pair > requestCancelers; + + std::atomic next_request_cookie; // To disambiguate reused IDs, see below. + void onCancel(Notify_Cancellation::notify* notify) { + std::lock_guard Lock(request_cancelers_mutex); + const auto it = requestCancelers.find(notify->params.id); + if (it != requestCancelers.end()) + it->second.first(); // Invoke the canceler. + } + + // We run cancelable requests in a context that does two things: + // - allows cancellation using requestCancelers[ID] + // - cleans up the entry in requestCancelers when it's no longer needed + // If a client reuses an ID, the last wins and the first cannot be canceled. + Context cancelableRequestContext(lsRequestId id) { + auto task = cancelableTask(id, + /*Reason=*/static_cast(lsErrorCodes::RequestCancelled)); + unsigned cookie; + { + std::lock_guard Lock(request_cancelers_mutex); + cookie = next_request_cookie.fetch_add(1, std::memory_order_relaxed); + requestCancelers[id] = { std::move(task.second), cookie }; + } + // When the request ends, we can clean up the entry we just added. + // The cookie lets us check that it hasn't been overwritten due to ID + // reuse. + return task.first.derive(lsp::make_scope_exit([this, id, cookie] { + std::lock_guard lock(request_cancelers_mutex); + const auto& it = requestCancelers.find(id); + if (it != requestCancelers.end() && it->second.second == cookie) + requestCancelers.erase(it); + })); + } + + std::map > _client_request_futures; + StreamMessageProducer* message_producer; + std::atomic quit{}; + lsp::Log& log; + std::shared_ptr input; + std::shared_ptr output; + + void pendingRequest(RequestInMessage& info, GenericResponseHandler&& handler) + { + auto id = m_id.fetch_add(1, std::memory_order_relaxed); + info.id.set(id); + std::lock_guard lock(m_requsetInfo); + _client_request_futures[info.id] = std::make_shared(info.method, handler); + + } + const std::shared_ptr getRequestInfo(const lsRequestId& _id) + { + std::lock_guard lock(m_requsetInfo); + auto findIt = _client_request_futures.find(_id); + if (findIt != _client_request_futures.end()) + { + return findIt->second; + } + return nullptr; + } + + std::mutex m_requsetInfo; + void removeRequestInfo(const lsRequestId& _id) + { + std::lock_guard lock(m_requsetInfo); + auto findIt = _client_request_futures.find(_id); + if (findIt != _client_request_futures.end()) + { + _client_request_futures.erase(findIt); + } + } + void clear() + { + { + std::lock_guard lock(m_requsetInfo); + _client_request_futures.clear(); + + } + tp.clear(); + quit.store(true, std::memory_order_relaxed); + } +}; + +namespace +{ +void WriterMsg(std::shared_ptr& output, LspMessage& msg) +{ + const auto& s = msg.ToJson(); + const auto value = + std::string("Content-Length: ") + std::to_string(s.size()) + "\r\n\r\n" + s; + output->write(value); + output->flush(); +} + +bool isResponseMessage(JsonReader& visitor) +{ + + if (!visitor.HasMember("id")) + { + return false; + } + + if (!visitor.HasMember("result") && !visitor.HasMember("error")) + { + return false; + } + + return true; +} + +bool isRequestMessage(JsonReader& visitor) +{ + if (!visitor.HasMember("method")) + { + return false; + } + if (!visitor["method"]->IsString()) + { + return false; + } + if (!visitor.HasMember("id")) + { + return false; + } + return true; +} +bool isNotificationMessage(JsonReader& visitor) +{ + if (!visitor.HasMember("method")) + { + return false; + } + if (!visitor["method"]->IsString()) + { + return false; + } + if (visitor.HasMember("id")) + { + return false; + } + return true; +} +} + +CancelMonitor RemoteEndPoint::getCancelMonitor(const lsRequestId& id) +{ + auto monitor = getCancelledMonitor(id); + if(monitor.has_value()) + { + return monitor.value(); + } + return [] { + return 0; + }; + +} + +RemoteEndPoint::RemoteEndPoint( + const std::shared_ptr < MessageJsonHandler >& json_handler,const std::shared_ptr < Endpoint>& localEndPoint, lsp::Log& _log, uint8_t max_workers): + d_ptr(new Data(_log,this)),jsonHandler(json_handler), local_endpoint(localEndPoint) +{ + jsonHandler->method2notification[Notify_Cancellation::notify::kMethodInfo] = [](Reader& visitor) + { + return Notify_Cancellation::notify::ReflectReader(visitor); + }; + + d_ptr->quit.store(false, std::memory_order_relaxed); + d_ptr->tp.size_controller().resize(max_workers); +} + +RemoteEndPoint::~RemoteEndPoint() +{ + delete d_ptr; + d_ptr->quit.store(true, std::memory_order_relaxed); +} + +bool RemoteEndPoint::dispatch(const std::string& content) +{ + rapidjson::Document document; + document.Parse(content.c_str(), content.length()); + if (document.HasParseError()) + { + std::string info ="lsp msg format error:"; + rapidjson::GetParseErrorFunc GetParseError = rapidjson::GetParseError_En; // or whatever + info+= GetParseError(document.GetParseError()); + info += "\n"; + info += "ErrorContext offset:\n"; + info += content.substr(document.GetErrorOffset()); + d_ptr->log.log(Log::Level::SEVERE, info); + + return false; + } + + JsonReader visitor{ &document }; + if (!visitor.HasMember("jsonrpc") || + std::string(visitor["jsonrpc"]->GetString()) != "2.0") + { + std::string reason; + reason = "Reason:Bad or missing jsonrpc version\n"; + reason += "content:\n" + content; + d_ptr->log.log(Log::Level::SEVERE, reason); + return false; + + } + LspMessage::Kind _kind = LspMessage::NOTIFICATION_MESSAGE; + try { + if (isRequestMessage(visitor)) + { + _kind = LspMessage::REQUEST_MESSAGE; + auto msg = jsonHandler->parseRequstMessage(visitor["method"]->GetString(), visitor); + if (msg) { + mainLoop(std::move(msg)); + } + else { + std::string info = "Unknown support request message when consumer message:\n"; + info += content; + d_ptr->log.log(Log::Level::WARNING, info); + return false; + } + } + else if (isResponseMessage(visitor)) + { + _kind = LspMessage::RESPONCE_MESSAGE; + lsRequestId id; + ReflectMember(visitor, "id", id); + + auto msgInfo = d_ptr->getRequestInfo(id); + if (!msgInfo) + { + std::pair> result; + auto b = jsonHandler->resovleResponseMessage(visitor, result); + if (b) + { + result.second->SetMethodType(result.first.c_str()); + mainLoop(std::move(result.second)); + } + else + { + std::string info = "Unknown response message :\n"; + info += content; + d_ptr->log.log(Log::Level::INFO, info); + } + } + else + { + + auto msg = jsonHandler->parseResponseMessage(msgInfo->method, visitor); + if (msg) { + mainLoop(std::move(msg)); + } + else + { + std::string info = "Unknown response message :\n"; + info += content; + d_ptr->log.log(Log::Level::SEVERE, info); + return false; + } + + } + } + else if (isNotificationMessage(visitor)) + { + auto msg = jsonHandler->parseNotificationMessage(visitor["method"]->GetString(), visitor); + if (!msg) + { + std::string info = "Unknown notification message :\n"; + info += content; + d_ptr->log.log(Log::Level::SEVERE, info); + return false; + } + mainLoop(std::move(msg)); + } + else + { + std::string info = "Unknown lsp message when consumer message:\n"; + info += content; + d_ptr->log.log(Log::Level::WARNING, info); + return false; + } + } + catch (std::exception& e) + { + + std::string info = "Exception when process "; + if(_kind==LspMessage::REQUEST_MESSAGE) + { + info += "request"; + } + if (_kind == LspMessage::RESPONCE_MESSAGE) + { + info += "response"; + } + else + { + info += "notification"; + } + info += " message:\n"; + info += e.what(); + std::string reason = "Reason:" + info + "\n"; + reason += "content:\n" + content; + d_ptr->log.log(Log::Level::SEVERE, reason); + return false; + } + return true; +} + + + +void RemoteEndPoint::internalSendRequest( RequestInMessage& info, GenericResponseHandler handler) +{ + std::lock_guard lock(m_sendMutex); + if (!d_ptr->output || d_ptr->output->bad()) + { + std::string desc = "Output isn't good any more:\n"; + d_ptr->log.log(Log::Level::INFO, desc); + return ; + } + d_ptr->pendingRequest(info, std::move(handler)); + WriterMsg(d_ptr->output, info); +} + + +std::unique_ptr RemoteEndPoint::internalWaitResponse(RequestInMessage& request, unsigned time_out) +{ + auto eventFuture = std::make_shared< Condition< LspMessage > >(); + internalSendRequest(request, [=](std::unique_ptr data) + { + eventFuture->notify(std::move(data)); + return true; + }); + return eventFuture->wait(time_out); +} + +void RemoteEndPoint::mainLoop(std::unique_ptrmsg) +{ + if(d_ptr->quit.load(std::memory_order_relaxed)) + { + return; + } + const auto _kind = msg->GetKid(); + if (_kind == LspMessage::REQUEST_MESSAGE) + { + auto req = static_cast(msg.get()); + // Calls can be canceled by the client. Add cancellation context. + WithContext WithCancel(d_ptr->cancelableRequestContext(req->id)); + local_endpoint->onRequest(std::move(msg)); + } + + else if (_kind == LspMessage::RESPONCE_MESSAGE) + { + auto response = static_cast(msg.get()); + auto msgInfo = d_ptr->getRequestInfo(response->id); + if (!msgInfo) + { + const auto _method_desc = msg->GetMethodType(); + local_endpoint->onResponse(_method_desc, std::move(msg)); + } + else + { + bool needLocal = true; + if (msgInfo->futureInfo) + { + if (msgInfo->futureInfo(std::move(msg))) + { + needLocal = false; + } + } + if (needLocal) + { + local_endpoint->onResponse(msgInfo->method, std::move(msg)); + } + d_ptr->removeRequestInfo(response->id); + } + } + else if (_kind == LspMessage::NOTIFICATION_MESSAGE) + { + if (strcmp(Notify_Cancellation::notify::kMethodInfo, msg->GetMethodType())==0) + { + d_ptr->onCancel(static_cast(msg.get())); + } + else + { + local_endpoint->notify(std::move(msg)); + } + + } + else + { + std::string info = "Unknown lsp message when process message in mainLoop:\n"; + d_ptr->log.log(Log::Level::WARNING, info); + } +} + +void RemoteEndPoint::handle(std::vector&& issue) +{ + for(auto& it : issue) + { + d_ptr->log.log(it.code, it.text); + } +} + +void RemoteEndPoint::handle(MessageIssue&& issue) +{ + d_ptr->log.log(issue.code, issue.text); +} + + +void RemoteEndPoint::startProcessingMessages(std::shared_ptr r, + std::shared_ptr w) +{ + d_ptr->quit.store(false, std::memory_order_relaxed); + d_ptr->input = r; + d_ptr->output = w; + d_ptr->message_producer->bind(r); + message_producer_thread_ = std::make_shared([&]() + { + d_ptr->message_producer->listen([&](std::string&& content){ + const auto temp = std::make_shared(std::move(content)); + d_ptr->tp.schedule([this, temp]{ +#ifdef USEGC + GCThreadContext gcContext; +#endif + + dispatch(*temp); + }); + }); + }); +} + +void RemoteEndPoint::Stop() +{ + if(message_producer_thread_ && message_producer_thread_->joinable()) + { + message_producer_thread_->detach(); + } + d_ptr->clear(); + +} + +void RemoteEndPoint::sendMsg( LspMessage& msg) +{ + + std::lock_guard lock(m_sendMutex); + if (!d_ptr->output || d_ptr->output->bad()) + { + std::string info = "Output isn't good any more:\n"; + d_ptr->log.log(Log::Level::INFO, info); + return; + } + WriterMsg(d_ptr->output, msg); + +} diff --git a/graphics/asymptote/LspCpp/src/jsonrpc/StreamMessageProducer.cpp b/graphics/asymptote/LspCpp/src/jsonrpc/StreamMessageProducer.cpp new file mode 100755 index 0000000000..119e9040bd --- /dev/null +++ b/graphics/asymptote/LspCpp/src/jsonrpc/StreamMessageProducer.cpp @@ -0,0 +1,191 @@ + +#include "LibLsp/JsonRpc/StreamMessageProducer.h" +#include + +#include "LibLsp/JsonRpc/stream.h" + + +bool StartsWith(std::string value, std::string start); +bool StartsWith(std::string value, std::string start) { + if (start.size() > value.size()) + return false; + return std::equal(start.begin(), start.end(), value.begin()); +} + +using namespace std; +namespace +{ + string JSONRPC_VERSION = "2.0"; + string CONTENT_LENGTH_HEADER = "Content-Length"; + string CONTENT_TYPE_HEADER = "Content-Type"; + string JSON_MIME_TYPE = "application/json"; + string CRLF = "\r\n"; + +} + + void StreamMessageProducer::parseHeader(std::string& line, StreamMessageProducer::Headers& headers) + { + int sepIndex = line.find(':'); + if (sepIndex >= 0) { + auto key = line.substr(0, sepIndex); + if(key == CONTENT_LENGTH_HEADER) + { + headers.contentLength = atoi(line.substr(sepIndex + 1).data()); + } + else if(key == CONTENT_TYPE_HEADER) + { + int charsetIndex = line.find("charset="); + if (charsetIndex >= 0) + headers.charset = line.substr(charsetIndex + 8); + } + } + } + + +void StreamMessageProducer::listen(MessageConsumer callBack) +{ + if(!input) + return; + + keepRunning = true; + bool newLine = false; + Headers headers; + string headerBuilder ; + string debugBuilder ; + // Read the content length. It is terminated by the "\r\n" sequence. + while (keepRunning) + { + if(input->bad()) + { + std::string info = "Input stream is bad."; + auto what = input->what(); + if (what.size()) + { + info += "Reason:"; + info += input->what(); + } + MessageIssue issue(info, lsp::Log::Level::SEVERE); + issueHandler.handle(std::move(issue)); + return; + } + if(input->fail()) + { + std::string info = "Input fail."; + auto what = input->what(); + if(what.size()) + { + info += "Reason:"; + info += input->what(); + } + MessageIssue issue(info, lsp::Log::Level::WARNING); + issueHandler.handle(std::move(issue)); + if(input->need_to_clear_the_state()) + input->clear(); + else + { + return; + } + } + int c = input->get(); + if (c == EOF) { + // End of input stream has been reached + keepRunning = false; + } + else + { + + debugBuilder.push_back((char)c); + if (c == '\n') + { + if (newLine) { + // Two consecutive newlines have been read, which signals the start of the message content + if (headers.contentLength <= 0) + { + string info = "Unexpected token:" + debugBuilder; + info = +" (expected Content-Length: sequence);"; + MessageIssue issue(info, lsp::Log::Level::WARNING); + issueHandler.handle(std::move(issue)); + } + else { + bool result = handleMessage(headers,callBack); + if (!result) + keepRunning = false; + newLine = false; + } + headers.clear(); + debugBuilder.clear(); + } + else if (!headerBuilder.empty()) { + // A single newline ends a header line + parseHeader(headerBuilder, headers); + headerBuilder.clear(); + } + newLine = true; + } + else if (c != '\r') { + // Add the input to the current header line + + headerBuilder.push_back((char)c); + newLine = false; + } + } + } + +} + +void StreamMessageProducer::bind(std::shared_ptr_in) +{ + input = _in; +} + +bool StreamMessageProducer::handleMessage(Headers& headers ,MessageConsumer callBack) +{ + // Read content. + auto content_length = headers.contentLength; + std::string content(content_length,0); + auto data = &content[0]; + input->read(data, content_length); + if (input->bad()) + { + std::string info = "Input stream is bad."; + auto what = input->what(); + if (!what.empty()) + { + info += "Reason:"; + info += input->what(); + } + MessageIssue issue(info, lsp::Log::Level::SEVERE); + issueHandler.handle(std::move(issue)); + return false; + } + + if (input->eof()) + { + MessageIssue issue("No more input when reading content body", lsp::Log::Level::INFO); + issueHandler.handle(std::move(issue)); + return false; + } + if (input->fail()) + { + std::string info = "Input fail."; + auto what = input->what(); + if (!what.empty()) + { + info += "Reason:"; + info += input->what(); + } + MessageIssue issue(info, lsp::Log::Level::WARNING); + issueHandler.handle(std::move(issue)); + if (input->need_to_clear_the_state()) + input->clear(); + else + { + return false; + } + } + + callBack(std::move(content)); + + return true; +} + diff --git a/graphics/asymptote/LspCpp/src/jsonrpc/TcpServer.cpp b/graphics/asymptote/LspCpp/src/jsonrpc/TcpServer.cpp new file mode 100755 index 0000000000..37a7a3a3af --- /dev/null +++ b/graphics/asymptote/LspCpp/src/jsonrpc/TcpServer.cpp @@ -0,0 +1,296 @@ +// +// server.cpp + +#include "LibLsp/JsonRpc/TcpServer.h" +#include +#include +#include + +#include "LibLsp/JsonRpc/MessageIssue.h" +#include "LibLsp/JsonRpc/stream.h" + + +namespace lsp { + struct tcp_connect_session; + + + class tcp_stream_wrapper :public istream, public ostream + { + public: + tcp_stream_wrapper(tcp_connect_session& _w); + + tcp_connect_session& session; + std::atomic quit{}; + std::shared_ptr < MultiQueueWaiter> request_waiter; + ThreadedQueue< char > on_request; + std::string error_message; + + + bool fail() override + { + return bad(); + } + + + + bool eof() override + { + return bad(); + } + bool good() override + { + return !bad(); + } + tcp_stream_wrapper& read(char* str, std::streamsize count) + override + { + auto some = on_request.TryDequeueSome(static_cast( count )); + memcpy(str,some.data(),some.size()); + for (std::streamsize i = some.size(); i < count; ++i) + { + str[i] = static_cast(get()); + } + + return *this; + } + int get() override + { + return on_request.Dequeue(); + } + + bool bad() override; + + tcp_stream_wrapper& write(const std::string& c) override; + + tcp_stream_wrapper& write(std::streamsize _s) override; + + tcp_stream_wrapper& flush() override + { + return *this; + } + void reset_state() + { + return; + } + + void clear() override + { + + } + + std::string what() override; + bool need_to_clear_the_state() override + { + return false; + } + }; + struct tcp_connect_session:std::enable_shared_from_this + { + /// Buffer for incoming data. + std::array buffer_; + boost::asio::ip::tcp::socket socket_; + /// Strand to ensure the connection's handlers are not called concurrently. + boost::asio::io_context::strand strand_; + std::shared_ptr proxy_; + explicit tcp_connect_session(boost::asio::io_context& io_context, boost::asio::ip::tcp::socket&& _socket) + : socket_(std::move(_socket)), strand_(io_context), proxy_(new tcp_stream_wrapper(*this)) + { + do_read(); + } + void do_write(const std::string& data) + { + socket_.async_write_some(boost::asio::buffer(data.data(), data.size()), + boost::asio::bind_executor(strand_,[this](boost::system::error_code ec, std::size_t n) + { + if (!ec) + { + return; + } + proxy_->error_message = ec.message(); + + })); + } + void do_read() + { + socket_.async_read_some(boost::asio::buffer(buffer_), + boost::asio::bind_executor(strand_, + [this](boost::system::error_code ec, size_t bytes_transferred) + { + if (!ec) + { + std::vector elements(buffer_.data(), buffer_.data() + bytes_transferred); + proxy_->on_request.EnqueueAll(std::move(elements), false); + do_read(); + return; + } + proxy_->error_message = ec.message(); + + })); + } + }; + + tcp_stream_wrapper::tcp_stream_wrapper(tcp_connect_session& _w): session(_w) + { + } + + bool tcp_stream_wrapper::bad() + { + return !session.socket_.is_open(); + } + + tcp_stream_wrapper& tcp_stream_wrapper::write(const std::string& c) + { + session.do_write(c); + return *this; + } + + tcp_stream_wrapper& tcp_stream_wrapper::write(std::streamsize _s) + { + session.do_write(std::to_string(_s)); + return *this; + } + + std::string tcp_stream_wrapper::what() + { + if (error_message.size()) + return error_message; + + if(! session.socket_.is_open()) + { + return "Socket is not open."; + } + return {}; + } + + struct TcpServer::Data + { + Data( + lsp::Log& log, uint32_t _max_workers) : + acceptor_(io_context_), _log(log) + { + } + + ~Data() + { + + } + /// The io_context used to perform asynchronous operations. + boost::asio::io_context io_context_; + + std::shared_ptr work; + + std::shared_ptr _connect_session; + /// Acceptor used to listen for incoming connections. + boost::asio::ip::tcp::acceptor acceptor_; + + lsp::Log& _log; + + }; + + TcpServer::~TcpServer() + { + delete d_ptr; + } + + TcpServer::TcpServer(const std::string& address, const std::string& port, + std::shared_ptr < MessageJsonHandler> json_handler, + std::shared_ptr < Endpoint> localEndPoint, lsp::Log& log, uint32_t _max_workers) + : point(json_handler, localEndPoint, log, _max_workers),d_ptr(new Data( log, _max_workers)) + + { + + d_ptr->work = std::make_shared(d_ptr->io_context_); + + // Open the acceptor with the option to reuse the address (i.e. SO_REUSEADDR). + boost::asio::ip::tcp::resolver resolver(d_ptr->io_context_); + boost::asio::ip::tcp::endpoint endpoint = + *resolver.resolve(address, port).begin(); + d_ptr->acceptor_.open(endpoint.protocol()); + d_ptr->acceptor_.set_option(boost::asio::ip::tcp::acceptor::reuse_address(true)); + try + { + d_ptr->acceptor_.bind(endpoint); + } + catch (boost::system::system_error & e) + { + std::string temp = "Socket Server bind failed."; + d_ptr->_log.log(lsp::Log::Level::INFO , temp + e.what()); + return; + } + d_ptr->acceptor_.listen(); + + do_accept(); + std::string desc = "Socket TcpServer " + address + " " + port + " start."; + d_ptr->_log.log(lsp::Log::Level::INFO, desc); + } + + void TcpServer::run() + { + // The io_context::run() call will block until all asynchronous operations + // have finished. While the TcpServer is running, there is always at least one + // asynchronous operation outstanding: the asynchronous accept call waiting + // for new incoming connections. + d_ptr->io_context_.run(); + + } + + void TcpServer::stop() + { + try + { + if(d_ptr->work) + d_ptr->work.reset(); + + do_stop(); + } + catch (...) + { + } + } + + void TcpServer::do_accept() + { + d_ptr->acceptor_.async_accept( + [this](boost::system::error_code ec, boost::asio::ip::tcp::socket socket) + { + // Check whether the TcpServer was stopped by a signal before this + // completion handler had a chance to run. + if (!d_ptr->acceptor_.is_open()) + { + return; + } + + if (!ec) + { + if(d_ptr->_connect_session) + { + if(d_ptr->_connect_session->socket_.is_open()) + { + std::string desc = "Disconnect previous client " + d_ptr->_connect_session->socket_.local_endpoint().address().to_string(); + d_ptr->_log.log(lsp::Log::Level::INFO, desc); + d_ptr->_connect_session->socket_.close(); + } + + point.Stop(); + } + auto local_point = socket.local_endpoint(); + + std::string desc = ("New client " + local_point.address().to_string() + " connect."); + d_ptr->_log.log(lsp::Log::Level::INFO, desc); + d_ptr->_connect_session = std::make_shared(d_ptr->io_context_,std::move(socket)); + + point.startProcessingMessages(d_ptr->_connect_session->proxy_, d_ptr->_connect_session->proxy_); + do_accept(); + } + }); + } + + void TcpServer::do_stop() + { + d_ptr->acceptor_.close(); + + point.Stop(); + + } + + } // namespace diff --git a/graphics/asymptote/LspCpp/src/jsonrpc/WebSocketServer.cpp b/graphics/asymptote/LspCpp/src/jsonrpc/WebSocketServer.cpp new file mode 100755 index 0000000000..127cf2a9f4 --- /dev/null +++ b/graphics/asymptote/LspCpp/src/jsonrpc/WebSocketServer.cpp @@ -0,0 +1,337 @@ +#include "LibLsp/JsonRpc/MessageIssue.h" +#include "LibLsp/JsonRpc/WebSocketServer.h" +#include +#include +#include +#include "LibLsp/JsonRpc/stream.h" +#include +#include +#include +namespace beast = boost::beast; // from +namespace http = beast::http; // from +namespace websocket = beast::websocket; // from +namespace net = boost::asio; // from +using tcp = boost::asio::ip::tcp; // from +namespace lsp { + + // Echoes back all received WebSocket messages + class server_session : public std::enable_shared_from_this + { + websocket::stream ws_; + + beast::flat_buffer buffer_; + std::string user_agent_; + public: + std::shared_ptr proxy_; + // Take ownership of the socket + explicit + server_session(tcp::socket&& socket,const std::string& user_agent) + : ws_(std::move(socket)),user_agent_(user_agent) + { + proxy_ = std::make_shared(ws_); + } + + // Get on the correct executor + void + run() + { + // We need to be executing within a strand to perform async operations + // on the I/O objects in this server_session. Although not strictly necessary + // for single-threaded contexts, this example code is written to be + // thread-safe by default. + net::dispatch(ws_.get_executor(), + beast::bind_front_handler( + &server_session::on_run, + shared_from_this())); + } + + // Start the asynchronous operation + void + on_run() + { + // Set suggested timeout settings for the websocket + ws_.set_option( + websocket::stream_base::timeout::suggested( + beast::role_type::server)); + + // Set a decorator to change the Server of the handshake + ws_.set_option(websocket::stream_base::decorator( + [=](websocket::response_type& res) + { + res.set(http::field::server, user_agent_.c_str()); + })); + // Accept the websocket handshake + ws_.async_accept( + beast::bind_front_handler( + &server_session::on_accept, + shared_from_this())); + } + + void + on_accept(beast::error_code ec) + { + if (ec) + return ; + + // Read a message + // Read a message into our buffer + ws_.async_read( + buffer_, + beast::bind_front_handler( + &server_session::on_read, + shared_from_this())); + } + + + + void + on_read( + beast::error_code ec, + std::size_t bytes_transferred) + { + + if(!ec) + { + char* data = reinterpret_cast(buffer_.data().data()); + std::vector elements(data, data + bytes_transferred); + + buffer_.clear(); + proxy_->on_request.EnqueueAll(std::move(elements), false); + + // Read a message into our buffer + ws_.async_read( + buffer_, + beast::bind_front_handler( + &server_session::on_read, + shared_from_this())); + return; + } + if (ec){ + proxy_->error_message = ec.message(); + } + } + + + + void close() + { + if(ws_.is_open()) + { + boost::system::error_code ec; + ws_.close(websocket::close_code::normal, ec); + } + + } + }; + + //------------------------------------------------------------------------------ + + struct WebSocketServer::Data + { + Data(const std::string& user_agent, lsp::Log& log) : + acceptor_(io_context_), user_agent_(user_agent), _log(log) + + { + } + + ~Data() + { + + } + /// The io_context used to perform asynchronous operations. + boost::asio::io_context io_context_; + + std::shared_ptr work; + + /// Acceptor used to listen for incoming connections. + boost::asio::ip::tcp::acceptor acceptor_; + + std::shared_ptr < server_session> _server_session; + + std::string user_agent_; + lsp::Log& _log; + + }; + + websocket_stream_wrapper::websocket_stream_wrapper(boost::beast::websocket::stream& _w): + ws_(_w), request_waiter(new MultiQueueWaiter()), + on_request(request_waiter) + { + } + + bool websocket_stream_wrapper::fail() + { + return bad(); + } + + bool websocket_stream_wrapper::eof() + { + return bad(); + } + + bool websocket_stream_wrapper::good() + { + return !bad(); + } + + websocket_stream_wrapper& websocket_stream_wrapper::read(char* str, std::streamsize count) + { + auto some = on_request.TryDequeueSome(static_cast(count)); + memcpy(str,some.data(),some.size()); + for (std::streamsize i = some.size(); i < count; ++i) + { + str[i] = static_cast(get()); + } + return *this; + } + + int websocket_stream_wrapper::get() + { + return on_request.Dequeue(); + } + + bool websocket_stream_wrapper::bad() + { + return !ws_.next_layer().socket().is_open(); + } + + websocket_stream_wrapper& websocket_stream_wrapper::write(const std::string& c) + { + ws_.write(boost::asio::buffer(std::string(c))); + return *this; + } + + + websocket_stream_wrapper& websocket_stream_wrapper::write(std::streamsize _s) + { + std::ostringstream temp; + temp << _s; + ws_.write(boost::asio::buffer(temp.str())); + return *this; + } + + websocket_stream_wrapper& websocket_stream_wrapper::flush() + { + return *this; + } + + void websocket_stream_wrapper::clear() + { + } + + std::string websocket_stream_wrapper::what() + { + if (!error_message.empty()) + return error_message; + + if (!ws_.next_layer().socket().is_open()) + { + return "Socket is not open."; + } + return {}; + } + + WebSocketServer::~WebSocketServer() + { + delete d_ptr; + } + + WebSocketServer::WebSocketServer(const std::string& user_agent, const std::string& address, const std::string& port, + std::shared_ptr < MessageJsonHandler> json_handler, + std::shared_ptr < Endpoint> localEndPoint, lsp::Log& log, uint32_t _max_workers) + : point(json_handler,localEndPoint,log, _max_workers),d_ptr(new Data(user_agent,log)) + + { + + d_ptr->work = std::make_shared(d_ptr->io_context_); + + // Open the acceptor with the option to reuse the address (i.e. SO_REUSEADDR). + boost::asio::ip::tcp::resolver resolver(d_ptr->io_context_); + boost::asio::ip::tcp::endpoint endpoint = + *resolver.resolve(address, port).begin(); + d_ptr->acceptor_.open(endpoint.protocol()); + d_ptr->acceptor_.set_option(boost::asio::ip::tcp::acceptor::reuse_address(true)); + try + { + d_ptr->acceptor_.bind(endpoint); + } + catch (boost::system::system_error & e) + { + std::string temp = "Socket Server blid faild."; + d_ptr->_log.log(lsp::Log::Level::INFO , temp + e.what()); + return; + } + d_ptr->acceptor_.listen(); + + do_accept(); + std::string desc = "Socket WebSocketServer " + address + " " + port + " start."; + d_ptr->_log.log(lsp::Log::Level::INFO, desc); + } + + void WebSocketServer::run() + { + // The io_context::run() call will block until all asynchronous operations + // have finished. While the WebSocketServer is running, there is always at least one + // asynchronous operation outstanding: the asynchronous accept call waiting + // for new incoming connections. + d_ptr->io_context_.run(); + + } + + void WebSocketServer::stop() + { + try + { + if(d_ptr->work) + d_ptr->work.reset(); + + do_stop(); + } + catch (...) + { + } + } + + void WebSocketServer::do_accept() + { + d_ptr->acceptor_.async_accept( + [this](boost::system::error_code ec, boost::asio::ip::tcp::socket socket) + { + // Check whether the WebSocketServer was stopped by a signal before this + // completion handler had a chance to run. + if (!d_ptr->acceptor_.is_open()) + { + return; + } + if (!ec) + { + if(d_ptr->_server_session) + { + try + { + d_ptr->_server_session->close(); + point.Stop(); + } + catch (...) + { + } + } + d_ptr->_server_session = std::make_shared(std::move(socket), d_ptr->user_agent_); + d_ptr->_server_session->run(); + + point.startProcessingMessages(d_ptr->_server_session->proxy_, d_ptr->_server_session->proxy_); + do_accept(); + } + + }); + } + + void WebSocketServer::do_stop() + { + d_ptr->acceptor_.close(); + + point.Stop(); + + } + + } // namespace diff --git a/graphics/asymptote/LspCpp/src/jsonrpc/message.cpp b/graphics/asymptote/LspCpp/src/jsonrpc/message.cpp new file mode 100755 index 0000000000..4a23d2016a --- /dev/null +++ b/graphics/asymptote/LspCpp/src/jsonrpc/message.cpp @@ -0,0 +1,88 @@ +#include "LibLsp/JsonRpc/message.h" +#include +#include +#include "LibLsp/JsonRpc/serializer.h" +#include "LibLsp/JsonRpc/lsRequestId.h" +#include "LibLsp/JsonRpc/RequestInMessage.h" +#include "LibLsp/JsonRpc/Condition.h" +#include "LibLsp/JsonRpc/json.h" + +void LspMessage::Write(std::ostream& out) { + rapidjson::StringBuffer output; + rapidjson::Writer writer(output); + JsonWriter json_writer{ &writer }; + ReflectWriter(json_writer); + + const auto value = std::string("Content-Length: ") + std::to_string(output.GetSize()) + "\r\n\r\n" + output.GetString(); + out << value; + out.flush(); +} + +std::string LspMessage::ToJson() { + rapidjson::StringBuffer output; + rapidjson::Writer writer(output); + JsonWriter json_writer{ &writer }; + this->ReflectWriter(json_writer); + return output.GetString(); +} + +void Reflect(Reader& visitor, lsRequestId& value) { + if (visitor.IsInt()) { + value.type = lsRequestId::kInt; + value.value = visitor.GetInt(); + } + else if (visitor.IsInt64()) { + value.type = lsRequestId::kInt; + // `lsRequestId.value` is an `int`, so we're forced to truncate. + value.value = static_cast(visitor.GetInt64()); + } + else if (visitor.IsString()) { + value.type = lsRequestId::kString; + value.k_string = visitor.GetString(); + value.value = atoi(value.k_string.c_str()); + + } + else { + value.type = lsRequestId::kNone; + value.value = -1; + } +} + +void Reflect(Writer& visitor, lsRequestId& value) { + switch (value.type) { + case lsRequestId::kNone: + visitor.Null(); + break; + case lsRequestId::kInt: + visitor.Int(value.value); + break; + case lsRequestId::kString: + + if(value.k_string.empty()) + { + std::string str = std::to_string(value.value); + visitor.String(str.c_str(), str.length()); + } + else + { + visitor.String(value.k_string.c_str(), value.k_string.length()); + } + break; + } +} + +std::string ToString(const lsRequestId& id) { + if (id.type != lsRequestId::kNone) + { + if(id.type == lsRequestId::kString) + { + if (!id.k_string.empty()) + return id.k_string; + } + return std::to_string(id.value); + } + + return ""; +} + + diff --git a/graphics/asymptote/LspCpp/src/jsonrpc/optional.hpp b/graphics/asymptote/LspCpp/src/jsonrpc/optional.hpp new file mode 100644 index 0000000000..86e3b407c6 --- /dev/null +++ b/graphics/asymptote/LspCpp/src/jsonrpc/optional.hpp @@ -0,0 +1,1846 @@ +// +// Copyright (c) 2014-2021 Martin Moene +// +// https://github.com/martinmoene/optional-lite +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#pragma once + +#ifndef NONSTD_OPTIONAL_LITE_HPP +#define NONSTD_OPTIONAL_LITE_HPP + +#define optional_lite_MAJOR 3 +#define optional_lite_MINOR 5 +#define optional_lite_PATCH 0 + +#define optional_lite_VERSION optional_STRINGIFY(optional_lite_MAJOR) "." optional_STRINGIFY(optional_lite_MINOR) "." optional_STRINGIFY(optional_lite_PATCH) + +#define optional_STRINGIFY( x ) optional_STRINGIFY_( x ) +#define optional_STRINGIFY_( x ) #x + +// optional-lite configuration: + +#define optional_OPTIONAL_DEFAULT 0 +#define optional_OPTIONAL_NONSTD 1 +#define optional_OPTIONAL_STD 2 + +// tweak header support: + +#ifdef __has_include +# if __has_include() +# include +# endif +#define optional_HAVE_TWEAK_HEADER 1 +#else +#define optional_HAVE_TWEAK_HEADER 0 +//# pragma message("optional.hpp: Note: Tweak header not supported.") +#endif + +// optional selection and configuration: + +#if !defined( optional_CONFIG_SELECT_OPTIONAL ) +# define optional_CONFIG_SELECT_OPTIONAL ( optional_HAVE_STD_OPTIONAL ? optional_OPTIONAL_STD : optional_OPTIONAL_NONSTD ) +#endif + +// Control presence of extensions: + +#ifndef optional_CONFIG_NO_EXTENSIONS +#define optional_CONFIG_NO_EXTENSIONS 0 +#endif + +// Control presence of exception handling (try and auto discover): + +#ifndef optional_CONFIG_NO_EXCEPTIONS +# if defined(_MSC_VER) +# include // for _HAS_EXCEPTIONS +# endif +# if defined(__cpp_exceptions) || defined(__EXCEPTIONS) || (_HAS_EXCEPTIONS) +# define optional_CONFIG_NO_EXCEPTIONS 0 +# else +# define optional_CONFIG_NO_EXCEPTIONS 1 +# endif +#endif + +// C++ language version detection (C++20 is speculative): +// Note: VC14.0/1900 (VS2015) lacks too much from C++14. + +#ifndef optional_CPLUSPLUS +# if defined(_MSVC_LANG ) && !defined(__clang__) +# define optional_CPLUSPLUS (_MSC_VER == 1900 ? 201103L : _MSVC_LANG ) +# else +# define optional_CPLUSPLUS __cplusplus +# endif +#endif + +#define optional_CPP98_OR_GREATER ( optional_CPLUSPLUS >= 199711L ) +#define optional_CPP11_OR_GREATER ( optional_CPLUSPLUS >= 201103L ) +#define optional_CPP11_OR_GREATER_ ( optional_CPLUSPLUS >= 201103L ) +#define optional_CPP14_OR_GREATER ( optional_CPLUSPLUS >= 201402L ) +#define optional_CPP17_OR_GREATER ( optional_CPLUSPLUS >= 201703L ) +#define optional_CPP20_OR_GREATER ( optional_CPLUSPLUS >= 202000L ) + +// C++ language version (represent 98 as 3): + +#define optional_CPLUSPLUS_V ( optional_CPLUSPLUS / 100 - (optional_CPLUSPLUS > 200000 ? 2000 : 1994) ) + +// Use C++17 std::optional if available and requested: + +#if optional_CPP17_OR_GREATER && defined(__has_include ) +# if __has_include( ) +# define optional_HAVE_STD_OPTIONAL 1 +# else +# define optional_HAVE_STD_OPTIONAL 0 +# endif +#else +# define optional_HAVE_STD_OPTIONAL 0 +#endif + +#define optional_USES_STD_OPTIONAL ( (optional_CONFIG_SELECT_OPTIONAL == optional_OPTIONAL_STD) || ((optional_CONFIG_SELECT_OPTIONAL == optional_OPTIONAL_DEFAULT) && optional_HAVE_STD_OPTIONAL) ) + +// +// in_place: code duplicated in any-lite, expected-lite, optional-lite, value-ptr-lite, variant-lite: +// + +#ifndef nonstd_lite_HAVE_IN_PLACE_TYPES +#define nonstd_lite_HAVE_IN_PLACE_TYPES 1 + +// C++17 std::in_place in : + +#if optional_CPP17_OR_GREATER + +#include + +namespace nonstd { + +using std::in_place; +using std::in_place_type; +using std::in_place_index; +using std::in_place_t; +using std::in_place_type_t; +using std::in_place_index_t; + +#define nonstd_lite_in_place_t( T) std::in_place_t +#define nonstd_lite_in_place_type_t( T) std::in_place_type_t +#define nonstd_lite_in_place_index_t(K) std::in_place_index_t + +#define nonstd_lite_in_place( T) std::in_place_t{} +#define nonstd_lite_in_place_type( T) std::in_place_type_t{} +#define nonstd_lite_in_place_index(K) std::in_place_index_t{} + +} // namespace nonstd + +#else // optional_CPP17_OR_GREATER + +#include + +namespace nonstd { +namespace detail { + +template< class T > +struct in_place_type_tag {}; + +template< std::size_t K > +struct in_place_index_tag {}; + +} // namespace detail + +struct in_place_t {}; + +template< class T > +inline in_place_t in_place( detail::in_place_type_tag /*unused*/ = detail::in_place_type_tag() ) +{ + return in_place_t(); +} + +template< std::size_t K > +inline in_place_t in_place( detail::in_place_index_tag /*unused*/ = detail::in_place_index_tag() ) +{ + return in_place_t(); +} + +template< class T > +inline in_place_t in_place_type( detail::in_place_type_tag /*unused*/ = detail::in_place_type_tag() ) +{ + return in_place_t(); +} + +template< std::size_t K > +inline in_place_t in_place_index( detail::in_place_index_tag /*unused*/ = detail::in_place_index_tag() ) +{ + return in_place_t(); +} + +// mimic templated typedef: + +#define nonstd_lite_in_place_t( T) nonstd::in_place_t(&)( nonstd::detail::in_place_type_tag ) +#define nonstd_lite_in_place_type_t( T) nonstd::in_place_t(&)( nonstd::detail::in_place_type_tag ) +#define nonstd_lite_in_place_index_t(K) nonstd::in_place_t(&)( nonstd::detail::in_place_index_tag ) + +#define nonstd_lite_in_place( T) nonstd::in_place_type +#define nonstd_lite_in_place_type( T) nonstd::in_place_type +#define nonstd_lite_in_place_index(K) nonstd::in_place_index + +} // namespace nonstd + +#endif // optional_CPP17_OR_GREATER +#endif // nonstd_lite_HAVE_IN_PLACE_TYPES + +// +// Using std::optional: +// + +#if optional_USES_STD_OPTIONAL + +#include + +namespace nonstd { + + using std::optional; + using std::bad_optional_access; + using std::hash; + + using std::nullopt; + using std::nullopt_t; + + using std::operator==; + using std::operator!=; + using std::operator<; + using std::operator<=; + using std::operator>; + using std::operator>=; + using std::make_optional; + using std::swap; +} + +#else // optional_USES_STD_OPTIONAL + +#include +#include + +// optional-lite alignment configuration: + +#ifndef optional_CONFIG_MAX_ALIGN_HACK +# define optional_CONFIG_MAX_ALIGN_HACK 0 +#endif + +#ifndef optional_CONFIG_ALIGN_AS +// no default, used in #if defined() +#endif + +#ifndef optional_CONFIG_ALIGN_AS_FALLBACK +# define optional_CONFIG_ALIGN_AS_FALLBACK double +#endif + +// Compiler warning suppression: + +#if defined(__clang__) +# pragma clang diagnostic push +# pragma clang diagnostic ignored "-Wundef" +#elif defined(__GNUC__) +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wundef" +#elif defined(_MSC_VER ) +# pragma warning( push ) +#endif + +// half-open range [lo..hi): +#define optional_BETWEEN( v, lo, hi ) ( (lo) <= (v) && (v) < (hi) ) + +// Compiler versions: +// +// MSVC++ 6.0 _MSC_VER == 1200 optional_COMPILER_MSVC_VERSION == 60 (Visual Studio 6.0) +// MSVC++ 7.0 _MSC_VER == 1300 optional_COMPILER_MSVC_VERSION == 70 (Visual Studio .NET 2002) +// MSVC++ 7.1 _MSC_VER == 1310 optional_COMPILER_MSVC_VERSION == 71 (Visual Studio .NET 2003) +// MSVC++ 8.0 _MSC_VER == 1400 optional_COMPILER_MSVC_VERSION == 80 (Visual Studio 2005) +// MSVC++ 9.0 _MSC_VER == 1500 optional_COMPILER_MSVC_VERSION == 90 (Visual Studio 2008) +// MSVC++ 10.0 _MSC_VER == 1600 optional_COMPILER_MSVC_VERSION == 100 (Visual Studio 2010) +// MSVC++ 11.0 _MSC_VER == 1700 optional_COMPILER_MSVC_VERSION == 110 (Visual Studio 2012) +// MSVC++ 12.0 _MSC_VER == 1800 optional_COMPILER_MSVC_VERSION == 120 (Visual Studio 2013) +// MSVC++ 14.0 _MSC_VER == 1900 optional_COMPILER_MSVC_VERSION == 140 (Visual Studio 2015) +// MSVC++ 14.1 _MSC_VER >= 1910 optional_COMPILER_MSVC_VERSION == 141 (Visual Studio 2017) +// MSVC++ 14.2 _MSC_VER >= 1920 optional_COMPILER_MSVC_VERSION == 142 (Visual Studio 2019) + +#if defined(_MSC_VER ) && !defined(__clang__) +# define optional_COMPILER_MSVC_VER (_MSC_VER ) +# define optional_COMPILER_MSVC_VERSION (_MSC_VER / 10 - 10 * ( 5 + (_MSC_VER < 1900 ) ) ) +#else +# define optional_COMPILER_MSVC_VER 0 +# define optional_COMPILER_MSVC_VERSION 0 +#endif + +#define optional_COMPILER_VERSION( major, minor, patch ) ( 10 * (10 * (major) + (minor) ) + (patch) ) + +#if defined(__GNUC__) && !defined(__clang__) +# define optional_COMPILER_GNUC_VERSION optional_COMPILER_VERSION(__GNUC__, __GNUC_MINOR__, __GNUC_PATCHLEVEL__) +#else +# define optional_COMPILER_GNUC_VERSION 0 +#endif + +#if defined(__clang__) +# define optional_COMPILER_CLANG_VERSION optional_COMPILER_VERSION(__clang_major__, __clang_minor__, __clang_patchlevel__) +#else +# define optional_COMPILER_CLANG_VERSION 0 +#endif + +#if optional_BETWEEN(optional_COMPILER_MSVC_VERSION, 70, 140 ) +# pragma warning( disable: 4345 ) // initialization behavior changed +#endif + +#if optional_BETWEEN(optional_COMPILER_MSVC_VERSION, 70, 150 ) +# pragma warning( disable: 4814 ) // in C++14 'constexpr' will not imply 'const' +#endif + +// Presence of language and library features: + +#define optional_HAVE(FEATURE) ( optional_HAVE_##FEATURE ) + +#ifdef _HAS_CPP0X +# define optional_HAS_CPP0X _HAS_CPP0X +#else +# define optional_HAS_CPP0X 0 +#endif + +// Unless defined otherwise below, consider VC14 as C++11 for optional-lite: + +#if optional_COMPILER_MSVC_VER >= 1900 +# undef optional_CPP11_OR_GREATER +# define optional_CPP11_OR_GREATER 1 +#endif + +#define optional_CPP11_90 (optional_CPP11_OR_GREATER_ || optional_COMPILER_MSVC_VER >= 1500) +#define optional_CPP11_100 (optional_CPP11_OR_GREATER_ || optional_COMPILER_MSVC_VER >= 1600) +#define optional_CPP11_110 (optional_CPP11_OR_GREATER_ || optional_COMPILER_MSVC_VER >= 1700) +#define optional_CPP11_120 (optional_CPP11_OR_GREATER_ || optional_COMPILER_MSVC_VER >= 1800) +#define optional_CPP11_140 (optional_CPP11_OR_GREATER_ || optional_COMPILER_MSVC_VER >= 1900) +#define optional_CPP11_141 (optional_CPP11_OR_GREATER_ || optional_COMPILER_MSVC_VER >= 1910) + +#define optional_CPP14_000 (optional_CPP14_OR_GREATER) +#define optional_CPP17_000 (optional_CPP17_OR_GREATER) + +// clang >= 2.9, gcc >= 4.9, msvc >= vc14.0/1900 (vs15): +#define optional_CPP11_140_C290_G490 ((optional_CPP11_OR_GREATER_ && (optional_COMPILER_CLANG_VERSION >= 290 || optional_COMPILER_GNUC_VERSION >= 490)) || (optional_COMPILER_MSVC_VER >= 1900)) + +// clang >= 3.5, msvc >= vc11 (vs12): +#define optional_CPP11_110_C350 ( optional_CPP11_110 && !optional_BETWEEN( optional_COMPILER_CLANG_VERSION, 1, 350 ) ) + +// clang >= 3.5, gcc >= 5.0, msvc >= vc11 (vs12): +#define optional_CPP11_110_C350_G500 \ + ( optional_CPP11_110 && \ + !( optional_BETWEEN( optional_COMPILER_CLANG_VERSION, 1, 350 ) \ + || optional_BETWEEN( optional_COMPILER_GNUC_VERSION , 1, 500 ) ) ) + +// Presence of C++11 language features: + +#define optional_HAVE_CONSTEXPR_11 optional_CPP11_140 +#define optional_HAVE_IS_DEFAULT optional_CPP11_140 +#define optional_HAVE_NOEXCEPT optional_CPP11_140 +#define optional_HAVE_NULLPTR optional_CPP11_100 +#define optional_HAVE_REF_QUALIFIER optional_CPP11_140_C290_G490 +#define optional_HAVE_STATIC_ASSERT optional_CPP11_110 +#define optional_HAVE_INITIALIZER_LIST optional_CPP11_140 + +// Presence of C++14 language features: + +#define optional_HAVE_CONSTEXPR_14 optional_CPP14_000 + +// Presence of C++17 language features: + +#define optional_HAVE_NODISCARD optional_CPP17_000 + +// Presence of C++ library features: + +#define optional_HAVE_CONDITIONAL optional_CPP11_120 +#define optional_HAVE_REMOVE_CV optional_CPP11_120 +#define optional_HAVE_TYPE_TRAITS optional_CPP11_90 + +#define optional_HAVE_TR1_TYPE_TRAITS (!! optional_COMPILER_GNUC_VERSION ) +#define optional_HAVE_TR1_ADD_POINTER (!! optional_COMPILER_GNUC_VERSION ) + +#define optional_HAVE_IS_ASSIGNABLE optional_CPP11_110_C350 +#define optional_HAVE_IS_MOVE_CONSTRUCTIBLE optional_CPP11_110_C350 +#define optional_HAVE_IS_NOTHROW_MOVE_ASSIGNABLE optional_CPP11_110_C350 +#define optional_HAVE_IS_NOTHROW_MOVE_CONSTRUCTIBLE optional_CPP11_110_C350 +#define optional_HAVE_IS_TRIVIALLY_COPY_CONSTRUCTIBLE optional_CPP11_110_C350_G500 +#define optional_HAVE_IS_TRIVIALLY_MOVE_CONSTRUCTIBLE optional_CPP11_110_C350_G500 + +// C++ feature usage: + +#if optional_HAVE( CONSTEXPR_11 ) +# define optional_constexpr constexpr +#else +# define optional_constexpr /*constexpr*/ +#endif + +#if optional_HAVE( IS_DEFAULT ) +# define optional_is_default = default; +#else +# define optional_is_default {} +#endif + +#if optional_HAVE( CONSTEXPR_14 ) +# define optional_constexpr14 constexpr +#else +# define optional_constexpr14 /*constexpr*/ +#endif + +#if optional_HAVE( NODISCARD ) +# define optional_nodiscard [[nodiscard]] +#else +# define optional_nodiscard /*[[nodiscard]]*/ +#endif + +#if optional_HAVE( NOEXCEPT ) +# define optional_noexcept noexcept +#else +# define optional_noexcept /*noexcept*/ +#endif + +#if optional_HAVE( NULLPTR ) +# define optional_nullptr nullptr +#else +# define optional_nullptr NULL +#endif + +#if optional_HAVE( REF_QUALIFIER ) +// NOLINTNEXTLINE( bugprone-macro-parentheses ) +# define optional_ref_qual & +# define optional_refref_qual && +#else +# define optional_ref_qual /*&*/ +# define optional_refref_qual /*&&*/ +#endif + +#if optional_HAVE( STATIC_ASSERT ) +# define optional_static_assert(expr, text) static_assert(expr, text); +#else +# define optional_static_assert(expr, text) /*static_assert(expr, text);*/ +#endif + +// additional includes: + +#if optional_CONFIG_NO_EXCEPTIONS +// already included: +#else +# include +#endif + +#if optional_CPP11_OR_GREATER +# include +#endif + +#if optional_HAVE( INITIALIZER_LIST ) +# include +#endif + +#if optional_HAVE( TYPE_TRAITS ) +# include +#elif optional_HAVE( TR1_TYPE_TRAITS ) +# include +#endif + +// Method enabling + +#if optional_CPP11_OR_GREATER + +#define optional_REQUIRES_0(...) \ + template< bool B = (__VA_ARGS__), typename std::enable_if::type = 0 > + +#define optional_REQUIRES_T(...) \ + , typename std::enable_if< (__VA_ARGS__), int >::type = 0 + +#define optional_REQUIRES_R(R, ...) \ + typename std::enable_if< (__VA_ARGS__), R>::type + +#define optional_REQUIRES_A(...) \ + , typename std::enable_if< (__VA_ARGS__), void*>::type = nullptr + +#endif + +// +// optional: +// + +namespace nonstd { namespace optional_lite { + +namespace std11 { + +template< class T, T v > struct integral_constant { enum { value = v }; }; +template< bool B > struct bool_constant : integral_constant{}; + +typedef bool_constant< true > true_type; +typedef bool_constant< false > false_type; + +#if optional_CPP11_OR_GREATER + using std::move; +#else + template< typename T > T & move( T & t ) { return t; } +#endif + +#if optional_HAVE( CONDITIONAL ) + using std::conditional; +#else + template< bool B, typename T, typename F > struct conditional { typedef T type; }; + template< typename T, typename F > struct conditional { typedef F type; }; +#endif // optional_HAVE_CONDITIONAL + +#if optional_HAVE( IS_ASSIGNABLE ) + using std::is_assignable; +#else + template< class T, class U > struct is_assignable : std11::true_type{}; +#endif + +#if optional_HAVE( IS_MOVE_CONSTRUCTIBLE ) + using std::is_move_constructible; +#else + template< class T > struct is_move_constructible : std11::true_type{}; +#endif + +#if optional_HAVE( IS_NOTHROW_MOVE_ASSIGNABLE ) + using std::is_nothrow_move_assignable; +#else + template< class T > struct is_nothrow_move_assignable : std11::true_type{}; +#endif + +#if optional_HAVE( IS_NOTHROW_MOVE_CONSTRUCTIBLE ) + using std::is_nothrow_move_constructible; +#else + template< class T > struct is_nothrow_move_constructible : std11::true_type{}; +#endif + +#if optional_HAVE( IS_TRIVIALLY_COPY_CONSTRUCTIBLE ) + using std::is_trivially_copy_constructible; +#else + template< class T > struct is_trivially_copy_constructible : std11::true_type{}; +#endif + +#if optional_HAVE( IS_TRIVIALLY_MOVE_CONSTRUCTIBLE ) + using std::is_trivially_move_constructible; +#else + template< class T > struct is_trivially_move_constructible : std11::true_type{}; +#endif + +} // namespace std11 + +#if optional_CPP11_OR_GREATER + +/// type traits C++17: + +namespace std17 { + +#if optional_CPP17_OR_GREATER + +using std::is_swappable; +using std::is_nothrow_swappable; + +#elif optional_CPP11_OR_GREATER + +namespace detail { + +using std::swap; + +struct is_swappable +{ + template< typename T, typename = decltype( swap( std::declval(), std::declval() ) ) > + static std11::true_type test( int /*unused*/ ); + + template< typename > + static std11::false_type test(...); +}; + +struct is_nothrow_swappable +{ + // wrap noexcept(expr) in separate function as work-around for VC140 (VS2015): + + template< typename T > + static constexpr bool satisfies() + { + return noexcept( swap( std::declval(), std::declval() ) ); + } + + template< typename T > + static auto test( int /*unused*/ ) -> std11::integral_constant()>{} + + template< typename > + static auto test(...) -> std11::false_type; +}; + +} // namespace detail + +// is [nothow] swappable: + +template< typename T > +struct is_swappable : decltype( detail::is_swappable::test(0) ){}; + +template< typename T > +struct is_nothrow_swappable : decltype( detail::is_nothrow_swappable::test(0) ){}; + +#endif // optional_CPP17_OR_GREATER + +} // namespace std17 + +/// type traits C++20: + +namespace std20 { + +template< typename T > +struct remove_cvref +{ + typedef typename std::remove_cv< typename std::remove_reference::type >::type type; +}; + +} // namespace std20 + +#endif // optional_CPP11_OR_GREATER + +/// class optional + +template< typename T > +class optional; + +namespace detail { + +// C++11 emulation: + +struct nulltype{}; + +template< typename Head, typename Tail > +struct typelist +{ + typedef Head head; + typedef Tail tail; +}; + +#if optional_CONFIG_MAX_ALIGN_HACK + +// Max align, use most restricted type for alignment: + +#define optional_UNIQUE( name ) optional_UNIQUE2( name, __LINE__ ) +#define optional_UNIQUE2( name, line ) optional_UNIQUE3( name, line ) +#define optional_UNIQUE3( name, line ) name ## line + +#define optional_ALIGN_TYPE( type ) \ + type optional_UNIQUE( _t ); struct_t< type > optional_UNIQUE( _st ) + +template< typename T > +struct struct_t { T _; }; + +union max_align_t +{ + optional_ALIGN_TYPE( char ); + optional_ALIGN_TYPE( short int ); + optional_ALIGN_TYPE( int ); + optional_ALIGN_TYPE( long int ); + optional_ALIGN_TYPE( float ); + optional_ALIGN_TYPE( double ); + optional_ALIGN_TYPE( long double ); + optional_ALIGN_TYPE( char * ); + optional_ALIGN_TYPE( short int * ); + optional_ALIGN_TYPE( int * ); + optional_ALIGN_TYPE( long int * ); + optional_ALIGN_TYPE( float * ); + optional_ALIGN_TYPE( double * ); + optional_ALIGN_TYPE( long double * ); + optional_ALIGN_TYPE( void * ); + +#ifdef HAVE_LONG_LONG + optional_ALIGN_TYPE( long long ); +#endif + + struct Unknown; + + Unknown ( * optional_UNIQUE(_) )( Unknown ); + Unknown * Unknown::* optional_UNIQUE(_); + Unknown ( Unknown::* optional_UNIQUE(_) )( Unknown ); + + struct_t< Unknown ( * )( Unknown) > optional_UNIQUE(_); + struct_t< Unknown * Unknown::* > optional_UNIQUE(_); + struct_t< Unknown ( Unknown::* )(Unknown) > optional_UNIQUE(_); +}; + +#undef optional_UNIQUE +#undef optional_UNIQUE2 +#undef optional_UNIQUE3 + +#undef optional_ALIGN_TYPE + +#elif defined( optional_CONFIG_ALIGN_AS ) // optional_CONFIG_MAX_ALIGN_HACK + +// Use user-specified type for alignment: + +#define optional_ALIGN_AS( unused ) \ + optional_CONFIG_ALIGN_AS + +#else // optional_CONFIG_MAX_ALIGN_HACK + +// Determine POD type to use for alignment: + +#define optional_ALIGN_AS( to_align ) \ + typename type_of_size< alignment_types, alignment_of< to_align >::value >::type + +template< typename T > +struct alignment_of; + +template< typename T > +struct alignment_of_hack +{ + char c; + T t; + alignment_of_hack(); +}; + +template< size_t A, size_t S > +struct alignment_logic +{ + enum { value = A < S ? A : S }; +}; + +template< typename T > +struct alignment_of +{ + enum { value = alignment_logic< + sizeof( alignment_of_hack ) - sizeof(T), sizeof(T) >::value }; +}; + +template< typename List, size_t N > +struct type_of_size +{ + typedef typename std11::conditional< + N == sizeof( typename List::head ), + typename List::head, + typename type_of_size::type >::type type; +}; + +template< size_t N > +struct type_of_size< nulltype, N > +{ + typedef optional_CONFIG_ALIGN_AS_FALLBACK type; +}; + +template< typename T> +struct struct_t { T _; }; + +#define optional_ALIGN_TYPE( type ) \ + typelist< type , typelist< struct_t< type > + +struct Unknown; + +typedef + optional_ALIGN_TYPE( char ), + optional_ALIGN_TYPE( short ), + optional_ALIGN_TYPE( int ), + optional_ALIGN_TYPE( long ), + optional_ALIGN_TYPE( float ), + optional_ALIGN_TYPE( double ), + optional_ALIGN_TYPE( long double ), + + optional_ALIGN_TYPE( char *), + optional_ALIGN_TYPE( short * ), + optional_ALIGN_TYPE( int * ), + optional_ALIGN_TYPE( long * ), + optional_ALIGN_TYPE( float * ), + optional_ALIGN_TYPE( double * ), + optional_ALIGN_TYPE( long double * ), + + optional_ALIGN_TYPE( Unknown ( * )( Unknown ) ), + optional_ALIGN_TYPE( Unknown * Unknown::* ), + optional_ALIGN_TYPE( Unknown ( Unknown::* )( Unknown ) ), + + nulltype + > > > > > > > > > > > > > > + > > > > > > > > > > > > > > + > > > > > > + alignment_types; + +#undef optional_ALIGN_TYPE + +#endif // optional_CONFIG_MAX_ALIGN_HACK + +/// C++03 constructed union to hold value. + +template< typename T > +union storage_t +{ +//private: +// template< typename > friend class optional; + + typedef T value_type; + + storage_t() optional_is_default + + explicit storage_t( value_type const & v ) + { + construct_value( v ); + } + + void construct_value( value_type const & v ) + { + ::new( value_ptr() ) value_type( v ); + } + +#if optional_CPP11_OR_GREATER + + explicit storage_t( value_type && v ) + { + construct_value( std::move( v ) ); + } + + void construct_value( value_type && v ) + { + ::new( value_ptr() ) value_type( std::move( v ) ); + } + + template< class... Args > + storage_t( nonstd_lite_in_place_t(T), Args&&... args ) + { + emplace( std::forward(args)... ); + } + + template< class... Args > + void emplace( Args&&... args ) + { + ::new( value_ptr() ) value_type( std::forward(args)... ); + } + + template< class U, class... Args > + void emplace( std::initializer_list il, Args&&... args ) + { + ::new( value_ptr() ) value_type( il, std::forward(args)... ); + } + +#endif + + void destruct_value() + { + value_ptr()->~T(); + } + + optional_nodiscard value_type const * value_ptr() const + { + return as(); + } + + value_type * value_ptr() + { + return as(); + } + + optional_nodiscard value_type const & value() const optional_ref_qual + { + return * value_ptr(); + } + + value_type & value() optional_ref_qual + { + return * value_ptr(); + } + +#if optional_HAVE( REF_QUALIFIER ) + + optional_nodiscard value_type const && value() const optional_refref_qual + { + return std::move( value() ); + } + + value_type && value() optional_refref_qual + { + return std::move( value() ); + } + +#endif + +#if optional_CPP11_OR_GREATER + + using aligned_storage_t = typename std::aligned_storage< sizeof(value_type), alignof(value_type) >::type; + aligned_storage_t data; + +#elif optional_CONFIG_MAX_ALIGN_HACK + + typedef struct { unsigned char data[ sizeof(value_type) ]; } aligned_storage_t; + + max_align_t hack; + aligned_storage_t data; + +#else + typedef optional_ALIGN_AS(value_type) align_as_type; + + typedef struct { align_as_type data[ 1 + ( sizeof(value_type) - 1 ) / sizeof(align_as_type) ]; } aligned_storage_t; + aligned_storage_t data; + +# undef optional_ALIGN_AS + +#endif // optional_CONFIG_MAX_ALIGN_HACK + + optional_nodiscard void * ptr() optional_noexcept + { + return &data; + } + + optional_nodiscard void const * ptr() const optional_noexcept + { + return &data; + } + + template + optional_nodiscard U * as() + { + return reinterpret_cast( ptr() ); + } + + template + optional_nodiscard U const * as() const + { + return reinterpret_cast( ptr() ); + } +}; + +} // namespace detail + +/// disengaged state tag + +struct nullopt_t +{ + struct init{}; + explicit optional_constexpr nullopt_t( init /*unused*/ ) optional_noexcept {} +}; + +#if optional_HAVE( CONSTEXPR_11 ) +constexpr nullopt_t nullopt{ nullopt_t::init{} }; +#else +// extra parenthesis to prevent the most vexing parse: +const nullopt_t nullopt(( nullopt_t::init() )); +#endif + +/// optional access error + +#if ! optional_CONFIG_NO_EXCEPTIONS + +class bad_optional_access : public std::logic_error +{ +public: + explicit bad_optional_access() + : logic_error( "bad optional access" ) {} +}; + +#endif //optional_CONFIG_NO_EXCEPTIONS + +/// optional + +template< typename T> +class optional +{ + optional_static_assert(( !std::is_same::type, nullopt_t>::value ), + "T in optional must not be of type 'nullopt_t'.") + + optional_static_assert(( !std::is_same::type, in_place_t>::value ), + "T in optional must not be of type 'in_place_t'.") + + optional_static_assert(( std::is_object::value && std::is_destructible::value && !std::is_array::value ), + "T in optional must meet the Cpp17Destructible requirements.") + +private: + template< typename > friend class optional; + + typedef void (optional::*safe_bool)() const; + +public: + typedef T value_type; + + // x.x.3.1, constructors + + // 1a - default construct + optional_constexpr optional() optional_noexcept + : has_value_( false ) + , contained() + {} + + // 1b - construct explicitly empty + // NOLINTNEXTLINE( google-explicit-constructor, hicpp-explicit-conversions ) + optional_constexpr optional( nullopt_t /*unused*/ ) optional_noexcept + : has_value_( false ) + , contained() + {} + + // 2 - copy-construct +#if optional_CPP11_OR_GREATER + // template< typename U = T + // optional_REQUIRES_T( + // std::is_copy_constructible::value + // || std11::is_trivially_copy_constructible::value + // ) + // > +#endif + optional_constexpr14 optional( optional const & other ) + : has_value_( other.has_value() ) + { + if ( other.has_value() ) + { + contained.construct_value( other.contained.value() ); + } + } + +#if optional_CPP11_OR_GREATER + + // 3 (C++11) - move-construct from optional + template< typename U = T + optional_REQUIRES_T( + std11::is_move_constructible::value + || std11::is_trivially_move_constructible::value + ) + > + optional_constexpr14 optional( optional && other ) + // NOLINTNEXTLINE( performance-noexcept-move-constructor ) + noexcept( std11::is_nothrow_move_constructible::value ) + : has_value_( other.has_value() ) + { + if ( other.has_value() ) + { + contained.construct_value( std::move( other.contained.value() ) ); + } + } + + // 4a (C++11) - explicit converting copy-construct from optional + template< typename U + optional_REQUIRES_T( + std::is_constructible::value + && !std::is_constructible & >::value + && !std::is_constructible && >::value + && !std::is_constructible const & >::value + && !std::is_constructible const && >::value + && !std::is_convertible< optional & , T>::value + && !std::is_convertible< optional && , T>::value + && !std::is_convertible< optional const & , T>::value + && !std::is_convertible< optional const &&, T>::value + && !std::is_convertible< U const & , T>::value /*=> explicit */ + ) + > + explicit optional( optional const & other ) + : has_value_( other.has_value() ) + { + if ( other.has_value() ) + { + contained.construct_value( T{ other.contained.value() } ); + } + } +#endif // optional_CPP11_OR_GREATER + + // 4b (C++98 and later) - non-explicit converting copy-construct from optional + template< typename U +#if optional_CPP11_OR_GREATER + optional_REQUIRES_T( + std::is_constructible::value + && !std::is_constructible & >::value + && !std::is_constructible && >::value + && !std::is_constructible const & >::value + && !std::is_constructible const && >::value + && !std::is_convertible< optional & , T>::value + && !std::is_convertible< optional && , T>::value + && !std::is_convertible< optional const & , T>::value + && !std::is_convertible< optional const &&, T>::value + && std::is_convertible< U const & , T>::value /*=> non-explicit */ + ) +#endif // optional_CPP11_OR_GREATER + > + // NOLINTNEXTLINE( google-explicit-constructor, hicpp-explicit-conversions ) + /*non-explicit*/ optional( optional const & other ) + : has_value_( other.has_value() ) + { + if ( other.has_value() ) + { + contained.construct_value( other.contained.value() ); + } + } + +#if optional_CPP11_OR_GREATER + + // 5a (C++11) - explicit converting move-construct from optional + template< typename U + optional_REQUIRES_T( + std::is_constructible::value + && !std::is_constructible & >::value + && !std::is_constructible && >::value + && !std::is_constructible const & >::value + && !std::is_constructible const && >::value + && !std::is_convertible< optional & , T>::value + && !std::is_convertible< optional && , T>::value + && !std::is_convertible< optional const & , T>::value + && !std::is_convertible< optional const &&, T>::value + && !std::is_convertible< U &&, T>::value /*=> explicit */ + ) + > + explicit optional( optional && other + ) + : has_value_( other.has_value() ) + { + if ( other.has_value() ) + { + contained.construct_value( T{ std::move( other.contained.value() ) } ); + } + } + + // 5a (C++11) - non-explicit converting move-construct from optional + template< typename U + optional_REQUIRES_T( + std::is_constructible::value + && !std::is_constructible & >::value + && !std::is_constructible && >::value + && !std::is_constructible const & >::value + && !std::is_constructible const && >::value + && !std::is_convertible< optional & , T>::value + && !std::is_convertible< optional && , T>::value + && !std::is_convertible< optional const & , T>::value + && !std::is_convertible< optional const &&, T>::value + && std::is_convertible< U &&, T>::value /*=> non-explicit */ + ) + > + // NOLINTNEXTLINE( google-explicit-constructor, hicpp-explicit-conversions ) + /*non-explicit*/ optional( optional && other ) + : has_value_( other.has_value() ) + { + if ( other.has_value() ) + { + contained.construct_value( std::move( other.contained.value() ) ); + } + } + + // 6 (C++11) - in-place construct + template< typename... Args + optional_REQUIRES_T( + std::is_constructible::value + ) + > + optional_constexpr explicit optional( nonstd_lite_in_place_t(T), Args&&... args ) + : has_value_( true ) + , contained( in_place, std::forward(args)... ) + {} + + // 7 (C++11) - in-place construct, initializer-list + template< typename U, typename... Args + optional_REQUIRES_T( + std::is_constructible&, Args&&...>::value + ) + > + optional_constexpr explicit optional( nonstd_lite_in_place_t(T), std::initializer_list il, Args&&... args ) + : has_value_( true ) + , contained( T( il, std::forward(args)...) ) + {} + + // 8a (C++11) - explicit move construct from value + template< typename U = T + optional_REQUIRES_T( + std::is_constructible::value + && !std::is_same::type, nonstd_lite_in_place_t(U)>::value + && !std::is_same::type, optional>::value + && !std::is_convertible::value /*=> explicit */ + ) + > + optional_constexpr explicit optional( U && value ) + : has_value_( true ) + , contained( nonstd_lite_in_place(T), std::forward( value ) ) + {} + + // 8b (C++11) - non-explicit move construct from value + template< typename U = T + optional_REQUIRES_T( + std::is_constructible::value + && !std::is_same::type, nonstd_lite_in_place_t(U)>::value + && !std::is_same::type, optional>::value + && std::is_convertible::value /*=> non-explicit */ + ) + > + // NOLINTNEXTLINE( google-explicit-constructor, hicpp-explicit-conversions ) + optional_constexpr /*non-explicit*/ optional( U && value ) + : has_value_( true ) + , contained( nonstd_lite_in_place(T), std::forward( value ) ) + {} + +#else // optional_CPP11_OR_GREATER + + // 8 (C++98) + optional( value_type const & value ) + : has_value_( true ) + , contained( value ) + {} + +#endif // optional_CPP11_OR_GREATER + + // x.x.3.2, destructor + + ~optional() + { + if ( has_value() ) + { + contained.destruct_value(); + } + } + + // x.x.3.3, assignment + + // 1 (C++98and later) - assign explicitly empty + optional & operator=( nullopt_t /*unused*/) optional_noexcept + { + reset(); + return *this; + } + + // 2 (C++98and later) - copy-assign from optional +#if optional_CPP11_OR_GREATER + // NOLINTNEXTLINE( cppcoreguidelines-c-copy-assignment-signature, misc-unconventional-assign-operator ) + optional_REQUIRES_R( + optional &, + true +// std::is_copy_constructible::value +// && std::is_copy_assignable::value + ) + operator=( optional const & other ) + noexcept( + std11::is_nothrow_move_assignable::value + && std11::is_nothrow_move_constructible::value + ) +#else + optional & operator=( optional const & other ) +#endif + { + if ( (has_value() == true ) && (other.has_value() == false) ) { reset(); } + else if ( (has_value() == false) && (other.has_value() == true ) ) { initialize( *other ); } + else if ( (has_value() == true ) && (other.has_value() == true ) ) { contained.value() = *other; } + return *this; + } + +#if optional_CPP11_OR_GREATER + + // 3 (C++11) - move-assign from optional + // NOLINTNEXTLINE( cppcoreguidelines-c-copy-assignment-signature, misc-unconventional-assign-operator ) + optional_REQUIRES_R( + optional &, + true +// std11::is_move_constructible::value +// && std::is_move_assignable::value + ) + operator=( optional && other ) noexcept + { + if ( (has_value() == true ) && (other.has_value() == false) ) { reset(); } + else if ( (has_value() == false) && (other.has_value() == true ) ) { initialize( std::move( *other ) ); } + else if ( (has_value() == true ) && (other.has_value() == true ) ) { contained.value() = std::move( *other ); } + return *this; + } + + // 4 (C++11) - move-assign from value + template< typename U = T > + // NOLINTNEXTLINE( cppcoreguidelines-c-copy-assignment-signature, misc-unconventional-assign-operator ) + optional_REQUIRES_R( + optional &, + std::is_constructible::value + && std11::is_assignable::value + && !std::is_same::type, nonstd_lite_in_place_t(U)>::value + && !std::is_same::type, optional>::value + && !(std::is_scalar::value && std::is_same::type>::value) + ) + operator=( U && value ) + { + if ( has_value() ) + { + contained.value() = std::forward( value ); + } + else + { + initialize( T( std::forward( value ) ) ); + } + return *this; + } + +#else // optional_CPP11_OR_GREATER + + // 4 (C++98) - copy-assign from value + template< typename U /*= T*/ > + optional & operator=( U const & value ) + { + if ( has_value() ) contained.value() = value; + else initialize( T( value ) ); + return *this; + } + +#endif // optional_CPP11_OR_GREATER + + // 5 (C++98 and later) - converting copy-assign from optional + template< typename U > +#if optional_CPP11_OR_GREATER + // NOLINTNEXTLINE( cppcoreguidelines-c-copy-assignment-signature, misc-unconventional-assign-operator ) + optional_REQUIRES_R( + optional&, + std::is_constructible< T , U const &>::value + && std11::is_assignable< T&, U const &>::value + && !std::is_constructible & >::value + && !std::is_constructible && >::value + && !std::is_constructible const & >::value + && !std::is_constructible const && >::value + && !std::is_convertible< optional & , T>::value + && !std::is_convertible< optional && , T>::value + && !std::is_convertible< optional const & , T>::value + && !std::is_convertible< optional const &&, T>::value + && !std11::is_assignable< T&, optional & >::value + && !std11::is_assignable< T&, optional && >::value + && !std11::is_assignable< T&, optional const & >::value + && !std11::is_assignable< T&, optional const && >::value + ) +#else + optional& +#endif // optional_CPP11_OR_GREATER + operator=( optional const & other ) + { + return *this = optional( other ); + } + +#if optional_CPP11_OR_GREATER + + // 6 (C++11) - converting move-assign from optional + template< typename U > + // NOLINTNEXTLINE( cppcoreguidelines-c-copy-assignment-signature, misc-unconventional-assign-operator ) + optional_REQUIRES_R( + optional&, + std::is_constructible< T , U>::value + && std11::is_assignable< T&, U>::value + && !std::is_constructible & >::value + && !std::is_constructible && >::value + && !std::is_constructible const & >::value + && !std::is_constructible const && >::value + && !std::is_convertible< optional & , T>::value + && !std::is_convertible< optional && , T>::value + && !std::is_convertible< optional const & , T>::value + && !std::is_convertible< optional const &&, T>::value + && !std11::is_assignable< T&, optional & >::value + && !std11::is_assignable< T&, optional && >::value + && !std11::is_assignable< T&, optional const & >::value + && !std11::is_assignable< T&, optional const && >::value + ) + operator=( optional && other ) + { + return *this = optional( std::move( other ) ); + } + + // 7 (C++11) - emplace + template< typename... Args + optional_REQUIRES_T( + std::is_constructible::value + ) + > + T& emplace( Args&&... args ) + { + *this = nullopt; + contained.emplace( std::forward(args)... ); + has_value_ = true; + return contained.value(); + } + + // 8 (C++11) - emplace, initializer-list + template< typename U, typename... Args + optional_REQUIRES_T( + std::is_constructible&, Args&&...>::value + ) + > + T& emplace( std::initializer_list il, Args&&... args ) + { + *this = nullopt; + contained.emplace( il, std::forward(args)... ); + has_value_ = true; + return contained.value(); + } + +#endif // optional_CPP11_OR_GREATER + + // x.x.3.4, swap + + void swap( optional & other ) +#if optional_CPP11_OR_GREATER + noexcept( + std11::is_nothrow_move_constructible::value + && std17::is_nothrow_swappable::value + ) +#endif + { + using std::swap; + if ( (has_value() == true ) && (other.has_value() == true ) ) { swap( **this, *other ); } + else if ( (has_value() == false) && (other.has_value() == true ) ) { initialize( std11::move(*other) ); other.reset(); } + else if ( (has_value() == true ) && (other.has_value() == false) ) { other.initialize( std11::move(**this) ); reset(); } + } + + // x.x.3.5, observers + + optional_constexpr value_type const * operator ->() const + { + return assert( has_value() ), + contained.value_ptr(); + } + + optional_constexpr14 value_type * operator ->() + { + return assert( has_value() ), + contained.value_ptr(); + } + + optional_constexpr value_type const & operator *() const optional_ref_qual + { + return assert( has_value() ), + contained.value(); + } + + optional_constexpr14 value_type & operator *() optional_ref_qual + { + return assert( has_value() ), + contained.value(); + } + +#if optional_HAVE( REF_QUALIFIER ) + + optional_constexpr value_type const && operator *() const optional_refref_qual + { + return std::move( **this ); + } + + optional_constexpr14 value_type && operator *() optional_refref_qual + { + return std::move( **this ); + } + +#endif + +#if optional_CPP11_OR_GREATER + optional_constexpr explicit operator bool() const optional_noexcept + { + return has_value(); + } +#else + optional_constexpr operator safe_bool() const optional_noexcept + { + return has_value() ? &optional::this_type_does_not_support_comparisons : 0; + } +#endif + + // NOLINTNEXTLINE( modernize-use-nodiscard ) + /*optional_nodiscard*/ optional_constexpr bool has_value() const optional_noexcept + { + return has_value_; + } + + // NOLINTNEXTLINE( modernize-use-nodiscard ) + /*optional_nodiscard*/ optional_constexpr14 value_type const & value() const optional_ref_qual + { +#if optional_CONFIG_NO_EXCEPTIONS + assert( has_value() ); +#else + if ( ! has_value() ) + { + throw bad_optional_access(); + } +#endif + return contained.value(); + } + + optional_constexpr14 value_type & value() optional_ref_qual + { +#if optional_CONFIG_NO_EXCEPTIONS + assert( has_value() ); +#else + if ( ! has_value() ) + { + throw bad_optional_access(); + } +#endif + return contained.value(); + } + +#if optional_HAVE( REF_QUALIFIER ) && ( !optional_COMPILER_GNUC_VERSION || optional_COMPILER_GNUC_VERSION >= 490 ) + + // NOLINTNEXTLINE( modernize-use-nodiscard ) + /*optional_nodiscard*/ optional_constexpr value_type const && value() const optional_refref_qual + { + return std::move( value() ); + } + + optional_constexpr14 value_type && value() optional_refref_qual + { + return std::move( value() ); + } + +#endif + +#if optional_HAVE( REF_QUALIFIER ) + + template< typename U > + optional_constexpr value_type value_or( U && v ) const optional_ref_qual + { + return has_value() ? contained.value() : static_cast(std::forward( v ) ); + } + + template< typename U > + optional_constexpr14 value_type value_or( U && v ) optional_refref_qual + { +#if optional_COMPILER_CLANG_VERSION + return has_value() ? /*std::move*/( contained.value() ) : static_cast(std::forward( v ) ); +#else + return has_value() ? std::move( contained.value() ) : static_cast(std::forward( v ) ); +#endif + } + +#else + + template< typename U > + optional_constexpr value_type value_or( U const & v ) const + { + return has_value() ? contained.value() : static_cast( v ); + } + +#endif // optional_HAVE( REF_QUALIFIER ) + +#if !optional_CONFIG_NO_EXTENSIONS +#if optional_HAVE( REF_QUALIFIER ) + + template< typename F > + optional_constexpr value_type value_or_eval( F f ) const & + { + return has_value() ? contained.value() : f(); + } + + template< typename F > + optional_constexpr14 value_type value_or_eval( F f ) && + { + if ( has_value() ) + { + return std::move( contained.value() ); + } + else + { + return f(); + } + } + +#else + + template< typename F > + optional_constexpr value_type value_or_eval( F f ) const + { + return has_value() ? contained.value() : f(); + } + +#endif // optional_HAVE( REF_QUALIFIER ) +#endif // !optional_CONFIG_NO_EXTENSIONS + + // x.x.3.6, modifiers + + void reset() optional_noexcept + { + if ( has_value() ) + { + contained.destruct_value(); + } + + has_value_ = false; + } + +private: + void this_type_does_not_support_comparisons() const {} + + template< typename V > + void initialize( V const & value ) + { + assert( ! has_value() ); + contained.construct_value( value ); + has_value_ = true; + } + +#if optional_CPP11_OR_GREATER + template< typename V > + void initialize( V && value ) + { + assert( ! has_value() ); + contained.construct_value( std::move( value ) ); + has_value_ = true; + } + +#endif + +private: + bool has_value_; + detail::storage_t< value_type > contained; + +}; + +// Relational operators + +template< typename T, typename U > +optional_nodiscard optional_constexpr bool operator==( optional const & x, optional const & y ) +{ + return bool(x) != bool(y) ? false : !bool( x ) ? true : *x == *y; +} + +template< typename T, typename U > +optional_nodiscard optional_constexpr bool operator!=( optional const & x, optional const & y ) +{ + return !(x == y); +} + +template< typename T, typename U > +optional_nodiscard optional_constexpr bool operator<( optional const & x, optional const & y ) +{ + return (!y) ? false : (!x) ? true : *x < *y; +} + +template< typename T, typename U > +optional_nodiscard optional_constexpr bool operator>( optional const & x, optional const & y ) +{ + return (y < x); +} + +template< typename T, typename U > +optional_nodiscard optional_constexpr bool operator<=( optional const & x, optional const & y ) +{ + return !(y < x); +} + +template< typename T, typename U > +optional_nodiscard optional_constexpr bool operator>=( optional const & x, optional const & y ) +{ + return !(x < y); +} + +// Comparison with nullopt + +template< typename T > +optional_nodiscard optional_constexpr bool operator==( optional const & x, nullopt_t /*unused*/ ) optional_noexcept +{ + return (!x); +} + +template< typename T > +optional_nodiscard optional_constexpr bool operator==( nullopt_t /*unused*/, optional const & x ) optional_noexcept +{ + return (!x); +} + +template< typename T > +optional_nodiscard optional_constexpr bool operator!=( optional const & x, nullopt_t /*unused*/ ) optional_noexcept +{ + return bool(x); +} + +template< typename T > +optional_nodiscard optional_constexpr bool operator!=( nullopt_t /*unused*/, optional const & x ) optional_noexcept +{ + return bool(x); +} + +template< typename T > +optional_nodiscard optional_constexpr bool operator<( optional const & /*unused*/, nullopt_t /*unused*/ ) optional_noexcept +{ + return false; +} + +template< typename T > +optional_nodiscard optional_constexpr bool operator<( nullopt_t /*unused*/, optional const & x ) optional_noexcept +{ + return bool(x); +} + +template< typename T > +optional_nodiscard optional_constexpr bool operator<=( optional const & x, nullopt_t /*unused*/ ) optional_noexcept +{ + return (!x); +} + +template< typename T > +optional_nodiscard optional_constexpr bool operator<=( nullopt_t /*unused*/, optional const & /*unused*/ ) optional_noexcept +{ + return true; +} + +template< typename T > +optional_nodiscard optional_constexpr bool operator>( optional const & x, nullopt_t /*unused*/ ) optional_noexcept +{ + return bool(x); +} + +template< typename T > +optional_nodiscard optional_constexpr bool operator>( nullopt_t /*unused*/, optional const & /*unused*/ ) optional_noexcept +{ + return false; +} + +template< typename T > +optional_nodiscard optional_constexpr bool operator>=( optional const & /*unused*/, nullopt_t /*unused*/ ) optional_noexcept +{ + return true; +} + +template< typename T > +optional_nodiscard optional_constexpr bool operator>=( nullopt_t /*unused*/, optional const & x ) optional_noexcept +{ + return (!x); +} + +// Comparison with T + +template< typename T, typename U > +optional_nodiscard optional_constexpr bool operator==( optional const & x, U const & v ) +{ + return bool(x) ? *x == v : false; +} + +template< typename T, typename U > +optional_nodiscard optional_constexpr bool operator==( U const & v, optional const & x ) +{ + return bool(x) ? v == *x : false; +} + +template< typename T, typename U > +optional_nodiscard optional_constexpr bool operator!=( optional const & x, U const & v ) +{ + return bool(x) ? *x != v : true; +} + +template< typename T, typename U > +optional_nodiscard optional_constexpr bool operator!=( U const & v, optional const & x ) +{ + return bool(x) ? v != *x : true; +} + +template< typename T, typename U > +optional_nodiscard optional_constexpr bool operator<( optional const & x, U const & v ) +{ + return bool(x) ? *x < v : true; +} + +template< typename T, typename U > +optional_nodiscard optional_constexpr bool operator<( U const & v, optional const & x ) +{ + return bool(x) ? v < *x : false; +} + +template< typename T, typename U > +optional_nodiscard optional_constexpr bool operator<=( optional const & x, U const & v ) +{ + return bool(x) ? *x <= v : true; +} + +template< typename T, typename U > +optional_nodiscard optional_constexpr bool operator<=( U const & v, optional const & x ) +{ + return bool(x) ? v <= *x : false; +} + +template< typename T, typename U > +optional_nodiscard optional_constexpr bool operator>( optional const & x, U const & v ) +{ + return bool(x) ? *x > v : false; +} + +template< typename T, typename U > +optional_nodiscard optional_constexpr bool operator>( U const & v, optional const & x ) +{ + return bool(x) ? v > *x : true; +} + +template< typename T, typename U > +optional_nodiscard optional_constexpr bool operator>=( optional const & x, U const & v ) +{ + return bool(x) ? *x >= v : false; +} + +template< typename T, typename U > +optional_nodiscard optional_constexpr bool operator>=( U const & v, optional const & x ) +{ + return bool(x) ? v >= *x : true; +} + +// Specialized algorithms + +template< typename T +#if optional_CPP11_OR_GREATER + optional_REQUIRES_T( + std11::is_move_constructible::value + && std17::is_swappable::value ) +#endif +> +void swap( optional & x, optional & y ) +#if optional_CPP11_OR_GREATER + noexcept( noexcept( x.swap(y) ) ) +#endif +{ + x.swap( y ); +} + +#if optional_CPP11_OR_GREATER + +template< typename T > +optional_constexpr optional< typename std::decay::type > make_optional( T && value ) +{ + return optional< typename std::decay::type >( std::forward( value ) ); +} + +template< typename T, typename...Args > +optional_constexpr optional make_optional( Args&&... args ) +{ + return optional( nonstd_lite_in_place(T), std::forward(args)...); +} + +template< typename T, typename U, typename... Args > +optional_constexpr optional make_optional( std::initializer_list il, Args&&... args ) +{ + return optional( nonstd_lite_in_place(T), il, std::forward(args)...); +} + +#else + +template< typename T > +optional make_optional( T const & value ) +{ + return optional( value ); +} + +#endif // optional_CPP11_OR_GREATER + +} // namespace optional_lite + +using optional_lite::optional; +using optional_lite::nullopt_t; +using optional_lite::nullopt; + +#if ! optional_CONFIG_NO_EXCEPTIONS +using optional_lite::bad_optional_access; +#endif + +using optional_lite::make_optional; + +} // namespace nonstd + +#if optional_CPP11_OR_GREATER + +// specialize the std::hash algorithm: + +namespace std { + +template< class T > +struct hash< nonstd::optional > +{ +public: + std::size_t operator()( nonstd::optional const & v ) const optional_noexcept + { + return bool( v ) ? std::hash{}( *v ) : 0; + } +}; + +} //namespace std + +#endif // optional_CPP11_OR_GREATER + +#if defined(__clang__) +# pragma clang diagnostic pop +#elif defined(__GNUC__) +# pragma GCC diagnostic pop +#elif defined(_MSC_VER ) +# pragma warning( pop ) +#endif + +#endif // optional_USES_STD_OPTIONAL + +#endif // NONSTD_OPTIONAL_LITE_HPP diff --git a/graphics/asymptote/LspCpp/src/jsonrpc/serializer.cpp b/graphics/asymptote/LspCpp/src/jsonrpc/serializer.cpp new file mode 100755 index 0000000000..526dcc8884 --- /dev/null +++ b/graphics/asymptote/LspCpp/src/jsonrpc/serializer.cpp @@ -0,0 +1,214 @@ +#include "LibLsp/JsonRpc/serializer.h" +#include +#include +#include "LibLsp/JsonRpc/json.h" + + + +//// Elementary types + +void JsonNull::swap(JsonNull& arg) noexcept +{ +} + + +void Reflect(Reader& visitor, uint8_t& value) { + if (!visitor.IsInt()) + throw std::invalid_argument("uint8_t"); + value = (uint8_t)visitor.GetInt(); +} +void Reflect(Writer& visitor, uint8_t& value) { + visitor.Int(value); +} + +void Reflect(Reader& visitor, short& value) { + if (!visitor.IsInt()) + throw std::invalid_argument("short"); + value = (short)visitor.GetInt(); +} +void Reflect(Writer& visitor, short& value) { + visitor.Int(value); +} + +void Reflect(Reader& visitor, unsigned short& value) { + if (!visitor.IsInt()) + throw std::invalid_argument("unsigned short"); + value = (unsigned short)visitor.GetInt(); +} +void Reflect(Writer& visitor, unsigned short& value) { + visitor.Int(value); +} + +void Reflect(Reader& visitor, int& value) { + if (!visitor.IsInt()) + throw std::invalid_argument("int"); + value = visitor.GetInt(); +} +void Reflect(Writer& visitor, int& value) { + visitor.Int(value); +} + +void Reflect(Reader& visitor, unsigned& value) { + if (!visitor.IsUint64()) + throw std::invalid_argument("unsigned"); + value = visitor.GetUint32(); +} +void Reflect(Writer& visitor, unsigned& value) { + visitor.Uint32(value); +} + +void Reflect(Reader& visitor, long& value) { + if (!visitor.IsInt64()) + throw std::invalid_argument("long"); + value = long(visitor.GetInt64()); +} +void Reflect(Writer& visitor, long& value) { + visitor.Int64(value); +} + +void Reflect(Reader& visitor, unsigned long& value) { + if (!visitor.IsUint64()) + throw std::invalid_argument("unsigned long"); + value = (unsigned long)visitor.GetUint64(); +} +void Reflect(Writer& visitor, unsigned long& value) { + visitor.Uint64(value); +} + +void Reflect(Reader& visitor, long long& value) { + if (!visitor.IsInt64()) + throw std::invalid_argument("long long"); + value = visitor.GetInt64(); +} +void Reflect(Writer& visitor, long long& value) { + visitor.Int64(value); +} + +void Reflect(Reader& visitor, unsigned long long& value) { + if (!visitor.IsUint64()) + throw std::invalid_argument("unsigned long long"); + value = visitor.GetUint64(); +} +void Reflect(Writer& visitor, unsigned long long& value) { + visitor.Uint64(value); +} + +void Reflect(Reader& visitor, double& value) { + if (!visitor.IsNumber()) + throw std::invalid_argument("double"); + value = visitor.GetDouble(); +} +void Reflect(Writer& visitor, double& value) { + visitor.Double(value); +} + +void Reflect(Reader& visitor, bool& value) { + if (!visitor.IsBool()) + throw std::invalid_argument("bool"); + value = visitor.GetBool(); +} +void Reflect(Writer& visitor, bool& value) { + visitor.Bool(value); +} + +void Reflect(Reader& visitor, std::string& value) { + if (!visitor.IsString()) + throw std::invalid_argument("std::string"); + value = visitor.GetString(); +} +void Reflect(Writer& visitor, std::string& value) { + visitor.String(value.c_str(), (rapidjson::SizeType)value.size()); +} + +void Reflect(Reader& visitor, JsonNull& value) { + visitor.GetNull(); +} + +void Reflect(Writer& visitor, JsonNull& value) { + visitor.Null(); +} + + +void Reflect(Reader& visitor, SerializeFormat& value) { + std::string fmt = visitor.GetString(); + value = fmt[0] == 'm' ? SerializeFormat::MessagePack : SerializeFormat::Json; +} + +void Reflect(Writer& visitor, SerializeFormat& value) { + switch (value) { + case SerializeFormat::Json: + visitor.String("json"); + break; + case SerializeFormat::MessagePack: + visitor.String("msgpack"); + break; + } +} + + +std::string JsonReader::ToString() const +{ + rapidjson::StringBuffer strBuf; + strBuf.Clear(); + rapidjson::Writer writer(strBuf); + m_->Accept(writer); + std::string strJson = strBuf.GetString(); + return strJson; +} + +void JsonReader::IterMap(std::function fn) +{ + path_.push_back("0"); + for (auto& entry : m_->GetObject()) + { + auto saved = m_; + m_ = &(entry.value); + + fn(entry.name.GetString(), *this); + m_ = saved; + } + path_.pop_back(); +} + + void JsonReader::IterArray(std::function fn) +{ + if (!m_->IsArray()) + throw std::invalid_argument("array"); + // Use "0" to indicate any element for now. + path_.push_back("0"); + for (auto& entry : m_->GetArray()) + { + auto saved = m_; + m_ = &entry; + fn(*this); + m_ = saved; + } + path_.pop_back(); +} + +void JsonReader::DoMember(const char* name, std::function fn) +{ + path_.push_back(name); + auto it = m_->FindMember(name); + if (it != m_->MemberEnd()) + { + auto saved = m_; + m_ = &it->value; + fn(*this); + m_ = saved; + } + path_.pop_back(); +} + +std::string JsonReader::GetPath() const +{ + std::string ret; + for (auto& t : path_) + { + ret += '/'; + ret += t; + } + ret.pop_back(); + return ret; +} + diff --git a/graphics/asymptote/LspCpp/src/jsonrpc/threaded_queue.cpp b/graphics/asymptote/LspCpp/src/jsonrpc/threaded_queue.cpp new file mode 100755 index 0000000000..1f9a02ac0d --- /dev/null +++ b/graphics/asymptote/LspCpp/src/jsonrpc/threaded_queue.cpp @@ -0,0 +1,20 @@ +#include "LibLsp/JsonRpc/threaded_queue.h" + +// static +bool MultiQueueWaiter::HasState( + std::initializer_list queues) { + for (BaseThreadQueue* queue : queues) { + if (!queue->IsEmpty()) + return true; + } + return false; +} + +bool MultiQueueWaiter::ValidateWaiter( + std::initializer_list queues) { + for (BaseThreadQueue* queue : queues) { + if (queue->waiter.get() != this) + return false; + } + return true; +} diff --git a/graphics/asymptote/LspCpp/src/lsp/Markup.cpp b/graphics/asymptote/LspCpp/src/lsp/Markup.cpp new file mode 100755 index 0000000000..97860d969d --- /dev/null +++ b/graphics/asymptote/LspCpp/src/lsp/Markup.cpp @@ -0,0 +1,942 @@ +//===--- Markup.cpp -----------------------------------------*- C++-*------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://lsp.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +#include "LibLsp/lsp/Markup/Markup.h" + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace lsp { + + /// hexdigit - Return the hexadecimal character for the + /// given number \p X (which should be less than 16). + inline char hexdigit(unsigned X, bool LowerCase = false) { + const char HexChar = LowerCase ? 'a' : 'A'; + return X < 10 ? '0' + X : HexChar + X - 10; + } + + /// Given an array of c-style strings terminated by a null pointer, construct + /// a vector of StringRefs representing the same strings without the terminating + /// null string. + inline std::vector< std::string_ref> toStringRefArray(const char* const* Strings) { + std::vector< std::string_ref> Result; + while (*Strings) + Result.push_back(*Strings++); + return Result; + } + + /// Construct a string ref from a boolean. + inline std::string_ref toStringRef(bool B) { return std::string_ref(B ? "true" : "false"); } + + /// Construct a string ref from an array ref of unsigned chars. + inline std::string_ref toStringRef(const std::vector& Input) { + return std::string_ref(Input.begin(), Input.end()); + } + + /// Construct a string ref from an array ref of unsigned chars. + inline std::vector arrayRefFromStringRef(const std::string_ref& Input) { + return { Input.begin(), Input.end() }; + } + + /// Interpret the given character \p C as a hexadecimal digit and return its + /// value. + /// + /// If \p C is not a valid hex digit, -1U is returned. + inline unsigned hexDigitValue(char C) { + struct HexTable { + unsigned LUT[255] = {}; + constexpr HexTable() { + // Default initialize everything to invalid. + for (int i = 0; i < 255; ++i) + LUT[i] = ~0U; + // Initialize `0`-`9`. + for (int i = 0; i < 10; ++i) + LUT['0' + i] = i; + // Initialize `A`-`F` and `a`-`f`. + for (int i = 0; i < 6; ++i) + LUT['A' + i] = LUT['a' + i] = 10 + i; + } + }; + constexpr HexTable Table; + return Table.LUT[static_cast(C)]; + } + + /// Checks if character \p C is one of the 10 decimal digits. + inline bool isDigit(char C) { return C >= '0' && C <= '9'; } + + /// Checks if character \p C is a hexadecimal numeric character. + inline bool isHexDigit(char C) { return hexDigitValue(C) != ~0U; } + + /// Checks if character \p C is a valid letter as classified by "C" locale. + inline bool isAlpha(char C) { + return ('a' <= C && C <= 'z') || ('A' <= C && C <= 'Z'); + } + + /// Checks whether character \p C is either a decimal digit or an uppercase or + /// lowercase letter as classified by "C" locale. + inline bool isAlnum(char C) { return isAlpha(C) || isDigit(C); } + + /// Checks whether character \p C is valid ASCII (high bit is zero). + inline bool isASCII(char C) { return static_cast(C) <= 127; } + + /// Checks whether all characters in S are ASCII. + inline bool isASCII(std::string_ref S) { + for (char C : S) + { + if(!isASCII(C))return true; + } + return true; + } + + /// Checks whether character \p C is printable. + /// + /// Locale-independent version of the C standard library isprint whose results + /// may differ on different platforms. + inline bool isPrint(char C) { + unsigned char UC = static_cast(C); + return (0x20 <= UC) && (UC <= 0x7E); + } + + /// Checks whether character \p C is whitespace in the "C" locale. + /// + /// Locale-independent version of the C standard library isspace. + inline bool isSpace(char C) { + return C == ' ' || C == '\f' || C == '\n' || C == '\r' || C == '\t' || + C == '\v'; + } + + /// Returns the corresponding lowercase character if \p x is uppercase. + inline char toLower(char x) { + if (x >= 'A' && x <= 'Z') + return x - 'A' + 'a'; + return x; + } + + /// Returns the corresponding uppercase character if \p x is lowercase. + inline char toUpper(char x) { + if (x >= 'a' && x <= 'z') + return x - 'a' + 'A'; + return x; + } + + inline std::string utohexstr(uint64_t X, bool LowerCase = false) { + char Buffer[17]; + char* BufPtr = std::end(Buffer); + + if (X == 0) *--BufPtr = '0'; + + while (X) { + unsigned char Mod = static_cast(X) & 15; + *--BufPtr = hexdigit(Mod, LowerCase); + X >>= 4; + } + + return std::string(BufPtr, std::end(Buffer)); + } + + /// Convert buffer \p Input to its hexadecimal representation. + /// The returned string is double the size of \p Input. + inline std::string toHex( std::string_ref Input, bool LowerCase = false) { + static const char* const LUT = "0123456789ABCDEF"; + const uint8_t Offset = LowerCase ? 32 : 0; + size_t Length = Input.size(); + + std::string Output; + Output.reserve(2 * Length); + for (size_t i = 0; i < Length; ++i) { + const unsigned char c = Input[i]; + Output.push_back(LUT[c >> 4] | Offset); + Output.push_back(LUT[c & 15] | Offset); + } + return Output; + } + + inline std::string toHex(std::vector Input, bool LowerCase = false) { + return toHex(toStringRef(Input), LowerCase); + } + + /// Store the binary representation of the two provided values, \p MSB and + /// \p LSB, that make up the nibbles of a hexadecimal digit. If \p MSB or \p LSB + /// do not correspond to proper nibbles of a hexadecimal digit, this method + /// returns false. Otherwise, returns true. + inline bool tryGetHexFromNibbles(char MSB, char LSB, uint8_t& Hex) { + unsigned U1 = hexDigitValue(MSB); + unsigned U2 = hexDigitValue(LSB); + if (U1 == ~0U || U2 == ~0U) + return false; + + Hex = static_cast((U1 << 4) | U2); + return true; + } + + /// Return the binary representation of the two provided values, \p MSB and + /// \p LSB, that make up the nibbles of a hexadecimal digit. + inline uint8_t hexFromNibbles(char MSB, char LSB) { + uint8_t Hex = 0; + bool GotHex = tryGetHexFromNibbles(MSB, LSB, Hex); + (void)GotHex; + assert(GotHex && "MSB and/or LSB do not correspond to hex digits"); + return Hex; + } + + /// Convert hexadecimal string \p Input to its binary representation and store + /// the result in \p Output. Returns true if the binary representation could be + /// converted from the hexadecimal string. Returns false if \p Input contains + /// non-hexadecimal digits. The output string is half the size of \p Input. + inline bool tryGetFromHex( std::string_ref Input, std::string& Output) { + if (Input.empty()) + return true; + + Output.reserve((Input.size() + 1) / 2); + if (Input.size() % 2 == 1) { + uint8_t Hex = 0; + if (!tryGetHexFromNibbles('0', Input.front(), Hex)) + return false; + + Output.push_back(Hex); + Input = Input.drop_front(); + } + + assert(Input.size() % 2 == 0); + while (!Input.empty()) { + uint8_t Hex = 0; + if (!tryGetHexFromNibbles(Input[0], Input[1], Hex)) + return false; + + Output.push_back(Hex); + Input = Input.drop_front(2); + } + return true; + } + + /// Convert hexadecimal string \p Input to its binary representation. + /// The return string is half the size of \p Input. + inline std::string fromHex( std::string_ref Input) { + std::string Hex; + bool GotHex = tryGetFromHex(Input, Hex); + (void)GotHex; + assert(GotHex && "Input contains non hex digits"); + return Hex; + } + + + + inline std::string utostr(uint64_t X, bool isNeg = false) { + char Buffer[21]; + char* BufPtr = std::end(Buffer); + + if (X == 0) *--BufPtr = '0'; // Handle special case... + + while (X) { + *--BufPtr = '0' + char(X % 10); + X /= 10; + } + + if (isNeg) *--BufPtr = '-'; // Add negative sign... + return std::string(BufPtr, std::end(Buffer)); + } + + inline std::string itostr(int64_t X) { + if (X < 0) + return utostr(static_cast(1) + ~static_cast(X), true); + else + return utostr(static_cast(X)); + } + + /// StrInStrNoCase - Portable version of strcasestr. Locates the first + /// occurrence of string 's1' in string 's2', ignoring case. Returns + /// the offset of s2 in s1 or npos if s2 cannot be found. + std::string_ref::size_type StrInStrNoCase( std::string_ref s1, std::string_ref s2); + + /// getToken - This function extracts one token from source, ignoring any + /// leading characters that appear in the Delimiters string, and ending the + /// token at any of the characters that appear in the Delimiters string. If + /// there are no tokens in the source string, an empty string is returned. + /// The function returns a pair containing the extracted token and the + /// remaining tail string. + std::pair< std::string_ref, std::string_ref> getToken( std::string_ref Source, + std::string_ref Delimiters = " \t\n\v\f\r"); + + + + /// Returns the English suffix for an ordinal integer (-st, -nd, -rd, -th). + inline std::string_ref getOrdinalSuffix(unsigned Val) { + // It is critically important that we do this perfectly for + // user-written sequences with over 100 elements. + switch (Val % 100) { + case 11: + case 12: + case 13: + return "th"; + default: + switch (Val % 10) { + case 1: return "st"; + case 2: return "nd"; + case 3: return "rd"; + default: return "th"; + } + } + } + + namespace detail { + + template + inline std::string join_impl(IteratorT Begin, IteratorT End, + std::string_ref Separator, std::input_iterator_tag) { + std::string S; + if (Begin == End) + return S; + + S += (*Begin); + while (++Begin != End) { + S += Separator; + S += (*Begin); + } + return S; + } + + template + inline std::string join_impl(IteratorT Begin, IteratorT End, + std::string_ref Separator, std::forward_iterator_tag) { + std::string S; + if (Begin == End) + return S; + + size_t Len = (std::distance(Begin, End) - 1) * Separator.size(); + for (IteratorT I = Begin; I != End; ++I) + Len += (*I).size(); + S.reserve(Len); + size_t PrevCapacity = S.capacity(); + (void)PrevCapacity; + S += (*Begin); + while (++Begin != End) { + S += Separator; + S += (*Begin); + } + assert(PrevCapacity == S.capacity() && "String grew during building"); + return S; + } + + template + inline void join_items_impl(std::string& Result, Sep Separator) {} + + template + inline void join_items_impl(std::string& Result, Sep Separator, + const Arg& Item) { + Result += Item; + } + + template + inline void join_items_impl(std::string& Result, Sep Separator, const Arg1& A1, + Args &&... Items) { + Result += A1; + Result += Separator; + join_items_impl(Result, Separator, std::forward(Items)...); + } + + inline size_t join_one_item_size(char) { return 1; } + inline size_t join_one_item_size(const char* S) { return S ? ::strlen(S) : 0; } + + template inline size_t join_one_item_size(const T& Str) { + return Str.size(); + } + + inline size_t join_items_size() { return 0; } + + template inline size_t join_items_size(const A1& A) { + return join_one_item_size(A); + } + template + inline size_t join_items_size(const A1& A, Args &&... Items) { + return join_one_item_size(A) + join_items_size(std::forward(Items)...); + } + + } // end namespace detail + + /// Joins the strings in the range [Begin, End), adding Separator between + /// the elements. + template + inline std::string join(IteratorT Begin, IteratorT End, std::string_ref Separator) { + using tag = typename std::iterator_traits::iterator_category; + return detail::join_impl(Begin, End, Separator, tag()); + } + + /// Joins the strings in the range [R.begin(), R.end()), adding Separator + /// between the elements. + template + inline std::string join(Range&& R, std::string_ref Separator) { + return join(R.begin(), R.end(), Separator); + } + + /// Joins the strings in the parameter pack \p Items, adding \p Separator + /// between the elements. All arguments must be implicitly convertible to + /// std::string, or there should be an overload of std::string::operator+=() + /// that accepts the argument explicitly. + template + inline std::string join_items(Sep Separator, Args &&... Items) { + std::string Result; + if (sizeof...(Items) == 0) + return Result; + + size_t NS = detail::join_one_item_size(Separator); + size_t NI = detail::join_items_size(std::forward(Items)...); + Result.reserve(NI + (sizeof...(Items) - 1) * NS + 1); + detail::join_items_impl(Result, Separator, std::forward(Items)...); + return Result; + } + + /// A helper class to return the specified delimiter string after the first + /// invocation of operator std::string_ref(). Used to generate a comma-separated + /// list from a loop like so: + /// + /// \code + /// ListSeparator LS; + /// for (auto &I : C) + /// OS << LS << I.getName(); + /// \end + class ListSeparator { + bool First = true; + std::string_ref Separator; + + public: + ListSeparator( std::string_ref Separator = ", ") : Separator(Separator) {} + operator std::string_ref() { + if (First) { + First = false; + return {}; + } + return Separator; + } + }; + +} // end namespace lsp + +namespace lsp{ + +// Is ' || Contents.start_with("/>")) + return true; // May close the tag. + if (Contents.front() == '=') + return true; // Don't try to parse attribute values. + return false; // Random punctuation means this isn't a tag. + } + return true; // Potentially incomplete tag. +} + +// Tests whether C should be backslash-escaped in markdown. +// The string being escaped is Before + C + After. This is part of a paragraph. +// StartsLine indicates whether `Before` is the start of the line. +// After may not be everything until the end of the line. +// +// It's always safe to escape punctuation, but want minimal escaping. +// The strategy is to escape the first character of anything that might start +// a markdown grammar construct. +bool needsLeadingEscape(char C, std::string_ref Before, std::string_ref After, + bool StartsLine) { + + auto RulerLength = [&]() -> /*Length*/ unsigned { + if (!StartsLine || !Before.empty()) + return false; + std::string_ref A = After.trim_right(); + return std::all_of(A.begin(),A.end(), [C](char D) { return C == D; }) ? 1 + A.size() : 0; + }; + auto IsBullet = [&]() { + return StartsLine && Before.empty() && + (After.empty() || After.start_with(" ")); + }; + auto SpaceSurrounds = [&]() { + return (After.empty() || std::isspace(After.front())) && + (Before.empty() || std::isspace(Before.back())); + }; + + auto WordSurrounds = [&]() { + return (!After.empty() && std::isalnum(After.front())) && + (!Before.empty() && std::isalnum(Before.back())); + }; + + switch (C) { + case '\\': // Escaped character. + return true; + case '`': // Code block or inline code + // Any number of backticks can delimit an inline code block that can end + // anywhere (including on another line). We must escape them all. + return true; + case '~': // Code block + return StartsLine && Before.empty() && After.start_with("~~"); + case '#': { // ATX heading. + if (!StartsLine || !Before.empty()) + return false; + std::string_ref& Rest = After.trim_left(C); + return Rest.empty() || Rest.start_with(" "); + } + case ']': // Link or link reference. + // We escape ] rather than [ here, because it's more constrained: + // ](...) is an in-line link + // ]: is a link reference + // The following are only links if the link reference exists: + // ] by itself is a shortcut link + // ][...] is an out-of-line link + // Because we never emit link references, we don't need to handle these. + return After.start_with(":") || After.start_with("("); + case '=': // Setex heading. + return RulerLength() > 0; + case '_': // Horizontal ruler or matched delimiter. + if (RulerLength() >= 3) + return true; + // Not a delimiter if surrounded by space, or inside a word. + // (The rules at word boundaries are subtle). + return !(SpaceSurrounds() || WordSurrounds()); + case '-': // Setex heading, horizontal ruler, or bullet. + if (RulerLength() > 0) + return true; + return IsBullet(); + case '+': // Bullet list. + return IsBullet(); + case '*': // Bullet list, horizontal ruler, or delimiter. + return IsBullet() || RulerLength() >= 3 || !SpaceSurrounds(); + case '<': // HTML tag (or autolink, which we choose not to escape) + return looksLikeTag(After); + case '>': // Quote marker. Needs escaping at start of line. + return StartsLine && Before.empty(); + case '&': { // HTML entity reference + auto End = After.find(';'); + if (End == std::string_ref::npos) + return false; + std::string_ref Content = After.substr(0, End); + if (Content.consume_front("#")) + { + if (Content.consume_front("x") || Content.consume_front("X")) + { + return std::all_of(Content.begin(),Content.end(), lsp::isHexDigit); + } + + return std::all_of(Content.begin(), Content.end(), [](char c) + { + return lsp::isDigit(c); + }); + } + return std::all_of(Content.begin(), Content.end(), [](char c) + { + return lsp::isAlpha(c); + }); + } + case '.': // Numbered list indicator. Escape 12. -> 12\. at start of line. + case ')': + return StartsLine && !Before.empty() && + std::all_of(Before.begin(), Before.end(), [](char c) + { + return lsp::isDigit(c); + }) && After.start_with(" "); + default: + return false; + } +} + +/// Escape a markdown text block. Ensures the punctuation will not introduce +/// any of the markdown constructs. + std::string_ref renderText(const std::string_ref& Input, bool StartsLine) { + std::string_ref R; + for (unsigned I = 0; I < Input.size(); ++I) { + if (needsLeadingEscape(Input[I], Input.substr(0, I), Input.substr(I + 1), + StartsLine)) + R.push_back('\\'); + R.push_back(Input[I]); + } + return R; +} + +/// Renders \p Input as an inline block of code in markdown. The returned value +/// is surrounded by backticks and the inner contents are properly escaped. + std::string_ref renderInlineBlock(const std::string_ref& Input) { + std::string_ref R; + // Double all backticks to make sure we don't close the inline block early. + for (size_t From = 0; From < Input.size();) { + size_t Next = Input.find("`", From); + R += Input.substr(From, Next - From); + if (Next == std::string_ref::npos) + break; + R += "``"; // double the found backtick. + + From = Next + 1; + } + // If results starts with a backtick, add spaces on both sides. The spaces + // are ignored by markdown renderers. + if (std::string_ref(R).start_with("`") || std::string_ref(R).end_with("`")) + return "` " + std::move(R) + " `"; + // Markdown render should ignore first and last space if both are there. We + // add an extra pair of spaces in that case to make sure we render what the + // user intended. + if (std::string_ref(R).start_with(" ") && std::string_ref(R).end_with(" ")) + return "` " + std::move(R) + " `"; + return "`" + std::move(R) + "`"; +} + +/// Get marker required for \p Input to represent a markdown codeblock. It +/// consists of at least 3 backticks(`). Although markdown also allows to use +/// tilde(~) for code blocks, they are never used. + std::string_ref getMarkerForCodeBlock(const std::string_ref& Input) { + // Count the maximum number of consecutive backticks in \p Input. We need to + // start and end the code block with more. + unsigned MaxBackticks = 0; + unsigned Backticks = 0; + for (char C : Input) { + if (C == '`') { + ++Backticks; + continue; + } + MaxBackticks = std::max(MaxBackticks, Backticks); + Backticks = 0; + } + MaxBackticks = std::max(Backticks, MaxBackticks); + // Use the corresponding number of backticks to start and end a code block. + return std::string_ref(/*Repeat=*/std::max(3u, MaxBackticks + 1), '`'); +} + + /// SplitString - Split up the specified string according to the specified +/// delimiters, appending the result fragments to the output list. + void SplitString(const std::string& Source, + std::vector& OutFragments, + std::string Delimiters = " \t\n\v\f\r") +{ + boost::split(OutFragments, Source, boost::is_any_of(Delimiters)); +} + + +// Trims the input and concatenates whitespace blocks into a single ` `. + std::string_ref canonicalizeSpaces(const std::string_ref& Input) { + std::vector Words; + SplitString(Input, Words); + + return lsp::join(Words, " "); +} + + + std::string_ref renderBlocks( std::vector&& Children, + void (Block::* RenderFunc)(std::ostringstream&) const) { + std::string_ref R; + std::ostringstream OS(R); + + std::vector v{ 1, 2, 3 }; + + // Trim rulers. + Children.erase(std::remove_if(Children.begin(), Children.end(), [](const Block* C) + { + return C->isRuler(); + }), Children.end()); + + bool LastBlockWasRuler = true; + for (const auto& C : Children) { + if (C->isRuler() && LastBlockWasRuler) + continue; + LastBlockWasRuler = C->isRuler(); + ((*C).*RenderFunc)(OS); + } + + // Get rid of redundant empty lines introduced in plaintext while imitating + // padding in markdown. + std::string_ref AdjustedResult; + std::string_ref TrimmedText(OS.str()); + TrimmedText = TrimmedText.trim(); + + std::copy_if(TrimmedText.begin(), TrimmedText.end(), + std::back_inserter(AdjustedResult), + [&TrimmedText](const char& C) { + return !std::string_ref(TrimmedText.data(), + &C - TrimmedText.data() + 1) + // We allow at most two newlines. + .end_with("\n\n\n"); + }); + + return AdjustedResult; + }; + std::string_ref renderBlocks(const std::vector >& children, + void (Block::* renderFunc)(std::ostringstream&) const) + { + std::vector temp(children.size(), nullptr); + for(size_t i = 0 ; i < children.size() ; ++i) + { + temp[i]=(children[i].get()); + } + return renderBlocks(std::move(temp), renderFunc); + } +// Separates two blocks with extra spacing. Note that it might render strangely +// in vscode if the trailing block is a codeblock, see +// https://github.com/microsoft/vscode/issues/88416 for details. +class Ruler : public Block { +public: + void renderMarkdown(std::ostringstream &OS) const override { + // Note that we need an extra new line before the ruler, otherwise we might + // make previous block a title instead of introducing a ruler. + OS << "\n---\n"; + } + void renderPlainText(std::ostringstream &OS) const override { OS << '\n'; } + std::unique_ptr clone() const override { + return std::make_unique(*this); + } + bool isRuler() const override { return true; } +}; + +class CodeBlock : public Block { +public: + void renderMarkdown(std::ostringstream &OS) const override { + std::string_ref Marker = getMarkerForCodeBlock(Contents); + // No need to pad from previous blocks, as they should end with a new line. + OS << Marker << Language << '\n' << Contents << '\n' << Marker << '\n'; + } + + void renderPlainText(std::ostringstream &OS) const override { + // In plaintext we want one empty line before and after codeblocks. + OS << '\n' << Contents << "\n\n"; + } + + std::unique_ptr clone() const override { + return std::make_unique(*this); + } + + CodeBlock( std::string_ref Contents, std::string_ref Language) + : Contents(std::move(Contents)), Language(std::move(Language)) {} + +private: + + std::string_ref Contents; + std::string_ref Language; +}; + +// Inserts two spaces after each `\n` to indent each line. First line is not +// indented. + std::string_ref indentLines(const std::string_ref& Input) { + assert(!Input.end_with("\n") && "Input should've been trimmed."); + std::string_ref IndentedR; + // We'll add 2 spaces after each new line. + IndentedR.reserve(Input.size() + Input.count("\n") * 2); + for (char C : Input) { + IndentedR += C; + if (C == '\n') + IndentedR.append(" "); + } + return IndentedR; +} + +class Heading : public Paragraph { +public: + Heading(size_t Level) : Level(Level) {} + void renderMarkdown(std::ostringstream &OS) const override { + OS << std::string_ref(Level, '#') << ' '; + Paragraph::renderMarkdown(OS); + } + +private: + size_t Level; +}; + + + + + + std::string_ref Block::asMarkdown() const { + std::string_ref R; + std::ostringstream OS(R); + renderMarkdown(OS); + return std::string_ref(OS.str()).trim(); +} + + std::string_ref Block::asPlainText() const { + std::string_ref R; + std::ostringstream OS(R); + renderPlainText(OS); + return std::string_ref(OS.str()).trim().c_str(); +} + + void Paragraph::renderMarkdown(std::ostringstream& OS) const { + bool NeedsSpace = false; + bool HasChunks = false; + for (auto& C : Chunks) { + if (C.SpaceBefore || NeedsSpace) + OS << " "; + switch (C.Kind) { + case Chunk::PlainText: + OS << renderText(C.Contents, !HasChunks); + break; + case Chunk::InlineCode: + OS << renderInlineBlock(C.Contents); + break; + } + HasChunks = true; + NeedsSpace = C.SpaceAfter; + } + // Paragraphs are translated into markdown lines, not markdown paragraphs. + // Therefore it only has a single linebreak afterwards. + // VSCode requires two spaces at the end of line to start a new one. + OS << " \n"; + } + + std::unique_ptr Paragraph::clone() const { + return std::make_unique(*this); + } + + /// Choose a marker to delimit `Text` from a prioritized list of options. + /// This is more readable than escaping for plain-text. + std::string_ref chooseMarker(std::vector Options, + const std::string_ref& Text) + { + // Prefer a delimiter whose characters don't appear in the text. + for (std::string_ref& S : Options) + if (Text.find_first_of(S) == std::string_ref::npos) + return S; + return Options.front(); + } + + void Paragraph::renderPlainText(std::ostringstream& OS) const { + bool NeedsSpace = false; + for (auto& C : Chunks) { + if (C.SpaceBefore || NeedsSpace) + OS << " "; + std::string_ref Marker = ""; + if (C.Preserve && C.Kind == Chunk::InlineCode) + Marker = chooseMarker({ "`", "'", "\"" }, C.Contents); + OS << Marker << C.Contents << Marker; + NeedsSpace = C.SpaceAfter; + } + OS << '\n'; + } + + void BulletList::renderMarkdown(std::ostringstream& OS) const { + for (auto& D : Items) { + // Instead of doing this we might prefer passing Indent to children to get + // rid of the copies, if it turns out to be a bottleneck. + + OS << "- "; + OS << indentLines(D.asMarkdown()) << '\n'; + } + // We need a new line after list to terminate it in markdown. + OS << '\n'; + } + + void BulletList::renderPlainText(std::ostringstream& OS) const { + for (auto& D : Items) { + // Instead of doing this we might prefer passing Indent to children to get + // rid of the copies, if it turns out to be a bottleneck. + OS << "- " << indentLines(D.asPlainText()) << '\n'; + } + } + + Paragraph& Paragraph::appendSpace() { + if (!Chunks.empty()) + Chunks.back().SpaceAfter = true; + return *this; + } + + Paragraph& Paragraph::appendText(const std::string_ref& Text) { + std::string_ref Norm = canonicalizeSpaces(Text); + if (Norm.empty()) + return *this; + Chunks.emplace_back(); + Chunk& C = Chunks.back(); + C.Contents = std::move(Norm); + C.Kind = Chunk::PlainText; + + C.SpaceBefore = std::isspace(Text.front()); + C.SpaceAfter = std::isspace(Text.back()); + return *this; + } + + Paragraph& Paragraph::appendCode(const std::string_ref& Code, bool Preserve) { + bool AdjacentCode = + !Chunks.empty() && Chunks.back().Kind == Chunk::InlineCode; + std::string_ref Norm = canonicalizeSpaces(Code); + if (Norm.empty()) + return *this; + Chunks.emplace_back(); + Chunk& C = Chunks.back(); + C.Contents = std::move(Norm); + C.Kind = Chunk::InlineCode; + C.Preserve = Preserve; + // Disallow adjacent code spans without spaces, markdown can't render them. + C.SpaceBefore = AdjacentCode; + return *this; + } + + std::unique_ptr BulletList::clone() const { + return std::make_unique(*this); + } + + class Document& BulletList::addItem() { + Items.emplace_back(); + return Items.back(); + } + + Document& Document::operator=(const Document& Other) { + Children.clear(); + for (const auto& C : Other.Children) + Children.push_back(C->clone()); + return *this; + } + + void Document::append(Document Other) { + std::move(Other.Children.begin(), Other.Children.end(), + std::back_inserter(Children)); + } + + Paragraph& Document::addParagraph() { + Children.push_back(std::make_unique()); + return *static_cast(Children.back().get()); + } + + void Document::addRuler() { Children.push_back(std::make_unique()); } + + void Document::addCodeBlock(std::string_ref Code, std::string_ref Language) { + Children.emplace_back( + std::make_unique(std::move(Code), std::move(Language))); + } + + std::string_ref Document::asMarkdown() const { + return renderBlocks(Children, &Block::renderMarkdown); + } + + std::string_ref Document::asPlainText() const { + return renderBlocks(Children, &Block::renderPlainText); + } + + BulletList& Document::addBulletList() { + Children.emplace_back(std::make_unique()); + return *static_cast(Children.back().get()); + } + + Paragraph& Document::addHeading(size_t Level) { + assert(Level > 0); + Children.emplace_back(std::make_unique(Level)); + return *static_cast(Children.back().get()); + } + }; \ No newline at end of file diff --git a/graphics/asymptote/LspCpp/src/lsp/ParentProcessWatcher.cpp b/graphics/asymptote/LspCpp/src/lsp/ParentProcessWatcher.cpp new file mode 100755 index 0000000000..57adb7e497 --- /dev/null +++ b/graphics/asymptote/LspCpp/src/lsp/ParentProcessWatcher.cpp @@ -0,0 +1,106 @@ +#include "LibLsp/lsp/ParentProcessWatcher.h" +#include + +#ifdef _WIN32 +#include +#endif + +#include +#include +#include + +#include "LibLsp/lsp/ProcessIoService.h" +#include "LibLsp/lsp/SimpleTimer.h" + + +using namespace boost::asio::ip; +using namespace std; + +struct ParentProcessWatcher::ParentProcessWatcherData : std::enable_shared_from_this +{ + std::unique_ptr> timer; + lsp::Log& _log; + std::function on_exit; + lsp::ProcessIoService asio_io; + std::shared_ptr < boost::process::opstream> write_to_service; + std::shared_ptr< boost::process::ipstream > read_from_service; + int pid; + const int _poll_delay_secs /*= 10*/; + std::string command; + std::shared_ptr c; + + ParentProcessWatcherData(lsp::Log& log, int _pid, + const std::function&& callback, uint32_t poll_delay_secs) : + _log(log), on_exit(callback), pid(_pid), _poll_delay_secs(poll_delay_secs) + { +#ifdef _WIN32 + command = "cmd /c \"tasklist /FI \"PID eq " + std::to_string(pid) + "\" | findstr " + + std::to_string(pid) + "\""; +#else + command = "ps -p " + std::to_string(pid); +#endif + + } + + void run() + { + write_to_service = std::make_shared(); + read_from_service = std::make_shared(); + +// const uint32_t POLL_DELAY_SECS = _poll_delay_secs; + auto self(shared_from_this()); + std::error_code ec; + namespace bp = boost::process; + c = std::make_shared(asio_io.getIOService(), command, + ec, +#ifdef _WIN32 + bp::windows::hide, +#endif + bp::std_out > *read_from_service, + bp::std_in < *write_to_service, + bp::on_exit([self](int exit_code, const std::error_code& ec_in) { + // the tasklist command should return 0 (parent process exists) or 1 (parent process doesn't exist) + if (exit_code == 1)// + { + if (self->on_exit) + { + + std::thread([=]() + { + std::this_thread::sleep_for(std::chrono::seconds(3)); + self->on_exit(); + }).detach(); + } + } + else + { + if (exit_code > 1) + { + self->_log.log(lsp::Log::Level::WARNING, "The tasklist command: '" + self->command + "' returns " + std::to_string(exit_code)); + } + + self->timer = std::make_unique>(self->_poll_delay_secs, [=]() { + self->run(); + }); + } + + })); + if (ec) + { + // fail + _log.log(lsp::Log::Level::SEVERE, "Start parent process watcher failed."); + } + } +}; + +ParentProcessWatcher::ParentProcessWatcher(lsp::Log& log, int pid, + const std::function&& callback, uint32_t poll_delay_secs) : d_ptr(new ParentProcessWatcherData(log, pid, std::move(callback), poll_delay_secs)) +{ + d_ptr->run(); +} + +ParentProcessWatcher::~ParentProcessWatcher() +{ + if (d_ptr->timer) + d_ptr->timer->Stop(); +} diff --git a/graphics/asymptote/LspCpp/src/lsp/ProtocolJsonHandler.cpp b/graphics/asymptote/LspCpp/src/lsp/ProtocolJsonHandler.cpp new file mode 100755 index 0000000000..af008e9eb9 --- /dev/null +++ b/graphics/asymptote/LspCpp/src/lsp/ProtocolJsonHandler.cpp @@ -0,0 +1,716 @@ +#include "LibLsp/lsp/ProtocolJsonHandler.h" +#include "LibLsp/lsp/general/initialize.h" +#include "LibLsp/lsp/general/shutdown.h" +#include "LibLsp/lsp/textDocument/code_action.h" +#include "LibLsp/lsp/textDocument/code_lens.h" +#include "LibLsp/lsp/textDocument/completion.h" + + +#include "LibLsp/lsp/textDocument/did_close.h" + +#include "LibLsp/lsp/textDocument/highlight.h" +#include "LibLsp/lsp/textDocument/document_link.h" +#include "LibLsp/lsp/textDocument/formatting.h" +#include "LibLsp/lsp/textDocument/hover.h" +#include "LibLsp/lsp/textDocument/implementation.h" +#include "LibLsp/lsp/textDocument/range_formatting.h" +#include "LibLsp/lsp/textDocument/references.h" +#include "LibLsp/lsp/textDocument/rename.h" +#include "LibLsp/lsp/textDocument/signature_help.h" +#include "LibLsp/lsp/textDocument/type_definition.h" +#include "LibLsp/lsp/workspace/symbol.h" +#include "LibLsp/lsp/textDocument/typeHierarchy.h" +#include "LibLsp/lsp/out_list.h" +#include "LibLsp/lsp/extention/jdtls/codeActionResult.h" +#include "LibLsp/lsp/textDocument/declaration_definition.h" +#include "LibLsp/lsp/textDocument/resolveCompletionItem.h" +#include "LibLsp/lsp/textDocument/resolveCodeLens.h" +#include "LibLsp/lsp/textDocument/colorPresentation.h" +#include "LibLsp/lsp/textDocument/foldingRange.h" +#include "LibLsp/lsp/textDocument/prepareRename.h" +#include "LibLsp/lsp/textDocument/resolveTypeHierarchy.h" +#include "LibLsp/lsp/textDocument/callHierarchy.h" +#include "LibLsp/lsp/textDocument/selectionRange.h" +#include "LibLsp/lsp/extention/jdtls/classFileContents.h" +#include "LibLsp/lsp/extention/jdtls/buildWorkspace.h" +#include "LibLsp/lsp/extention/jdtls/listOverridableMethods.h" +#include "LibLsp/lsp/extention/jdtls/addOverridableMethods.h" +#include "LibLsp/lsp/extention/jdtls/checkHashCodeEqualsStatus.h" +#include "LibLsp/lsp/extention/jdtls/checkConstructorsStatus.h" +#include "LibLsp/lsp/extention/jdtls/checkDelegateMethodsStatus.h" +#include "LibLsp/lsp/extention/jdtls/checkToStringStatus.h" +#include "LibLsp/lsp/extention/jdtls/executeCommand.h" +#include "LibLsp/lsp/extention/jdtls/findLinks.h" +#include "LibLsp/lsp/extention/jdtls/generateAccessors.h" +#include "LibLsp/lsp/extention/jdtls/generateConstructors.h" +#include "LibLsp/lsp/extention/jdtls/generateDelegateMethods.h" +#include "LibLsp/lsp/extention/jdtls/generateHashCodeEquals.h" +#include "LibLsp/lsp/extention/jdtls/generateToString.h" +#include "LibLsp/lsp/extention/jdtls/getMoveDestinations.h" +#include "LibLsp/lsp/extention/jdtls/Move.h" +#include "LibLsp/lsp/extention/jdtls/organizeImports.h" +#include "LibLsp/lsp/general/exit.h" +#include "LibLsp/lsp/general/initialized.h" +#include "LibLsp/lsp/extention/jdtls/projectConfigurationUpdate.h" +#include "LibLsp/lsp/textDocument/did_change.h" +#include "LibLsp/lsp/textDocument/did_open.h" +#include "LibLsp/lsp/textDocument/did_save.h" +#include "LibLsp/lsp/textDocument/publishDiagnostics.h" +#include "LibLsp/lsp/textDocument/willSave.h" + +#include "LibLsp/lsp/workspace/didChangeWorkspaceFolders.h" +#include "LibLsp/lsp/workspace/did_change_configuration.h" +#include "LibLsp/lsp/workspace/did_change_watched_files.h" +#include "LibLsp/lsp/windows/MessageNotify.h" +#include "LibLsp/lsp/language/language.h" +#include "LibLsp/lsp/client/registerCapability.h" +#include "LibLsp/lsp/client/unregisterCapability.h" +#include "LibLsp/JsonRpc/Cancellation.h" +#include "LibLsp/lsp/textDocument/didRenameFiles.h" +#include "LibLsp/lsp/textDocument/semanticHighlighting.h" +#include "LibLsp/lsp/workspace/configuration.h" + + +void AddStadardResponseJsonRpcMethod(MessageJsonHandler& handler) +{ + + handler.method2response[td_initialize::request::kMethodInfo] = [](Reader& visitor) + { + if(visitor.HasMember("error")) + return Rsp_Error::ReflectReader(visitor); + + return td_initialize::response::ReflectReader(visitor); + }; + + handler.method2response[td_shutdown::request::kMethodInfo] = [](Reader& visitor) + { + if (visitor.HasMember("error")) + return Rsp_Error::ReflectReader(visitor); + return td_shutdown::response::ReflectReader(visitor); + }; + handler.method2response[td_codeAction::request::kMethodInfo] = [](Reader& visitor) + { + if (visitor.HasMember("error")) + return Rsp_Error::ReflectReader(visitor); + + return td_codeAction::response::ReflectReader(visitor); + }; + handler.method2response[td_codeLens::request::kMethodInfo] = [](Reader& visitor) + { + if (visitor.HasMember("error")) + return Rsp_Error::ReflectReader(visitor); + return td_codeLens::response::ReflectReader(visitor); + }; + handler.method2response[td_completion::request::kMethodInfo] = [](Reader& visitor) + { + if (visitor.HasMember("error")) + return Rsp_Error::ReflectReader(visitor); + return td_completion::response::ReflectReader(visitor); + }; + + handler.method2response[td_definition::request::kMethodInfo] = [](Reader& visitor) + { + if (visitor.HasMember("error")) + return Rsp_Error::ReflectReader(visitor); + return td_definition::response::ReflectReader(visitor); + }; + handler.method2response[td_declaration::request::kMethodInfo] = [](Reader& visitor) + { + if (visitor.HasMember("error")) + return Rsp_Error::ReflectReader(visitor); + return td_declaration::response::ReflectReader(visitor); + }; + handler.method2response[td_willSaveWaitUntil::request::kMethodInfo] = [](Reader& visitor) + { + if (visitor.HasMember("error")) + return Rsp_Error::ReflectReader(visitor); + return td_willSaveWaitUntil::response::ReflectReader(visitor); + }; + + handler.method2response[td_highlight::request::kMethodInfo] = [](Reader& visitor) + { + if (visitor.HasMember("error")) + return Rsp_Error::ReflectReader(visitor); + return td_highlight::response::ReflectReader(visitor); + }; + + handler.method2response[td_links::request::kMethodInfo] = [](Reader& visitor) + { + if (visitor.HasMember("error")) + return Rsp_Error::ReflectReader(visitor); + return td_links::response::ReflectReader(visitor); + }; + + handler.method2response[td_linkResolve::request::kMethodInfo] = [](Reader& visitor) + { + if (visitor.HasMember("error")) + return Rsp_Error::ReflectReader(visitor); + return td_linkResolve::response::ReflectReader(visitor); + }; + + handler.method2response[td_symbol::request::kMethodInfo] = [](Reader& visitor) + { + if (visitor.HasMember("error")) + return Rsp_Error::ReflectReader(visitor); + return td_symbol::response::ReflectReader(visitor); + }; + + handler.method2response[td_formatting::request::kMethodInfo] = [](Reader& visitor) + { + if (visitor.HasMember("error")) + return Rsp_Error::ReflectReader(visitor); + return td_formatting::response::ReflectReader(visitor); + }; + + handler.method2response[td_hover::request::kMethodInfo] = [](Reader& visitor) + { + if (visitor.HasMember("error")) + return Rsp_Error::ReflectReader(visitor); + return td_hover::response::ReflectReader(visitor); + + }; + + handler.method2response[td_implementation::request::kMethodInfo] = [](Reader& visitor) + { + if (visitor.HasMember("error")) + return Rsp_Error::ReflectReader(visitor); + return td_implementation::response::ReflectReader(visitor); + }; + + handler.method2response[td_rangeFormatting::request::kMethodInfo] = [](Reader& visitor) + { + if (visitor.HasMember("error")) + return Rsp_Error::ReflectReader(visitor); + return td_rangeFormatting::response::ReflectReader(visitor); + }; + + handler.method2response[td_references::request::kMethodInfo] = [](Reader& visitor) + { + if (visitor.HasMember("error")) + return Rsp_Error::ReflectReader(visitor); + return td_references::response::ReflectReader(visitor); + }; + + handler.method2response[td_rename::request::kMethodInfo] = [](Reader& visitor) + { + if (visitor.HasMember("error")) + return Rsp_Error::ReflectReader(visitor); + return td_rename::response::ReflectReader(visitor); + }; + + + handler.method2response[td_signatureHelp::request::kMethodInfo] = [](Reader& visitor) + { + if (visitor.HasMember("error")) + return Rsp_Error::ReflectReader(visitor); + return td_signatureHelp::response::ReflectReader(visitor); + }; + + handler.method2response[td_typeDefinition::request::kMethodInfo] = [](Reader& visitor) + { + if (visitor.HasMember("error")) + return Rsp_Error::ReflectReader(visitor); + return td_typeDefinition::response::ReflectReader(visitor); + }; + + handler.method2response[wp_executeCommand::request::kMethodInfo] = [](Reader& visitor) + { + if (visitor.HasMember("error")) + return Rsp_Error::ReflectReader(visitor); + return wp_executeCommand::response::ReflectReader(visitor); + }; + + handler.method2response[wp_symbol::request::kMethodInfo] = [](Reader& visitor) + { + if (visitor.HasMember("error")) + return Rsp_Error::ReflectReader(visitor); + return wp_symbol::response::ReflectReader(visitor); + }; + handler.method2response[td_typeHierarchy::request::kMethodInfo] = [](Reader& visitor) + { + if (visitor.HasMember("error")) + return Rsp_Error::ReflectReader(visitor); + return td_typeHierarchy::response::ReflectReader(visitor); + }; + handler.method2response[completionItem_resolve::request::kMethodInfo] = [](Reader& visitor) + { + if (visitor.HasMember("error")) + return Rsp_Error::ReflectReader(visitor); + return completionItem_resolve::response::ReflectReader(visitor); + }; + + handler.method2response[codeLens_resolve::request::kMethodInfo] = [](Reader& visitor) + { + if (visitor.HasMember("error")) + return Rsp_Error::ReflectReader(visitor); + + return codeLens_resolve::response::ReflectReader(visitor); + + }; + + handler.method2response[td_colorPresentation::request::kMethodInfo] = [](Reader& visitor) + { + if (visitor.HasMember("error")) + return Rsp_Error::ReflectReader(visitor); + + return td_colorPresentation::response::ReflectReader(visitor); + + }; + handler.method2response[td_documentColor::request::kMethodInfo] = [](Reader& visitor) + { + if (visitor.HasMember("error")) + return Rsp_Error::ReflectReader(visitor); + + return td_documentColor::response::ReflectReader(visitor); + + }; + handler.method2response[td_foldingRange::request::kMethodInfo] = [](Reader& visitor) + { + if (visitor.HasMember("error")) + return Rsp_Error::ReflectReader(visitor); + + return td_foldingRange::response::ReflectReader(visitor); + + }; + handler.method2response[td_prepareRename::request::kMethodInfo] = [](Reader& visitor) + { + if (visitor.HasMember("error")) + return Rsp_Error::ReflectReader(visitor); + + return td_prepareRename::response::ReflectReader(visitor); + + }; + handler.method2response[typeHierarchy_resolve::request::kMethodInfo] = [](Reader& visitor) + { + if (visitor.HasMember("error")) + return Rsp_Error::ReflectReader(visitor); + + return typeHierarchy_resolve::response::ReflectReader(visitor); + + }; + + handler.method2response[td_selectionRange::request::kMethodInfo] = [](Reader& visitor) + { + if (visitor.HasMember("error")) + return Rsp_Error::ReflectReader(visitor); + + return td_selectionRange::response::ReflectReader(visitor); + + }; + handler.method2response[td_didRenameFiles::request::kMethodInfo] = [](Reader& visitor) + { + if (visitor.HasMember("error")) + return Rsp_Error::ReflectReader(visitor); + + return td_didRenameFiles::response::ReflectReader(visitor); + + }; + handler.method2response[td_willRenameFiles::request::kMethodInfo] = [](Reader& visitor) + { + if (visitor.HasMember("error")) + return Rsp_Error::ReflectReader(visitor); + + return td_willRenameFiles::response::ReflectReader(visitor); + + }; + +} + + +void AddJavaExtentionResponseJsonRpcMethod(MessageJsonHandler& handler) +{ + handler.method2response[java_classFileContents::request::kMethodInfo] = [](Reader& visitor) + { + if (visitor.HasMember("error")) + return Rsp_Error::ReflectReader(visitor); + + return java_classFileContents::response::ReflectReader(visitor); + }; + handler.method2response[java_buildWorkspace::request::kMethodInfo] = [](Reader& visitor) + { + if (visitor.HasMember("error")) + return Rsp_Error::ReflectReader(visitor); + + return java_buildWorkspace::response::ReflectReader(visitor); + }; + handler.method2response[java_listOverridableMethods::request::kMethodInfo] = [](Reader& visitor) + { + if (visitor.HasMember("error")) + return Rsp_Error::ReflectReader(visitor); + + return java_listOverridableMethods::response::ReflectReader(visitor); + }; + handler.method2response[java_listOverridableMethods::request::kMethodInfo] = [](Reader& visitor) + { + if (visitor.HasMember("error")) + return Rsp_Error::ReflectReader(visitor); + + return java_listOverridableMethods::response::ReflectReader(visitor); + }; + + handler.method2response[java_checkHashCodeEqualsStatus::request::kMethodInfo] = [](Reader& visitor) + { + if (visitor.HasMember("error")) + return Rsp_Error::ReflectReader(visitor); + + return java_checkHashCodeEqualsStatus::response::ReflectReader(visitor); + }; + + + handler.method2response[java_addOverridableMethods::request::kMethodInfo] = [](Reader& visitor) + { + if (visitor.HasMember("error")) + return Rsp_Error::ReflectReader(visitor); + + return java_addOverridableMethods::response::ReflectReader(visitor); + }; + + handler.method2response[java_checkConstructorsStatus::request::kMethodInfo] = [](Reader& visitor) + { + if (visitor.HasMember("error")) + return Rsp_Error::ReflectReader(visitor); + + return java_checkConstructorsStatus::response::ReflectReader(visitor); + }; + + + handler.method2response[java_checkDelegateMethodsStatus::request::kMethodInfo] = [](Reader& visitor) + { + if (visitor.HasMember("error")) + return Rsp_Error::ReflectReader(visitor); + + return java_checkDelegateMethodsStatus::response::ReflectReader(visitor); + }; + handler.method2response[java_checkToStringStatus::request::kMethodInfo] = [](Reader& visitor) + { + if (visitor.HasMember("error")) + return Rsp_Error::ReflectReader(visitor); + + return java_checkToStringStatus::response::ReflectReader(visitor); + }; + + + handler.method2response[java_generateAccessors::request::kMethodInfo] = [](Reader& visitor) + { + if (visitor.HasMember("error")) + return Rsp_Error::ReflectReader(visitor); + + return java_generateAccessors::response::ReflectReader(visitor); + }; + handler.method2response[java_generateConstructors::request::kMethodInfo] = [](Reader& visitor) + { + if (visitor.HasMember("error")) + return Rsp_Error::ReflectReader(visitor); + + return java_generateConstructors::response::ReflectReader(visitor); + }; + handler.method2response[java_generateDelegateMethods::request::kMethodInfo] = [](Reader& visitor) + { + if (visitor.HasMember("error")) + return Rsp_Error::ReflectReader(visitor); + + return java_generateDelegateMethods::response::ReflectReader(visitor); + }; + + handler.method2response[java_generateHashCodeEquals::request::kMethodInfo] = [](Reader& visitor) + { + if (visitor.HasMember("error")) + return Rsp_Error::ReflectReader(visitor); + + return java_generateHashCodeEquals::response::ReflectReader(visitor); + }; + handler.method2response[java_generateToString::request::kMethodInfo] = [](Reader& visitor) + { + if (visitor.HasMember("error")) + return Rsp_Error::ReflectReader(visitor); + + return java_generateToString::response::ReflectReader(visitor); + }; + + handler.method2response[java_generateToString::request::kMethodInfo] = [](Reader& visitor) + { + if (visitor.HasMember("error")) + return Rsp_Error::ReflectReader(visitor); + + return java_generateToString::response::ReflectReader(visitor); + }; + + handler.method2response[java_getMoveDestinations::request::kMethodInfo] = [](Reader& visitor) + { + if (visitor.HasMember("error")) + return Rsp_Error::ReflectReader(visitor); + + return java_getMoveDestinations::response::ReflectReader(visitor); + }; + + handler.method2response[java_getRefactorEdit::request::kMethodInfo] = [](Reader& visitor) + { + if (visitor.HasMember("error")) + return Rsp_Error::ReflectReader(visitor); + + return java_getRefactorEdit::response::ReflectReader(visitor); + }; + + handler.method2response[java_move::request::kMethodInfo] = [](Reader& visitor) + { + if (visitor.HasMember("error")) + return Rsp_Error::ReflectReader(visitor); + + return java_move::response ::ReflectReader(visitor); + }; + + handler.method2response[java_organizeImports::request::kMethodInfo] = [](Reader& visitor) + { + if (visitor.HasMember("error")) + return Rsp_Error::ReflectReader(visitor); + + return java_organizeImports::response::ReflectReader(visitor); + }; + + handler.method2response[java_resolveUnimplementedAccessors::request::kMethodInfo] = [](Reader& visitor) + { + if (visitor.HasMember("error")) + return Rsp_Error::ReflectReader(visitor); + + return java_resolveUnimplementedAccessors::response::ReflectReader(visitor); + }; + + handler.method2response[java_searchSymbols::request::kMethodInfo] = [](Reader& visitor) + { + if (visitor.HasMember("error")) + return Rsp_Error::ReflectReader(visitor); + + return java_searchSymbols::response::ReflectReader(visitor); + }; + + handler.method2request[WorkspaceConfiguration::request::kMethodInfo] = [](Reader& visitor) + { + return WorkspaceConfiguration::request::ReflectReader(visitor); + }; + handler.method2request[WorkspaceFolders::request::kMethodInfo] = [](Reader& visitor) + { + return WorkspaceFolders::request::ReflectReader(visitor); + }; + +} + +void AddNotifyJsonRpcMethod(MessageJsonHandler& handler) +{ + + handler.method2notification[Notify_Exit::notify::kMethodInfo] = [](Reader& visitor) + { + return Notify_Exit::notify::ReflectReader(visitor); + }; + handler.method2notification[Notify_InitializedNotification::notify::kMethodInfo] = [](Reader& visitor) + { + return Notify_InitializedNotification::notify::ReflectReader(visitor); + }; + + handler.method2notification[java_projectConfigurationUpdate::notify::kMethodInfo] = [](Reader& visitor) + { + return java_projectConfigurationUpdate::notify::ReflectReader(visitor); + }; + + handler.method2notification[Notify_TextDocumentDidChange::notify::kMethodInfo] = [](Reader& visitor) + { + return Notify_TextDocumentDidChange::notify::ReflectReader(visitor); + }; + + handler.method2notification[Notify_TextDocumentDidClose::notify::kMethodInfo] = [](Reader& visitor) + { + return Notify_TextDocumentDidClose::notify::ReflectReader(visitor); + }; + + + handler.method2notification[Notify_TextDocumentDidOpen::notify::kMethodInfo] = [](Reader& visitor) + { + return Notify_TextDocumentDidOpen::notify::ReflectReader(visitor); + }; + + handler.method2notification[Notify_TextDocumentDidSave::notify::kMethodInfo] = [](Reader& visitor) + { + return Notify_TextDocumentDidSave::notify::ReflectReader(visitor); + }; + + handler.method2notification[Notify_TextDocumentPublishDiagnostics::notify::kMethodInfo] = [](Reader& visitor) + { + return Notify_TextDocumentPublishDiagnostics::notify::ReflectReader(visitor); + }; + handler.method2notification[Notify_semanticHighlighting::notify::kMethodInfo] = [](Reader& visitor) + { + return Notify_semanticHighlighting::notify::ReflectReader(visitor); + }; + handler.method2notification[td_willSave::notify::kMethodInfo] = [](Reader& visitor) + { + return td_willSave::notify::ReflectReader(visitor); + }; + + handler.method2notification[Notify_LogMessage::notify::kMethodInfo] = [](Reader& visitor) + { + return Notify_LogMessage::notify::ReflectReader(visitor); + }; + handler.method2notification[Notify_ShowMessage::notify::kMethodInfo] = [](Reader& visitor) + { + return Notify_ShowMessage::notify::ReflectReader(visitor); + }; + handler.method2notification[Notify_WorkspaceDidChangeWorkspaceFolders::notify::kMethodInfo] = [](Reader& visitor) + { + return Notify_WorkspaceDidChangeWorkspaceFolders::notify::ReflectReader(visitor); + }; + + handler.method2notification[Notify_WorkspaceDidChangeConfiguration::notify::kMethodInfo] = [](Reader& visitor) + { + return Notify_WorkspaceDidChangeConfiguration::notify::ReflectReader(visitor); + }; + + + handler.method2notification[Notify_WorkspaceDidChangeWatchedFiles::notify::kMethodInfo] = [](Reader& visitor) + { + return Notify_WorkspaceDidChangeWatchedFiles::notify::ReflectReader(visitor); + }; + + handler.method2notification[Notify_sendNotification::notify::kMethodInfo] = [](Reader& visitor) + { + return Notify_sendNotification::notify::ReflectReader(visitor); + }; + handler.method2notification[lang_status::notify::kMethodInfo] = [](Reader& visitor) + { + return lang_status::notify::ReflectReader(visitor); + }; + handler.method2notification[lang_actionableNotification::notify::kMethodInfo] = [](Reader& visitor) + { + return lang_actionableNotification::notify::ReflectReader(visitor); + }; + handler.method2notification[lang_progressReport::notify::kMethodInfo] = [](Reader& visitor) + { + return lang_progressReport::notify::ReflectReader(visitor); + }; + handler.method2notification[lang_eventNotification::notify::kMethodInfo] = [](Reader& visitor) + { + return lang_eventNotification::notify::ReflectReader(visitor); + }; +} + +void AddRequstJsonRpcMethod(MessageJsonHandler& handler) +{ + handler.method2request[Req_ClientRegisterCapability::request::kMethodInfo]= [](Reader& visitor) + { + + return Req_ClientRegisterCapability::request::ReflectReader(visitor); + }; + handler.method2request[Req_ClientUnregisterCapability::request::kMethodInfo] = [](Reader& visitor) + { + + return Req_ClientUnregisterCapability::request::ReflectReader(visitor); + }; +} + +void AddStandardRequestJsonRpcMethod(MessageJsonHandler& handler) +{ + + handler.method2request[td_initialize::request::kMethodInfo] = [](Reader& visitor) + { + + return td_initialize::request::ReflectReader(visitor); + }; + handler.method2request[td_shutdown::request::kMethodInfo] = [](Reader& visitor) + { + + return td_shutdown::request::ReflectReader(visitor); + }; + handler.method2request[td_codeAction::request::kMethodInfo] = [](Reader& visitor) + { + + + return td_codeAction::request::ReflectReader(visitor); + }; + handler.method2request[td_codeLens::request::kMethodInfo] = [](Reader& visitor) + { + + return td_codeLens::request::ReflectReader(visitor); + }; + handler.method2request[td_completion::request::kMethodInfo] = [](Reader& visitor) + { + + return td_completion::request::ReflectReader(visitor); + }; + + handler.method2request[td_definition::request::kMethodInfo] = [](Reader& visitor) + { + + return td_definition::request::ReflectReader(visitor); + }; + handler.method2request[td_declaration::request::kMethodInfo] = [](Reader& visitor) + { + + return td_declaration::request::ReflectReader(visitor); + }; + handler.method2request[td_willSaveWaitUntil::request::kMethodInfo] = [](Reader& visitor) + { + if (visitor.HasMember("error")) + return Rsp_Error::ReflectReader(visitor); + return td_willSaveWaitUntil::request::ReflectReader(visitor); + }; + + handler.method2request[td_highlight::request::kMethodInfo] = [](Reader& visitor) + { + + return td_highlight::request::ReflectReader(visitor); + }; + + handler.method2request[td_links::request::kMethodInfo] = [](Reader& visitor) + { + + return td_links::request::ReflectReader(visitor); + }; + + handler.method2request[td_linkResolve::request::kMethodInfo] = [](Reader& visitor) + { + + return td_linkResolve::request::ReflectReader(visitor); + }; + + handler.method2request[td_symbol::request::kMethodInfo] = [](Reader& visitor) + { + + return td_symbol::request::ReflectReader(visitor); + }; + + handler.method2request[td_formatting::request::kMethodInfo] = [](Reader& visitor) + { + + return td_formatting::request::ReflectReader(visitor); + }; + + handler.method2request[td_hover::request::kMethodInfo] = [](Reader& visitor) + { + return td_hover::request::ReflectReader(visitor); + }; + + handler.method2request[td_implementation::request::kMethodInfo] = [](Reader& visitor) + { + + return td_implementation::request::ReflectReader(visitor); + }; + + handler.method2request[td_didRenameFiles::request::kMethodInfo] = [](Reader& visitor) + { + + return td_didRenameFiles::request::ReflectReader(visitor); + }; + + handler.method2request[td_willRenameFiles::request::kMethodInfo] = [](Reader& visitor) + { + return td_willRenameFiles::request::ReflectReader(visitor); + }; +} + + +lsp::ProtocolJsonHandler::ProtocolJsonHandler() +{ + AddStadardResponseJsonRpcMethod(*this); + AddJavaExtentionResponseJsonRpcMethod(*this); + AddNotifyJsonRpcMethod(*this); + AddStandardRequestJsonRpcMethod(*this); + AddRequstJsonRpcMethod(*this); +} diff --git a/graphics/asymptote/LspCpp/src/lsp/initialize.cpp b/graphics/asymptote/LspCpp/src/lsp/initialize.cpp new file mode 100755 index 0000000000..ebe3e334d0 --- /dev/null +++ b/graphics/asymptote/LspCpp/src/lsp/initialize.cpp @@ -0,0 +1,45 @@ +#include "LibLsp/lsp/general/initialize.h" +#include "LibLsp/JsonRpc/json.h" + +void Reflect(Reader& reader, lsInitializeParams::lsTrace& value) +{ + if (!reader.IsString()) + { + value = lsInitializeParams::lsTrace::Off; + return; + } + std::string v = reader.GetString(); + if (v == "off") + value = lsInitializeParams::lsTrace::Off; + else if (v == "messages") + value = lsInitializeParams::lsTrace::Messages; + else if (v == "verbose") + value = lsInitializeParams::lsTrace::Verbose; +} + +void Reflect(Writer& writer, lsInitializeParams::lsTrace& value) +{ + switch (value) + { + case lsInitializeParams::lsTrace::Off: + writer.String("off"); + break; + case lsInitializeParams::lsTrace::Messages: + writer.String("messages"); + break; + case lsInitializeParams::lsTrace::Verbose: + writer.String("verbose"); + break; + } +} + void Reflect(Reader& visitor, std::pair, boost::optional >& value) +{ + if(((JsonReader&)visitor).m_->IsObject()) + { + Reflect(visitor, value.second); + } + else + { + Reflect(visitor, value.first); + } +} \ No newline at end of file diff --git a/graphics/asymptote/LspCpp/src/lsp/lsp.cpp b/graphics/asymptote/LspCpp/src/lsp/lsp.cpp new file mode 100755 index 0000000000..bf39b9383a --- /dev/null +++ b/graphics/asymptote/LspCpp/src/lsp/lsp.cpp @@ -0,0 +1,1089 @@ + + +#include "LibLsp/lsp/lru_cache.h" + + +#include + + +#include +#include +#include "LibLsp/lsp/location_type.h" +#include "LibLsp/lsp/out_list.h" +#include "LibLsp/lsp/lsTextDocumentIdentifier.h" +#include "LibLsp/lsp/lsVersionedTextDocumentIdentifier.h" +#include "LibLsp/lsp/lsResponseError.h" +#include "LibLsp/lsp/lsPosition.h" +#include "LibLsp/lsp/lsTextEdit.h" +#include "LibLsp/lsp/lsMarkedString.h" +#include "LibLsp/lsp/lsWorkspaceEdit.h" +#include "LibLsp/lsp/textDocument/code_action.h" +#include "LibLsp/lsp/textDocument/document_symbol.h" +#include "LibLsp/lsp/extention/jdtls/codeActionResult.h" + +#include "LibLsp/lsp/textDocument/selectionRange.h" +#include "LibLsp/lsp/AbsolutePath.h" + +#ifdef _WIN32 +#include +#else +#include +#include +#endif + +#include "LibLsp/lsp/Directory.h" +#include "LibLsp/lsp/lsFormattingOptions.h" +#include "LibLsp/JsonRpc/json.h" +#include "LibLsp/lsp/language/language.h" + +#include + +#include "LibLsp/lsp/lsp_completion.h" +#include "LibLsp/lsp/utils.h" +#include "LibLsp/lsp/client/registerCapability.h" +#include +#include +#include +// namespace + + + +lsTextDocumentIdentifier +lsVersionedTextDocumentIdentifier::AsTextDocumentIdentifier() const { + lsTextDocumentIdentifier result; + result.uri = uri; + return result; +} + + +lsPosition::lsPosition() {} +lsPosition::lsPosition(int line, int character) + : line(line), character(character) {} + +bool lsPosition::operator==(const lsPosition& other) const { + return line == other.line && character == other.character; +} + +bool lsPosition::operator<(const lsPosition& other) const { + return line != other.line ? line < other.line : character < other.character; +} + +std::string lsPosition::ToString() const { + return std::to_string(line) + ":" + std::to_string(character); +} +const lsPosition lsPosition::kZeroPosition = lsPosition(); + +lsRange::lsRange() {} +lsRange::lsRange(lsPosition start, lsPosition end) : start(start), end(end) {} + +bool lsRange::operator==(const lsRange& o) const { + return start == o.start && end == o.end; +} + +bool lsRange::operator<(const lsRange& o) const { + return !(start == o.start) ? start < o.start : end < o.end; +} + +std::string lsRange::ToString() const +{ + std::stringstream ss; + ss << "start:" << start.ToString() << std::endl; + ss << "end" << end.ToString() << std::endl; + return ss.str(); +} + +lsLocation::lsLocation() {} +lsLocation::lsLocation(lsDocumentUri uri, lsRange range) + : uri(uri), range(range) {} + +bool lsLocation::operator==(const lsLocation& o) const { + return uri == o.uri && range == o.range; +} + +bool lsLocation::operator<(const lsLocation& o) const { + return std::make_tuple(uri.raw_uri_, range) < + std::make_tuple(o.uri.raw_uri_, o.range); +} + +bool lsTextEdit::operator==(const lsTextEdit& that) { + return range == that.range && newText == that.newText; +} + +std::string lsTextEdit::ToString() const +{ + std::stringstream ss; + ss << "Range:" << range.ToString() << std::endl; + ss << "newText:" << newText << std::endl; + return ss.str(); +} + +void Reflect(Writer& visitor, lsMarkedString& value) { + // If there is a language, emit a `{language:string, value:string}` object. If + // not, emit a string. + if (value.language) { + REFLECT_MEMBER_START(); + REFLECT_MEMBER(language); + REFLECT_MEMBER(value); + REFLECT_MEMBER_END(); + } else { + Reflect(visitor, value.value); + } +} + +void Reflect(Reader& visitor, lsMarkedString& value) +{ + REFLECT_MEMBER_START(); + REFLECT_MEMBER(language); + REFLECT_MEMBER(value); + REFLECT_MEMBER_END(); +} + + void Reflect(Reader& visitor, LocationListEither::Either& value) +{ + if(!visitor.IsArray()) + { + throw std::invalid_argument("Rsp_LocationListEither::Either& value is not array"); + } + auto data = ((JsonReader&)visitor).m_->GetArray(); + if (data.Size() && data[0].HasMember("originSelectionRange")) + { + Reflect(visitor, value.second); + } + else { + Reflect(visitor, value.first); + } + +} + + void Reflect(Writer& visitor, LocationListEither::Either& value) +{ + if (value.first) + { + Reflect(visitor, value.first.value()); + } + else if (value.second) + { + Reflect(visitor, value.second.value()); + } +} + + +void Reflect(Reader& visitor, TextDocumentCodeAction::Either& value) +{ + + + if(visitor.HasMember("command")) + { + if(visitor["command"]->IsString()) + { + Reflect(visitor, value.first); + } + else + { + Reflect(visitor, value.second); + } + } + else + { + if (visitor.HasMember("diagnostics") || visitor.HasMember("edit")) + { + Reflect(visitor, value.second); + } + else + { + Reflect(visitor, value.first); + } + } + +} + + +void Reflect(Reader& visitor, lsWorkspaceEdit::Either& value) +{ + + + if(visitor.HasMember("textDocument")) + { + Reflect(visitor, value.first); + } + else + { + Reflect(visitor, value.second); + } +} +ResourceOperation* GetResourceOperation(lsp::Any& lspAny) +{ + rapidjson::Document document; + auto& data = lspAny.Data(); + document.Parse(data.c_str(), data.length()); + if (document.HasParseError()) { + // ��ʾ + return nullptr; + } + auto find = document.FindMember("kind"); + + JsonReader visitor{ &document }; + try + { + if (find->value == "create") + { + auto ptr = std::make_unique(); + auto temp = ptr.get(); + Reflect(visitor, *temp); + return ptr.release(); + } + else if (find->value == "rename") + { + auto ptr = std::make_unique(); + auto temp = ptr.get(); + Reflect(visitor, *temp); + return ptr.release(); + } + else if (find->value == "delete") + { + + auto ptr = std::make_unique(); + auto temp = ptr.get(); + Reflect(visitor, *temp); + return ptr.release(); + } + } + catch (std::exception&) + { + + } + return nullptr; +} + + void Reflect(Writer& visitor, ResourceOperation* value) +{ + + if(!value) + { + throw std::invalid_argument("ResourceOperation value is nullptr"); + } + if (value->kind == "create") + { + auto temp = (lsCreateFile*)value; + Reflect(visitor, *temp); + } + else if (value->kind == "rename") + { + auto temp = (lsRenameFile*)value; + Reflect(visitor, *temp); + } + else if (value->kind == "delete") + { + + auto temp = (lsDeleteFile*)value; + Reflect(visitor, *temp); + } + +} + +int lsp::Any::GuessType() +{ + if (!data.empty()) + { + if (data == "null") + { + jsonType = rapidjson::kNullType; + } + else if (data == "true") + { + jsonType = rapidjson::kTrueType; + } + else if(data == "false") + { + jsonType = rapidjson::kFalseType; + } + else if (data[0] == '{') + { + jsonType = rapidjson::kObjectType; + } + else if (data[0] == '[') + { + if (data.size() >= 2 && data[1] == '{') + jsonType = rapidjson::kStringType; + else + jsonType = rapidjson::kArrayType; + } + else if (data[0] == '"') + { + jsonType = rapidjson::kStringType; + } + else + { + jsonType = rapidjson::kNumberType; + } + } + else + { + if (jsonType != kUnKnown) + return jsonType; + jsonType = rapidjson::kNullType; + } + return jsonType; +} + +int lsp::Any::GetType() +{ + if (jsonType == Type::kUnKnown) + { + if (data.empty()) + { + jsonType = rapidjson::kNullType; + return jsonType; + } + rapidjson::Document document; + document.Parse(data.c_str(), data.length()); + if (document.HasParseError()) + { + // ��ʾ + return jsonType; + } + jsonType = document.GetType(); + } + return jsonType; +} + +void lsp::Any::Set(std::unique_ptr value) +{ + if (value) + { + jsonType = rapidjson::Type::kObjectType; + data = value->ToJson(); + } + else + { + assert(false); + } +} + +void lsp::Any::SetJsonString(std::string&& _data, Type _type) +{ + jsonType = _type; + data.swap(_data); + GetType(); +} + +void lsp::Any::SetJsonString(const std::string& _data, Type _type) +{ + jsonType = _type; + data = (_data); + GetType(); +} + +void lsp::Any::swap(Any& arg) noexcept +{ + data.swap(arg.data); + const int temp = jsonType; + jsonType = arg.jsonType; + arg.jsonType = temp; +} + +class JsonReaderForAny : public JsonReader +{ +public: + JsonReaderForAny() + : JsonReader(&document) + { + } + rapidjson::Document document; +}; + +bool lsp::Any::GetForMapHelper(std::string& value) +{ + return Get(value); +} + +bool lsp::Any::GetForMapHelper(boost::optional& value) +{ + return Get(value); +} + +std::unique_ptr lsp::Any::GetReader() +{ + auto reader = new JsonReaderForAny(); + std::unique_ptr ret(reader); + reader->document.Parse(data.c_str(), data.length()); + if (reader->document.HasParseError()) + { + return {}; + } + if (jsonType == kUnKnown) + { + jsonType = reader->document.GetType(); + } + return (ret); +} + +class JsonWriterForAny : public JsonWriter +{ +public: + rapidjson::StringBuffer output; + rapidjson::Writer writer; + JsonWriterForAny():JsonWriter(&writer), writer(output) + { + + } +}; + +std::unique_ptr lsp::Any::GetWriter() const +{ + return std::make_unique(); +} + +void lsp::Any::SetData(std::unique_ptr& writer) +{ + auto _temp = static_cast(writer.get()); + data = _temp->output.GetString(); + GuessType(); +} + +namespace +{ +#if 0 + rapidjson::Type convert(lsp::Any::Type type) + { + switch (type) + { + case lsp::Any::Type::kNullType: + return rapidjson::Type::kNullType; + case lsp::Any::Type::kFalseType: + return rapidjson::Type::kFalseType; + case lsp::Any::Type::kTrueType: + return rapidjson::Type::kTrueType; + case lsp::Any::Type::kObjectType: + return rapidjson::Type::kObjectType; + case lsp::Any::Type::kArrayType: + return rapidjson::Type::kArrayType; + case lsp::Any::Type::kStringType: + return rapidjson::Type::kStringType; + case lsp::Any::Type::kNumberType: + return rapidjson::Type::kNumberType; + default: + return rapidjson::Type::kNullType; + } + } +#endif + lsp::Any::Type convert(rapidjson::Type type) + { + switch (type) + { + case rapidjson::Type::kNullType: + return lsp::Any::Type::kNullType; + case rapidjson::Type::kFalseType: + return lsp::Any::Type::kFalseType; + case rapidjson::Type::kTrueType: + return lsp::Any::Type::kTrueType; + case rapidjson::Type::kObjectType: + return lsp::Any::Type::kObjectType; + case rapidjson::Type::kArrayType: + return lsp::Any::Type::kArrayType; + case rapidjson::Type::kStringType: + return lsp::Any::Type::kStringType; + case rapidjson::Type::kNumberType: + return lsp::Any::Type::kNumberType; + default: + return lsp::Any::Type::kNullType; + } + } +} + +void Reflect(Reader& visitor, lsp::Any& value) +{ + + //if (visitor.IsNull()) { + // visitor.GetNull(); + // value.SetJsonString("", rapidjson::Type::kNullType); + // return; + //}else + //{ + // + //} + JsonReader& json_reader = reinterpret_cast(visitor); + value.SetJsonString(visitor.ToString(), convert(json_reader.m_->GetType())); +} + void Reflect(Writer& visitor, lsp::Any& value) + { + JsonWriter& json_writer = reinterpret_cast(visitor); + json_writer.m_->RawValue( value.Data().data(),value.Data().size(),static_cast(value.GetType())); + + } + void Reflect(Reader& visitor, lsFormattingOptions::KeyData& value) +{ + if (visitor.IsBool()) + { + Reflect(visitor, value._boolean); + } + else if (visitor.IsInt() || visitor.IsInt64() || visitor.IsUint64()) + { + Reflect(visitor, value._integer); + } + else if(visitor.IsString()) + { + Reflect(visitor, value._string); + } +} + void Reflect(Writer& visitor, lsFormattingOptions::KeyData& value) +{ + if (value._boolean.has_value()) + { + Reflect(visitor, value._boolean); + } + else if (value._integer.has_value()) + { + Reflect(visitor, value._integer); + } + else if (value._string.has_value()) + { + Reflect(visitor, value._string); + } +} + +lsCreateFile::lsCreateFile() +{ + kind = "create"; +} + +lsDeleteFile::lsDeleteFile() +{ + kind = "delete"; +} + +lsRenameFile::lsRenameFile() +{ + kind = "rename"; +} + + +void Reflect(Reader& visitor, boost::optional< SelectionRange* >& value) +{ + if (visitor.IsNull()) { + visitor.GetNull(); + return; + } + + SelectionRange* entry_value = nullptr; + + + std::unique_ptr ptr = std::make_unique(); + SelectionRange* temp = ptr.get(); + Reflect(visitor, *temp); + + entry_value = ptr.release(); + value = (entry_value); + +} +void Reflect(Writer& visitor, SelectionRange* value) +{ + + if (!value) + { + throw std::invalid_argument("ResourceOperation value is nullptr"); + } + + Reflect(visitor, *value); + + +} + + std::string make_file_scheme_uri(const std::string& absolute_path) +{ + network::uri_builder builder; + builder.scheme("file"); + builder.host(""); + builder.path(absolute_path); + return builder.uri().string(); + //// lsDocumentUri uri; + //// uri.SetPath(absolute_path); + /// return uri.raw_uri_; +} + +// static +AbsolutePath AbsolutePath::BuildDoNotUse(const std::string& path) { + AbsolutePath p; + p.path = std::string(path); + return p; +} + + +AbsolutePath::AbsolutePath() {} + + + +AbsolutePath::operator std::string() const { + return path; +} + +bool AbsolutePath::operator==(const AbsolutePath& rhs) const { + return path == rhs.path; +} + +bool AbsolutePath::operator!=(const AbsolutePath& rhs) const { + return path != rhs.path; +} + +bool AbsolutePath::operator<(const AbsolutePath& rhs) const +{ + return path < rhs.path; +} + +bool AbsolutePath::operator>(const AbsolutePath& rhs) const +{ + return path > rhs.path; +} + +void Reflect(Reader& visitor, AbsolutePath& value) { + value.path = visitor.GetString(); +} +void Reflect(Writer& visitor, AbsolutePath& value) { + visitor.String(value.path.c_str(), value.path.length()); +} + +std::ostream& operator<<(std::ostream& out, const AbsolutePath& path) { + out << path.path; + return out; +} + +lsDocumentUri lsDocumentUri::FromPath(const AbsolutePath& path) { + lsDocumentUri result; + result.SetPath(path); + return result; +} +//void lsDocumentUri::SetPath(const AbsolutePath& path) +//{ +// raw_uri_ = make_file_scheme_uri(path.path); +//} +// +void lsDocumentUri::SetPath(const AbsolutePath& path) { + // file:///c%3A/Users/jacob/Desktop/superindex/indexer/full_tests + raw_uri_ = path; + + size_t index = raw_uri_.find(":"); + if (index == 1) { // widows drive letters must always be 1 char + raw_uri_.replace(raw_uri_.begin() + index, raw_uri_.begin() + index + 1, + "%3A"); + } + + // subset of reserved characters from the URI standard + // http://www.ecma-international.org/ecma-262/6.0/#sec-uri-syntax-and-semantics + std::string t; + t.reserve(8 + raw_uri_.size()); + + // TODO: proper fix +#if defined(_WIN32) + t += "file:///"; +#else + t += "file://"; +#endif + + // clang-format off + for (char c : raw_uri_) + switch (c) { + case ' ': t += "%20"; break; + case '#': t += "%23"; break; + case '$': t += "%24"; break; + case '&': t += "%26"; break; + case '(': t += "%28"; break; + case ')': t += "%29"; break; + case '+': t += "%2B"; break; + case ',': t += "%2C"; break; + case ';': t += "%3B"; break; + case '?': t += "%3F"; break; + case '@': t += "%40"; break; + default: t += c; break; + } + // clang-format on + raw_uri_ = std::move(t); +} + +std::string lsDocumentUri::GetRawPath() const { + + + if (raw_uri_.compare(0, 8, "file:///")) + return raw_uri_; + + + std::string ret; +#if defined(_WIN32) + size_t i = 8; +#else + size_t i = 7; +#endif + auto from_hex = [](unsigned char c) { + return c - '0' < 10 ? c - '0' : (c | 32) - 'a' + 10; + }; + for (; i < raw_uri_.size(); i++) { + if (i + 3 <= raw_uri_.size() && raw_uri_[i] == '%') { + ret.push_back(from_hex(raw_uri_[i + 1]) * 16 + from_hex(raw_uri_[i + 2])); + i += 2; + } + else + ret.push_back(raw_uri_[i] == '\\' ? '/' : raw_uri_[i]); + } + return ret; +} + +lsDocumentUri::lsDocumentUri() {} + + +lsDocumentUri::lsDocumentUri(const AbsolutePath& path) +{ + SetPath(path); +} + +lsDocumentUri::lsDocumentUri(const lsDocumentUri& other): raw_uri_(other.raw_uri_) +{ +} + +bool lsDocumentUri::operator==(const lsDocumentUri& other) const { + return raw_uri_ == other.raw_uri_; +} + +bool lsDocumentUri::operator==(const std::string& other) const +{ + return raw_uri_ == other; +} + + +AbsolutePath lsDocumentUri::GetAbsolutePath() const { + + + if (raw_uri_.find("file://") != std::string::npos){ + try + { + return lsp::NormalizePath(GetRawPath(), false /*ensure_exists*/, false); + } + catch (std::exception&) + { + return AbsolutePath("", false); + } + } + + return AbsolutePath(raw_uri_,false); + +} + +AbsolutePath::AbsolutePath(const std::string& path, bool validate) + : path(path) { + // TODO: enable validation after fixing tests. + if (validate && !lsp::IsAbsolutePath(path)) { + qualify = false; + auto temp = lsp::NormalizePath(path,false); + if(!temp.path.empty()) + { + this->path = temp.path; + } + } +} + +void Reflect(Writer& visitor, lsDocumentUri& value) { + Reflect(visitor, value.raw_uri_); +} +void Reflect(Reader& visitor, lsDocumentUri& value) { + Reflect(visitor, value.raw_uri_); + // Only record the path when we deserialize a URI, since it most likely came + // from the client. + +} + + std::string ProgressReport::ToString() const +{ + std::string info; + info += "id:" + id + "\n"; + info += "task:" + task + "\n"; + info += "subTask:" + subTask + "\n"; + info += "status:" + status + "\n"; + { + std::stringstream ss; + ss << "totalWork:" << totalWork << std::endl; + info += ss.str(); + } + { + std::stringstream ss; + ss << "workDone:" << workDone << std::endl; + info += ss.str(); + } + + { + std::stringstream ss; + ss << "complete:" << complete << std::endl; + info += ss.str(); + } + + return info; +} + +std::string EventNotification::ToString() const +{ + std::string info; + if (ClasspathUpdated == eventType) + { + info += "eventType:ClasspathUpdated\n"; + } + else if (ProjectsImported == eventType) + { + info += "eventType:ProjectsImported\n"; + } + else + { + std::ostringstream oss; + oss << std::hex << eventType << std::endl; + + info += "eventType:"; + info += oss.str(); + } + info += "data:" + data.Data() + "\n"; + return info; +} + +std::string lsp::ToString(lsCompletionItemKind _kind) +{ + switch (_kind) { + case lsCompletionItemKind::Text: + return "Text"; + case lsCompletionItemKind::Method: + return "Method"; + case lsCompletionItemKind::Function: + return ""; + case lsCompletionItemKind::Constructor: + return "Function"; + case lsCompletionItemKind::Field: + return "Field"; + case lsCompletionItemKind::Variable: + return ""; + case lsCompletionItemKind::Class: + return "Variable"; + case lsCompletionItemKind::Interface: + return "Interface"; + case lsCompletionItemKind::Module: + return "Module"; + case lsCompletionItemKind::Property: + return "Property"; + case lsCompletionItemKind::Unit: + return "Unit"; + case lsCompletionItemKind::Value: + return "Value"; + case lsCompletionItemKind::Enum: + return "Enum"; + case lsCompletionItemKind::Keyword: + return "Keyword"; + case lsCompletionItemKind::Snippet: + return "Snippet"; + case lsCompletionItemKind::Color: + return "Color"; + case lsCompletionItemKind::File: + return "File"; + case lsCompletionItemKind::Reference: + return "Reference"; + case lsCompletionItemKind::Folder: + return "Folder"; + case lsCompletionItemKind::EnumMember: + return "EnumMember"; + case lsCompletionItemKind::Constant: + return "Constant"; + case lsCompletionItemKind::Struct: + return "Struct"; + case lsCompletionItemKind::Event: + return "Event"; + case lsCompletionItemKind::Operator: + return "Operator"; + case lsCompletionItemKind::TypeParameter: + return "TypeParameter"; + default: + return "Unknown"; + } +} + +std::string lsp::ToString(lsInsertTextFormat _kind) +{ + if (_kind == lsInsertTextFormat::PlainText) + { + return "PlainText"; + } + else if (_kind == lsInsertTextFormat::Snippet) + { + return "Snippet"; + }else + { + return "Unknown"; + } +} + +const std::string& lsCompletionItem::InsertedContent() const +{ + if (textEdit) + return textEdit->newText; + if (insertText.has_value() && !insertText->empty()) + return insertText.value(); + return label; +} + +std::string lsCompletionItem::DisplayText() +{ + + if (detail) + { + + return label + " in " + detail.value(); + } + return label; +} + +std::string lsCompletionItem::ToString() + { + std::stringstream info; + info << "label : " << label << std::endl; + if(kind) + info << "kind : " << lsp::ToString(kind.value()) << std::endl; + else + info << "kind : no exist." << std::endl; + + if (detail) + info << "detail : " << detail.value() << std::endl; + else + info << "detail : no exist." << std::endl; + + if (documentation) + { + info << "documentation : " << std::endl; + if(documentation.value().first) + { + info << documentation.value().first.value(); + } + else if(documentation.value().second) + { + info << documentation.value().second.value().value; + } + } + else + info << "documentation : no exist." << std::endl; + + if (deprecated) + info << "deprecated : " << deprecated.value() << std::endl; + else + info << "deprecated : no exist." << std::endl; + + if (preselect) + info << "preselect : " << preselect.value() << std::endl; + else + info << "preselect : no exist." << std::endl; + + if (sortText) + info << "sortText : " << sortText.value() << std::endl; + else + info << "sortText : no exist." << std::endl; + + if (filterText) + info << "filterText : " << filterText.value() << std::endl; + else + info << "filterText : no exist." << std::endl; + + + if (insertText) + info << "insertText : " << insertText.value() << std::endl; + else + info << "insertText : no exist." << std::endl; + + + if (insertTextFormat) + info << "insertText : " << lsp::ToString(insertTextFormat.value()) << std::endl; + else + info << "insertTextFormat : no exist." << std::endl; + + if (textEdit) + info << "textEdit : " << textEdit.value().ToString() << std::endl; + else + info << "textEdit : no exist." << std::endl; + + + + return info.str(); + + } +namespace JDT +{ + namespace CodeActionKind { + + + /** + * Base kind for quickfix actions: 'quickfix' + */ + const char* QuickFix = "quickfix"; + + /** + * Base kind for refactoring actions: 'refactor' + */ + const char* Refactor = "refactor"; + + /** + * Base kind for refactoring extraction actions: 'refactor.extract' + * + * Example extract actions: + * + * - Extract method - Extract function - Extract variable - Extract interface + * from class - ... + */ + const char* RefactorExtract = "refactor.extract"; + + /** + * Base kind for refactoring inline actions: 'refactor.inline' + * + * Example inline actions: + * + * - Inline function - Inline variable - Inline constant - ... + */ + const char* RefactorInline = "refactor.inline"; + + /** + * Base kind for refactoring rewrite actions: 'refactor.rewrite' + * + * Example rewrite actions: + * + * - Convert JavaScript function to class - Add or remove parameter - + * Encapsulate field - Make method static - Move method to base class - ... + */ + const char* RefactorRewrite = "refactor.rewrite"; + + /** + * Base kind for source actions: `source` + * + * Source code actions apply to the entire file. + */ + const char* Source = "source"; + + /** + * Base kind for an organize imports source action: `source.organizeImports` + */ + const char* SourceOrganizeImports = "source.organizeImports"; + + const char* COMMAND_ID_APPLY_EDIT = "java.apply.workspaceEdit"; + + }; + + +} +Directory::Directory(const AbsolutePath& path) : path(path.path) { + lsp::EnsureEndsInSlash(this->path); +} + +bool Directory::operator==(const Directory& rhs) const { + return path == rhs.path; +} + +bool Directory::operator!=(const Directory& rhs) const { + return path != rhs.path; +} + + + + Registration Registration::Create(const std::string& method) +{ + Registration reg; + reg.method = method; + const boost::uuids::uuid a_uuid = boost::uuids::random_generator()(); + reg.id = to_string(a_uuid); + return reg; +} diff --git a/graphics/asymptote/LspCpp/src/lsp/lsp_diagnostic.cpp b/graphics/asymptote/LspCpp/src/lsp/lsp_diagnostic.cpp new file mode 100755 index 0000000000..79d9a6fc63 --- /dev/null +++ b/graphics/asymptote/LspCpp/src/lsp/lsp_diagnostic.cpp @@ -0,0 +1,75 @@ +#include "LibLsp/lsp/lsp_diagnostic.h" + +bool lsDiagnostic::operator==(const lsDiagnostic& rhs) const { + // Just check the important fields. + return range == rhs.range && message == rhs.message; +} +bool lsDiagnostic::operator!=(const lsDiagnostic& rhs) const { + return !(*this == rhs); +} + +std::string lsResponseError::ToString() +{ + std::string info = "code:"; + switch (code) + { + case lsErrorCodes::ParseError: + info += "ParseError\n"; + break; + case lsErrorCodes::InvalidRequest: + info += "InvalidRequest\n"; + break; + case lsErrorCodes::MethodNotFound: + info += "MethodNotFound\n"; + break; + case lsErrorCodes::InvalidParams: + info += "InvalidParams\n"; + break; + case lsErrorCodes::InternalError: + info += "InternalError\n"; + break; + case lsErrorCodes::serverErrorStart: + info += "serverErrorStart\n"; + break; + case lsErrorCodes::serverErrorEnd: + info += "serverErrorEnd\n"; + break; + case lsErrorCodes::ServerNotInitialized: + info += "ServerNotInitialized\n"; + break; + case lsErrorCodes::UnknownErrorCode: + info += "UnknownErrorCode\n"; + break; + // Defined by the protocol. + case lsErrorCodes::RequestCancelled: + info += "RequestCancelled\n"; + break; + default: + { + std::stringstream ss; + ss << "unknown code:" << (int32_t)code << std::endl; + info += ss.str(); + } + break; + } + info += "message:" + message; + info += "\n"; + + if(data.has_value()) + { + + info += "data:" + data.value().Data(); + info += "\n"; + } + return info; +} + +void lsResponseError::Write(Writer& visitor) { + auto& value = *this; + int code2 = static_cast(this->code); + + visitor.StartObject(); + REFLECT_MEMBER2("code", code2); + REFLECT_MEMBER(message); + visitor.EndObject(); +} diff --git a/graphics/asymptote/LspCpp/src/lsp/textDocument.cpp b/graphics/asymptote/LspCpp/src/lsp/textDocument.cpp new file mode 100755 index 0000000000..4d0b6b8713 --- /dev/null +++ b/graphics/asymptote/LspCpp/src/lsp/textDocument.cpp @@ -0,0 +1,349 @@ +#include "LibLsp/lsp/textDocument/completion.h" +#include "LibLsp/lsp/textDocument/document_symbol.h" +#include "LibLsp/lsp/lsMarkedString.h" +#include "LibLsp/lsp/textDocument/hover.h" +#include "LibLsp/lsp/textDocument/prepareRename.h" +#include + +#include "LibLsp/lsp/textDocument/semanticHighlighting.h" +#include "LibLsp/lsp/textDocument/SemanticTokens.h" +#include "LibLsp/JsonRpc/json.h" + + +constexpr unsigned SemanticTokenEncodingSize = 5; + +std::string to_string(SemanticTokenType _type) +{ + switch (_type) { + + case ls_namespace: return "namespace"; + /** + * Represents a generic type. Acts as a fallback for types which + * can"t be mapped to a specific type like class or enum. + */ + case ls_type: return "type"; + case ls_class: return "class"; + case ls_enum: return "enum"; + case ls_interface: return "interface"; + case ls_struct: return "struct"; + case ls_typeParameter: return "typeParameter"; + case ls_parameter: return "parameter"; + case ls_variable: return "variable"; + case ls_property: return "property"; + case ls_enumMember: return "enumMember"; + case ls_event: return "event"; + case ls_function: return "function"; + case ls_method: return "method"; + case ls_macro: return "macro"; + case ls_keyword: return "keyword"; + case ls_modifier: return "modifier"; + case ls_comment: return "comment"; + case ls_string: return "string"; + case ls_number: return "number"; + case ls_regexp: return "regexp"; + case ls_operator: return "operator"; + default: + return "unknown"; + } +} + +unsigned toSemanticTokenType(std::vector& modifiers) +{ + unsigned encode_type = 0; + for (auto bit : modifiers) { + encode_type = encode_type | (0b00000001 << bit); + } + return encode_type; +} + +std::string to_string(TokenType_JDT _type) +{ + switch (_type) + { + case PACKAGE_JDT:return "namespace"; + case CLASS_JDT:return "class"; + case INTERFACE_JDT:return "interface"; + case ENUM_JDT:return "enum"; + case ENUM_MEMBER_JDT:return "enumMember"; + case TYPE_JDT:return "type"; + case TYPE_PARAMETER_JDT:return "typeParameter"; + case ANNOTATION_JDT:return "annotation"; + case ANNOTATION_MEMBER_JDT:return "annotationMember"; + case METHOD_JDT:return "function"; + case PROPERTY_JDT:return "property"; + case VARIABLE_JDT:return "variable"; + case PARAMETER_JDT:return "parameter"; + } + return "unknown"; +} + +std::string to_string(SemanticTokenModifier modifier) +{ + switch (modifier) { + case ls_declaration: return "declaration"; + case ls_definition: return "definition"; + case ls_readonly: return "readonly"; + case ls_static: return "static"; + case ls_deprecated: return "deprecated"; + case ls_abstract: return "abstract"; + case ls_async: return "async"; + case ls_modification: return "modification"; + case ls_documentation: return "documentation"; + case ls_defaultLibrary: return "defaultLibrary"; + default: + return "unknown"; + } +} + +unsigned toSemanticTokenModifiers(std::vector& modifiers) +{ + unsigned encodedModifiers = 0; + for (auto bit : modifiers) { + encodedModifiers = encodedModifiers | (0b00000001 << bit); + } + return encodedModifiers; +} + + +std::string toSemanticTokenType(HighlightingKind_clangD kind) { + switch (kind) { + case HighlightingKind_clangD::Variable: + case HighlightingKind_clangD::LocalVariable: + case HighlightingKind_clangD::StaticField: + return "variable"; + case HighlightingKind_clangD::Parameter: + return "parameter"; + case HighlightingKind_clangD::Function: + return "function"; + case HighlightingKind_clangD::Method: + return "method"; + case HighlightingKind_clangD::StaticMethod: + // FIXME: better method with static modifier? + return "function"; + case HighlightingKind_clangD::Field: + return "property"; + case HighlightingKind_clangD::Class: + return "class"; + case HighlightingKind_clangD::Interface: + return "interface"; + case HighlightingKind_clangD::Enum: + return "enum"; + case HighlightingKind_clangD::EnumConstant: + return "enumMember"; + case HighlightingKind_clangD::Typedef: + case HighlightingKind_clangD::Type: + return "type"; + case HighlightingKind_clangD::Unknown: + return "unknown"; // nonstandard + case HighlightingKind_clangD::Namespace: + return "namespace"; + case HighlightingKind_clangD::TemplateParameter: + return "typeParameter"; + case HighlightingKind_clangD::Concept: + return "concept"; // nonstandard + case HighlightingKind_clangD::Primitive: + return "type"; + case HighlightingKind_clangD::Macro: + return "macro"; + case HighlightingKind_clangD::InactiveCode: + return "comment"; + } + return ("unhandled HighlightingKind_clangD"); +} + +std::string toSemanticTokenModifier(HighlightingModifier_clangD modifier) { + switch (modifier) { + case HighlightingModifier_clangD::Declaration: + return "declaration"; + case HighlightingModifier_clangD::Deprecated: + return "deprecated"; + case HighlightingModifier_clangD::Readonly: + return "readonly"; + case HighlightingModifier_clangD::Static: + return "static"; + case HighlightingModifier_clangD::Deduced: + return "deduced"; // nonstandard + case HighlightingModifier_clangD::Abstract: + return "abstract"; + case HighlightingModifier_clangD::DependentName: + return "dependentName"; // nonstandard + case HighlightingModifier_clangD::DefaultLibrary: + return "defaultLibrary"; + case HighlightingModifier_clangD::FunctionScope: + return "functionScope"; // nonstandard + case HighlightingModifier_clangD::ClassScope: + return "classScope"; // nonstandard + case HighlightingModifier_clangD::FileScope: + return "fileScope"; // nonstandard + case HighlightingModifier_clangD::GlobalScope: + return "globalScope"; // nonstandard + } + return ("unhandled HighlightingModifier_clangD"); +} + + + +bool operator==(const SemanticToken& l, const SemanticToken& r) { + return std::tie(l.deltaLine, l.deltaStart, l.length, l.tokenType, + l.tokenModifiers) == std::tie(r.deltaLine, r.deltaStart, + r.length, r.tokenType, + r.tokenModifiers); +} + +std::vector SemanticTokens::encodeTokens(std::vector& tokens) +{ + std::vector result; + result.reserve(SemanticTokenEncodingSize * tokens.size()); + for (const auto& tok : tokens) + { + result.push_back(tok.deltaLine); + result.push_back(tok.deltaStart); + result.push_back(tok.length); + result.push_back(tok.tokenType); + result.push_back(tok.tokenModifiers); + } + assert(result.size() == SemanticTokenEncodingSize * tokens.size()); + return result; +} + +void Reflect(Reader& visitor, TextDocumentComplete::Either& value) +{ + if(visitor.IsArray()) + { + Reflect(visitor, value.first); + } + else + { + + Reflect(visitor, value.second); + } + +} +void Reflect(Reader& visitor, TextDocumentDocumentSymbol::Either& value) +{ + if (visitor.HasMember("location")) + { + Reflect(visitor, value.first); + } + else + { + Reflect(visitor, value.second); + } +} + +void Reflect(Reader& visitor, std::pair, boost::optional>& value) +{ + + if (!visitor.IsString()) + { + Reflect(visitor, value.second); + } + else + { + Reflect(visitor, value.first); + } +} + +void Reflect(Reader& visitor, std::pair, boost::optional>& value) +{ + if (!visitor.IsString()) + { + Reflect(visitor, value.second); + } + else + { + Reflect(visitor, value.first); + } +} + void Reflect(Reader& visitor, TextDocumentHover::Either& value) +{ + JsonReader& reader = dynamic_cast(visitor); + if (reader.IsArray()) + { + Reflect(visitor, value.first); + } + else if(reader.m_->IsObject()) + { + Reflect(visitor, value.second); + } +} + + void Reflect(Reader& visitor, TextDocumentPrepareRenameResult& value) +{ + if (visitor.HasMember("placeholder")) + { + Reflect(visitor, value.second); + } + else + { + Reflect(visitor, value.first); + } +} + + namespace + RefactorProposalUtility + { + const char* APPLY_REFACTORING_COMMAND_ID = "java.action.applyRefactoringCommand"; + const char* EXTRACT_VARIABLE_ALL_OCCURRENCE_COMMAND = "extractVariableAllOccurrence"; + const char* EXTRACT_VARIABLE_COMMAND = "extractVariable"; + const char* EXTRACT_CONSTANT_COMMAND = "extractConstant"; + const char* EXTRACT_METHOD_COMMAND = "extractMethod"; + const char* EXTRACT_FIELD_COMMAND = "extractField"; + const char* CONVERT_VARIABLE_TO_FIELD_COMMAND = "convertVariableToField"; + const char* MOVE_FILE_COMMAND = "moveFile"; + const char* MOVE_INSTANCE_METHOD_COMMAND = "moveInstanceMethod"; + const char* MOVE_STATIC_MEMBER_COMMAND = "moveStaticMember"; + const char* MOVE_TYPE_COMMAND = "moveType"; + }; + namespace QuickAssistProcessor { + + const char* SPLIT_JOIN_VARIABLE_DECLARATION_ID = "org.eclipse.jdt.ls.correction.splitJoinVariableDeclaration.assist"; //$NON-NLS-1$ + const char* CONVERT_FOR_LOOP_ID = "org.eclipse.jdt.ls.correction.convertForLoop.assist"; //$NON-NLS-1$ + const char* ASSIGN_TO_LOCAL_ID = "org.eclipse.jdt.ls.correction.assignToLocal.assist"; //$NON-NLS-1$ + const char* ASSIGN_TO_FIELD_ID = "org.eclipse.jdt.ls.correction.assignToField.assist"; //$NON-NLS-1$ + const char* ASSIGN_PARAM_TO_FIELD_ID = "org.eclipse.jdt.ls.correction.assignParamToField.assist"; //$NON-NLS-1$ + const char* ASSIGN_ALL_PARAMS_TO_NEW_FIELDS_ID = "org.eclipse.jdt.ls.correction.assignAllParamsToNewFields.assist"; //$NON-NLS-1$ + const char* ADD_BLOCK_ID = "org.eclipse.jdt.ls.correction.addBlock.assist"; //$NON-NLS-1$ + const char* EXTRACT_LOCAL_ID = "org.eclipse.jdt.ls.correction.extractLocal.assist"; //$NON-NLS-1$ + const char* EXTRACT_LOCAL_NOT_REPLACE_ID = "org.eclipse.jdt.ls.correction.extractLocalNotReplaceOccurrences.assist"; //$NON-NLS-1$ + const char* EXTRACT_CONSTANT_ID = "org.eclipse.jdt.ls.correction.extractConstant.assist"; //$NON-NLS-1$ + const char* INLINE_LOCAL_ID = "org.eclipse.jdt.ls.correction.inlineLocal.assist"; //$NON-NLS-1$ + const char* CONVERT_LOCAL_TO_FIELD_ID = "org.eclipse.jdt.ls.correction.convertLocalToField.assist"; //$NON-NLS-1$ + const char* CONVERT_ANONYMOUS_TO_LOCAL_ID = "org.eclipse.jdt.ls.correction.convertAnonymousToLocal.assist"; //$NON-NLS-1$ + const char* CONVERT_TO_STRING_BUFFER_ID = "org.eclipse.jdt.ls.correction.convertToStringBuffer.assist"; //$NON-NLS-1$ + const char* CONVERT_TO_MESSAGE_FORMAT_ID = "org.eclipse.jdt.ls.correction.convertToMessageFormat.assist"; //$NON-NLS-1$; + const char* EXTRACT_METHOD_INPLACE_ID = "org.eclipse.jdt.ls.correction.extractMethodInplace.assist"; //$NON-NLS-1$; + + const char* CONVERT_ANONYMOUS_CLASS_TO_NESTED_COMMAND = "convertAnonymousClassToNestedCommand"; + }; + + void Reflect(Reader& reader, TypeHierarchyDirection& value) { + if (!reader.IsString()) + { + value = TypeHierarchyDirection::Both; + return; + } + std::string v = reader.GetString(); + if (v == "Children") + value = TypeHierarchyDirection::Both; + else if (v == "Parents") + value = TypeHierarchyDirection::Parents; + else if (v == "Both") + value = TypeHierarchyDirection::Both; + } + + + void Reflect(Writer& writer, TypeHierarchyDirection& value) { + switch (value) + { + case TypeHierarchyDirection::Children: + writer.String("Children"); + break; + case TypeHierarchyDirection::Parents: + writer.String("Parents"); + break; + case TypeHierarchyDirection::Both: + writer.String("Both"); + break; + } + } diff --git a/graphics/asymptote/LspCpp/src/lsp/utils.cpp b/graphics/asymptote/LspCpp/src/lsp/utils.cpp new file mode 100755 index 0000000000..32c70f517a --- /dev/null +++ b/graphics/asymptote/LspCpp/src/lsp/utils.cpp @@ -0,0 +1,611 @@ +#include "LibLsp/lsp/utils.h" + +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +#include "LibLsp/lsp/lsPosition.h" +#include "utf8.h" +#ifdef _WIN32 +#include +#endif + + +// DEFAULT_RESOURCE_DIRECTORY is passed with quotes for non-MSVC compilers, ie, +// foo vs "foo". +#if defined(_MSC_VER) +#define _STRINGIFY(x) #x +#define ENSURE_STRING_MACRO_ARGUMENT(x) _STRINGIFY(x) +#else +#define ENSURE_STRING_MACRO_ARGUMENT(x) x +#endif +#include +#include +#include +namespace lsp +{ + + +// See http://stackoverflow.com/a/2072890 +bool EndsWith(std::string value, std::string ending) { + if (ending.size() > value.size()) + return false; + return std::equal(ending.rbegin(), ending.rend(), value.rbegin()); +} + +bool StartsWith(std::string value, std::string start) { + if (start.size() > value.size()) + return false; + return std::equal(start.begin(), start.end(), value.begin()); +} + +bool AnyStartsWith(const std::vector& values, + const std::string& start) { + return std::any_of( + std::begin(values), std::end(values), + [&start](const std::string& value) { return StartsWith(value, start); }); +} + +bool StartsWithAny(const std::string& value, + const std::vector& startings) { + return std::any_of(std::begin(startings), std::end(startings), + [&value](const std::string& starting) { + return StartsWith(value, starting); + }); +} + +bool EndsWithAny(const std::string& value, + const std::vector& endings) { + return std::any_of( + std::begin(endings), std::end(endings), + [&value](const std::string& ending) { return EndsWith(value, ending); }); +} + +bool FindAnyPartial(const std::string& value, + const std::vector& values) { + return std::any_of(std::begin(values), std::end(values), + [&value](const std::string& v) { + return value.find(v) != std::string::npos; + }); +} + +std::string GetDirName(std::string path) { + + ReplaceAll(path, "\\", "/"); + if (path.size() && path.back() == '/') + path.pop_back(); + size_t last_slash = path.find_last_of('/'); + if (last_slash == std::string::npos) + return "./"; + return path.substr(0, last_slash + 1); +} + +std::string GetBaseName(const std::string& path) { + size_t last_slash = path.find_last_of('/'); + if (last_slash != std::string::npos && (last_slash + 1) < path.size()) + return path.substr(last_slash + 1); + return path; +} + +std::string StripFileType(const std::string& path) { + size_t last_period = path.find_last_of('.'); + if (last_period != std::string::npos) + return path.substr(0, last_period); + return path; +} + +// See http://stackoverflow.com/a/29752943 +std::string ReplaceAll(const std::string& source, + const std::string& from, + const std::string& to) { + std::string result; + result.reserve(source.length()); // avoids a few memory allocations + + std::string::size_type last_pos = 0; + std::string::size_type find_pos; + + while (std::string::npos != (find_pos = source.find(from, last_pos))) { + result.append(source, last_pos, find_pos - last_pos); + result += to; + last_pos = find_pos + from.length(); + } + + // Care for the rest after last occurrence + result += source.substr(last_pos); + + return result; +} + +std::vector SplitString(const std::string& str, + const std::string& delimiter) { + // http://stackoverflow.com/a/13172514 + std::vector strings; + + std::string::size_type pos = 0; + std::string::size_type prev = 0; + while ((pos = str.find(delimiter, prev)) != std::string::npos) { + strings.emplace_back(str.substr(prev, pos - prev)); + prev = pos + 1; + } + + // To get the last substring (or only, if delimiter is not found) + strings.emplace_back(str.substr(prev)); + + return strings; +} + +void EnsureEndsInSlash(std::string& path) { + if (path.empty() || path[path.size() - 1] != '/') + path += '/'; +} + +std::string EscapeFileName(std::string path) { + if (path.size() && path.back() == '/') + path.pop_back(); + std::replace(path.begin(), path.end(), '\\', '@'); + std::replace(path.begin(), path.end(), '/', '@'); + std::replace(path.begin(), path.end(), ':', '@'); + return path; +} + +// http://stackoverflow.com/a/6089413 +std::istream& SafeGetline(std::istream& is, std::string& t) { + t.clear(); + + // The characters in the stream are read one-by-one using a std::streambuf. + // That is faster than reading them one-by-one using the std::istream. Code + // that uses streambuf this way must be guarded by a sentry object. The sentry + // object performs various tasks, such as thread synchronization and updating + // the stream state. + + std::istream::sentry se(is, true); + std::streambuf* sb = is.rdbuf(); + + for (;;) { + int c = sb->sbumpc(); + if (c == EOF) { + // Also handle the case when the last line has no line ending + if (t.empty()) + is.setstate(std::ios::eofbit); + return is; + } + + t += (char)c; + + if (c == '\n') + return is; + } +} + +bool FileExists(const std::string& filename) { + std::ifstream cache(filename); + return cache.is_open(); +} + +boost::optional ReadContent(const AbsolutePath& filename) { + + std::ifstream cache; + cache.open(filename.path); + + try { + return std::string(std::istreambuf_iterator(cache), + std::istreambuf_iterator()); + } catch (std::ios_base::failure&) { + return {}; + } +} + +std::vector ReadLinesWithEnding(const AbsolutePath& filename) { + std::vector result; + + std::ifstream input(filename.path); + for (std::string line; SafeGetline(input, line);) + result.emplace_back(line); + + return result; +} + +bool WriteToFile(const std::string& filename, const std::string& content) { + std::ofstream file(filename, + std::ios::out | std::ios::trunc | std::ios::binary); + if (!file.good()) { + + return false; + } + + file << content; + return true; +} + + +std::string FormatMicroseconds(long long microseconds) { + long long milliseconds = microseconds / 1000; + long long remaining = microseconds - milliseconds; + + // Only show two digits after the dot. + while (remaining >= 100) + remaining /= 10; + + return std::to_string(milliseconds) + "." + std::to_string(remaining) + "ms"; +} + + + +std::string UpdateToRnNewlines(std::string output) { + size_t idx = 0; + while (true) { + idx = output.find('\n', idx); + + // No more matches. + if (idx == std::string::npos) + break; + + // Skip an existing "\r\n" match. + if (idx > 0 && output[idx - 1] == '\r') { + ++idx; + continue; + } + + // Replace "\n" with "\r|n". + output.replace(output.begin() + idx, output.begin() + idx + 1, "\r\n"); + } + + return output; +} + + + +bool IsAbsolutePath(const std::string& path) { + return IsUnixAbsolutePath(path) || IsWindowsAbsolutePath(path); +} + +bool IsUnixAbsolutePath(const std::string& path) { + return !path.empty() && path[0] == '/'; +} + +bool IsWindowsAbsolutePath(const std::string& path) { + auto is_drive_letter = [](char c) { + return (c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z'); + }; + + return path.size() > 3 && path[1] == ':' && + (path[2] == '/' || path[2] == '\\') && is_drive_letter(path[0]); +} + +bool IsDirectory(const std::string& path) { + struct stat path_stat; + + if (stat(path.c_str(), &path_stat) != 0) { + perror("cannot access path"); + return false; + } + + return path_stat.st_mode & S_IFDIR; +} + + std::string ws2s(std::wstring const& wstr) { + if(sizeof(wchar_t) == 2){ + std::string narrow; + utf8::utf16to8(wstr.begin(), wstr.end(), std::back_inserter(narrow)); + return narrow; + }else{ + std::string narrow; + utf8::utf32to8(wstr.begin(), wstr.end(), std::back_inserter(narrow)); + return narrow; + } + + } + std::wstring s2ws(const std::string& str) { + std::wstring wide; + if(sizeof(wchar_t) == 2){ + utf8::utf8to16(str.begin(), str.end(), std::back_inserter(wide)); + return wide; + }else{ + utf8::utf8to32(str.begin(), str.end(), std::back_inserter(wide)); + return wide; + } + } + +#ifdef _WIN32 + +#else +// Returns the canonicalized absolute pathname, without expanding symbolic +// links. This is a variant of realpath(2), C++ rewrite of +// https://github.com/freebsd/freebsd/blob/master/lib/libc/stdlib/realpath.c +AbsolutePath RealPathNotExpandSymlink(std::string path, + bool ensure_exists) { + if (path.empty()) { + errno = EINVAL; + return {}; + } + if (path[0] == '\0') { + errno = ENOENT; + return {}; + } + + // Do not use PATH_MAX because it is tricky on Linux. + // See https://eklitzke.org/path-max-is-tricky + char tmp[1024]; + std::string resolved; + size_t i = 0; + struct stat sb; + if (path[0] == '/') { + resolved = "/"; + i = 1; + } + else { + if (!getcwd(tmp, sizeof tmp) && ensure_exists) + return {}; + resolved = tmp; + } + + while (i < path.size()) { + auto j = path.find('/', i); + if (j == std::string::npos) + j = path.size(); + auto next_token = path.substr(i, j - i); + i = j + 1; + if (resolved.back() != '/') + resolved += '/'; + if (next_token.empty() || next_token == ".") { + // Handle consequential slashes and "." + continue; + } + else if (next_token == "..") { + // Strip the last path component except when it is single "/" + if (resolved.size() > 1) + resolved.resize(resolved.rfind('/', resolved.size() - 2) + 1); + continue; + } + // Append the next path component. + // Here we differ from realpath(3), we use stat(2) instead of + // lstat(2) because we do not want to resolve symlinks. + resolved += next_token; + if (stat(resolved.c_str(), &sb) != 0 && ensure_exists) + return {}; + if (!S_ISDIR(sb.st_mode) && j < path.size() && ensure_exists) { + errno = ENOTDIR; + return {}; + } + } + + // Remove trailing slash except when a single "/". + if (resolved.size() > 1 && resolved.back() == '/') + resolved.pop_back(); + return AbsolutePath(resolved, true /*validate*/); +} +#endif + + +AbsolutePath NormalizePath(const std::string& path0, + bool ensure_exists , + bool force_lower_on_windows) { +#ifdef _WIN32 + + std::wstring path = lsp::s2ws(path0); + + wchar_t buffer[MAX_PATH] = (L""); + + // Normalize the path name, ie, resolve `..`. + unsigned long len = GetFullPathNameW(path.c_str(), MAX_PATH, buffer, nullptr); + if (!len) + return {}; + path = std::wstring(buffer, len); + + // Get the actual casing of the path, ie, if the file on disk is `C:\FooBar` + // and this function is called with `c:\fooBar` this will return `c:\FooBar`. + // (drive casing is lowercase). + if (ensure_exists) { + len = GetLongPathNameW(path.c_str(), buffer, MAX_PATH); + if (!len) + return {}; + path = std::wstring(buffer, len); + } + + // Empty paths have no meaning. + if (path.empty()) + return {}; + + // We may need to normalize the drive name to upper-case; at the moment + // vscode sends lower-case path names. + /* + path[0] = toupper(path[0]); + */ + // Make the path all lower-case, since windows is case-insensitive. + if (force_lower_on_windows) { + for (size_t i = 0; i < path.size(); ++i) + path[i] = (wchar_t)tolower(path[i]); + } + + // cquery assumes forward-slashes. + std::replace(path.begin(), path.end(), '\\', '/'); + + + return AbsolutePath(lsp::ws2s(path), false /*validate*/); +#else + + return RealPathNotExpandSymlink(path0, ensure_exists); + +#endif + + +} + +// VSCode (UTF-16) disagrees with Emacs lsp-mode (UTF-8) on how to represent +// text documents. +// We use a UTF-8 iterator to approximate UTF-16 in the specification (weird). +// This is good enough and fails only for UTF-16 surrogate pairs. +int GetOffsetForPosition(lsPosition position, const std::string& content) { + size_t i = 0; + // Iterate lines until we have found the correct line. + while (position.line > 0 && i < content.size()) { + if (content[i] == '\n') + position.line--; + i++; + } + // Iterate characters on the target line. + while (position.character > 0 && i < content.size()) { + if (uint8_t(content[i++]) >= 128) { + // Skip 0b10xxxxxx + while (i < content.size() && uint8_t(content[i]) >= 128 && + uint8_t(content[i]) < 192) + i++; + } + position.character--; + } + return int(i); +} + + +lsPosition GetPositionForOffset(size_t offset,const std::string& content) { + lsPosition result; + for (size_t i = 0; i < offset && i < content.length(); ++i) { + if (content[i] == '\n') { + result.line++; + result.character = 0; + } + else { + result.character++; + } + } + return result; +} + +lsPosition CharPos(const std::string& search, + char character, + int character_offset) { + lsPosition result; + size_t index = 0; + while (index < search.size()) { + char c = search[index]; + if (c == character) + break; + if (c == '\n') { + result.line += 1; + result.character = 0; + } + else { + result.character += 1; + } + ++index; + } + assert(index < search.size()); + result.character += character_offset; + return result; +} + +void scanDirsUseRecursive(const std::wstring& rootPath, std::vector& ret) +{ + namespace fs = boost::filesystem; + fs::path fullpath(rootPath); + if (!fs::exists(fullpath)) { return; } + fs::recursive_directory_iterator end_iter; + for (fs::recursive_directory_iterator iter(fullpath); iter != end_iter; iter++) { + try { + if (fs::is_directory(*iter)) { + ret.push_back(iter->path().wstring()); + } + } + catch (const std::exception& ex) { + continue; + } + } +} + +void scanDirsNoRecursive(const std::wstring& rootPath, std::vector& ret) +{ + namespace fs = boost::filesystem; + boost::filesystem::path myPath(rootPath); + if (!fs::exists(rootPath)) { return; } + boost::filesystem::directory_iterator endIter; + for (boost::filesystem::directory_iterator iter(myPath); iter != endIter; iter++) { + if (boost::filesystem::is_directory(*iter)) { + ret.push_back(iter->path().wstring()); + } + } +} + +void scanFilesUseRecursive( + const std::wstring& rootPath, + std::vector& ret, + std::wstring suf) { + namespace fs = boost::filesystem; + boost::to_lower(suf); + + fs::path fullpath(rootPath); + if (!fs::exists(fullpath)) { return; } + fs::recursive_directory_iterator end_iter; + for (fs::recursive_directory_iterator iter(fullpath); iter != end_iter; iter++) { + try { + if (!fs::is_directory(*iter) && fs::is_regular_file(*iter)) { + auto temp_path = iter->path().wstring(); + auto size = suf.size(); + if (!size) + { + ret.push_back(std::move(temp_path)); + } + else + { + + if (temp_path.size() < size) continue; + auto suf_temp = temp_path.substr(temp_path.size() - size); + boost::to_lower(suf_temp); + if (suf_temp == suf) + { + ret.push_back(std::move(temp_path)); + } + } + } + } + catch (const std::exception&) { + continue; + } + } +} + +void scanFileNamesUseRecursive(const std::wstring& rootPath, std::vector& ret, + std::wstring strSuf) +{ + scanFilesUseRecursive(rootPath, ret, strSuf); + std::vector names; + for (auto& it : ret) + { + if (it.size() >= rootPath.size()) + { + names.push_back(it.substr(rootPath.size())); + } + } + ret.swap(names); +} + +void scanFileNamesUseRecursive(const std::string& rootPath, std::vector& ret, std::string strSuf) +{ + std::vector out; + scanFileNamesUseRecursive(s2ws(rootPath), out, s2ws(strSuf)); + for (auto& it : out) + { + ret.push_back(ws2s(it)); + } +} + +void scanFilesUseRecursive(const std::string& rootPath, std::vector& ret, std::string strSuf) +{ + std::vector out; + scanFilesUseRecursive(s2ws(rootPath), out, s2ws(strSuf)); + for (auto& it : out) + { + ret.push_back(ws2s(it)); + } +} + + +} diff --git a/graphics/asymptote/LspCpp/src/lsp/working_files.cpp b/graphics/asymptote/LspCpp/src/lsp/working_files.cpp new file mode 100755 index 0000000000..0900021037 --- /dev/null +++ b/graphics/asymptote/LspCpp/src/lsp/working_files.cpp @@ -0,0 +1,186 @@ +#include "LibLsp/lsp/working_files.h" +#include +#include +#include +#include "LibLsp/lsp/utils.h" +#include +#include "LibLsp/lsp/AbsolutePath.h" +using namespace lsp; +struct WorkingFilesData +{ + std::map > files; + std::mutex files_mutex; // Protects |d_ptr->files|. +}; + +WorkingFile::WorkingFile(WorkingFiles& _parent, const AbsolutePath& filename, + const std::string& buffer_content) + : filename(filename), directory(filename), parent(_parent), counter(0), buffer_content(buffer_content) +{ + directory = Directory(GetDirName(filename.path)); +} + +WorkingFile::WorkingFile(WorkingFiles& _parent, const AbsolutePath& filename, + std::string&& buffer_content) + : filename(filename), directory(filename), parent(_parent), counter(0), buffer_content(buffer_content) +{ + directory = Directory(GetDirName(filename.path)); +} + +WorkingFiles::WorkingFiles():d_ptr(new WorkingFilesData()) +{ +} + +WorkingFiles::~WorkingFiles() +{ + delete d_ptr; + +} + + + +void WorkingFiles::CloseFilesInDirectory(const std::vector& directories) +{ + std::lock_guard lock(d_ptr->files_mutex); + std::vector files_to_be_delete; + + for(auto& it : d_ptr->files) + { + for (auto& dir : directories) + { + if (it.second->directory == dir) { + files_to_be_delete.emplace_back(it.first); + } + } + } + + for(auto& it : files_to_be_delete) + { + d_ptr->files.erase(it); + } +} + + + + +std::shared_ptr WorkingFiles::GetFileByFilename(const AbsolutePath& filename) { + std::lock_guard lock(d_ptr->files_mutex); + return GetFileByFilenameNoLock(filename); +} + +std::shared_ptr WorkingFiles::GetFileByFilenameNoLock( + const AbsolutePath& filename) { + const auto findIt = d_ptr->files.find(filename); + if ( findIt != d_ptr->files.end()) + { + return findIt->second; + } + return nullptr; +} + + + +std::shared_ptr WorkingFiles::OnOpen( lsTextDocumentItem& open) { + std::lock_guard lock(d_ptr->files_mutex); + + AbsolutePath filename = open.uri.GetAbsolutePath(); + + // The file may already be open. + if (auto file = GetFileByFilenameNoLock(filename)) { + file->version = open.version; + file->buffer_content.swap(open.text); + + return file; + } + + const auto& it = d_ptr->files.insert({ filename,std::make_shared(*this,filename, std::move(open.text)) }); + return it.first->second; +} + + +std::shared_ptr WorkingFiles::OnChange(const lsTextDocumentDidChangeParams& change) { + std::lock_guard lock(d_ptr->files_mutex); + + AbsolutePath filename = change.textDocument.uri.GetAbsolutePath(); + auto file = GetFileByFilenameNoLock(filename); + if (!file) { + return {}; + } + + if (change.textDocument.version) + file->version = *change.textDocument.version; + file->counter.fetch_add(1, std::memory_order_relaxed); + for (const lsTextDocumentContentChangeEvent& diff : change.contentChanges) { + // Per the spec replace everything if the rangeLength and range are not set. + // See https://github.com/Microsoft/language-server-protocol/issues/9. + if (!diff.range) { + file->buffer_content = diff.text; + + } else { + int start_offset = + GetOffsetForPosition(diff.range->start, file->buffer_content); + // Ignore TextDocumentContentChangeEvent.rangeLength which causes trouble + // when UTF-16 surrogate pairs are used. + int end_offset = + GetOffsetForPosition(diff.range->end, file->buffer_content); + file->buffer_content.replace(file->buffer_content.begin() + start_offset, + file->buffer_content.begin() + end_offset, + diff.text); + + } + } + return file; +} + +bool WorkingFiles::OnClose(const lsTextDocumentIdentifier& close) { + std::lock_guard lock(d_ptr->files_mutex); + + AbsolutePath filename = close.uri.GetAbsolutePath(); + const auto findIt = d_ptr->files.find(filename); + if( findIt != d_ptr->files.end()) + { + d_ptr->files.erase(findIt); + return true; + } + return false; +} + +std::shared_ptr WorkingFiles::OnSave(const lsTextDocumentIdentifier& _save) +{ + std::lock_guard lock(d_ptr->files_mutex); + + AbsolutePath filename = _save.uri.GetAbsolutePath(); + const auto findIt = d_ptr->files.find(filename); + if (findIt != d_ptr->files.end()) + { + std::shared_ptr& file = findIt->second; + lsp::WriteToFile(file->filename, file->GetContentNoLock()); + return findIt->second; + } + return {}; + +} + +bool WorkingFiles::GetFileBufferContent(std::shared_ptr&file, std::string& out) +{ + std::lock_guard lock(d_ptr->files_mutex); + if (file) + { + out = file->buffer_content; + return true; + } + return false; +} +bool WorkingFiles::GetFileBufferContent(std::shared_ptr& file, std::wstring& out) +{ + std::lock_guard lock(d_ptr->files_mutex); + if (file) + { + out = lsp::s2ws(file->buffer_content); + return true; + } + return false; +} +void WorkingFiles::Clear() { + std::lock_guard lock(d_ptr->files_mutex); + d_ptr->files.clear(); +} \ No newline at end of file diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/CHANGELOG.md b/graphics/asymptote/LspCpp/third_party/rapidjson/CHANGELOG.md new file mode 100644 index 0000000000..1c580bd140 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/CHANGELOG.md @@ -0,0 +1,158 @@ +# Change Log +All notable changes to this project will be documented in this file. +This project adheres to [Semantic Versioning](http://semver.org/). + +## [Unreleased] + +## 1.1.0 - 2016-08-25 + +### Added +* Add GenericDocument ctor overload to specify JSON type (#369) +* Add FAQ (#372, #373, #374, #376) +* Add forward declaration header `fwd.h` +* Add @PlatformIO Library Registry manifest file (#400) +* Implement assignment operator for BigInteger (#404) +* Add comments support (#443) +* Adding coapp definition (#460) +* documenttest.cpp: EXPECT_THROW when checking empty allocator (470) +* GenericDocument: add implicit conversion to ParseResult (#480) +* Use with C++ linkage on Windows ARM (#485) +* Detect little endian for Microsoft ARM targets +* Check Nan/Inf when writing a double (#510) +* Add JSON Schema Implementation (#522) +* Add iostream wrapper (#530) +* Add Jsonx example for converting JSON into JSONx (a XML format) (#531) +* Add optional unresolvedTokenIndex parameter to Pointer::Get() (#532) +* Add encoding validation option for Writer/PrettyWriter (#534) +* Add Writer::SetMaxDecimalPlaces() (#536) +* Support {0, } and {0, m} in Regex (#539) +* Add Value::Get/SetFloat(), Value::IsLossLessFloat/Double() (#540) +* Add stream position check to reader unit tests (#541) +* Add Templated accessors and range-based for (#542) +* Add (Pretty)Writer::RawValue() (#543) +* Add Document::Parse(std::string), Document::Parse(const char*, size_t length) and related APIs. (#553) +* Add move constructor for GenericSchemaDocument (#554) +* Add VS2010 and VS2015 to AppVeyor CI (#555) +* Add parse-by-parts example (#556, #562) +* Support parse number as string (#564, #589) +* Add kFormatSingleLineArray for PrettyWriter (#577) +* Added optional support for trailing commas (#584) +* Added filterkey and filterkeydom examples (#615) +* Added npm docs (#639) +* Allow options for writing and parsing NaN/Infinity (#641) +* Add std::string overload to PrettyWriter::Key() when RAPIDJSON_HAS_STDSTRING is defined (#698) + +### Fixed +* Fix gcc/clang/vc warnings (#350, #394, #397, #444, #447, #473, #515, #582, #589, #595, #667) +* Fix documentation (#482, #511, #550, #557, #614, #635, #660) +* Fix emscripten alignment issue (#535) +* Fix missing allocator to uses of AddMember in document (#365) +* CMake will no longer complain that the minimum CMake version is not specified (#501) +* Make it usable with old VC8 (VS2005) (#383) +* Prohibit C++11 move from Document to Value (#391) +* Try to fix incorrect 64-bit alignment (#419) +* Check return of fwrite to avoid warn_unused_result build failures (#421) +* Fix UB in GenericDocument::ParseStream (#426) +* Keep Document value unchanged on parse error (#439) +* Add missing return statement (#450) +* Fix Document::Parse(const Ch*) for transcoding (#478) +* encodings.h: fix typo in preprocessor condition (#495) +* Custom Microsoft headers are necessary only for Visual Studio 2012 and lower (#559) +* Fix memory leak for invalid regex (26e69ffde95ba4773ab06db6457b78f308716f4b) +* Fix a bug in schema minimum/maximum keywords for 64-bit integer (e7149d665941068ccf8c565e77495521331cf390) +* Fix a crash bug in regex (#605) +* Fix schema "required" keyword cannot handle duplicated keys (#609) +* Fix cmake CMP0054 warning (#612) +* Added missing include guards in istreamwrapper.h and ostreamwrapper.h (#634) +* Fix undefined behaviour (#646) +* Fix buffer overrun using PutN (#673) +* Fix rapidjson::value::Get() may returns wrong data (#681) +* Add Flush() for all value types (#689) +* Handle malloc() fail in PoolAllocator (#691) +* Fix builds on x32 platform. #703 + +### Changed +* Clarify problematic JSON license (#392) +* Move Travis to container based infrastructure (#504, #558) +* Make whitespace array more compact (#513) +* Optimize Writer::WriteString() with SIMD (#544) +* x86-64 48-bit pointer optimization for GenericValue (#546) +* Define RAPIDJSON_HAS_CXX11_RVALUE_REFS directly in clang (#617) +* Make GenericSchemaDocument constructor explicit (#674) +* Optimize FindMember when use std::string (#690) + +## [1.0.2] - 2015-05-14 + +### Added +* Add Value::XXXMember(...) overloads for std::string (#335) + +### Fixed +* Include rapidjson.h for all internal/error headers. +* Parsing some numbers incorrectly in full-precision mode (`kFullPrecisionParseFlag`) (#342) +* Fix some numbers parsed incorrectly (#336) +* Fix alignment of 64bit platforms (#328) +* Fix MemoryPoolAllocator::Clear() to clear user-buffer (0691502573f1afd3341073dd24b12c3db20fbde4) + +### Changed +* CMakeLists for include as a thirdparty in projects (#334, #337) +* Change Document::ParseStream() to use stack allocator for Reader (ffbe38614732af8e0b3abdc8b50071f386a4a685) + +## [1.0.1] - 2015-04-25 + +### Added +* Changelog following [Keep a CHANGELOG](https://github.com/olivierlacan/keep-a-changelog) suggestions. + +### Fixed +* Parsing of some numbers (e.g. "1e-00011111111111") causing assertion (#314). +* Visual C++ 32-bit compilation error in `diyfp.h` (#317). + +## [1.0.0] - 2015-04-22 + +### Added +* 100% [Coverall](https://coveralls.io/r/Tencent/rapidjson?branch=master) coverage. +* Version macros (#311) + +### Fixed +* A bug in trimming long number sequence (4824f12efbf01af72b8cb6fc96fae7b097b73015). +* Double quote in unicode escape (#288). +* Negative zero roundtrip (double only) (#289). +* Standardize behavior of `memcpy()` and `malloc()` (0c5c1538dcfc7f160e5a4aa208ddf092c787be5a, #305, 0e8bbe5e3ef375e7f052f556878be0bd79e9062d). + +### Removed +* Remove an invalid `Document::ParseInsitu()` API (e7f1c6dd08b522cfcf9aed58a333bd9a0c0ccbeb). + +## 1.0-beta - 2015-04-8 + +### Added +* RFC 7159 (#101) +* Optional Iterative Parser (#76) +* Deep-copy values (#20) +* Error code and message (#27) +* ASCII Encoding (#70) +* `kParseStopWhenDoneFlag` (#83) +* `kParseFullPrecisionFlag` (881c91d696f06b7f302af6d04ec14dd08db66ceb) +* Add `Key()` to handler concept (#134) +* C++11 compatibility and support (#128) +* Optimized number-to-string and vice versa conversions (#137, #80) +* Short-String Optimization (#131) +* Local stream optimization by traits (#32) +* Travis & Appveyor Continuous Integration, with Valgrind verification (#24, #242) +* Redo all documentation (English, Simplified Chinese) + +### Changed +* Copyright ownership transferred to THL A29 Limited (a Tencent company). +* Migrating from Premake to CMAKE (#192) +* Resolve all warning reports + +### Removed +* Remove other JSON libraries for performance comparison (#180) + +## 0.11 - 2012-11-16 + +## 0.1 - 2011-11-18 + +[Unreleased]: https://github.com/Tencent/rapidjson/compare/v1.1.0...HEAD +[1.1.0]: https://github.com/Tencent/rapidjson/compare/v1.0.2...v1.1.0 +[1.0.2]: https://github.com/Tencent/rapidjson/compare/v1.0.1...v1.0.2 +[1.0.1]: https://github.com/Tencent/rapidjson/compare/v1.0.0...v1.0.1 +[1.0.0]: https://github.com/Tencent/rapidjson/compare/v1.0-beta...v1.0.0 diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/CMakeLists.txt b/graphics/asymptote/LspCpp/third_party/rapidjson/CMakeLists.txt new file mode 100644 index 0000000000..bdfdd6779e --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/CMakeLists.txt @@ -0,0 +1,250 @@ +CMAKE_MINIMUM_REQUIRED(VERSION 2.8) +if(POLICY CMP0025) + # detect Apple's Clang + cmake_policy(SET CMP0025 NEW) +endif() +if(POLICY CMP0054) + cmake_policy(SET CMP0054 NEW) +endif() + +SET(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules) + +set(LIB_MAJOR_VERSION "1") +set(LIB_MINOR_VERSION "1") +set(LIB_PATCH_VERSION "0") +set(LIB_VERSION_STRING "${LIB_MAJOR_VERSION}.${LIB_MINOR_VERSION}.${LIB_PATCH_VERSION}") + +if (CMAKE_VERSION VERSION_LESS 3.0) + PROJECT(RapidJSON CXX) +else() + cmake_policy(SET CMP0048 NEW) + PROJECT(RapidJSON VERSION "${LIB_VERSION_STRING}" LANGUAGES CXX) +endif() + +# compile in release with debug info mode by default +if(NOT CMAKE_BUILD_TYPE) + set(CMAKE_BUILD_TYPE "RelWithDebInfo" CACHE STRING "Choose the type of build, options are: Debug Release RelWithDebInfo MinSizeRel." FORCE) +endif() + +# Build all binaries in a separate directory +SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin) + +option(RAPIDJSON_BUILD_DOC "Build rapidjson documentation." ON) +option(RAPIDJSON_BUILD_EXAMPLES "Build rapidjson examples." ON) +option(RAPIDJSON_BUILD_TESTS "Build rapidjson perftests and unittests." ON) +option(RAPIDJSON_BUILD_THIRDPARTY_GTEST + "Use gtest installation in `thirdparty/gtest` by default if available" OFF) + +option(RAPIDJSON_BUILD_CXX11 "Build rapidjson with C++11" ON) +option(RAPIDJSON_BUILD_CXX17 "Build rapidjson with C++17" OFF) +if(RAPIDJSON_BUILD_CXX11) + set(CMAKE_CXX_STANDARD 11) + set(CMAKE_CXX_STANDARD_REQUIRED TRUE) +endif() + +option(RAPIDJSON_BUILD_ASAN "Build rapidjson with address sanitizer (gcc/clang)" OFF) +option(RAPIDJSON_BUILD_UBSAN "Build rapidjson with undefined behavior sanitizer (gcc/clang)" OFF) + +option(RAPIDJSON_ENABLE_INSTRUMENTATION_OPT "Build rapidjson with -march or -mcpu options" ON) + +option(RAPIDJSON_HAS_STDSTRING "" OFF) +if(RAPIDJSON_HAS_STDSTRING) + add_definitions(-DRAPIDJSON_HAS_STDSTRING) +endif() + +option(RAPIDJSON_USE_MEMBERSMAP "" OFF) +if(RAPIDJSON_USE_MEMBERSMAP) + add_definitions(-DRAPIDJSON_USE_MEMBERSMAP=1) +endif() + +find_program(CCACHE_FOUND ccache) +if(CCACHE_FOUND) + set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache) + set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ccache) + if (CMAKE_CXX_COMPILER_ID MATCHES "Clang") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Qunused-arguments -fcolor-diagnostics") + endif() +endif(CCACHE_FOUND) + +if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU") + if(RAPIDJSON_ENABLE_INSTRUMENTATION_OPT AND NOT CMAKE_CROSSCOMPILING) + if(CMAKE_SYSTEM_PROCESSOR STREQUAL "powerpc" OR CMAKE_SYSTEM_PROCESSOR STREQUAL "ppc64" OR CMAKE_SYSTEM_PROCESSOR STREQUAL "ppc64le") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mcpu=native") + else() + #FIXME: x86 is -march=native, but doesn't mean every arch is this option. To keep original project's compatibility, I leave this except POWER. + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=native") + endif() + endif() + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Werror") + set(EXTRA_CXX_FLAGS -Weffc++ -Wswitch-default -Wfloat-equal -Wconversion -Wsign-conversion) + if (RAPIDJSON_BUILD_CXX11 AND CMAKE_VERSION VERSION_LESS 3.1) + if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS "4.7.0") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x") + else() + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") + endif() + elseif (RAPIDJSON_BUILD_CXX17 AND NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS "5.0") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17") + endif() + if (RAPIDJSON_BUILD_ASAN) + if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS "4.8.0") + message(FATAL_ERROR "GCC < 4.8 doesn't support the address sanitizer") + else() + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address") + endif() + endif() + if (RAPIDJSON_BUILD_UBSAN) + if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS "4.9.0") + message(FATAL_ERROR "GCC < 4.9 doesn't support the undefined behavior sanitizer") + else() + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=undefined") + endif() + endif() +elseif (CMAKE_CXX_COMPILER_ID MATCHES "Clang") + if(NOT CMAKE_CROSSCOMPILING) + if(CMAKE_SYSTEM_PROCESSOR STREQUAL "powerpc" OR CMAKE_SYSTEM_PROCESSOR STREQUAL "ppc64" OR CMAKE_SYSTEM_PROCESSOR STREQUAL "ppc64le") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mcpu=native") + else() + #FIXME: x86 is -march=native, but doesn't mean every arch is this option. To keep original project's compatibility, I leave this except POWER. + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=native") + endif() + endif() + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Werror -Wno-missing-field-initializers") + set(EXTRA_CXX_FLAGS -Weffc++ -Wswitch-default -Wfloat-equal -Wconversion -Wimplicit-fallthrough) + if (RAPIDJSON_BUILD_CXX11 AND CMAKE_VERSION VERSION_LESS 3.1) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") + elseif (RAPIDJSON_BUILD_CXX17 AND NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS "4.0") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17") + endif() + if (RAPIDJSON_BUILD_ASAN) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address") + endif() + if (RAPIDJSON_BUILD_UBSAN) + if (CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=undefined-trap -fsanitize-undefined-trap-on-error") + else() + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=undefined") + endif() + endif() +elseif (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") + add_definitions(-D_CRT_SECURE_NO_WARNINGS=1) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /EHsc") + # CMake >= 3.10 should handle the above CMAKE_CXX_STANDARD fine, otherwise use /std:c++XX with MSVC >= 19.10 + if (RAPIDJSON_BUILD_CXX11 AND NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS "19.10") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /std:c++11") + elseif (RAPIDJSON_BUILD_CXX17 AND NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS "19.14") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /std:c++17") + endif() + # Always compile with /WX + if(CMAKE_CXX_FLAGS MATCHES "/WX-") + string(REGEX REPLACE "/WX-" "/WX" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") + else() + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /WX") + endif() +elseif (CMAKE_CXX_COMPILER_ID MATCHES "XL") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -qarch=auto") +endif() + +#add extra search paths for libraries and includes +SET(INCLUDE_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/include" CACHE PATH "The directory the headers are installed in") +SET(LIB_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/lib" CACHE STRING "Directory where lib will install") +SET(DOC_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/share/doc/${PROJECT_NAME}" CACHE PATH "Path to the documentation") + +IF(UNIX OR CYGWIN) + SET(_CMAKE_INSTALL_DIR "${LIB_INSTALL_DIR}/cmake/${PROJECT_NAME}") +ELSEIF(WIN32) + SET(_CMAKE_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/cmake") +ENDIF() +SET(CMAKE_INSTALL_DIR "${_CMAKE_INSTALL_DIR}" CACHE PATH "The directory cmake files are installed in") + +include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include) + +if(RAPIDJSON_BUILD_DOC) + add_subdirectory(doc) +endif() + +add_custom_target(travis_doc) +add_custom_command(TARGET travis_doc + COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/travis-doxygen.sh) + +if(RAPIDJSON_BUILD_EXAMPLES) + add_subdirectory(example) +endif() + +if(RAPIDJSON_BUILD_TESTS) + if(MSVC11) + # required for VS2012 due to missing support for variadic templates + add_definitions(-D_VARIADIC_MAX=10) + endif(MSVC11) + add_subdirectory(test) + include(CTest) +endif() + +# pkg-config +IF (UNIX OR CYGWIN) + CONFIGURE_FILE (${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_NAME}.pc.in + ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.pc + @ONLY) + INSTALL (FILES ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.pc + DESTINATION "${LIB_INSTALL_DIR}/pkgconfig" + COMPONENT pkgconfig) +ENDIF() + +install(FILES readme.md + DESTINATION "${DOC_INSTALL_DIR}" + COMPONENT doc) + +install(DIRECTORY include/rapidjson + DESTINATION "${INCLUDE_INSTALL_DIR}" + COMPONENT dev) + +install(DIRECTORY example/ + DESTINATION "${DOC_INSTALL_DIR}/examples" + COMPONENT examples + # Following patterns are for excluding the intermediate/object files + # from an install of in-source CMake build. + PATTERN "CMakeFiles" EXCLUDE + PATTERN "Makefile" EXCLUDE + PATTERN "cmake_install.cmake" EXCLUDE) + +# Provide config and version files to be used by other applications +# =============================== + +################################################################################ +# Export package for use from the build tree +EXPORT( PACKAGE ${PROJECT_NAME} ) + +# Create the RapidJSONConfig.cmake file for other cmake projects. +# ... for the build tree +SET( CONFIG_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}) +SET( CONFIG_DIR ${CMAKE_CURRENT_BINARY_DIR}) +SET( ${PROJECT_NAME}_INCLUDE_DIR "\${${PROJECT_NAME}_SOURCE_DIR}/include" ) + +CONFIGURE_FILE( ${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_NAME}Config.cmake.in + ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}Config.cmake @ONLY ) +CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_NAME}ConfigVersion.cmake.in + ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake @ONLY) + +# ... for the install tree +SET( CMAKECONFIG_INSTALL_DIR ${LIB_INSTALL_DIR}/cmake/${PROJECT_NAME} ) +FILE( RELATIVE_PATH REL_INCLUDE_DIR + "${CMAKECONFIG_INSTALL_DIR}" + "${CMAKE_INSTALL_PREFIX}/include" ) + +SET( ${PROJECT_NAME}_INCLUDE_DIR "\${${PROJECT_NAME}_CMAKE_DIR}/${REL_INCLUDE_DIR}" ) +SET( CONFIG_SOURCE_DIR ) +SET( CONFIG_DIR ) +CONFIGURE_FILE( ${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_NAME}Config.cmake.in + ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/${PROJECT_NAME}Config.cmake @ONLY ) + +INSTALL(FILES "${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/${PROJECT_NAME}Config.cmake" + DESTINATION ${CMAKECONFIG_INSTALL_DIR} ) + +# Install files +IF(CMAKE_INSTALL_DIR) + INSTALL(FILES + ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}Config.cmake + ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake + DESTINATION "${CMAKE_INSTALL_DIR}" + COMPONENT dev) +ENDIF() diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/CMakeModules/FindGTestSrc.cmake b/graphics/asymptote/LspCpp/third_party/rapidjson/CMakeModules/FindGTestSrc.cmake new file mode 100644 index 0000000000..f3cb8c9908 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/CMakeModules/FindGTestSrc.cmake @@ -0,0 +1,30 @@ + +SET(GTEST_SEARCH_PATH + "${GTEST_SOURCE_DIR}" + "${CMAKE_CURRENT_LIST_DIR}/../thirdparty/gtest/googletest") + +IF(UNIX) + IF(RAPIDJSON_BUILD_THIRDPARTY_GTEST) + LIST(APPEND GTEST_SEARCH_PATH "/usr/src/gtest") + ELSE() + LIST(INSERT GTEST_SEARCH_PATH 1 "/usr/src/gtest") + ENDIF() +ENDIF() + +FIND_PATH(GTEST_SOURCE_DIR + NAMES CMakeLists.txt src/gtest_main.cc + PATHS ${GTEST_SEARCH_PATH}) + + +# Debian installs gtest include directory in /usr/include, thus need to look +# for include directory separately from source directory. +FIND_PATH(GTEST_INCLUDE_DIR + NAMES gtest/gtest.h + PATH_SUFFIXES include + HINTS ${GTEST_SOURCE_DIR} + PATHS ${GTEST_SEARCH_PATH}) + +INCLUDE(FindPackageHandleStandardArgs) +find_package_handle_standard_args(GTestSrc DEFAULT_MSG + GTEST_SOURCE_DIR + GTEST_INCLUDE_DIR) diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/RapidJSON.pc.in b/graphics/asymptote/LspCpp/third_party/rapidjson/RapidJSON.pc.in new file mode 100644 index 0000000000..6afb079f81 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/RapidJSON.pc.in @@ -0,0 +1,7 @@ +includedir=@INCLUDE_INSTALL_DIR@ + +Name: @PROJECT_NAME@ +Description: A fast JSON parser/generator for C++ with both SAX/DOM style API +Version: @LIB_VERSION_STRING@ +URL: https://github.com/Tencent/rapidjson +Cflags: -I${includedir} diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/RapidJSONConfig.cmake.in b/graphics/asymptote/LspCpp/third_party/rapidjson/RapidJSONConfig.cmake.in new file mode 100644 index 0000000000..c25d312585 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/RapidJSONConfig.cmake.in @@ -0,0 +1,25 @@ +################################################################################ +# CMake minimum version required +cmake_minimum_required(VERSION 3.0) + +################################################################################ +# RapidJSON source dir +set( RapidJSON_SOURCE_DIR "@CONFIG_SOURCE_DIR@") + +################################################################################ +# RapidJSON build dir +set( RapidJSON_DIR "@CONFIG_DIR@") + +################################################################################ +# Compute paths +get_filename_component(RapidJSON_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH) + +set( RapidJSON_INCLUDE_DIR "@RapidJSON_INCLUDE_DIR@" ) +set( RapidJSON_INCLUDE_DIRS "@RapidJSON_INCLUDE_DIR@" ) +message(STATUS "RapidJSON found. Headers: ${RapidJSON_INCLUDE_DIRS}") + +if(NOT TARGET rapidjson) + add_library(rapidjson INTERFACE IMPORTED) + set_property(TARGET rapidjson PROPERTY + INTERFACE_INCLUDE_DIRECTORIES ${RapidJSON_INCLUDE_DIRS}) +endif() diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/RapidJSONConfigVersion.cmake.in b/graphics/asymptote/LspCpp/third_party/rapidjson/RapidJSONConfigVersion.cmake.in new file mode 100644 index 0000000000..25741fc097 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/RapidJSONConfigVersion.cmake.in @@ -0,0 +1,10 @@ +SET(PACKAGE_VERSION "@LIB_VERSION_STRING@") + +IF (PACKAGE_FIND_VERSION VERSION_EQUAL PACKAGE_VERSION) + SET(PACKAGE_VERSION_EXACT "true") +ENDIF (PACKAGE_FIND_VERSION VERSION_EQUAL PACKAGE_VERSION) +IF (NOT PACKAGE_FIND_VERSION VERSION_GREATER PACKAGE_VERSION) + SET(PACKAGE_VERSION_COMPATIBLE "true") +ELSE (NOT PACKAGE_FIND_VERSION VERSION_GREATER PACKAGE_VERSION) + SET(PACKAGE_VERSION_UNSUITABLE "true") +ENDIF (NOT PACKAGE_FIND_VERSION VERSION_GREATER PACKAGE_VERSION) diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/appveyor.yml b/graphics/asymptote/LspCpp/third_party/rapidjson/appveyor.yml new file mode 100644 index 0000000000..4044ba6640 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/appveyor.yml @@ -0,0 +1,102 @@ +version: 1.1.0.{build} + +configuration: +- Debug +- Release + +environment: + matrix: + # - VS_VERSION: 9 2008 + # VS_PLATFORM: win32 + # - VS_VERSION: 9 2008 + # VS_PLATFORM: x64 + - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2013 + VS_VERSION: 10 2010 + VS_PLATFORM: win32 + CXX11: OFF + CXX17: OFF + MEMBERSMAP: OFF + - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2013 + VS_VERSION: 10 2010 + VS_PLATFORM: x64 + CXX11: OFF + CXX17: OFF + MEMBERSMAP: ON + - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2013 + VS_VERSION: 11 2012 + VS_PLATFORM: win32 + CXX11: OFF + CXX17: OFF + MEMBERSMAP: ON + - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2013 + VS_VERSION: 11 2012 + VS_PLATFORM: x64 + CXX11: OFF + CXX17: OFF + MEMBERSMAP: OFF + - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2013 + VS_VERSION: 12 2013 + VS_PLATFORM: win32 + CXX11: OFF + CXX17: OFF + MEMBERSMAP: OFF + - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2013 + VS_VERSION: 12 2013 + VS_PLATFORM: x64 + CXX11: OFF + CXX17: OFF + MEMBERSMAP: ON + - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015 + VS_VERSION: 14 2015 + VS_PLATFORM: win32 + CXX11: OFF + CXX17: OFF + MEMBERSMAP: ON + - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015 + VS_VERSION: 14 2015 + VS_PLATFORM: x64 + CXX11: OFF + CXX17: OFF + MEMBERSMAP: OFF + - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 + VS_VERSION: 15 2017 + VS_PLATFORM: win32 + CXX11: OFF + CXX17: OFF + MEMBERSMAP: OFF + - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 + VS_VERSION: 15 2017 + VS_PLATFORM: x64 + CXX11: OFF + CXX17: OFF + MEMBERSMAP: ON + - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 + VS_VERSION: 15 2017 + VS_PLATFORM: x64 + CXX11: ON + CXX17: OFF + MEMBERSMAP: OFF + - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 + VS_VERSION: 15 2017 + VS_PLATFORM: x64 + CXX11: OFF + CXX17: ON + MEMBERSMAP: OFF + - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019 + VS_VERSION: 16 2019 + VS_PLATFORM: x64 + CXX11: OFF + CXX17: ON + MEMBERSMAP: ON + +before_build: +- git submodule update --init --recursive +- cmake -H. -BBuild/VS -G "Visual Studio %VS_VERSION%" -DCMAKE_GENERATOR_PLATFORM=%VS_PLATFORM% -DCMAKE_VERBOSE_MAKEFILE=ON -DBUILD_SHARED_LIBS=true -DRAPIDJSON_BUILD_CXX11=%CXX11% -DRAPIDJSON_BUILD_CXX17=%CXX17% -DRAPIDJSON_USE_MEMBERSMAP=%MEMBERSMAP% -Wno-dev + +build: + project: Build\VS\RapidJSON.sln + parallel: true + verbosity: minimal + +test_script: +- cd Build\VS && if %CONFIGURATION%==Debug (ctest --verbose -E perftest --build-config %CONFIGURATION%) else (ctest --verbose --build-config %CONFIGURATION%) diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/bin/data/abcde.txt b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/data/abcde.txt new file mode 100644 index 0000000000..6a81654605 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/data/abcde.txt @@ -0,0 +1 @@ +abcde \ No newline at end of file diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/bin/data/glossary.json b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/data/glossary.json new file mode 100644 index 0000000000..d6e6ca1507 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/data/glossary.json @@ -0,0 +1,22 @@ +{ + "glossary": { + "title": "example glossary", + "GlossDiv": { + "title": "S", + "GlossList": { + "GlossEntry": { + "ID": "SGML", + "SortAs": "SGML", + "GlossTerm": "Standard Generalized Markup Language", + "Acronym": "SGML", + "Abbrev": "ISO 8879:1986", + "GlossDef": { + "para": "A meta-markup language, used to create markup languages such as DocBook.", + "GlossSeeAlso": ["GML", "XML"] + }, + "GlossSee": "markup" + } + } + } + } +} \ No newline at end of file diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/bin/data/menu.json b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/data/menu.json new file mode 100644 index 0000000000..539c3af201 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/data/menu.json @@ -0,0 +1,27 @@ +{"menu": { + "header": "SVG Viewer", + "items": [ + {"id": "Open"}, + {"id": "OpenNew", "label": "Open New"}, + null, + {"id": "ZoomIn", "label": "Zoom In"}, + {"id": "ZoomOut", "label": "Zoom Out"}, + {"id": "OriginalView", "label": "Original View"}, + null, + {"id": "Quality"}, + {"id": "Pause"}, + {"id": "Mute"}, + null, + {"id": "Find", "label": "Find..."}, + {"id": "FindAgain", "label": "Find Again"}, + {"id": "Copy"}, + {"id": "CopyAgain", "label": "Copy Again"}, + {"id": "CopySVG", "label": "Copy SVG"}, + {"id": "ViewSVG", "label": "View SVG"}, + {"id": "ViewSource", "label": "View Source"}, + {"id": "SaveAs", "label": "Save As"}, + null, + {"id": "Help"}, + {"id": "About", "label": "About Adobe CVG Viewer..."} + ] +}} \ No newline at end of file diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/bin/data/readme.txt b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/data/readme.txt new file mode 100644 index 0000000000..c53bfb8b72 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/data/readme.txt @@ -0,0 +1 @@ +sample.json is obtained from http://code.google.com/p/json-test-suite/downloads/detail?name=sample.zip diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/bin/data/sample.json b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/data/sample.json new file mode 100644 index 0000000000..30930e765d --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/data/sample.json @@ -0,0 +1,3315 @@ +{ + "a": { + "6U閆崬밺뀫颒myj츥휘:$薈mY햚#rz飏+玭V㭢뾿愴YꖚX亥ᮉ푊\u0006垡㐭룝\"厓ᔧḅ^Sqpv媫\"⤽걒\"˽Ἆ?ꇆ䬔未tv{DV鯀Tἆl凸g\\㈭ĭ즿UH㽤": null, + "b茤z\\.N": [[ + "ZL:ᅣዎ*Y|猫劁櫕荾Oj为1糕쪥泏S룂w࡛Ᏺ⸥蚙)", + { + "\"䬰ỐwD捾V`邀⠕VD㺝sH6[칑.:醥葹*뻵倻aD\"": true, + "e浱up蔽Cr෠JK軵xCʨ<뜡癙Y獩ケ齈X/螗唻?<蘡+뷄㩤쳖3偑犾&\\첊xz坍崦ݻ鍴\"嵥B3㰃詤豺嚼aqJ⑆∥韼@\u000b㢊\u0015L臯.샥": false, + "l?Ǩ喳e6㔡$M꼄I,(3᝝縢,䊀疅뉲B㴔傳䂴\u0088㮰钘ꜵ!ᅛ韽>": -5514085325291784739, + "o㮚?\"춛㵉<\/﬊ࠃ䃪䝣wp6ἀ䱄[s*S嬈貒pᛥ㰉'돀": [{ + "(QP윤懊FI<ꃣ『䕷[\"珒嶮?%Ḭ壍಻䇟0荤!藲끹bd浶tl\u2049#쯀@僞": {"i妾8홫": { + ",M맃䞛K5nAㆴVN㒊햬$n꩑&ꎝ椞阫?/ṏ세뉪1x쥼㻤㪙`\"$쟒薟B煌܀쨝ଢ଼2掳7㙟鴙X婢\u0002": "Vዉ菈᧷⦌kﮞఈnz*﷜FM\"荭7ꍀ-VR<\/';䁙E9$䩉\f @s?퍪o3^衴cඎ䧪aK鼟q䆨c{䳠5mᒲՙ蘹ᮩ": { + "F㲷JGo⯍P덵x뒳p䘧☔\"+ꨲ吿JfR㔹)4n紬G练Q፞!C|": true, + "p^㫮솎oc.೚A㤠??r\u000f)⾽⌲們M2.䴘䩳:⫭胃\\፾@Fᭌ\\K": false, + "蟌Tk愙潦伩": { + "a<\/@ᾛ慂侇瘎": -7271305752851720826, + "艓藬/>၄ṯ,XW~㲆w": {"E痧郶)㜓ha朗!N赻瞉駠uC\u20ad辠x퓮⣫P1ࠫLMMX'M刼唳됤": null, + "P쓫晥%k覛ዩIUᇸ滨:噐혲lMR5䋈V梗>%幽u頖\\)쟟": null, + "eg+昉~矠䧞难\b?gQ쭷筝\\eꮠNl{ಢ哭|]Mn銌╥zꖘzⱷ⭤ᮜ^": [ + -1.30142114406914976E17, + -1.7555215491128452E-19, + null, + "渾㨝ߏ牄귛r?돌?w[⚞ӻ~廩輫㼧/", + -4.5737191805302129E18, + null, + "xy࿑M[oc셒竓Ⓔx?뜓y䊦>-D켍(&&?XKkc꩖ﺸᏋ뵞K伕6ী)딀P朁yW揙?훻魢傎EG碸9類៌g踲C⟌aEX舲:z꒸许", + 3808159498143417627, + null, + {"m試\u20df1{G8&뚈h홯J<\/": { + "3ஸ厠zs#1K7:rᥞoꅔꯧ&띇鵼鞫6跜#赿5l'8{7㕳(b/j\"厢aq籀ꏚ\u0015厼稥": [ + -2226135764510113982, + true, + null, + { + "h%'맞S싅Hs&dl슾W0j鿏MםD놯L~S-㇡R쭬%": null, + "⟓咔謡칲\u0000孺ꛭx旑檉㶆?": null, + "恇I転;￸B2Y`z\\獓w,놏濐撐埵䂄)!䶢D=ഭ㴟jyY": { + "$ࡘt厛毣ൢI芁<겿骫⫦6tr惺a": [ + 6.385779736989334E-20, + false, + true, + true, + [ + -6.891946211462334E-19, + null, + { + "]-\\Ꟑ1/薓❧Ὂ\\l牑\u0007A郃)阜ᇒᓌ-塯`W峬G}SDb㬨Q臉⮻빌O鞟톴첂B㺱<ƈmu챑J㴹㷳픷Oㆩs": { + "\"◉B\"pᶉt骔J꩸ᄇᛐi╰栛K쉷㉯鐩!㈐n칍䟅難>盥y铿e୔蒏M貹ヅ8嘋퀯䉶ጥ㏢殊뻳\"絧╿ꉑ䠥?∃蓊{}㣣Gk긔H1哵峱": false, + "6.瀫cN䇮F㧺?\\椯=ڈT䘆4␘8qv": -3.5687501019676885E-19, + "Q?yऴr혴{஀䳘p惭f1ﹸ䅷䕋贲<ྃᄊ繲hq\\b|#QSTs1c-7(䵢\u2069匏絘ꯉ:l毴汞t戀oෟᵶ뮱፣-醇Jx䙬䐁햢0࣫ᡁgrㄛ": "\u0011_xM/蘇Chv;dhA5.嗀绱V爤ﰦi뵲M", + "⏑[\"ugoy^儣횎~U\\섯겜論l2jw஌yD腅̂\u0019": true, + "ⵯɇ䐲᫿࢚!㯢l샅笶戮1꣖0Xe": null, + "劅f넀識b宁焊E찓橵G!ʱ獓뭔雩괛": [{"p⹣켙[q>燣䍃㞽ᩲx:쓤삘7玑퇼0<\/q璂ᑁ[Z\\3䅵䧳\u0011㤧|妱緒C['췓Yꞟ3Z鳱雼P錻BU씧U`ᢶg蓱>.1ӧ譫'L_5V䏵Ц": [ + false, + false, + {"22䂍盥N霂얢躰e9⑩_뵜斌n@B}$괻Yᐱ@䧋V\"☒-諯cV돯ʠ": true, + "Ű螧ᔼ檍鍎땒딜qꄃH뜣<獧ूCY吓⸏>XQ㵡趌o끬k픀빯a(ܵ甏끆୯/6Nᪧ}搚ᆚ짌P牰泱鈷^d꣟#L삀\"㕹襻;k㸊\\f+": true, + "쎣\",|⫝̸阊x庿k잣v庅$鈏괎炔k쬪O_": [ + "잩AzZGz3v愠ꉈⵎ?㊱}S尳௏p\r2>췝IP䘈M)w|\u000eE", + -9222726055990423201, + null, + [ + false, + {"´킮'뮤쯽Wx讐V,6ᩪ1紲aႈ\u205czD": [ + -930994432421097536, + 3157232031581030121, + "l貚PY䃛5@䭄귻m㎮琸f": 1.0318894506812084E-19, + "࢜⩢Ш䧔1肽씮+༎ᣰ闺馺窃䕨8Mƶq腽xc(៯夐J5굄䕁Qj_훨/~価.䢵慯틠퇱豠㼇Qﵘ$DuSp(8Uญ<\/ಟ룴𥳐ݩ$": 8350772684161555590, + "ㆎQ䄾\u001bpᩭ${[諟^^骴᤮b^ㅥI┧T㉇⾞\"绦r䰂f矩'-7䡭桥Dz兔V9谶居㺍ᔊ䩯덲.\u001eL0ὅㅷ釣": [{ + "<쯬J卷^숞u࠯䌗艞R9닪g㐾볎a䂈歖意:%鐔|ﵤ|y}>;2,覂⶚啵tb*仛8乒㓶B࿠㯉戩oX 貘5V嗆렽낁߼4h䧛ꍺM空\\b꿋貼": 8478577078537189402, + "VD*|吝z~h譺aᯒ": { + "YI췢K<\/濳xNne玗rJo쾘3핰鴊\"↱AR:ࢷ\"9?\"臁說)?誚ꊏe)_D翾W?&F6J@뺾ꍰNZ醊Z쾈വH嶿?炫㷱鬰M겈᭨b,⻁鈵P䕡䀠८ⱄ홎鄣": { + "@?k2鶖㋮\"Oರ K㨇廪儲\u0017䍾J?);\b*묀㗠섳햭1MC V": null, + "UIICP!BUA`ᢈ㋸~袩㗪⾒=fB﮴l1ꡛ죘R辂여ҳ7쮡<䩲`熕8頁": 4481809488267626463, + "Y?+8먙ᚔ鋳蜩럶1㥔y璜౩`": [ + null, + 1.2850335807501874E-19, + "~V2", + 2035406654801997866, + { + "<숻1>\"": -8062468865199390827, + "M㿣E]}qwG莎Gn᝶(ꔙ\\D⬲iꇲs寢t駇S뀡ꢜ": false, + "pꝤ㎏9W%>M;-U璏f(^j1?&RB隧 忓b똊E": "#G?C8.躬ꥯ'?냪#< 渟&헿란zpo왓Kj}鷧XﻘMツb䕖;㪻", + "vE풤幉xz뱕쫥Ug㦲aH} ᣟp:鬼YᰟH3镔ᴚ斦\\鏑r*2橱G⼔F/.j": true, + "RK좬뎂a홠f*f㱉ᮍ⦋潙㨋Gu곌SGI3I뿐\\F',)t`荁蘯囯ﮉ裲뇟쥼_ገ驪▵撏ᕤV": 1.52738225997956557E18, + "^k굲䪿꠹B逤%F㱢漥O披M㽯镞竇霒i꼂焅륓\u00059=皫之눃\u2047娤閍銤唫ၕb<\/w踲䔼u솆맚,䝒ᝳ'/it": "B餹饴is権ꖪ怯ꦂẉဎt\"!凢谵⧿0\\<=(uL䷍刨쑪>俆揓Cy襸Q힆䆭涷<\/ᐱ0ɧ䗾䚹\\ኜ?ꄢᇘ`䴢{囇}᠈䴥X4퓪檄]ꥷ/3謒ሴn+g騍X", + "GgG꽬[(嫓몍6\u0004궍宩㙻/>\u0011^辍dT腪hxǑ%ꊇk,8(W⧂結P鬜O": [{ + "M㴾c>\\ᓲ\u0019V{>ꤩ혙넪㭪躂TS-痴໸闓⍵/徯O.M㏥ʷD囎⧔쁳휤T??鉬뇙=#ꢫ숣BX䭼<\/d똬졬g榿)eꨋﯪ좇첻\u001a\u0011\";~쓆BH4坋攊7힪", + "iT:L闞椕윚*滛gI≀Wਟඊ'ꢆ縺뱹鮚Nꩁ᧬蕼21줧\\䋯``⍐\\㏱鳨": 1927052677739832894, + "쮁缦腃g]礿Y㬙 fヺSɪ꾾N㞈": [ + null, + null, + { + "!t,灝Y 1䗉罵?c饃호䉂Cᐭ쒘z(즽sZG㬣sഖE4뢜㓕䏞丮Qp簍6EZឪ겛fx'ꩱQ0罣i{k锩*㤴㯞r迎jTⲤ渔m炅肳": [ + -3.3325685522591933E18, + [{"㓁5]A䢕1룥BC?Ꙍ`r룔Ⳛ䙡u伲+\u0001്o": [ + null, + 4975309147809803991, + null, + null, + {"T팘8Dﯲ稟MM☻㧚䥧/8ﻥ⥯aXLaH\"顾S☟耲ît7fS෉놁뮔/ꕼ䓈쁺4\\霶䠴ᩢ<\/t4?죵>uD5➶༆쉌럮⢀秙䘥\u20972ETR3濡恆vB? ~鸆\u0005": { + "`閖m璝㥉b뜴?Wf;?DV콜\u2020퍉౓擝宏ZMj3mJ먡-傷뱙yח㸷꥿ ໘u=M읝!5吭L4v\\?ǎ7C홫": null, + "|": false, + "~Ztᛋ䚘\\擭㗝傪W陖+㗶qᵿ蘥ᙄp%䫎)}=⠔6ᮢS湟-螾-mXH?cp": 448751162044282216, + "\u209fad놹j檋䇌ᶾ梕㉝bוּ": {"?苴ꩠD䋓帘5騱qﱖPF?☸珗顒yU ᡫcb䫎 S@㥚gꮒ쎘泴멖\\:I鮱TZ듒ᶨQ3+f7캙\"?\f풾\\o杞紟﻽M.⏎靑OP": [ + -2.6990368911551596E18, + [{"䒖@<᰿<\/⽬tTr腞&G%᳊秩蜰擻f㎳?S㵧\r*k뎾-乢겹隷j軛겷0룁鮁": {")DO0腦:춍逿:1㥨่!蛍樋2": [{ + ",ꌣf侴笾m๫ꆽ?1?U?\u0011ꌈꂇ": { + "x捗甠nVq䅦w`CD⦂惺嘴0I#vỵ} \\귂S끴D얾?Ԓj溯\"v餄a": { + "@翙c⢃趚痋i\u0015OQ⍝lq돆Y0pࢥ3쉨䜩^<8g懥0w)]䊑n洺o5쭝QL댊랖L镈Qnt⪟㒅십q헎鳒⮤眉ᔹ梠@O縠u泌ㄘb榚癸XޔFtj;iC": false, + "I&뱋゘|蓔䔕측瓯%6ᗻHW\\N1貇#?僐ᗜgh᭪o'䗈꽹Rc욏/蔳迄༝!0邔䨷푪8疩)[쭶緄㇈୧ፐ": { + "B+:ꉰ`s쾭)빼C羍A䫊pMgjdx䐝Hf9᥸W0!C樃'蘿f䫤סи\u0017Jve? 覝f둀⬣퓉Whk\"஼=չﳐ皆笁BIW虨쫓F廰饞": -642906201042308791, + "sb,XcZ<\/m㉹ ;䑷@c䵀s奤⬷7`ꘖ蕘戚?Feb#輜}p4nH⬮eKL트}": [ + "RK鳗z=袤Pf|[,u욺", + "Ẏᏻ罯뉋⺖锅젯㷻{H䰞쬙-쩓D]~\u0013O㳢gb@揶蔉|kᦂ❗!\u001ebM褐sca쨜襒y⺉룓", + null, + null, + true, + -1.650777344339075E-19, + false, + "☑lꄆs힨꤇]'uTന⌳농].1⋔괁沰\"IWഩ\u0019氜8쟇䔻;3衲恋,窌z펏喁횗?4?C넁问?ᥙ橭{稻Ⴗ_썔", + "n?]讇빽嗁}1孅9#ꭨ靶v\u0014喈)vw祔}룼쮿I", + -2.7033457331882025E18, + { + ";⚃^㱋x:饬ኡj'꧵T☽O㔬RO婎?향ᒭ搩$渣y4i;(Q>꿘e8q": "j~錘}0g;L萺*;ᕭꄮ0l潛烢5H▄쳂ꏒוֹꙶT犘≫x閦웧v", + "~揯\u2018c4職렁E~ᑅቚꈂ?nq뎤.:慹`F햘+%鉎O瀜쟏敛菮⍌浢<\/㮺紿P鳆ࠉ8I-o?#jﮨ7v3Dt赻J9": null, + "ࣝW䌈0ꍎqC逖,횅c၃swj;jJS櫍5槗OaB>D踾Y": {"㒰䵝F%?59.㍈cᕨ흕틎ḏ㋩B=9IېⓌ{:9.yw}呰ㆮ肒᎒tI㾴62\"ዃ抡C﹬B<\/촋jo朣", + [ + -7675533242647793366, + {"ᙧ呃:[㒺쳀쌡쏂H稈㢤\u001dᶗGG-{GHྻຊꡃ哸䵬;$?&d\\⥬こN圴됤挨-'ꕮ$PU%?冕눖i魁q騎Q": [ + false, + [[ + 7929823049157504248, + [[ + true, + "Z菙\u0017'eꕤ᱕l,0\\X\u001c[=雿8蠬L<\/낲긯W99g톉4ퟋb㝺\u0007劁'!麕Q궈oW:@X၎z蘻m絙璩귓죉+3柚怫tS捇蒣䝠-擶D[0=퉿8)q0ٟ", + "唉\nFA椭穒巯\\䥴䅺鿤S#b迅獘 ﶗ꬘\\?q1qN犠pX꜅^䤊⛤㢌[⬛휖岺q唻ⳡ틍\"㙙Eh@oA賑㗠y必Nꊑᗘ", + -2154220236962890773, + -3.2442003245397908E18, + "Wᄿ筠:瘫퀩?o貸q⊻(᎞KWf宛尨h^残3[U(='橄", + -7857990034281549164, + 1.44283696979059942E18, + null, + {"ꫯAw跭喀 ?_9\"Aty背F=9缉ྦྷ@;?^鞀w:uN㘢Rỏ": [ + 7.393662029337442E15, + 3564680942654233068, + [ + false, + -5253931502642112194, + "煉\\辎ೆ罍5⒭1䪁䃑s䎢:[e5}峳ﴱn騎3?腳Hyꏃ膼N潭錖,Yᝋ˜YAၓ㬠bG렣䰣:", + true, + null, + { + "⒛'P&%죮|:⫶춞": -3818336746965687085, + "钖m<\/0ݎMtF2Pk=瓰୮洽겎.": [[ + -8757574841556350607, + -3045234949333270161, + null, + { + "Ꮬr輳>⫇9hU##w@귪A\\C 鋺㘓ꖐ梒뒬묹㹻+郸嬏윤'+g<\/碴,}ꙫ>손;情d齆J䬁ຩ撛챝탹/R澡7剌tꤼ?ặ!`⏲睤\u00002똥଴⟏": null, + "\u20f2ܹe\\tAꥍư\\x当뿖렉禛;G檳ﯪS૰3~㘠#[J<}{奲 5箉⨔{놁<\/釿抋,嚠/曳m&WaOvT赋皺璑텁": [[ + false, + null, + true, + -5.7131445659795661E18, + "萭m䓪D5|3婁ఞ>蠇晼6nﴺPp禽羱DS<睓닫屚삏姿", + true, + [ + -8759747687917306831, + { + ">ⓛ\t,odKr{䘠?b퓸C嶈=DyEᙬ@ᴔ쨺芛髿UT퓻春<\/yꏸ>豚W釺N뜨^?꽴﨟5殺ᗃ翐%>퍂ဿ䄸沂Ea;A_\u0005閹殀W+窊?Ꭼd\u0013P汴G5썓揘": 4.342729067882445E-18, + "Q^즾眆@AN\u0011Kb榰냎Y#䝀ꀒᳺ'q暇睵s\"!3#I⊆畼寤@HxJ9": false, + "⿾D[)袨㇩i]웪䀤ᛰMvR<蟏㣨": {"v퇓L㪱ꖣ豛톤\\곱#kDTN": [{ + "(쾴䡣,寴ph(C\"㳶w\"憳2s馆E!n!&柄<\/0Pꈗſ?㿳Qd鵔": {"娇堰孹L錮h嵅⛤躏顒?CglN束+쨣ﺜ\\MrH": {"獞䎇둃ቲ弭팭^ꄞ踦涟XK錆쳞ឌ`;੶S炥騞ଋ褂B៎{ڒ䭷ᶼ靜pI荗虶K$": [{"◖S~躘蒉꫿輜譝Q㽙闐@ᢗ¥E榁iء5┄^B[絮跉ᰥ遙PWi3wㄾⵀDJ9!w㞣ᄎ{듒ꓓb6\\篴??c⼰鶹⟧\\鮇ꮇ": [[ + 654120831325413520, + -1.9562073916357608E-19, + { + "DC(昐衵ἡ긙갵姭|֛[t": 7.6979110359897907E18, + "J␅))嫼❳9Xfd飉j7猬ᩉ+⤻眗벎E鰉Zᄊ63zၝ69}ZᶐL崭ᦥ⡦靚⋛ꎨ~i㨃咊ꧭo䰠阀3C(": -3.5844809362512589E17, + "p꣑팱쒬ꎑ뛡Ꙩ挴恍胔&7ᔈ묒4Hd硶훐㎖zꢼ豍㿢aሃ=<\/湉鵲EӅ%$F!퍶棌孼{O駍਺geu+": ")\u001b잓kŀX쩫A밁®ڣ癦狢)扔弒p}k縕ꩋ,䃉tࣼi", + "ァF肿輸<솄G-䢹䛸ꊏl`Tqꕗ蒞a氷⸅ᴉ蠰]S/{J왲m5{9.uέ~㕚㣹u>x8U讁B덺襪盎QhVS맅킃i识{벂磄Iහ䙅xZy/抍૭Z鲁-霳V据挦ℒ": null, + "㯛|Nꐸb7ⵐb?拠O\u0014ކ?-(EꞨ4ꕷᄤYᯕOW瞺~螸\"욿ќe㺰\"'㌢ƐW\u0004瞕>0?V鷵엳": true, + "뤥G\\迋䠿[庩'꼡\u001aiᩮV쯁ᳪ䦪Ô;倱ନ뛁誈": null, + "쥹䄆䚟Q榁䎐᢭<\/2㕣p}HW蟔|䃏꿈ꚉ锳2Pb7㙑Tⅹᵅ": { + "Y?֭$>#cVBꩨ:>eL蒁務": { + "86柡0po 䏚&-捑Ћ祌<\/휃-G*㶢הּ쩍s㶟餇c걺yu꽎還5*턧簕Og婥SꝐ": null, + "a+葞h٥ࠆ裈嗫ﵢ5輙퀟ᛜ,QDﹼ⟶Y騠锪E_|x죗j侵;m蜫轘趥?븅w5+mi콛L": { + ";⯭ﱢ!买F⽍柤鶂n䵣V㫚墱2렾ELEl⣆": [ + true, + -3.6479311868339015E-18, + -7270785619461995400, + 3.334081886177621E18, + 2.581457786298155E18, + -6.605252412954115E-20, + -3.9232347037744167E-20, + { + "B6㊕.k1": null, + "ZAꄮJ鮷ᳱo갘硥鈠䠒츼": { + "ᕅ}럡}.@y陪鶁r業'援퀉x䉴ﵴl퍘):씭脴ᥞhiꃰblﲂ䡲엕8߇M㶭0燋標挝-?PCwe⾕J碻Ᾱ䬈䈥뷰憵賣뵓痬+": {"a췩v礗X⋈耓ፊf罅靮!㔽YYᣓw澍33⎔芲F|\"䜏T↮輦挑6ᓘL侘?ᅥ]덆1R௯✎餘6ꏽ<\/௨\\?q喷ꁫj~@ulq": {"嗫欆뾔Xꆹ4H㌋F嵧]ࠎ]㠖1ꞤT<$m뫏O i댳0䲝i": {"?෩?\u20cd슮|ꯆjs{?d7?eNs⢚嫥氂䡮쎱:鑵롟2hJꎒﯭ鱢3춲亄:뼣v䊭諱Yj択cVmR䩃㘬T\"N홝*ै%x^F\\_s9보zz4淗?q": [ + null, + "?", + 2941869570821073737, + "{5{殇0䝾g6밖퍋臩綹R$䖭j紋釰7sXI繳漪행y", + false, + "aH磂?뛡#惇d婅?Fe,쐘+늵䍘\"3r瘆唊勐j⳧࠴ꇓ<\/唕윈x⬌讣䋵%拗ᛆⰿ妴᝔M2㳗必꧂淲?ゥ젯檢<8끒MidX䏒3᳻Q▮佐UT|⤪봦靏⊏", + [[{ + "颉(&뜸귙{y^\"P퟉춝Ჟ䮭D顡9=?}Y誱<$b뱣RvO8cH煉@tk~4ǂ⤧⩝屋SS;J{vV#剤餓ᯅc?#a6D,s": [ + -7.8781018564821536E16, + true, + [ + -2.28770899315832371E18, + false, + -1.0863912140143876E-20, + -6282721572097446995, + 6767121921199223078, + -2545487755405567831, + false, + null, + -9065970397975641765, + [ + -5.928721243413937E-20, + {"6촊\u001a홯kB0w撨燠룉{绎6⳹!턍贑y▾鱧ժ[;7ᨷ∀*땒䪮1x霆Hᩭ☔\"r䝐7毟ᝰr惃3ꉭE+>僒澐": [ + "Ta쎩aƝt쵯ⰪVb", + [ + -5222472249213580702, + null, + -2851641861541559595, + null, + 4808804630502809099, + 5657671602244269874, + "5犲﨣4mᥣ?yf젫꾯|䋬잁$`Iⳉﴷ扳兝,'c", + false, + [ + null, + { + "DyUIN쎾M仼惀⮥裎岶泭lh扠\u001e礼.tEC癯튻@_Qd4c5S熯A<\/\6U윲蹴Q=%푫汹\\\u20614b[௒C⒥Xe⊇囙b,服3ss땊뢍i~逇PA쇸1": -2.63273619193485312E17, + "Mq꺋貘k휕=nK硍뫞輩>㾆~἞ࡹ긐榵l⋙Hw뮢帋M엳뢯v⅃^": 1877913476688465125, + "ᶴ뻗`~筗免⚽টW˃⽝b犳䓺Iz篤p;乨A\u20ef쩏?疊m㝀컩뫡b탔鄃ᾈV(遢珳=뎲ିeF仢䆡谨8t0醄7㭧瘵⻰컆r厡궥d)a阄፷Ed&c﯄伮1p": null, + "⯁w4曢\"(欷輡": "\"M᭫]䣒頳B\\燧ࠃN㡇j姈g⊸⺌忉ꡥF矉স%^", + "㣡Oᄦ昵⫮Y祎S쐐級㭻撥>{I$": -378474210562741663, + "䛒掷留Q%쓗1*1J*끓헩ᦢ﫫哉쩧EↅIcꅡ\\?ⴊl귛顮4": false, + "寔愆샠5]䗄IH贈=d﯊/偶?ॊn%晥D視N򗘈'᫂⚦|X쵩넽z질tskxDQ莮Aoﱻ뛓": true, + "钣xp?&\u001e侉/y䴼~?U篔蘚缣/I畚?Q绊": -3034854258736382234, + "꺲໣眀)⿷J暘pИfAV삕쳭Nꯗ4々'唄ⶑ伻㷯騑倭D*Ok꧁3b␽_<\/챣Xm톰ၕ䆄`*fl㭀暮滠毡?": [ + "D男p`V뙸擨忝븪9c麺`淂⢦Yw⡢+kzܖ\fY1䬡H歁)벾Z♤溊-혰셢?1<-\u0005;搢Tᐁle\\ᛵߓﭩ榩訝-xJ;巡8깊蠝ﻓU$K": { + "Vꕡ諅搓W=斸s︪vﲜ츧$)iꡟ싉e寳?ጭムVથ嵬i楝Fg<\/Z|៪ꩆ-5'@ꃱ80!燱R쇤t糳]罛逇dṌ֣XHiͦ{": true, + "Ya矲C멗Q9膲墅携휻c\\딶G甔<\/.齵휴": -1.1456247877031811E-19, + "z#.OO￝J": -8263224695871959017, + "崍_3夼ᮟ1F븍뽯ᦓ鴭V豈Ь": [{ + "N蒬74": null, + "yuB?厅vK笗!ᔸcXQ旦컶P-녫mᄉ麟_": "1R@ 톘xa_|﩯遘s槞d!d껀筤⬫薐焵먑D{\\6k共倌☀G~AS_D\"딟쬚뮥馲렓쓠攥WTMܭ8nX㩴䕅檹E\u0007ﭨN 2 ℆涐ꥏ꠵3▙玽|됨_\u2048", + "恐A C䧩G": {":M큣5e들\\ꍀ恼ᔄ靸|I﨏$)n": { + "|U䬫㟯SKV6ꛤ㗮\bn봻䲄fXT:㾯쳤'笓0b/ೢC쳖?2浓uO.䰴": "ཐ꼋e?``,ᚇ慐^8ꜙNM䂱\u0001IᖙꝧM'vKdꌊH牮r\\O@䊷ᓵ쀆(fy聻i툺\"?<\/峧ࣞ⓺ᤤ쵒߯ꎺ騬?)刦\u2072l慪y꺜ﲖTj+u", + "뽫hh䈵w>1ⲏ쐭V[ⅎ\\헑벑F_㖝⠗㫇h恽;῝汰ᱼ瀖J옆9RR셏vsZ柺鶶툤r뢱橾/ꉇ囦FGm\"謗ꉦ⨶쒿⥡%]鵩#ᖣ_蹎 u5|祥?O", + null, + 2.0150326776036215E-19, + null, + true, + false, + true, + {"\fa᭶P捤WWc᠟f뚉ᬏ퓗ⳀW睹5:HXH=q7x찙X$)모r뚥ᆟ!Jﳸf": [ + -2995806398034583407, + [ + 6441377066589744683, + "Mﶒ醹i)Gἦ廃s6몞 KJ౹礎VZ螺费힀\u0000冺업{谥'꡾뱻:.ꘘ굄奉攼Di᷑K鶲y繈욊阓v㻘}枭캗e矮1c?휐\"4\u0005厑莔뀾墓낝⽴洗ṹ䇃糞@b1\u0016즽Y轹", + { + "1⽕⌰鉟픏M㤭n⧴ỼD#%鐘⊯쿼稁븣몐紧ᅇ㓕ᛖcw嬀~ഌ㖓(0r⧦Q䑕髍ര铂㓻R儮\"@ꇱm❈௿᦯頌8}㿹犴?xn잆꥽R": 2.07321075750427366E18, + "˳b18㗈䃟柵Z曆VTAu7+㛂cb0﯑Wp執<\/臋뭡뚋刼틮荋벲TLP预庰܈G\\O@VD'鱃#乖끺*鑪ꬳ?Mޞdﭹ{␇圯쇜㼞顄︖Y홡g": [{ + "0a,FZ": true, + "2z̬蝣ꧦ驸\u0006L↛Ḣ4๚뿀'?lcwᄧ㐮!蓚䃦-|7.飑挴.樵*+1ﮊ\u0010ꛌ%貨啺/JdM:똍!FBe?鰴㨗0O财I藻ʔWA᫓G쳛u`<\/I": [{ + "$τ5V鴐a뾆両環iZp頻යn븃v": -4869131188151215571, + "*즢[⦃b礞R◚nΰꕢH=귰燙[yc誘g䆌?ଜ臛": { + "洤湌鲒)⟻\\䥳va}PeAMnN[": "㐳ɪ/(軆lZR,Cp殍ȮN啷\"3B婴?i=r$펽ᤐ쀸", + "阄R4㒿㯔ڀ69ZᲦ2癁핌噗P崜#\\-쭍袛&鐑/$4童V꩑_ZHA澢fZ3": {"x;P{긳:G閉:9?活H": [ + "繺漮6?z犞焃슳\">ỏ[Ⳛ䌜녏䂹>聵⼶煜Y桥[泥뚩MvK$4jtロ", + "E#갶霠좭㦻ୗ먵F+䪀o蝒ba쮎4X㣵 h", + -335836610224228782, + null, + null, + [ + "r1᫩0>danjY짿bs{", + [ + -9.594464059325631E-23, + 1.0456894622831624E-20, + null, + 5.803973284253454E-20, + -8141787905188892123, + true, + -4735305442504973382, + 9.513150514479281E-20, + "7넳$螔忷㶪}䪪l짴\u0007鹁P鰚HF銏ZJﳴ/⍎1ᷓ忉睇ᜋ쓈x뵠m䷐窥Ꮤ^\u0019ᶌ偭#ヂt☆၃pᎍ臶䟱5$䰵&๵分숝]䝈뉍♂坎\u0011<>", + "C蒑貑藁lﰰ}X喇몛;t밿O7/᯹f\u0015kI嘦<ዴ㟮ᗎZ`GWퟩ瑹࡮ᅴB꿊칈??R校s脚", + { + "9珵戬+AU^洘拻ቒy柭床'粙XG鞕᠜繀伪%]hC,$輙?Ut乖Qm떚W8઼}~q⠪rU䤶CQ痗ig@#≲t샌f㈥酧l;y闥ZH斦e⸬]j⸗?ঢ拻퀆滌": null, + "畯}㧢J罚帐VX㨑>1ꢶkT⿄蘥㝑o|<嗸層沈挄GEOM@-䞚䧰$만峬輏䠱V✩5宸-揂D'㗪yP掶7b⠟J㕻SfP?d}v㼂Ꮕ'猘": { + "陓y잀v>╪": null, + "鬿L+7:됑Y=焠U;킻䯌잫!韎ஔ\f": { + "駫WmGጶ": { + "\\~m6狩K": -2586304199791962143, + "ႜࠀ%͑l⿅D.瑢Dk%0紪dḨTI픸%뗜☓s榗኉\"?V籄7w髄♲쟗翛歂E䤓皹t ?)ᄟ鬲鐜6C": { + "_췤a圷1\u000eB-XOy缿請∎$`쳌eZ~杁튻/蜞`塣৙\"⪰\"沒l}蕌\\롃荫氌.望wZ|o!)Hn獝qg}": null, + "kOSܧ䖨钨:಼鉝ꭝO醧S`십`ꓭ쭁ﯢN&Et㺪馻㍢ⅳ㢺崡ຊ蜚锫\\%ahx켨|ż劻ꎄ㢄쐟A躊᰹p譞綨Ir쿯\u0016ﵚOd럂*僨郀N*b㕷63z": { + ":L5r+T㡲": [{ + "VK泓돲ᮙRy㓤➙Ⱗ38oi}LJቨ7Ó㹡৘*q)1豢⛃e᫛뙪壥镇枝7G藯g㨛oI䄽 孂L缊ꋕ'EN`": -2148138481412096818, + "`⛝ᘑ$(खꊲ⤖ᄁꤒ䦦3=)]Y㢌跨NĴ驳줟秠++d孳>8ᎊ떩EꡣSv룃 쯫أ?#E|᭙㎐?zv:5祉^⋑V": [ + -1.4691944435285607E-19, + 3.4128661569395795E17, + "㐃촗^G9佭龶n募8R厞eEw⺡_ㆱ%⼨D뉄퉠2ꩵᛅⳍ搿L팹Lවn=\"慉념ᛮy>!`g!풲晴[/;?[v겁軇}⤳⤁핏∌T㽲R홓遉㓥", + "愰_⮹T䓒妒閤둥?0aB@㈧g焻-#~跬x<\/舁P݄ꐡ=\\׳P\u0015jᳪᢁq;㯏l%᭗;砢觨▝,謁ꍰGy?躤O黩퍋Y㒝a擯\n7覌똟_䔡]fJ晋IAS", + 4367930106786121250, + -4.9421193149720582E17, + null, + { + ";ᄌ똾柉곟ⰺKpፇ䱻ฺ䖝{o~h!eꁿ઻욄ښ\u0002y?xUd\u207c悜ꌭ": [ + 1.6010824122815255E-19, + [ + "宨︩9앉檥pr쇷?WxLb", + "氇9】J玚\u000f옛呲~ 輠1D嬛,*mW3?n휂糊γ虻*ᴫ꾠?q凐趗Ko↦GT铮", + "㶢ថmO㍔k'诔栀Z蛟}GZ钹D", + false, + -6.366995517736813E-20, + -4894479530745302899, + null, + "V%᫡II璅䅛䓎풹ﱢ/pU9se되뛞x梔~C)䨧䩻蜺(g㘚R?/Ự[忓C뾠ࢤc왈邠买?嫥挤풜隊枕", + ",v碍喔㌲쟚蔚톬៓ꭶ", + 3.9625444752577524E-19, + null, + [ + "kO8란뿒䱕馔b臻⍟隨\"㜮鲣Yq5m퐔K#ꢘug㼈ᝦ=P^6탲@䧔%$CqSw铜랊0&m⟭<\/a逎ym\u0013vᯗ": true, + "洫`|XN뤮\u0018詞=紩鴘_sX)㯅鿻Ố싹": 7.168252736947373E-20, + "ꛊ饤ﴏ袁(逊+~⽫얢鈮艬O힉7D筗S곯w操I斞᠈븘蓷x": [[[[ + -7.3136069426336952E18, + -2.13572396712722688E18, + { + "硢3㇩R:o칢行E<=\u0018ၬYuH!\u00044U%卝炼2>\u001eSi$⓷ꒈ'렢gᙫ番ꯒ㛹럥嶀澈v;葷鄕x蓎\\惩+稘UEᖸﳊ㊈壋N嫿⏾挎,袯苷ኢ\\x|3c": 7540762493381776411, + "?!*^ᢏ窯?\u0001ڔꙃw虜돳FgJ?&⨫*uo籤:?}ꃹ=ٴ惨瓜Z媊@ત戹㔏똩Ԛ耦Wt轁\\枒^\\ꩵ}}}ꀣD\\]6M_⌫)H豣:36섘㑜": { + ";홗ᰰU஋㙛`D왔ཿЃS회爁\u001b-㢈`봆?盂㛣듿ᦾ蒽_AD~EEຆ㊋(eNwk=Rɠ峭q\"5Ἠ婾^>'ls\n8QAK)- Q䲌mo펹L_칍樖庫9꩝쪹ᘹ䑖瀍aK ?*趤f뭓廝p=磕", + "哑z懅ᤏ-ꍹux쀭", + [ + true, + 3998739591332339511, + "ጻ㙙?᳸aK<\/囩U`B3袗ﱱ?\"/k鏔䍧2l@쿎VZ쨎/6ꃭ脥|B?31+on颼-ꮧ,O嫚m ࡭`KH葦:粘i]aSU쓙$쐂f+詛頖b", + [{"^<9<箝&絡;%i﫡2攑紴\\켉h쓙-柂䚝ven\u20f7浯-Ꮏ\r^훁䓚헬\u000e?\\ㅡֺJ떷VOt": [{ + "-௄卶k㘆혐஽y⎱㢬sS઄+^瞥h;ᾷj;抭\u0003밫f<\/5Ⱗ裏_朻%*[-撵䷮彈-芈": { + "㩩p3篊G|宮hz䑊o곥j^Co0": [ + 653239109285256503, + {"궲?|\":N1ۿ氃NZ#깩:쇡o8킗ࡊ[\"됸Po핇1(6鰏$膓}⽐*)渽J'DN<썙긘毦끲Ys칖": { + "2Pr?Xjㆠ?搮/?㓦柖馃5뚣Nᦼ|铢r衴㩖\"甝湗ܝ憍": "\"뾯i띇筝牻$珲/4ka $匝휴译zbAᩁꇸ瑅&뵲衯ꎀᆿ7@ꈋ'ᶨH@ᠴl+", + "7뢽뚐v?4^ꊥ_⪛.>pởr渲<\/⢕疻c\"g䇘vU剺dஔ鮥꒚(dv祴X⼹\\a8y5坆": true, + "o뼄B욞羁hr﷔폘뒚⿛U5pꪴfg!6\\\"爑쏍䢱W<ﶕ\\텣珇oI/BK뺡'谑♟[Ut븷亮g(\"t⡎有?ꬊ躺翁艩nl F⤿蠜": 1695826030502619742, + "ۊ깖>ࡹ햹^ⵕ쌾BnN〳2C䌕tʬ]찠?ݾ2饺蹳ぶꌭ訍\"◹ᬁD鯎4e滨T輀ﵣ੃3\u20f3킙D瘮g\\擦+泙ၧ 鬹ﯨַ肋7놷郟lP冝{ߒhড়r5,꓋": null, + "ΉN$y{}2\\N﹯ⱙK'8ɜͣwt,.钟廣䎘ꆚk媄_": null, + "䎥eᾆᝦ읉,Jުn岪㥐s搖謽䚔5t㯏㰳㱊ZhD䃭f絕s鋡篟a`Q鬃┦鸳n_靂(E4迠_觅뷝_宪D(NL疶hL追V熑%]v肫=惂!㇫5⬒\u001f喺4랪옑": { + "2a輍85먙R㮧㚪Sm}E2yꆣꫨrRym㐱膶ᔨ\\t綾A☰.焄뙗9<쫷챻䒵셴᭛䮜.<\/慌꽒9叻Ok䰊Z㥪幸k": [ + null, + true, + {"쌞쐍": { + "▟GL K2i뛱iQ\"̠.옛1X$}涺]靎懠ڦ늷?tf灟ݞゟ{": 1.227740268699265E-19, + "꒶]퓚%ฬK❅": [{ + "(ෛ@Ǯっ䧼䵤[aテൖvEnAdU렖뗈@볓yꈪ,mԴ|꟢캁(而첸죕CX4Y믅": "2⯩㳿ꢚ훀~迯?᪑\\啚;4X\u20c2襏B箹)俣eỻw䇄", + "75༂f詳䅫ꐧ鏿 }3\u20b5'∓䝱虀f菼Iq鈆﨤g퍩)BFa왢d0뮪痮M鋡nw∵謊;ꝧf美箈ḋ*\u001c`퇚퐋䳫$!V#N㹲抗ⱉ珎(V嵟鬒_b㳅\u0019": null, + "e_m@(i㜀3ꦗ䕯䭰Oc+-련0뭦⢹苿蟰ꂏSV䰭勢덥.ྈ爑Vd,ᕥ=퀍)vz뱊ꈊB_6듯\"?{㒲&㵞뵫疝돡믈%Qw限,?\r枮\"? N~癃ruࡗdn&": null, + "㉹&'Pfs䑜공j<\/?|8oc᧨L7\\pXᭁ 9᪘": -2.423073789014103E18, + "䝄瑄䢸穊f盈᥸,B뾧푗횵B1쟢f\u001f凄": "魖⚝2儉j꼂긾껢嗎0ࢇ纬xI4](੓`蕞;픬\fC\"斒\")2櫷I﹥迧", + "ퟯ詔x悝령+T?Bg⥄섅kOeQ큼㻴*{E靼6氿L缋\u001c둌๶-㥂2==-츫I즃㠐Lg踞ꙂEG貨鞠\"\u0014d'.缗gI-lIb䋱ᎂDy缦?": null, + "紝M㦁犿w浴詟棓쵫G:䜁?V2ힽ7N*n&㖊Nd-'ຊ?-樹DIv⊜)g䑜9뉂ㄹ푍阉~ꅐ쵃#R^\u000bB䌎䦾]p.䀳": [{"ϒ爛\"ꄱ︗竒G䃓-ま帳あ.j)qgu扐徣ਁZ鼗A9A鸦甈!k蔁喙:3T%&㠘+,䷞|챽v䚞문H<\/醯r셓㶾\\a볜卺zE䝷_죤ဵ뿰᎟CB": [ + 6233512720017661219, + null, + -1638543730522713294, + false, + -8901187771615024724, + [ + 3891351109509829590, + true, + false, + -1.03836679125188032E18, + { + "j랎:g曞ѕᘼ}链N", + -1.1103819473845426E-19, + true, + [ + true, + null, + -7.9091791735309888E17, + true, + {"}蔰鋈+ꐨ啵0?g*사%`J?*": [{ + "\"2wG?yn,癷BK\\龞䑞x?蠢": -3.7220345009853505E-19, + ";饹়❀)皋`噿焒j(3⿏w>偍5X薙婏聿3aFÆÝ": "2,ꓴg?_섦_>Y쪥션钺;=趘F~?D㨫\bX?㹤+>/믟kᠪ멅쬂Uzỵ]$珧`m雁瑊ඖ鯬cꙉ梢f묛bB", + "♽n$YjKiXX*GO贩鏃豮祴遞K醞眡}ꗨv嵎꼷0୸+M菋eH徸J꣆:⼐悥B켽迚㯃b諂\u000bjꠜ碱逮m8": [ + "푷᣺ﻯd8ﱖ嬇ភH鹎⡱᱅0g:果6$GQ췎{vᷧYy-脕x偹砡館⮸C蓼ꏚ=軄H犠G谖ES詤Z蠂3l봟hᅭ7䦹1GPQG癸숟~[#駥8zQ뛣J소obg,", + null, + 1513751096373485652, + null, + -6.851466660824754E-19, + {"䩂-⴮2ٰK솖풄꾚ႻP앳1H鷛wmR䗂皎칄?醜<\/&ࠧ㬍X濬䵈K`vJ륒Q/IC묛!;$vϑ": { + "@-ꚗxྐྵ@m瘬\u0010U絨ﮌ驐\\켑寛넆T=tQ㭤L연@脸삯e-:⩼u㎳VQ㋱襗ຓ<Ⅶ䌸cML3+\u001e_C)r\\9+Jn\\Pﺔ8蠱檾萅Pq鐳话T䄐I": -1.80683891195530061E18, + "ᷭዻU~ཷsgSJ`᪅'%㖔n5픆桪砳峣3獮枾䌷⊰呀": { + "Ş੉䓰邟自~X耤pl7间懑徛s첦5ਕXexh⬖鎥᐀nNr(J컗|ૃF\"Q겮葲놔엞^겄+㈆话〾희紐G'E?飕1f❼텬悚泬먐U睬훶Qs": false, + "(\u20dag8큽튣>^Y{뤋.袊䂓;_g]S\u202a꽬L;^'#땏bႌ?C緡<䝲䲝断ꏏ6\u001asD7IK5Wxo8\u0006p弊⼂ꯍ扵\u0003`뵂픋%ꄰ⫙됶l囏尛+䗅E쟇\\": [ + true, + { + "\n鱿aK㝡␒㼙2촹f;`쾏qIࡔG}㝷䐍瓰w늮*粅9뒪ㄊCj倡翑閳R渚MiUO~仨䜶RꙀA僈㉋⦋n{㖥0딿벑逦⥻0h薓쯴Ꝼ": [ + 5188716534221998369, + 2579413015347802508, + 9.010794400256652E-21, + -6.5327297761238093E17, + 1.11635352494065523E18, + -6656281618760253655, + { + "": ")?", + "TWKLꑙ裑꺔UE俸塑炌Ũ᜕-o\"徚#": {"M/癟6!oI51ni퐚=댡>xꍨ\u0004 ?": { + "皭": {"⢫䋖>u%w잼<䕏꘍P䋵$魋拝U䮎緧皇Y훂&|羋ꋕ잿cJ䨈跓齳5\u001a삱籷I꿾뤔S8㌷繖_Yឯ䲱B턼O歵F\\l醴o_欬6籏=D": [ + false, + true, + {"Mt|ꏞD|F궣MQ뵕T,띺k+?㍵i": [ + 7828094884540988137, + false, + { + "!༦鯠,&aﳑ>[euJꏽ綷搐B.h": -7648546591767075632, + "-n켧嘰{7挐毄Y,>❏螵煫乌pv醑Q嶚!|⌝責0왾덢ꏅ蛨S\\)竰'舓Q}A釡5#v": 3344849660672723988, + "8閪麁V=鈢1녈幬6棉⪮둌\u207d᚛驉ꛃ'r䆉惏ै|bἧﺢᒙ<=穊强s혧eꮿ慩⌡ \\槳W븧J檀C,ᘉ의0俯퀉M;筷ࣴ瓿{늊埂鄧_4揸Nn阼Jੵ˥(社": true, + "o뼀vw)4A뢵(a䵢)p姃뛸\u000fK#KiQp\u0005ꅍ芅쏅": null, + "砥$ꥸ┇耽u斮Gc{z빔깎밇\\숰\u001e괷各㶇쵿_ᴄ+h穢p촀Ნ䃬z䝁酳ӂ31xꔄ1_砚W렘G#2葊P ": [ + -3709692921720865059, + null, + [ + 6669892810652602379, + -135535375466621127, + "뎴iO}Z? 馢녱稹ᄾ䐩rSt帤넆&7i騏멗畖9誧鄜'w{Ͻ^2窭외b㑎粖i矪ꦨ탪跣)KEㆹ\u0015V8[W?⽉>'kc$䨘ᮛ뉻٬M5", + 1.10439588726055846E18, + false, + -4349729830749729097, + null, + [ + false, + "_蠢㠝^䟪/D녒㡋ỎC䒈판\u0006એq@O펢%;鹐쏌o戥~A[ꡉ濽ỳ&虃᩾荣唙藍茨Ig楡꒻M窓冉?", + true, + 2.17220752996421728E17, + -5079714907315156164, + -9.960375974658589E-20, + "ᾎ戞༒", + true, + false, + [[ + "ⶉᖌX⧕홇)g엃⹪x뚐癟\u0002", + -5185853871623955469, + { + "L㜤9ợㇶK鐰⋓V뽋˖!斫as|9"፬䆪?7胜&n薑~": -2.11545634977136992E17, + "O8뀩D}캖q萂6༣㏗䈓煮吽ਆᎼDᣘ폛;": false, + "YTᡅ^L㗎cbY$pᣞ縿#fh!ꘂb삵玊颟샞ဢ$䁗鼒몁~rkH^:닮먖츸륈⪺쒉砉?㙓扫㆕꣒`R䢱B酂?C뇞<5Iޚ讳騕S瞦z": null, + "\\RB?`mG댵鉡幐物䵎有5*e骄T㌓ᛪ琾駒Ku\u001a[柆jUq8⋈5鿋츿myﻗ?雍ux঴?": 5828963951918205428, + "n0晅:黯 xu씪^퓞cB㎊ᬍ⺘٤փ~B岚3㥕擄vᲂ~F?C䶖@$m~忔S왖㲚?챴⊟W#벌{'㰝I䝠縁s樘\\X뢻9핡I6菍ㄛ8쯶]wॽ0L\"q": null, + "x增줖j⦦t䏢᎙㛿Yf鼘~꫓恄4惊\u209c": "oOhbᤃ᛽z&Bi犑\\3B㩬劇䄑oŁ쨅孥멁ຖacA㖫借㞝vg싰샂㐜#譞⢤@k]鋰嘘䜾L熶塥_<\/⍾屈ﮊ_mY菹t뙺}Ox=w鮮4S1ꐩמּ'巑", + "㗓蟵ꂾe蠅匳(JP䗏෸\u0089耀왲": [{ + "ᤃ㵥韎뤽\r?挥O쯡⇔㞚3伖\u0005P⋪\"D궣QLn(⚘罩䩢Ŏv䤘尗뼤됛O淽鋋闚r崩a{4箙{煷m6〈": { + "l곺1L": { + "T'ਤ?砅|੬Km]䄩\"(࿶<\/6U爢䫈倔郴l2㴱^줣k'L浖L鰄Rp今鎗⒗C얨M훁㡧ΘX粜뫈N꤇輊㌻켑#㮮샶-䍗룲蠝癜㱐V>=\\I尬癤t=": 7648082845323511446, + "鋞EP:<\/_`ၧe混ㇹBd⯢㮂驋\\q碽饩跓྿ᴜ+j箿렏㗑yK毢宸p謹h䦹乕U媣\\炤": [[ + "3", + [ + true, + 3.4058271399411134E-20, + true, + "揀+憱f逮@먻BpW曉\u001a㣐⎊$n劈D枤㡞좾\u001aᛁ苔౩闝1B䷒Ṋ݋➐ꀞꐃ磍$t੤_:蘺⮼(#N", + 697483894874368636, + [ + "vᘯ锴)0訶}䳅⩚0O壱韈ߜ\u0018*U鍾䏖=䧉뽑单휻ID쿇嘗?ꌸῬ07", + -5.4858784319382006E18, + 7.5467775182251151E18, + -8911128589670029195, + -7531052386005780140, + null, + [ + null, + true, + [[{ + "1欯twG<\/Q:0怯押殃탷聫사<ỗꕧ蚨䡁nDꌕ\u001c녬~蓩鲃g儊>ꏡl㻿/⑷*챳6㻜W毤緛ﹺᨪ4\u0013뺚J髬e3쳸䘦伧?恪&{L掾p+꬜M䏊d娘6": { + "2p첼양棜h䜢﮶aQ*c扦v︥뮓kC寵횂S銩&ǝ{O*य़iH`U큅ࡓr䩕5ꄸ?`\\᧫?ᮼ?t〟崾훈k薐ì/iy꤃뵰z1<\/AQ#뿩8jJ1z@u䕥": 1.82135747285215155E18, + "ZdN &=d년ᅆ'쑏ⅉ:烋5&៏ᄂ汎来L㯄固{钧u\\㊏튚e摑&t嗄ꖄUb❌?m䴘熚9EW": [{ + "ଛ{i*a(": -8.0314147546006822E17, + "⫾ꃆY\u000e+W`௸ \"M뒶+\\뷐lKE}(NT킶Yj選篒쁶'jNQ硾(똡\\\"逌ⴍy? IRꜘ὞鄬﨧:M\\f⠋Cꚜ쫊ᚴNV^D䕗ㅖἔIao꿬C⍏8": [ + 287156137829026547, + { + "H丞N逕⯲": {"": { + "7-;枮阕梒9ᑄZ": [[[[ + null, + { + "": [[[[ + -7.365909561486078E-19, + 2948694324944243408, + null, + [ + true, + "荒\"并孷䂡쵼9o䀘F\u0002龬7⮹Wz%厖/*? a*R枈㌦됾g뒠䤈q딄㺿$쮸tᶎ릑弣^鏎<\/Y鷇驜L鿽<\/춋9Mᲆឨ^<\/庲3'l낢", + "c鮦\u001b두\\~?眾ಢu݆綑෪蘛轋◜gȃ<\/ⴃcpkDt誩܅\"Y", + [[ + null, + null, + [ + 3113744396744005402, + true, + "v(y", + { + "AQ幆h쾜O+꺷铀ꛉ練A蚗⼺螔j㌍3꽂楎䥯뎸먩?": null, + "蠗渗iz鱖w]擪E": 1.2927828494783804E-17, + "튷|䀭n*曎b✿~杤U]Gz鄭kW|㴚#㟗ഠ8u擨": [[ + true, + null, + null, + {"⾪壯톽g7?㥜ώQꑐ㦀恃㧽伓\\*᧰閖樧뢇赸N휶䎈pI氇镊maᬠ탷#X?A+kНM ༑᩟؝?5꧎鰜ṚY즫궔 =ঈ;ﳈ?*s|켦蜌wM笙莔": [ + null, + -3808207793125626469, + [ + -469910450345251234, + 7852761921290328872, + -2.7979740127017492E18, + 1.4458504352519893E-20, + true, + "㽙깹?먏䆢:䴎ۻg殠JBTU⇞}ꄹꗣi#I뵣鉍r혯~脀쏃#釯:场:䔁>䰮o'㼽HZ擓௧nd", + [ + 974441101787238751, + null, + -2.1647718292441327E-19, + 1.03602824249831488E18, + [ + null, + 1.0311977941822604E-17, + false, + true, + { + "": -3.7019778830816707E18, + "E峾恆茍6xLIm縂0n2视֯J-ᤜz+ᨣ跐mYD豍繹⹺䊓몓ﴀE(@詮(!Y膽#᎙2䟓섣A䈀㟎,囪QbK插wcG湎ꤧtG엝x⥏俎j'A一ᯥ뛙6ㅑ鬀": 8999803005418087004, + "よ殳\\zD⧅%Y泥簳Uꈩ*wRL{3#3FYHା[d岀䉯T稉駅䞘礄P:闈W怏ElB㤍喬赔bG䠼U଄Nw鰯闀楈ePsDꥷ꭬⊊": [ + 6.77723657904486E-20, + null, + [ + "ཚ_뷎꾑蹝q'㾱ꂓ钚蘞慵렜떆`ⴹ⎼櫯]J?[t9Ⓢ !컶躔I᮸uz>3a㠕i,錃L$氰텰@7녫W㸮?羧W뇧ꃞ,N鋮숪2ɼ콏┍䁲6", + "&y?뢶=킕올Za惻HZk>c\u20b58i?ꦶcfBv잉ET9j䡡", + "im珊Ճb칧校\\뼾쯀", + 9.555715121193197E-20, + true, + { + "<㫚v6腓㨭e1㕔&&V∌ᗈT奄5Lጥ>탤?튣瑦㳆ꉰ!(ᙪ㿬擇_n쌯IMΉ㕨␰櫈ᱷ5풔蟹&L.첽e鰷쯃劼﫭b#ﭶ퓀7뷄Wr㢈๧Tʴશ㶑澕鍍%": -1810142373373748101, + "fg晌o?߲ꗄ;>C>?=鑰監侯Kt굅": true, + "䫡蓺ꑷ]C蒹㦘\"1ః@呫\u0014NL䏾eg呮፳,r$裢k>/\\?ㄤᇰﻛ쉕1஥'Ċ\" \\_?쨔\"ʾr: 9S䘏禺ᪧꄂ㲄", + [[{ + "*硙^+E쌺I1䀖ju?:⦈Ꞓl๴竣迃xKC/饉:\fl\"XTFᄄ蟭,芢<\/骡軺띜hꏘ\u001f銿<棔햳▨(궆*=乥b8\\媦䷀뫝}닶ꇭ(Kej䤑M": [{ + "1Ꮼ?>옿I╅C<ގ?ꊌ冉SV5A㢊㶆z-๎玶绢2F뵨@㉌뀌o嶔f9-庒茪珓뷳4": null, + ";lᰳ": "CbB+肻a䄷苝*/볳+/4fq=㰁h6瘉샴4铢Y骐.⌖@哼猎㦞+'gꋸ㒕ߤ㞑(䶒跲ti⑴a硂#No볔", + "t?/jE幸YHT셵⩎K!Eq糦ꗣv刴w\"l$ο:=6:移": { + "z]鑪醊嫗J-Xm銌翁絨c里됏炙Ep㣋鏣똼嚌䀓GP﹖cmf4鹭T䅿꣭姧␸wy6ꦶ;S&(}ᎧKxᾂQ|t뻳k\"d6\"|Ml췆hwLt꼼4$&8Պ褵婶鯀9": {"嵃닢ᒯ'd᧫䳳#NXe3-붋鸿ଢ떓%dK\u0013䲎ꖍYV.裸R⍉rR3蟛\\:젯:南ĺLʆ넕>|텩鴷矔ꋅⒹ{t孶㓑4_": [ + true, + null, + [ + false, + "l怨콈lᏒ", + { + "0w䲏嬧-:`䉅쉇漧\\܂yㄨb%㽄j7ᦶ涶<": 3.7899452730383747E-19, + "ꯛTẀq纤q嶏V⿣?\"g}ი艹(쥯B T騠I=仵및X": {"KX6颠+&ᅃ^f畒y[": { + "H?뱜^?꤂-⦲1a㋞&ꍃ精Ii᤾챪咽쬘唂쫷<땡劈훫놡o㥂\\ KⴙD秼F氮[{'좴:례晰Iq+I쭥_T綺砸GO煝䟪ᚪ`↹l羉q쐼D꽁ᜅ훦: vUV": true, + "u^yﳍ0㱓#[y뜌앸ꊬL㷩?蕶蘾⻍KӼ": -7931695755102841701, + "䤬轉車>\u001c鴵惋\"$쯃྆⇻n뽀G氠S坪]ಲꨍ捇Qxኻ椕駔\\9ࣼ﫻읜磡煮뺪ᶚ볝l㕆t+sζ": [[[ + true, + false, + [ + null, + 3363739578828074923, + true, + { + "\"鸣詩 볰㑵gL㯦῅춝旫}ED辗ﮈI쀤-ꧤ|㠦Z\"娑ᕸ4爏騍㣐\"]쳝Af]茛⬻싦o蚁k䢯䩐菽3廇喑ޅ": 4.5017999150704666E17, + "TYႇ7ʠ值4챳唤~Zo&ݛ": false, + "`塄J袛㭆끺㳀N㺣`꽐嶥KﯝSVᶔ∲퀠獾N딂X\"ᤏhNﬨvI": {"\u20bb㭘I䖵䰼?sw䂷쇪](泒f\"~;꼪Fԝsᝦ": {"p,'ꉂ軿=A蚶?bƉ㏵䅰諬'LYKL6B깯⋩겦뎙(ᜭ\u0006噣d꾆㗼Z;䄝䚔cd<情@䞂3苼㸲U{)<6&ꩻ钛\u001au〷N숨囖愙j=BXW욕^x芜堏Ῑ爂뛷꒻t✘Q\b": [[ + "籛&ଃ䩹.ꃩ㦔\\C颫#暪&!勹ꇶ놽攺J堬镙~軌C'꾖䣹㮅岃ᙴ鵣", + 4.317829988264744E15, + 6.013585322002147E-20, + false, + true, + null, + null, + -3.084633632357326E-20, + false, + null, + { + "\"짫愔昻 X\"藣j\"\"먁ཅѻ㘤㬯0晲DU꟒㸃d벀윒l䦾c੻*3": null, + "谈Wm陧阦咟ฯ歖擓N喴㋐銭rCCnVࢥ^♼Ⅾ젲씗刊S༝+_t赔\\b䚍뉨ꬫ6펛cL䊘᜼<\/澤pF懽&H": [ + null, + { + "W\"HDUuΌ퀟M'P4࿰H똆ⰱﮯ<\/凐蘲\"C鴫ﭒж}ꭩ쥾t5yd诪ﮡ퍉ⴰ@?氐醳rj4I6Qt": 6.9090159359219891E17, + "絛ﳛ⺂": {"諰P㗮聦`ZQ?ꫦh*റcb⧱}埌茥h{棩렛툽o3钛5鮁l7Q榛6_g)ὄ\u0013kj뤬^爖eO4Ⱈ槞鉨ͺ订%qX0T썗嫷$?\\\"봅늆'%": [ + -2.348150870600346E-19, + [[ + true, + -6619392047819511778, + false, + [[ + -1.2929189982356161E-20, + 1.7417192219309838E-19, + {"?嵲2࿐2\u0001啑㷳c縯": [ + null, + [ + false, + true, + 2578060295690793218, + { + "?\"殃呎#㑑F": true, + "}F炊_殛oU헢兔Ꝉ,赭9703.B数gTz3⏬": { + "5&t3,햓Mݸᵣ㴵;꣫䩍↳#@뫷䠅+W-ࣇzᓃ鿕ಔ梭?T䮑ꥬ旴]u뫵막bB讍:왳둛lEh=숾鱠p咐$짏#?g⹷ᗊv㷵.斈u頻\u0018-G.": "뽙m-ouࣤ஫牷\"`Ksꕞ筼3HlȨvC堈\"I]㖡玎r먞#'W賜鴇k'c룼髋䆿飉㗆xg巤9;芔cጐ/ax䊨♢큓r吓㸫೼䢗da᩾\"]屣`", + ":M딪<䢥喠\u0013㖅x9蕐㑂XO]f*Q呰瞊吭VP@9,㨣 D\\穎vˤƩs㜂-曱唅L걬/롬j㈹EB8g<\/섩o渀\"u0y&룣": ">氍緩L/䕑돯Ꟙ蕞^aB뒣+0jK⪄瑨痜LXK^힦1qK{淚t츔X:Vm{2r獁B뾄H첚7氥?쉟䨗ꠂv팳圎踁齀\\", + "D彤5㢷Gꪻ[lㄆ@὜⓰絳[ଃ獽쮹☒[*0ꑚ㜳": 9022717159376231865, + "ҖaV銣tW+$魿\u20c3亜~뫡ᙰ禿쨽㏡fṼzE/h": "5臐㋇Ჯ쮺? 昨탰Wム밎#'\"崲钅U?幫뺀⍾@4kh>騧\\0ҾEV=爐͌U捀%ꉼ 㮋<{j]{R>:gԩL\u001c瀈锌ﯲﳡꚒ'⫿E4暍㌗뵉X\"H᝜", + "ᱚגּ;s醒}犍SἿ㦣&{T$jkB\\\tḮ앾䤹o<避(tW": "vb⯽䴪䮢@|)", + "⥒퐁껉%惀뗌+녣迺顀q條g⚯i⤭룐M琹j̈́⽜A": -8385214638503106917, + "逨ꊶZ<\/W⫟솪㎮ᘇb?ꠔi\"H㧺x෷韒Xꫨฟ|]窽\u001a熑}Agn?Mᶖa9韲4$3Ỵ^=쏍煤ፐ돷2䣃%鷠/eQ9頸쥎", + 2398360204813891033, + false, + 3.2658897259932633E-19, + null, + "?ꚃ8Nn㞷幵d䲳䱲뀙ꪛQ瑓鎴]䩋-鰾捡䳡??掊", + false, + -1309779089385483661, + "ᦲxu_/yecR.6芏.ᜇ過 ~", + -5658779764160586501, + "쒌:曠=l썜䢜wk#s蕚\"互㮉m䉤~0듐䋙#G;h숄옥顇෤勹(C7㢅雚㐯L⠅VV簅<", + null, + -4.664877097240962E18, + -4.1931322262828017E18, + { + ",": { + "v㮟麑䄠뤵g{M띮.\u001bzt뢜뵡0Ǥ龍떟Ᾰ怷ϓRT@Lꀌ樂U㏠⾕e扉|bJg(뵒㠶唺~ꂿ(땉x⻫싉쁊;%0鎻V(o\f,N鏊%nk郼螺": -1.73631993428376141E18, + "쟧摑繮Q@Rᕾ㭚㾣4隅待㓎3蒟": [ + 4971487283312058201, + 8973067552274458613, + { + "`a揙ᣗ\u0015iBo¸": 4.3236479112537999E18, + "HW&퉡ぁ圍Y?瑡Qy훍q!帰敏s舠㫸zꚗaS歲v`G株巷Jp6킼 (귶鍔⾏⡈>M汐㞍ቴ꙲dv@i㳓ᇆ?黍": [ + null, + 4997607199327183467, + "E㻎蠫ᐾ高䙟蘬洼旾﫠텛㇛?'M$㣒蔸=A_亀绉앭rN帮", + null, + [{ + "Eᑞ)8餧A5u&㗾q?": [ + -1.969987519306507E-19, + null, + [ + 3.42437673373841E-20, + true, + "e걷M墁\"割P␛퍧厀R䱜3ﻴO퓫r﹉⹊", + [ + -8164221302779285367, + [ + true, + null, + "爘y^-?蘞Ⲽꪓa␅ꍨ}I", + 1.4645984996724427E-19, + [{ + "tY좗⧑mrzﺝ㿥ⴖ᥷j諅\u0000q賋譁Ꞅ⮱S\nࡣB/큃굪3Zɑ复o<\/;롋": null, + "彟h浠_|V4䦭Dᙣ♞u쿻=삮㍦\u001e哀鬌": [{"6횣楠,qʎꗇ鎆빙]㱭R굋鈌%栲j分僅ペ䇰w폦p蛃N溈ꡐꏀ?@(GI뉬$ﮄ9誁ꓚ2e甸ڋ[䁺,\u0011\u001cࢃ=\\+衪䷨ᯕ鬸K": [[ + "ㅩ拏鈩勥\u000etgWVXs陂規p狵w퓼{뮵_i\u0002ퟑႢ⬐d6鋫F~챿搟\u0096䚼1ۼ칥0꣯儏=鋷牋ⅈꍞ龐", + -7283717290969427831, + true, + [ + 4911644391234541055, + { + "I鈒첽P릜朸W徨觘-Hᎄ퐟⓺>8kr1{겵䍃〛ᬡ̨O귑o䝕'쿡鉕p5": "fv粖RN瞖蛐a?q꤄\u001d⸥}'ꣴ犿ꦼ?뤋?鵆쥴덋䡫s矷̄?ඣ/;괱絢oWfV<\/\u202cC,㖦0䑾%n賹g&T;|lj_欂N4w", + "짨䠗;䌕u i+r๏0": [{"9䥁\\఩8\"馇z䇔<\/ႡY3e狚쐡\"ุ6ﰆZ遖c\"Ll:ꮾ疣<\/᭙O◌납୕湞9⡳Und㫜\u0018^4pj1;䧐儂䗷ୗ>@e톬": { + "a⑂F鋻Q螰'<퇽Q贝瀧{ᘪ,cP&~䮃Z?gI彃": [ + -1.69158726118025933E18, + [ + "궂z簽㔛㮨瘥⤜䛖Gℤ逆Y⪾j08Sn昞ꘔ캻禀鴚P謦b{ꓮmN靐Mᥙ5\"睏2냑I\u0011.L&=?6ᄠ뻷X鸌t刑\"#z)o꫚n쳟줋", + null, + 7517598198523963704, + "ኑQp襟`uᩄr方]*F48ꔵn俺ሙ9뇒", + null, + null, + 6645782462773449868, + 1219168146640438184, + null, + { + ")ယ넌竀Sd䰾zq⫣⏌ʥ\u0010ΐ' |磪&p牢蔑mV蘸૰짬꺵;K": [ + -7.539062290108008E-20, + [ + true, + false, + null, + true, + 6574577753576444630, + [[ + 1.2760162530699766E-19, + [ + null, + [ + "顊\\憎zXB,", + [{ + "㇆{CVC9-MN㜋ઘR눽#{h@ퟨ!鼚׼XOvXS\u0017ᝣ=cS+梽៲綆16s덽휐y屬?ᇳG2ᴭ\u00054쫖y룇nKcW̭炦s/鰘ᬽ?J|퓀髣n勌\u0010홠P>j": false, + "箴": [ + false, + "鍞j\"ꮾ*엇칬瘫xṬ⭽쩁䃳\"-⋵?ᦽ댎Ĝ": true, + "Pg帯佃籛n㔠⭹࠳뷏≻࿟3㞱!-쒾!}쭪䃕!籿n涻J5ਲ਼yvy;Rኂ%ᔡጀ裃;M⣼)쵂쑈": 1.80447711803435366E18, + "ꈑC⡂ᑆ㤉壂뎃Xub<\/쀆༈憓ق쨐ק\\": [ + 7706977185172797197, + {"": {"K╥踮砆NWࡆFy韣7ä밥{|紒︧䃀榫rᩛꦡTSy잺iH8}ퟴ,M?Ʂ勺ᴹ@T@~꾂=I㙕뾰_涀쑜嫴曣8IY?ҿo줫fऒ}\\S\"ᦨ뵼#nDX": { + "♘k6?଱癫d68?㽚乳䬳-V顷\u0005蝕?\u0018䞊V{邾zじl]雏k臤~ൖH뒐iꢥ]g?.G碄懺䔛pR$䅒X觨l봜A刊8R梒',}u邩퉕?;91Ea䈈믁G⊶芔h袪&廣㺄j;㡏綽\u001bN頸쳘橆": -2272208444812560733, + "拑Wﵚj鵼駳Oࣿ)#㾅顂N傓纝y僱栜'Bꐍ-!KF*ꭇK¦?䈴^:啤wG逭w᧯": "xᣱmYe1ۏ@霄F$ě꧘푫O䤕퀐Pq52憬ꀜ兴㑗ᡚ?L鷝ퟐ뭐zJꑙ}╆ᅨJB]\"袌㺲u8䯆f", + "꿽၅㔂긱Ǧ?SI": -1669030251960539193, + "쇝ɨ`!葎>瞺瘡驷錶❤ﻮ酜=": -6961311505642101651, + "?f7♄꫄Jᡔ훮e읇퍾፣䭴KhखT;Qty}O\\|뫁IῒNe(5惁ꥶㆷY9ﮡ\\ oy⭖-䆩婁m#x봉>Y鈕E疣s驇↙ᙰm<": {"퉻:dꂁ&efᅫ쫢[\"돈늖꺙|Ô剐1͖-K:ʚ᭕/;쏖㷛]I痐职4gZ4⍜kเꛘZ⥺\\Bʫᇩ鄨魢弞&幟ᓮ2̊盜", + -9006004849098116748, + -3118404930403695681, + { + "_彃Y艘-\"Xx㤩㳷瑃?%2䐡鵛o귵옔夘v*탋职&㳈챗|O钧": [ + false, + "daꧺdᗹ羞쯧H㍤鄳頳<型孒ン냆㹀f4㹰\u000f|C*ሟ鰠(O<ꨭ峹ipຠ*y೧4VQ蔔hV淬{?ᵌEfrI_", + "j;ꗣ밷邍副]ᗓ", + -4299029053086432759, + -5610837526958786727, + [ + null, + [ + -1.3958390678662759E-19, + { + "lh좈T_믝Y\"伨\u001cꔌG爔겕ꫳ晚踍⿻읐T䯎]~e#฽燇\"5hٔ嶰`泯r;ᗜ쮪Q):/t筑,榄&5懶뎫狝(": [{ + "2ፁⓛ]r3C攟וּ9賵s⛔6'ஂ|\"ⵈ鶆䐹禝3\"痰ࢤ霏䵩옆䌀?栕r7O簂Isd?K᫜`^讶}z8?z얰T:X倫⨎ꑹ": -6731128077618251511, + "|︦僰~m漿햭\\Y1'Vvخ굇ቍ챢c趖": [null] + }], + "虌魿閆5⛔煊뎰㞤ᗴꥰF䮥蘦䂪樳-K᝷-(^\u20dd_": 2.11318679791770592E17 + } + ] + ] + ]}, + "묗E䀳㧯᳀逞GMc\b墹㓄끖Ơ&U??펌鑍 媋k))ᄊ": null, + "묥7콽벼諌J_DɯﮪM殴䣏,煚ྼ`Y:씧<\/⩫%yf䦀!1Ჶk춎Q米W∠WC跉鬽*ᛱi㴕L꘻ꀏ쓪\"_g鿄'#t⽙?,Wg㥖|D鑆e⥏쪸僬h鯔咼ඡ;4TK聎졠嫞" + } + ] + ] + } + ] + ] + ]}} + } + ]} + }, + "뿋뀾淣截䔲踀&XJ펖꙯^Xb訅ꫥgᬐ>棟S\"혧騾밫겁7-": "擹8C憎W\"쵮yR뢩浗絆䠣簿9䏈引Wcy䤶孖ꯥ;퐌]輩䍐3@{叝 뽸0ᡈ쵡Ⲇ\u001dL匁꧐2F~ݕ㪂@W^靽L襒ᦘ~沦zZ棸!꒲栬R" + } + ] + ], + "Z:덃൛5Iz찇䅄駠㭧蓡K1": "e8᧤좱U%?ⵇ䯿鿝\u0013縮R∱骒EO\u000fg?幤@֗퉙vU`", + "䐃쪈埽້=Ij,쭗쓇చ": false + }]}} + ] + } + ]} + } + ] + ] + ], + "咰긖VM]᝼6䓑쇎琺etDҌ?㞏ꩄ퇫밉gj8蠃\"⩐5䛹1ࣚ㵪": "ക蹊?⎲⧘⾚̀I#\"䈈⦞돷`wo窭戕෱휾䃼)앷嵃꾞稧,Ⴆ윧9S?೗EMk3Მ3+e{⹔Te驨7䵒?타Ulg悳o43" + } + ], + "zQᤚ纂땺6#ٽ﹧v￿#ࠫ휊冟蹧텈ꃊʆ?&a䥯De潝|쿓pt瓞㭻啹^盚2Ꝋf醪,얏T窧\\Di䕎谄nn父ꋊE": -2914269627845628872, + "䉩跐|㨻ᷢ㝉B{蓧瞸`I!℄욃힕#ೲᙾ竛ᔺCjk췒늕貭词\u0017署?W딚%(pꍁ⤼띳^=on뺲l䆼bzrﳨ[&j狸䠠=ᜑꦦ\u2061յnj=牲攑)M\\龏": false, + "뎕y絬᫡⥮Ϙᯑ㌔/NF*˓.,QEzvK!Iwz?|쥾\"ꩻL꼗Bꔧ賴緜s뉣隤茛>ロ?(?^`>冺飒=噸泥⺭Ᲊ婓鎔븜z^坷裮êⓅ໗jM7ﶕ找\\O": 1.376745434746303E-19 + }, + "䐛r滖w㏤,|Nዜ": false + } + ]], + "@꿙?薕尬 gd晆(띄5躕ﻫS蔺4)떒錸瓍?~": 1665108992286702624, + "w믍nᏠ=`঺ᅥC>'從됐槷䤝眷螄㎻揰扰XᅧC贽uჍ낟jKD03T!lDV쀉Ӊy뢖,袛!终캨G?鉮Q)⑗1쾅庅O4ꁉH7?d\u0010蠈줘월ސ粯Q!낇껉6텝|{": null, + "~˷jg쿤촖쉯y": -5.5527605669177098E18, + "펅Wᶺzꐆと푭e?4j仪열[D<鈑皶婆䵽ehS?袪;HꍨM뗎ば[(嗏M3q퍟g4y╸鰧茀[Bi盤~﫝唎鋆彺⦊q?B4쉓癚O洙킋툈䶯_?ퟲ": null + } + ] + ]] + ]], + "꟱Ԕ㍤7曁聯ಃ錐V䷰?v㪃૦~K\"$%请|ꇹn\"k䫛㏨鲨\u2023䄢\u0004[︊VJ?䶟ាꮈ䗱=깘U빩": -4863152493797013264 + } + ]}]} + ] + }}} + ], + "쏷쐲۹퉃~aE唙a챑,9㮹gLHd'䔏|킗㍞䎥&KZYT맵7䥺Nⱳ同莞鿧w\\༌疣n/+ꎥU\"封랾○ퟙAJᭌ?9䛝$?驔9讐짘魡T֯c藳`虉C읇쐦T" + } + ], + "谶개gTR￐>ၵ͚dt晑䉇陏滺}9㉸P漄": -3350307268584339381 + }] + ] + ] + ]] + ] + ], + "0y꟭馋X뱔瑇:䌚￐廿jg-懲鸭䷭垤㒬茭u賚찶ಽ+\\mT땱\u20821殑㐄J쩩䭛ꬿNS潔*d\\X,壠뒦e殟%LxG9:摸": 3737064585881894882, + "풵O^-⧧ⅶvѪ8廸鉵㈉ר↝Q㿴뺟EႳvNM:磇>w/៻唎뷭୥!냹D䯙i뵱貁C#⼉NH6`柴ʗ#\\!2䂗Ⱨf?諳.P덈-返I꘶6?8ꐘ": -8934657287877777844, + "溎-蘍寃i诖ര\"汵\"\ftl,?d⼡쾪⺋h匱[,෩I8MҧF{k瓿PA'橸ꩯ綷퉲翓": null + } + ] + ], + "ោ係؁<元": 1.7926963090826924E-18 + }}] + } + ] + ]]}] + }] + ] + ] + ] + ], + "ጩV<\"ڸsOᤘ": 2.0527167903723048E-19 + }] + ]} + ] + ]], + "∳㙰3젴p᧗䱙?`yZA8Ez0,^ᙛ4_0븢\u001ft:~䎼s.bb룦明yNP8弆C偯;⪾짍'蕴뮛": -6976654157771105701, + "큵ꦀ\\㇑:nv+뒤燻䀪ﴣ﷍9ᚈ኷K㚊誦撪䚛,ꮪxሲ쳊\u0005HSf?asg昱dqꬌVꙇ㼺'k*'㈈": -5.937042203633044E-20 + } + ] + }], + "?}\u20e0],s嶳菋@#2u쒴sQS䩗=ꥮ;烌,|ꘔ䘆": "ᅩ영N璠kZ먕眻?2ቲ芋眑D륟渂⸑ﴃIRE]啗`K'" + }}, + "쨀jmV賂ﰊ姐䂦玞㬙ᏪM᪟Վ씜~`uOn*ॠ8\u000ef6??\\@/?9見d筜ﳋB|S䝬葫㽁o": true + }, + "즛ꄤ酳艚␂㺘봿㎨iG৕ࡿ?1\"䘓您\u001fSኝ⺿溏zៀ뻤B\u0019?윐a䳵᭱䉺膷d:<\/": 3935553551038864272 + } + ] + ]} + ]] + ]] + ]} + } + ] + } + ]]}}, + "᥺3h↛!ꋰy\"攜(ெl䪕oUkc1A㘞ᡲ촾ᣫ<\/䒌E㛝潨i{v?W౾H\\RჅpz蝬R脾;v:碽✘↯삞鷱o㸧瑠jcmK7㶧뾥찲n": true, + "ⶸ?x䊺⬝-䰅≁!e쩆2ꎿ准G踌XXᩯ1߁}0?.헀Z馟;稄\baDꟹ{-寪⚈ꉷ鮸_L7ƽᾚ<\u001bጨA䧆송뇵⨔\\礍뗔d设룱㶉cq{HyぱR㥽吢ſtp": -7985372423148569301, + "緫#콮IB6<\/=5Eh礹\t8럭@饹韠r㰛斣$甝LV췐a갵'请o0g:^": "䔨(.", + "띳℡圤pン௄ĝ倧訜B쁟G䙔\"Sb⓮;$$▏S1J뢙SF|赡g*\"Vu䲌y": "䪈&틐),\\kT鬜1풥;뷴'Zေ䩹@J鞽NぼM?坥eWb6榀ƩZڮ淽⺞삳煳xჿ絯8eⶍ羷V}ჿ쎱䄫R뱃9Z>'\u20f1ⓕ䏜齮" + } + ] + ]]] + }} + } + ] + ]}, + "펮b.h粔폯2npX詫g錰鷇㇒<쐙S値bBi@?镬矉`剔}c2壧ଭfhY깨R()痩⺃a\\⍔?M&ﯟ<劜꺄멊ᄟA\"_=": null + }, + "~潹Rqn榢㆓aR鬨侅?䜑亡V_翅㭔(䓷w劸ၳDp䀅<\/ﰎ鶊m䵱팱긽ꆘ긓准D3掱;o:_ќ)껚콥8곤d矦8nP倥ꃸI": null, + "뾎/Q㣩㫸벯➡㠦◕挮a鶧⋓偼\u00001뱓fm覞n?㛅\"": 2.8515592202045408E17 + }], + ",": -5426918750465854828, + "2櫫@0柡g䢻/gꆑ6演&D稒肩Y?艘/놘p{f투`飷ᒉ챻돎<늛䘍ﴡ줰쫄": false, + "8(鸑嵀⵹ퟡ<9㣎Tߗ┘d슒ل蘯&㠦뮮eࠍk砝g 엻": false, + "d-\u208b?0ﳮ嵙'(J`蔿d^踅⤔榥\\J⵲v7": 6.8002426206715341E17, + "ཎ耰큓ꐕ㱷\u0013y=詽I\"盈xm{0쾽倻䉚ષso#鰑/8㸴짯%ꀄ떸b츟*\\鲷礬ZQ兩?np㋄椂榨kc᡹醅3": false, + "싊j20": false + }]] + ]], + "俛\u0017n緽Tu뫉蜍鼟烬.ꭠIⰓ\"Ἀ᜾uC쎆J@古%ꛍm뻨ᾀ画蛐휃T:錖㑸ዚ9죡$": true + } + ] + ], + "㍵⇘ꦖ辈s}㱮慀밒s`\"㞟j:`i픻Z섫^諎0Ok{켿歁෣胰a2﨤[탳뚬쎼嫭뉮m": 409440660915023105, + "w墄#*ᢄ峠밮jLa`ㆪ꺊漓Lで끎!Agk'ꁛ뢃㯐岬D#㒦": false, + "ଦPGI䕺L몥罭ꃑ궩﮶#⮈ᢓӢ䚬p7웼臧%~S菠␌힀6&t䳙y㪘냏\\*;鉏ᅧ鿵'嗕pa\"oL쇿꬈Cg": "㶽1灸D⟸䴅ᆤ뉎﷛渤csx 䝔цꬃ锚捬?ຽ+x~꘩uI࡞\u0007栲5呚ẓem?袝\")=㥴䨃pac!/揎Y", + "ᷱo\\||뎂몷r篙|#X䦜I#딌媸픕叞RD斳X4t⯩夬=[뭲r=绥jh뷱츝⪘%]⚋܈㖴スH텹m(WO曝劉0~K3c柢Ր㏉着逳~": false, + "煽_qb[첑\\륌wE❽ZtCNﭝ+餌ᕜOꛭ": "{ﳾ쉌&s惧ᭁⵆ3䢫;䨞팑꒪흘褀࢖Q䠿V5뭀䎂澻%받u5텸oA⮥U㎦;B䳌wz䕙$ឿ\\௅婺돵⪾퐆\\`Kyौꋟ._\u0006L챯l뇠Hi䧈偒5", + "艊佁ࣃ롇䱠爬!*;⨣捎慓q靓|儑ᨋL+迥=6㒺딉6弄3辅J-㕎뛄듘SG㆛(\noAzQꝱ䰩X*ぢO퀌%펠낌mo틮a^<\/F&_눊ᾉ㨦ы4\"8H": 2974648459619059400, + "鬙@뎣䫳ၮ끡?){y?5K;TA*k溱䫜J汃ꂯ싔썍\u001dA}룖(<\/^,": false, + "몏@QꋦFꊩᒐ뎶lXl垨4^郣|ꮇ;䝴ᝓ}쵲z珖": null + } + ]]]], + ":_=닧弗D䙋暨鏛. 㱻붘䂍J儒&ZK/녩䪜r囁⽯D喠죥7⹌䪥c\u001a\u2076￞妈朹oLk菮F౟覛쐧㮏7T;}蛙2{9\"崓bB<\/⡷룀;즮鿹)丒툃୤뷠5W⊢嶜(fb뭳갣": "E{响1WM" + }}, + "䘨tjJ驳豨?y輊M*᳑梵瞻઻ofQG瑮e": 2.222802939724948E-19, + "䮴=❑➶T෋w䞜\"垦ꃼUt\u001dx;B$뵣䙶E↌艣ᡥ!᧟;䱀[䔯k쬃`੍8饙른熏'2_'袻tGf蒭J땟as꯳╖&啒zWࡇᒫYSᏬ\u0014ℑ첥鈤|cG~Pᓮ\">\"": "ႆl\f7V儊㦬nHꄬꨧC{쐢~C⮃⛓嶦vꄎ1w鰠嘩뿠魄&\"_qMⵖ釔녮ꝇ 㝚{糍J哋 cv?-jkﻯྌ鹑L舟r", + "龧葆yB✱H盋夔ﶉ?n*0(": "ꧣኆ㢓氥qZZ酒ຜ)鮢樛)X䣆gTSґG텞k.J圬疝롫쯭z L:\\ྤ@w炋塜쿖ᾳy뢀䶃뱝N䥨㚔勇겁#p", + "도畎Q娡\"@S/뼋:䵏!P衅촚fVHQs✜ᐫi㻑殡B䜇%믚k*U#濨낄~": "ꍟዕ쳸ꍈ敋&l妏\u0005憡멗瘌uPgᅪm<\/To쯬锩h뒓k" + } + ] + }], + "墥홞r绚<\/⸹ⰃB}<躅\\Y;๑@䔸>韫䜲뱀X뗩鿥쩗SI%ﴞ㳕䛇?<\/\u00018x\\&侂9鋙a[LR㋭W胕)⡿8㞙0JF,}?허d1cDMᐃ␛鄝ⱕ%X)!XQ": "ⳍꗳ=橇a;3t⦾꼑仈ူaᚯ⯋ꕃAs鴷N⍕_䎃ꙎAz\u0016䯷\\<࿫>8q{}キ?ᣰ}'0ᴕ펓B┦lF#趤厃T?㕊#撹圂䆲" + }, + "܋닐龫論c웑": false, + "ㇿ/q\"6-co髨휝C큦#\u001b4~?3䐹E삇<<": 7.600917488140322E-20, + "䁝E6?㣖ꃁ间t祗*鑠{ḣV(浾h逇큞=W?ૉ?nꇽ8ꅉຉj으쮺@Ꚅ㰤u]Oyr": "v≁᫸_*όAඤԆl)ۓᦇQ}폠z༏q滚", + "ソ᥊/넺I": true + }]] + ] + ] + ] + ]] + }, + "䭑Ik攑\u0002QV烄:芩.麑㟴㘨≕": true, + "坄꿕C쇻풉~崍%碼\\8\"䬦꣙": null, + "欌L圬䅘Y8c(♺2?ON}o椳s宥2䉀eJ%闹r冁O^K諭%凞⺉⡻,掜?$ꥉ?略焕찳㯊艼誜4?\"﯎<゛XፈINT:詓 +": -1.0750456770694562E-19, + "獒àc뜭싼ﺳ뎤K`]p隨LtE": null, + "甙8䵊神EIꩤ鐯ᢀ,ﵮU䝑u疒ử驺䚿≚ഋ梶秓F`覤譐#짾蔀묊4<媍쬦靪_Yzgcࡶ4k紥`kc[Lﮗ簐*I瀑[⾰L殽鑥_mGȠ<\/|囹灠g桰iri": true, + "챓ꖙꟻ좝菇ou,嗠0\\jK핻뜠qwQ?ഩ㼕3Y彦b\u009bJ榶N棨f?됦鏖綃6鳵M[OE봨u햏.Ꮁ癜蟳뽲ꩌ뻾rM豈R嗀羫 uDꎚ%": null + }, + "V傜2<": 7175127699521359521 + }], + "铫aG切<\/\"ী⊆e<^g࢛)D顝nאַ饼\u008c猪繩嵿ﱚCꡬ㻊g엺A엦\u000f暿_f꿤볝㦕桦`蒦䎔j甬%岝rj 糏": "䚢偎눴Au<4箞7礦Iﱔ坠eȧ䪸u䵁p|逹$嗫쨘ꖾ﷐!胠z寓팢^㨔|u8Nሇe텔ꅦ抷]،鹎㳁#༔繁 ", + "낂乕ꃻ볨ϱ-ꇋ㖍fs⿫)zꜦ/K?솞♞ꑌ宭hJ᤭瑥Fu": false, + "쟰ぜ魛G\u0003u?`㾕ℾ㣭5螠烶這趩ꖢ:@咕ꐶx뒘느m䰨b痃렐0鳊喵熬딃$摉_~7*ⱦ녯1錾GKhJ惎秴6'H妈Tᧅ窹㺒疄矤铟wላ": null, + "쯆q4!3錕㲏ⵆ㇛꘷Z瑩뭆\\◪NH\u001d\\㽰U~㯶<\"쑣낞3ᵤ'峉eꢬ;鬹o꣒木X*長PXᘱu\"䠹n惞": null, + "ᅸ祊\"&ꥴCjࢼ﴿?䡉`U效5殼㮞V昽ꏪ#ﺸ\\&t6x꠹盥꣰a[\u001aꪍSpe鎿蠹": -1.1564713893659811E-19 + } + ]] + ] + ] + ], + "羵䥳H,6ⱎ겾|@t\"#햊1|稃 섭)띜=뻔ꡜ???櫎~*ῡ꫌/繣ﻠq": null + } + ]} + ]}, + "츤": false + }}, + "s": 3.7339341963399598E18 + } + ], + "N,I?1+㢓|ࣱ嶃쩥V2\u0012(4EE虪朶$|w颇v步": "~읢~_,Mzr㐫YB溓E淚\"ⅹ䈔ᏺ抙 b,nt5V㐒J檶ꏨ⻔?", + "Q껑ꡡ}$넎qH煔惍/ez^!ẳF댙䝌馻剁8": "梲;yt钰$i冄}AL%a j뜐奷걳뚾d꿽*ሬuDY3?뮟鼯뮟w㍪틱V", + "o{Q/K O胟㍏zUdꀐm&⨺J舕⾏魸訟㌥[T籨櫉唐킝 aṭ뱫촙莛>碶覆⧬짙쭰ׯdAiH໥벤퐥_恸[ 0e:죃TC弼荎뵁DA:w唵ꣁ": null, + "὏樎䵮軧|?౗aWH쩃1 ꅭsu": null + } + ] + }, + "勂\\&m鰈J釮=Ⲽ鳋+䂡郑": null, + "殣b綊倶5㥗惢⳷萢ᑀ䬄镧M^ﱴ3⣢翣n櫻1㨵}ኯ뗙顖Z.Q➷ꮨ뗇\u0004": "ꔙ䁼>n^[GीA䨟AM琢ᒊS쨲w?d㶣젊嘶纝麓+愣a%気ྞSc됓ᔘ:8bM7Xd8㶑臌]Ꙥ0ꐭ쒙䫣挵C薽Dfⵃ떼᷸", + "?紡.셪_෨j\u0013Ox┠$Xᶨ-ᅇo薹-}軫;y毝㪜K㣁?.EV쮱4둽⛻䤜'2盡\u001f60(|e쐰㼎ᦀ㒧-$l@ﻑ坳\u0003䭱响巗WFo5c㧆T턁Y맸♤(": -2.50917882560589088E17 + }} + ], + "侸\\릩.᳠뎠狣살cs项䭩畳H1s瀉븇19?.w骴崖㤊h痠볭㞳㞳䁮Ql怠㦵": "@䟴-=7f", + "鹟1x௢+d ;vi䭴FSDS\u0004hꎹ㚍?⒍⦏ў6u,扩@됷Su)Pag휛TᒗV痩!瞏釀ꖞ蘥&ೞ蘐ꭰꞇᝎ": "ah懱Ժ&\u20f7䵅♎඀䞧鿪굛ౕ湚粎蚵ᯋ幌YOE)५襦㊝Y*^\"R+ඈ咷蝶9ꥂ榨艦멎헦閝돶v좛咊E)K㓷ྭr", + "搆q쮦4綱켙셁.f4<\/g<籽늷?#蚴픘:fF\u00051㹉뀭.ᰖ풎f֦Hv蔎㧤.!䭽=鞽]음H:?\"-4": 8.740133984938656E-20 + }]} + } + ], + "tVKn딩꘥⊾蹓᤹{\u0003lR꼽ᄲQFᅏ傅ﱋ猢⤊ᔁ,E㓒秤nTතv`♛I\u0000]꫔ṞD\"麵c踝杰X&濿또꣹깳౥葂鿎\\aꡨ?": 3900062609292104525 + } + ], + "ਉ샒⊩Lu@S䧰^g": -1.1487677090371648E18, + "⎢k⑊꬗yᏫ7^err糎Dt\u000bJ礯확ㆍ沑サꋽe赔㝢^J\u0004笲㿋idra剰-᪉C錇/Ĝ䂾ညS지?~콮gR敉⬹'䧭": 1901472137232418266, + "灗k䶥:?촽贍쓉꓈㒸g獘[뵎\\胕?\u0014_榙p.j稶,$`糉妋0>Fᡰly㘽$?": "]ꙛO赎&#㠃돱剳\"<◆>0誉齐_|z|裵씪>ᐌ㼍\"Z[琕}O?G뚇諦cs⠜撺5cu痑U圲\u001c?鴴計l춥/╓哼䄗茏ꮅ뫈댽A돌롖뤫V窗讬sHd&\nOi;_u" + } + ], + "Uﺗ\\Y\\梷䄬~\u0002": null, + "k\"Y磓ᗔ휎@U冈<\/w컑)[": false, + "曏J蝷⌻덦\u001f㙳s꥓⍟邫P늮쥄c∬ྡྷ舆렮칤Z趣5콡넛A쳨\\뀙骫(棻.*&輛LiIfi{@EA婳KᬰTXT": -4.3088230431977587E17 + }]} + ] + ], + "곃㲧<\/dఓꂟs其ࡧ&N葶=?c㠤Ჴ'횠숄臼#\u001a~": false + } + ] + ]}] + }] + }} + ], + "2f`⽰E쵟>J笂裭!〛觬囀ۺ쟰#桊l鹛ⲋ|RA_Vx፭gE됓h﵀mfỐ|?juTU档[d⢼⺻p濚7E峿": 5613688852456817133 + }, + "濘끶g忮7㏵殬W팕Q曁 뫰)惃廊5%-蹚zYZ樭ﴷQ锘쯤崫gg": true, + "絥ᇑ⦏쒓븣爚H.㗊߄o蘵貆ꂚ(쎔O᥉ﮓ]姨Wꁓ!RMA|o퉢THx轮7M껁U즨'i뾘舯o": "跥f꜃?" + }} + ], + "鷰鹮K-9k;ﰰ?_ݦѷ-ꅣ䩨Zꥱ\"mꠟ屎/콑Y╘2&鸞脇㏢ꀇ࠺ⰼ拾喭틮L꽩bt俸墶 [l/웄\"꾦\u20d3iও-&+\u000fQ+໱뵞": -1.296494662286671E-19 + }, + "HX੹/⨇୕붷Uﮘ旧\\쾜͔3l鄈磣糂̖䟎Eᐳw橖b῀_딕hu葰窳闹вU颵|染H죶.fP䗮:j䫢\\b뎖i燕ꜚG⮠W-≚뉗l趕": "ଊ칭Oa᡺$IV㷧L\u0019脴셀붿餲햪$迳向쐯켂PqfT\" ?I屉鴼쿕@硙z^鏕㊵M}㚛T젣쓌-W⩐-g%⺵<뮱~빅╴瑿浂脬\u0005왦燲4Ⴭb|D堧 <\/oEQh", + "䘶#㥘੐캔f巋ἡAJ䢚쭈ࣨ뫒*mᇊK,ࣺAꑱ\u000bR<\/A\"1a6鵌㯀bh곿w(\"$ꘁ*rಐ趣.d࿩k/抶면䒎9W⊃9": "漩b挋Sw藎\u0000", + "畀e㨼mK꙼HglKb,\"'䤜": null + }]}] + ] + ] + }] + ]} + ] + ]} + ], + "歙>駿ꣂ숰Q`J΋方樛(d鱾뼣(뫖턭\u20f9lচ9歌8o]8윶l얶?镖G摄탗6폋폵+g:䱫홊<멀뀿/س|ꭺs걐跶稚W々c㫣⎖": "㣮蔊깚Cꓔ舊|XRf遻㆚︆'쾉췝\\&言", + "殭\"cށɨꝙ䞘:嬮e潽Y펪㳅/\"O@ࠗ겴]췖YǞ(t>R\"N?梳LD恭=n氯T豰2R諸#N}*灧4}㶊G䍣b얚": null, + "襞<\/啧 B|싞W瓇)6簭鼡艆lN쩝`|펭佡\\間邝[z릶&쭟愱ꅅ\\T᰽1鯯偐栈4̸s윜R7⒝/똽?치X": "⏊躖Cﱰ2Qẫ脐&இ?%냝悊", + ",鰧偵셣싹xᎹ힨᯳EṬH㹖9": -4604276727380542356 + } + } + ]]]], + "웺㚑xs}q䭵䪠馯8?LB犯zK'os䚛HZ\"L?셎s^㿧㴘Cv2": null + }] + ] + ] + ], + "Kd2Kv+|z": 7367845130646124107, + "ᦂⶨ?ᝢ 祂些ഷ牢㋇操\"腭䙾㖪\\(y4cE뽺ㆷ쫺ᔖ%zfۻ$ў1柦,㶢9r漢": -3.133230960444846E-20, + "琘M焀q%㢟f鸯O⣏蓑맕鯊$O噷|)z褫^㢦⠮ꚯ꫞`毕1qꢚ{ĭ䎀বώT\"뱘3G൴?^^of": null + } + ], + "a8V᯺?:ﺃ/8ꉿBq|9啓댚;*i2": null, + "cpT瀇H珰Ừpೃi鎪Rr␣숬-鹸ҩ䠚z脚цGoN8入y%趌I┽2ឪЀiJNcN)槣/▟6S숆牟\"箑X僛G殱娇葱T%杻:J諹昰qV쨰": 8331037591040855245 + }], + "G5ᩜ䄗巢껳": true + } + }, + "Ồ巢ゕ@_譙A`碫鄐㡥砄㠓(^K": "?܃B혢▦@犑ὺD~T⧁|醁;o=J牌9냚⢽㨘{4觍蚔9#$∺\u0016p囅\\3Xk阖⪚\"UzA穕롬✎➁㭒춺C㣌ဉ\"2瓑员ᅽꝶ뫍}꽚ꞇ鶂舟彺]ꍽJC蝧銉", + "␆Ě膝\"b-퉐ACR言J謈53~V튥x䜢?ꃽɄY뮩ꚜ": "K/↾e萃}]Bs⾿q룅鷦-膋?m+死^魊镲6", + "粡霦c枋AHퟁo礼Ke?qWcA趸㡔ꂏ?\u000e춂8iতᦜ婪\u0015㢼nﵿꍻ!ᐴ関\u001d5j㨻gfῩUK5Ju丝tかTI'?㓏t>⼟o a>i}ᰗ;뤕ܝ": false, + "ꄮ匴껢ꂰ涽+䜨B蛹H䛓-k蕞fu7kL谖,'涃V~챳逋穞cT\"vQ쓕ObaCRQ㓡Ⲯ?轭⫦輢墳?vA餽=h䮇킵n폲퉅喙?\"'1疬V嬗Qd灗'Lự": "6v!s믁㭟㣯獃!磸餠ቂh0C뿯봗F鷭gꖶ~コkK<ᦈTt\\跓w㭣횋钘ᆹ듡䑚W䟾X'ꅔ4FL勉Vܴ邨y)2'〚쭉⽵-鞣E,Q.?块", + "?(˧쩯@崟吋歄K": null + }, + "Gc럃녧>?2DYI鴿\\륨)澔0ᔬlx'觔7젘⤡縷螩%Sv׫묈/]↱&S h\u0006歋ᑛxi̘}ひY蔯_醨鯘煑橾8?䵎쨋z儬ꁏ*@츾:": null + } + } + } + ] + ] + ]} + }, + "HO츧G": 3.694949578823609E17, + "QC\u0012(翻曇Tf㷟bGBJ옉53\\嚇ᛎD/\u001b夾၉4\"핀@祎)쫆yD\"i먎Vn㿿V1W᨝䶀": -6150931500380982286, + "Z㓮P翸鍱鉼K䋞꘺튿⭁Y": -7704503411315138850, + "]모开ꬖP븣c霤<[3aΠ\"黁䖖䰑뮋ꤦ秽∼㑷冹T+YUt\"싳F↭䖏&鋌": -2.7231911483181824E18, + "tꎖ": -4.9517948741799555E-19, + "䋘즊.⬅IꬃۣQ챢ꄑ黐|f?C⾺|兕읯sC鬸섾整腨솷V": "旆柩l쪦sᖸMy㦅울썉瘗㎜檵9ꍂ駓ૉᚿ/u3씅徐拉[Z䞸ࡗ1ꆱ&Q풘?ǂ8\u0011BCDY2볨;鸏": null, + "幫 n煥s쁇펇 왊-$C\"衝:\u0014㣯舼.3뙗Yl⋇\"K迎멎[꽵s}9鉳UK8쐥\"掄㹖h㙈!얄સ?Ꜳ봺R伕UTD媚I䜘W鏨蔮": -4.150842714188901E-17, + "ﺯ^㄄\b죵@fྉkf颡팋Ꞧ{/Pm0V둳⻿/落韒ꊔᚬ@5螺G\\咸a谆⊪ቧ慷绖?财(鷇u錝F=r၍橢ឳn:^iᴵtD볠覅N赴": null + }] + }] + } + ] + ]} + ]}, + "謯?w厓奰T李헗聝ឍ貖o⪇弒L!캶$ᆅ": -4299324168507841322, + "뺊奉_垐浸延몏孄Z舰2i$q붿좾껇d▵餏\"v暜Ҭ섁m￴g>": -1.60911932510533427E18 + } + ] + } + ] + ]], + "퉝꺔㠦楶Pꅱ": 7517896876489142899, + "": false + } + ]}, + "是u&I狻餼|谖j\"7c됮sסּ-踳鉷`䣷쉄_A艣鳞凃*m⯾☦椿q㎭N溔铉tlㆈ^": 1.93547720203604352E18, + "kⲨ\\%vr#\u000bⒺY\\t<\/3﬌R訤='﹠8蝤Ꞵ렴曔r": false + } + ]}, + "阨{c?C\u001d~K?鎌Ԭ8烫#뙣P초遗t㭱E­돒䆺}甗[R*1!\\~h㕅᰺@<9JꏏષI䳖栭6綘걹ᅩM\"▯是∔v鬽顭⋊譬": "운ﶁK敂(欖C취پ℄爦賾" + } + }} + }], + "鷨赼鸙+\\䭣t圙ڹx᜾ČN<\/踘\"S_맶a鷺漇T彚⎲i㈥LT-xA캔$\u001cUH=a0츺l릦": "溣㣂0濕=鉵氬駘>Pꌢpb솇쬤h힊줎獪㪬CrQ矠a&脍꼬爼M茴/΅\u0017弝轼y#Ꞡc6둴=?R崏뷠麖w?" + }, + "閕ᘜ]CT)䵞l9z'xZF{:ؐI/躅匽졁:䟇AGF૸\u001cퟗ9)駬慟ꡒꆒRS״툋A<>\u0010\"ꂔ炃7g덚E৏bꅰ輤]o㱏_뷕ܘ暂\"u": "芢+U^+㢩^鱆8*1鈶鮀\u0002뺰9⬳ꪮlL䃣괟,G8\u20a8DF㉪錖0ㄤ瓶8Nଷd?眡GLc陓\\_죌V쁰ल二?c띦捱 \u0019JC\u0011b⤉zẒT볕\"绣蘨뚋cꡉkI\u001e鳴", + "ꃣI'{6u^㡃#཰Kq4逹y൒䧠䵮!㱙/n??{L풓ZET㙠퍿X2᩟綳跠葿㚙w཮x캽扳B唕S|尾}촕%N?o䪨": null, + "ⰴFjෟ셈[\u0018辷px?椯\\1<ﲻ栘ᣁ봢憠뉴p": -5263694954586507640 + } + ] + ]] + ]} + ]}] + ] + ], + "?#癘82禩鋆ꊝty?&": -1.9419029518535086E-19 + } + ] + ] + ]} + ] + ] + ], + "훊榲.|῕戄&.㚏Zꛦ2\"䢥ሆ⤢fV_摕婔?≍Fji冀탆꜕i㏬_ẑKᅢ꫄蔻XWc|饡Siẘ^㲦?羡2ぴ1縁ᙅ?쐉Ou": false + }]] + ]}}}, + "慂뗄卓蓔ᐓ匐嚖/颹蘯/翻ㆼL?뇊,텵<\\獷ごCボ": null + }, + "p溉ᑟi짣z:䒤棇r^٫%G9缑r砌롧.물农g?0׼ሩ4ƸO㣥㯄쩞ጩ": null, + "껎繥YxK\"F젷쨹뤤1wq轫o?鱑뜀瘊?뎃h灑\\ꛣ}K峐^ኖ⤐林ꉓhy": null + } + ], + "᱀n肓ㄛ\"堻2>m殮'1橌%Ꞵ군=Ӳ鯨9耛<\/n據0u彘8㬇៩f᏿诙]嚊": "䋯쪦S럶匏ㅛ#)O`ሀX_鐪渲⛀㨻宅闩➈ꢙஶDR⪍" + }, + "tA썓龇 ⋥bj왎录r땽✒롰;羋^\\?툳*┎?썀ma䵳넅U䳆૘〹䆀LQ0\b疀U~u$M}(鵸g⳾i抦뛹?䤈땚검.鹆?ꩡtⶥGĒ;!ቹHS峻B츪켏f5≺": 2366175040075384032, + "전pJjleb]ួ": -7.5418493141528422E18, + "n.鎖ጲ\n?,$䪘": true + }, + "欈Ar㉣螵᪚茩?O)": null + }, + "쫸M#x}D秱欐K=侫们丐.KꕾxẠ\u001e㿯䣛F܍캗qq8꟞ṢFD훎⵳簕꭛^鳜\u205c٫~⑟~冫ऊ2쫰<\/戲윱o<\"": true + }, + "㷝聥/T뱂\u0010锕|内䞇x侁≦㭖:M?iM᣿IJe煜dG࣯尃⚩gPt*辂.{磼럾䝪@a\\袛?}ᓺB珼": true + } + } + ]]}]}}, + "tn\"6ꫤ샾䄄;銞^%VBPwu묪`Y僑N.↺Ws?3C⤻9唩S䠮ᐴm;sᇷ냞඘B/;툥B?lB∤)G+O9m裢0kC햪䪤": -4.5941249382502277E18, + "ᚔt'\\愫?鵀@\\びꂕP큠<<]煹G-b!S?\nꖽ鼫,ݛ&頺y踦?E揆릱H}햧캡b@手.p탻>췽㣬ꒅ`qe佭P>ᓂ&?u}毚ᜉ蟶頳졪ᎏzl2wO": -2.53561440423275936E17 + }]} + } + ] + ]], + "潈촒⿂叡": 5495738871964062986 + } + ]] + } + ] + ]} + ]] + ]] + ]} + ] + ]}, + "ႁq킍蓅R`謈蟐ᦏ儂槐僻ﹶ9婌櫞釈~\"%匹躾ɢ뤥>࢟瀴愅?殕节/냔O✬H鲽엢?ᮈੁ⋧d␽㫐zCe*": 2.15062231586689536E17, + "㶵Ui曚珰鋪ᾼ臧P{䍏䷪쨑̟A뼿T渠誈䏚D1!잶<\/㡍7?)2l≣穷᛾稝{:;㡹nemיּ訊`G": null, + "䀕\"飕辭p圁f#뫆䶷뛮;⛴ᩍ3灚덏ᰝ쎓⦷詵%᜖Մfs⇫(\u001e~P|ﭗCⲾផv湟W첋(텪બT<บSꏉ੗⋲X婵i ӵ⇮?L䬇|ꈏ?졸": 1.548341247351782E-19 + } + ] + }, + "t;:N\u0015q鐦Rt缆{ꮐC?஛㷱敪\\+鲊㉫㓪몗릙竏(氵kYS": "XᰂT?൮ô", + "碕飦幑|+ 㚦鏶`镥ꁩ B<\/加륙": -4314053432419755959, + "秌孳(p!G?V傫%8ሽ8w;5鲗㦙LI檸\u2098": "zG N볞䆭鎍흘\\ONK3횙<\/樚立圌Q튅k쩎Ff쁋aׂJK銆ઘ즐狩6༥✙䩜篥CzP(聻駇HHퟲ讃%,ά{렍p而刲vy䦅ክ^톺M楒鍢㹳]Mdg2>䤉洞", + "踛M젧>忔芿㌜Zk": 2215369545966507819, + "씐A`$槭頰퍻^U覒\bG毲aᣴU;8!팲f꜇E⸃_卵{嫏羃X쀳C7뗮m(嚼u N܁谟D劯9]#": true, + "ﻩ!뵸-筚P᭛}ἰ履lPh?౮ⶹꆛ穉뎃g萑㑓溢CX뾇G㖬A錟]RKaꄘ]Yo+@䘁's섎襠$^홰}F": null + }, + "粘ꪒ4HXᕘ蹵.$區\r\u001d묁77pPc^y笲Q<\/ꖶ 訍䃍ᨕG?*": 1.73773035935040224E17 + }, + "婅拳?bkU;#D矠❴vVN쩆t㜷A풃갮娪a%鮏絪3dAv룒#tm쑬⌛qYwc4|L8KZ;xU⓭㳔밆拓EZ7襨eD|隰ऌ䧼u9Ԣ+]贴P荿": 2.9628516456987075E18 + }]}}] + ]} + }} + ]}] + ], + "|g翉F*湹̶\u0005⏐1脉̀eI쩓ᖂ㫱0碞l䴨ꑅ㵽7AtἈ턧yq䳥塑:z:遀ᄐX눔擉)`N3昛oQ셖y-ڨ⾶恢ꈵq^<\/": null, + "菹\\랓G^璬x৴뭸ゆUS겧﮷Bꮤ ┉銜᯻0%N7}~f洋坄Xꔼ<\/4妟Vꄟ9:౟곡t킅冩䧉笭裟炂4봋ⱳ叺怊t+怯涗\"0㖈Hq": false, + "졬믟'ﺇফ圪쓬멤m邸QLব䗁愍4jvs翙 ྍ꧀艳H-|": null, + "컮襱⣱뗠 R毪/鹙꾀%헳8&": -5770986448525107020 + } + ], + "B䔚bꐻ뙏姓展槰T-똌鷺tc灿᫽^㓟䏀o3o$꘭趙萬I顩)뇭Ἑ䓝\f@{ᣨ`x3蔛": null + } + ] + ] + }], + "⦖扚vWꃱ꥙㾠壢輓{-⎳鹷贏璿䜑bG倛⋐磎c皇皩7a~ﳫU╣Q࠭ꎉS摅姽OW.홌ೞ.": null, + "蚪eVlH献r}ᮏ믠ﰩꔄ@瑄ⲱ": null, + "퀭$JWoꩢg역쁍䖔㑺h&ୢtXX愰㱇?㾫I_6 OaB瑈q裿": null, + "꽦ﲼLyr纛Zdu珍B絟쬴糔?㕂짹䏵e": "ḱ\u2009cX9멀i䶛簆㳀k" + } + ]]]], + "(_ꏮg່澮?ᩑyM<艷\u001aꪽ\\庼뙭Z맷㰩Vm\\lY筺]3㋲2㌩㄀Eਟ䝵⨄쐨ᔟgङHn鐖⤇놋瓇Q탚單oY\"♆臾jHᶈ征ቄ??uㇰA?#1侓": null + }, + "觓^~ሢ&iI띆g륎ḱ캀.ᓡꀮ胙鈉": 1.0664523593012836E-19, + "y詭Gbᔶऽs댁U:杜⤎ϲ쁗⮼D醄诿q뙰I#즧v蔎xHᵿt᡽[**?崮耖p缫쿃L菝,봬ꤦC쯵#=X1瞻@OZc鱗CQTx": null + } + ] + }}], + "剘紁\u0004\\Xn⊠6,တױ;嵣崇}讃iႽ)d1\\䔓": null + }, + "脨z\"{X,1u찜<'k&@?1}Yn$\u0015Rd輲ーa쮂굄+B$l": true, + "諳>*쭮괐䵟Ґ+<箁}빀䅱⡔檏臒hIH脟ꩪC핝ଗP좕\"0i<\/C褻D۞恗+^5?'ꂱ䚫^7}㡠cq6\\쨪ꔞꥢ?纖䫀氮蒫侲빦敶q{A煲G": -6880961710038544266 + }}] + }, + "5s⨲JvಽῶꭂᄢI.a৊": null, + "?1q꽏쿻ꛋDR%U娝>DgN乭G": -1.2105047302732358E-19 + } + ] + ]}, + "qZz`撋뙹둣j碇쁏\\ꆥ\u0018@藴疰Wz)O{F䶛l᷂绘訥$]뮍夻䢋䩇萿獰樧猵⣭j萶q)$꬚⵷0馢W:Ⱍ!Qoe": -1666634370862219540, + "t": "=wp|~碎Q鬳Ӎ\\l-<\/^ﳊhn퐖}䍔t碵ḛ혷?靻䊗", + "邙쇡㯇%#=,E4勃驆V繚q[Y댻XV㡸[逹ᰏ葢B@u=JS5?bLRn얮㍉⏅ﰳ?a6[&큟!藈": 1.2722786745736667E-19 + }, + "X블땨4{ph鵋ꉯ웸 5p簂䦭s_E徔濧d稝~No穔噕뽲)뉈c5M윅>⚋[岦䲟懷恁?鎐꓆ฬ爋獠䜔s{\u001bm鐚儸煛%bﯿXT>ꗘ@8G": 1157841540507770724, + "媤娪Q杸\u0011SAyᡈ쿯": true, + "灚^ಸ%걁<\/蛯?\"祴坓\\\\'흍": -3.4614808555942579E18, + "釴U:O湛㴑䀣렑縓\ta)(j:숾却䗌gCiB뽬Oyuq輥厁/7)?今hY︺Q": null + } + ] + ]]]}] + ], + "I笔趠Ph!<ཛྷ㸞诘X$畉F\u0005笷菟.Esr릙!W☆䲖뗷莾뒭U\"䀸犜Uo3Gꯌx4r蔇᡹㧪쨢準<䂀%ࡡꟼ瑍8炝Xs0䀝销?fi쥱ꆝલBB": -8571484181158525797, + "L⦁o#J|\"⽩-㱢d㌛8d\\㶤傩儻E[Y熯)r噤὘勇 }": "e(濨쓌K䧚僒㘍蠤Vᛸ\"络QJL2,嬓왍伢㋒䴿考澰@(㏾`kX$끑эE斡,蜍&~y", + "vj.|统圪ᵮPL?2oŶ`밧\"勃+0ue%⿥绬췈체$6:qa렐Q;~晘3㙘鹑": true, + "ශؙ4獄⶿c︋i⚅:ん閝Ⳙ苆籦kw{䙞셕pC췃ꍬ␜꟯ꚓ酄b힝hwk꭭M鬋8B耳쑘WQ\\偙ac'唀x᪌\u2048*h짎#ፇ鮠뾏ឿ뀌": false, + "⎀jꄒ牺3Ⓝ컴~?親ꕽぼܓ喏瘘!@<튋㐌꿱⩦{a?Yv%⪧笯Uܱ栅E搚i뚬:ꄃx7䙳ꦋ&䓹vq☶I䁘ᾘ涜\\썉뺌Lr%Bc㍜3?ꝭ砿裞]": null, + "⭤뙓z(㡂%亳K䌽꫿AԾ岺㦦㼴輞낚Vꦴw냟鬓㹈뽈+o3譻K1잞": 2091209026076965894, + "ㇲ\t⋇轑ꠤ룫X긒\"zoY읇희wj梐쐑l侸`e%s": -9.9240075473576563E17, + "啸ꮑ㉰!ᚓ}銏": -4.0694813896301194E18, + ">]囋੽EK뇜>_ꀣ緳碖{쐐裔[<ನ\"䇅\"5L?#xTwv#罐\u0005래t应\\N?빗;": "v쮽瞭p뭃" + } + ]], + "斴槾?Z翁\"~慍弞ﻆ=꜡o5鐋dw\"?K蠡i샾ogDﲰ_C*⬟iㇷ4nય蟏[㟉U꽌娛苸 ঢ়操贻洞펻)쿗૊許X⨪VY츚Z䍾㶭~튃ᵦ<\/E臭tve猑x嚢": null, + "锡⛩<\/칥ꈙᬙ蝀&Ꚑ籬■865?_>L詏쿨䈌浿弥爫̫lj&zx<\/C쉾?覯n?": null, + "꾳鑤/꼩d=ᘈn挫ᑩ䰬ZC": "3錢爋6Ƹ䴗v⪿Wr益G韠[\u0010屗9쁡钁u?殢c䳀蓃樄욂NAq赟c튒瘁렶Aૡɚ捍" + } + ] + ] + ]} + ] + ] + }]]]}} + ]}], + "Ej䗳U<\/Q=灒샎䞦,堰頠@褙g_\u0003ꤾfⶽ?퇋!łB〙ד3CC䌴鈌U:뭔咎(Qો臃䡬荋BO7㢝䟸\"Yb": 2.36010731779814E-20, + "逸'0岔j\u000e눘먷翌C츊秦=ꭣ棭ှ;鳸=麱$XP⩉駚橄A\\좱⛌jqv䰞3Ь踌v㳆¹gT┌gvLB賖烡m?@E঳i": null + }, + "曺v찘ׁ?&绫O័": 9107241066550187880 + } + ] + ], + "(e屄\u0019昜훕琖b蓘ᬄ0/۲묇Z蘮ဏ⨏蛘胯뢃@㘉8ሪWᨮ⦬ᅳ䅴HI၇쨳z囕陻엣1赳o": true, + ",b刈Z,ၠ晐T솝ŕB⩆ou'퐼≃绗雗d譊": null, + "a唥KB\"ﳝ肕$u\n^⅄P䟼냉䞸⩪u윗瀱ꔨ#yşs꒬=1|ﲤ爢`t౐튼쳫_Az(Ṋ擬㦷좕耈6": 2099309172767331582, + "?㴸U<\/䢔ꯡ阽扆㐤q鐋?f㔫wM嬙-;UV죫嚔픞G&\"Cᗍ䪏풊Q": "VM7疹+陕枡툩窲}翡䖶8欞čsT뮐}璤:jﺋ鎴}HfA൝⧻Zd#Qu茅J髒皣Y-︴[?-~쉜v딏璮㹚䅊﩯<-#\u000e걀h\u0004u抱﵊㼃U<㱷⊱IC進" + }, + "숌dee節鏽邺p넱蹓+e罕U": true + } + ], + "b⧴룏??ᔠ3ぱ>%郿劃翐ꏬꠛW瞳᫏누躨狀ໄy੽\"ីuS=㨞馸k乆E": "トz݈^9R䬑<ﮛGRꨳ\u000fTT泠纷꽀MRᴱ纊:㠭볮?%N56%鈕1䗍䜁a䲗j陇=뿻偂衋࿘ᓸ?ᕵZ+<\/}H耢b䀁z^f$&㝒LkꢳI脚뙛u": 5.694374481577558E-20 + }] + } + ]], + "obj": {"key": "wrong value"}, + "퓲꽪m{㶩/뇿#⼢&᭙硞㪔E嚉c樱㬇1a綑᝖DḾ䝩": null + }, + "key": "6.908319653520691E8", + "z": { + "6U閆崬밺뀫颒myj츥휘:$薈mY햚#rz飏+玭V㭢뾿愴YꖚX亥ᮉ푊\u0006垡㐭룝\"厓ᔧḅ^Sqpv媫\"⤽걒\"˽Ἆ?ꇆ䬔未tv{DV鯀Tἆl凸g\\㈭ĭ즿UH㽤": null, + "b茤z\\.N": [[ + "ZL:ᅣዎ*Y|猫劁櫕荾Oj为1糕쪥泏S룂w࡛Ᏺ⸥蚙)", + { + "\"䬰ỐwD捾V`邀⠕VD㺝sH6[칑.:醥葹*뻵倻aD\"": true, + "e浱up蔽Cr෠JK軵xCʨ<뜡癙Y獩ケ齈X/螗唻?<蘡+뷄㩤쳖3偑犾&\\첊xz坍崦ݻ鍴\"嵥B3㰃詤豺嚼aqJ⑆∥韼@\u000b㢊\u0015L臯.샥": false, + "l?Ǩ喳e6㔡$M꼄I,(3᝝縢,䊀疅뉲B㴔傳䂴\u0088㮰钘ꜵ!ᅛ韽>": -5514085325291784739, + "o㮚?\"춛㵉<\/﬊ࠃ䃪䝣wp6ἀ䱄[s*S嬈貒pᛥ㰉'돀": [{ + "(QP윤懊FI<ꃣ『䕷[\"珒嶮?%Ḭ壍಻䇟0荤!藲끹bd浶tl\u2049#쯀@僞": {"i妾8홫": { + ",M맃䞛K5nAㆴVN㒊햬$n꩑&ꎝ椞阫?/ṏ세뉪1x쥼㻤㪙`\"$쟒薟B煌܀쨝ଢ଼2掳7㙟鴙X婢\u0002": "Vዉ菈᧷⦌kﮞఈnz*﷜FM\"荭7ꍀ-VR<\/';䁙E9$䩉\f @s?퍪o3^衴cඎ䧪aK鼟q䆨c{䳠5mᒲՙ蘹ᮩ": { + "F㲷JGo⯍P덵x뒳p䘧☔\"+ꨲ吿JfR㔹)4n紬G练Q፞!C|": true, + "p^㫮솎oc.೚A㤠??r\u000f)⾽⌲們M2.䴘䩳:⫭胃\\፾@Fᭌ\\K": false, + "蟌Tk愙潦伩": { + "a<\/@ᾛ慂侇瘎": -7271305752851720826, + "艓藬/>၄ṯ,XW~㲆w": {"E痧郶)㜓ha朗!N赻瞉駠uC\u20ad辠x퓮⣫P1ࠫLMMX'M刼唳됤": null, + "P쓫晥%k覛ዩIUᇸ滨:噐혲lMR5䋈V梗>%幽u頖\\)쟟": null, + "eg+昉~矠䧞难\b?gQ쭷筝\\eꮠNl{ಢ哭|]Mn銌╥zꖘzⱷ⭤ᮜ^": [ + -1.30142114406914976E17, + -1.7555215491128452E-19, + null, + "渾㨝ߏ牄귛r?돌?w[⚞ӻ~廩輫㼧/", + -4.5737191805302129E18, + null, + "xy࿑M[oc셒竓Ⓔx?뜓y䊦>-D켍(&&?XKkc꩖ﺸᏋ뵞K伕6ী)딀P朁yW揙?훻魢傎EG碸9類៌g踲C⟌aEX舲:z꒸许", + 3808159498143417627, + null, + {"m試\u20df1{G8&뚈h홯J<\/": { + "3ஸ厠zs#1K7:rᥞoꅔꯧ&띇鵼鞫6跜#赿5l'8{7㕳(b/j\"厢aq籀ꏚ\u0015厼稥": [ + -2226135764510113982, + true, + null, + { + "h%'맞S싅Hs&dl슾W0j鿏MםD놯L~S-㇡R쭬%": null, + "⟓咔謡칲\u0000孺ꛭx旑檉㶆?": null, + "恇I転;￸B2Y`z\\獓w,놏濐撐埵䂄)!䶢D=ഭ㴟jyY": { + "$ࡘt厛毣ൢI芁<겿骫⫦6tr惺a": [ + 6.385779736989334E-20, + false, + true, + true, + [ + -6.891946211462334E-19, + null, + { + "]-\\Ꟑ1/薓❧Ὂ\\l牑\u0007A郃)阜ᇒᓌ-塯`W峬G}SDb㬨Q臉⮻빌O鞟톴첂B㺱<ƈmu챑J㴹㷳픷Oㆩs": { + "\"◉B\"pᶉt骔J꩸ᄇᛐi╰栛K쉷㉯鐩!㈐n칍䟅難>盥y铿e୔蒏M貹ヅ8嘋퀯䉶ጥ㏢殊뻳\"絧╿ꉑ䠥?∃蓊{}㣣Gk긔H1哵峱": false, + "6.瀫cN䇮F㧺?\\椯=ڈT䘆4␘8qv": -3.5687501019676885E-19, + "Q?yऴr혴{஀䳘p惭f1ﹸ䅷䕋贲<ྃᄊ繲hq\\b|#QSTs1c-7(䵢\u2069匏絘ꯉ:l毴汞t戀oෟᵶ뮱፣-醇Jx䙬䐁햢0࣫ᡁgrㄛ": "\u0011_xM/蘇Chv;dhA5.嗀绱V爤ﰦi뵲M", + "⏑[\"ugoy^儣횎~U\\섯겜論l2jw஌yD腅̂\u0019": true, + "ⵯɇ䐲᫿࢚!㯢l샅笶戮1꣖0Xe": null, + "劅f넀識b宁焊E찓橵G!ʱ獓뭔雩괛": [{"p⹣켙[q>燣䍃㞽ᩲx:쓤삘7玑퇼0<\/q璂ᑁ[Z\\3䅵䧳\u0011㤧|妱緒C['췓Yꞟ3Z鳱雼P錻BU씧U`ᢶg蓱>.1ӧ譫'L_5V䏵Ц": [ + false, + false, + {"22䂍盥N霂얢躰e9⑩_뵜斌n@B}$괻Yᐱ@䧋V\"☒-諯cV돯ʠ": true, + "Ű螧ᔼ檍鍎땒딜qꄃH뜣<獧ूCY吓⸏>XQ㵡趌o끬k픀빯a(ܵ甏끆୯/6Nᪧ}搚ᆚ짌P牰泱鈷^d꣟#L삀\"㕹襻;k㸊\\f+": true, + "쎣\",|⫝̸阊x庿k잣v庅$鈏괎炔k쬪O_": [ + "잩AzZGz3v愠ꉈⵎ?㊱}S尳௏p\r2>췝IP䘈M)w|\u000eE", + -9222726055990423201, + null, + [ + false, + {"´킮'뮤쯽Wx讐V,6ᩪ1紲aႈ\u205czD": [ + -930994432421097536, + 3157232031581030121, + "l貚PY䃛5@䭄귻m㎮琸f": 1.0318894506812084E-19, + "࢜⩢Ш䧔1肽씮+༎ᣰ闺馺窃䕨8Mƶq腽xc(៯夐J5굄䕁Qj_훨/~価.䢵慯틠퇱豠㼇Qﵘ$DuSp(8Uญ<\/ಟ룴𥳐ݩ$": 8350772684161555590, + "ㆎQ䄾\u001bpᩭ${[諟^^骴᤮b^ㅥI┧T㉇⾞\"绦r䰂f矩'-7䡭桥Dz兔V9谶居㺍ᔊ䩯덲.\u001eL0ὅㅷ釣": [{ + "<쯬J卷^숞u࠯䌗艞R9닪g㐾볎a䂈歖意:%鐔|ﵤ|y}>;2,覂⶚啵tb*仛8乒㓶B࿠㯉戩oX 貘5V嗆렽낁߼4h䧛ꍺM空\\b꿋貼": 8478577078537189402, + "VD*|吝z~h譺aᯒ": { + "YI췢K<\/濳xNne玗rJo쾘3핰鴊\"↱AR:ࢷ\"9?\"臁說)?誚ꊏe)_D翾W?&F6J@뺾ꍰNZ醊Z쾈വH嶿?炫㷱鬰M겈᭨b,⻁鈵P䕡䀠८ⱄ홎鄣": { + "@?k2鶖㋮\"Oರ K㨇廪儲\u0017䍾J?);\b*묀㗠섳햭1MC V": null, + "UIICP!BUA`ᢈ㋸~袩㗪⾒=fB﮴l1ꡛ죘R辂여ҳ7쮡<䩲`熕8頁": 4481809488267626463, + "Y?+8먙ᚔ鋳蜩럶1㥔y璜౩`": [ + null, + 1.2850335807501874E-19, + "~V2", + 2035406654801997866, + { + "<숻1>\"": -8062468865199390827, + "M㿣E]}qwG莎Gn᝶(ꔙ\\D⬲iꇲs寢t駇S뀡ꢜ": false, + "pꝤ㎏9W%>M;-U璏f(^j1?&RB隧 忓b똊E": "#G?C8.躬ꥯ'?냪#< 渟&헿란zpo왓Kj}鷧XﻘMツb䕖;㪻", + "vE풤幉xz뱕쫥Ug㦲aH} ᣟp:鬼YᰟH3镔ᴚ斦\\鏑r*2橱G⼔F/.j": true, + "RK좬뎂a홠f*f㱉ᮍ⦋潙㨋Gu곌SGI3I뿐\\F',)t`荁蘯囯ﮉ裲뇟쥼_ገ驪▵撏ᕤV": 1.52738225997956557E18, + "^k굲䪿꠹B逤%F㱢漥O披M㽯镞竇霒i꼂焅륓\u00059=皫之눃\u2047娤閍銤唫ၕb<\/w踲䔼u솆맚,䝒ᝳ'/it": "B餹饴is権ꖪ怯ꦂẉဎt\"!凢谵⧿0\\<=(uL䷍刨쑪>俆揓Cy襸Q힆䆭涷<\/ᐱ0ɧ䗾䚹\\ኜ?ꄢᇘ`䴢{囇}᠈䴥X4퓪檄]ꥷ/3謒ሴn+g騍X", + "GgG꽬[(嫓몍6\u0004궍宩㙻/>\u0011^辍dT腪hxǑ%ꊇk,8(W⧂結P鬜O": [{ + "M㴾c>\\ᓲ\u0019V{>ꤩ혙넪㭪躂TS-痴໸闓⍵/徯O.M㏥ʷD囎⧔쁳휤T??鉬뇙=#ꢫ숣BX䭼<\/d똬졬g榿)eꨋﯪ좇첻\u001a\u0011\";~쓆BH4坋攊7힪", + "iT:L闞椕윚*滛gI≀Wਟඊ'ꢆ縺뱹鮚Nꩁ᧬蕼21줧\\䋯``⍐\\㏱鳨": 1927052677739832894, + "쮁缦腃g]礿Y㬙 fヺSɪ꾾N㞈": [ + null, + null, + { + "!t,灝Y 1䗉罵?c饃호䉂Cᐭ쒘z(즽sZG㬣sഖE4뢜㓕䏞丮Qp簍6EZឪ겛fx'ꩱQ0罣i{k锩*㤴㯞r迎jTⲤ渔m炅肳": [ + -3.3325685522591933E18, + [{"㓁5]A䢕1룥BC?Ꙍ`r룔Ⳛ䙡u伲+\u0001്o": [ + null, + 4975309147809803991, + null, + null, + {"T팘8Dﯲ稟MM☻㧚䥧/8ﻥ⥯aXLaH\"顾S☟耲ît7fS෉놁뮔/ꕼ䓈쁺4\\霶䠴ᩢ<\/t4?죵>uD5➶༆쉌럮⢀秙䘥\u20972ETR3濡恆vB? ~鸆\u0005": { + "`閖m璝㥉b뜴?Wf;?DV콜\u2020퍉౓擝宏ZMj3mJ먡-傷뱙yח㸷꥿ ໘u=M읝!5吭L4v\\?ǎ7C홫": null, + "|": false, + "~Ztᛋ䚘\\擭㗝傪W陖+㗶qᵿ蘥ᙄp%䫎)}=⠔6ᮢS湟-螾-mXH?cp": 448751162044282216, + "\u209fad놹j檋䇌ᶾ梕㉝bוּ": {"?苴ꩠD䋓帘5騱qﱖPF?☸珗顒yU ᡫcb䫎 S@㥚gꮒ쎘泴멖\\:I鮱TZ듒ᶨQ3+f7캙\"?\f풾\\o杞紟﻽M.⏎靑OP": [ + -2.6990368911551596E18, + [{"䒖@<᰿<\/⽬tTr腞&G%᳊秩蜰擻f㎳?S㵧\r*k뎾-乢겹隷j軛겷0룁鮁": {")DO0腦:춍逿:1㥨่!蛍樋2": [{ + ",ꌣf侴笾m๫ꆽ?1?U?\u0011ꌈꂇ": { + "x捗甠nVq䅦w`CD⦂惺嘴0I#vỵ} \\귂S끴D얾?Ԓj溯\"v餄a": { + "@翙c⢃趚痋i\u0015OQ⍝lq돆Y0pࢥ3쉨䜩^<8g懥0w)]䊑n洺o5쭝QL댊랖L镈Qnt⪟㒅십q헎鳒⮤眉ᔹ梠@O縠u泌ㄘb榚癸XޔFtj;iC": false, + "I&뱋゘|蓔䔕측瓯%6ᗻHW\\N1貇#?僐ᗜgh᭪o'䗈꽹Rc욏/蔳迄༝!0邔䨷푪8疩)[쭶緄㇈୧ፐ": { + "B+:ꉰ`s쾭)빼C羍A䫊pMgjdx䐝Hf9᥸W0!C樃'蘿f䫤סи\u0017Jve? 覝f둀⬣퓉Whk\"஼=չﳐ皆笁BIW虨쫓F廰饞": -642906201042308791, + "sb,XcZ<\/m㉹ ;䑷@c䵀s奤⬷7`ꘖ蕘戚?Feb#輜}p4nH⬮eKL트}": [ + "RK鳗z=袤Pf|[,u욺", + "Ẏᏻ罯뉋⺖锅젯㷻{H䰞쬙-쩓D]~\u0013O㳢gb@揶蔉|kᦂ❗!\u001ebM褐sca쨜襒y⺉룓", + null, + null, + true, + -1.650777344339075E-19, + false, + "☑lꄆs힨꤇]'uTന⌳농].1⋔괁沰\"IWഩ\u0019氜8쟇䔻;3衲恋,窌z펏喁횗?4?C넁问?ᥙ橭{稻Ⴗ_썔", + "n?]讇빽嗁}1孅9#ꭨ靶v\u0014喈)vw祔}룼쮿I", + -2.7033457331882025E18, + { + ";⚃^㱋x:饬ኡj'꧵T☽O㔬RO婎?향ᒭ搩$渣y4i;(Q>꿘e8q": "j~錘}0g;L萺*;ᕭꄮ0l潛烢5H▄쳂ꏒוֹꙶT犘≫x閦웧v", + "~揯\u2018c4職렁E~ᑅቚꈂ?nq뎤.:慹`F햘+%鉎O瀜쟏敛菮⍌浢<\/㮺紿P鳆ࠉ8I-o?#jﮨ7v3Dt赻J9": null, + "ࣝW䌈0ꍎqC逖,횅c၃swj;jJS櫍5槗OaB>D踾Y": {"㒰䵝F%?59.㍈cᕨ흕틎ḏ㋩B=9IېⓌ{:9.yw}呰ㆮ肒᎒tI㾴62\"ዃ抡C﹬B<\/촋jo朣", + [ + -7675533242647793366, + {"ᙧ呃:[㒺쳀쌡쏂H稈㢤\u001dᶗGG-{GHྻຊꡃ哸䵬;$?&d\\⥬こN圴됤挨-'ꕮ$PU%?冕눖i魁q騎Q": [ + false, + [[ + 7929823049157504248, + [[ + true, + "Z菙\u0017'eꕤ᱕l,0\\X\u001c[=雿8蠬L<\/낲긯W99g톉4ퟋb㝺\u0007劁'!麕Q궈oW:@X၎z蘻m絙璩귓죉+3柚怫tS捇蒣䝠-擶D[0=퉿8)q0ٟ", + "唉\nFA椭穒巯\\䥴䅺鿤S#b迅獘 ﶗ꬘\\?q1qN犠pX꜅^䤊⛤㢌[⬛휖岺q唻ⳡ틍\"㙙Eh@oA賑㗠y必Nꊑᗘ", + -2154220236962890773, + -3.2442003245397908E18, + "Wᄿ筠:瘫퀩?o貸q⊻(᎞KWf宛尨h^残3[U(='橄", + -7857990034281549164, + 1.44283696979059942E18, + null, + {"ꫯAw跭喀 ?_9\"Aty背F=9缉ྦྷ@;?^鞀w:uN㘢Rỏ": [ + 7.393662029337442E15, + 3564680942654233068, + [ + false, + -5253931502642112194, + "煉\\辎ೆ罍5⒭1䪁䃑s䎢:[e5}峳ﴱn騎3?腳Hyꏃ膼N潭錖,Yᝋ˜YAၓ㬠bG렣䰣:", + true, + null, + { + "⒛'P&%죮|:⫶춞": -3818336746965687085, + "钖m<\/0ݎMtF2Pk=瓰୮洽겎.": [[ + -8757574841556350607, + -3045234949333270161, + null, + { + "Ꮬr輳>⫇9hU##w@귪A\\C 鋺㘓ꖐ梒뒬묹㹻+郸嬏윤'+g<\/碴,}ꙫ>손;情d齆J䬁ຩ撛챝탹/R澡7剌tꤼ?ặ!`⏲睤\u00002똥଴⟏": null, + "\u20f2ܹe\\tAꥍư\\x当뿖렉禛;G檳ﯪS૰3~㘠#[J<}{奲 5箉⨔{놁<\/釿抋,嚠/曳m&WaOvT赋皺璑텁": [[ + false, + null, + true, + -5.7131445659795661E18, + "萭m䓪D5|3婁ఞ>蠇晼6nﴺPp禽羱DS<睓닫屚삏姿", + true, + [ + -8759747687917306831, + { + ">ⓛ\t,odKr{䘠?b퓸C嶈=DyEᙬ@ᴔ쨺芛髿UT퓻春<\/yꏸ>豚W釺N뜨^?꽴﨟5殺ᗃ翐%>퍂ဿ䄸沂Ea;A_\u0005閹殀W+窊?Ꭼd\u0013P汴G5썓揘": 4.342729067882445E-18, + "Q^즾眆@AN\u0011Kb榰냎Y#䝀ꀒᳺ'q暇睵s\"!3#I⊆畼寤@HxJ9": false, + "⿾D[)袨㇩i]웪䀤ᛰMvR<蟏㣨": {"v퇓L㪱ꖣ豛톤\\곱#kDTN": [{ + "(쾴䡣,寴ph(C\"㳶w\"憳2s馆E!n!&柄<\/0Pꈗſ?㿳Qd鵔": {"娇堰孹L錮h嵅⛤躏顒?CglN束+쨣ﺜ\\MrH": {"獞䎇둃ቲ弭팭^ꄞ踦涟XK錆쳞ឌ`;੶S炥騞ଋ褂B៎{ڒ䭷ᶼ靜pI荗虶K$": [{"◖S~躘蒉꫿輜譝Q㽙闐@ᢗ¥E榁iء5┄^B[絮跉ᰥ遙PWi3wㄾⵀDJ9!w㞣ᄎ{듒ꓓb6\\篴??c⼰鶹⟧\\鮇ꮇ": [[ + 654120831325413520, + -1.9562073916357608E-19, + { + "DC(昐衵ἡ긙갵姭|֛[t": 7.6979110359897907E18, + "J␅))嫼❳9Xfd飉j7猬ᩉ+⤻眗벎E鰉Zᄊ63zၝ69}ZᶐL崭ᦥ⡦靚⋛ꎨ~i㨃咊ꧭo䰠阀3C(": -3.5844809362512589E17, + "p꣑팱쒬ꎑ뛡Ꙩ挴恍胔&7ᔈ묒4Hd硶훐㎖zꢼ豍㿢aሃ=<\/湉鵲EӅ%$F!퍶棌孼{O駍਺geu+": ")\u001b잓kŀX쩫A밁®ڣ癦狢)扔弒p}k縕ꩋ,䃉tࣼi", + "ァF肿輸<솄G-䢹䛸ꊏl`Tqꕗ蒞a氷⸅ᴉ蠰]S/{J왲m5{9.uέ~㕚㣹u>x8U讁B덺襪盎QhVS맅킃i识{벂磄Iහ䙅xZy/抍૭Z鲁-霳V据挦ℒ": null, + "㯛|Nꐸb7ⵐb?拠O\u0014ކ?-(EꞨ4ꕷᄤYᯕOW瞺~螸\"욿ќe㺰\"'㌢ƐW\u0004瞕>0?V鷵엳": true, + "뤥G\\迋䠿[庩'꼡\u001aiᩮV쯁ᳪ䦪Ô;倱ନ뛁誈": null, + "쥹䄆䚟Q榁䎐᢭<\/2㕣p}HW蟔|䃏꿈ꚉ锳2Pb7㙑Tⅹᵅ": { + "Y?֭$>#cVBꩨ:>eL蒁務": { + "86柡0po 䏚&-捑Ћ祌<\/휃-G*㶢הּ쩍s㶟餇c걺yu꽎還5*턧簕Og婥SꝐ": null, + "a+葞h٥ࠆ裈嗫ﵢ5輙퀟ᛜ,QDﹼ⟶Y騠锪E_|x죗j侵;m蜫轘趥?븅w5+mi콛L": { + ";⯭ﱢ!买F⽍柤鶂n䵣V㫚墱2렾ELEl⣆": [ + true, + -3.6479311868339015E-18, + -7270785619461995400, + 3.334081886177621E18, + 2.581457786298155E18, + -6.605252412954115E-20, + -3.9232347037744167E-20, + { + "B6㊕.k1": null, + "ZAꄮJ鮷ᳱo갘硥鈠䠒츼": { + "ᕅ}럡}.@y陪鶁r業'援퀉x䉴ﵴl퍘):씭脴ᥞhiꃰblﲂ䡲엕8߇M㶭0燋標挝-?PCwe⾕J碻Ᾱ䬈䈥뷰憵賣뵓痬+": {"a췩v礗X⋈耓ፊf罅靮!㔽YYᣓw澍33⎔芲F|\"䜏T↮輦挑6ᓘL侘?ᅥ]덆1R௯✎餘6ꏽ<\/௨\\?q喷ꁫj~@ulq": {"嗫欆뾔Xꆹ4H㌋F嵧]ࠎ]㠖1ꞤT<$m뫏O i댳0䲝i": {"?෩?\u20cd슮|ꯆjs{?d7?eNs⢚嫥氂䡮쎱:鑵롟2hJꎒﯭ鱢3춲亄:뼣v䊭諱Yj択cVmR䩃㘬T\"N홝*ै%x^F\\_s9보zz4淗?q": [ + null, + "?", + 2941869570821073737, + "{5{殇0䝾g6밖퍋臩綹R$䖭j紋釰7sXI繳漪행y", + false, + "aH磂?뛡#惇d婅?Fe,쐘+늵䍘\"3r瘆唊勐j⳧࠴ꇓ<\/唕윈x⬌讣䋵%拗ᛆⰿ妴᝔M2㳗必꧂淲?ゥ젯檢<8끒MidX䏒3᳻Q▮佐UT|⤪봦靏⊏", + [[{ + "颉(&뜸귙{y^\"P퟉춝Ჟ䮭D顡9=?}Y誱<$b뱣RvO8cH煉@tk~4ǂ⤧⩝屋SS;J{vV#剤餓ᯅc?#a6D,s": [ + -7.8781018564821536E16, + true, + [ + -2.28770899315832371E18, + false, + -1.0863912140143876E-20, + -6282721572097446995, + 6767121921199223078, + -2545487755405567831, + false, + null, + -9065970397975641765, + [ + -5.928721243413937E-20, + {"6촊\u001a홯kB0w撨燠룉{绎6⳹!턍贑y▾鱧ժ[;7ᨷ∀*땒䪮1x霆Hᩭ☔\"r䝐7毟ᝰr惃3ꉭE+>僒澐": [ + "Ta쎩aƝt쵯ⰪVb", + [ + -5222472249213580702, + null, + -2851641861541559595, + null, + 4808804630502809099, + 5657671602244269874, + "5犲﨣4mᥣ?yf젫꾯|䋬잁$`Iⳉﴷ扳兝,'c", + false, + [ + null, + { + "DyUIN쎾M仼惀⮥裎岶泭lh扠\u001e礼.tEC癯튻@_Qd4c5S熯A<\/\6U윲蹴Q=%푫汹\\\u20614b[௒C⒥Xe⊇囙b,服3ss땊뢍i~逇PA쇸1": -2.63273619193485312E17, + "Mq꺋貘k휕=nK硍뫞輩>㾆~἞ࡹ긐榵l⋙Hw뮢帋M엳뢯v⅃^": 1877913476688465125, + "ᶴ뻗`~筗免⚽টW˃⽝b犳䓺Iz篤p;乨A\u20ef쩏?疊m㝀컩뫡b탔鄃ᾈV(遢珳=뎲ିeF仢䆡谨8t0醄7㭧瘵⻰컆r厡궥d)a阄፷Ed&c﯄伮1p": null, + "⯁w4曢\"(欷輡": "\"M᭫]䣒頳B\\燧ࠃN㡇j姈g⊸⺌忉ꡥF矉স%^", + "㣡Oᄦ昵⫮Y祎S쐐級㭻撥>{I$": -378474210562741663, + "䛒掷留Q%쓗1*1J*끓헩ᦢ﫫哉쩧EↅIcꅡ\\?ⴊl귛顮4": false, + "寔愆샠5]䗄IH贈=d﯊/偶?ॊn%晥D視N򗘈'᫂⚦|X쵩넽z질tskxDQ莮Aoﱻ뛓": true, + "钣xp?&\u001e侉/y䴼~?U篔蘚缣/I畚?Q绊": -3034854258736382234, + "꺲໣眀)⿷J暘pИfAV삕쳭Nꯗ4々'唄ⶑ伻㷯騑倭D*Ok꧁3b␽_<\/챣Xm톰ၕ䆄`*fl㭀暮滠毡?": [ + "D男p`V뙸擨忝븪9c麺`淂⢦Yw⡢+kzܖ\fY1䬡H歁)벾Z♤溊-혰셢?1<-\u0005;搢Tᐁle\\ᛵߓﭩ榩訝-xJ;巡8깊蠝ﻓU$K": { + "Vꕡ諅搓W=斸s︪vﲜ츧$)iꡟ싉e寳?ጭムVથ嵬i楝Fg<\/Z|៪ꩆ-5'@ꃱ80!燱R쇤t糳]罛逇dṌ֣XHiͦ{": true, + "Ya矲C멗Q9膲墅携휻c\\딶G甔<\/.齵휴": -1.1456247877031811E-19, + "z#.OO￝J": -8263224695871959017, + "崍_3夼ᮟ1F븍뽯ᦓ鴭V豈Ь": [{ + "N蒬74": null, + "yuB?厅vK笗!ᔸcXQ旦컶P-녫mᄉ麟_": "1R@ 톘xa_|﩯遘s槞d!d껀筤⬫薐焵먑D{\\6k共倌☀G~AS_D\"딟쬚뮥馲렓쓠攥WTMܭ8nX㩴䕅檹E\u0007ﭨN 2 ℆涐ꥏ꠵3▙玽|됨_\u2048", + "恐A C䧩G": {":M큣5e들\\ꍀ恼ᔄ靸|I﨏$)n": { + "|U䬫㟯SKV6ꛤ㗮\bn봻䲄fXT:㾯쳤'笓0b/ೢC쳖?2浓uO.䰴": "ཐ꼋e?``,ᚇ慐^8ꜙNM䂱\u0001IᖙꝧM'vKdꌊH牮r\\O@䊷ᓵ쀆(fy聻i툺\"?<\/峧ࣞ⓺ᤤ쵒߯ꎺ騬?)刦\u2072l慪y꺜ﲖTj+u", + "뽫hh䈵w>1ⲏ쐭V[ⅎ\\헑벑F_㖝⠗㫇h恽;῝汰ᱼ瀖J옆9RR셏vsZ柺鶶툤r뢱橾/ꉇ囦FGm\"謗ꉦ⨶쒿⥡%]鵩#ᖣ_蹎 u5|祥?O", + null, + 2.0150326776036215E-19, + null, + true, + false, + true, + {"\fa᭶P捤WWc᠟f뚉ᬏ퓗ⳀW睹5:HXH=q7x찙X$)모r뚥ᆟ!Jﳸf": [ + -2995806398034583407, + [ + 6441377066589744683, + "Mﶒ醹i)Gἦ廃s6몞 KJ౹礎VZ螺费힀\u0000冺업{谥'꡾뱻:.ꘘ굄奉攼Di᷑K鶲y繈욊阓v㻘}枭캗e矮1c?휐\"4\u0005厑莔뀾墓낝⽴洗ṹ䇃糞@b1\u0016즽Y轹", + { + "1⽕⌰鉟픏M㤭n⧴ỼD#%鐘⊯쿼稁븣몐紧ᅇ㓕ᛖcw嬀~ഌ㖓(0r⧦Q䑕髍ര铂㓻R儮\"@ꇱm❈௿᦯頌8}㿹犴?xn잆꥽R": 2.07321075750427366E18, + "˳b18㗈䃟柵Z曆VTAu7+㛂cb0﯑Wp執<\/臋뭡뚋刼틮荋벲TLP预庰܈G\\O@VD'鱃#乖끺*鑪ꬳ?Mޞdﭹ{␇圯쇜㼞顄︖Y홡g": [{ + "0a,FZ": true, + "2z̬蝣ꧦ驸\u0006L↛Ḣ4๚뿀'?lcwᄧ㐮!蓚䃦-|7.飑挴.樵*+1ﮊ\u0010ꛌ%貨啺/JdM:똍!FBe?鰴㨗0O财I藻ʔWA᫓G쳛u`<\/I": [{ + "$τ5V鴐a뾆両環iZp頻යn븃v": -4869131188151215571, + "*즢[⦃b礞R◚nΰꕢH=귰燙[yc誘g䆌?ଜ臛": { + "洤湌鲒)⟻\\䥳va}PeAMnN[": "㐳ɪ/(軆lZR,Cp殍ȮN啷\"3B婴?i=r$펽ᤐ쀸", + "阄R4㒿㯔ڀ69ZᲦ2癁핌噗P崜#\\-쭍袛&鐑/$4童V꩑_ZHA澢fZ3": {"x;P{긳:G閉:9?活H": [ + "繺漮6?z犞焃슳\">ỏ[Ⳛ䌜녏䂹>聵⼶煜Y桥[泥뚩MvK$4jtロ", + "E#갶霠좭㦻ୗ먵F+䪀o蝒ba쮎4X㣵 h", + -335836610224228782, + null, + null, + [ + "r1᫩0>danjY짿bs{", + [ + -9.594464059325631E-23, + 1.0456894622831624E-20, + null, + 5.803973284253454E-20, + -8141787905188892123, + true, + -4735305442504973382, + 9.513150514479281E-20, + "7넳$螔忷㶪}䪪l짴\u0007鹁P鰚HF銏ZJﳴ/⍎1ᷓ忉睇ᜋ쓈x뵠m䷐窥Ꮤ^\u0019ᶌ偭#ヂt☆၃pᎍ臶䟱5$䰵&๵分숝]䝈뉍♂坎\u0011<>", + "C蒑貑藁lﰰ}X喇몛;t밿O7/᯹f\u0015kI嘦<ዴ㟮ᗎZ`GWퟩ瑹࡮ᅴB꿊칈??R校s脚", + { + "9珵戬+AU^洘拻ቒy柭床'粙XG鞕᠜繀伪%]hC,$輙?Ut乖Qm떚W8઼}~q⠪rU䤶CQ痗ig@#≲t샌f㈥酧l;y闥ZH斦e⸬]j⸗?ঢ拻퀆滌": null, + "畯}㧢J罚帐VX㨑>1ꢶkT⿄蘥㝑o|<嗸層沈挄GEOM@-䞚䧰$만峬輏䠱V✩5宸-揂D'㗪yP掶7b⠟J㕻SfP?d}v㼂Ꮕ'猘": { + "陓y잀v>╪": null, + "鬿L+7:됑Y=焠U;킻䯌잫!韎ஔ\f": { + "駫WmGጶ": { + "\\~m6狩K": -2586304199791962143, + "ႜࠀ%͑l⿅D.瑢Dk%0紪dḨTI픸%뗜☓s榗኉\"?V籄7w髄♲쟗翛歂E䤓皹t ?)ᄟ鬲鐜6C": { + "_췤a圷1\u000eB-XOy缿請∎$`쳌eZ~杁튻/蜞`塣৙\"⪰\"沒l}蕌\\롃荫氌.望wZ|o!)Hn獝qg}": null, + "kOSܧ䖨钨:಼鉝ꭝO醧S`십`ꓭ쭁ﯢN&Et㺪馻㍢ⅳ㢺崡ຊ蜚锫\\%ahx켨|ż劻ꎄ㢄쐟A躊᰹p譞綨Ir쿯\u0016ﵚOd럂*僨郀N*b㕷63z": { + ":L5r+T㡲": [{ + "VK泓돲ᮙRy㓤➙Ⱗ38oi}LJቨ7Ó㹡৘*q)1豢⛃e᫛뙪壥镇枝7G藯g㨛oI䄽 孂L缊ꋕ'EN`": -2148138481412096818, + "`⛝ᘑ$(खꊲ⤖ᄁꤒ䦦3=)]Y㢌跨NĴ驳줟秠++d孳>8ᎊ떩EꡣSv룃 쯫أ?#E|᭙㎐?zv:5祉^⋑V": [ + -1.4691944435285607E-19, + 3.4128661569395795E17, + "㐃촗^G9佭龶n募8R厞eEw⺡_ㆱ%⼨D뉄퉠2ꩵᛅⳍ搿L팹Lවn=\"慉념ᛮy>!`g!풲晴[/;?[v겁軇}⤳⤁핏∌T㽲R홓遉㓥", + "愰_⮹T䓒妒閤둥?0aB@㈧g焻-#~跬x<\/舁P݄ꐡ=\\׳P\u0015jᳪᢁq;㯏l%᭗;砢觨▝,謁ꍰGy?躤O黩퍋Y㒝a擯\n7覌똟_䔡]fJ晋IAS", + 4367930106786121250, + -4.9421193149720582E17, + null, + { + ";ᄌ똾柉곟ⰺKpፇ䱻ฺ䖝{o~h!eꁿ઻욄ښ\u0002y?xUd\u207c悜ꌭ": [ + 1.6010824122815255E-19, + [ + "宨︩9앉檥pr쇷?WxLb", + "氇9】J玚\u000f옛呲~ 輠1D嬛,*mW3?n휂糊γ虻*ᴫ꾠?q凐趗Ko↦GT铮", + "㶢ថmO㍔k'诔栀Z蛟}GZ钹D", + false, + -6.366995517736813E-20, + -4894479530745302899, + null, + "V%᫡II璅䅛䓎풹ﱢ/pU9se되뛞x梔~C)䨧䩻蜺(g㘚R?/Ự[忓C뾠ࢤc왈邠买?嫥挤풜隊枕", + ",v碍喔㌲쟚蔚톬៓ꭶ", + 3.9625444752577524E-19, + null, + [ + "kO8란뿒䱕馔b臻⍟隨\"㜮鲣Yq5m퐔K#ꢘug㼈ᝦ=P^6탲@䧔%$CqSw铜랊0&m⟭<\/a逎ym\u0013vᯗ": true, + "洫`|XN뤮\u0018詞=紩鴘_sX)㯅鿻Ố싹": 7.168252736947373E-20, + "ꛊ饤ﴏ袁(逊+~⽫얢鈮艬O힉7D筗S곯w操I斞᠈븘蓷x": [[[[ + -7.3136069426336952E18, + -2.13572396712722688E18, + { + "硢3㇩R:o칢行E<=\u0018ၬYuH!\u00044U%卝炼2>\u001eSi$⓷ꒈ'렢gᙫ番ꯒ㛹럥嶀澈v;葷鄕x蓎\\惩+稘UEᖸﳊ㊈壋N嫿⏾挎,袯苷ኢ\\x|3c": 7540762493381776411, + "?!*^ᢏ窯?\u0001ڔꙃw虜돳FgJ?&⨫*uo籤:?}ꃹ=ٴ惨瓜Z媊@ત戹㔏똩Ԛ耦Wt轁\\枒^\\ꩵ}}}ꀣD\\]6M_⌫)H豣:36섘㑜": { + ";홗ᰰU஋㙛`D왔ཿЃS회爁\u001b-㢈`봆?盂㛣듿ᦾ蒽_AD~EEຆ㊋(eNwk=Rɠ峭q\"5Ἠ婾^>'ls\n8QAK)- Q䲌mo펹L_칍樖庫9꩝쪹ᘹ䑖瀍aK ?*趤f뭓廝p=磕", + "哑z懅ᤏ-ꍹux쀭", + [ + true, + 3998739591332339511, + "ጻ㙙?᳸aK<\/囩U`B3袗ﱱ?\"/k鏔䍧2l@쿎VZ쨎/6ꃭ脥|B?31+on颼-ꮧ,O嫚m ࡭`KH葦:粘i]aSU쓙$쐂f+詛頖b", + [{"^<9<箝&絡;%i﫡2攑紴\\켉h쓙-柂䚝ven\u20f7浯-Ꮏ\r^훁䓚헬\u000e?\\ㅡֺJ떷VOt": [{ + "-௄卶k㘆혐஽y⎱㢬sS઄+^瞥h;ᾷj;抭\u0003밫f<\/5Ⱗ裏_朻%*[-撵䷮彈-芈": { + "㩩p3篊G|宮hz䑊o곥j^Co0": [ + 653239109285256503, + {"궲?|\":N1ۿ氃NZ#깩:쇡o8킗ࡊ[\"됸Po핇1(6鰏$膓}⽐*)渽J'DN<썙긘毦끲Ys칖": { + "2Pr?Xjㆠ?搮/?㓦柖馃5뚣Nᦼ|铢r衴㩖\"甝湗ܝ憍": "\"뾯i띇筝牻$珲/4ka $匝휴译zbAᩁꇸ瑅&뵲衯ꎀᆿ7@ꈋ'ᶨH@ᠴl+", + "7뢽뚐v?4^ꊥ_⪛.>pởr渲<\/⢕疻c\"g䇘vU剺dஔ鮥꒚(dv祴X⼹\\a8y5坆": true, + "o뼄B욞羁hr﷔폘뒚⿛U5pꪴfg!6\\\"爑쏍䢱W<ﶕ\\텣珇oI/BK뺡'谑♟[Ut븷亮g(\"t⡎有?ꬊ躺翁艩nl F⤿蠜": 1695826030502619742, + "ۊ깖>ࡹ햹^ⵕ쌾BnN〳2C䌕tʬ]찠?ݾ2饺蹳ぶꌭ訍\"◹ᬁD鯎4e滨T輀ﵣ੃3\u20f3킙D瘮g\\擦+泙ၧ 鬹ﯨַ肋7놷郟lP冝{ߒhড়r5,꓋": null, + "ΉN$y{}2\\N﹯ⱙK'8ɜͣwt,.钟廣䎘ꆚk媄_": null, + "䎥eᾆᝦ읉,Jުn岪㥐s搖謽䚔5t㯏㰳㱊ZhD䃭f絕s鋡篟a`Q鬃┦鸳n_靂(E4迠_觅뷝_宪D(NL疶hL追V熑%]v肫=惂!㇫5⬒\u001f喺4랪옑": { + "2a輍85먙R㮧㚪Sm}E2yꆣꫨrRym㐱膶ᔨ\\t綾A☰.焄뙗9<쫷챻䒵셴᭛䮜.<\/慌꽒9叻Ok䰊Z㥪幸k": [ + null, + true, + {"쌞쐍": { + "▟GL K2i뛱iQ\"̠.옛1X$}涺]靎懠ڦ늷?tf灟ݞゟ{": 1.227740268699265E-19, + "꒶]퓚%ฬK❅": [{ + "(ෛ@Ǯっ䧼䵤[aテൖvEnAdU렖뗈@볓yꈪ,mԴ|꟢캁(而첸죕CX4Y믅": "2⯩㳿ꢚ훀~迯?᪑\\啚;4X\u20c2襏B箹)俣eỻw䇄", + "75༂f詳䅫ꐧ鏿 }3\u20b5'∓䝱虀f菼Iq鈆﨤g퍩)BFa왢d0뮪痮M鋡nw∵謊;ꝧf美箈ḋ*\u001c`퇚퐋䳫$!V#N㹲抗ⱉ珎(V嵟鬒_b㳅\u0019": null, + "e_m@(i㜀3ꦗ䕯䭰Oc+-련0뭦⢹苿蟰ꂏSV䰭勢덥.ྈ爑Vd,ᕥ=퀍)vz뱊ꈊB_6듯\"?{㒲&㵞뵫疝돡믈%Qw限,?\r枮\"? N~癃ruࡗdn&": null, + "㉹&'Pfs䑜공j<\/?|8oc᧨L7\\pXᭁ 9᪘": -2.423073789014103E18, + "䝄瑄䢸穊f盈᥸,B뾧푗횵B1쟢f\u001f凄": "魖⚝2儉j꼂긾껢嗎0ࢇ纬xI4](੓`蕞;픬\fC\"斒\")2櫷I﹥迧", + "ퟯ詔x悝령+T?Bg⥄섅kOeQ큼㻴*{E靼6氿L缋\u001c둌๶-㥂2==-츫I즃㠐Lg踞ꙂEG貨鞠\"\u0014d'.缗gI-lIb䋱ᎂDy缦?": null, + "紝M㦁犿w浴詟棓쵫G:䜁?V2ힽ7N*n&㖊Nd-'ຊ?-樹DIv⊜)g䑜9뉂ㄹ푍阉~ꅐ쵃#R^\u000bB䌎䦾]p.䀳": [{"ϒ爛\"ꄱ︗竒G䃓-ま帳あ.j)qgu扐徣ਁZ鼗A9A鸦甈!k蔁喙:3T%&㠘+,䷞|챽v䚞문H<\/醯r셓㶾\\a볜卺zE䝷_죤ဵ뿰᎟CB": [ + 6233512720017661219, + null, + -1638543730522713294, + false, + -8901187771615024724, + [ + 3891351109509829590, + true, + false, + -1.03836679125188032E18, + { + "j랎:g曞ѕᘼ}链N", + -1.1103819473845426E-19, + true, + [ + true, + null, + -7.9091791735309888E17, + true, + {"}蔰鋈+ꐨ啵0?g*사%`J?*": [{ + "\"2wG?yn,癷BK\\龞䑞x?蠢": -3.7220345009853505E-19, + ";饹়❀)皋`噿焒j(3⿏w>偍5X薙婏聿3aFÆÝ": "2,ꓴg?_섦_>Y쪥션钺;=趘F~?D㨫\bX?㹤+>/믟kᠪ멅쬂Uzỵ]$珧`m雁瑊ඖ鯬cꙉ梢f묛bB", + "♽n$YjKiXX*GO贩鏃豮祴遞K醞眡}ꗨv嵎꼷0୸+M菋eH徸J꣆:⼐悥B켽迚㯃b諂\u000bjꠜ碱逮m8": [ + "푷᣺ﻯd8ﱖ嬇ភH鹎⡱᱅0g:果6$GQ췎{vᷧYy-脕x偹砡館⮸C蓼ꏚ=軄H犠G谖ES詤Z蠂3l봟hᅭ7䦹1GPQG癸숟~[#駥8zQ뛣J소obg,", + null, + 1513751096373485652, + null, + -6.851466660824754E-19, + {"䩂-⴮2ٰK솖풄꾚ႻP앳1H鷛wmR䗂皎칄?醜<\/&ࠧ㬍X濬䵈K`vJ륒Q/IC묛!;$vϑ": { + "@-ꚗxྐྵ@m瘬\u0010U絨ﮌ驐\\켑寛넆T=tQ㭤L연@脸삯e-:⩼u㎳VQ㋱襗ຓ<Ⅶ䌸cML3+\u001e_C)r\\9+Jn\\Pﺔ8蠱檾萅Pq鐳话T䄐I": -1.80683891195530061E18, + "ᷭዻU~ཷsgSJ`᪅'%㖔n5픆桪砳峣3獮枾䌷⊰呀": { + "Ş੉䓰邟自~X耤pl7间懑徛s첦5ਕXexh⬖鎥᐀nNr(J컗|ૃF\"Q겮葲놔엞^겄+㈆话〾희紐G'E?飕1f❼텬悚泬먐U睬훶Qs": false, + "(\u20dag8큽튣>^Y{뤋.袊䂓;_g]S\u202a꽬L;^'#땏bႌ?C緡<䝲䲝断ꏏ6\u001asD7IK5Wxo8\u0006p弊⼂ꯍ扵\u0003`뵂픋%ꄰ⫙됶l囏尛+䗅E쟇\\": [ + true, + { + "\n鱿aK㝡␒㼙2촹f;`쾏qIࡔG}㝷䐍瓰w늮*粅9뒪ㄊCj倡翑閳R渚MiUO~仨䜶RꙀA僈㉋⦋n{㖥0딿벑逦⥻0h薓쯴Ꝼ": [ + 5188716534221998369, + 2579413015347802508, + 9.010794400256652E-21, + -6.5327297761238093E17, + 1.11635352494065523E18, + -6656281618760253655, + { + "": ")?", + "TWKLꑙ裑꺔UE俸塑炌Ũ᜕-o\"徚#": {"M/癟6!oI51ni퐚=댡>xꍨ\u0004 ?": { + "皭": {"⢫䋖>u%w잼<䕏꘍P䋵$魋拝U䮎緧皇Y훂&|羋ꋕ잿cJ䨈跓齳5\u001a삱籷I꿾뤔S8㌷繖_Yឯ䲱B턼O歵F\\l醴o_欬6籏=D": [ + false, + true, + {"Mt|ꏞD|F궣MQ뵕T,띺k+?㍵i": [ + 7828094884540988137, + false, + { + "!༦鯠,&aﳑ>[euJꏽ綷搐B.h": -7648546591767075632, + "-n켧嘰{7挐毄Y,>❏螵煫乌pv醑Q嶚!|⌝責0왾덢ꏅ蛨S\\)竰'舓Q}A釡5#v": 3344849660672723988, + "8閪麁V=鈢1녈幬6棉⪮둌\u207d᚛驉ꛃ'r䆉惏ै|bἧﺢᒙ<=穊强s혧eꮿ慩⌡ \\槳W븧J檀C,ᘉ의0俯퀉M;筷ࣴ瓿{늊埂鄧_4揸Nn阼Jੵ˥(社": true, + "o뼀vw)4A뢵(a䵢)p姃뛸\u000fK#KiQp\u0005ꅍ芅쏅": null, + "砥$ꥸ┇耽u斮Gc{z빔깎밇\\숰\u001e괷各㶇쵿_ᴄ+h穢p촀Ნ䃬z䝁酳ӂ31xꔄ1_砚W렘G#2葊P ": [ + -3709692921720865059, + null, + [ + 6669892810652602379, + -135535375466621127, + "뎴iO}Z? 馢녱稹ᄾ䐩rSt帤넆&7i騏멗畖9誧鄜'w{Ͻ^2窭외b㑎粖i矪ꦨ탪跣)KEㆹ\u0015V8[W?⽉>'kc$䨘ᮛ뉻٬M5", + 1.10439588726055846E18, + false, + -4349729830749729097, + null, + [ + false, + "_蠢㠝^䟪/D녒㡋ỎC䒈판\u0006એq@O펢%;鹐쏌o戥~A[ꡉ濽ỳ&虃᩾荣唙藍茨Ig楡꒻M窓冉?", + true, + 2.17220752996421728E17, + -5079714907315156164, + -9.960375974658589E-20, + "ᾎ戞༒", + true, + false, + [[ + "ⶉᖌX⧕홇)g엃⹪x뚐癟\u0002", + -5185853871623955469, + { + "L㜤9ợㇶK鐰⋓V뽋˖!斫as|9"፬䆪?7胜&n薑~": -2.11545634977136992E17, + "O8뀩D}캖q萂6༣㏗䈓煮吽ਆᎼDᣘ폛;": false, + "YTᡅ^L㗎cbY$pᣞ縿#fh!ꘂb삵玊颟샞ဢ$䁗鼒몁~rkH^:닮먖츸륈⪺쒉砉?㙓扫㆕꣒`R䢱B酂?C뇞<5Iޚ讳騕S瞦z": null, + "\\RB?`mG댵鉡幐物䵎有5*e骄T㌓ᛪ琾駒Ku\u001a[柆jUq8⋈5鿋츿myﻗ?雍ux঴?": 5828963951918205428, + "n0晅:黯 xu씪^퓞cB㎊ᬍ⺘٤փ~B岚3㥕擄vᲂ~F?C䶖@$m~忔S왖㲚?챴⊟W#벌{'㰝I䝠縁s樘\\X뢻9핡I6菍ㄛ8쯶]wॽ0L\"q": null, + "x增줖j⦦t䏢᎙㛿Yf鼘~꫓恄4惊\u209c": "oOhbᤃ᛽z&Bi犑\\3B㩬劇䄑oŁ쨅孥멁ຖacA㖫借㞝vg싰샂㐜#譞⢤@k]鋰嘘䜾L熶塥_<\/⍾屈ﮊ_mY菹t뙺}Ox=w鮮4S1ꐩמּ'巑", + "㗓蟵ꂾe蠅匳(JP䗏෸\u0089耀왲": [{ + "ᤃ㵥韎뤽\r?挥O쯡⇔㞚3伖\u0005P⋪\"D궣QLn(⚘罩䩢Ŏv䤘尗뼤됛O淽鋋闚r崩a{4箙{煷m6〈": { + "l곺1L": { + "T'ਤ?砅|੬Km]䄩\"(࿶<\/6U爢䫈倔郴l2㴱^줣k'L浖L鰄Rp今鎗⒗C얨M훁㡧ΘX粜뫈N꤇輊㌻켑#㮮샶-䍗룲蠝癜㱐V>=\\I尬癤t=": 7648082845323511446, + "鋞EP:<\/_`ၧe混ㇹBd⯢㮂驋\\q碽饩跓྿ᴜ+j箿렏㗑yK毢宸p謹h䦹乕U媣\\炤": [[ + "3", + [ + true, + 3.4058271399411134E-20, + true, + "揀+憱f逮@먻BpW曉\u001a㣐⎊$n劈D枤㡞좾\u001aᛁ苔౩闝1B䷒Ṋ݋➐ꀞꐃ磍$t੤_:蘺⮼(#N", + 697483894874368636, + [ + "vᘯ锴)0訶}䳅⩚0O壱韈ߜ\u0018*U鍾䏖=䧉뽑单휻ID쿇嘗?ꌸῬ07", + -5.4858784319382006E18, + 7.5467775182251151E18, + -8911128589670029195, + -7531052386005780140, + null, + [ + null, + true, + [[{ + "1欯twG<\/Q:0怯押殃탷聫사<ỗꕧ蚨䡁nDꌕ\u001c녬~蓩鲃g儊>ꏡl㻿/⑷*챳6㻜W毤緛ﹺᨪ4\u0013뺚J髬e3쳸䘦伧?恪&{L掾p+꬜M䏊d娘6": { + "2p첼양棜h䜢﮶aQ*c扦v︥뮓kC寵횂S銩&ǝ{O*य़iH`U큅ࡓr䩕5ꄸ?`\\᧫?ᮼ?t〟崾훈k薐ì/iy꤃뵰z1<\/AQ#뿩8jJ1z@u䕥": 1.82135747285215155E18, + "ZdN &=d년ᅆ'쑏ⅉ:烋5&៏ᄂ汎来L㯄固{钧u\\㊏튚e摑&t嗄ꖄUb❌?m䴘熚9EW": [{ + "ଛ{i*a(": -8.0314147546006822E17, + "⫾ꃆY\u000e+W`௸ \"M뒶+\\뷐lKE}(NT킶Yj選篒쁶'jNQ硾(똡\\\"逌ⴍy? IRꜘ὞鄬﨧:M\\f⠋Cꚜ쫊ᚴNV^D䕗ㅖἔIao꿬C⍏8": [ + 287156137829026547, + { + "H丞N逕⯲": {"": { + "7-;枮阕梒9ᑄZ": [[[[ + null, + { + "": [[[[ + -7.365909561486078E-19, + 2948694324944243408, + null, + [ + true, + "荒\"并孷䂡쵼9o䀘F\u0002龬7⮹Wz%厖/*? a*R枈㌦됾g뒠䤈q딄㺿$쮸tᶎ릑弣^鏎<\/Y鷇驜L鿽<\/춋9Mᲆឨ^<\/庲3'l낢", + "c鮦\u001b두\\~?眾ಢu݆綑෪蘛轋◜gȃ<\/ⴃcpkDt誩܅\"Y", + [[ + null, + null, + [ + 3113744396744005402, + true, + "v(y", + { + "AQ幆h쾜O+꺷铀ꛉ練A蚗⼺螔j㌍3꽂楎䥯뎸먩?": null, + "蠗渗iz鱖w]擪E": 1.2927828494783804E-17, + "튷|䀭n*曎b✿~杤U]Gz鄭kW|㴚#㟗ഠ8u擨": [[ + true, + null, + null, + {"⾪壯톽g7?㥜ώQꑐ㦀恃㧽伓\\*᧰閖樧뢇赸N휶䎈pI氇镊maᬠ탷#X?A+kНM ༑᩟؝?5꧎鰜ṚY즫궔 =ঈ;ﳈ?*s|켦蜌wM笙莔": [ + null, + -3808207793125626469, + [ + -469910450345251234, + 7852761921290328872, + -2.7979740127017492E18, + 1.4458504352519893E-20, + true, + "㽙깹?먏䆢:䴎ۻg殠JBTU⇞}ꄹꗣi#I뵣鉍r혯~脀쏃#釯:场:䔁>䰮o'㼽HZ擓௧nd", + [ + 974441101787238751, + null, + -2.1647718292441327E-19, + 1.03602824249831488E18, + [ + null, + 1.0311977941822604E-17, + false, + true, + { + "": -3.7019778830816707E18, + "E峾恆茍6xLIm縂0n2视֯J-ᤜz+ᨣ跐mYD豍繹⹺䊓몓ﴀE(@詮(!Y膽#᎙2䟓섣A䈀㟎,囪QbK插wcG湎ꤧtG엝x⥏俎j'A一ᯥ뛙6ㅑ鬀": 8999803005418087004, + "よ殳\\zD⧅%Y泥簳Uꈩ*wRL{3#3FYHା[d岀䉯T稉駅䞘礄P:闈W怏ElB㤍喬赔bG䠼U଄Nw鰯闀楈ePsDꥷ꭬⊊": [ + 6.77723657904486E-20, + null, + [ + "ཚ_뷎꾑蹝q'㾱ꂓ钚蘞慵렜떆`ⴹ⎼櫯]J?[t9Ⓢ !컶躔I᮸uz>3a㠕i,錃L$氰텰@7녫W㸮?羧W뇧ꃞ,N鋮숪2ɼ콏┍䁲6", + "&y?뢶=킕올Za惻HZk>c\u20b58i?ꦶcfBv잉ET9j䡡", + "im珊Ճb칧校\\뼾쯀", + 9.555715121193197E-20, + true, + { + "<㫚v6腓㨭e1㕔&&V∌ᗈT奄5Lጥ>탤?튣瑦㳆ꉰ!(ᙪ㿬擇_n쌯IMΉ㕨␰櫈ᱷ5풔蟹&L.첽e鰷쯃劼﫭b#ﭶ퓀7뷄Wr㢈๧Tʴશ㶑澕鍍%": -1810142373373748101, + "fg晌o?߲ꗄ;>C>?=鑰監侯Kt굅": true, + "䫡蓺ꑷ]C蒹㦘\"1ః@呫\u0014NL䏾eg呮፳,r$裢k>/\\?ㄤᇰﻛ쉕1஥'Ċ\" \\_?쨔\"ʾr: 9S䘏禺ᪧꄂ㲄", + [[{ + "*硙^+E쌺I1䀖ju?:⦈Ꞓl๴竣迃xKC/饉:\fl\"XTFᄄ蟭,芢<\/骡軺띜hꏘ\u001f銿<棔햳▨(궆*=乥b8\\媦䷀뫝}닶ꇭ(Kej䤑M": [{ + "1Ꮼ?>옿I╅C<ގ?ꊌ冉SV5A㢊㶆z-๎玶绢2F뵨@㉌뀌o嶔f9-庒茪珓뷳4": null, + ";lᰳ": "CbB+肻a䄷苝*/볳+/4fq=㰁h6瘉샴4铢Y骐.⌖@哼猎㦞+'gꋸ㒕ߤ㞑(䶒跲ti⑴a硂#No볔", + "t?/jE幸YHT셵⩎K!Eq糦ꗣv刴w\"l$ο:=6:移": { + "z]鑪醊嫗J-Xm銌翁絨c里됏炙Ep㣋鏣똼嚌䀓GP﹖cmf4鹭T䅿꣭姧␸wy6ꦶ;S&(}ᎧKxᾂQ|t뻳k\"d6\"|Ml췆hwLt꼼4$&8Պ褵婶鯀9": {"嵃닢ᒯ'd᧫䳳#NXe3-붋鸿ଢ떓%dK\u0013䲎ꖍYV.裸R⍉rR3蟛\\:젯:南ĺLʆ넕>|텩鴷矔ꋅⒹ{t孶㓑4_": [ + true, + null, + [ + false, + "l怨콈lᏒ", + { + "0w䲏嬧-:`䉅쉇漧\\܂yㄨb%㽄j7ᦶ涶<": 3.7899452730383747E-19, + "ꯛTẀq纤q嶏V⿣?\"g}ი艹(쥯B T騠I=仵및X": {"KX6颠+&ᅃ^f畒y[": { + "H?뱜^?꤂-⦲1a㋞&ꍃ精Ii᤾챪咽쬘唂쫷<땡劈훫놡o㥂\\ KⴙD秼F氮[{'좴:례晰Iq+I쭥_T綺砸GO煝䟪ᚪ`↹l羉q쐼D꽁ᜅ훦: vUV": true, + "u^yﳍ0㱓#[y뜌앸ꊬL㷩?蕶蘾⻍KӼ": -7931695755102841701, + "䤬轉車>\u001c鴵惋\"$쯃྆⇻n뽀G氠S坪]ಲꨍ捇Qxኻ椕駔\\9ࣼ﫻읜磡煮뺪ᶚ볝l㕆t+sζ": [[[ + true, + false, + [ + null, + 3363739578828074923, + true, + { + "\"鸣詩 볰㑵gL㯦῅춝旫}ED辗ﮈI쀤-ꧤ|㠦Z\"娑ᕸ4爏騍㣐\"]쳝Af]茛⬻싦o蚁k䢯䩐菽3廇喑ޅ": 4.5017999150704666E17, + "TYႇ7ʠ值4챳唤~Zo&ݛ": false, + "`塄J袛㭆끺㳀N㺣`꽐嶥KﯝSVᶔ∲퀠獾N딂X\"ᤏhNﬨvI": {"\u20bb㭘I䖵䰼?sw䂷쇪](泒f\"~;꼪Fԝsᝦ": {"p,'ꉂ軿=A蚶?bƉ㏵䅰諬'LYKL6B깯⋩겦뎙(ᜭ\u0006噣d꾆㗼Z;䄝䚔cd<情@䞂3苼㸲U{)<6&ꩻ钛\u001au〷N숨囖愙j=BXW욕^x芜堏Ῑ爂뛷꒻t✘Q\b": [[ + "籛&ଃ䩹.ꃩ㦔\\C颫#暪&!勹ꇶ놽攺J堬镙~軌C'꾖䣹㮅岃ᙴ鵣", + 4.317829988264744E15, + 6.013585322002147E-20, + false, + true, + null, + null, + -3.084633632357326E-20, + false, + null, + { + "\"짫愔昻 X\"藣j\"\"먁ཅѻ㘤㬯0晲DU꟒㸃d벀윒l䦾c੻*3": null, + "谈Wm陧阦咟ฯ歖擓N喴㋐銭rCCnVࢥ^♼Ⅾ젲씗刊S༝+_t赔\\b䚍뉨ꬫ6펛cL䊘᜼<\/澤pF懽&H": [ + null, + { + "W\"HDUuΌ퀟M'P4࿰H똆ⰱﮯ<\/凐蘲\"C鴫ﭒж}ꭩ쥾t5yd诪ﮡ퍉ⴰ@?氐醳rj4I6Qt": 6.9090159359219891E17, + "絛ﳛ⺂": {"諰P㗮聦`ZQ?ꫦh*റcb⧱}埌茥h{棩렛툽o3钛5鮁l7Q榛6_g)ὄ\u0013kj뤬^爖eO4Ⱈ槞鉨ͺ订%qX0T썗嫷$?\\\"봅늆'%": [ + -2.348150870600346E-19, + [[ + true, + -6619392047819511778, + false, + [[ + -1.2929189982356161E-20, + 1.7417192219309838E-19, + {"?嵲2࿐2\u0001啑㷳c縯": [ + null, + [ + false, + true, + 2578060295690793218, + { + "?\"殃呎#㑑F": true, + "}F炊_殛oU헢兔Ꝉ,赭9703.B数gTz3⏬": { + "5&t3,햓Mݸᵣ㴵;꣫䩍↳#@뫷䠅+W-ࣇzᓃ鿕ಔ梭?T䮑ꥬ旴]u뫵막bB讍:왳둛lEh=숾鱠p咐$짏#?g⹷ᗊv㷵.斈u頻\u0018-G.": "뽙m-ouࣤ஫牷\"`Ksꕞ筼3HlȨvC堈\"I]㖡玎r먞#'W賜鴇k'c룼髋䆿飉㗆xg巤9;芔cጐ/ax䊨♢큓r吓㸫೼䢗da᩾\"]屣`", + ":M딪<䢥喠\u0013㖅x9蕐㑂XO]f*Q呰瞊吭VP@9,㨣 D\\穎vˤƩs㜂-曱唅L걬/롬j㈹EB8g<\/섩o渀\"u0y&룣": ">氍緩L/䕑돯Ꟙ蕞^aB뒣+0jK⪄瑨痜LXK^힦1qK{淚t츔X:Vm{2r獁B뾄H첚7氥?쉟䨗ꠂv팳圎踁齀\\", + "D彤5㢷Gꪻ[lㄆ@὜⓰絳[ଃ獽쮹☒[*0ꑚ㜳": 9022717159376231865, + "ҖaV銣tW+$魿\u20c3亜~뫡ᙰ禿쨽㏡fṼzE/h": "5臐㋇Ჯ쮺? 昨탰Wム밎#'\"崲钅U?幫뺀⍾@4kh>騧\\0ҾEV=爐͌U捀%ꉼ 㮋<{j]{R>:gԩL\u001c瀈锌ﯲﳡꚒ'⫿E4暍㌗뵉X\"H᝜", + "ᱚגּ;s醒}犍SἿ㦣&{T$jkB\\\tḮ앾䤹o<避(tW": "vb⯽䴪䮢@|)", + "⥒퐁껉%惀뗌+녣迺顀q條g⚯i⤭룐M琹j̈́⽜A": -8385214638503106917, + "逨ꊶZ<\/W⫟솪㎮ᘇb?ꠔi\"H㧺x෷韒Xꫨฟ|]窽\u001a熑}Agn?Mᶖa9韲4$3Ỵ^=쏍煤ፐ돷2䣃%鷠/eQ9頸쥎", + 2398360204813891033, + false, + 3.2658897259932633E-19, + null, + "?ꚃ8Nn㞷幵d䲳䱲뀙ꪛQ瑓鎴]䩋-鰾捡䳡??掊", + false, + -1309779089385483661, + "ᦲxu_/yecR.6芏.ᜇ過 ~", + -5658779764160586501, + "쒌:曠=l썜䢜wk#s蕚\"互㮉m䉤~0듐䋙#G;h숄옥顇෤勹(C7㢅雚㐯L⠅VV簅<", + null, + -4.664877097240962E18, + -4.1931322262828017E18, + { + ",": { + "v㮟麑䄠뤵g{M띮.\u001bzt뢜뵡0Ǥ龍떟Ᾰ怷ϓRT@Lꀌ樂U㏠⾕e扉|bJg(뵒㠶唺~ꂿ(땉x⻫싉쁊;%0鎻V(o\f,N鏊%nk郼螺": -1.73631993428376141E18, + "쟧摑繮Q@Rᕾ㭚㾣4隅待㓎3蒟": [ + 4971487283312058201, + 8973067552274458613, + { + "`a揙ᣗ\u0015iBo¸": 4.3236479112537999E18, + "HW&퉡ぁ圍Y?瑡Qy훍q!帰敏s舠㫸zꚗaS歲v`G株巷Jp6킼 (귶鍔⾏⡈>M汐㞍ቴ꙲dv@i㳓ᇆ?黍": [ + null, + 4997607199327183467, + "E㻎蠫ᐾ高䙟蘬洼旾﫠텛㇛?'M$㣒蔸=A_亀绉앭rN帮", + null, + [{ + "Eᑞ)8餧A5u&㗾q?": [ + -1.969987519306507E-19, + null, + [ + 3.42437673373841E-20, + true, + "e걷M墁\"割P␛퍧厀R䱜3ﻴO퓫r﹉⹊", + [ + -8164221302779285367, + [ + true, + null, + "爘y^-?蘞Ⲽꪓa␅ꍨ}I", + 1.4645984996724427E-19, + [{ + "tY좗⧑mrzﺝ㿥ⴖ᥷j諅\u0000q賋譁Ꞅ⮱S\nࡣB/큃굪3Zɑ复o<\/;롋": null, + "彟h浠_|V4䦭Dᙣ♞u쿻=삮㍦\u001e哀鬌": [{"6횣楠,qʎꗇ鎆빙]㱭R굋鈌%栲j分僅ペ䇰w폦p蛃N溈ꡐꏀ?@(GI뉬$ﮄ9誁ꓚ2e甸ڋ[䁺,\u0011\u001cࢃ=\\+衪䷨ᯕ鬸K": [[ + "ㅩ拏鈩勥\u000etgWVXs陂規p狵w퓼{뮵_i\u0002ퟑႢ⬐d6鋫F~챿搟\u0096䚼1ۼ칥0꣯儏=鋷牋ⅈꍞ龐", + -7283717290969427831, + true, + [ + 4911644391234541055, + { + "I鈒첽P릜朸W徨觘-Hᎄ퐟⓺>8kr1{겵䍃〛ᬡ̨O귑o䝕'쿡鉕p5": "fv粖RN瞖蛐a?q꤄\u001d⸥}'ꣴ犿ꦼ?뤋?鵆쥴덋䡫s矷̄?ඣ/;괱絢oWfV<\/\u202cC,㖦0䑾%n賹g&T;|lj_欂N4w", + "짨䠗;䌕u i+r๏0": [{"9䥁\\఩8\"馇z䇔<\/ႡY3e狚쐡\"ุ6ﰆZ遖c\"Ll:ꮾ疣<\/᭙O◌납୕湞9⡳Und㫜\u0018^4pj1;䧐儂䗷ୗ>@e톬": { + "a⑂F鋻Q螰'<퇽Q贝瀧{ᘪ,cP&~䮃Z?gI彃": [ + -1.69158726118025933E18, + [ + "궂z簽㔛㮨瘥⤜䛖Gℤ逆Y⪾j08Sn昞ꘔ캻禀鴚P謦b{ꓮmN靐Mᥙ5\"睏2냑I\u0011.L&=?6ᄠ뻷X鸌t刑\"#z)o꫚n쳟줋", + null, + 7517598198523963704, + "ኑQp襟`uᩄr方]*F48ꔵn俺ሙ9뇒", + null, + null, + 6645782462773449868, + 1219168146640438184, + null, + { + ")ယ넌竀Sd䰾zq⫣⏌ʥ\u0010ΐ' |磪&p牢蔑mV蘸૰짬꺵;K": [ + -7.539062290108008E-20, + [ + true, + false, + null, + true, + 6574577753576444630, + [[ + 1.2760162530699766E-19, + [ + null, + [ + "顊\\憎zXB,", + [{ + "㇆{CVC9-MN㜋ઘR눽#{h@ퟨ!鼚׼XOvXS\u0017ᝣ=cS+梽៲綆16s덽휐y屬?ᇳG2ᴭ\u00054쫖y룇nKcW̭炦s/鰘ᬽ?J|퓀髣n勌\u0010홠P>j": false, + "箴": [ + false, + "鍞j\"ꮾ*엇칬瘫xṬ⭽쩁䃳\"-⋵?ᦽ댎Ĝ": true, + "Pg帯佃籛n㔠⭹࠳뷏≻࿟3㞱!-쒾!}쭪䃕!籿n涻J5ਲ਼yvy;Rኂ%ᔡጀ裃;M⣼)쵂쑈": 1.80447711803435366E18, + "ꈑC⡂ᑆ㤉壂뎃Xub<\/쀆༈憓ق쨐ק\\": [ + 7706977185172797197, + {"": {"K╥踮砆NWࡆFy韣7ä밥{|紒︧䃀榫rᩛꦡTSy잺iH8}ퟴ,M?Ʂ勺ᴹ@T@~꾂=I㙕뾰_涀쑜嫴曣8IY?ҿo줫fऒ}\\S\"ᦨ뵼#nDX": { + "♘k6?଱癫d68?㽚乳䬳-V顷\u0005蝕?\u0018䞊V{邾zじl]雏k臤~ൖH뒐iꢥ]g?.G碄懺䔛pR$䅒X觨l봜A刊8R梒',}u邩퉕?;91Ea䈈믁G⊶芔h袪&廣㺄j;㡏綽\u001bN頸쳘橆": -2272208444812560733, + "拑Wﵚj鵼駳Oࣿ)#㾅顂N傓纝y僱栜'Bꐍ-!KF*ꭇK¦?䈴^:啤wG逭w᧯": "xᣱmYe1ۏ@霄F$ě꧘푫O䤕퀐Pq52憬ꀜ兴㑗ᡚ?L鷝ퟐ뭐zJꑙ}╆ᅨJB]\"袌㺲u8䯆f", + "꿽၅㔂긱Ǧ?SI": -1669030251960539193, + "쇝ɨ`!葎>瞺瘡驷錶❤ﻮ酜=": -6961311505642101651, + "?f7♄꫄Jᡔ훮e읇퍾፣䭴KhखT;Qty}O\\|뫁IῒNe(5惁ꥶㆷY9ﮡ\\ oy⭖-䆩婁m#x봉>Y鈕E疣s驇↙ᙰm<": {"퉻:dꂁ&efᅫ쫢[\"돈늖꺙|Ô剐1͖-K:ʚ᭕/;쏖㷛]I痐职4gZ4⍜kเꛘZ⥺\\Bʫᇩ鄨魢弞&幟ᓮ2̊盜", + -9006004849098116748, + -3118404930403695681, + { + "_彃Y艘-\"Xx㤩㳷瑃?%2䐡鵛o귵옔夘v*탋职&㳈챗|O钧": [ + false, + "daꧺdᗹ羞쯧H㍤鄳頳<型孒ン냆㹀f4㹰\u000f|C*ሟ鰠(O<ꨭ峹ipຠ*y೧4VQ蔔hV淬{?ᵌEfrI_", + "j;ꗣ밷邍副]ᗓ", + -4299029053086432759, + -5610837526958786727, + [ + null, + [ + -1.3958390678662759E-19, + { + "lh좈T_믝Y\"伨\u001cꔌG爔겕ꫳ晚踍⿻읐T䯎]~e#฽燇\"5hٔ嶰`泯r;ᗜ쮪Q):/t筑,榄&5懶뎫狝(": [{ + "2ፁⓛ]r3C攟וּ9賵s⛔6'ஂ|\"ⵈ鶆䐹禝3\"痰ࢤ霏䵩옆䌀?栕r7O簂Isd?K᫜`^讶}z8?z얰T:X倫⨎ꑹ": -6731128077618251511, + "|︦僰~m漿햭\\Y1'Vvخ굇ቍ챢c趖": [null] + }], + "虌魿閆5⛔煊뎰㞤ᗴꥰF䮥蘦䂪樳-K᝷-(^\u20dd_": 2.11318679791770592E17 + } + ] + ] + ]}, + "묗E䀳㧯᳀逞GMc\b墹㓄끖Ơ&U??펌鑍 媋k))ᄊ": null, + "묥7콽벼諌J_DɯﮪM殴䣏,煚ྼ`Y:씧<\/⩫%yf䦀!1Ჶk춎Q米W∠WC跉鬽*ᛱi㴕L꘻ꀏ쓪\"_g鿄'#t⽙?,Wg㥖|D鑆e⥏쪸僬h鯔咼ඡ;4TK聎졠嫞" + } + ] + ] + } + ] + ] + ]}} + } + ]} + }, + "뿋뀾淣截䔲踀&XJ펖꙯^Xb訅ꫥgᬐ>棟S\"혧騾밫겁7-": "擹8C憎W\"쵮yR뢩浗絆䠣簿9䏈引Wcy䤶孖ꯥ;퐌]輩䍐3@{叝 뽸0ᡈ쵡Ⲇ\u001dL匁꧐2F~ݕ㪂@W^靽L襒ᦘ~沦zZ棸!꒲栬R" + } + ] + ], + "Z:덃൛5Iz찇䅄駠㭧蓡K1": "e8᧤좱U%?ⵇ䯿鿝\u0013縮R∱骒EO\u000fg?幤@֗퉙vU`", + "䐃쪈埽້=Ij,쭗쓇చ": false + }]}} + ] + } + ]} + } + ] + ] + ], + "咰긖VM]᝼6䓑쇎琺etDҌ?㞏ꩄ퇫밉gj8蠃\"⩐5䛹1ࣚ㵪": "ക蹊?⎲⧘⾚̀I#\"䈈⦞돷`wo窭戕෱휾䃼)앷嵃꾞稧,Ⴆ윧9S?೗EMk3Მ3+e{⹔Te驨7䵒?타Ulg悳o43" + } + ], + "zQᤚ纂땺6#ٽ﹧v￿#ࠫ휊冟蹧텈ꃊʆ?&a䥯De潝|쿓pt瓞㭻啹^盚2Ꝋf醪,얏T窧\\Di䕎谄nn父ꋊE": -2914269627845628872, + "䉩跐|㨻ᷢ㝉B{蓧瞸`I!℄욃힕#ೲᙾ竛ᔺCjk췒늕貭词\u0017署?W딚%(pꍁ⤼띳^=on뺲l䆼bzrﳨ[&j狸䠠=ᜑꦦ\u2061յnj=牲攑)M\\龏": false, + "뎕y絬᫡⥮Ϙᯑ㌔/NF*˓.,QEzvK!Iwz?|쥾\"ꩻL꼗Bꔧ賴緜s뉣隤茛>ロ?(?^`>冺飒=噸泥⺭Ᲊ婓鎔븜z^坷裮êⓅ໗jM7ﶕ找\\O": 1.376745434746303E-19 + }, + "䐛r滖w㏤,|Nዜ": false + } + ]], + "@꿙?薕尬 gd晆(띄5躕ﻫS蔺4)떒錸瓍?~": 1665108992286702624, + "w믍nᏠ=`঺ᅥC>'從됐槷䤝眷螄㎻揰扰XᅧC贽uჍ낟jKD03T!lDV쀉Ӊy뢖,袛!终캨G?鉮Q)⑗1쾅庅O4ꁉH7?d\u0010蠈줘월ސ粯Q!낇껉6텝|{": null, + "~˷jg쿤촖쉯y": -5.5527605669177098E18, + "펅Wᶺzꐆと푭e?4j仪열[D<鈑皶婆䵽ehS?袪;HꍨM뗎ば[(嗏M3q퍟g4y╸鰧茀[Bi盤~﫝唎鋆彺⦊q?B4쉓癚O洙킋툈䶯_?ퟲ": null + } + ] + ]] + ]], + "꟱Ԕ㍤7曁聯ಃ錐V䷰?v㪃૦~K\"$%请|ꇹn\"k䫛㏨鲨\u2023䄢\u0004[︊VJ?䶟ាꮈ䗱=깘U빩": -4863152493797013264 + } + ]}]} + ] + }}} + ], + "쏷쐲۹퉃~aE唙a챑,9㮹gLHd'䔏|킗㍞䎥&KZYT맵7䥺Nⱳ同莞鿧w\\༌疣n/+ꎥU\"封랾○ퟙAJᭌ?9䛝$?驔9讐짘魡T֯c藳`虉C읇쐦T" + } + ], + "谶개gTR￐>ၵ͚dt晑䉇陏滺}9㉸P漄": -3350307268584339381 + }] + ] + ] + ]] + ] + ], + "0y꟭馋X뱔瑇:䌚￐廿jg-懲鸭䷭垤㒬茭u賚찶ಽ+\\mT땱\u20821殑㐄J쩩䭛ꬿNS潔*d\\X,壠뒦e殟%LxG9:摸": 3737064585881894882, + "풵O^-⧧ⅶvѪ8廸鉵㈉ר↝Q㿴뺟EႳvNM:磇>w/៻唎뷭୥!냹D䯙i뵱貁C#⼉NH6`柴ʗ#\\!2䂗Ⱨf?諳.P덈-返I꘶6?8ꐘ": -8934657287877777844, + "溎-蘍寃i诖ര\"汵\"\ftl,?d⼡쾪⺋h匱[,෩I8MҧF{k瓿PA'橸ꩯ綷퉲翓": null + } + ] + ], + "ោ係؁<元": 1.7926963090826924E-18 + }}] + } + ] + ]]}] + }] + ] + ] + ] + ], + "ጩV<\"ڸsOᤘ": 2.0527167903723048E-19 + }] + ]} + ] + ]], + "∳㙰3젴p᧗䱙?`yZA8Ez0,^ᙛ4_0븢\u001ft:~䎼s.bb룦明yNP8弆C偯;⪾짍'蕴뮛": -6976654157771105701, + "큵ꦀ\\㇑:nv+뒤燻䀪ﴣ﷍9ᚈ኷K㚊誦撪䚛,ꮪxሲ쳊\u0005HSf?asg昱dqꬌVꙇ㼺'k*'㈈": -5.937042203633044E-20 + } + ] + }], + "?}\u20e0],s嶳菋@#2u쒴sQS䩗=ꥮ;烌,|ꘔ䘆": "ᅩ영N璠kZ먕眻?2ቲ芋眑D륟渂⸑ﴃIRE]啗`K'" + }}, + "쨀jmV賂ﰊ姐䂦玞㬙ᏪM᪟Վ씜~`uOn*ॠ8\u000ef6??\\@/?9見d筜ﳋB|S䝬葫㽁o": true + }, + "즛ꄤ酳艚␂㺘봿㎨iG৕ࡿ?1\"䘓您\u001fSኝ⺿溏zៀ뻤B\u0019?윐a䳵᭱䉺膷d:<\/": 3935553551038864272 + } + ] + ]} + ]] + ]] + ]} + } + ] + } + ]]}}, + "᥺3h↛!ꋰy\"攜(ெl䪕oUkc1A㘞ᡲ촾ᣫ<\/䒌E㛝潨i{v?W౾H\\RჅpz蝬R脾;v:碽✘↯삞鷱o㸧瑠jcmK7㶧뾥찲n": true, + "ⶸ?x䊺⬝-䰅≁!e쩆2ꎿ准G踌XXᩯ1߁}0?.헀Z馟;稄\baDꟹ{-寪⚈ꉷ鮸_L7ƽᾚ<\u001bጨA䧆송뇵⨔\\礍뗔d设룱㶉cq{HyぱR㥽吢ſtp": -7985372423148569301, + "緫#콮IB6<\/=5Eh礹\t8럭@饹韠r㰛斣$甝LV췐a갵'请o0g:^": "䔨(.", + "띳℡圤pン௄ĝ倧訜B쁟G䙔\"Sb⓮;$$▏S1J뢙SF|赡g*\"Vu䲌y": "䪈&틐),\\kT鬜1풥;뷴'Zေ䩹@J鞽NぼM?坥eWb6榀ƩZڮ淽⺞삳煳xჿ絯8eⶍ羷V}ჿ쎱䄫R뱃9Z>'\u20f1ⓕ䏜齮" + } + ] + ]]] + }} + } + ] + ]}, + "펮b.h粔폯2npX詫g錰鷇㇒<쐙S値bBi@?镬矉`剔}c2壧ଭfhY깨R()痩⺃a\\⍔?M&ﯟ<劜꺄멊ᄟA\"_=": null + }, + "~潹Rqn榢㆓aR鬨侅?䜑亡V_翅㭔(䓷w劸ၳDp䀅<\/ﰎ鶊m䵱팱긽ꆘ긓准D3掱;o:_ќ)껚콥8곤d矦8nP倥ꃸI": null, + "뾎/Q㣩㫸벯➡㠦◕挮a鶧⋓偼\u00001뱓fm覞n?㛅\"": 2.8515592202045408E17 + }], + ",": -5426918750465854828, + "2櫫@0柡g䢻/gꆑ6演&D稒肩Y?艘/놘p{f투`飷ᒉ챻돎<늛䘍ﴡ줰쫄": false, + "8(鸑嵀⵹ퟡ<9㣎Tߗ┘d슒ل蘯&㠦뮮eࠍk砝g 엻": false, + "d-\u208b?0ﳮ嵙'(J`蔿d^踅⤔榥\\J⵲v7": 6.8002426206715341E17, + "ཎ耰큓ꐕ㱷\u0013y=詽I\"盈xm{0쾽倻䉚ષso#鰑/8㸴짯%ꀄ떸b츟*\\鲷礬ZQ兩?np㋄椂榨kc᡹醅3": false, + "싊j20": false + }]] + ]], + "俛\u0017n緽Tu뫉蜍鼟烬.ꭠIⰓ\"Ἀ᜾uC쎆J@古%ꛍm뻨ᾀ画蛐휃T:錖㑸ዚ9죡$": true + } + ] + ], + "㍵⇘ꦖ辈s}㱮慀밒s`\"㞟j:`i픻Z섫^諎0Ok{켿歁෣胰a2﨤[탳뚬쎼嫭뉮m": 409440660915023105, + "w墄#*ᢄ峠밮jLa`ㆪ꺊漓Lで끎!Agk'ꁛ뢃㯐岬D#㒦": false, + "ଦPGI䕺L몥罭ꃑ궩﮶#⮈ᢓӢ䚬p7웼臧%~S菠␌힀6&t䳙y㪘냏\\*;鉏ᅧ鿵'嗕pa\"oL쇿꬈Cg": "㶽1灸D⟸䴅ᆤ뉎﷛渤csx 䝔цꬃ锚捬?ຽ+x~꘩uI࡞\u0007栲5呚ẓem?袝\")=㥴䨃pac!/揎Y", + "ᷱo\\||뎂몷r篙|#X䦜I#딌媸픕叞RD斳X4t⯩夬=[뭲r=绥jh뷱츝⪘%]⚋܈㖴スH텹m(WO曝劉0~K3c柢Ր㏉着逳~": false, + "煽_qb[첑\\륌wE❽ZtCNﭝ+餌ᕜOꛭ": "{ﳾ쉌&s惧ᭁⵆ3䢫;䨞팑꒪흘褀࢖Q䠿V5뭀䎂澻%받u5텸oA⮥U㎦;B䳌wz䕙$ឿ\\௅婺돵⪾퐆\\`Kyौꋟ._\u0006L챯l뇠Hi䧈偒5", + "艊佁ࣃ롇䱠爬!*;⨣捎慓q靓|儑ᨋL+迥=6㒺딉6弄3辅J-㕎뛄듘SG㆛(\noAzQꝱ䰩X*ぢO퀌%펠낌mo틮a^<\/F&_눊ᾉ㨦ы4\"8H": 2974648459619059400, + "鬙@뎣䫳ၮ끡?){y?5K;TA*k溱䫜J汃ꂯ싔썍\u001dA}룖(<\/^,": false, + "몏@QꋦFꊩᒐ뎶lXl垨4^郣|ꮇ;䝴ᝓ}쵲z珖": null + } + ]]]], + ":_=닧弗D䙋暨鏛. 㱻붘䂍J儒&ZK/녩䪜r囁⽯D喠죥7⹌䪥c\u001a\u2076￞妈朹oLk菮F౟覛쐧㮏7T;}蛙2{9\"崓bB<\/⡷룀;즮鿹)丒툃୤뷠5W⊢嶜(fb뭳갣": "E{响1WM" + }}, + "䘨tjJ驳豨?y輊M*᳑梵瞻઻ofQG瑮e": 2.222802939724948E-19, + "䮴=❑➶T෋w䞜\"垦ꃼUt\u001dx;B$뵣䙶E↌艣ᡥ!᧟;䱀[䔯k쬃`੍8饙른熏'2_'袻tGf蒭J땟as꯳╖&啒zWࡇᒫYSᏬ\u0014ℑ첥鈤|cG~Pᓮ\">\"": "ႆl\f7V儊㦬nHꄬꨧC{쐢~C⮃⛓嶦vꄎ1w鰠嘩뿠魄&\"_qMⵖ釔녮ꝇ 㝚{糍J哋 cv?-jkﻯྌ鹑L舟r", + "龧葆yB✱H盋夔ﶉ?n*0(": "ꧣኆ㢓氥qZZ酒ຜ)鮢樛)X䣆gTSґG텞k.J圬疝롫쯭z L:\\ྤ@w炋塜쿖ᾳy뢀䶃뱝N䥨㚔勇겁#p", + "도畎Q娡\"@S/뼋:䵏!P衅촚fVHQs✜ᐫi㻑殡B䜇%믚k*U#濨낄~": "ꍟዕ쳸ꍈ敋&l妏\u0005憡멗瘌uPgᅪm<\/To쯬锩h뒓k" + } + ] + }], + "墥홞r绚<\/⸹ⰃB}<躅\\Y;๑@䔸>韫䜲뱀X뗩鿥쩗SI%ﴞ㳕䛇?<\/\u00018x\\&侂9鋙a[LR㋭W胕)⡿8㞙0JF,}?허d1cDMᐃ␛鄝ⱕ%X)!XQ": "ⳍꗳ=橇a;3t⦾꼑仈ူaᚯ⯋ꕃAs鴷N⍕_䎃ꙎAz\u0016䯷\\<࿫>8q{}キ?ᣰ}'0ᴕ펓B┦lF#趤厃T?㕊#撹圂䆲" + }, + "܋닐龫論c웑": false, + "ㇿ/q\"6-co髨휝C큦#\u001b4~?3䐹E삇<<": 7.600917488140322E-20, + "䁝E6?㣖ꃁ间t祗*鑠{ḣV(浾h逇큞=W?ૉ?nꇽ8ꅉຉj으쮺@Ꚅ㰤u]Oyr": "v≁᫸_*όAඤԆl)ۓᦇQ}폠z༏q滚", + "ソ᥊/넺I": true + }]] + ] + ] + ] + ]] + }, + "䭑Ik攑\u0002QV烄:芩.麑㟴㘨≕": true, + "坄꿕C쇻풉~崍%碼\\8\"䬦꣙": null, + "欌L圬䅘Y8c(♺2?ON}o椳s宥2䉀eJ%闹r冁O^K諭%凞⺉⡻,掜?$ꥉ?略焕찳㯊艼誜4?\"﯎<゛XፈINT:詓 +": -1.0750456770694562E-19, + "獒àc뜭싼ﺳ뎤K`]p隨LtE": null, + "甙8䵊神EIꩤ鐯ᢀ,ﵮU䝑u疒ử驺䚿≚ഋ梶秓F`覤譐#짾蔀묊4<媍쬦靪_Yzgcࡶ4k紥`kc[Lﮗ簐*I瀑[⾰L殽鑥_mGȠ<\/|囹灠g桰iri": true, + "챓ꖙꟻ좝菇ou,嗠0\\jK핻뜠qwQ?ഩ㼕3Y彦b\u009bJ榶N棨f?됦鏖綃6鳵M[OE봨u햏.Ꮁ癜蟳뽲ꩌ뻾rM豈R嗀羫 uDꎚ%": null + }, + "V傜2<": 7175127699521359521 + }], + "铫aG切<\/\"ী⊆e<^g࢛)D顝nאַ饼\u008c猪繩嵿ﱚCꡬ㻊g엺A엦\u000f暿_f꿤볝㦕桦`蒦䎔j甬%岝rj 糏": "䚢偎눴Au<4箞7礦Iﱔ坠eȧ䪸u䵁p|逹$嗫쨘ꖾ﷐!胠z寓팢^㨔|u8Nሇe텔ꅦ抷]،鹎㳁#༔繁 ", + "낂乕ꃻ볨ϱ-ꇋ㖍fs⿫)zꜦ/K?솞♞ꑌ宭hJ᤭瑥Fu": false, + "쟰ぜ魛G\u0003u?`㾕ℾ㣭5螠烶這趩ꖢ:@咕ꐶx뒘느m䰨b痃렐0鳊喵熬딃$摉_~7*ⱦ녯1錾GKhJ惎秴6'H妈Tᧅ窹㺒疄矤铟wላ": null, + "쯆q4!3錕㲏ⵆ㇛꘷Z瑩뭆\\◪NH\u001d\\㽰U~㯶<\"쑣낞3ᵤ'峉eꢬ;鬹o꣒木X*長PXᘱu\"䠹n惞": null, + "ᅸ祊\"&ꥴCjࢼ﴿?䡉`U效5殼㮞V昽ꏪ#ﺸ\\&t6x꠹盥꣰a[\u001aꪍSpe鎿蠹": -1.1564713893659811E-19 + } + ]] + ] + ] + ], + "羵䥳H,6ⱎ겾|@t\"#햊1|稃 섭)띜=뻔ꡜ???櫎~*ῡ꫌/繣ﻠq": null + } + ]} + ]}, + "츤": false + }}, + "s": 3.7339341963399598E18 + } + ], + "N,I?1+㢓|ࣱ嶃쩥V2\u0012(4EE虪朶$|w颇v步": "~읢~_,Mzr㐫YB溓E淚\"ⅹ䈔ᏺ抙 b,nt5V㐒J檶ꏨ⻔?", + "Q껑ꡡ}$넎qH煔惍/ez^!ẳF댙䝌馻剁8": "梲;yt钰$i冄}AL%a j뜐奷걳뚾d꿽*ሬuDY3?뮟鼯뮟w㍪틱V", + "o{Q/K O胟㍏zUdꀐm&⨺J舕⾏魸訟㌥[T籨櫉唐킝 aṭ뱫촙莛>碶覆⧬짙쭰ׯdAiH໥벤퐥_恸[ 0e:죃TC弼荎뵁DA:w唵ꣁ": null, + "὏樎䵮軧|?౗aWH쩃1 ꅭsu": null + } + ] + }, + "勂\\&m鰈J釮=Ⲽ鳋+䂡郑": null, + "殣b綊倶5㥗惢⳷萢ᑀ䬄镧M^ﱴ3⣢翣n櫻1㨵}ኯ뗙顖Z.Q➷ꮨ뗇\u0004": "ꔙ䁼>n^[GीA䨟AM琢ᒊS쨲w?d㶣젊嘶纝麓+愣a%気ྞSc됓ᔘ:8bM7Xd8㶑臌]Ꙥ0ꐭ쒙䫣挵C薽Dfⵃ떼᷸", + "?紡.셪_෨j\u0013Ox┠$Xᶨ-ᅇo薹-}軫;y毝㪜K㣁?.EV쮱4둽⛻䤜'2盡\u001f60(|e쐰㼎ᦀ㒧-$l@ﻑ坳\u0003䭱响巗WFo5c㧆T턁Y맸♤(": -2.50917882560589088E17 + }} + ], + "侸\\릩.᳠뎠狣살cs项䭩畳H1s瀉븇19?.w骴崖㤊h痠볭㞳㞳䁮Ql怠㦵": "@䟴-=7f", + "鹟1x௢+d ;vi䭴FSDS\u0004hꎹ㚍?⒍⦏ў6u,扩@됷Su)Pag휛TᒗV痩!瞏釀ꖞ蘥&ೞ蘐ꭰꞇᝎ": "ah懱Ժ&\u20f7䵅♎඀䞧鿪굛ౕ湚粎蚵ᯋ幌YOE)५襦㊝Y*^\"R+ඈ咷蝶9ꥂ榨艦멎헦閝돶v좛咊E)K㓷ྭr", + "搆q쮦4綱켙셁.f4<\/g<籽늷?#蚴픘:fF\u00051㹉뀭.ᰖ풎f֦Hv蔎㧤.!䭽=鞽]음H:?\"-4": 8.740133984938656E-20 + }]} + } + ], + "tVKn딩꘥⊾蹓᤹{\u0003lR꼽ᄲQFᅏ傅ﱋ猢⤊ᔁ,E㓒秤nTතv`♛I\u0000]꫔ṞD\"麵c踝杰X&濿또꣹깳౥葂鿎\\aꡨ?": 3900062609292104525 + } + ], + "ਉ샒⊩Lu@S䧰^g": -1.1487677090371648E18, + "⎢k⑊꬗yᏫ7^err糎Dt\u000bJ礯확ㆍ沑サꋽe赔㝢^J\u0004笲㿋idra剰-᪉C錇/Ĝ䂾ညS지?~콮gR敉⬹'䧭": 1901472137232418266, + "灗k䶥:?촽贍쓉꓈㒸g獘[뵎\\胕?\u0014_榙p.j稶,$`糉妋0>Fᡰly㘽$?": "]ꙛO赎&#㠃돱剳\"<◆>0誉齐_|z|裵씪>ᐌ㼍\"Z[琕}O?G뚇諦cs⠜撺5cu痑U圲\u001c?鴴計l춥/╓哼䄗茏ꮅ뫈댽A돌롖뤫V窗讬sHd&\nOi;_u" + } + ], + "Uﺗ\\Y\\梷䄬~\u0002": null, + "k\"Y磓ᗔ휎@U冈<\/w컑)[": false, + "曏J蝷⌻덦\u001f㙳s꥓⍟邫P늮쥄c∬ྡྷ舆렮칤Z趣5콡넛A쳨\\뀙骫(棻.*&輛LiIfi{@EA婳KᬰTXT": -4.3088230431977587E17 + }]} + ] + ], + "곃㲧<\/dఓꂟs其ࡧ&N葶=?c㠤Ჴ'횠숄臼#\u001a~": false + } + ] + ]}] + }] + }} + ], + "2f`⽰E쵟>J笂裭!〛觬囀ۺ쟰#桊l鹛ⲋ|RA_Vx፭gE됓h﵀mfỐ|?juTU档[d⢼⺻p濚7E峿": 5613688852456817133 + }, + "濘끶g忮7㏵殬W팕Q曁 뫰)惃廊5%-蹚zYZ樭ﴷQ锘쯤崫gg": true, + "絥ᇑ⦏쒓븣爚H.㗊߄o蘵貆ꂚ(쎔O᥉ﮓ]姨Wꁓ!RMA|o퉢THx轮7M껁U즨'i뾘舯o": "跥f꜃?" + }} + ], + "鷰鹮K-9k;ﰰ?_ݦѷ-ꅣ䩨Zꥱ\"mꠟ屎/콑Y╘2&鸞脇㏢ꀇ࠺ⰼ拾喭틮L꽩bt俸墶 [l/웄\"꾦\u20d3iও-&+\u000fQ+໱뵞": -1.296494662286671E-19 + }, + "HX੹/⨇୕붷Uﮘ旧\\쾜͔3l鄈磣糂̖䟎Eᐳw橖b῀_딕hu葰窳闹вU颵|染H죶.fP䗮:j䫢\\b뎖i燕ꜚG⮠W-≚뉗l趕": "ଊ칭Oa᡺$IV㷧L\u0019脴셀붿餲햪$迳向쐯켂PqfT\" ?I屉鴼쿕@硙z^鏕㊵M}㚛T젣쓌-W⩐-g%⺵<뮱~빅╴瑿浂脬\u0005왦燲4Ⴭb|D堧 <\/oEQh", + "䘶#㥘੐캔f巋ἡAJ䢚쭈ࣨ뫒*mᇊK,ࣺAꑱ\u000bR<\/A\"1a6鵌㯀bh곿w(\"$ꘁ*rಐ趣.d࿩k/抶면䒎9W⊃9": "漩b挋Sw藎\u0000", + "畀e㨼mK꙼HglKb,\"'䤜": null + }]}] + ] + ] + }] + ]} + ] + ]} + ], + "歙>駿ꣂ숰Q`J΋方樛(d鱾뼣(뫖턭\u20f9lচ9歌8o]8윶l얶?镖G摄탗6폋폵+g:䱫홊<멀뀿/س|ꭺs걐跶稚W々c㫣⎖": "㣮蔊깚Cꓔ舊|XRf遻㆚︆'쾉췝\\&言", + "殭\"cށɨꝙ䞘:嬮e潽Y펪㳅/\"O@ࠗ겴]췖YǞ(t>R\"N?梳LD恭=n氯T豰2R諸#N}*灧4}㶊G䍣b얚": null, + "襞<\/啧 B|싞W瓇)6簭鼡艆lN쩝`|펭佡\\間邝[z릶&쭟愱ꅅ\\T᰽1鯯偐栈4̸s윜R7⒝/똽?치X": "⏊躖Cﱰ2Qẫ脐&இ?%냝悊", + ",鰧偵셣싹xᎹ힨᯳EṬH㹖9": -4604276727380542356 + } + } + ]]]], + "웺㚑xs}q䭵䪠馯8?LB犯zK'os䚛HZ\"L?셎s^㿧㴘Cv2": null + }] + ] + ] + ], + "Kd2Kv+|z": 7367845130646124107, + "ᦂⶨ?ᝢ 祂些ഷ牢㋇操\"腭䙾㖪\\(y4cE뽺ㆷ쫺ᔖ%zfۻ$ў1柦,㶢9r漢": -3.133230960444846E-20, + "琘M焀q%㢟f鸯O⣏蓑맕鯊$O噷|)z褫^㢦⠮ꚯ꫞`毕1qꢚ{ĭ䎀বώT\"뱘3G൴?^^of": null + } + ], + "a8V᯺?:ﺃ/8ꉿBq|9啓댚;*i2": null, + "cpT瀇H珰Ừpೃi鎪Rr␣숬-鹸ҩ䠚z脚цGoN8入y%趌I┽2ឪЀiJNcN)槣/▟6S숆牟\"箑X僛G殱娇葱T%杻:J諹昰qV쨰": 8331037591040855245 + }], + "G5ᩜ䄗巢껳": true + } + }, + "Ồ巢ゕ@_譙A`碫鄐㡥砄㠓(^K": "?܃B혢▦@犑ὺD~T⧁|醁;o=J牌9냚⢽㨘{4觍蚔9#$∺\u0016p囅\\3Xk阖⪚\"UzA穕롬✎➁㭒춺C㣌ဉ\"2瓑员ᅽꝶ뫍}꽚ꞇ鶂舟彺]ꍽJC蝧銉", + "␆Ě膝\"b-퉐ACR言J謈53~V튥x䜢?ꃽɄY뮩ꚜ": "K/↾e萃}]Bs⾿q룅鷦-膋?m+死^魊镲6", + "粡霦c枋AHퟁo礼Ke?qWcA趸㡔ꂏ?\u000e춂8iতᦜ婪\u0015㢼nﵿꍻ!ᐴ関\u001d5j㨻gfῩUK5Ju丝tかTI'?㓏t>⼟o a>i}ᰗ;뤕ܝ": false, + "ꄮ匴껢ꂰ涽+䜨B蛹H䛓-k蕞fu7kL谖,'涃V~챳逋穞cT\"vQ쓕ObaCRQ㓡Ⲯ?轭⫦輢墳?vA餽=h䮇킵n폲퉅喙?\"'1疬V嬗Qd灗'Lự": "6v!s믁㭟㣯獃!磸餠ቂh0C뿯봗F鷭gꖶ~コkK<ᦈTt\\跓w㭣횋钘ᆹ듡䑚W䟾X'ꅔ4FL勉Vܴ邨y)2'〚쭉⽵-鞣E,Q.?块", + "?(˧쩯@崟吋歄K": null + }, + "Gc럃녧>?2DYI鴿\\륨)澔0ᔬlx'觔7젘⤡縷螩%Sv׫묈/]↱&S h\u0006歋ᑛxi̘}ひY蔯_醨鯘煑橾8?䵎쨋z儬ꁏ*@츾:": null + } + } + } + ] + ] + ]} + }, + "HO츧G": 3.694949578823609E17, + "QC\u0012(翻曇Tf㷟bGBJ옉53\\嚇ᛎD/\u001b夾၉4\"핀@祎)쫆yD\"i먎Vn㿿V1W᨝䶀": -6150931500380982286, + "Z㓮P翸鍱鉼K䋞꘺튿⭁Y": -7704503411315138850, + "]모开ꬖP븣c霤<[3aΠ\"黁䖖䰑뮋ꤦ秽∼㑷冹T+YUt\"싳F↭䖏&鋌": -2.7231911483181824E18, + "tꎖ": -4.9517948741799555E-19, + "䋘즊.⬅IꬃۣQ챢ꄑ黐|f?C⾺|兕읯sC鬸섾整腨솷V": "旆柩l쪦sᖸMy㦅울썉瘗㎜檵9ꍂ駓ૉᚿ/u3씅徐拉[Z䞸ࡗ1ꆱ&Q풘?ǂ8\u0011BCDY2볨;鸏": null, + "幫 n煥s쁇펇 왊-$C\"衝:\u0014㣯舼.3뙗Yl⋇\"K迎멎[꽵s}9鉳UK8쐥\"掄㹖h㙈!얄સ?Ꜳ봺R伕UTD媚I䜘W鏨蔮": -4.150842714188901E-17, + "ﺯ^㄄\b죵@fྉkf颡팋Ꞧ{/Pm0V둳⻿/落韒ꊔᚬ@5螺G\\咸a谆⊪ቧ慷绖?财(鷇u錝F=r၍橢ឳn:^iᴵtD볠覅N赴": null + }] + }] + } + ] + ]} + ]}, + "謯?w厓奰T李헗聝ឍ貖o⪇弒L!캶$ᆅ": -4299324168507841322, + "뺊奉_垐浸延몏孄Z舰2i$q붿좾껇d▵餏\"v暜Ҭ섁m￴g>": -1.60911932510533427E18 + } + ] + } + ] + ]], + "퉝꺔㠦楶Pꅱ": 7517896876489142899, + "": false + } + ]}, + "是u&I狻餼|谖j\"7c됮sסּ-踳鉷`䣷쉄_A艣鳞凃*m⯾☦椿q㎭N溔铉tlㆈ^": 1.93547720203604352E18, + "kⲨ\\%vr#\u000bⒺY\\t<\/3﬌R訤='﹠8蝤Ꞵ렴曔r": false + } + ]}, + "阨{c?C\u001d~K?鎌Ԭ8烫#뙣P초遗t㭱E­돒䆺}甗[R*1!\\~h㕅᰺@<9JꏏષI䳖栭6綘걹ᅩM\"▯是∔v鬽顭⋊譬": "운ﶁK敂(欖C취پ℄爦賾" + } + }} + }], + "鷨赼鸙+\\䭣t圙ڹx᜾ČN<\/踘\"S_맶a鷺漇T彚⎲i㈥LT-xA캔$\u001cUH=a0츺l릦": "溣㣂0濕=鉵氬駘>Pꌢpb솇쬤h힊줎獪㪬CrQ矠a&脍꼬爼M茴/΅\u0017弝轼y#Ꞡc6둴=?R崏뷠麖w?" + }, + "閕ᘜ]CT)䵞l9z'xZF{:ؐI/躅匽졁:䟇AGF૸\u001cퟗ9)駬慟ꡒꆒRS״툋A<>\u0010\"ꂔ炃7g덚E৏bꅰ輤]o㱏_뷕ܘ暂\"u": "芢+U^+㢩^鱆8*1鈶鮀\u0002뺰9⬳ꪮlL䃣괟,G8\u20a8DF㉪錖0ㄤ瓶8Nଷd?眡GLc陓\\_죌V쁰ल二?c띦捱 \u0019JC\u0011b⤉zẒT볕\"绣蘨뚋cꡉkI\u001e鳴", + "ꃣI'{6u^㡃#཰Kq4逹y൒䧠䵮!㱙/n??{L풓ZET㙠퍿X2᩟綳跠葿㚙w཮x캽扳B唕S|尾}촕%N?o䪨": null, + "ⰴFjෟ셈[\u0018辷px?椯\\1<ﲻ栘ᣁ봢憠뉴p": -5263694954586507640 + } + ] + ]] + ]} + ]}] + ] + ], + "?#癘82禩鋆ꊝty?&": -1.9419029518535086E-19 + } + ] + ] + ]} + ] + ] + ], + "훊榲.|῕戄&.㚏Zꛦ2\"䢥ሆ⤢fV_摕婔?≍Fji冀탆꜕i㏬_ẑKᅢ꫄蔻XWc|饡Siẘ^㲦?羡2ぴ1縁ᙅ?쐉Ou": false + }]] + ]}}}, + "慂뗄卓蓔ᐓ匐嚖/颹蘯/翻ㆼL?뇊,텵<\\獷ごCボ": null + }, + "p溉ᑟi짣z:䒤棇r^٫%G9缑r砌롧.물农g?0׼ሩ4ƸO㣥㯄쩞ጩ": null, + "껎繥YxK\"F젷쨹뤤1wq轫o?鱑뜀瘊?뎃h灑\\ꛣ}K峐^ኖ⤐林ꉓhy": null + } + ], + "᱀n肓ㄛ\"堻2>m殮'1橌%Ꞵ군=Ӳ鯨9耛<\/n據0u彘8㬇៩f᏿诙]嚊": "䋯쪦S럶匏ㅛ#)O`ሀX_鐪渲⛀㨻宅闩➈ꢙஶDR⪍" + }, + "tA썓龇 ⋥bj왎录r땽✒롰;羋^\\?툳*┎?썀ma䵳넅U䳆૘〹䆀LQ0\b疀U~u$M}(鵸g⳾i抦뛹?䤈땚검.鹆?ꩡtⶥGĒ;!ቹHS峻B츪켏f5≺": 2366175040075384032, + "전pJjleb]ួ": -7.5418493141528422E18, + "n.鎖ጲ\n?,$䪘": true + }, + "欈Ar㉣螵᪚茩?O)": null + }, + "쫸M#x}D秱欐K=侫们丐.KꕾxẠ\u001e㿯䣛F܍캗qq8꟞ṢFD훎⵳簕꭛^鳜\u205c٫~⑟~冫ऊ2쫰<\/戲윱o<\"": true + }, + "㷝聥/T뱂\u0010锕|内䞇x侁≦㭖:M?iM᣿IJe煜dG࣯尃⚩gPt*辂.{磼럾䝪@a\\袛?}ᓺB珼": true + } + } + ]]}]}}, + "tn\"6ꫤ샾䄄;銞^%VBPwu묪`Y僑N.↺Ws?3C⤻9唩S䠮ᐴm;sᇷ냞඘B/;툥B?lB∤)G+O9m裢0kC햪䪤": -4.5941249382502277E18, + "ᚔt'\\愫?鵀@\\びꂕP큠<<]煹G-b!S?\nꖽ鼫,ݛ&頺y踦?E揆릱H}햧캡b@手.p탻>췽㣬ꒅ`qe佭P>ᓂ&?u}毚ᜉ蟶頳졪ᎏzl2wO": -2.53561440423275936E17 + }]} + } + ] + ]], + "潈촒⿂叡": 5495738871964062986 + } + ]] + } + ] + ]} + ]] + ]] + ]} + ] + ]}, + "ႁq킍蓅R`謈蟐ᦏ儂槐僻ﹶ9婌櫞釈~\"%匹躾ɢ뤥>࢟瀴愅?殕节/냔O✬H鲽엢?ᮈੁ⋧d␽㫐zCe*": 2.15062231586689536E17, + "㶵Ui曚珰鋪ᾼ臧P{䍏䷪쨑̟A뼿T渠誈䏚D1!잶<\/㡍7?)2l≣穷᛾稝{:;㡹nemיּ訊`G": null, + "䀕\"飕辭p圁f#뫆䶷뛮;⛴ᩍ3灚덏ᰝ쎓⦷詵%᜖Մfs⇫(\u001e~P|ﭗCⲾផv湟W첋(텪બT<บSꏉ੗⋲X婵i ӵ⇮?L䬇|ꈏ?졸": 1.548341247351782E-19 + } + ] + }, + "t;:N\u0015q鐦Rt缆{ꮐC?஛㷱敪\\+鲊㉫㓪몗릙竏(氵kYS": "XᰂT?൮ô", + "碕飦幑|+ 㚦鏶`镥ꁩ B<\/加륙": -4314053432419755959, + "秌孳(p!G?V傫%8ሽ8w;5鲗㦙LI檸\u2098": "zG N볞䆭鎍흘\\ONK3횙<\/樚立圌Q튅k쩎Ff쁋aׂJK銆ઘ즐狩6༥✙䩜篥CzP(聻駇HHퟲ讃%,ά{렍p而刲vy䦅ክ^톺M楒鍢㹳]Mdg2>䤉洞", + "踛M젧>忔芿㌜Zk": 2215369545966507819, + "씐A`$槭頰퍻^U覒\bG毲aᣴU;8!팲f꜇E⸃_卵{嫏羃X쀳C7뗮m(嚼u N܁谟D劯9]#": true, + "ﻩ!뵸-筚P᭛}ἰ履lPh?౮ⶹꆛ穉뎃g萑㑓溢CX뾇G㖬A錟]RKaꄘ]Yo+@䘁's섎襠$^홰}F": null + }, + "粘ꪒ4HXᕘ蹵.$區\r\u001d묁77pPc^y笲Q<\/ꖶ 訍䃍ᨕG?*": 1.73773035935040224E17 + }, + "婅拳?bkU;#D矠❴vVN쩆t㜷A풃갮娪a%鮏絪3dAv룒#tm쑬⌛qYwc4|L8KZ;xU⓭㳔밆拓EZ7襨eD|隰ऌ䧼u9Ԣ+]贴P荿": 2.9628516456987075E18 + }]}}] + ]} + }} + ]}] + ], + "|g翉F*湹̶\u0005⏐1脉̀eI쩓ᖂ㫱0碞l䴨ꑅ㵽7AtἈ턧yq䳥塑:z:遀ᄐX눔擉)`N3昛oQ셖y-ڨ⾶恢ꈵq^<\/": null, + "菹\\랓G^璬x৴뭸ゆUS겧﮷Bꮤ ┉銜᯻0%N7}~f洋坄Xꔼ<\/4妟Vꄟ9:౟곡t킅冩䧉笭裟炂4봋ⱳ叺怊t+怯涗\"0㖈Hq": false, + "졬믟'ﺇফ圪쓬멤m邸QLব䗁愍4jvs翙 ྍ꧀艳H-|": null, + "컮襱⣱뗠 R毪/鹙꾀%헳8&": -5770986448525107020 + } + ], + "B䔚bꐻ뙏姓展槰T-똌鷺tc灿᫽^㓟䏀o3o$꘭趙萬I顩)뇭Ἑ䓝\f@{ᣨ`x3蔛": null + } + ] + ] + }], + "⦖扚vWꃱ꥙㾠壢輓{-⎳鹷贏璿䜑bG倛⋐磎c皇皩7a~ﳫU╣Q࠭ꎉS摅姽OW.홌ೞ.": null, + "蚪eVlH献r}ᮏ믠ﰩꔄ@瑄ⲱ": null, + "퀭$JWoꩢg역쁍䖔㑺h&ୢtXX愰㱇?㾫I_6 OaB瑈q裿": null, + "꽦ﲼLyr纛Zdu珍B絟쬴糔?㕂짹䏵e": "ḱ\u2009cX9멀i䶛簆㳀k" + } + ]]]], + "(_ꏮg່澮?ᩑyM<艷\u001aꪽ\\庼뙭Z맷㰩Vm\\lY筺]3㋲2㌩㄀Eਟ䝵⨄쐨ᔟgङHn鐖⤇놋瓇Q탚單oY\"♆臾jHᶈ征ቄ??uㇰA?#1侓": null + }, + "觓^~ሢ&iI띆g륎ḱ캀.ᓡꀮ胙鈉": 1.0664523593012836E-19, + "y詭Gbᔶऽs댁U:杜⤎ϲ쁗⮼D醄诿q뙰I#즧v蔎xHᵿt᡽[**?崮耖p缫쿃L菝,봬ꤦC쯵#=X1瞻@OZc鱗CQTx": null + } + ] + }}], + "剘紁\u0004\\Xn⊠6,တױ;嵣崇}讃iႽ)d1\\䔓": null + }, + "脨z\"{X,1u찜<'k&@?1}Yn$\u0015Rd輲ーa쮂굄+B$l": true, + "諳>*쭮괐䵟Ґ+<箁}빀䅱⡔檏臒hIH脟ꩪC핝ଗP좕\"0i<\/C褻D۞恗+^5?'ꂱ䚫^7}㡠cq6\\쨪ꔞꥢ?纖䫀氮蒫侲빦敶q{A煲G": -6880961710038544266 + }}] + }, + "5s⨲JvಽῶꭂᄢI.a৊": null, + "?1q꽏쿻ꛋDR%U娝>DgN乭G": -1.2105047302732358E-19 + } + ] + ]}, + "qZz`撋뙹둣j碇쁏\\ꆥ\u0018@藴疰Wz)O{F䶛l᷂绘訥$]뮍夻䢋䩇萿獰樧猵⣭j萶q)$꬚⵷0馢W:Ⱍ!Qoe": -1666634370862219540, + "t": "=wp|~碎Q鬳Ӎ\\l-<\/^ﳊhn퐖}䍔t碵ḛ혷?靻䊗", + "邙쇡㯇%#=,E4勃驆V繚q[Y댻XV㡸[逹ᰏ葢B@u=JS5?bLRn얮㍉⏅ﰳ?a6[&큟!藈": 1.2722786745736667E-19 + }, + "X블땨4{ph鵋ꉯ웸 5p簂䦭s_E徔濧d稝~No穔噕뽲)뉈c5M윅>⚋[岦䲟懷恁?鎐꓆ฬ爋獠䜔s{\u001bm鐚儸煛%bﯿXT>ꗘ@8G": 1157841540507770724, + "媤娪Q杸\u0011SAyᡈ쿯": true, + "灚^ಸ%걁<\/蛯?\"祴坓\\\\'흍": -3.4614808555942579E18, + "釴U:O湛㴑䀣렑縓\ta)(j:숾却䗌gCiB뽬Oyuq輥厁/7)?今hY︺Q": null + } + ] + ]]]}] + ], + "I笔趠Ph!<ཛྷ㸞诘X$畉F\u0005笷菟.Esr릙!W☆䲖뗷莾뒭U\"䀸犜Uo3Gꯌx4r蔇᡹㧪쨢準<䂀%ࡡꟼ瑍8炝Xs0䀝销?fi쥱ꆝલBB": -8571484181158525797, + "L⦁o#J|\"⽩-㱢d㌛8d\\㶤傩儻E[Y熯)r噤὘勇 }": "e(濨쓌K䧚僒㘍蠤Vᛸ\"络QJL2,嬓왍伢㋒䴿考澰@(㏾`kX$끑эE斡,蜍&~y", + "vj.|统圪ᵮPL?2oŶ`밧\"勃+0ue%⿥绬췈체$6:qa렐Q;~晘3㙘鹑": true, + "ශؙ4獄⶿c︋i⚅:ん閝Ⳙ苆籦kw{䙞셕pC췃ꍬ␜꟯ꚓ酄b힝hwk꭭M鬋8B耳쑘WQ\\偙ac'唀x᪌\u2048*h짎#ፇ鮠뾏ឿ뀌": false, + "⎀jꄒ牺3Ⓝ컴~?親ꕽぼܓ喏瘘!@<튋㐌꿱⩦{a?Yv%⪧笯Uܱ栅E搚i뚬:ꄃx7䙳ꦋ&䓹vq☶I䁘ᾘ涜\\썉뺌Lr%Bc㍜3?ꝭ砿裞]": null, + "⭤뙓z(㡂%亳K䌽꫿AԾ岺㦦㼴輞낚Vꦴw냟鬓㹈뽈+o3譻K1잞": 2091209026076965894, + "ㇲ\t⋇轑ꠤ룫X긒\"zoY읇희wj梐쐑l侸`e%s": -9.9240075473576563E17, + "啸ꮑ㉰!ᚓ}銏": -4.0694813896301194E18, + ">]囋੽EK뇜>_ꀣ緳碖{쐐裔[<ನ\"䇅\"5L?#xTwv#罐\u0005래t应\\N?빗;": "v쮽瞭p뭃" + } + ]], + "斴槾?Z翁\"~慍弞ﻆ=꜡o5鐋dw\"?K蠡i샾ogDﲰ_C*⬟iㇷ4nય蟏[㟉U꽌娛苸 ঢ়操贻洞펻)쿗૊許X⨪VY츚Z䍾㶭~튃ᵦ<\/E臭tve猑x嚢": null, + "锡⛩<\/칥ꈙᬙ蝀&Ꚑ籬■865?_>L詏쿨䈌浿弥爫̫lj&zx<\/C쉾?覯n?": null, + "꾳鑤/꼩d=ᘈn挫ᑩ䰬ZC": "3錢爋6Ƹ䴗v⪿Wr益G韠[\u0010屗9쁡钁u?殢c䳀蓃樄욂NAq赟c튒瘁렶Aૡɚ捍" + } + ] + ] + ]} + ] + ] + }]]]}} + ]}], + "Ej䗳U<\/Q=灒샎䞦,堰頠@褙g_\u0003ꤾfⶽ?퇋!łB〙ד3CC䌴鈌U:뭔咎(Qો臃䡬荋BO7㢝䟸\"Yb": 2.36010731779814E-20, + "逸'0岔j\u000e눘먷翌C츊秦=ꭣ棭ှ;鳸=麱$XP⩉駚橄A\\좱⛌jqv䰞3Ь踌v㳆¹gT┌gvLB賖烡m?@E঳i": null + }, + "曺v찘ׁ?&绫O័": 9107241066550187880 + } + ] + ], + "(e屄\u0019昜훕琖b蓘ᬄ0/۲묇Z蘮ဏ⨏蛘胯뢃@㘉8ሪWᨮ⦬ᅳ䅴HI၇쨳z囕陻엣1赳o": true, + ",b刈Z,ၠ晐T솝ŕB⩆ou'퐼≃绗雗d譊": null, + "a唥KB\"ﳝ肕$u\n^⅄P䟼냉䞸⩪u윗瀱ꔨ#yşs꒬=1|ﲤ爢`t౐튼쳫_Az(Ṋ擬㦷좕耈6": 2099309172767331582, + "?㴸U<\/䢔ꯡ阽扆㐤q鐋?f㔫wM嬙-;UV죫嚔픞G&\"Cᗍ䪏풊Q": "VM7疹+陕枡툩窲}翡䖶8欞čsT뮐}璤:jﺋ鎴}HfA൝⧻Zd#Qu茅J髒皣Y-︴[?-~쉜v딏璮㹚䅊﩯<-#\u000e걀h\u0004u抱﵊㼃U<㱷⊱IC進" + }, + "숌dee節鏽邺p넱蹓+e罕U": true + } + ], + "b⧴룏??ᔠ3ぱ>%郿劃翐ꏬꠛW瞳᫏누躨狀ໄy੽\"ីuS=㨞馸k乆E": "トz݈^9R䬑<ﮛGRꨳ\u000fTT泠纷꽀MRᴱ纊:㠭볮?%N56%鈕1䗍䜁a䲗j陇=뿻偂衋࿘ᓸ?ᕵZ+<\/}H耢b䀁z^f$&㝒LkꢳI脚뙛u": 5.694374481577558E-20 + }] + } + ]], + "obj": {"key": "wrong value"}, + "퓲꽪m{㶩/뇿#⼢&᭙硞㪔E嚉c樱㬇1a綑᝖DḾ䝩": null + } +} \ No newline at end of file diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/bin/data/webapp.json b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/data/webapp.json new file mode 100644 index 0000000000..ee7b0f8bab --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/data/webapp.json @@ -0,0 +1,88 @@ +{"web-app": { + "servlet": [ + { + "servlet-name": "cofaxCDS", + "servlet-class": "org.cofax.cds.CDSServlet", + "init-param": { + "configGlossary:installationAt": "Philadelphia, PA", + "configGlossary:adminEmail": "ksm@pobox.com", + "configGlossary:poweredBy": "Cofax", + "configGlossary:poweredByIcon": "/images/cofax.gif", + "configGlossary:staticPath": "/content/static", + "templateProcessorClass": "org.cofax.WysiwygTemplate", + "templateLoaderClass": "org.cofax.FilesTemplateLoader", + "templatePath": "templates", + "templateOverridePath": "", + "defaultListTemplate": "listTemplate.htm", + "defaultFileTemplate": "articleTemplate.htm", + "useJSP": false, + "jspListTemplate": "listTemplate.jsp", + "jspFileTemplate": "articleTemplate.jsp", + "cachePackageTagsTrack": 200, + "cachePackageTagsStore": 200, + "cachePackageTagsRefresh": 60, + "cacheTemplatesTrack": 100, + "cacheTemplatesStore": 50, + "cacheTemplatesRefresh": 15, + "cachePagesTrack": 200, + "cachePagesStore": 100, + "cachePagesRefresh": 10, + "cachePagesDirtyRead": 10, + "searchEngineListTemplate": "forSearchEnginesList.htm", + "searchEngineFileTemplate": "forSearchEngines.htm", + "searchEngineRobotsDb": "WEB-INF/robots.db", + "useDataStore": true, + "dataStoreClass": "org.cofax.SqlDataStore", + "redirectionClass": "org.cofax.SqlRedirection", + "dataStoreName": "cofax", + "dataStoreDriver": "com.microsoft.jdbc.sqlserver.SQLServerDriver", + "dataStoreUrl": "jdbc:microsoft:sqlserver://LOCALHOST:1433;DatabaseName=goon", + "dataStoreUser": "sa", + "dataStorePassword": "dataStoreTestQuery", + "dataStoreTestQuery": "SET NOCOUNT ON;select test='test';", + "dataStoreLogFile": "/usr/local/tomcat/logs/datastore.log", + "dataStoreInitConns": 10, + "dataStoreMaxConns": 100, + "dataStoreConnUsageLimit": 100, + "dataStoreLogLevel": "debug", + "maxUrlLength": 500}}, + { + "servlet-name": "cofaxEmail", + "servlet-class": "org.cofax.cds.EmailServlet", + "init-param": { + "mailHost": "mail1", + "mailHostOverride": "mail2"}}, + { + "servlet-name": "cofaxAdmin", + "servlet-class": "org.cofax.cds.AdminServlet"}, + + { + "servlet-name": "fileServlet", + "servlet-class": "org.cofax.cds.FileServlet"}, + { + "servlet-name": "cofaxTools", + "servlet-class": "org.cofax.cms.CofaxToolsServlet", + "init-param": { + "templatePath": "toolstemplates/", + "log": 1, + "logLocation": "/usr/local/tomcat/logs/CofaxTools.log", + "logMaxSize": "", + "dataLog": 1, + "dataLogLocation": "/usr/local/tomcat/logs/dataLog.log", + "dataLogMaxSize": "", + "removePageCache": "/content/admin/remove?cache=pages&id=", + "removeTemplateCache": "/content/admin/remove?cache=templates&id=", + "fileTransferFolder": "/usr/local/tomcat/webapps/content/fileTransferFolder", + "lookInContext": 1, + "adminGroupID": 4, + "betaServer": true}}], + "servlet-mapping": { + "cofaxCDS": "/", + "cofaxEmail": "/cofaxutil/aemail/*", + "cofaxAdmin": "/admin/*", + "fileServlet": "/static/*", + "cofaxTools": "/tools/*"}, + + "taglib": { + "taglib-uri": "cofax.tld", + "taglib-location": "/WEB-INF/tlds/cofax.tld"}}} \ No newline at end of file diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/bin/data/widget.json b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/data/widget.json new file mode 100644 index 0000000000..32690e8b76 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/data/widget.json @@ -0,0 +1,26 @@ +{"widget": { + "debug": "on", + "window": { + "title": "Sample Konfabulator Widget", + "name": "main_window", + "width": 500, + "height": 500 + }, + "image": { + "src": "Images/Sun.png", + "name": "sun1", + "hOffset": 250, + "vOffset": 250, + "alignment": "center" + }, + "text": { + "data": "Click Here", + "size": 36, + "style": "bold", + "name": "text1", + "hOffset": 250, + "vOffset": 100, + "alignment": "center", + "onMouseUp": "sun1.opacity = (sun1.opacity / 100) * 90;" + } +}} \ No newline at end of file diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/bin/draft-04/schema b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/draft-04/schema new file mode 100644 index 0000000000..85eb502a68 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/draft-04/schema @@ -0,0 +1,150 @@ +{ + "id": "http://json-schema.org/draft-04/schema#", + "$schema": "http://json-schema.org/draft-04/schema#", + "description": "Core schema meta-schema", + "definitions": { + "schemaArray": { + "type": "array", + "minItems": 1, + "items": { "$ref": "#" } + }, + "positiveInteger": { + "type": "integer", + "minimum": 0 + }, + "positiveIntegerDefault0": { + "allOf": [ { "$ref": "#/definitions/positiveInteger" }, { "default": 0 } ] + }, + "simpleTypes": { + "enum": [ "array", "boolean", "integer", "null", "number", "object", "string" ] + }, + "stringArray": { + "type": "array", + "items": { "type": "string" }, + "minItems": 1, + "uniqueItems": true + } + }, + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uri" + }, + "$schema": { + "type": "string", + "format": "uri" + }, + "title": { + "type": "string" + }, + "description": { + "type": "string" + }, + "default": {}, + "multipleOf": { + "type": "number", + "minimum": 0, + "exclusiveMinimum": true + }, + "maximum": { + "type": "number" + }, + "exclusiveMaximum": { + "type": "boolean", + "default": false + }, + "minimum": { + "type": "number" + }, + "exclusiveMinimum": { + "type": "boolean", + "default": false + }, + "maxLength": { "$ref": "#/definitions/positiveInteger" }, + "minLength": { "$ref": "#/definitions/positiveIntegerDefault0" }, + "pattern": { + "type": "string", + "format": "regex" + }, + "additionalItems": { + "anyOf": [ + { "type": "boolean" }, + { "$ref": "#" } + ], + "default": {} + }, + "items": { + "anyOf": [ + { "$ref": "#" }, + { "$ref": "#/definitions/schemaArray" } + ], + "default": {} + }, + "maxItems": { "$ref": "#/definitions/positiveInteger" }, + "minItems": { "$ref": "#/definitions/positiveIntegerDefault0" }, + "uniqueItems": { + "type": "boolean", + "default": false + }, + "maxProperties": { "$ref": "#/definitions/positiveInteger" }, + "minProperties": { "$ref": "#/definitions/positiveIntegerDefault0" }, + "required": { "$ref": "#/definitions/stringArray" }, + "additionalProperties": { + "anyOf": [ + { "type": "boolean" }, + { "$ref": "#" } + ], + "default": {} + }, + "definitions": { + "type": "object", + "additionalProperties": { "$ref": "#" }, + "default": {} + }, + "properties": { + "type": "object", + "additionalProperties": { "$ref": "#" }, + "default": {} + }, + "patternProperties": { + "type": "object", + "additionalProperties": { "$ref": "#" }, + "default": {} + }, + "dependencies": { + "type": "object", + "additionalProperties": { + "anyOf": [ + { "$ref": "#" }, + { "$ref": "#/definitions/stringArray" } + ] + } + }, + "enum": { + "type": "array", + "minItems": 1, + "uniqueItems": true + }, + "type": { + "anyOf": [ + { "$ref": "#/definitions/simpleTypes" }, + { + "type": "array", + "items": { "$ref": "#/definitions/simpleTypes" }, + "minItems": 1, + "uniqueItems": true + } + ] + }, + "allOf": { "$ref": "#/definitions/schemaArray" }, + "anyOf": { "$ref": "#/definitions/schemaArray" }, + "oneOf": { "$ref": "#/definitions/schemaArray" }, + "not": { "$ref": "#" } + }, + "dependencies": { + "exclusiveMaximum": [ "maximum" ], + "exclusiveMinimum": [ "minimum" ] + }, + "default": {} +} diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/bin/encodings/utf16be.json b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/encodings/utf16be.json new file mode 100644 index 0000000000..e46dbfb9dd Binary files /dev/null and b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/encodings/utf16be.json differ diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/bin/encodings/utf16bebom.json b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/encodings/utf16bebom.json new file mode 100644 index 0000000000..0a23ae205c Binary files /dev/null and b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/encodings/utf16bebom.json differ diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/bin/encodings/utf16le.json b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/encodings/utf16le.json new file mode 100644 index 0000000000..92d504530c Binary files /dev/null and b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/encodings/utf16le.json differ diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/bin/encodings/utf16lebom.json b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/encodings/utf16lebom.json new file mode 100644 index 0000000000..eaba00132c Binary files /dev/null and b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/encodings/utf16lebom.json differ diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/bin/encodings/utf32be.json b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/encodings/utf32be.json new file mode 100644 index 0000000000..9cbb522279 Binary files /dev/null and b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/encodings/utf32be.json differ diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/bin/encodings/utf32bebom.json b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/encodings/utf32bebom.json new file mode 100644 index 0000000000..bde6a99ab4 Binary files /dev/null and b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/encodings/utf32bebom.json differ diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/bin/encodings/utf32le.json b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/encodings/utf32le.json new file mode 100644 index 0000000000..b00f290a64 Binary files /dev/null and b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/encodings/utf32le.json differ diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/bin/encodings/utf32lebom.json b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/encodings/utf32lebom.json new file mode 100644 index 0000000000..d3db39bf73 Binary files /dev/null and b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/encodings/utf32lebom.json differ diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/bin/encodings/utf8.json b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/encodings/utf8.json new file mode 100644 index 0000000000..c500c943f6 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/encodings/utf8.json @@ -0,0 +1,7 @@ +{ + "en":"I can eat glass and it doesn't hurt me.", + "zh-Hant":"我能吞下玻璃而不傷身體。", + "zh-Hans":"我能吞下玻璃而不伤身体。", + "ja":"私はガラスを食べられます。それは私を傷つけません。", + "ko":"나는 유리를 먹을 수 있어요. 그래도 아프지 않아요" +} \ No newline at end of file diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/bin/encodings/utf8bom.json b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/encodings/utf8bom.json new file mode 100644 index 0000000000..b9839fe2fa --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/encodings/utf8bom.json @@ -0,0 +1,7 @@ +{ + "en":"I can eat glass and it doesn't hurt me.", + "zh-Hant":"我能吞下玻璃而不傷身體。", + "zh-Hans":"我能吞下玻璃而不伤身体。", + "ja":"私はガラスを食べられます。それは私を傷つけません。", + "ko":"나는 유리를 먹을 수 있어요. 그래도 아프지 않아요" +} \ No newline at end of file diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonchecker/fail1.json b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonchecker/fail1.json new file mode 100644 index 0000000000..6216b865f1 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonchecker/fail1.json @@ -0,0 +1 @@ +"A JSON payload should be an object or array, not a string." \ No newline at end of file diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonchecker/fail10.json b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonchecker/fail10.json new file mode 100644 index 0000000000..5d8c0047bd --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonchecker/fail10.json @@ -0,0 +1 @@ +{"Extra value after close": true} "misplaced quoted value" \ No newline at end of file diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonchecker/fail11.json b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonchecker/fail11.json new file mode 100644 index 0000000000..76eb95b458 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonchecker/fail11.json @@ -0,0 +1 @@ +{"Illegal expression": 1 + 2} \ No newline at end of file diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonchecker/fail12.json b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonchecker/fail12.json new file mode 100644 index 0000000000..77580a4522 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonchecker/fail12.json @@ -0,0 +1 @@ +{"Illegal invocation": alert()} \ No newline at end of file diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonchecker/fail13.json b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonchecker/fail13.json new file mode 100644 index 0000000000..379406b59b --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonchecker/fail13.json @@ -0,0 +1 @@ +{"Numbers cannot have leading zeroes": 013} \ No newline at end of file diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonchecker/fail14.json b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonchecker/fail14.json new file mode 100644 index 0000000000..0ed366b38a --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonchecker/fail14.json @@ -0,0 +1 @@ +{"Numbers cannot be hex": 0x14} \ No newline at end of file diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonchecker/fail15.json b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonchecker/fail15.json new file mode 100644 index 0000000000..fc8376b605 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonchecker/fail15.json @@ -0,0 +1 @@ +["Illegal backslash escape: \x15"] \ No newline at end of file diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonchecker/fail16.json b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonchecker/fail16.json new file mode 100644 index 0000000000..3fe21d4b53 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonchecker/fail16.json @@ -0,0 +1 @@ +[\naked] \ No newline at end of file diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonchecker/fail17.json b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonchecker/fail17.json new file mode 100644 index 0000000000..62b9214aed --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonchecker/fail17.json @@ -0,0 +1 @@ +["Illegal backslash escape: \017"] \ No newline at end of file diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonchecker/fail18.json b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonchecker/fail18.json new file mode 100644 index 0000000000..edac92716f --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonchecker/fail18.json @@ -0,0 +1 @@ +[[[[[[[[[[[[[[[[[[[["Too deep"]]]]]]]]]]]]]]]]]]]] \ No newline at end of file diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonchecker/fail19.json b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonchecker/fail19.json new file mode 100644 index 0000000000..3b9c46fa9a --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonchecker/fail19.json @@ -0,0 +1 @@ +{"Missing colon" null} \ No newline at end of file diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonchecker/fail2.json b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonchecker/fail2.json new file mode 100644 index 0000000000..6b7c11e5a5 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonchecker/fail2.json @@ -0,0 +1 @@ +["Unclosed array" \ No newline at end of file diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonchecker/fail20.json b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonchecker/fail20.json new file mode 100644 index 0000000000..27c1af3e72 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonchecker/fail20.json @@ -0,0 +1 @@ +{"Double colon":: null} \ No newline at end of file diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonchecker/fail21.json b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonchecker/fail21.json new file mode 100644 index 0000000000..62474573b2 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonchecker/fail21.json @@ -0,0 +1 @@ +{"Comma instead of colon", null} \ No newline at end of file diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonchecker/fail22.json b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonchecker/fail22.json new file mode 100644 index 0000000000..a7752581bc --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonchecker/fail22.json @@ -0,0 +1 @@ +["Colon instead of comma": false] \ No newline at end of file diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonchecker/fail23.json b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonchecker/fail23.json new file mode 100644 index 0000000000..494add1ca1 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonchecker/fail23.json @@ -0,0 +1 @@ +["Bad value", truth] \ No newline at end of file diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonchecker/fail24.json b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonchecker/fail24.json new file mode 100644 index 0000000000..caff239bfc --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonchecker/fail24.json @@ -0,0 +1 @@ +['single quote'] \ No newline at end of file diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonchecker/fail25.json b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonchecker/fail25.json new file mode 100644 index 0000000000..8b7ad23e01 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonchecker/fail25.json @@ -0,0 +1 @@ +[" tab character in string "] \ No newline at end of file diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonchecker/fail26.json b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonchecker/fail26.json new file mode 100644 index 0000000000..845d26a6a5 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonchecker/fail26.json @@ -0,0 +1 @@ +["tab\ character\ in\ string\ "] \ No newline at end of file diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonchecker/fail27.json b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonchecker/fail27.json new file mode 100644 index 0000000000..6b01a2ca4a --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonchecker/fail27.json @@ -0,0 +1,2 @@ +["line +break"] \ No newline at end of file diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonchecker/fail28.json b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonchecker/fail28.json new file mode 100644 index 0000000000..621a0101c6 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonchecker/fail28.json @@ -0,0 +1,2 @@ +["line\ +break"] \ No newline at end of file diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonchecker/fail29.json b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonchecker/fail29.json new file mode 100644 index 0000000000..47ec421bb6 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonchecker/fail29.json @@ -0,0 +1 @@ +[0e] \ No newline at end of file diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonchecker/fail3.json b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonchecker/fail3.json new file mode 100644 index 0000000000..168c81eb78 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonchecker/fail3.json @@ -0,0 +1 @@ +{unquoted_key: "keys must be quoted"} \ No newline at end of file diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonchecker/fail30.json b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonchecker/fail30.json new file mode 100644 index 0000000000..8ab0bc4b8b --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonchecker/fail30.json @@ -0,0 +1 @@ +[0e+] \ No newline at end of file diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonchecker/fail31.json b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonchecker/fail31.json new file mode 100644 index 0000000000..1cce602b51 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonchecker/fail31.json @@ -0,0 +1 @@ +[0e+-1] \ No newline at end of file diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonchecker/fail32.json b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonchecker/fail32.json new file mode 100644 index 0000000000..45cba7396f --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonchecker/fail32.json @@ -0,0 +1 @@ +{"Comma instead if closing brace": true, \ No newline at end of file diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonchecker/fail33.json b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonchecker/fail33.json new file mode 100644 index 0000000000..ca5eb19dc9 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonchecker/fail33.json @@ -0,0 +1 @@ +["mismatch"} \ No newline at end of file diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonchecker/fail4.json b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonchecker/fail4.json new file mode 100644 index 0000000000..9de168bf34 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonchecker/fail4.json @@ -0,0 +1 @@ +["extra comma",] \ No newline at end of file diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonchecker/fail5.json b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonchecker/fail5.json new file mode 100644 index 0000000000..ddf3ce3d24 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonchecker/fail5.json @@ -0,0 +1 @@ +["double extra comma",,] \ No newline at end of file diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonchecker/fail6.json b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonchecker/fail6.json new file mode 100644 index 0000000000..ed91580e1b --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonchecker/fail6.json @@ -0,0 +1 @@ +[ , "<-- missing value"] \ No newline at end of file diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonchecker/fail7.json b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonchecker/fail7.json new file mode 100644 index 0000000000..8a96af3e4e --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonchecker/fail7.json @@ -0,0 +1 @@ +["Comma after the close"], \ No newline at end of file diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonchecker/fail8.json b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonchecker/fail8.json new file mode 100644 index 0000000000..b28479c6ec --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonchecker/fail8.json @@ -0,0 +1 @@ +["Extra close"]] \ No newline at end of file diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonchecker/fail9.json b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonchecker/fail9.json new file mode 100644 index 0000000000..5815574f36 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonchecker/fail9.json @@ -0,0 +1 @@ +{"Extra comma": true,} \ No newline at end of file diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonchecker/pass1.json b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonchecker/pass1.json new file mode 100644 index 0000000000..70e2685436 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonchecker/pass1.json @@ -0,0 +1,58 @@ +[ + "JSON Test Pattern pass1", + {"object with 1 member":["array with 1 element"]}, + {}, + [], + -42, + true, + false, + null, + { + "integer": 1234567890, + "real": -9876.543210, + "e": 0.123456789e-12, + "E": 1.234567890E+34, + "": 23456789012E66, + "zero": 0, + "one": 1, + "space": " ", + "quote": "\"", + "backslash": "\\", + "controls": "\b\f\n\r\t", + "slash": "/ & \/", + "alpha": "abcdefghijklmnopqrstuvwyz", + "ALPHA": "ABCDEFGHIJKLMNOPQRSTUVWYZ", + "digit": "0123456789", + "0123456789": "digit", + "special": "`1~!@#$%^&*()_+-={':[,]}|;.?", + "hex": "\u0123\u4567\u89AB\uCDEF\uabcd\uef4A", + "true": true, + "false": false, + "null": null, + "array":[ ], + "object":{ }, + "address": "50 St. James Street", + "url": "http://www.JSON.org/", + "comment": "// /* */": " ", + " s p a c e d " :[1,2 , 3 + +, + +4 , 5 , 6 ,7 ],"compact":[1,2,3,4,5,6,7], + "jsontext": "{\"object with 1 member\":[\"array with 1 element\"]}", + "quotes": "" \u0022 %22 0x22 034 "", + "\/\\\"\uCAFE\uBABE\uAB98\uFCDE\ubcda\uef4A\b\f\n\r\t`1~!@#$%^&*()_+-=[]{}|;:',./<>?" +: "A key can be any string" + }, + 0.5 ,98.6 +, +99.44 +, + +1066, +1e1, +0.1e1, +1e-1, +1e00,2e+00,2e-00 +,"rosebud"] \ No newline at end of file diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonchecker/pass2.json b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonchecker/pass2.json new file mode 100644 index 0000000000..d3c63c7ad8 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonchecker/pass2.json @@ -0,0 +1 @@ +[[[[[[[[[[[[[[[[[[["Not too deep"]]]]]]]]]]]]]]]]]]] \ No newline at end of file diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonchecker/pass3.json b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonchecker/pass3.json new file mode 100644 index 0000000000..4528d51f1a --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonchecker/pass3.json @@ -0,0 +1,6 @@ +{ + "JSON Test Pattern pass3": { + "The outermost value": "must be an object or array.", + "In this test": "It is an object." + } +} diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonchecker/readme.txt b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonchecker/readme.txt new file mode 100644 index 0000000000..321d89d998 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonchecker/readme.txt @@ -0,0 +1,3 @@ +Test suite from http://json.org/JSON_checker/. + +If the JSON_checker is working correctly, it must accept all of the pass*.json files and reject all of the fail*.json files. diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/LICENSE b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/LICENSE new file mode 100644 index 0000000000..c28adbadd9 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2012 Julian Berman + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/README.md b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/README.md new file mode 100644 index 0000000000..6d9da94932 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/README.md @@ -0,0 +1,148 @@ +JSON Schema Test Suite [![Build Status](https://travis-ci.org/json-schema/JSON-Schema-Test-Suite.png?branch=develop)](https://travis-ci.org/json-schema/JSON-Schema-Test-Suite) +====================== + +This repository contains a set of JSON objects that implementors of JSON Schema +validation libraries can use to test their validators. + +It is meant to be language agnostic and should require only a JSON parser. + +The conversion of the JSON objects into tests within your test framework of +choice is still the job of the validator implementor. + +Structure of a Test +------------------- + +If you're going to use this suite, you need to know how tests are laid out. The +tests are contained in the `tests` directory at the root of this repository. + +Inside that directory is a subdirectory for each draft or version of the +schema. We'll use `draft3` as an example. + +If you look inside the draft directory, there are a number of `.json` files, +which logically group a set of test cases together. Often the grouping is by +property under test, but not always, especially within optional test files +(discussed below). + +Inside each `.json` file is a single array containing objects. It's easiest to +illustrate the structure of these with an example: + +```json + { + "description": "the description of the test case", + "schema": {"the schema that should" : "be validated against"}, + "tests": [ + { + "description": "a specific test of a valid instance", + "data": "the instance", + "valid": true + }, + { + "description": "another specific test this time, invalid", + "data": 15, + "valid": false + } + ] + } +``` + +So a description, a schema, and some tests, where tests is an array containing +one or more objects with descriptions, data, and a boolean indicating whether +they should be valid or invalid. + +Coverage +-------- + +Draft 3 and 4 should have full coverage. If you see anything missing or think +there is a useful test missing, please send a pull request or open an issue. + +Who Uses the Test Suite +----------------------- + +This suite is being used by: + +### Coffeescript ### + +* [jsck](https://github.com/pandastrike/jsck) + +### Dart ### + +* [json_schema](https://github.com/patefacio/json_schema) + +### Erlang ### + +* [jesse](https://github.com/klarna/jesse) + +### Go ### + +* [gojsonschema](https://github.com/sigu-399/gojsonschema) +* [validate-json](https://github.com/cesanta/validate-json) + +### Haskell ### + +* [aeson-schema](https://github.com/timjb/aeson-schema) +* [hjsonschema](https://github.com/seagreen/hjsonschema) + +### Java ### + +* [json-schema-validator](https://github.com/fge/json-schema-validator) + +### JavaScript ### + +* [json-schema-benchmark](https://github.com/Muscula/json-schema-benchmark) +* [direct-schema](https://github.com/IreneKnapp/direct-schema) +* [is-my-json-valid](https://github.com/mafintosh/is-my-json-valid) +* [jassi](https://github.com/iclanzan/jassi) +* [JaySchema](https://github.com/natesilva/jayschema) +* [json-schema-valid](https://github.com/ericgj/json-schema-valid) +* [Jsonary](https://github.com/jsonary-js/jsonary) +* [jsonschema](https://github.com/tdegrunt/jsonschema) +* [request-validator](https://github.com/bugventure/request-validator) +* [skeemas](https://github.com/Prestaul/skeemas) +* [tv4](https://github.com/geraintluff/tv4) +* [z-schema](https://github.com/zaggino/z-schema) +* [jsen](https://github.com/bugventure/jsen) +* [ajv](https://github.com/epoberezkin/ajv) + +### Node.js ### + +The JSON Schema Test Suite is also available as an +[npm](https://www.npmjs.com/package/json-schema-test-suite) package. +Node-specific support is maintained on the [node branch](https://github.com/json-schema/JSON-Schema-Test-Suite/tree/node). +See [NODE-README.md](https://github.com/json-schema/JSON-Schema-Test-Suite/blob/node/NODE-README.md) +for more information. + +### .NET ### + +* [Newtonsoft.Json.Schema](https://github.com/JamesNK/Newtonsoft.Json.Schema) + +### PHP ### + +* [json-schema](https://github.com/justinrainbow/json-schema) + +### Python ### + +* [jsonschema](https://github.com/Julian/jsonschema) + +### Ruby ### + +* [json-schema](https://github.com/hoxworth/json-schema) + +### Rust ### + +* [valico](https://github.com/rustless/valico) + +### Swift ### + +* [JSONSchema](https://github.com/kylef/JSONSchema.swift) + +If you use it as well, please fork and send a pull request adding yourself to +the list :). + +Contributing +------------ + +If you see something missing or incorrect, a pull request is most welcome! + +There are some sanity checks in place for testing the test suite. You can run +them with `bin/jsonschema_suite check` or `tox`. They will be run automatically by +[Travis CI](https://travis-ci.org/) as well. diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/bin/jsonschema_suite b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/bin/jsonschema_suite new file mode 100755 index 0000000000..96108c86ba --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/bin/jsonschema_suite @@ -0,0 +1,283 @@ +#! /usr/bin/env python +from __future__ import print_function +import sys +import textwrap + +try: + import argparse +except ImportError: + print(textwrap.dedent(""" + The argparse library could not be imported. jsonschema_suite requires + either Python 2.7 or for you to install argparse. You can do so by + running `pip install argparse`, `easy_install argparse` or by + downloading argparse and running `python2.6 setup.py install`. + + See https://pypi.python.org/pypi/argparse for details. + """.strip("\n"))) + sys.exit(1) + +import errno +import fnmatch +import json +import os +import random +import shutil +import unittest +import warnings + +if getattr(unittest, "skipIf", None) is None: + unittest.skipIf = lambda cond, msg : lambda fn : fn + +try: + import jsonschema +except ImportError: + jsonschema = None +else: + validators = getattr( + jsonschema.validators, "validators", jsonschema.validators + ) + + +ROOT_DIR = os.path.join( + os.path.dirname(__file__), os.pardir).rstrip("__pycache__") +SUITE_ROOT_DIR = os.path.join(ROOT_DIR, "tests") + +REMOTES = { + "integer.json": {"type": "integer"}, + "subSchemas.json": { + "integer": {"type": "integer"}, + "refToInteger": {"$ref": "#/integer"}, + }, + "folder/folderInteger.json": {"type": "integer"} +} +REMOTES_DIR = os.path.join(ROOT_DIR, "remotes") + +TESTSUITE_SCHEMA = { + "$schema": "http://json-schema.org/draft-03/schema#", + "type": "array", + "items": { + "type": "object", + "properties": { + "description": {"type": "string", "required": True}, + "schema": {"required": True}, + "tests": { + "type": "array", + "items": { + "type": "object", + "properties": { + "description": {"type": "string", "required": True}, + "data": {"required": True}, + "valid": {"type": "boolean", "required": True} + }, + "additionalProperties": False + }, + "minItems": 1 + } + }, + "additionalProperties": False, + "minItems": 1 + } +} + + +def files(paths): + for path in paths: + with open(path) as test_file: + yield json.load(test_file) + + +def groups(paths): + for test_file in files(paths): + for group in test_file: + yield group + + +def cases(paths): + for test_group in groups(paths): + for test in test_group["tests"]: + test["schema"] = test_group["schema"] + yield test + + +def collect(root_dir): + for root, dirs, files in os.walk(root_dir): + for filename in fnmatch.filter(files, "*.json"): + yield os.path.join(root, filename) + + +class SanityTests(unittest.TestCase): + @classmethod + def setUpClass(cls): + print("Looking for tests in %s" % SUITE_ROOT_DIR) + cls.test_files = list(collect(SUITE_ROOT_DIR)) + print("Found %s test files" % len(cls.test_files)) + assert cls.test_files, "Didn't find the test files!" + + def test_all_files_are_valid_json(self): + for path in self.test_files: + with open(path) as test_file: + try: + json.load(test_file) + except ValueError as error: + self.fail("%s contains invalid JSON (%s)" % (path, error)) + + def test_all_descriptions_have_reasonable_length(self): + for case in cases(self.test_files): + descript = case["description"] + self.assertLess( + len(descript), + 60, + "%r is too long! (keep it to less than 60 chars)" % (descript,) + ) + + def test_all_descriptions_are_unique(self): + for group in groups(self.test_files): + descriptions = set(test["description"] for test in group["tests"]) + self.assertEqual( + len(descriptions), + len(group["tests"]), + "%r contains a duplicate description" % (group,) + ) + + @unittest.skipIf(jsonschema is None, "Validation library not present!") + def test_all_schemas_are_valid(self): + for schema in os.listdir(SUITE_ROOT_DIR): + schema_validator = validators.get(schema) + if schema_validator is not None: + test_files = collect(os.path.join(SUITE_ROOT_DIR, schema)) + for case in cases(test_files): + try: + schema_validator.check_schema(case["schema"]) + except jsonschema.SchemaError as error: + self.fail("%s contains an invalid schema (%s)" % + (case, error)) + else: + warnings.warn("No schema validator for %s" % schema) + + @unittest.skipIf(jsonschema is None, "Validation library not present!") + def test_suites_are_valid(self): + validator = jsonschema.Draft3Validator(TESTSUITE_SCHEMA) + for tests in files(self.test_files): + try: + validator.validate(tests) + except jsonschema.ValidationError as error: + self.fail(str(error)) + + def test_remote_schemas_are_updated(self): + for url, schema in REMOTES.items(): + filepath = os.path.join(REMOTES_DIR, url) + with open(filepath) as schema_file: + self.assertEqual(json.load(schema_file), schema) + + +def main(arguments): + if arguments.command == "check": + suite = unittest.TestLoader().loadTestsFromTestCase(SanityTests) + result = unittest.TextTestRunner(verbosity=2).run(suite) + sys.exit(not result.wasSuccessful()) + elif arguments.command == "flatten": + selected_cases = [case for case in cases(collect(arguments.version))] + + if arguments.randomize: + random.shuffle(selected_cases) + + json.dump(selected_cases, sys.stdout, indent=4, sort_keys=True) + elif arguments.command == "remotes": + json.dump(REMOTES, sys.stdout, indent=4, sort_keys=True) + elif arguments.command == "dump_remotes": + if arguments.update: + shutil.rmtree(arguments.out_dir, ignore_errors=True) + + try: + os.makedirs(arguments.out_dir) + except OSError as e: + if e.errno == errno.EEXIST: + print("%s already exists. Aborting." % arguments.out_dir) + sys.exit(1) + raise + + for url, schema in REMOTES.items(): + filepath = os.path.join(arguments.out_dir, url) + + try: + os.makedirs(os.path.dirname(filepath)) + except OSError as e: + if e.errno != errno.EEXIST: + raise + + with open(filepath, "wb") as out_file: + json.dump(schema, out_file, indent=4, sort_keys=True) + elif arguments.command == "serve": + try: + from flask import Flask, jsonify + except ImportError: + print(textwrap.dedent(""" + The Flask library is required to serve the remote schemas. + + You can install it by running `pip install Flask`. + + Alternatively, see the `jsonschema_suite remotes` or + `jsonschema_suite dump_remotes` commands to create static files + that can be served with your own web server. + """.strip("\n"))) + sys.exit(1) + + app = Flask(__name__) + + @app.route("/") + def serve_path(path): + if path in REMOTES: + return jsonify(REMOTES[path]) + return "Document does not exist.", 404 + + app.run(port=1234) + + +parser = argparse.ArgumentParser( + description="JSON Schema Test Suite utilities", +) +subparsers = parser.add_subparsers(help="utility commands", dest="command") + +check = subparsers.add_parser("check", help="Sanity check the test suite.") + +flatten = subparsers.add_parser( + "flatten", + help="Output a flattened file containing a selected version's test cases." +) +flatten.add_argument( + "--randomize", + action="store_true", + help="Randomize the order of the outputted cases.", +) +flatten.add_argument( + "version", help="The directory containing the version to output", +) + +remotes = subparsers.add_parser( + "remotes", + help="Output the expected URLs and their associated schemas for remote " + "ref tests as a JSON object." +) + +dump_remotes = subparsers.add_parser( + "dump_remotes", help="Dump the remote ref schemas into a file tree", +) +dump_remotes.add_argument( + "--update", + action="store_true", + help="Update the remotes in an existing directory.", +) +dump_remotes.add_argument( + "--out-dir", + default=REMOTES_DIR, + type=os.path.abspath, + help="The output directory to create as the root of the file tree", +) + +serve = subparsers.add_parser( + "serve", + help="Start a webserver to serve schemas used by remote ref tests." +) + +if __name__ == "__main__": + main(parser.parse_args()) diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/remotes/folder/folderInteger.json b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/remotes/folder/folderInteger.json new file mode 100644 index 0000000000..dbe5c758ee --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/remotes/folder/folderInteger.json @@ -0,0 +1,3 @@ +{ + "type": "integer" +} \ No newline at end of file diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/remotes/integer.json b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/remotes/integer.json new file mode 100644 index 0000000000..dbe5c758ee --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/remotes/integer.json @@ -0,0 +1,3 @@ +{ + "type": "integer" +} \ No newline at end of file diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/remotes/subSchemas.json b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/remotes/subSchemas.json new file mode 100644 index 0000000000..8b6d8f842f --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/remotes/subSchemas.json @@ -0,0 +1,8 @@ +{ + "integer": { + "type": "integer" + }, + "refToInteger": { + "$ref": "#/integer" + } +} \ No newline at end of file diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft3/additionalItems.json b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft3/additionalItems.json new file mode 100644 index 0000000000..6d4bff51cf --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft3/additionalItems.json @@ -0,0 +1,82 @@ +[ + { + "description": "additionalItems as schema", + "schema": { + "items": [], + "additionalItems": {"type": "integer"} + }, + "tests": [ + { + "description": "additional items match schema", + "data": [ 1, 2, 3, 4 ], + "valid": true + }, + { + "description": "additional items do not match schema", + "data": [ 1, 2, 3, "foo" ], + "valid": false + } + ] + }, + { + "description": "items is schema, no additionalItems", + "schema": { + "items": {}, + "additionalItems": false + }, + "tests": [ + { + "description": "all items match schema", + "data": [ 1, 2, 3, 4, 5 ], + "valid": true + } + ] + }, + { + "description": "array of items with no additionalItems", + "schema": { + "items": [{}, {}, {}], + "additionalItems": false + }, + "tests": [ + { + "description": "no additional items present", + "data": [ 1, 2, 3 ], + "valid": true + }, + { + "description": "additional items are not permitted", + "data": [ 1, 2, 3, 4 ], + "valid": false + } + ] + }, + { + "description": "additionalItems as false without items", + "schema": {"additionalItems": false}, + "tests": [ + { + "description": + "items defaults to empty schema so everything is valid", + "data": [ 1, 2, 3, 4, 5 ], + "valid": true + }, + { + "description": "ignores non-arrays", + "data": {"foo" : "bar"}, + "valid": true + } + ] + }, + { + "description": "additionalItems are allowed by default", + "schema": {"items": []}, + "tests": [ + { + "description": "only the first items are validated", + "data": [1, "foo", false], + "valid": true + } + ] + } +] diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft3/additionalProperties.json b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft3/additionalProperties.json new file mode 100644 index 0000000000..40831f9e9a --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft3/additionalProperties.json @@ -0,0 +1,88 @@ +[ + { + "description": + "additionalProperties being false does not allow other properties", + "schema": { + "properties": {"foo": {}, "bar": {}}, + "patternProperties": { "^v": {} }, + "additionalProperties": false + }, + "tests": [ + { + "description": "no additional properties is valid", + "data": {"foo": 1}, + "valid": true + }, + { + "description": "an additional property is invalid", + "data": {"foo" : 1, "bar" : 2, "quux" : "boom"}, + "valid": false + }, + { + "description": "ignores non-objects", + "data": [1, 2, 3], + "valid": true + }, + { + "description": "patternProperties are not additional properties", + "data": {"foo":1, "vroom": 2}, + "valid": true + } + ] + }, + { + "description": + "additionalProperties allows a schema which should validate", + "schema": { + "properties": {"foo": {}, "bar": {}}, + "additionalProperties": {"type": "boolean"} + }, + "tests": [ + { + "description": "no additional properties is valid", + "data": {"foo": 1}, + "valid": true + }, + { + "description": "an additional valid property is valid", + "data": {"foo" : 1, "bar" : 2, "quux" : true}, + "valid": true + }, + { + "description": "an additional invalid property is invalid", + "data": {"foo" : 1, "bar" : 2, "quux" : 12}, + "valid": false + } + ] + }, + { + "description": + "additionalProperties can exist by itself", + "schema": { + "additionalProperties": {"type": "boolean"} + }, + "tests": [ + { + "description": "an additional valid property is valid", + "data": {"foo" : true}, + "valid": true + }, + { + "description": "an additional invalid property is invalid", + "data": {"foo" : 1}, + "valid": false + } + ] + }, + { + "description": "additionalProperties are allowed by default", + "schema": {"properties": {"foo": {}, "bar": {}}}, + "tests": [ + { + "description": "additional properties are allowed", + "data": {"foo": 1, "bar": 2, "quux": true}, + "valid": true + } + ] + } +] diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft3/default.json b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft3/default.json new file mode 100644 index 0000000000..17629779fb --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft3/default.json @@ -0,0 +1,49 @@ +[ + { + "description": "invalid type for default", + "schema": { + "properties": { + "foo": { + "type": "integer", + "default": [] + } + } + }, + "tests": [ + { + "description": "valid when property is specified", + "data": {"foo": 13}, + "valid": true + }, + { + "description": "still valid when the invalid default is used", + "data": {}, + "valid": true + } + ] + }, + { + "description": "invalid string value for default", + "schema": { + "properties": { + "bar": { + "type": "string", + "minLength": 4, + "default": "bad" + } + } + }, + "tests": [ + { + "description": "valid when property is specified", + "data": {"bar": "good"}, + "valid": true + }, + { + "description": "still valid when the invalid default is used", + "data": {}, + "valid": true + } + ] + } +] diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft3/dependencies.json b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft3/dependencies.json new file mode 100644 index 0000000000..2f6ae489ae --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft3/dependencies.json @@ -0,0 +1,108 @@ +[ + { + "description": "dependencies", + "schema": { + "dependencies": {"bar": "foo"} + }, + "tests": [ + { + "description": "neither", + "data": {}, + "valid": true + }, + { + "description": "nondependant", + "data": {"foo": 1}, + "valid": true + }, + { + "description": "with dependency", + "data": {"foo": 1, "bar": 2}, + "valid": true + }, + { + "description": "missing dependency", + "data": {"bar": 2}, + "valid": false + }, + { + "description": "ignores non-objects", + "data": "foo", + "valid": true + } + ] + }, + { + "description": "multiple dependencies", + "schema": { + "dependencies": {"quux": ["foo", "bar"]} + }, + "tests": [ + { + "description": "neither", + "data": {}, + "valid": true + }, + { + "description": "nondependants", + "data": {"foo": 1, "bar": 2}, + "valid": true + }, + { + "description": "with dependencies", + "data": {"foo": 1, "bar": 2, "quux": 3}, + "valid": true + }, + { + "description": "missing dependency", + "data": {"foo": 1, "quux": 2}, + "valid": false + }, + { + "description": "missing other dependency", + "data": {"bar": 1, "quux": 2}, + "valid": false + }, + { + "description": "missing both dependencies", + "data": {"quux": 1}, + "valid": false + } + ] + }, + { + "description": "multiple dependencies subschema", + "schema": { + "dependencies": { + "bar": { + "properties": { + "foo": {"type": "integer"}, + "bar": {"type": "integer"} + } + } + } + }, + "tests": [ + { + "description": "valid", + "data": {"foo": 1, "bar": 2}, + "valid": true + }, + { + "description": "wrong type", + "data": {"foo": "quux", "bar": 2}, + "valid": false + }, + { + "description": "wrong type other", + "data": {"foo": 2, "bar": "quux"}, + "valid": false + }, + { + "description": "wrong type both", + "data": {"foo": "quux", "bar": "quux"}, + "valid": false + } + ] + } +] diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft3/disallow.json b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft3/disallow.json new file mode 100644 index 0000000000..a5c9d90cce --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft3/disallow.json @@ -0,0 +1,80 @@ +[ + { + "description": "disallow", + "schema": { + "disallow": "integer" + }, + "tests": [ + { + "description": "allowed", + "data": "foo", + "valid": true + }, + { + "description": "disallowed", + "data": 1, + "valid": false + } + ] + }, + { + "description": "multiple disallow", + "schema": { + "disallow": ["integer", "boolean"] + }, + "tests": [ + { + "description": "valid", + "data": "foo", + "valid": true + }, + { + "description": "mismatch", + "data": 1, + "valid": false + }, + { + "description": "other mismatch", + "data": true, + "valid": false + } + ] + }, + { + "description": "multiple disallow subschema", + "schema": { + "disallow": + ["string", + { + "type": "object", + "properties": { + "foo": { + "type": "string" + } + } + }] + }, + "tests": [ + { + "description": "match", + "data": 1, + "valid": true + }, + { + "description": "other match", + "data": {"foo": 1}, + "valid": true + }, + { + "description": "mismatch", + "data": "foo", + "valid": false + }, + { + "description": "other mismatch", + "data": {"foo": "bar"}, + "valid": false + } + ] + } +] diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft3/divisibleBy.json b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft3/divisibleBy.json new file mode 100644 index 0000000000..ef7cc14890 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft3/divisibleBy.json @@ -0,0 +1,60 @@ +[ + { + "description": "by int", + "schema": {"divisibleBy": 2}, + "tests": [ + { + "description": "int by int", + "data": 10, + "valid": true + }, + { + "description": "int by int fail", + "data": 7, + "valid": false + }, + { + "description": "ignores non-numbers", + "data": "foo", + "valid": true + } + ] + }, + { + "description": "by number", + "schema": {"divisibleBy": 1.5}, + "tests": [ + { + "description": "zero is divisible by anything (except 0)", + "data": 0, + "valid": true + }, + { + "description": "4.5 is divisible by 1.5", + "data": 4.5, + "valid": true + }, + { + "description": "35 is not divisible by 1.5", + "data": 35, + "valid": false + } + ] + }, + { + "description": "by small number", + "schema": {"divisibleBy": 0.0001}, + "tests": [ + { + "description": "0.0075 is divisible by 0.0001", + "data": 0.0075, + "valid": true + }, + { + "description": "0.00751 is not divisible by 0.0001", + "data": 0.00751, + "valid": false + } + ] + } +] diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft3/enum.json b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft3/enum.json new file mode 100644 index 0000000000..0c83f0804d --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft3/enum.json @@ -0,0 +1,71 @@ +[ + { + "description": "simple enum validation", + "schema": {"enum": [1, 2, 3]}, + "tests": [ + { + "description": "one of the enum is valid", + "data": 1, + "valid": true + }, + { + "description": "something else is invalid", + "data": 4, + "valid": false + } + ] + }, + { + "description": "heterogeneous enum validation", + "schema": {"enum": [6, "foo", [], true, {"foo": 12}]}, + "tests": [ + { + "description": "one of the enum is valid", + "data": [], + "valid": true + }, + { + "description": "something else is invalid", + "data": null, + "valid": false + }, + { + "description": "objects are deep compared", + "data": {"foo": false}, + "valid": false + } + ] + }, + { + "description": "enums in properties", + "schema": { + "type":"object", + "properties": { + "foo": {"enum":["foo"]}, + "bar": {"enum":["bar"], "required":true} + } + }, + "tests": [ + { + "description": "both properties are valid", + "data": {"foo":"foo", "bar":"bar"}, + "valid": true + }, + { + "description": "missing optional property is valid", + "data": {"bar":"bar"}, + "valid": true + }, + { + "description": "missing required property is invalid", + "data": {"foo":"foo"}, + "valid": false + }, + { + "description": "missing all properties is invalid", + "data": {}, + "valid": false + } + ] + } +] diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft3/extends.json b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft3/extends.json new file mode 100644 index 0000000000..909bce575a --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft3/extends.json @@ -0,0 +1,94 @@ +[ + { + "description": "extends", + "schema": { + "properties": {"bar": {"type": "integer", "required": true}}, + "extends": { + "properties": { + "foo": {"type": "string", "required": true} + } + } + }, + "tests": [ + { + "description": "extends", + "data": {"foo": "baz", "bar": 2}, + "valid": true + }, + { + "description": "mismatch extends", + "data": {"foo": "baz"}, + "valid": false + }, + { + "description": "mismatch extended", + "data": {"bar": 2}, + "valid": false + }, + { + "description": "wrong type", + "data": {"foo": "baz", "bar": "quux"}, + "valid": false + } + ] + }, + { + "description": "multiple extends", + "schema": { + "properties": {"bar": {"type": "integer", "required": true}}, + "extends" : [ + { + "properties": { + "foo": {"type": "string", "required": true} + } + }, + { + "properties": { + "baz": {"type": "null", "required": true} + } + } + ] + }, + "tests": [ + { + "description": "valid", + "data": {"foo": "quux", "bar": 2, "baz": null}, + "valid": true + }, + { + "description": "mismatch first extends", + "data": {"bar": 2, "baz": null}, + "valid": false + }, + { + "description": "mismatch second extends", + "data": {"foo": "quux", "bar": 2}, + "valid": false + }, + { + "description": "mismatch both", + "data": {"bar": 2}, + "valid": false + } + ] + }, + { + "description": "extends simple types", + "schema": { + "minimum": 20, + "extends": {"maximum": 30} + }, + "tests": [ + { + "description": "valid", + "data": 25, + "valid": true + }, + { + "description": "mismatch extends", + "data": 35, + "valid": false + } + ] + } +] diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft3/items.json b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft3/items.json new file mode 100644 index 0000000000..f5e18a1384 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft3/items.json @@ -0,0 +1,46 @@ +[ + { + "description": "a schema given for items", + "schema": { + "items": {"type": "integer"} + }, + "tests": [ + { + "description": "valid items", + "data": [ 1, 2, 3 ], + "valid": true + }, + { + "description": "wrong type of items", + "data": [1, "x"], + "valid": false + }, + { + "description": "ignores non-arrays", + "data": {"foo" : "bar"}, + "valid": true + } + ] + }, + { + "description": "an array of schemas for items", + "schema": { + "items": [ + {"type": "integer"}, + {"type": "string"} + ] + }, + "tests": [ + { + "description": "correct types", + "data": [ 1, "foo" ], + "valid": true + }, + { + "description": "wrong types", + "data": [ "foo", 1 ], + "valid": false + } + ] + } +] diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft3/maxItems.json b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft3/maxItems.json new file mode 100644 index 0000000000..3b53a6b371 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft3/maxItems.json @@ -0,0 +1,28 @@ +[ + { + "description": "maxItems validation", + "schema": {"maxItems": 2}, + "tests": [ + { + "description": "shorter is valid", + "data": [1], + "valid": true + }, + { + "description": "exact length is valid", + "data": [1, 2], + "valid": true + }, + { + "description": "too long is invalid", + "data": [1, 2, 3], + "valid": false + }, + { + "description": "ignores non-arrays", + "data": "foobar", + "valid": true + } + ] + } +] diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft3/maxLength.json b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft3/maxLength.json new file mode 100644 index 0000000000..4de42bcaba --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft3/maxLength.json @@ -0,0 +1,33 @@ +[ + { + "description": "maxLength validation", + "schema": {"maxLength": 2}, + "tests": [ + { + "description": "shorter is valid", + "data": "f", + "valid": true + }, + { + "description": "exact length is valid", + "data": "fo", + "valid": true + }, + { + "description": "too long is invalid", + "data": "foo", + "valid": false + }, + { + "description": "ignores non-strings", + "data": 10, + "valid": true + }, + { + "description": "two supplementary Unicode code points is long enough", + "data": "\uD83D\uDCA9\uD83D\uDCA9", + "valid": true + } + ] + } +] diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft3/maximum.json b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft3/maximum.json new file mode 100644 index 0000000000..86c7b89c9a --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft3/maximum.json @@ -0,0 +1,42 @@ +[ + { + "description": "maximum validation", + "schema": {"maximum": 3.0}, + "tests": [ + { + "description": "below the maximum is valid", + "data": 2.6, + "valid": true + }, + { + "description": "above the maximum is invalid", + "data": 3.5, + "valid": false + }, + { + "description": "ignores non-numbers", + "data": "x", + "valid": true + } + ] + }, + { + "description": "exclusiveMaximum validation", + "schema": { + "maximum": 3.0, + "exclusiveMaximum": true + }, + "tests": [ + { + "description": "below the maximum is still valid", + "data": 2.2, + "valid": true + }, + { + "description": "boundary point is invalid", + "data": 3.0, + "valid": false + } + ] + } +] diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft3/minItems.json b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft3/minItems.json new file mode 100644 index 0000000000..ed5118815e --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft3/minItems.json @@ -0,0 +1,28 @@ +[ + { + "description": "minItems validation", + "schema": {"minItems": 1}, + "tests": [ + { + "description": "longer is valid", + "data": [1, 2], + "valid": true + }, + { + "description": "exact length is valid", + "data": [1], + "valid": true + }, + { + "description": "too short is invalid", + "data": [], + "valid": false + }, + { + "description": "ignores non-arrays", + "data": "", + "valid": true + } + ] + } +] diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft3/minLength.json b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft3/minLength.json new file mode 100644 index 0000000000..3f09158dee --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft3/minLength.json @@ -0,0 +1,33 @@ +[ + { + "description": "minLength validation", + "schema": {"minLength": 2}, + "tests": [ + { + "description": "longer is valid", + "data": "foo", + "valid": true + }, + { + "description": "exact length is valid", + "data": "fo", + "valid": true + }, + { + "description": "too short is invalid", + "data": "f", + "valid": false + }, + { + "description": "ignores non-strings", + "data": 1, + "valid": true + }, + { + "description": "one supplementary Unicode code point is not long enough", + "data": "\uD83D\uDCA9", + "valid": false + } + ] + } +] diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft3/minimum.json b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft3/minimum.json new file mode 100644 index 0000000000..d5bf000bcc --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft3/minimum.json @@ -0,0 +1,42 @@ +[ + { + "description": "minimum validation", + "schema": {"minimum": 1.1}, + "tests": [ + { + "description": "above the minimum is valid", + "data": 2.6, + "valid": true + }, + { + "description": "below the minimum is invalid", + "data": 0.6, + "valid": false + }, + { + "description": "ignores non-numbers", + "data": "x", + "valid": true + } + ] + }, + { + "description": "exclusiveMinimum validation", + "schema": { + "minimum": 1.1, + "exclusiveMinimum": true + }, + "tests": [ + { + "description": "above the minimum is still valid", + "data": 1.2, + "valid": true + }, + { + "description": "boundary point is invalid", + "data": 1.1, + "valid": false + } + ] + } +] diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft3/optional/bignum.json b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft3/optional/bignum.json new file mode 100644 index 0000000000..ccc7c17fe8 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft3/optional/bignum.json @@ -0,0 +1,107 @@ +[ + { + "description": "integer", + "schema": {"type": "integer"}, + "tests": [ + { + "description": "a bignum is an integer", + "data": 12345678910111213141516171819202122232425262728293031, + "valid": true + } + ] + }, + { + "description": "number", + "schema": {"type": "number"}, + "tests": [ + { + "description": "a bignum is a number", + "data": 98249283749234923498293171823948729348710298301928331, + "valid": true + } + ] + }, + { + "description": "integer", + "schema": {"type": "integer"}, + "tests": [ + { + "description": "a negative bignum is an integer", + "data": -12345678910111213141516171819202122232425262728293031, + "valid": true + } + ] + }, + { + "description": "number", + "schema": {"type": "number"}, + "tests": [ + { + "description": "a negative bignum is a number", + "data": -98249283749234923498293171823948729348710298301928331, + "valid": true + } + ] + }, + { + "description": "string", + "schema": {"type": "string"}, + "tests": [ + { + "description": "a bignum is not a string", + "data": 98249283749234923498293171823948729348710298301928331, + "valid": false + } + ] + }, + { + "description": "integer comparison", + "schema": {"maximum": 18446744073709551615}, + "tests": [ + { + "description": "comparison works for high numbers", + "data": 18446744073709551600, + "valid": true + } + ] + }, + { + "description": "float comparison with high precision", + "schema": { + "maximum": 972783798187987123879878123.18878137, + "exclusiveMaximum": true + }, + "tests": [ + { + "description": "comparison works for high numbers", + "data": 972783798187987123879878123.188781371, + "valid": false + } + ] + }, + { + "description": "integer comparison", + "schema": {"minimum": -18446744073709551615}, + "tests": [ + { + "description": "comparison works for very negative numbers", + "data": -18446744073709551600, + "valid": true + } + ] + }, + { + "description": "float comparison with high precision on negative numbers", + "schema": { + "minimum": -972783798187987123879878123.18878137, + "exclusiveMinimum": true + }, + "tests": [ + { + "description": "comparison works for very negative numbers", + "data": -972783798187987123879878123.188781371, + "valid": false + } + ] + } +] diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft3/optional/format.json b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft3/optional/format.json new file mode 100644 index 0000000000..3ca7319dda --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft3/optional/format.json @@ -0,0 +1,222 @@ +[ + { + "description": "validation of regular expressions", + "schema": {"format": "regex"}, + "tests": [ + { + "description": "a valid regular expression", + "data": "([abc])+\\s+$", + "valid": true + }, + { + "description": "a regular expression with unclosed parens is invalid", + "data": "^(abc]", + "valid": false + } + ] + }, + { + "description": "validation of date-time strings", + "schema": {"format": "date-time"}, + "tests": [ + { + "description": "a valid date-time string", + "data": "1963-06-19T08:30:06.283185Z", + "valid": true + }, + { + "description": "an invalid date-time string", + "data": "06/19/1963 08:30:06 PST", + "valid": false + }, + { + "description": "only RFC3339 not all of ISO 8601 are valid", + "data": "2013-350T01:01:01", + "valid": false + } + ] + }, + { + "description": "validation of date strings", + "schema": {"format": "date"}, + "tests": [ + { + "description": "a valid date string", + "data": "1963-06-19", + "valid": true + }, + { + "description": "an invalid date string", + "data": "06/19/1963", + "valid": false + } + ] + }, + { + "description": "validation of time strings", + "schema": {"format": "time"}, + "tests": [ + { + "description": "a valid time string", + "data": "08:30:06", + "valid": true + }, + { + "description": "an invalid time string", + "data": "8:30 AM", + "valid": false + } + ] + }, + { + "description": "validation of URIs", + "schema": {"format": "uri"}, + "tests": [ + { + "description": "a valid URI", + "data": "http://foo.bar/?baz=qux#quux", + "valid": true + }, + { + "description": "a valid protocol-relative URI", + "data": "//foo.bar/?baz=qux#quux", + "valid": true + }, + { + "description": "an invalid URI", + "data": "\\\\WINDOWS\\fileshare", + "valid": false + }, + { + "description": "an invalid URI though valid URI reference", + "data": "abc", + "valid": false + } + ] + }, + { + "description": "validation of e-mail addresses", + "schema": {"format": "email"}, + "tests": [ + { + "description": "a valid e-mail address", + "data": "joe.bloggs@example.com", + "valid": true + }, + { + "description": "an invalid e-mail address", + "data": "2962", + "valid": false + } + ] + }, + { + "description": "validation of IP addresses", + "schema": {"format": "ip-address"}, + "tests": [ + { + "description": "a valid IP address", + "data": "192.168.0.1", + "valid": true + }, + { + "description": "an IP address with too many components", + "data": "127.0.0.0.1", + "valid": false + }, + { + "description": "an IP address with out-of-range values", + "data": "256.256.256.256", + "valid": false + } + ] + }, + { + "description": "validation of IPv6 addresses", + "schema": {"format": "ipv6"}, + "tests": [ + { + "description": "a valid IPv6 address", + "data": "::1", + "valid": true + }, + { + "description": "an IPv6 address with out-of-range values", + "data": "12345::", + "valid": false + }, + { + "description": "an IPv6 address with too many components", + "data": "1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1", + "valid": false + }, + { + "description": "an IPv6 address containing illegal characters", + "data": "::laptop", + "valid": false + } + ] + }, + { + "description": "validation of host names", + "schema": {"format": "host-name"}, + "tests": [ + { + "description": "a valid host name", + "data": "www.example.com", + "valid": true + }, + { + "description": "a host name starting with an illegal character", + "data": "-a-host-name-that-starts-with--", + "valid": false + }, + { + "description": "a host name containing illegal characters", + "data": "not_a_valid_host_name", + "valid": false + }, + { + "description": "a host name with a component too long", + "data": "a-vvvvvvvvvvvvvvvveeeeeeeeeeeeeeeerrrrrrrrrrrrrrrryyyyyyyyyyyyyyyy-long-host-name-component", + "valid": false + } + ] + }, + { + "description": "validation of CSS colors", + "schema": {"format": "color"}, + "tests": [ + { + "description": "a valid CSS color name", + "data": "fuchsia", + "valid": true + }, + { + "description": "a valid six-digit CSS color code", + "data": "#CC8899", + "valid": true + }, + { + "description": "a valid three-digit CSS color code", + "data": "#C89", + "valid": true + }, + { + "description": "an invalid CSS color code", + "data": "#00332520", + "valid": false + }, + { + "description": "an invalid CSS color name", + "data": "puce", + "valid": false + }, + { + "description": "a CSS color name containing invalid characters", + "data": "light_grayish_red-violet", + "valid": false + } + ] + } +] diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft3/optional/jsregex.json b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft3/optional/jsregex.json new file mode 100644 index 0000000000..03fe97724c --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft3/optional/jsregex.json @@ -0,0 +1,18 @@ +[ + { + "description": "ECMA 262 regex dialect recognition", + "schema": { "format": "regex" }, + "tests": [ + { + "description": "[^] is a valid regex", + "data": "[^]", + "valid": true + }, + { + "description": "ECMA 262 has no support for lookbehind", + "data": "(?<=foo)bar", + "valid": false + } + ] + } +] diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft3/optional/zeroTerminatedFloats.json b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft3/optional/zeroTerminatedFloats.json new file mode 100644 index 0000000000..9b50ea2776 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft3/optional/zeroTerminatedFloats.json @@ -0,0 +1,15 @@ +[ + { + "description": "some languages do not distinguish between different types of numeric value", + "schema": { + "type": "integer" + }, + "tests": [ + { + "description": "a float is not an integer even without fractional part", + "data": 1.0, + "valid": false + } + ] + } +] diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft3/pattern.json b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft3/pattern.json new file mode 100644 index 0000000000..25e7299731 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft3/pattern.json @@ -0,0 +1,34 @@ +[ + { + "description": "pattern validation", + "schema": {"pattern": "^a*$"}, + "tests": [ + { + "description": "a matching pattern is valid", + "data": "aaa", + "valid": true + }, + { + "description": "a non-matching pattern is invalid", + "data": "abc", + "valid": false + }, + { + "description": "ignores non-strings", + "data": true, + "valid": true + } + ] + }, + { + "description": "pattern is not anchored", + "schema": {"pattern": "a+"}, + "tests": [ + { + "description": "matches a substring", + "data": "xxaayy", + "valid": true + } + ] + } +] diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft3/patternProperties.json b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft3/patternProperties.json new file mode 100644 index 0000000000..18586e5dab --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft3/patternProperties.json @@ -0,0 +1,110 @@ +[ + { + "description": + "patternProperties validates properties matching a regex", + "schema": { + "patternProperties": { + "f.*o": {"type": "integer"} + } + }, + "tests": [ + { + "description": "a single valid match is valid", + "data": {"foo": 1}, + "valid": true + }, + { + "description": "multiple valid matches is valid", + "data": {"foo": 1, "foooooo" : 2}, + "valid": true + }, + { + "description": "a single invalid match is invalid", + "data": {"foo": "bar", "fooooo": 2}, + "valid": false + }, + { + "description": "multiple invalid matches is invalid", + "data": {"foo": "bar", "foooooo" : "baz"}, + "valid": false + }, + { + "description": "ignores non-objects", + "data": 12, + "valid": true + } + ] + }, + { + "description": "multiple simultaneous patternProperties are validated", + "schema": { + "patternProperties": { + "a*": {"type": "integer"}, + "aaa*": {"maximum": 20} + } + }, + "tests": [ + { + "description": "a single valid match is valid", + "data": {"a": 21}, + "valid": true + }, + { + "description": "a simultaneous match is valid", + "data": {"aaaa": 18}, + "valid": true + }, + { + "description": "multiple matches is valid", + "data": {"a": 21, "aaaa": 18}, + "valid": true + }, + { + "description": "an invalid due to one is invalid", + "data": {"a": "bar"}, + "valid": false + }, + { + "description": "an invalid due to the other is invalid", + "data": {"aaaa": 31}, + "valid": false + }, + { + "description": "an invalid due to both is invalid", + "data": {"aaa": "foo", "aaaa": 31}, + "valid": false + } + ] + }, + { + "description": "regexes are not anchored by default and are case sensitive", + "schema": { + "patternProperties": { + "[0-9]{2,}": { "type": "boolean" }, + "X_": { "type": "string" } + } + }, + "tests": [ + { + "description": "non recognized members are ignored", + "data": { "answer 1": "42" }, + "valid": true + }, + { + "description": "recognized members are accounted for", + "data": { "a31b": null }, + "valid": false + }, + { + "description": "regexes are case sensitive", + "data": { "a_x_3": 3 }, + "valid": true + }, + { + "description": "regexes are case sensitive, 2", + "data": { "a_X_3": 3 }, + "valid": false + } + ] + } +] diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft3/properties.json b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft3/properties.json new file mode 100644 index 0000000000..cd1644dcd9 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft3/properties.json @@ -0,0 +1,92 @@ +[ + { + "description": "object properties validation", + "schema": { + "properties": { + "foo": {"type": "integer"}, + "bar": {"type": "string"} + } + }, + "tests": [ + { + "description": "both properties present and valid is valid", + "data": {"foo": 1, "bar": "baz"}, + "valid": true + }, + { + "description": "one property invalid is invalid", + "data": {"foo": 1, "bar": {}}, + "valid": false + }, + { + "description": "both properties invalid is invalid", + "data": {"foo": [], "bar": {}}, + "valid": false + }, + { + "description": "doesn't invalidate other properties", + "data": {"quux": []}, + "valid": true + }, + { + "description": "ignores non-objects", + "data": [], + "valid": true + } + ] + }, + { + "description": + "properties, patternProperties, additionalProperties interaction", + "schema": { + "properties": { + "foo": {"type": "array", "maxItems": 3}, + "bar": {"type": "array"} + }, + "patternProperties": {"f.o": {"minItems": 2}}, + "additionalProperties": {"type": "integer"} + }, + "tests": [ + { + "description": "property validates property", + "data": {"foo": [1, 2]}, + "valid": true + }, + { + "description": "property invalidates property", + "data": {"foo": [1, 2, 3, 4]}, + "valid": false + }, + { + "description": "patternProperty invalidates property", + "data": {"foo": []}, + "valid": false + }, + { + "description": "patternProperty validates nonproperty", + "data": {"fxo": [1, 2]}, + "valid": true + }, + { + "description": "patternProperty invalidates nonproperty", + "data": {"fxo": []}, + "valid": false + }, + { + "description": "additionalProperty ignores property", + "data": {"bar": []}, + "valid": true + }, + { + "description": "additionalProperty validates others", + "data": {"quux": 3}, + "valid": true + }, + { + "description": "additionalProperty invalidates others", + "data": {"quux": "foo"}, + "valid": false + } + ] + } +] diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft3/ref.json b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft3/ref.json new file mode 100644 index 0000000000..903ecb6bce --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft3/ref.json @@ -0,0 +1,159 @@ +[ + { + "description": "root pointer ref", + "schema": { + "properties": { + "foo": {"$ref": "#"} + }, + "additionalProperties": false + }, + "tests": [ + { + "description": "match", + "data": {"foo": false}, + "valid": true + }, + { + "description": "recursive match", + "data": {"foo": {"foo": false}}, + "valid": true + }, + { + "description": "mismatch", + "data": {"bar": false}, + "valid": false + }, + { + "description": "recursive mismatch", + "data": {"foo": {"bar": false}}, + "valid": false + } + ] + }, + { + "description": "relative pointer ref to object", + "schema": { + "properties": { + "foo": {"type": "integer"}, + "bar": {"$ref": "#/properties/foo"} + } + }, + "tests": [ + { + "description": "match", + "data": {"bar": 3}, + "valid": true + }, + { + "description": "mismatch", + "data": {"bar": true}, + "valid": false + } + ] + }, + { + "description": "relative pointer ref to array", + "schema": { + "items": [ + {"type": "integer"}, + {"$ref": "#/items/0"} + ] + }, + "tests": [ + { + "description": "match array", + "data": [1, 2], + "valid": true + }, + { + "description": "mismatch array", + "data": [1, "foo"], + "valid": false + } + ] + }, + { + "description": "escaped pointer ref", + "schema": { + "tilda~field": {"type": "integer"}, + "slash/field": {"type": "integer"}, + "percent%field": {"type": "integer"}, + "properties": { + "tilda": {"$ref": "#/tilda~0field"}, + "slash": {"$ref": "#/slash~1field"}, + "percent": {"$ref": "#/percent%25field"} + } + }, + "tests": [ + { + "description": "slash invalid", + "data": {"slash": "aoeu"}, + "valid": false + }, + { + "description": "tilda invalid", + "data": {"tilda": "aoeu"}, + "valid": false + }, + { + "description": "percent invalid", + "data": {"percent": "aoeu"}, + "valid": false + }, + { + "description": "slash valid", + "data": {"slash": 123}, + "valid": true + }, + { + "description": "tilda valid", + "data": {"tilda": 123}, + "valid": true + }, + { + "description": "percent valid", + "data": {"percent": 123}, + "valid": true + } + ] + }, + { + "description": "nested refs", + "schema": { + "definitions": { + "a": {"type": "integer"}, + "b": {"$ref": "#/definitions/a"}, + "c": {"$ref": "#/definitions/b"} + }, + "$ref": "#/definitions/c" + }, + "tests": [ + { + "description": "nested ref valid", + "data": 5, + "valid": true + }, + { + "description": "nested ref invalid", + "data": "a", + "valid": false + } + ] + }, + { + "description": "remote ref, containing refs itself", + "schema": {"$ref": "http://json-schema.org/draft-03/schema#"}, + "tests": [ + { + "description": "remote ref valid", + "data": {"items": {"type": "integer"}}, + "valid": true + }, + { + "description": "remote ref invalid", + "data": {"items": {"type": 1}}, + "valid": false + } + ] + } +] diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft3/refRemote.json b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft3/refRemote.json new file mode 100644 index 0000000000..4ca804732c --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft3/refRemote.json @@ -0,0 +1,74 @@ +[ + { + "description": "remote ref", + "schema": {"$ref": "http://localhost:1234/integer.json"}, + "tests": [ + { + "description": "remote ref valid", + "data": 1, + "valid": true + }, + { + "description": "remote ref invalid", + "data": "a", + "valid": false + } + ] + }, + { + "description": "fragment within remote ref", + "schema": {"$ref": "http://localhost:1234/subSchemas.json#/integer"}, + "tests": [ + { + "description": "remote fragment valid", + "data": 1, + "valid": true + }, + { + "description": "remote fragment invalid", + "data": "a", + "valid": false + } + ] + }, + { + "description": "ref within remote ref", + "schema": { + "$ref": "http://localhost:1234/subSchemas.json#/refToInteger" + }, + "tests": [ + { + "description": "ref within ref valid", + "data": 1, + "valid": true + }, + { + "description": "ref within ref invalid", + "data": "a", + "valid": false + } + ] + }, + { + "description": "change resolution scope", + "schema": { + "id": "http://localhost:1234/", + "items": { + "id": "folder/", + "items": {"$ref": "folderInteger.json"} + } + }, + "tests": [ + { + "description": "changed scope ref valid", + "data": [[1]], + "valid": true + }, + { + "description": "changed scope ref invalid", + "data": [["a"]], + "valid": false + } + ] + } +] diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft3/required.json b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft3/required.json new file mode 100644 index 0000000000..aaaf024273 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft3/required.json @@ -0,0 +1,53 @@ +[ + { + "description": "required validation", + "schema": { + "properties": { + "foo": {"required" : true}, + "bar": {} + } + }, + "tests": [ + { + "description": "present required property is valid", + "data": {"foo": 1}, + "valid": true + }, + { + "description": "non-present required property is invalid", + "data": {"bar": 1}, + "valid": false + } + ] + }, + { + "description": "required default validation", + "schema": { + "properties": { + "foo": {} + } + }, + "tests": [ + { + "description": "not required by default", + "data": {}, + "valid": true + } + ] + }, + { + "description": "required explicitly false validation", + "schema": { + "properties": { + "foo": {"required": false} + } + }, + "tests": [ + { + "description": "not required if required is false", + "data": {}, + "valid": true + } + ] + } +] diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft3/type.json b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft3/type.json new file mode 100644 index 0000000000..337da1206d --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft3/type.json @@ -0,0 +1,474 @@ +[ + { + "description": "integer type matches integers", + "schema": {"type": "integer"}, + "tests": [ + { + "description": "an integer is an integer", + "data": 1, + "valid": true + }, + { + "description": "a float is not an integer", + "data": 1.1, + "valid": false + }, + { + "description": "a string is not an integer", + "data": "foo", + "valid": false + }, + { + "description": "an object is not an integer", + "data": {}, + "valid": false + }, + { + "description": "an array is not an integer", + "data": [], + "valid": false + }, + { + "description": "a boolean is not an integer", + "data": true, + "valid": false + }, + { + "description": "null is not an integer", + "data": null, + "valid": false + } + ] + }, + { + "description": "number type matches numbers", + "schema": {"type": "number"}, + "tests": [ + { + "description": "an integer is a number", + "data": 1, + "valid": true + }, + { + "description": "a float is a number", + "data": 1.1, + "valid": true + }, + { + "description": "a string is not a number", + "data": "foo", + "valid": false + }, + { + "description": "an object is not a number", + "data": {}, + "valid": false + }, + { + "description": "an array is not a number", + "data": [], + "valid": false + }, + { + "description": "a boolean is not a number", + "data": true, + "valid": false + }, + { + "description": "null is not a number", + "data": null, + "valid": false + } + ] + }, + { + "description": "string type matches strings", + "schema": {"type": "string"}, + "tests": [ + { + "description": "1 is not a string", + "data": 1, + "valid": false + }, + { + "description": "a float is not a string", + "data": 1.1, + "valid": false + }, + { + "description": "a string is a string", + "data": "foo", + "valid": true + }, + { + "description": "an object is not a string", + "data": {}, + "valid": false + }, + { + "description": "an array is not a string", + "data": [], + "valid": false + }, + { + "description": "a boolean is not a string", + "data": true, + "valid": false + }, + { + "description": "null is not a string", + "data": null, + "valid": false + } + ] + }, + { + "description": "object type matches objects", + "schema": {"type": "object"}, + "tests": [ + { + "description": "an integer is not an object", + "data": 1, + "valid": false + }, + { + "description": "a float is not an object", + "data": 1.1, + "valid": false + }, + { + "description": "a string is not an object", + "data": "foo", + "valid": false + }, + { + "description": "an object is an object", + "data": {}, + "valid": true + }, + { + "description": "an array is not an object", + "data": [], + "valid": false + }, + { + "description": "a boolean is not an object", + "data": true, + "valid": false + }, + { + "description": "null is not an object", + "data": null, + "valid": false + } + ] + }, + { + "description": "array type matches arrays", + "schema": {"type": "array"}, + "tests": [ + { + "description": "an integer is not an array", + "data": 1, + "valid": false + }, + { + "description": "a float is not an array", + "data": 1.1, + "valid": false + }, + { + "description": "a string is not an array", + "data": "foo", + "valid": false + }, + { + "description": "an object is not an array", + "data": {}, + "valid": false + }, + { + "description": "an array is an array", + "data": [], + "valid": true + }, + { + "description": "a boolean is not an array", + "data": true, + "valid": false + }, + { + "description": "null is not an array", + "data": null, + "valid": false + } + ] + }, + { + "description": "boolean type matches booleans", + "schema": {"type": "boolean"}, + "tests": [ + { + "description": "an integer is not a boolean", + "data": 1, + "valid": false + }, + { + "description": "a float is not a boolean", + "data": 1.1, + "valid": false + }, + { + "description": "a string is not a boolean", + "data": "foo", + "valid": false + }, + { + "description": "an object is not a boolean", + "data": {}, + "valid": false + }, + { + "description": "an array is not a boolean", + "data": [], + "valid": false + }, + { + "description": "a boolean is a boolean", + "data": true, + "valid": true + }, + { + "description": "null is not a boolean", + "data": null, + "valid": false + } + ] + }, + { + "description": "null type matches only the null object", + "schema": {"type": "null"}, + "tests": [ + { + "description": "an integer is not null", + "data": 1, + "valid": false + }, + { + "description": "a float is not null", + "data": 1.1, + "valid": false + }, + { + "description": "a string is not null", + "data": "foo", + "valid": false + }, + { + "description": "an object is not null", + "data": {}, + "valid": false + }, + { + "description": "an array is not null", + "data": [], + "valid": false + }, + { + "description": "a boolean is not null", + "data": true, + "valid": false + }, + { + "description": "null is null", + "data": null, + "valid": true + } + ] + }, + { + "description": "any type matches any type", + "schema": {"type": "any"}, + "tests": [ + { + "description": "any type includes integers", + "data": 1, + "valid": true + }, + { + "description": "any type includes float", + "data": 1.1, + "valid": true + }, + { + "description": "any type includes string", + "data": "foo", + "valid": true + }, + { + "description": "any type includes object", + "data": {}, + "valid": true + }, + { + "description": "any type includes array", + "data": [], + "valid": true + }, + { + "description": "any type includes boolean", + "data": true, + "valid": true + }, + { + "description": "any type includes null", + "data": null, + "valid": true + } + ] + }, + { + "description": "multiple types can be specified in an array", + "schema": {"type": ["integer", "string"]}, + "tests": [ + { + "description": "an integer is valid", + "data": 1, + "valid": true + }, + { + "description": "a string is valid", + "data": "foo", + "valid": true + }, + { + "description": "a float is invalid", + "data": 1.1, + "valid": false + }, + { + "description": "an object is invalid", + "data": {}, + "valid": false + }, + { + "description": "an array is invalid", + "data": [], + "valid": false + }, + { + "description": "a boolean is invalid", + "data": true, + "valid": false + }, + { + "description": "null is invalid", + "data": null, + "valid": false + } + ] + }, + { + "description": "types can include schemas", + "schema": { + "type": [ + "array", + {"type": "object"} + ] + }, + "tests": [ + { + "description": "an integer is invalid", + "data": 1, + "valid": false + }, + { + "description": "a string is invalid", + "data": "foo", + "valid": false + }, + { + "description": "a float is invalid", + "data": 1.1, + "valid": false + }, + { + "description": "an object is valid", + "data": {}, + "valid": true + }, + { + "description": "an array is valid", + "data": [], + "valid": true + }, + { + "description": "a boolean is invalid", + "data": true, + "valid": false + }, + { + "description": "null is invalid", + "data": null, + "valid": false + } + ] + }, + { + "description": + "when types includes a schema it should fully validate the schema", + "schema": { + "type": [ + "integer", + { + "properties": { + "foo": {"type": "null"} + } + } + ] + }, + "tests": [ + { + "description": "an integer is valid", + "data": 1, + "valid": true + }, + { + "description": "an object is valid only if it is fully valid", + "data": {"foo": null}, + "valid": true + }, + { + "description": "an object is invalid otherwise", + "data": {"foo": "bar"}, + "valid": false + } + ] + }, + { + "description": "types from separate schemas are merged", + "schema": { + "type": [ + {"type": ["string"]}, + {"type": ["array", "null"]} + ] + }, + "tests": [ + { + "description": "an integer is invalid", + "data": 1, + "valid": false + }, + { + "description": "a string is valid", + "data": "foo", + "valid": true + }, + { + "description": "an array is valid", + "data": [1, 2, 3], + "valid": true + } + ] + } +] diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft3/uniqueItems.json b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft3/uniqueItems.json new file mode 100644 index 0000000000..c1f4ab99c9 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft3/uniqueItems.json @@ -0,0 +1,79 @@ +[ + { + "description": "uniqueItems validation", + "schema": {"uniqueItems": true}, + "tests": [ + { + "description": "unique array of integers is valid", + "data": [1, 2], + "valid": true + }, + { + "description": "non-unique array of integers is invalid", + "data": [1, 1], + "valid": false + }, + { + "description": "numbers are unique if mathematically unequal", + "data": [1.0, 1.00, 1], + "valid": false + }, + { + "description": "unique array of objects is valid", + "data": [{"foo": "bar"}, {"foo": "baz"}], + "valid": true + }, + { + "description": "non-unique array of objects is invalid", + "data": [{"foo": "bar"}, {"foo": "bar"}], + "valid": false + }, + { + "description": "unique array of nested objects is valid", + "data": [ + {"foo": {"bar" : {"baz" : true}}}, + {"foo": {"bar" : {"baz" : false}}} + ], + "valid": true + }, + { + "description": "non-unique array of nested objects is invalid", + "data": [ + {"foo": {"bar" : {"baz" : true}}}, + {"foo": {"bar" : {"baz" : true}}} + ], + "valid": false + }, + { + "description": "unique array of arrays is valid", + "data": [["foo"], ["bar"]], + "valid": true + }, + { + "description": "non-unique array of arrays is invalid", + "data": [["foo"], ["foo"]], + "valid": false + }, + { + "description": "1 and true are unique", + "data": [1, true], + "valid": true + }, + { + "description": "0 and false are unique", + "data": [0, false], + "valid": true + }, + { + "description": "unique heterogeneous types are valid", + "data": [{}, [1], true, null, 1], + "valid": true + }, + { + "description": "non-unique heterogeneous types are invalid", + "data": [{}, [1], true, null, {}, 1], + "valid": false + } + ] + } +] diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft4/additionalItems.json b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft4/additionalItems.json new file mode 100644 index 0000000000..521745c8d6 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft4/additionalItems.json @@ -0,0 +1,82 @@ +[ + { + "description": "additionalItems as schema", + "schema": { + "items": [{}], + "additionalItems": {"type": "integer"} + }, + "tests": [ + { + "description": "additional items match schema", + "data": [ null, 2, 3, 4 ], + "valid": true + }, + { + "description": "additional items do not match schema", + "data": [ null, 2, 3, "foo" ], + "valid": false + } + ] + }, + { + "description": "items is schema, no additionalItems", + "schema": { + "items": {}, + "additionalItems": false + }, + "tests": [ + { + "description": "all items match schema", + "data": [ 1, 2, 3, 4, 5 ], + "valid": true + } + ] + }, + { + "description": "array of items with no additionalItems", + "schema": { + "items": [{}, {}, {}], + "additionalItems": false + }, + "tests": [ + { + "description": "no additional items present", + "data": [ 1, 2, 3 ], + "valid": true + }, + { + "description": "additional items are not permitted", + "data": [ 1, 2, 3, 4 ], + "valid": false + } + ] + }, + { + "description": "additionalItems as false without items", + "schema": {"additionalItems": false}, + "tests": [ + { + "description": + "items defaults to empty schema so everything is valid", + "data": [ 1, 2, 3, 4, 5 ], + "valid": true + }, + { + "description": "ignores non-arrays", + "data": {"foo" : "bar"}, + "valid": true + } + ] + }, + { + "description": "additionalItems are allowed by default", + "schema": {"items": [{"type": "integer"}]}, + "tests": [ + { + "description": "only the first item is validated", + "data": [1, "foo", false], + "valid": true + } + ] + } +] diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft4/additionalProperties.json b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft4/additionalProperties.json new file mode 100644 index 0000000000..40831f9e9a --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft4/additionalProperties.json @@ -0,0 +1,88 @@ +[ + { + "description": + "additionalProperties being false does not allow other properties", + "schema": { + "properties": {"foo": {}, "bar": {}}, + "patternProperties": { "^v": {} }, + "additionalProperties": false + }, + "tests": [ + { + "description": "no additional properties is valid", + "data": {"foo": 1}, + "valid": true + }, + { + "description": "an additional property is invalid", + "data": {"foo" : 1, "bar" : 2, "quux" : "boom"}, + "valid": false + }, + { + "description": "ignores non-objects", + "data": [1, 2, 3], + "valid": true + }, + { + "description": "patternProperties are not additional properties", + "data": {"foo":1, "vroom": 2}, + "valid": true + } + ] + }, + { + "description": + "additionalProperties allows a schema which should validate", + "schema": { + "properties": {"foo": {}, "bar": {}}, + "additionalProperties": {"type": "boolean"} + }, + "tests": [ + { + "description": "no additional properties is valid", + "data": {"foo": 1}, + "valid": true + }, + { + "description": "an additional valid property is valid", + "data": {"foo" : 1, "bar" : 2, "quux" : true}, + "valid": true + }, + { + "description": "an additional invalid property is invalid", + "data": {"foo" : 1, "bar" : 2, "quux" : 12}, + "valid": false + } + ] + }, + { + "description": + "additionalProperties can exist by itself", + "schema": { + "additionalProperties": {"type": "boolean"} + }, + "tests": [ + { + "description": "an additional valid property is valid", + "data": {"foo" : true}, + "valid": true + }, + { + "description": "an additional invalid property is invalid", + "data": {"foo" : 1}, + "valid": false + } + ] + }, + { + "description": "additionalProperties are allowed by default", + "schema": {"properties": {"foo": {}, "bar": {}}}, + "tests": [ + { + "description": "additional properties are allowed", + "data": {"foo": 1, "bar": 2, "quux": true}, + "valid": true + } + ] + } +] diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft4/allOf.json b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft4/allOf.json new file mode 100644 index 0000000000..bbb5f89e4b --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft4/allOf.json @@ -0,0 +1,112 @@ +[ + { + "description": "allOf", + "schema": { + "allOf": [ + { + "properties": { + "bar": {"type": "integer"} + }, + "required": ["bar"] + }, + { + "properties": { + "foo": {"type": "string"} + }, + "required": ["foo"] + } + ] + }, + "tests": [ + { + "description": "allOf", + "data": {"foo": "baz", "bar": 2}, + "valid": true + }, + { + "description": "mismatch second", + "data": {"foo": "baz"}, + "valid": false + }, + { + "description": "mismatch first", + "data": {"bar": 2}, + "valid": false + }, + { + "description": "wrong type", + "data": {"foo": "baz", "bar": "quux"}, + "valid": false + } + ] + }, + { + "description": "allOf with base schema", + "schema": { + "properties": {"bar": {"type": "integer"}}, + "required": ["bar"], + "allOf" : [ + { + "properties": { + "foo": {"type": "string"} + }, + "required": ["foo"] + }, + { + "properties": { + "baz": {"type": "null"} + }, + "required": ["baz"] + } + ] + }, + "tests": [ + { + "description": "valid", + "data": {"foo": "quux", "bar": 2, "baz": null}, + "valid": true + }, + { + "description": "mismatch base schema", + "data": {"foo": "quux", "baz": null}, + "valid": false + }, + { + "description": "mismatch first allOf", + "data": {"bar": 2, "baz": null}, + "valid": false + }, + { + "description": "mismatch second allOf", + "data": {"foo": "quux", "bar": 2}, + "valid": false + }, + { + "description": "mismatch both", + "data": {"bar": 2}, + "valid": false + } + ] + }, + { + "description": "allOf simple types", + "schema": { + "allOf": [ + {"maximum": 30}, + {"minimum": 20} + ] + }, + "tests": [ + { + "description": "valid", + "data": 25, + "valid": true + }, + { + "description": "mismatch one", + "data": 35, + "valid": false + } + ] + } +] diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft4/anyOf.json b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft4/anyOf.json new file mode 100644 index 0000000000..a58714afd8 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft4/anyOf.json @@ -0,0 +1,68 @@ +[ + { + "description": "anyOf", + "schema": { + "anyOf": [ + { + "type": "integer" + }, + { + "minimum": 2 + } + ] + }, + "tests": [ + { + "description": "first anyOf valid", + "data": 1, + "valid": true + }, + { + "description": "second anyOf valid", + "data": 2.5, + "valid": true + }, + { + "description": "both anyOf valid", + "data": 3, + "valid": true + }, + { + "description": "neither anyOf valid", + "data": 1.5, + "valid": false + } + ] + }, + { + "description": "anyOf with base schema", + "schema": { + "type": "string", + "anyOf" : [ + { + "maxLength": 2 + }, + { + "minLength": 4 + } + ] + }, + "tests": [ + { + "description": "mismatch base schema", + "data": 3, + "valid": false + }, + { + "description": "one anyOf valid", + "data": "foobar", + "valid": true + }, + { + "description": "both anyOf invalid", + "data": "foo", + "valid": false + } + ] + } +] diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft4/default.json b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft4/default.json new file mode 100644 index 0000000000..17629779fb --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft4/default.json @@ -0,0 +1,49 @@ +[ + { + "description": "invalid type for default", + "schema": { + "properties": { + "foo": { + "type": "integer", + "default": [] + } + } + }, + "tests": [ + { + "description": "valid when property is specified", + "data": {"foo": 13}, + "valid": true + }, + { + "description": "still valid when the invalid default is used", + "data": {}, + "valid": true + } + ] + }, + { + "description": "invalid string value for default", + "schema": { + "properties": { + "bar": { + "type": "string", + "minLength": 4, + "default": "bad" + } + } + }, + "tests": [ + { + "description": "valid when property is specified", + "data": {"bar": "good"}, + "valid": true + }, + { + "description": "still valid when the invalid default is used", + "data": {}, + "valid": true + } + ] + } +] diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft4/definitions.json b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft4/definitions.json new file mode 100644 index 0000000000..cf935a3215 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft4/definitions.json @@ -0,0 +1,32 @@ +[ + { + "description": "valid definition", + "schema": {"$ref": "http://json-schema.org/draft-04/schema#"}, + "tests": [ + { + "description": "valid definition schema", + "data": { + "definitions": { + "foo": {"type": "integer"} + } + }, + "valid": true + } + ] + }, + { + "description": "invalid definition", + "schema": {"$ref": "http://json-schema.org/draft-04/schema#"}, + "tests": [ + { + "description": "invalid definition schema", + "data": { + "definitions": { + "foo": {"type": 1} + } + }, + "valid": false + } + ] + } +] diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft4/dependencies.json b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft4/dependencies.json new file mode 100644 index 0000000000..7b9b16a7e1 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft4/dependencies.json @@ -0,0 +1,113 @@ +[ + { + "description": "dependencies", + "schema": { + "dependencies": {"bar": ["foo"]} + }, + "tests": [ + { + "description": "neither", + "data": {}, + "valid": true + }, + { + "description": "nondependant", + "data": {"foo": 1}, + "valid": true + }, + { + "description": "with dependency", + "data": {"foo": 1, "bar": 2}, + "valid": true + }, + { + "description": "missing dependency", + "data": {"bar": 2}, + "valid": false + }, + { + "description": "ignores non-objects", + "data": "foo", + "valid": true + } + ] + }, + { + "description": "multiple dependencies", + "schema": { + "dependencies": {"quux": ["foo", "bar"]} + }, + "tests": [ + { + "description": "neither", + "data": {}, + "valid": true + }, + { + "description": "nondependants", + "data": {"foo": 1, "bar": 2}, + "valid": true + }, + { + "description": "with dependencies", + "data": {"foo": 1, "bar": 2, "quux": 3}, + "valid": true + }, + { + "description": "missing dependency", + "data": {"foo": 1, "quux": 2}, + "valid": false + }, + { + "description": "missing other dependency", + "data": {"bar": 1, "quux": 2}, + "valid": false + }, + { + "description": "missing both dependencies", + "data": {"quux": 1}, + "valid": false + } + ] + }, + { + "description": "multiple dependencies subschema", + "schema": { + "dependencies": { + "bar": { + "properties": { + "foo": {"type": "integer"}, + "bar": {"type": "integer"} + } + } + } + }, + "tests": [ + { + "description": "valid", + "data": {"foo": 1, "bar": 2}, + "valid": true + }, + { + "description": "no dependency", + "data": {"foo": "quux"}, + "valid": true + }, + { + "description": "wrong type", + "data": {"foo": "quux", "bar": 2}, + "valid": false + }, + { + "description": "wrong type other", + "data": {"foo": 2, "bar": "quux"}, + "valid": false + }, + { + "description": "wrong type both", + "data": {"foo": "quux", "bar": "quux"}, + "valid": false + } + ] + } +] diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft4/enum.json b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft4/enum.json new file mode 100644 index 0000000000..f124436a7d --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft4/enum.json @@ -0,0 +1,72 @@ +[ + { + "description": "simple enum validation", + "schema": {"enum": [1, 2, 3]}, + "tests": [ + { + "description": "one of the enum is valid", + "data": 1, + "valid": true + }, + { + "description": "something else is invalid", + "data": 4, + "valid": false + } + ] + }, + { + "description": "heterogeneous enum validation", + "schema": {"enum": [6, "foo", [], true, {"foo": 12}]}, + "tests": [ + { + "description": "one of the enum is valid", + "data": [], + "valid": true + }, + { + "description": "something else is invalid", + "data": null, + "valid": false + }, + { + "description": "objects are deep compared", + "data": {"foo": false}, + "valid": false + } + ] + }, + { + "description": "enums in properties", + "schema": { + "type":"object", + "properties": { + "foo": {"enum":["foo"]}, + "bar": {"enum":["bar"]} + }, + "required": ["bar"] + }, + "tests": [ + { + "description": "both properties are valid", + "data": {"foo":"foo", "bar":"bar"}, + "valid": true + }, + { + "description": "missing optional property is valid", + "data": {"bar":"bar"}, + "valid": true + }, + { + "description": "missing required property is invalid", + "data": {"foo":"foo"}, + "valid": false + }, + { + "description": "missing all properties is invalid", + "data": {}, + "valid": false + } + ] + } +] diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft4/items.json b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft4/items.json new file mode 100644 index 0000000000..f5e18a1384 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft4/items.json @@ -0,0 +1,46 @@ +[ + { + "description": "a schema given for items", + "schema": { + "items": {"type": "integer"} + }, + "tests": [ + { + "description": "valid items", + "data": [ 1, 2, 3 ], + "valid": true + }, + { + "description": "wrong type of items", + "data": [1, "x"], + "valid": false + }, + { + "description": "ignores non-arrays", + "data": {"foo" : "bar"}, + "valid": true + } + ] + }, + { + "description": "an array of schemas for items", + "schema": { + "items": [ + {"type": "integer"}, + {"type": "string"} + ] + }, + "tests": [ + { + "description": "correct types", + "data": [ 1, "foo" ], + "valid": true + }, + { + "description": "wrong types", + "data": [ "foo", 1 ], + "valid": false + } + ] + } +] diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft4/maxItems.json b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft4/maxItems.json new file mode 100644 index 0000000000..3b53a6b371 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft4/maxItems.json @@ -0,0 +1,28 @@ +[ + { + "description": "maxItems validation", + "schema": {"maxItems": 2}, + "tests": [ + { + "description": "shorter is valid", + "data": [1], + "valid": true + }, + { + "description": "exact length is valid", + "data": [1, 2], + "valid": true + }, + { + "description": "too long is invalid", + "data": [1, 2, 3], + "valid": false + }, + { + "description": "ignores non-arrays", + "data": "foobar", + "valid": true + } + ] + } +] diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft4/maxLength.json b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft4/maxLength.json new file mode 100644 index 0000000000..811d35b253 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft4/maxLength.json @@ -0,0 +1,33 @@ +[ + { + "description": "maxLength validation", + "schema": {"maxLength": 2}, + "tests": [ + { + "description": "shorter is valid", + "data": "f", + "valid": true + }, + { + "description": "exact length is valid", + "data": "fo", + "valid": true + }, + { + "description": "too long is invalid", + "data": "foo", + "valid": false + }, + { + "description": "ignores non-strings", + "data": 100, + "valid": true + }, + { + "description": "two supplementary Unicode code points is long enough", + "data": "\uD83D\uDCA9\uD83D\uDCA9", + "valid": true + } + ] + } +] diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft4/maxProperties.json b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft4/maxProperties.json new file mode 100644 index 0000000000..d282446ad6 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft4/maxProperties.json @@ -0,0 +1,28 @@ +[ + { + "description": "maxProperties validation", + "schema": {"maxProperties": 2}, + "tests": [ + { + "description": "shorter is valid", + "data": {"foo": 1}, + "valid": true + }, + { + "description": "exact length is valid", + "data": {"foo": 1, "bar": 2}, + "valid": true + }, + { + "description": "too long is invalid", + "data": {"foo": 1, "bar": 2, "baz": 3}, + "valid": false + }, + { + "description": "ignores non-objects", + "data": "foobar", + "valid": true + } + ] + } +] diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft4/maximum.json b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft4/maximum.json new file mode 100644 index 0000000000..86c7b89c9a --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft4/maximum.json @@ -0,0 +1,42 @@ +[ + { + "description": "maximum validation", + "schema": {"maximum": 3.0}, + "tests": [ + { + "description": "below the maximum is valid", + "data": 2.6, + "valid": true + }, + { + "description": "above the maximum is invalid", + "data": 3.5, + "valid": false + }, + { + "description": "ignores non-numbers", + "data": "x", + "valid": true + } + ] + }, + { + "description": "exclusiveMaximum validation", + "schema": { + "maximum": 3.0, + "exclusiveMaximum": true + }, + "tests": [ + { + "description": "below the maximum is still valid", + "data": 2.2, + "valid": true + }, + { + "description": "boundary point is invalid", + "data": 3.0, + "valid": false + } + ] + } +] diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft4/minItems.json b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft4/minItems.json new file mode 100644 index 0000000000..ed5118815e --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft4/minItems.json @@ -0,0 +1,28 @@ +[ + { + "description": "minItems validation", + "schema": {"minItems": 1}, + "tests": [ + { + "description": "longer is valid", + "data": [1, 2], + "valid": true + }, + { + "description": "exact length is valid", + "data": [1], + "valid": true + }, + { + "description": "too short is invalid", + "data": [], + "valid": false + }, + { + "description": "ignores non-arrays", + "data": "", + "valid": true + } + ] + } +] diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft4/minLength.json b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft4/minLength.json new file mode 100644 index 0000000000..3f09158dee --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft4/minLength.json @@ -0,0 +1,33 @@ +[ + { + "description": "minLength validation", + "schema": {"minLength": 2}, + "tests": [ + { + "description": "longer is valid", + "data": "foo", + "valid": true + }, + { + "description": "exact length is valid", + "data": "fo", + "valid": true + }, + { + "description": "too short is invalid", + "data": "f", + "valid": false + }, + { + "description": "ignores non-strings", + "data": 1, + "valid": true + }, + { + "description": "one supplementary Unicode code point is not long enough", + "data": "\uD83D\uDCA9", + "valid": false + } + ] + } +] diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft4/minProperties.json b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft4/minProperties.json new file mode 100644 index 0000000000..a72c7d293e --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft4/minProperties.json @@ -0,0 +1,28 @@ +[ + { + "description": "minProperties validation", + "schema": {"minProperties": 1}, + "tests": [ + { + "description": "longer is valid", + "data": {"foo": 1, "bar": 2}, + "valid": true + }, + { + "description": "exact length is valid", + "data": {"foo": 1}, + "valid": true + }, + { + "description": "too short is invalid", + "data": {}, + "valid": false + }, + { + "description": "ignores non-objects", + "data": "", + "valid": true + } + ] + } +] diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft4/minimum.json b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft4/minimum.json new file mode 100644 index 0000000000..d5bf000bcc --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft4/minimum.json @@ -0,0 +1,42 @@ +[ + { + "description": "minimum validation", + "schema": {"minimum": 1.1}, + "tests": [ + { + "description": "above the minimum is valid", + "data": 2.6, + "valid": true + }, + { + "description": "below the minimum is invalid", + "data": 0.6, + "valid": false + }, + { + "description": "ignores non-numbers", + "data": "x", + "valid": true + } + ] + }, + { + "description": "exclusiveMinimum validation", + "schema": { + "minimum": 1.1, + "exclusiveMinimum": true + }, + "tests": [ + { + "description": "above the minimum is still valid", + "data": 1.2, + "valid": true + }, + { + "description": "boundary point is invalid", + "data": 1.1, + "valid": false + } + ] + } +] diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft4/multipleOf.json b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft4/multipleOf.json new file mode 100644 index 0000000000..ca3b761805 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft4/multipleOf.json @@ -0,0 +1,60 @@ +[ + { + "description": "by int", + "schema": {"multipleOf": 2}, + "tests": [ + { + "description": "int by int", + "data": 10, + "valid": true + }, + { + "description": "int by int fail", + "data": 7, + "valid": false + }, + { + "description": "ignores non-numbers", + "data": "foo", + "valid": true + } + ] + }, + { + "description": "by number", + "schema": {"multipleOf": 1.5}, + "tests": [ + { + "description": "zero is multiple of anything", + "data": 0, + "valid": true + }, + { + "description": "4.5 is multiple of 1.5", + "data": 4.5, + "valid": true + }, + { + "description": "35 is not multiple of 1.5", + "data": 35, + "valid": false + } + ] + }, + { + "description": "by small number", + "schema": {"multipleOf": 0.0001}, + "tests": [ + { + "description": "0.0075 is multiple of 0.0001", + "data": 0.0075, + "valid": true + }, + { + "description": "0.00751 is not multiple of 0.0001", + "data": 0.00751, + "valid": false + } + ] + } +] diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft4/not.json b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft4/not.json new file mode 100644 index 0000000000..cbb7f46bf8 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft4/not.json @@ -0,0 +1,96 @@ +[ + { + "description": "not", + "schema": { + "not": {"type": "integer"} + }, + "tests": [ + { + "description": "allowed", + "data": "foo", + "valid": true + }, + { + "description": "disallowed", + "data": 1, + "valid": false + } + ] + }, + { + "description": "not multiple types", + "schema": { + "not": {"type": ["integer", "boolean"]} + }, + "tests": [ + { + "description": "valid", + "data": "foo", + "valid": true + }, + { + "description": "mismatch", + "data": 1, + "valid": false + }, + { + "description": "other mismatch", + "data": true, + "valid": false + } + ] + }, + { + "description": "not more complex schema", + "schema": { + "not": { + "type": "object", + "properties": { + "foo": { + "type": "string" + } + } + } + }, + "tests": [ + { + "description": "match", + "data": 1, + "valid": true + }, + { + "description": "other match", + "data": {"foo": 1}, + "valid": true + }, + { + "description": "mismatch", + "data": {"foo": "bar"}, + "valid": false + } + ] + }, + { + "description": "forbidden property", + "schema": { + "properties": { + "foo": { + "not": {} + } + } + }, + "tests": [ + { + "description": "property present", + "data": {"foo": 1, "bar": 2}, + "valid": false + }, + { + "description": "property absent", + "data": {"bar": 1, "baz": 2}, + "valid": true + } + ] + } + +] diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft4/oneOf.json b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft4/oneOf.json new file mode 100644 index 0000000000..1eaa4e4794 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft4/oneOf.json @@ -0,0 +1,68 @@ +[ + { + "description": "oneOf", + "schema": { + "oneOf": [ + { + "type": "integer" + }, + { + "minimum": 2 + } + ] + }, + "tests": [ + { + "description": "first oneOf valid", + "data": 1, + "valid": true + }, + { + "description": "second oneOf valid", + "data": 2.5, + "valid": true + }, + { + "description": "both oneOf valid", + "data": 3, + "valid": false + }, + { + "description": "neither oneOf valid", + "data": 1.5, + "valid": false + } + ] + }, + { + "description": "oneOf with base schema", + "schema": { + "type": "string", + "oneOf" : [ + { + "minLength": 2 + }, + { + "maxLength": 4 + } + ] + }, + "tests": [ + { + "description": "mismatch base schema", + "data": 3, + "valid": false + }, + { + "description": "one oneOf valid", + "data": "foobar", + "valid": true + }, + { + "description": "both oneOf valid", + "data": "foo", + "valid": false + } + ] + } +] diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft4/optional/bignum.json b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft4/optional/bignum.json new file mode 100644 index 0000000000..ccc7c17fe8 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft4/optional/bignum.json @@ -0,0 +1,107 @@ +[ + { + "description": "integer", + "schema": {"type": "integer"}, + "tests": [ + { + "description": "a bignum is an integer", + "data": 12345678910111213141516171819202122232425262728293031, + "valid": true + } + ] + }, + { + "description": "number", + "schema": {"type": "number"}, + "tests": [ + { + "description": "a bignum is a number", + "data": 98249283749234923498293171823948729348710298301928331, + "valid": true + } + ] + }, + { + "description": "integer", + "schema": {"type": "integer"}, + "tests": [ + { + "description": "a negative bignum is an integer", + "data": -12345678910111213141516171819202122232425262728293031, + "valid": true + } + ] + }, + { + "description": "number", + "schema": {"type": "number"}, + "tests": [ + { + "description": "a negative bignum is a number", + "data": -98249283749234923498293171823948729348710298301928331, + "valid": true + } + ] + }, + { + "description": "string", + "schema": {"type": "string"}, + "tests": [ + { + "description": "a bignum is not a string", + "data": 98249283749234923498293171823948729348710298301928331, + "valid": false + } + ] + }, + { + "description": "integer comparison", + "schema": {"maximum": 18446744073709551615}, + "tests": [ + { + "description": "comparison works for high numbers", + "data": 18446744073709551600, + "valid": true + } + ] + }, + { + "description": "float comparison with high precision", + "schema": { + "maximum": 972783798187987123879878123.18878137, + "exclusiveMaximum": true + }, + "tests": [ + { + "description": "comparison works for high numbers", + "data": 972783798187987123879878123.188781371, + "valid": false + } + ] + }, + { + "description": "integer comparison", + "schema": {"minimum": -18446744073709551615}, + "tests": [ + { + "description": "comparison works for very negative numbers", + "data": -18446744073709551600, + "valid": true + } + ] + }, + { + "description": "float comparison with high precision on negative numbers", + "schema": { + "minimum": -972783798187987123879878123.18878137, + "exclusiveMinimum": true + }, + "tests": [ + { + "description": "comparison works for very negative numbers", + "data": -972783798187987123879878123.188781371, + "valid": false + } + ] + } +] diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft4/optional/format.json b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft4/optional/format.json new file mode 100644 index 0000000000..aacfd11984 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft4/optional/format.json @@ -0,0 +1,148 @@ +[ + { + "description": "validation of date-time strings", + "schema": {"format": "date-time"}, + "tests": [ + { + "description": "a valid date-time string", + "data": "1963-06-19T08:30:06.283185Z", + "valid": true + }, + { + "description": "an invalid date-time string", + "data": "06/19/1963 08:30:06 PST", + "valid": false + }, + { + "description": "only RFC3339 not all of ISO 8601 are valid", + "data": "2013-350T01:01:01", + "valid": false + } + ] + }, + { + "description": "validation of URIs", + "schema": {"format": "uri"}, + "tests": [ + { + "description": "a valid URI", + "data": "http://foo.bar/?baz=qux#quux", + "valid": true + }, + { + "description": "a valid protocol-relative URI", + "data": "//foo.bar/?baz=qux#quux", + "valid": true + }, + { + "description": "an invalid URI", + "data": "\\\\WINDOWS\\fileshare", + "valid": false + }, + { + "description": "an invalid URI though valid URI reference", + "data": "abc", + "valid": false + } + ] + }, + { + "description": "validation of e-mail addresses", + "schema": {"format": "email"}, + "tests": [ + { + "description": "a valid e-mail address", + "data": "joe.bloggs@example.com", + "valid": true + }, + { + "description": "an invalid e-mail address", + "data": "2962", + "valid": false + } + ] + }, + { + "description": "validation of IP addresses", + "schema": {"format": "ipv4"}, + "tests": [ + { + "description": "a valid IP address", + "data": "192.168.0.1", + "valid": true + }, + { + "description": "an IP address with too many components", + "data": "127.0.0.0.1", + "valid": false + }, + { + "description": "an IP address with out-of-range values", + "data": "256.256.256.256", + "valid": false + }, + { + "description": "an IP address without 4 components", + "data": "127.0", + "valid": false + }, + { + "description": "an IP address as an integer", + "data": "0x7f000001", + "valid": false + } + ] + }, + { + "description": "validation of IPv6 addresses", + "schema": {"format": "ipv6"}, + "tests": [ + { + "description": "a valid IPv6 address", + "data": "::1", + "valid": true + }, + { + "description": "an IPv6 address with out-of-range values", + "data": "12345::", + "valid": false + }, + { + "description": "an IPv6 address with too many components", + "data": "1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1", + "valid": false + }, + { + "description": "an IPv6 address containing illegal characters", + "data": "::laptop", + "valid": false + } + ] + }, + { + "description": "validation of host names", + "schema": {"format": "hostname"}, + "tests": [ + { + "description": "a valid host name", + "data": "www.example.com", + "valid": true + }, + { + "description": "a host name starting with an illegal character", + "data": "-a-host-name-that-starts-with--", + "valid": false + }, + { + "description": "a host name containing illegal characters", + "data": "not_a_valid_host_name", + "valid": false + }, + { + "description": "a host name with a component too long", + "data": "a-vvvvvvvvvvvvvvvveeeeeeeeeeeeeeeerrrrrrrrrrrrrrrryyyyyyyyyyyyyyyy-long-host-name-component", + "valid": false + } + ] + } +] diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft4/optional/zeroTerminatedFloats.json b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft4/optional/zeroTerminatedFloats.json new file mode 100644 index 0000000000..9b50ea2776 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft4/optional/zeroTerminatedFloats.json @@ -0,0 +1,15 @@ +[ + { + "description": "some languages do not distinguish between different types of numeric value", + "schema": { + "type": "integer" + }, + "tests": [ + { + "description": "a float is not an integer even without fractional part", + "data": 1.0, + "valid": false + } + ] + } +] diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft4/pattern.json b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft4/pattern.json new file mode 100644 index 0000000000..25e7299731 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft4/pattern.json @@ -0,0 +1,34 @@ +[ + { + "description": "pattern validation", + "schema": {"pattern": "^a*$"}, + "tests": [ + { + "description": "a matching pattern is valid", + "data": "aaa", + "valid": true + }, + { + "description": "a non-matching pattern is invalid", + "data": "abc", + "valid": false + }, + { + "description": "ignores non-strings", + "data": true, + "valid": true + } + ] + }, + { + "description": "pattern is not anchored", + "schema": {"pattern": "a+"}, + "tests": [ + { + "description": "matches a substring", + "data": "xxaayy", + "valid": true + } + ] + } +] diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft4/patternProperties.json b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft4/patternProperties.json new file mode 100644 index 0000000000..18586e5dab --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft4/patternProperties.json @@ -0,0 +1,110 @@ +[ + { + "description": + "patternProperties validates properties matching a regex", + "schema": { + "patternProperties": { + "f.*o": {"type": "integer"} + } + }, + "tests": [ + { + "description": "a single valid match is valid", + "data": {"foo": 1}, + "valid": true + }, + { + "description": "multiple valid matches is valid", + "data": {"foo": 1, "foooooo" : 2}, + "valid": true + }, + { + "description": "a single invalid match is invalid", + "data": {"foo": "bar", "fooooo": 2}, + "valid": false + }, + { + "description": "multiple invalid matches is invalid", + "data": {"foo": "bar", "foooooo" : "baz"}, + "valid": false + }, + { + "description": "ignores non-objects", + "data": 12, + "valid": true + } + ] + }, + { + "description": "multiple simultaneous patternProperties are validated", + "schema": { + "patternProperties": { + "a*": {"type": "integer"}, + "aaa*": {"maximum": 20} + } + }, + "tests": [ + { + "description": "a single valid match is valid", + "data": {"a": 21}, + "valid": true + }, + { + "description": "a simultaneous match is valid", + "data": {"aaaa": 18}, + "valid": true + }, + { + "description": "multiple matches is valid", + "data": {"a": 21, "aaaa": 18}, + "valid": true + }, + { + "description": "an invalid due to one is invalid", + "data": {"a": "bar"}, + "valid": false + }, + { + "description": "an invalid due to the other is invalid", + "data": {"aaaa": 31}, + "valid": false + }, + { + "description": "an invalid due to both is invalid", + "data": {"aaa": "foo", "aaaa": 31}, + "valid": false + } + ] + }, + { + "description": "regexes are not anchored by default and are case sensitive", + "schema": { + "patternProperties": { + "[0-9]{2,}": { "type": "boolean" }, + "X_": { "type": "string" } + } + }, + "tests": [ + { + "description": "non recognized members are ignored", + "data": { "answer 1": "42" }, + "valid": true + }, + { + "description": "recognized members are accounted for", + "data": { "a31b": null }, + "valid": false + }, + { + "description": "regexes are case sensitive", + "data": { "a_x_3": 3 }, + "valid": true + }, + { + "description": "regexes are case sensitive, 2", + "data": { "a_X_3": 3 }, + "valid": false + } + ] + } +] diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft4/properties.json b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft4/properties.json new file mode 100644 index 0000000000..cd1644dcd9 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft4/properties.json @@ -0,0 +1,92 @@ +[ + { + "description": "object properties validation", + "schema": { + "properties": { + "foo": {"type": "integer"}, + "bar": {"type": "string"} + } + }, + "tests": [ + { + "description": "both properties present and valid is valid", + "data": {"foo": 1, "bar": "baz"}, + "valid": true + }, + { + "description": "one property invalid is invalid", + "data": {"foo": 1, "bar": {}}, + "valid": false + }, + { + "description": "both properties invalid is invalid", + "data": {"foo": [], "bar": {}}, + "valid": false + }, + { + "description": "doesn't invalidate other properties", + "data": {"quux": []}, + "valid": true + }, + { + "description": "ignores non-objects", + "data": [], + "valid": true + } + ] + }, + { + "description": + "properties, patternProperties, additionalProperties interaction", + "schema": { + "properties": { + "foo": {"type": "array", "maxItems": 3}, + "bar": {"type": "array"} + }, + "patternProperties": {"f.o": {"minItems": 2}}, + "additionalProperties": {"type": "integer"} + }, + "tests": [ + { + "description": "property validates property", + "data": {"foo": [1, 2]}, + "valid": true + }, + { + "description": "property invalidates property", + "data": {"foo": [1, 2, 3, 4]}, + "valid": false + }, + { + "description": "patternProperty invalidates property", + "data": {"foo": []}, + "valid": false + }, + { + "description": "patternProperty validates nonproperty", + "data": {"fxo": [1, 2]}, + "valid": true + }, + { + "description": "patternProperty invalidates nonproperty", + "data": {"fxo": []}, + "valid": false + }, + { + "description": "additionalProperty ignores property", + "data": {"bar": []}, + "valid": true + }, + { + "description": "additionalProperty validates others", + "data": {"quux": 3}, + "valid": true + }, + { + "description": "additionalProperty invalidates others", + "data": {"quux": "foo"}, + "valid": false + } + ] + } +] diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft4/ref.json b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft4/ref.json new file mode 100644 index 0000000000..7e80552249 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft4/ref.json @@ -0,0 +1,159 @@ +[ + { + "description": "root pointer ref", + "schema": { + "properties": { + "foo": {"$ref": "#"} + }, + "additionalProperties": false + }, + "tests": [ + { + "description": "match", + "data": {"foo": false}, + "valid": true + }, + { + "description": "recursive match", + "data": {"foo": {"foo": false}}, + "valid": true + }, + { + "description": "mismatch", + "data": {"bar": false}, + "valid": false + }, + { + "description": "recursive mismatch", + "data": {"foo": {"bar": false}}, + "valid": false + } + ] + }, + { + "description": "relative pointer ref to object", + "schema": { + "properties": { + "foo": {"type": "integer"}, + "bar": {"$ref": "#/properties/foo"} + } + }, + "tests": [ + { + "description": "match", + "data": {"bar": 3}, + "valid": true + }, + { + "description": "mismatch", + "data": {"bar": true}, + "valid": false + } + ] + }, + { + "description": "relative pointer ref to array", + "schema": { + "items": [ + {"type": "integer"}, + {"$ref": "#/items/0"} + ] + }, + "tests": [ + { + "description": "match array", + "data": [1, 2], + "valid": true + }, + { + "description": "mismatch array", + "data": [1, "foo"], + "valid": false + } + ] + }, + { + "description": "escaped pointer ref", + "schema": { + "tilda~field": {"type": "integer"}, + "slash/field": {"type": "integer"}, + "percent%field": {"type": "integer"}, + "properties": { + "tilda": {"$ref": "#/tilda~0field"}, + "slash": {"$ref": "#/slash~1field"}, + "percent": {"$ref": "#/percent%25field"} + } + }, + "tests": [ + { + "description": "slash invalid", + "data": {"slash": "aoeu"}, + "valid": false + }, + { + "description": "tilda invalid", + "data": {"tilda": "aoeu"}, + "valid": false + }, + { + "description": "percent invalid", + "data": {"percent": "aoeu"}, + "valid": false + }, + { + "description": "slash valid", + "data": {"slash": 123}, + "valid": true + }, + { + "description": "tilda valid", + "data": {"tilda": 123}, + "valid": true + }, + { + "description": "percent valid", + "data": {"percent": 123}, + "valid": true + } + ] + }, + { + "description": "nested refs", + "schema": { + "definitions": { + "a": {"type": "integer"}, + "b": {"$ref": "#/definitions/a"}, + "c": {"$ref": "#/definitions/b"} + }, + "$ref": "#/definitions/c" + }, + "tests": [ + { + "description": "nested ref valid", + "data": 5, + "valid": true + }, + { + "description": "nested ref invalid", + "data": "a", + "valid": false + } + ] + }, + { + "description": "remote ref, containing refs itself", + "schema": {"$ref": "http://json-schema.org/draft-04/schema#"}, + "tests": [ + { + "description": "remote ref valid", + "data": {"minLength": 1}, + "valid": true + }, + { + "description": "remote ref invalid", + "data": {"minLength": -1}, + "valid": false + } + ] + } +] diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft4/refRemote.json b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft4/refRemote.json new file mode 100644 index 0000000000..4ca804732c --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft4/refRemote.json @@ -0,0 +1,74 @@ +[ + { + "description": "remote ref", + "schema": {"$ref": "http://localhost:1234/integer.json"}, + "tests": [ + { + "description": "remote ref valid", + "data": 1, + "valid": true + }, + { + "description": "remote ref invalid", + "data": "a", + "valid": false + } + ] + }, + { + "description": "fragment within remote ref", + "schema": {"$ref": "http://localhost:1234/subSchemas.json#/integer"}, + "tests": [ + { + "description": "remote fragment valid", + "data": 1, + "valid": true + }, + { + "description": "remote fragment invalid", + "data": "a", + "valid": false + } + ] + }, + { + "description": "ref within remote ref", + "schema": { + "$ref": "http://localhost:1234/subSchemas.json#/refToInteger" + }, + "tests": [ + { + "description": "ref within ref valid", + "data": 1, + "valid": true + }, + { + "description": "ref within ref invalid", + "data": "a", + "valid": false + } + ] + }, + { + "description": "change resolution scope", + "schema": { + "id": "http://localhost:1234/", + "items": { + "id": "folder/", + "items": {"$ref": "folderInteger.json"} + } + }, + "tests": [ + { + "description": "changed scope ref valid", + "data": [[1]], + "valid": true + }, + { + "description": "changed scope ref invalid", + "data": [["a"]], + "valid": false + } + ] + } +] diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft4/required.json b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft4/required.json new file mode 100644 index 0000000000..612f73f347 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft4/required.json @@ -0,0 +1,39 @@ +[ + { + "description": "required validation", + "schema": { + "properties": { + "foo": {}, + "bar": {} + }, + "required": ["foo"] + }, + "tests": [ + { + "description": "present required property is valid", + "data": {"foo": 1}, + "valid": true + }, + { + "description": "non-present required property is invalid", + "data": {"bar": 1}, + "valid": false + } + ] + }, + { + "description": "required default validation", + "schema": { + "properties": { + "foo": {} + } + }, + "tests": [ + { + "description": "not required by default", + "data": {}, + "valid": true + } + ] + } +] diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft4/type.json b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft4/type.json new file mode 100644 index 0000000000..db42a44d3f --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft4/type.json @@ -0,0 +1,330 @@ +[ + { + "description": "integer type matches integers", + "schema": {"type": "integer"}, + "tests": [ + { + "description": "an integer is an integer", + "data": 1, + "valid": true + }, + { + "description": "a float is not an integer", + "data": 1.1, + "valid": false + }, + { + "description": "a string is not an integer", + "data": "foo", + "valid": false + }, + { + "description": "an object is not an integer", + "data": {}, + "valid": false + }, + { + "description": "an array is not an integer", + "data": [], + "valid": false + }, + { + "description": "a boolean is not an integer", + "data": true, + "valid": false + }, + { + "description": "null is not an integer", + "data": null, + "valid": false + } + ] + }, + { + "description": "number type matches numbers", + "schema": {"type": "number"}, + "tests": [ + { + "description": "an integer is a number", + "data": 1, + "valid": true + }, + { + "description": "a float is a number", + "data": 1.1, + "valid": true + }, + { + "description": "a string is not a number", + "data": "foo", + "valid": false + }, + { + "description": "an object is not a number", + "data": {}, + "valid": false + }, + { + "description": "an array is not a number", + "data": [], + "valid": false + }, + { + "description": "a boolean is not a number", + "data": true, + "valid": false + }, + { + "description": "null is not a number", + "data": null, + "valid": false + } + ] + }, + { + "description": "string type matches strings", + "schema": {"type": "string"}, + "tests": [ + { + "description": "1 is not a string", + "data": 1, + "valid": false + }, + { + "description": "a float is not a string", + "data": 1.1, + "valid": false + }, + { + "description": "a string is a string", + "data": "foo", + "valid": true + }, + { + "description": "an object is not a string", + "data": {}, + "valid": false + }, + { + "description": "an array is not a string", + "data": [], + "valid": false + }, + { + "description": "a boolean is not a string", + "data": true, + "valid": false + }, + { + "description": "null is not a string", + "data": null, + "valid": false + } + ] + }, + { + "description": "object type matches objects", + "schema": {"type": "object"}, + "tests": [ + { + "description": "an integer is not an object", + "data": 1, + "valid": false + }, + { + "description": "a float is not an object", + "data": 1.1, + "valid": false + }, + { + "description": "a string is not an object", + "data": "foo", + "valid": false + }, + { + "description": "an object is an object", + "data": {}, + "valid": true + }, + { + "description": "an array is not an object", + "data": [], + "valid": false + }, + { + "description": "a boolean is not an object", + "data": true, + "valid": false + }, + { + "description": "null is not an object", + "data": null, + "valid": false + } + ] + }, + { + "description": "array type matches arrays", + "schema": {"type": "array"}, + "tests": [ + { + "description": "an integer is not an array", + "data": 1, + "valid": false + }, + { + "description": "a float is not an array", + "data": 1.1, + "valid": false + }, + { + "description": "a string is not an array", + "data": "foo", + "valid": false + }, + { + "description": "an object is not an array", + "data": {}, + "valid": false + }, + { + "description": "an array is an array", + "data": [], + "valid": true + }, + { + "description": "a boolean is not an array", + "data": true, + "valid": false + }, + { + "description": "null is not an array", + "data": null, + "valid": false + } + ] + }, + { + "description": "boolean type matches booleans", + "schema": {"type": "boolean"}, + "tests": [ + { + "description": "an integer is not a boolean", + "data": 1, + "valid": false + }, + { + "description": "a float is not a boolean", + "data": 1.1, + "valid": false + }, + { + "description": "a string is not a boolean", + "data": "foo", + "valid": false + }, + { + "description": "an object is not a boolean", + "data": {}, + "valid": false + }, + { + "description": "an array is not a boolean", + "data": [], + "valid": false + }, + { + "description": "a boolean is a boolean", + "data": true, + "valid": true + }, + { + "description": "null is not a boolean", + "data": null, + "valid": false + } + ] + }, + { + "description": "null type matches only the null object", + "schema": {"type": "null"}, + "tests": [ + { + "description": "an integer is not null", + "data": 1, + "valid": false + }, + { + "description": "a float is not null", + "data": 1.1, + "valid": false + }, + { + "description": "a string is not null", + "data": "foo", + "valid": false + }, + { + "description": "an object is not null", + "data": {}, + "valid": false + }, + { + "description": "an array is not null", + "data": [], + "valid": false + }, + { + "description": "a boolean is not null", + "data": true, + "valid": false + }, + { + "description": "null is null", + "data": null, + "valid": true + } + ] + }, + { + "description": "multiple types can be specified in an array", + "schema": {"type": ["integer", "string"]}, + "tests": [ + { + "description": "an integer is valid", + "data": 1, + "valid": true + }, + { + "description": "a string is valid", + "data": "foo", + "valid": true + }, + { + "description": "a float is invalid", + "data": 1.1, + "valid": false + }, + { + "description": "an object is invalid", + "data": {}, + "valid": false + }, + { + "description": "an array is invalid", + "data": [], + "valid": false + }, + { + "description": "a boolean is invalid", + "data": true, + "valid": false + }, + { + "description": "null is invalid", + "data": null, + "valid": false + } + ] + } +] diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft4/uniqueItems.json b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft4/uniqueItems.json new file mode 100644 index 0000000000..c1f4ab99c9 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tests/draft4/uniqueItems.json @@ -0,0 +1,79 @@ +[ + { + "description": "uniqueItems validation", + "schema": {"uniqueItems": true}, + "tests": [ + { + "description": "unique array of integers is valid", + "data": [1, 2], + "valid": true + }, + { + "description": "non-unique array of integers is invalid", + "data": [1, 1], + "valid": false + }, + { + "description": "numbers are unique if mathematically unequal", + "data": [1.0, 1.00, 1], + "valid": false + }, + { + "description": "unique array of objects is valid", + "data": [{"foo": "bar"}, {"foo": "baz"}], + "valid": true + }, + { + "description": "non-unique array of objects is invalid", + "data": [{"foo": "bar"}, {"foo": "bar"}], + "valid": false + }, + { + "description": "unique array of nested objects is valid", + "data": [ + {"foo": {"bar" : {"baz" : true}}}, + {"foo": {"bar" : {"baz" : false}}} + ], + "valid": true + }, + { + "description": "non-unique array of nested objects is invalid", + "data": [ + {"foo": {"bar" : {"baz" : true}}}, + {"foo": {"bar" : {"baz" : true}}} + ], + "valid": false + }, + { + "description": "unique array of arrays is valid", + "data": [["foo"], ["bar"]], + "valid": true + }, + { + "description": "non-unique array of arrays is invalid", + "data": [["foo"], ["foo"]], + "valid": false + }, + { + "description": "1 and true are unique", + "data": [1, true], + "valid": true + }, + { + "description": "0 and false are unique", + "data": [0, false], + "valid": true + }, + { + "description": "unique heterogeneous types are valid", + "data": [{}, [1], true, null, 1], + "valid": true + }, + { + "description": "non-unique heterogeneous types are invalid", + "data": [{}, [1], true, null, {}, 1], + "valid": false + } + ] + } +] diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tox.ini b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tox.ini new file mode 100644 index 0000000000..5301222a84 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/jsonschema/tox.ini @@ -0,0 +1,8 @@ +[tox] +minversion = 1.6 +envlist = py27 +skipsdist = True + +[testenv] +deps = jsonschema +commands = {envpython} bin/jsonschema_suite check diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/bin/types/alotofkeys.json b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/types/alotofkeys.json new file mode 100644 index 0000000000..3fc052e34f --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/types/alotofkeys.json @@ -0,0 +1,502 @@ +{ + "4BABQZ5SZJSO3KFKBOG36EIXXTOF34HVFCELHA2DWOMIL44K": null, + "RSZNOTRIJFCHRKG4IKNOW4ZEBMVXPDBYBXBGDGNWTSVLMJ2U": null, + "AOGQPY32FQ7T7WZWQPON3X6GU74GOYI6HHVNPATDTBXRUQ4G": null, + "3PMTZEGLZNHSOWWJ23BE6PWOXD2VZRDN7MMLUMQ4EIRERVCG": null, + "PD2FMQGI5HTGK6MT76OYS2ER2LXFBON44WOMELDY5MRKQI6I": null, + "6L6QMMVSE4UQLB4OGX3LVDRNGAL6MOJ6S3RBBUSQ3F5PPHYR": null, + "LYVVXT7U7WN7PGGUHCLFXVOBJBSSR6ES2P7AY7XGBXEBLTDD": null, + "G5RWOLHDDZOXYEFGGSVWG3C2UHYDW6UOFVBQQLQJVZNCF4TB": null, + "3QPIK2M3ZPICZQFQTX22A7VDCAFIGAX2PXIXKDOZX7XUM32R": null, + "JR75L2BXOA5LVLNKT4EEZO2P45OHWRPMMWMFENTFFIY7A2V3": null, + "TESL546MN7IR7AT3C5HRSESIFHZ5NW6TNRWZXZ43OSRYOZKP": null, + "62EJKIAFWGFGPUS6YP2X6E26AV2TZCTCAJMZNWBBNFRPCCRN": null, + "5ZDD3KPTPGE2CAWR3MTFUSBMGQAS4ZP5WZKXJTXUNFSYABD6": null, + "XQ7TMN5YMQLAND54B4VIVWJAHU3TNZKT2S4SVRW6WKHNJBX2": null, + "O456GV3HBAWFDQRCECX6HY3PBTP6WNQIDSKVP2MZIPV3TCBL": null, + "WXCN25EBQH5WWN2JBHWNFNDUTYSFDLIAOWO5AE6D5HDO7VNE": null, + "THO3I3KDRIMTD6DKNIETIOWDY7FXQ5GJ3P2KUQJWYAEL3LXV": null, + "7OMI7VIOKFRZATMNLGIWH7ZBDARZ6ARXIAH5S3GPG5KV52IC": null, + "ESUPY3ELKCEGFRSYFGPGFBJOAUGXMYZ6XCWXDFOKHBJHNGVR": null, + "TNXSJIEFJLUFUDTR2S5LV73PD6ACFYNHOCRZPUSDPXDD3B7M": null, + "T6TISG6P4W66F37634QU4BNJY4RZ77QXXNPGTYH5LCCRDSX6": null, + "QTVAA56JKNDYTMV7DXAIL4QVLZPW3UHGLTKDI2BED6S3MGDQ": null, + "DTJREAQBCS6I2AJ6MOGTPIXK3ADB4BPNDIHI2YSQP6Y2BMH7": null, + "XDGH2OYCTAJ75IEMZ32O644YLT73PRYDORFKBLYEMCHOQ7Q6": null, + "4KDDQZRBLNS33DRHZHDMENCWGMNFEJGBZJXSGIQW7VBWOTHT": null, + "5KSH3GKWFNXV55KI2FPUDSD57O25N52UTZAAYDFVMFUSEE6O": null, + "7AGEUBM5FQZ2JCMUSKTEI6COA3Q5CE5WYB7TP2F5OX3ETMTK": null, + "HFHZ5ZE5TC45W4WIF6H7ONTHXKAVWRY2LXN2GN2TXZPIP6PQ": null, + "S3U2JJBPKZHZNOM3SWVFQ7OMS7F5M2KDJHHHZKXHZXQRNUSE": null, + "YHJBGJ6T6A7PMK5AYXDITDV37BJJIM4TP7I2XHSVYN76724O": null, + "TH42A7M3645OUKC54JQMDB5BTGS3URFUCYJ2VOEM6IAGZ5QQ": null, + "OYBKULFLWL2MER745QTDL2X2HJNR77QGH2M2P6TSCHVGUJLV": null, + "JDU37GHQUOCYA5I5LFS3WAEKKR6C55XJCCLJCCCQJEGUJEP6": null, + "CB5HEJZNJ2SWZM426TWIWLHTWAPWPT2AVVHBILEVGFD6NPHI": null, + "D4A5SJA2VRB4JGJFC7PHT35S7XAMHPZZ2PZC5YYVV7RLKSUQ": null, + "BBVT6NRRU55KNRK5G745FNMZVIFHVZJICEMODF4ZBJFQ3EGL": null, + "XBV57OEMT4GYPTTH56A6XKF2ZPMXSMHY7L3LUIS5ZZWRP2OB": null, + "GTFJ3NP4VJR6HG2DRNTDKVIWTMIALYUQIQTBJMKVM2I3QKGE": null, + "77BMBFMRGASXE5XXT6BRH2DRBNJMIAUDDMEXIJT3RMHTUPI4": null, + "FWZZMG7I2JWAHX4LBYAK2G4L4TZYLHXMJWIDGT6JC5TEBCPJ": null, + "J3324OXU2BG2NGFMSOYMVKXE6OEJNGENI7EESHDSEWSUVDVV": null, + "C636AVNC5C5EKILXT2AQPXYLSNH7LCAJKVDHP67MVHULFSQN": null, + "OXTDOQG2VIEVYFC23SKOBSSPGE55AVZZADK6PIHP3APVPHND": null, + "JLQVKV4Q2BQHK355NQXZVX4WJBPFOWSD7WIJX2P433KYO4SO": null, + "E4XHPOPWH3PRCV5MGQHR3BCTKZMOK46OH4Q6STZDPF2FG6SD": null, + "J5IP4A3DV3BHGGU3J72JVVTWNIQOLNC6GQES22MVATK5H7BZ": null, + "HHCCDMLNGOU2ABP57ION5TC33UF3NUHL2L3WUYCGZDWLDNTL": null, + "54Q67RURG4THOANPT3RAVF72TGKJE425GC5GD3EOKPY6MKVW": null, + "TG3BH3HBKFEXAUM5O67VVDTXZA6MHWSVNNLXLXIL2SE2ZEDO": null, + "Q5KJ25G2A4CWNGPPYXBZM6QVYA466MQX3HCUMUO5Z24D5JX3": null, + "QQZET7VFHGJROUQZSWSRDI5ADXVH26KEPDVL6PZ36ISHOKMQ": null, + "KWNJME4V365ZIC7SA7BYCVQUAG6URC2T6MHSO3OVDBJAUPFB": null, + "XHQYKGYVLE2PFNXQPD4OUWBASZO5OFVZISCVEFTU6K6KDKHS": null, + "Z4SPXMJIAMYD2H4U4F23FALBDZP6NRLUBDFU4PRGZ4SXGTI2": null, + "HSCK3PEXH3I3XMMEMIHTM7SDJD3GOKXUMCGOL6UXJXLCSCGN": null, + "BIUYMIDY4EVGRLZ6OLJK2CE2FS5TTELIWSEA6UHKUDUYX5LM": null, + "IJJDLN5ANXTMX54P6GW2J2EJGGWG257YEAOZMXUSWK7D76LH": null, + "CLMTO3VSAOBAOBSA5IGOO4W7KEMLOFUOIR564IBKMJA7RWEY": null, + "JU5DNSHLUW34DT3IQ36JBV6M7EPILLMBALURDAB2KJXF6HQB": null, + "VXZXWLNQZFJPNQVPTOFWUPLORZD2XRAFXRVRNLUYTPBO22U5": null, + "HNACM55ZSGJ2FGRMOTXLVVLA32BC333QGC4HFCDSZ335YA4N": null, + "6J5GIOVKU4PKHHU35DWL3D7GTJFF75FF4FKSP2HPGJ7SQ2DP": null, + "O3NJM537IQSKKWM3K7EOQSNQDTR6XKUA7ZR7CWYHYYLHKH63": null, + "B4QMXK2EAR5E7KGHLODCP56DX5HW7IQVXWHFFCZ4SPSSNGJK": null, + "A5AUZBXKF67OXO34ZSEGVXI5PAIG6W2VG3U5C2Q72SNWYNEI": null, + "ZGDQ2AA2IFBSU3APKAFL5AO4C4DXY2YBEHXE5UPPVCTFZ36K": null, + "N3XZ5FYZEO3ZX37OMUJX3PIWEEV7TVEXX64KKEZEJICKXMTB": null, + "3EVOEEWTD7OABLQJIJYLOSVHBS4SB6QGX7GPDFGWI2DGAWKR": null, + "HNAEL3D7E2S7IYLKLIK4CGI56DRGAXA5S6KG3RX75PMJ6BVI": null, + "VGVW32CIRX3M45J2CPCUPPHNRGNG55MKAU7YF3CDNMGONW2T": null, + "QV5MW2W6WQSHNC6OYMWJAWEQM7LHXRMGWCJ7RI5WQ3JGHARW": null, + "IND2PUTLFWXTEUY4MMEXCFJA7JN7DODE5HVWC5CL5ED5IEUB": null, + "W2IA75XHJRBRKXLHGB7LXD7ECYEZI4V5N5I37UFXJMFWQMYR": null, + "AWTZO6OG6TCOUVYYJCWVP2JYEXRXZ7S7F7QKUKZS7JLPKN3H": null, + "TCARJATK42Y66SPMGOZ2LHLT2ZPZW7MHGXL5IVTS272FJV4U": null, + "XVHBOY5WQDOTWXVFZYQKZ6GNRWMITJDDLXSJ2T3UWF6PFOHL": null, + "CY5FGDYLB4UFR4AJRGLGPQT3W3OERGCXC4JHYKJ4HKSFTGK6": null, + "B3SJGD67GKIEAOZISX7HWENPDBYJHNJ47JCREGXQ6G2RXPUZ": null, + "LWVJYH7M5KXMLPFAHTMF6FKT3PSIW2GRC37AHF65PQY7OUE4": null, + "UUFKWC2DOV4ZQHPDPQPRCBEYNAX6OFZ7ZVJNYGW5YZCMSQIS": null, + "K5EC26CUN365DZ3LE2NHOINGZHXQ752A3VTPN5IMSRYSTOMT": null, + "22RV6RSSZIAFXOZIRAWJAIMMVHYWGL2TY42U3TG2SPFN3I6P": null, + "Q7VEOUC52OLXL53CR4XQSGGR5QZ2QXZTRCBACHQFP2HKN4SZ": null, + "OZ2ZBCTBC32VOHHBDABY2U462OHUEUS724RUS7Z6TW5K5ZFQ": null, + "EYXYWTX2UYI6MUK5L65WSTX2FDOJASIMG6ER22NLABNGAEMI": null, + "U4FJU7RQMXXDMHG7B5WFLXCZBNE5PMV43CE5X4RJSJUABT3U": null, + "K3T56AL7IXTAGTVIWZHYRKVPHLLD7UVHV4UNU76F764VGY75": null, + "U2BRKWY2RBYV5S3XVZTUZXT55CXMB45KDMNFMVY6LENW2DH5": null, + "YKLPZ7SDAG2O6NSJFLVGFVCYMY4WZKXQGHH7OO2BKGGVLQNP": null, + "WSC2BHA7H6Q62HJIIGQFX2OU64QX4AEU2RZQVIC7LSIO2JSJ": null, + "QIFNFKPJJCYPITMAYDAOEXBVEDAKBBR3DV5ZB7DAVBIAWI5K": null, + "NMBGIDIK3BMS5ZPZS6ATTID5BOAXZAH2VUED52JSC5XGI42P": null, + "LTSG7BGZVBLLXM5U2QDW5LNNPM3B5EQZPHES7JXU2EAQG266": null, + "5MZMVLLM7YHR4PTQCGDGWFQQLNN532WMTFGX5CFTDURBYEOH": null, + "UOMT2ERDBVXC3LRYKCVVUNROBWPGFHFWKFCW65HAPXN2H4FD": null, + "RFYZPAIVYHTITTR5AKOBAMYKOA3VSKRTK4P4ZOS7JFSVEY53": null, + "QQJGQV6BSW6PL4DZGQDWWVTF7U5MEVPQABOA4IRP7NOD4V4V": null, + "EFOSJBHVPSGTB3O374JFJW6MVW47ODOZQNKYSWHR5W6UZECP": null, + "YTL42MLIGIUD6Q3AMVMJ6ZMWNSXSUWCKV4ZUQWSGTEOATQC4": null, + "F5IL5OV3Y6E4QEE7JMQTKV6ULJ5AQQKQPZ23VXK72AV2P7XG": null, + "AZEV37T65EWVWQJSISCHTYHLWRXWCR6XD4LJ4KFLJ6RAOPF5": null, + "T5TAAFPNZLVDYHSNNHIJW4KBZWNFT5CMIPIWW3EFKPU4REYG": null, + "W326OLSKXRLU6MEIVUTKFFHFGXEH3VM43F353L3NHQP6HE2Q": null, + "MIIUZQ4KGTLA66VIE7WPN4T43SR6Q42YUKWEP6467AYWKU62": null, + "AXSJHLTL4FXCMLLJTQS4HIBRGUY6ATR3GZPV4MGXLWNFHDYU": null, + "MC2CMWSKD2HMTVIWCMSPZWHEGW73RWEZKU3IFZJM33IW3VI6": null, + "ZGOZHC22WZN6LSY3KK4HK6RF6F73VWSB7U47KZSLTYOQZAVH": null, + "HU26VJYM5YNEXCOCWCVEQNNZ2WAPFEVYK67JZOHMSZIOUWJN": null, + "6ZA46O27SWCAX5MQUHZYFV5UNQUDLZG4LDA6VILK6YRQMMZ5": null, + "LMGGW3CAN4T6DSVJZB46LOBI6KTZN7CKHNZ6BMWRBL5PVYXX": null, + "RZKIP3F5SY2P4NWANAQZJHPH34CU3GMQ4VCN4QXMP7ZBSQ43": null, + "CMUAX53FME5Y62VC7T7ZOUZMOPHBDFVLMVVMHYDDBZEHMOOA": null, + "ORTA47K5MLIHEUXQTFFTQNW2RMYQSTVDJXUNIF334SAJJYMC": null, + "XEGLAWIOOPE25FDXHN65P4FYJVB46M4NGGXFAWZ5VDWBBMU4": null, + "WZGXOCCN6GENKYYAYCH6UQD45BIPSYMQOZYAYRU3S2JNJLU3": null, + "MXDDSZA6VTTYU56ONDE4QZMB3L2D7A5SCRCIVBYYVIKFDFLU": null, + "JJMW475CTRXRR4R3GEZ77STHMKHTQZYFZHFUFXEB77SV2W3H": null, + "J3TNJVNF7QSTIJDEEZMLTQECNOES4PXQALSR5ZPYDTIVVKUB": null, + "Q5EHPI6GHPPZBATKHYYEXNDSYMW6QVAVKKHC2XO7RU7XXKQ3": null, + "B6WGKJEZH7XBZ4VFFRCBFYKC2Z2ZQXMY2HJQUH4LVI3EDMMU": null, + "NZ737IT3LUIMH56R66WFETEHFDOZSNVPTHMQTW3JHVTN562C": null, + "B52PWLRNPFN73AA63O6JFLEYSPFQEIHQ6AI6YC7KWOYFE5OW": null, + "7UTTRFE2I5WB2XZA37L6F7RWCII6S6HLXZRTLSJYFOENAYPI": null, + "TJJDGG7R4RNVAOXWRZRZB5K7W2Y6XB7LUYBDOY6H5IDRM3ML": null, + "TOG35JU7ULNRY3DE2XYDZ25WZETRSO5WSFFYSZT5IIALO3ZP": null, + "2QZKK4CMZNIKUWZZB22ASDR2BYNRAMTNS7MVLBA7Z7RDKZDV": null, + "US4C6FXHKR4GCRU6IJQHSAJXLNQGUDCDEPEQDU5C5D76I6XX": null, + "QOPUXM3ZKXTPVGMVVDMUZZ75KH2S7DKYXSFCQ3R5RYO5WP2J": null, + "GZ2T37SKRE3ZX7FARFWWF3WG443LVP5X6ENDLDHO7GBWYHHM": null, + "VSOOUSBMGIPEVAPYAGWZOLDUW5HSTRMTBRTUYLQNHKVUBLJ7": null, + "45HJFJQ3YKDBFDZPNDO46YT7DLG754XZWMGJQ7YPJXQ4G4N4": null, + "4KY77KV2OWWFEVIBSUZRGZF2V47BEFFHIHNMAQVK65E34ZF3": null, + "NB334WI2DNPLWHGXBNHSU4436ZYDQ4D2S3JMLDOM35QINZTR": null, + "7K23M4FJGIQFWUMPRDZIK32MF7HZULYYSS5Z7N7QTEJGET3D": null, + "ZBMNFKSEG2PXKJZIXIK2MHJQ2ONRJUJVCDBOCHNERPGMN2NQ": null, + "YMCOX2NMBDL4J6Z7JBEWHFSCWON4ZSBSBU2WONEYYOYRA75K": null, + "GDOVKPAWZFHLAPQ5YHCFWL4NAMC5G2DDXFWUTR27XQ7LEOOQ": null, + "CYBYK7ESXTUUHYQVPMDI7VWAZO5TVGLIB3GB7NYRYVDLMYKG": null, + "4IYLX3IDNUJ2DWT4RM3QJ3IMVE22X67EW5KWSMZHIU4W2W5B": null, + "EBWXJZ3PX7LE4JNB2XWJJNXL5QBVSJQSXAUJMJ34YJKR3JJU": null, + "LEKOXMXHU57JTRZUKMCW4WDCAKEOXPHJ34ULXN5P6DIEOYLL": null, + "BESPMR4LBE3G4MTWR22CVBYH6NW43HO4ILTSV3P543JZUBD7": null, + "5SYIBXIHGJGE4WHL2HYUNK3X4JUGOJOUMKVJMMXSQDKJZHFJ": null, + "XN42HP3QOV34GMJA5VINVW3O7KWW2GV7VDKAZDFBCC6SSHNQ": null, + "326BDEDWGYW3IMEHP63I6LVGSRMS6DUUNMPY3YVWXCH3YA67": null, + "FYNTVFBPC37FYGOXFIXJP57FNX5MYDGUWIMUYMFOJSOXRRDS": null, + "7DRCBIQP4EXAVNEMWOZHAEZ2W2EIMKD77PH6JJWP2BDN6NFN": null, + "7Z7LWVFB2Z26EVYZPLQAOQ7LXLADTHUA7QGKDRFLXRQ3ZJUX": null, + "EOZ2S4T75U62LD4QUZNTOHP7SNVJUNNSE7WWGHCMC75O4XPW": null, + "TVG4ZY3YVNQV7WPZ2CEW26QTGWUBVJV7FTRF4TE54446J5SI": null, + "MQ62OHPXMGGASRXKOH5MEVGLYHKNWBT3DC7XSXPXFHFXFO5C": null, + "MBRTEJLOZ6U43EOO2IS3AHNDCT7WUEK4XN5ZRMTPBKUFXUWU": null, + "24WJGDPNT4E7SQT2IBSTHJGYBMEBKS7VPGJYBRRAT5YXNBC4": null, + "3KD7I6FOTRB4U2JBT7CIJOPD5XHFWHESYJJQTQVUQ3IGIPVZ": null, + "25XHQ7A3DWKVDBX2ZFNIHKOGJCXY73N4Q6PUBEWGH2I55XVP": null, + "GE3YTUBPOT5CFJU2LQVMZVC67NFNLXVWNTV4ERN6BHVGCGYL": null, + "VXE2WHW6UWRE4WYTAVFAQ75IBYUPNZVMHJC44DGDPIAEOVVE": null, + "5JRWFOAEX5TNCAMYGF44C72EWF5NTXIRSVST5J3N6N5SLGFF": null, + "TYNIMWTDY2D565BJUNMFXTJHBUMWOTD4YSAFILKXPKX6FKRO": null, + "RDUDIY6N4RRUA6YEBBBFPBNYFZQUWRVURNYGJPEU6EHJA64H": null, + "MMRLX63PFJLWBJUTXCSLALIGK5YOHTLAY64WFQIYQJCX4QID": null, + "P4T7UPQNUAFMAJ3G4KBRHOQP5GCJP46XXYKPTTENUI36YQEP": null, + "VNAKVK3A4TN7WEZAJBJVMUVIKIUWCNH7B373DP7WAM7ZXYDD": null, + "VAPNA5BJL7OF7VRVSUEFAG6RZWENO5VOGMFVN6AB4A7H4VU3": null, + "TLVHDKN7326OHNXMBBJIVQW5FFFGPXSUR2IVTMPLOLPPJQW2": null, + "LD4OK3CY7MQGHUMQOMPAJY2NZUASJLSLWVSIIKIYYYAFYHIK": null, + "DXHC3XJCJJG2SMU4O2HDPMJHO4PNNYGIMLB5KSCQPNLBAJER": null, + "SANGKO55HOXMBC627JYHVBE3FH6KJL74ITOVF5GYODRRMEMP": null, + "TOQW7HYYWSFH3NKL7SITPX5H4HLAH7BKL35ECCAILLJ5B4TA": null, + "WUKAWAQHSBKAUAYEQ4UA5PKFB4676VQNQFLXUIX6UCDFZ472": null, + "BDU5VYNLNHR6HOLMZI4XSDERPTMVJ4LBUX5XP6W2BQWH3NLR": null, + "R6BT3RGKODHZN2AEX26XHNSLCHGPGMQ7IS2ONRTZEPJECW7A": null, + "E7Z4FLW3UW2ALRLPSMHQWJWBK7VWS63H3AUZZL6LHCIG3Q5B": null, + "FUZAITDO5EH4BU3ZAN55R2RQZ75LRAYI4X3MEJKJD44VHOT7": null, + "7SZ7VZ5O2OFPJL3K5JJKH3C2ZYAJCWW5GYXSLVFHRRATZDFA": null, + "6H7VKVPSP4MHB6P7H5KLQQN3Q6ZSS65OMK6GJ3JIUMHQINMC": null, + "QNCN75MNVAVH2OQR3JE53SGCKLXPSB2XBTZ55J3AX37AV5HT": null, + "JCSYRKMHDGVUVZO65VQVAV5SGQS5IRS4UGFNFKMYP6CXMHXN": null, + "JXX5VCQU2Q73TK5ICSFX3QIGA6E4IFRTGKPZZY32UTB2RY2Z": null, + "BMUAPYFGRJO7ZQAMMSSEADU2RC3LPAAXTORXLSIUCXCSSC2P": null, + "3SPFCAR2V2PQA3RWOY5ZZXI2V6UEUCZWL6SNCGEAGNR2JQZV": null, + "KUW7Z4ZHRUX6DI6Y3ME7A33SXUAQPXFAHRG4IEU32ETMGTLC": null, + "64F67UZGQHZUXLN6HCATAAX2FUQNK2WVOEJGBQ27H5DVZFC3": null, + "GHMJSW2TE6E3JLFDD7T6FI67HBDHNDVLGEKATAO5G33TID57": null, + "6BZEOJR372ZLNXUMEQQUKHHDCAOE5W4YDT3VWGI3YYPYDC5R": null, + "62JOKD5O25I7DBDFMM2BRQP4HI2VJTUHMEF3G3C7JFJF2VNL": null, + "NEF5ANHSBNEXLOP7FFH7ZVHPDOCHQQ6EYOG64JDZNIHBT44L": null, + "ZKLJACJIQT6M7KUY3VWTMQ4WD7RETAWN7LDUB7UQA3NZHZLC": null, + "VBZVHDFHE464JTYWCLYNAA65RDMVURJHVZHWRL3IKTNT6AH6": null, + "FHBYZO5SUBQ56J72DWYOUZSDKXE3SKDRWBEGLQPHWUGVSW5B": null, + "HHWRIAY52UXIOIKQOL3PBERZFDCQXAAUIDT4RTZF2VETEY3Q": null, + "JALKMRCQEIXX3JPLOACUZ2DKA5I2RWSSSIYDVSURW475XHR7": null, + "IMQUFG6JBGWA7R3D3NRMJNOF5MKE2NU4H2LAI6UPIHUEY2ZD": null, + "GWSUUFLKG23Z4BXTLB2HJHYVRWAWHKV5MA5RVOEE77Z65ILK": null, + "ILKEEWZSHVZSQ5M5VAZH6MJPBVQVV63SCQSX73YGTOQZBFKB": null, + "TBU3SS7AG7QISWIK2KKNE77ISJUEVH3ZV7QZJAEHLMAOUCEZ": null, + "EPN2PRVPXZGZ6WRX5ZMG6UPIM2V2NEA4BBC7ZDAIVCEKMHR5": null, + "Z7GJAUSWDAH2JUMVX6IZB2PRSIUHYUKXGKJDM7FXVFDJNDUU": null, + "APOEQP3DLJGKFU7424CJJBFDTWODGF45H7HSXT3GO2UC3VCI": null, + "LCYBWI4HYCSVGBSWWDJYDCWQZGJP2KVSXUUJBO3XFUWOS4SA": null, + "KOTWM653HSOQ2JHNAZGZZA5FGBBJCCBYPDVDE7WDXXIHTULF": null, + "TIPJO4GHBUJQKWKVHK5RF2NI5Z6FAIEBGFPR5L4SSCLS6IE6": null, + "QJZMGE4B6UPJ35KTTNIAHWTFV7DFQZ2QMF6DLHB2AHZQ45CD": null, + "SDV2RDMAXCYWHJJRPTEIZVE6SJST7KQJB57AXCWFVO54E2GX": null, + "4NW6WJDWXCXG2TS24H4I7WF2IGROPO4UBN2HJ64M3CWBU2M7": null, + "GJPMFWNBHZ63VB5XWIM52UO22ANEXDYLHTF24LGBC7XXI4SH": null, + "I3TPFLVZ47TOOMM2G35JFQAYHLAIU3OXV4SXZEP67DNGYXN3": null, + "QMPKHHYWWSV32R2LHCWFKBFDXUDUXTZ7FRZK3TCF25CSFNWD": null, + "J3C6XZSMIXH2SQMBUEVWEI6UZVX2GJZCAYSPD74BBUUK45RS": null, + "WHK5HZ42VH6IJ4U4EUKKVLRAID2FH2YISR7IV6FMNHQPPSH7": null, + "C62NUQB2FUJTY5VRNI6ND26FXCUVACSUTTR6NZMNQPYK6357": null, + "2JXXJE7WN7QWO6X3ESQCSDDBTZXOY43L5AODQUIR5P6Y4PZB": null, + "FQVJ4Y4GES3RGRABQCJIDIYEUNTIGETQ5EOXW25SZSYNJENT": null, + "IH2YJNGRU5Y3ODZHMWNV3TIU2MGCNLIPV75QL3JL4I7PH5ZI": null, + "RYUBMVYE4PL6JJOSBM57NE2RFKCY2EB3EQR3QU45MJHEX5IN": null, + "KRVCQJ6VSHM52MLDNS65PKDYHNBJAHCONQCNLXBD76LDCOFY": null, + "W7MB2FYKYWXDXNOKVWJW7TSUANZIGE25NABNIAK7VLPLKQQH": null, + "QUJNQSAHDXMNHKHHIRBEFONX6NRV4NA7NKFRDI72ZKVZXR32": null, + "SRQAJHTEQYVNHCJDTYHA72VSYS4FPTHXGPFYP6CQRTEUIWVN": null, + "GYQMORZKT4JGWGOD4KBEMUB3XZNUM7H4G5IRA6SYDZOGAPVF": null, + "73P37OKSAJ5SWM5NJ2QWCTKPTFNLORRRGBNJWR7BTCRLKNCO": null, + "D7YVGR63MRZ5YS3UTCUZ7REPWGB6EMGNI3LXZUDAYBSZVGHZ": null, + "JNUZON5EE4CF5UIPXIAU5HKQSBN6O2C3OXJ5IT6HPZMUBXRK": null, + "3UMKRHCWRV2WNUWPF4WKESLI6EOHPFC6FOXF2MGP6E7GPKF7": null, + "ZPWCDBHEOCZRBAVIQNGRQ4WNKSE4XCXWH3PQSBJWVTMLP6AD": null, + "RCOP6UXD6CG5XYUXFXT7HDAWQA2LRA52R2NVABFBB574N62D": null, + "6EHQW3VGWSY5MQKBQ4PWU2YD4KKXPBUFJCBEEY6GKOGGGT4P": null, + "V72EUDLMYSS47DCO7XIEYQO4S6KK7ME4C6VN6IWLZALPDIR2": null, + "EX6JHHNN4R7BQVBTVXYRD54J6BLOJTRHM64QBK3DHUWW37KF": null, + "6GGFMOEZN5PBE67AJM6XJKDL7V6X26X3TH2WVOO4X2MEQJKO": null, + "LYM2NDKVFTJ2IJV2G5HTDDXFDAAHVHVMVTNGBAOABW4JLB7V": null, + "5GPR3EHGCAFLKH4CTOZK3JBHCJSEEFD2Y5GS5Y3B5FPXAK6H": null, + "3TVZ6BP47YPHI4HKRIK43AJPRVM5UO736FF7WEXI6FJMTKY7": null, + "XDL7LZWG4CIO574WINYHCXMGRRZV5BMZQH6GPTTVPBWGV4MD": null, + "OHDX42IVKOGGQVXFE7Q3DKX2HNXGIZRAZ5TVVKQ34BO7UKPB": null, + "QHSOVA5SCRL5AK65IALQZWLHPSMLOOHHS6JN3LHDCN7DEHJ7": null, + "EI2J32TUZKPKSWOYH7EPPKHISCJ5SPTUFJXENKZJFAPEFQJL": null, + "3FFPGZBSH57RTBR326VUSL4G3DELAIPWCCHB77LFG5CBS2YU": null, + "VOLJPHGJOQKGKQ3PQGRLYJBZCIF3T355GXCQQKV34USNOXNX": null, + "ZASYP4G3K3DX6MMU2CK2P6GJ2PKRQFQGFVEZGTMIRAZBDMOC": null, + "MSLOXTCY6MPU6XRGIJ7ZGFBB5J4RTGTEC2UW2LO5MIKPXFJO": null, + "DM3ZAC4JV4IDN7ZZ2OLHAUCUEWYTMLZSQQEARJF4JVBUTE2D": null, + "KWIXQOXXGHTUPBDCHXV6ET4YZXIDCYZEQTFIRHD7DTMSGZ3X": null, + "SOF4BRIWEU5XLSXVFE6IHVVDYG73RK5HJACKPUNFRNEDHRWS": null, + "4FECMJE2AGQGN54LFXTIQFZC6ZVJN3LY62YCS4E65PMW2K5J": null, + "VDCWL2B5OEDDB2YGM7Y23WLJPJBFESITFU5AWDPUKDUMFPBO": null, + "W6VC6MV4GBWJ7IDAX4DQHWJSBUJHJN7ADFJ53NBVND3TXUCZ": null, + "Z3TTBMVW3FCTJPLHXITOVK4LPLUFJJY3CIYKJ4QY2DANJ53R": null, + "O6N3PZGXI5B6NBTOFPB5WWIRJ66O4FYLSGHDIJLVPT25YPWK": null, + "RXCNDGG7CDEMAOGCALTPXWLUL7A67D3JSKOZSZEQBLDW2F3S": null, + "XVKBWW7HRXDBW3YXSBMO7WVEUPVQ7LRZ44RVFI27PYZO3NTS": null, + "XUSRB4YQDOYJALL7CK2OYFPL7GKI6XOFYHP7HTW5H3PF333V": null, + "PCCHIGPV6SWW2O4YRPMFMNF5YVW6QY5IF7JPYAULF5WPTYKB": null, + "MHRU7JFEPHHUAULYL34RAEAGBU2ARZG63TGIIS7MHEQUKWPY": null, + "Y6EDYRAB7V6NAP57DRIKQ3SB57XBPN7MAWD7F3DM4DKWIAMA": null, + "JQXEFOTP5HPBTKL4VAXYCMJFZVGSAM3JVLFJPQ6KHVLCRXFI": null, + "U53PDNGH4IKMP4PW6AJV6K5Q43PYB6VUZ3IJVEKZK32IR5WJ": null, + "52CB2E7VQJ3JJ2SXPHQZZMER64TM2JQBSW3JMX7XITCNSWDT": null, + "3JLBHZFBPZQTO3MLCW6S5N3RIR42N6RGDHMP4U6IO6STOOVT": null, + "YTFVKDUY6LHHBY5JBBTT75RYI73Y2Y2DFT5PBMOLEVBJEN4Y": null, + "TAHMINQIUDTCEBCJ4UH2PUXO5TYMIIZTH4BX26S4NRMPFD6Q": null, + "4VJIQ6FLWV6ONBHRWDR34KXCTHL7HIXSQAF3FAKOMZ2C7QV7": null, + "IQWFFVGP6CPSAQWMKA3SWYOXAUL2YCD3EJYRQ56S3VXWAMUF": null, + "J2FABCRQ7HZFV4FKZKY2UOXRUO4FYXANTTWL27ANRYY6XZC2": null, + "G3TOY5CIOYIELRC2S35CGAS2E36TDLTO5XYXHFVKZNDFQC6F": null, + "SDKQB4B47LL6CAFDDYJWDS4X7COKTZOCQ6ELJBL2YF6RHZJC": null, + "L76D3LKKTUAWNPDXKTWE7JCFCRFVI4UX6NKQS3CAA2OWVF4K": null, + "QVYYK2GQF7DHSJACSOZPOQUCWWIYTRGEWMBIR5RRCV2EPQ5X": null, + "UM3PJVMZNDU2GJ6KVY5VQ2HPGMSJKVAQBDRKZKHBPBRCU5SO": null, + "RDIJQSPXHAUB7XSQQPOL3CNUR5AJAJEWAFYFSDO5G4QWZQCV": null, + "3CAVVDQOCSMOPC54JWKI5ITUIHAOV6SKAIIAAPAAJLBDTXEM": null, + "JHLSLTDSRVKDHWRGT55OZ5NC6YHGD35WHW4GPK77VZWPNVKN": null, + "6K266T5MHDGFA2XECSFBMTQDEE2C4S45S53XBODESR4ERZQ2": null, + "VJVWAFFKWR2KSTFIWGAKDUG5VQTO3BPTI7YFYZWZSBMMQOIN": null, + "LBSXWCQNCHYUG5M255T3W72NBPR5MBEPO7DFBCD277HSH4DU": null, + "WHJGXILLMK23VGXI2OY76SYJQOQHQOM6OSLT4BWU2KSD3OAD": null, + "DVNEV7ANOMDRQDHTEMD6CXCTO7NOY2MQQOLI47U4DDOJ2A2M": null, + "TV752NASHG7FG2JOGS5P6QLJ7E4W5NX7F3OYYRPOEFZ2NREE": null, + "S4DHHYVQ4RQ7HBAXW5ZKISZMULMLCFTSBFICXNLI2OD7YNF6": null, + "HSRHOS56TX6EEDHUZX7K4K6Y3R2UNHRINXWVK5WBWHDPE5HF": null, + "I67YQZJ4PXHFWHNHMK5SKUEFIL4EEP5B4BH3TJNHZPQOUXDM": null, + "5AJTMUDFBWW3EGM2TH2YAJYXIR6GKM7RPBYBRV6KEQPDDLM6": null, + "6V3SAQQC44I3CSDERRKA2533GYIWWHUZVR67JAWIBPJJBDBI": null, + "5I6EFWIWLDNJQAZNZN326TUHCUY5YOD4ITIT6NL7LWIK6RP4": null, + "NVT5LE35FIT6LKWBI5XZO2Q7CTQBFJ3IOIAFNXI7PGVHEE5W": null, + "E5I534XUV7GRNCMHBVFI7FMTSPYBGXKOFVXXSEQYYLVGCASL": null, + "3XDVU325YQTEXC7HFJKKKH7CTCCNNJZMV6VRT5GVED7HFKMZ": null, + "3UJYDR6QUVSSCRHJT6WWNEHC5OMYXOPL3EF26PU2A5HESFG5": null, + "UPRVTQXNXYCZG4JZIR7GZCCYTXR5VTUR2OKAJXEWGATCSIOH": null, + "2QLXXZPU57ZXMLJHEYDS6IHFLQHOKANOE5URI2TRNFNSIFUG": null, + "JFL3SN7LZ7M4RUZXRTYFQTUMYWYHO4P3ZKBGFDC2GGWZBPEA": null, + "SBLHOHHAOCNEVQI3UPBY5S4UKTTIH3DEJEDJHWMJ6VEWWTCL": null, + "TIE3GNWA2BE2WGFA7Y3KEHF4IF77M5XHZB3DIQLOE3GG4VQM": null, + "BB7XBWIYV33TZGTKHTBL4PDPH5ZQ6X7ZCMHS3KIQEJOLOXVH": null, + "6WO2JPOCRLCUSXS7BHNKFBDGFSEXCWYUFPK5SDZJTFJAEJRV": null, + "RCJUMHWKL3IBJ4ZVWHK4RCZ4RCVVTMG5ZO2KWZOIVZLJTSMT": null, + "YIXCNMIMZBA7NK2A5QOCLE77QFF6QDS7NGIHKMILIUB37EMH": null, + "ZSI25IY4L2U7CRPBLOYY5TCSAVG22XHHZFC7JZCRAVY46BWH": null, + "HUSGTJENHNIBJ7VSWZPOWFHHKKYH7H2YSP32LLQ2N7CWKRME": null, + "WTIJK6LZPBOCIJFBZEG26BETKTY5PJKQK5D3M5WVPWVSV7LN": null, + "ITSWONDXALFBD4WMGSMRKQXCVTL7JRKVFEHOAOODRQEFFSWC": null, + "IY3RQGYC2ME2TEUBYAQG5WJ7WOAJV5GTO6P3FKXWOLSJWGCD": null, + "MDSHVZ5WHCTCYB34ZABEUJJRXHQDKO5MSC5YVTGPMNJRXQK7": null, + "KHNSXQTOSCRSTX63S7OVO2LGMD7OVR6PZIGEKL5ZDYPCEKK6": null, + "LECVNJKLFT6P2HWX3H7ZC5DKJSSRZ7PWZVBN735K7I45SOX4": null, + "HFEO55KM3XH34UWCRYM5CFNQ6OFRAKM3U6TABNQDP74DT4JQ": null, + "QZOWC3TAAU67PVSBRJOOVZCBSRIOZCMLPB3FH4GS37WOSTEZ": null, + "TSB72AJ4HHOBEYK4CGFX3W4RW3SIECQYJMYISHTPPCGQNLFD": null, + "6AB4YKYVMU2PXRABAUBBBF4BJ3IOFKYWBJ2IMFMRVLCBI4S4": null, + "E3TI3V725PEP7U2CYZUUKJEBPAHOEI5SYCR3YZCMGD5EGYHF": null, + "APKJUBCO5NHY6QBYNA2ADB5TTPLCNZMHG7HGXXOLRBOZD46Y": null, + "QKL26OQG6L54OCKFPLMXI6M3EG2HI4EG34D7BNI5SBZG6OF7": null, + "W4KKIH4RPYXL4JZY24JWLHOATFNENBMSEQQ3DI7WW4PQIJQ3": null, + "4XJPWCDQXS6MSKI4EMFPENOX5FV7KMKKZ77LV6GJ6S7ZBVB2": null, + "LWMCTL5CEAVQDT5PEXFKRK7Q264CNVV6AU657OQ3SSPCDGSQ": null, + "CBMCT6STEYDOVXT6OW34OXGZBN2A77OGBPDRN5AZK4RXNEV5": null, + "OUGRMVL7PTQ3GJNWQ5WP7XXNYBIMVWKSNQ2QZH5RZRDEGUND": null, + "XKVAYVNQL7KW5EHGEWYRPSWDXNUEKP3YC3OXGEHKG7PGNZHL": null, + "ZLO6BOTXUEEW7UOENY2NVIFLSG37YPUETQBYYCQBJM5VXNG4": null, + "QMZJWAJYYE6WZQX3OKY34BPU7ZZN6ECDNIZOIXREE6AP3WJF": null, + "B5FU7VNVUSA3ODDEUDVTKE7GWPU3JQXWHRWYGLT6VFKSFYAA": null, + "HLHSAJUSHU5EY26UTR2UDJAM3BIHYYHF46MNLTQZJWDAUCDO": null, + "N73SLU2EDTPQ54MY5NWT7KPSVTO3TOGPO3DGX4HQYPZMFYJV": null, + "7B47MDGTJA3P2WX3KWLLESWTC7RJUSVUSBI42SATEYZVPL5K": null, + "YYLWTHMS5POBP3WVX5Q4NXQ77STWJTAHE6QK7GYMBIJU3TSX": null, + "JI7Q6GUWUTSJPHKUII5IVOUZ2QQ53EWNWCUM4PKECXWSVSEK": null, + "XR4W6GZYNYIDAFU7MWMIGFGF63OLKU4FWQZ4RAN3HWNXUINB": null, + "3KX2TVZZAQSYQHLDSWMVZVF4UAXYONTXXFWSGI6CJ56DXU6O": null, + "UR6JGWK36D4CU63DYI722UFUKLB2S52ZI4OAVZM7CVGGY3SW": null, + "VGQOGZH3H5IAFESOYWHOQGU5FHP4BJAUUK2B7AKDCJX3PUE5": null, + "Y5GO3VITRDTHWTMUULEA44BVX3GHVLIWFMTNUY2APWRL3JLD": null, + "F7U4AV4VU7YAEDK6SI64JJUNEHG2MEFLKNOI77IVDQS7BGJK": null, + "D77762UIMSS52GNAPWFCEEFPWGYLBPKWMBN75S3HCOI2SYCL": null, + "NNRBK2PM7FI7MVFBSUUCZVFTDOKXLNVK6I4MMUXU4AKDPTCK": null, + "YSGZXEZQRGZ3DSMNCNH6GSWGCRWQSIRD3IOR5E3XEUH5RORJ": null, + "P6KRZXZTESTNZHYLZFTDLZMIGIN5H74H2KYUTNRIC3JWCNJ2": null, + "QK36OWDC6RHQIASJXU2HZVIBARNIESSCWKICTRQ4B3OFUB6D": null, + "JQBWWRLDDMH3HACHKR7EKXFCAAR5E62DX3ALK22Y5AFA4JDZ": null, + "WWOLYDEZIQARIEC65MFSVB5RH3236B3E2YSGNEN2QY6A2G54": null, + "QT5UVU5QUPEY7VCTTW26JTO2FBUUBCRBYZORWGTYQZ2JZSCH": null, + "PJQFD75BGF35X4N33WD423KSDLIAWJNAZUBXQTUGHOW4PTXJ": null, + "A5VRG2DRN3CKKTP2DN5YNILXVCZRTKFXWILKWLZ6PNVKJTM5": null, + "TY4YPLWS4MDSKPG2HHIRSAWK37LFVB357RGGBRFP2P332HJL": null, + "SUC7ZGB6YKDYNAP6NTUZVEVNDL22KBCRZIGAWSOBUAL55LDE": null, + "Z5I7WKVA6754S4G7QWWXYTRZ3SGEG4B3KG5MLHP3GJDI3H7M": null, + "VLGCWOT665AT2R6EMOAVHNKVM2NKPSV4KI4CMNEUZ2YMI3UP": null, + "YJMQW3C2NIIZKTJY34XRL4HQ5A7EUMLMXTJFHHRE3NR3QGZF": null, + "TOEB56GVW7OQ7QLL25ZY3ABP4ZQS2ZZMIJRNTILE5CWA2IZB": null, + "5RGLCKE6D2MM5YH74OJBDHTOZIM7LN3EIYBLXVF4PGNBZON4": null, + "QMQPPFLB6NCEBYCQ5U2YWVYWRKZSFJLCDAAPYSPURDLXAU6G": null, + "UTAFBURT6XHHZV3Y5OZJBJJQT4342SSCOLWT35GZIJUPWTTM": null, + "XCIXTAB5SB5EMQLZW7GCBUS2N3XU44YELMLSYIFAJHHGP3VS": null, + "LWL5AM7Q4JPEDEORTLNDWUF5X4AIUI4QC5S4CWUXKXIWP6FP": null, + "M4RONO5HAPE25Q46SSRBVQLEXPCVQLKOKX2NYQWX2SNNGEVB": null, + "UVSHBLSXOHEF3AGG5PDTTDFVXNQPRHCNUTXYDEXJVXI7JCPL": null, + "C3PB24XOHCI52DU64XQL2V2OKZZYG5B4T6PUU44DZCH4DMSS": null, + "VGACAPDUB2J7KLW5PA474JQZWZ6QCDYYB2I32ZFYGXR64M2Y": null, + "NNDVFWEC2OE56D5PLJWEEVG25TMXCXISOUOYDOUEMUZRMZK4": null, + "57TIZBR3DXRX74YXCSJ2RXLZRXKX3K7H6WPS7DVONX7DOJY3": null, + "RFSCST6ITGG53EAZEBXD2VFQTJ53ATEOORQV6SQG5OSDR3FM": null, + "YLIXTKYNMODZNBM3L2EL435GD2LRJ5XAJBDZSYCU3OPZ4N4V": null, + "FBEPPECF3L4RB6QBQLGL44JDBCQCTQ5MOFYFCUQVNL4DCQYV": null, + "PAJST32KEXY6I2Y57OASSUFLF2BLPQQ7NZMVN6EVR7JS5LY3": null, + "76MHL43MEQWH6R552TULI3TLBOR22YDMJC5ZYQVWCNI4BWF2": null, + "A6KZM4OXBKW2NJ7X545F4LIDSC7LIAFYJ4CJSWW2BWSIRWUY": null, + "VND76C7TCKQT6R4X56OD4UYSOBZGC5BQ3LR6RXOX6LA3I5F6": null, + "CE2NODHXCRS4ML26HTI77Q57R7ZXKZO433LHHA66I5U3Y5GP": null, + "3DGAXWQDLZBPUYZPBGMRZG5DOBPTIHKAXFSCBLMEQHZ2A4W2": null, + "NAOTRV3ZNB2PK6RZJZ4UEQVF5M3YISGJNFZQQWPV2S5RL7XM": null, + "HLCSR65OBO7BJQPOA65Q6BRDVFPOL7FJII2LOANRJNUM2DDU": null, + "YCBI6X4JLTHKGAFR7XYKELWE7JW6VHLMFJIWF2ZC7BPCQFFR": null, + "QEF3LB5GFEMHAUDKPPNYGRKUUV6PAWU5XXYCFIHXI7PLGVGW": null, + "ABBQK5JKJZLMX4KGFODWSEHOPDTRHGDZCBO3ULBVOGUIAAGI": null, + "HZLWUQNBAZJSDZEB6IPXQIUMVWUPYVMVP2N72NJ4MOZFUKGT": null, + "7SQCYMGSMYW47TXUWC2J5674L4CRDIAO34D342D7IJ6OE23F": null, + "YAQCDYBXIOY3KZGFJCPS5VD7YQBPBFFFYEA4DPWFWJCWCJXA": null, + "HCZ7SSO422NW6O3ARCBUGNBCMUVEAHXMVKAJSDBHAQSFXIMV": null, + "DPX2FNJNMFQT34DLAOEIN4KMWJYLOEGV7U4VDH635AG6UA5T": null, + "QUO6FPOFFXUUKAZXYRN7N2MMT7IOJEG6NLFIH7B5JI5V2Y44": null, + "UJ6G5JMOINYVRLVISHWTGQDDDWA6X3QDFICKY4QQIHG3QMF4": null, + "ZR3VRUOZMQE4EMVT2WDB45TJ7KB5AGU5UBBPNL2A2D255MOL": null, + "2AFEUH4R6YAJZEODKJBMLDM4ANLCKRU2C33HFSVU2LLXZW5Y": null, + "3S4PV2VOBFB6GFRPG5SB3EHMZE5M7VAAFRJ3JQYHZEFTEKFX": null, + "6EFK4THSCBEG4LDSVE5N5FXSQJTYB5SQ7LKJRBL6IYIREWTN": null, + "HHYCWLKLIII7MJ4MYU7CJZ4YPOOUVWOKLXHZV5NT6LU7WWGX": null, + "XYRSXFI6XRY3YACAIVIZJAVKFTZPRH5FXD7E4P4LYUGX6I5U": null, + "6W72FMK5AP56TNCZ3LE5OTYZ3WYPARBB5AOXDVHGCBOTWZTO": null, + "7YNUW4DUCHUDJSSAWSYOYM2QXWTVSJWGDPIG2EAABTU4QLU5": null, + "HNVXP5XULHDT666ND2M3X2APGXOBCB7SCQB2D7MFQKKNVOS4": null, + "MLCMV4777C55OEVW3SFO4VHH56O7BSIDLZFYYTY3JXNN4DWG": null, + "MSNRSOCYC3HQCUXRLCBYFYQOMJFBDOSHJ3HYYYOHEPODETEE": null, + "BJB2U3W5ZF7WQVTL6R2F542WSS6FQDSVDMXNYWIC5PHED4HH": null, + "E26RFAVZYOV5WZ6WQDVINCGNG6ZYU2XCV4FPEKR45IASGARQ": null, + "4BK33GLSBFLRZHOHECAVVYT3LJHSQ5RFBSMKLMGTK4Z5RGZO": null, + "5I3526BP3QPLNDBEIPVQL2GOAMRBAYWOMILMQK5IT7RES3EV": null, + "IBHOZ4VNFYMLMUNOZIGK743IVASI3DXHCY2RH6SO4EKNGR4A": null, + "CCZT4EOMTISCMIVGMB2ZRUGFIR3R6WKU3ISSJ3VZVA6SBLFC": null, + "OGJUH7B3WKG3W2UFEBL63KLQGPSPRNIHUUKWTKQMBN5QG42E": null, + "Y6JCIA2AYVA3RDOUQFYWI4EMF64H5FIFNAHSKZ6LXCRXCFGW": null, + "VX3OCLLJZPGXWTLGERIMK5IS4OXKU65SMC4YS5JZND6VEPO7": null, + "UXWF26BRES53JKXYXEG5DWJXCR6USGPBWQBDJEVEBA2PPUAI": null, + "IB5SSNMYSFCNB4ODT5OQ2GAGPIVDWOBEI3P3EBWI7AUGC7BR": null, + "ASIAQKC3VSFJE7ZW472ZOAXX2T7JTCLZBN5BYEOAE7E67F5Z": null, + "BKQ3GY255BDDVZ52IIR5K3NFIEKV6GXBVTX3ROY3IN7XDAHA": null, + "JTV5ULWFJJOSFTX32FA6DJWADX5UL3NV4RZZS3Z64IPXDZNK": null, + "GSZ7MZXCFKAWFBXKRVYUDULPJEH3WSI2K634LAAA36M2FRF3": null, + "HSPTZMNCONTGJGIUWP7ZR277AYWTDIKPAWO4RODOIHQGEUF3": null, + "4ABCWRBBUAO5TVOSOZDF3KMCUCKIUCRJSBGH4WGKDHWH3LLN": null, + "K3BK4XFUTDJLS7KY4WJBS7RTZ65HY4N5NJ6AMKNKGO3K6DXG": null, + "S4VZEKYRNOXUITHJENCBKJN6CC6QV7Y4MIHQ6NLN24OJFMBP": null, + "MRM4HMHS2KAISLXU2XYFQCQH7XRVVC3EXSP6JU7FIM2DJHVV": null, + "QMNCR2JQYOST5MD3HI2I4MCTSJDFCAGUTEE6XKM2THC4WXI3": null, + "ANIF4DT5IA4IY7M5OISD4IW4J2TDVHHFIPEONUU4CV75LOFZ": null, + "TQHJIX3NKO5CMVRNOG4WP3YDSGPLTTCRBA3RDBPECWO6EN5U": null, + "6KI4L4RRXZ6WL3TRMCZLAA2W7AQRXDCC43O6AGYJ75NUEQO6": null, + "VL57QTQMHQOAX5MFQTX7GUWOECHVTLYJHIBRKMWIRF4QMN6M": null, + "JFTGBEP2LSZGDDFGV6IV2JAS3J3HB7BDRB6WEYHSC5EIFNA3": null, + "WLEZIN5PPCJE4W2LGEPW4N6AWQ4RLE2AOGFBTETY5HNRSZCY": null, + "LUJRHNRDNK7YOKST7KRVQGVE2ERU3LUVPZLC5YYLCUAX2EEU": null, + "F2OOXAP3FFVMQMJP5IVDLRVV6IP2NUTGT5MGZCJMR2IFNA55": null, + "SVL525L4TVBTLMH22DTXVCNECAZVUTMMYDTA3UQGV7U6P3YU": null, + "546BD77L33PUPQ7TW3GJJVVJTYKHIIKF7YOO4SSGIIIOIJ2Z": null, + "FCZRNOURTDJI2BE7HJ3P4MMY4WYAPFFBCTVFXVTYSK4UB4JK": null, + "S2U5XQEC7I4HOUUR6HFXUF2PR2CLNF5UEIPJHTNF2JM5BZUJ": null, + "JTQGSOTIPVYKGYJBUQC3Y44RWE372S7MPMFDETMH6OEGUJWA": null, + "W3DTWDN6YOEPVUJVUDNPWCLQMXXCLXQPVYU27675LZM4ONDF": null, + "LJ7P7AJNNHJE24PNWQDK7J4VGGNZKKR3OPVRFV5A4U6LRFRW": null, + "I4QO3SZC4455G5PQIJPUUNI4A2BPJKTH5MBA7LN3HRIW6EFZ": null, + "NNR3EXDDDPBTOKTRBPR5SO4OFPXU376ZIEHA6YHEJK57ZRGH": null, + "4MBIV5HD4ZMXY5NIKZQIFKFO7S642PC7CWVX7ATXAXWQWNGU": null, + "A6S5KTN66UWYBWG5CZXJVCJ2F2EA22BCZDFQMM523DU7VFBG": null, + "AOAPML4IEVJZSZUOONTTDYSEN465IHW7MZXHSQ55E47TJ2NW": null, + "ZIW5DXTPGQLTTRHPRQB7SADQPCSTXQRMKHZIXA6T6YW2BMRS": null, + "OUHF6P7JPB5Z2C2E5MEPNQ5R3NY56KNQFHG3RYGWXBYKRRI7": null, + "M3JXOC3CTIEMVHTQW7HB2WQ7L7Q54AWFY6F2UBTSZMDXHTDI": null, + "WQQA7JW5NTSAI73WVQMMAJ4IO6OKZR32GTQTMUWE2HLC7DRH": null, + "WGDVRLD5YWTXFOFTGBBEFCG455EK3BZCZEE2POAX56O3EOQW": null, + "6KAR3LTBYTJ6WRGOUQ2TEPZKWVVBPGCO4OVAN2ADNDNLTOSM": null, + "VEWL2DORBATRWF5HJ7LG66NYWMXH37JJU6XWVGJNDVL3OSAM": null, + "B4HXCGMG5S3VEOZR5IUYOZAEFL6WPRLXB26SLWZHRY3WL3ZU": null, + "REKI5EIO6TNXBWJIENJDQ5CAYEYZC2GXVPAOIWGVXKN2K3OE": null, + "RBOY2SVFDRIKJZWTWVEGSJLHGIMAZXIF5HNBZAKPVRTEFR3A": null, + "SIOSHIHS52CHIB73RFONJOM2HJBTRLGGDFW6JAWTR6UPJBVB": null, + "ZGHKTW43CXC3CBOLSENIMDQUIR22VNXSE6HFBT6ZUA3TPODL": null, + "XA576OGJNZK3AXE3FJLSSGN5MGRK4FJJ2XX3UHHFI6NO7P25": null, + "22VL7B7ZI53VMYEYHKBI7XYNKRQW634B6RLBRXRJN4CQJA6G": null, + "YVHEMU6OLF3FI2MTMZ25QKT5F2OUO3H6CX4WRNEXVH4BO3WZ": null, + "3VJOBPUJI5DUFHNRM456UWSAHIZYXICY7ZFYMECCUHDTG444": null, + "BXLYOEBYW7R4MWPNTOZ2ZJPDDXBHV7JMH75NCD26VGS2VRH7": null, + "GCZOZTTLMHTAKVUQ4TSDOOPHEGK6PH4JQ3ULKZCUIEDW2HLX": null, + "TE6B4JOPAY2CEQ46KJV7N6MY7OAI4VA3UBBXGPOELN7KY5T7": null, + "62BPAKDHZ7ZRJOMVZ2SX2WAKFQATUQLKDQ7YGACJPL2NP4UR": null, + "6U3MTBST24MIPS3HSZJPTBSZJ54T63GMZGZQPGFBS7JGBUVX": null, + "SXBYC5BKXYT4DFNVSS4OVRYLNA5JY4TXMVTIFSCRT6Q5C265": null, + "TAMMZOCU5GDDOIRG6U53NW3UUEUGI3QWW6YY6GWNE7WIHRNE": null, + "O37BSKPNGDUUN24XFSCR2IQHWFYUZJBPWSNC4L43MH5HV272": null, + "AZFWV3I3DANXV3HJB66QMCFJ3UTVJGS3R3IP7VROF2D5JF6U": null, + "W2BLY5MU4PA7HSENYW4MO6VHHPBXUFCFMSBWTCL5F3BIPBFT": null, + "ILFL3JG2XQGZCFBJHZFQRZMLGHZWVRBX3M5Z3HXW2A4GDMNK": null, + "O7VDC3EDG5I567RK5BKXMKA2R6XPHQQPDXQTCZP7BHKV5BK6": null, + "5ZMIJOTL3NPRKBEPS7542ICCNHHUJ2BNOZ7LSL2ICTCUFGSC": null, + "FCTKLPX7PYRSVVBH4KN46HEYLJEYSRTQ3PCUU5RY3BROUZKU": null, + "7EAMJ4C7NUA3XMDDOF3YRJA7Q2BFXFCI4J24ZXSVE7REBRFU": null, + "NOQ6OL6G7QD4ILQ3FAEMEMROBCK4OK3LX3CRMHMA6GG5YIYK": null, + "N3XXFRDRYPWGZ3LDGLIXGLLJYKEHPW4565BUUL67OLMXP554": null, + "GFHEEY3HHESZDI2YHTDDCBKGE3ZPWPXW2WE5AKNL2Y2TJCNJ": null, + "JTUQIEPPBM2QC6XBY3KP2NSDM6WUCJMORCBXNU6ZPXPOHEIW": null, + "V5VTVJ36JZDDO5FIOEZNAKYWPRQSUSTEZAKARDOHQEIFLACE": null, + "KUTOUNOS2QL4O6HF266ANCBNYUSIT66TANXCGYALCPZXULQH": null, + "CJILUW3VUBZCSO5DXTSE4HSVW5UJAJHHCSHGHADKCQE5OTBU": null, + "HD72YVUCR4IY5MG3E73UM35ARFCUIHEPIMUSQXOKLVTT2V67": null, + "ELVTZXW3ZAKR76K6IV6ZHX7WTMKPKIFRPHIU3LK67WQR6IQG": null, + "NIZTNRLCIS4JDLMOTEAKPA6B2JOE76ZBQDEUUGXENEJBYJFV": null, + "FE743ELPJYDYWTJ374PZVE4TNGZPDZWSNUO5PATNYUYBDTBJ": null, + "FIT3JHSZMFJ7N2E7BL6PHEUUHSBHU55YBIH763TGSZQTIAZY": null, + "AP7SXAQ6HW373QPCHKKA4R7NFFUCD7CFB7EERZBNXRGM2Z7R": null, + "BAW6TALQRWXK2OWS2O2UV72BKZGBZCUPR6AXKFZ7WHZXZXWX": null, + "SM3FE7H4NI76AS5YCH6O34LTROZKJ7FEP4IKL33JUBI7FWZJ": null, + "BNO2EJXVMAPFDVF34NBTPSIYKI3UPFI5G2K6KGVU35TIHOQL": null, + "INHCLRC6WPTE2U7OQRSSRGCN4B5K4BUVSGFHEKG5DWJWICOF": null, + "OEHWM7QZ3H67QC4ZQY2USKQA62NLMESA543KWPBUKV7N65TQ": null, + "BN3U5KDJP3QGOSBX3TH5R2DR6PZA5Z7BEGVG6MYRW5GWUCGT": null, + "ID7S7JEGBCI7ES3ZN7PIW5NEP67WTL5H5IB6WVRYS47EEEJ2": null, + "BG4MHZNCCLZQN563CZ2D72CPT5TASZZ6N6L4JOW2XPR7GIDQ": null, + "IAQKAEEUCCT3ZZY5LCO4AZW6F6ZNGUAF56UCD43OPOKSMBHR": null, + "LFCSYYMAFZ5IAB5O4QIEN5GERYIGTH4JH266LORQ36SB2A26": null, + "J7W62H5B42N3YUEFS5F2MECESYBUVHXSIGRMZL6ZNQMCYQMQ": null, + "J24FG5J3MUQOCDAVVCHM6BJWZW4Y7VCSC73DW32TMKIUOXPB": null, + "DGJE6OPBSV3JW45P5WC3EGUMIETVT7MIZX4EA5SCY2F3JKFL": null, + "KWTJYJJT2LMBHE6WH4LNJEHNMNJVOEQ7SLLXGJKWPGOFDYHQ": null, + "7XZDDO3CCV34UECRKEM344EDKKUFD6YDUJ7EW4OAETABTYWV": null, + "BPS2OSY2SOAFFPRY24IEXGZVBEUNVIWZYTVVZRUWT7XM727T": null, + "6GRVGHI3FMCQ5MQ4JR7ORANBXK6GMSI4XRQVE35LPH44XROO": null, + "MZHRR2BS6HII6JD3H32DPSYTTHCVXE4WSC7NUURU43Z5SD56": null, + "QJBSWHFQKABG4CALELT62JWLMW2JVZP35RDYHWHQPZYTIX5M": null, + "K2Y3YRBFB7F5PJJUFJDH5Z5NL2MYOQWGT5T5VI5SP7TVM5NW": null, + "QLONNH4NMZX5WLEJPQEWJECL5JTLTWDSK234NU5H55GA6PFG": null, + "NSSRUR3GI6B7NBK77ZQIIHOA4TEEA5UXVVMRWVLMRIP6SN3T": null, + "WB2TXRE7EPSBGACXUA4YE23M4WLMG3PVRMD2OOCIHNGQVDRY": null, + "3MDCQC5BPGFGGFDO4C4IY53NPTWZMRK5MWLJG2KX7OWVQNFO": null +} diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/bin/types/booleans.json b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/types/booleans.json new file mode 100644 index 0000000000..2dcbb5fe87 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/types/booleans.json @@ -0,0 +1,102 @@ +[ + true, + true, + false, + false, + true, + true, + true, + false, + false, + true, + false, + false, + true, + false, + false, + false, + true, + false, + false, + true, + true, + false, + true, + true, + true, + false, + false, + false, + true, + false, + true, + false, + false, + true, + true, + true, + true, + true, + true, + false, + false, + true, + false, + false, + false, + true, + true, + false, + true, + true, + false, + true, + false, + true, + true, + true, + false, + false, + false, + true, + false, + false, + false, + true, + true, + false, + true, + true, + true, + true, + true, + true, + true, + true, + false, + false, + false, + false, + false, + true, + true, + true, + true, + true, + true, + true, + false, + false, + false, + true, + false, + false, + false, + true, + true, + true, + false, + false, + true, + false +] \ No newline at end of file diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/bin/types/floats.json b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/types/floats.json new file mode 100644 index 0000000000..12b94a11dc --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/types/floats.json @@ -0,0 +1,102 @@ +[ + 135.747111636, + 123.377054008, + 140.527504552, + -72.299143906, + -23.851678949, + 73.586193519, + -158.299382442, + 177.477876032, + 32.268518982, + -139.560009969, + 115.203105183, + -106.025823607, + 167.224138231, + 103.378383732, + -97.498486285, + 18.184723416, + 69.137075711, + 33.849002681, + -120.185228215, + -20.841408615, + -172.659492727, + -2.691464061, + 22.426164066, + -98.416909437, + -31.603082708, + -85.072296561, + 108.620987395, + -43.127078238, + -126.473562057, + -158.595489097, + -57.890678254, + -13.254016573, + -85.024504709, + 171.663552644, + -146.495558248, + -10.606748276, + -118.786969354, + 153.352057804, + -45.215545083, + 37.038725288, + 106.344071897, + -64.607402031, + 85.148030911, + 28.897784566, + 39.51082061, + 20.450382102, + -113.174943618, + 71.60785784, + -168.202648062, + -157.338200017, + 10.879588527, + -114.261694831, + -5.622927072, + -173.330830616, + -29.47002003, + -39.829034201, + 50.031545162, + 82.815735508, + -119.188760828, + -48.455928081, + 163.964263034, + 46.30378861, + -26.248889762, + -47.354615322, + 155.388677633, + -166.710356904, + 42.987233558, + 144.275297374, + 37.394383186, + -122.550388725, + 177.469945914, + 101.104677413, + 109.429869885, + -104.919625624, + 147.522756541, + -81.294703727, + 122.744731363, + 81.803603684, + 26.321556167, + 147.045441354, + 147.256895816, + -174.211095908, + 52.518769316, + -78.58250334, + -173.356685435, + -107.728209264, + -69.982325771, + -113.776095893, + -35.785267074, + -105.748545976, + -30.206523864, + -76.185311723, + -126.400112781, + -26.864958639, + 56.840053629, + 93.781553535, + -116.002949803, + -46.617140948, + 176.846840093, + -144.24821335 +] diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/bin/types/guids.json b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/types/guids.json new file mode 100644 index 0000000000..9d7f5dbc8f --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/types/guids.json @@ -0,0 +1,102 @@ +[ + "d35bf0d4-8d8f-4e17-a5c3-ad9bfd675266", + "db402774-eeb6-463b-9986-c458c44d8b5a", + "2a2e4101-b5f2-40b8-8750-e03f01661e60", + "76787cfa-f4eb-4d62-aaad-e1d588d00ad5", + "fd73894b-b500-4a7c-888c-06b5bd9cec65", + "cce1862a-cf31-4ef2-9e23-f1d23b4e6163", + "00a98bb0-2b6e-4368-8512-71c21aa87db7", + "ab9a8d69-cec7-4550-bd35-3ed678e22782", + "f18b48e1-5114-4fbe-9652-579e8d66950e", + "4efe3baa-7ac5-4d6a-a839-6b9cfe825764", + "b4aec119-5b0a-434c-b388-109816c482a5", + "e0ef0cbb-127a-4a28-9831-5741b4295275", + "d50286a5-cb7b-4c9e-be99-f214439bae8c", + "a981094c-f1ac-42ed-a9fa-86404c7210ff", + "2a34ee57-5815-4829-b77b-eeebaa8fe340", + "a0530d44-48f8-4eff-b9ea-8810c4308351", + "c6f91509-83e1-4ea1-9680-e667fbfd56ee", + "cab11402-dcdd-4454-b190-6da124947395", + "283d159c-2b18-4856-b4c7-5059252eaa15", + "146157c6-72a8-4051-9991-cb6ea6743d81", + "aef6f269-7306-4bd2-83f7-6d5605b5dc9a", + "37fe6027-d638-4017-80a9-e7b0567b278e", + "5003d731-33fb-4159-af61-d76348a44079", + "e0e06979-5f80-4713-9fe0-8a4d60dc89f8", + "7e85bdc3-0345-4cb6-9398-ccab06e79976", + "f2ebf5af-6568-4ffe-a46d-403863fd4b66", + "e0b5bb1c-b4dd-4535-9a9e-3c73f1167d46", + "c852d20b-6bcb-4b12-bd57-308296c64c5a", + "7ac3ae82-1818-49cd-a8a4-5ac77dfafd46", + "138004a9-76e2-4ad7-bd42-e74dabdbb803", + "ab25b5be-96be-45b0-b765-947b40ec36a6", + "08404734-fd57-499e-a4cf-71e9ec782ede", + "8dfdeb16-248b-4a21-bf89-2e22b11a4101", + "a0e44ef0-3b09-41e8-ad5d-ed8e6a1a2a67", + "a7981e49-188d-414a-9779-b1ad91e599d1", + "329186c0-bf27-4208-baf7-c0a0a5a2d5b7", + "cb5f3381-d33e-4b30-b1a9-f482623cad33", + "15031262-ca73-4e3c-bd0a-fcf89bdf0caf", + "6d7333d1-2e8c-4d78-bfde-5be47e70eb13", + "acaa160c-670a-4e8f-ac45-49416e77d5f9", + "228f87eb-cde4-4106-808b-2dbf3c7b6d2e", + "2ff830a3-5445-4d8e-b161-bddd30666697", + "f488bedd-ff6e-4108-b9a7-07f6da62f476", + "2e12b846-0a34-478e-adf7-a438493803e6", + "6686b8ef-7446-4d86-bd8c-df24119e3bfe", + "e474a5c5-5793-4d41-b4ab-5423acc56ef1", + "ac046573-e718-44dc-a0dc-9037eeaba6a9", + "6b0e9099-cf53-4d5a-8a71-977528628fcf", + "d51a3f22-0ff9-4087-ba9b-fcee2a2d8ade", + "bdc01286-3511-4d22-bfb8-76d01203d366", + "ca44eb84-17ff-4f27-8f1e-1bd25f4e8725", + "4e9a8c2f-be0b-4913-92d2-c801b9a50d04", + "7685d231-dadd-4041-9165-898397438ab7", + "86f0bf26-d66a-44d8-99f5-d6768addae3b", + "2ca1167c-72ba-45a0-aa42-faf033db0d0b", + "199a1182-ea55-49ff-ba51-71c29cdd0aac", + "be6a4dd2-c821-4aa0-8b83-d64d6644b5b2", + "4c5f4781-7f80-4daa-9c20-76b183000514", + "513b31bd-54fb-4d12-a427-42a7c13ff8e1", + "8e211bcb-d76c-4012-83ad-74dd7d23b687", + "44d5807e-0501-4f66-8779-e244d4fdca0a", + "db8cd555-0563-4b7b-b00c-eada300a7065", + "cb14d0c9-46cc-4797-bd3a-752b05629f07", + "4f68b3ef-ac9b-47a0-b6d7-57f398a5c6a5", + "77221aae-1bcf-471c-be45-7f31f733f9d6", + "42a7cac8-9e80-4c45-8c71-511d863c98ea", + "f9018d22-b82c-468c-bdb5-8864d5964801", + "75f4e9b8-62a2-4f21-ad8a-e19eff0419bc", + "9b7385c8-8653-4184-951c-b0ac1b36b42e", + "571018aa-ffbf-4b42-a16d-07b57a7f5f0e", + "35de4a2f-6bf1-45aa-b820-2a27ea833e44", + "0b8edb20-3bb4-4cb4-b089-31957466dbab", + "97da4778-9a7b-4140-a545-968148c81fb7", + "969f326c-8f2a-47c5-b41c-d9c2f06c9b9d", + "ae211037-8b53-4b17-bfc8-c06fc7774409", + "12c5c3c4-0bd5-45d3-bc1d-d04a3c65d3e6", + "ec02024f-ce43-4dd3-8169-a59f7baee043", + "5b6afe77-ce48-47ca-90a0-25cd10ca5ffd", + "2e3a61d4-6b8f-4d2f-ba86-878b4012efd8", + "19a88a67-a5d3-4647-898f-1cde07bce040", + "6db6f420-b5c8-48b9-bbb2-8864fe6fed65", + "5a45dbde-7b53-4f6b-b864-e3b63be3708a", + "c878321b-8a02-4239-9981-15760c2e7d15", + "4e36687f-8bf6-4b12-b496-3a8e382d067e", + "a59a63cd-43c0-4c6e-b208-6dbca86f8176", + "303308c4-2e4a-45b5-8bf3-3e66e9ad05a1", + "8b58fdf1-43a6-4c98-9547-6361b50791af", + "a3563591-72ed-42b5-8e41-bac1d76d70cf", + "38db8c78-3739-4f6e-8313-de4138082114", + "86615bea-7e73-4daf-95da-ae6b9eee1bbb", + "35d38e3e-076e-40dd-9aa8-05be2603bd59", + "9f84c62d-b454-4ba3-8c19-a01878985cdc", + "6721bbae-d765-4a06-8289-6fe46a1bf943", + "0837796f-d0dd-4e50-9b7c-1983e6cc7c48", + "021eb7d7-e869-49b9-80c3-9dd16ce2d981", + "819c56f8-e040-475d-aad5-c6d5e98b20aa", + "3a61ef02-735e-4229-937d-b3777a3f4e1f", + "79dfab84-12e6-4ec8-bfc8-460ae71e4eca", + "a106fabf-e149-476c-8053-b62388b6eb57", + "9a3900a5-bfb4-4de0-baa5-253a8bd0b634" +] \ No newline at end of file diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/bin/types/integers.json b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/types/integers.json new file mode 100644 index 0000000000..5dd05e097a --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/types/integers.json @@ -0,0 +1,102 @@ +[ + 8125686, + 8958709, + 5976222, + 1889524, + 7968493, + 1357486, + 118415, + 7081097, + 4635968, + 7555332, + 2270233, + 3428352, + 8699968, + 2087333, + 7861337, + 7554440, + 2017031, + 7981692, + 6060687, + 1877715, + 3297474, + 8373177, + 6158629, + 7853641, + 3004441, + 9650406, + 2695251, + 1180761, + 4988426, + 6043805, + 8063373, + 6103218, + 2848339, + 8188690, + 9235573, + 5949816, + 6116081, + 6471138, + 3354531, + 4787414, + 9660600, + 942529, + 7278535, + 7967399, + 554292, + 1436493, + 267319, + 2606657, + 7900601, + 4276634, + 7996757, + 8544466, + 7266469, + 3301373, + 4005350, + 6437652, + 7717672, + 7126292, + 8588394, + 2127902, + 7410190, + 1517806, + 4583602, + 3123440, + 7747613, + 5029464, + 9834390, + 3087227, + 4913822, + 7550487, + 4518144, + 5862588, + 1778599, + 9493290, + 5588455, + 3638706, + 7394293, + 4294719, + 3837830, + 6381878, + 7175866, + 8575492, + 1415229, + 1453733, + 6972404, + 9782571, + 4234063, + 7117418, + 7293130, + 8057071, + 9345285, + 7626648, + 3358911, + 4574537, + 9371826, + 7627107, + 6154093, + 5392367, + 5398105, + 6956377 +] \ No newline at end of file diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/bin/types/mixed.json b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/types/mixed.json new file mode 100644 index 0000000000..43e9a1d7be --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/types/mixed.json @@ -0,0 +1,592 @@ +[ + { + "favoriteFruit": "banana", + "greeting": "Hello, Kim! You have 10 unread messages.", + "friends": [ + { + "name": "Higgins Rodriquez", + "id": 0 + }, + { + "name": "James Floyd", + "id": 1 + }, + { + "name": "Gay Stewart", + "id": 2 + } + ], + "range": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9 + ], + "tags": [ + "pariatur", + "ad", + "eiusmod", + "sit", + "et", + "velit", + "culpa" + ], + "longitude": -57.919246, + "latitude": -36.022812, + "registered": "Friday, March 21, 2014 9:13 PM", + "about": "Laborum nulla aliquip ullamco proident excepteur est officia ipsum. Eiusmod exercitation minim ex do labore reprehenderit aliqua minim qui excepteur reprehenderit cupidatat. Sint enim exercitation duis id consequat nisi enim magna. Commodo aliqua id ipsum sit magna enim. Veniam officia in labore fugiat veniam ea laboris ex veniam duis.\r\n", + "address": "323 Pulaski Street, Ronco, North Carolina, 7701", + "phone": "+1 (919) 438-2678", + "email": "kim.griffith@cipromox.biz", + "company": "CIPROMOX", + "name": { + "last": "Griffith", + "first": "Kim" + }, + "eyeColor": "green", + "age": 26, + "picture": "http://placehold.it/32x32", + "balance": "$1,283.55", + "isActive": false, + "guid": "10ab0392-c5e2-48a3-9473-aa725bad892d", + "index": 0, + "_id": "551b91198238a0bcf9a41133" + }, + { + "favoriteFruit": "banana", + "greeting": "Hello, Skinner! You have 9 unread messages.", + "friends": [ + { + "name": "Rhonda Justice", + "id": 0 + }, + { + "name": "Audra Castaneda", + "id": 1 + }, + { + "name": "Vicky Chavez", + "id": 2 + } + ], + "range": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9 + ], + "tags": [ + "dolore", + "enim", + "sit", + "non", + "exercitation", + "fugiat", + "adipisicing" + ], + "longitude": -60.291407, + "latitude": -84.619318, + "registered": "Friday, February 7, 2014 3:17 AM", + "about": "Consectetur eiusmod laboris dolore est ullamco nulla in velit quis esse Lorem. Amet aliqua sunt aute occaecat veniam officia in duis proident aliqua cupidatat mollit. Sint eu qui anim duis ut anim duis eu cillum. Cillum nostrud adipisicing tempor Lorem commodo sit in ad qui non et irure qui. Labore eu aliquip id duis eiusmod veniam.\r\n", + "address": "347 Autumn Avenue, Fidelis, Puerto Rico, 543", + "phone": "+1 (889) 457-2319", + "email": "skinner.maddox@moltonic.co.uk", + "company": "MOLTONIC", + "name": { + "last": "Maddox", + "first": "Skinner" + }, + "eyeColor": "green", + "age": 22, + "picture": "http://placehold.it/32x32", + "balance": "$3,553.10", + "isActive": false, + "guid": "cfbc2fb6-2641-4388-b06d-ec0212cfac1e", + "index": 1, + "_id": "551b91197e0abe92d6642700" + }, + { + "favoriteFruit": "strawberry", + "greeting": "Hello, Reynolds! You have 5 unread messages.", + "friends": [ + { + "name": "Brady Valdez", + "id": 0 + }, + { + "name": "Boyer Golden", + "id": 1 + }, + { + "name": "Gladys Knapp", + "id": 2 + } + ], + "range": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9 + ], + "tags": [ + "commodo", + "eiusmod", + "cupidatat", + "et", + "occaecat", + "proident", + "Lorem" + ], + "longitude": 140.866287, + "latitude": 1.401032, + "registered": "Monday, October 20, 2014 8:01 AM", + "about": "Deserunt elit consequat ea dolor pariatur aute consectetur et nulla ipsum ad. Laboris occaecat ipsum ad duis et esse ea ut voluptate. Ex magna consequat pariatur amet. Quis excepteur non mollit dolore cillum dolor ex esse veniam esse deserunt non occaecat veniam. Sit amet proident proident amet. Nisi est id ut ut adipisicing esse fugiat non dolor aute.\r\n", + "address": "872 Montague Terrace, Haena, Montana, 3106", + "phone": "+1 (974) 410-2655", + "email": "reynolds.sanford@combot.biz", + "company": "COMBOT", + "name": { + "last": "Sanford", + "first": "Reynolds" + }, + "eyeColor": "green", + "age": 21, + "picture": "http://placehold.it/32x32", + "balance": "$3,664.47", + "isActive": true, + "guid": "f9933a9c-c41a-412f-a18d-e727c569870b", + "index": 2, + "_id": "551b91197f170b65413a06e3" + }, + { + "favoriteFruit": "banana", + "greeting": "Hello, Neva! You have 7 unread messages.", + "friends": [ + { + "name": "Clara Cotton", + "id": 0 + }, + { + "name": "Ray Gates", + "id": 1 + }, + { + "name": "Jacobs Reese", + "id": 2 + } + ], + "range": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9 + ], + "tags": [ + "magna", + "labore", + "incididunt", + "velit", + "ea", + "et", + "eiusmod" + ], + "longitude": -133.058479, + "latitude": 87.803677, + "registered": "Friday, May 9, 2014 5:41 PM", + "about": "Do duis occaecat ut officia occaecat officia nostrud reprehenderit ex excepteur aute anim in reprehenderit. Cupidatat nulla eiusmod nulla non minim veniam aute nulla deserunt adipisicing consectetur veniam. Sit consequat ex laboris aliqua labore consectetur tempor proident consequat est. Fugiat quis esse culpa aliquip. Excepteur laborum aliquip sunt eu cupidatat magna eiusmod amet nisi labore aliquip. Ut consectetur esse aliquip exercitation nulla ex occaecat elit do ex eiusmod deserunt. Ex eu voluptate minim deserunt fugiat minim est occaecat ad Lorem nisi.\r\n", + "address": "480 Eagle Street, Fostoria, Oklahoma, 2614", + "phone": "+1 (983) 439-3000", + "email": "neva.barker@pushcart.us", + "company": "PUSHCART", + "name": { + "last": "Barker", + "first": "Neva" + }, + "eyeColor": "brown", + "age": 36, + "picture": "http://placehold.it/32x32", + "balance": "$3,182.24", + "isActive": true, + "guid": "52489849-78e1-4b27-8b86-e3e5ab2b7dc8", + "index": 3, + "_id": "551b9119a13061c083c878d5" + }, + { + "favoriteFruit": "banana", + "greeting": "Hello, Rodgers! You have 6 unread messages.", + "friends": [ + { + "name": "Marguerite Conway", + "id": 0 + }, + { + "name": "Margarita Cunningham", + "id": 1 + }, + { + "name": "Carmela Gallagher", + "id": 2 + } + ], + "range": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9 + ], + "tags": [ + "ipsum", + "magna", + "amet", + "elit", + "sit", + "occaecat", + "elit" + ], + "longitude": -125.436981, + "latitude": 19.868524, + "registered": "Tuesday, July 8, 2014 8:09 PM", + "about": "In cillum esse tempor do magna id ad excepteur ex nostrud mollit deserunt aliqua. Minim aliqua commodo commodo consectetur exercitation nulla nisi dolore aliqua in. Incididunt deserunt mollit nostrud excepteur. Ipsum fugiat anim deserunt Lorem aliquip nisi consequat eu minim in ex duis.\r\n", + "address": "989 Varanda Place, Duryea, Palau, 3972", + "phone": "+1 (968) 578-2974", + "email": "rodgers.conner@frenex.net", + "company": "FRENEX", + "name": { + "last": "Conner", + "first": "Rodgers" + }, + "eyeColor": "blue", + "age": 23, + "picture": "http://placehold.it/32x32", + "balance": "$1,665.17", + "isActive": true, + "guid": "ed3b2374-5afe-4fca-9325-8a7bbc9f81a0", + "index": 4, + "_id": "551b91197bcedb1b56a241ce" + }, + { + "favoriteFruit": "strawberry", + "greeting": "Hello, Mari! You have 10 unread messages.", + "friends": [ + { + "name": "Irwin Boyd", + "id": 0 + }, + { + "name": "Dejesus Flores", + "id": 1 + }, + { + "name": "Lane Mcmahon", + "id": 2 + } + ], + "range": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9 + ], + "tags": [ + "esse", + "aliquip", + "excepteur", + "dolor", + "ex", + "commodo", + "anim" + ], + "longitude": -17.038176, + "latitude": 17.154663, + "registered": "Sunday, April 6, 2014 4:46 AM", + "about": "Excepteur veniam occaecat sint nulla magna in in officia elit. Eiusmod qui dolor fugiat tempor in minim esse officia minim consequat. Lorem ullamco labore proident ipsum id pariatur fugiat consectetur anim cupidatat qui proident non ipsum.\r\n", + "address": "563 Hendrickson Street, Westwood, South Dakota, 4959", + "phone": "+1 (980) 434-3976", + "email": "mari.fleming@beadzza.org", + "company": "BEADZZA", + "name": { + "last": "Fleming", + "first": "Mari" + }, + "eyeColor": "blue", + "age": 21, + "picture": "http://placehold.it/32x32", + "balance": "$1,948.04", + "isActive": true, + "guid": "6bd02166-3b1f-4ed8-84c9-ed96cbf12abc", + "index": 5, + "_id": "551b9119b359ff6d24846f77" + }, + { + "favoriteFruit": "strawberry", + "greeting": "Hello, Maxine! You have 7 unread messages.", + "friends": [ + { + "name": "Sullivan Stark", + "id": 0 + }, + { + "name": "Underwood Mclaughlin", + "id": 1 + }, + { + "name": "Kristy Carlson", + "id": 2 + } + ], + "range": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9 + ], + "tags": [ + "commodo", + "ipsum", + "quis", + "non", + "est", + "mollit", + "exercitation" + ], + "longitude": -105.40635, + "latitude": 37.197993, + "registered": "Tuesday, January 20, 2015 12:30 AM", + "about": "Proident ullamco Lorem est consequat consectetur non eiusmod esse nostrud pariatur eiusmod enim exercitation eiusmod. Consequat duis elit elit minim ullamco et dolor eu minim do tempor esse consequat excepteur. Mollit dolor do voluptate nostrud quis anim cillum velit tempor eiusmod adipisicing tempor do culpa. Eu magna dolor sit amet nisi do laborum dolore nisi. Deserunt ipsum et deserunt non nisi.\r\n", + "address": "252 Boulevard Court, Brenton, Tennessee, 9444", + "phone": "+1 (950) 466-3377", + "email": "maxine.moreno@zentia.tv", + "company": "ZENTIA", + "name": { + "last": "Moreno", + "first": "Maxine" + }, + "eyeColor": "brown", + "age": 24, + "picture": "http://placehold.it/32x32", + "balance": "$1,200.24", + "isActive": false, + "guid": "ce307a37-ca1f-43f5-b637-dca2605712be", + "index": 6, + "_id": "551b91195a6164b2e35f6dc8" + }, + { + "favoriteFruit": "strawberry", + "greeting": "Hello, Helga! You have 5 unread messages.", + "friends": [ + { + "name": "Alicia Vance", + "id": 0 + }, + { + "name": "Vinson Phelps", + "id": 1 + }, + { + "name": "Francisca Kelley", + "id": 2 + } + ], + "range": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9 + ], + "tags": [ + "nostrud", + "eiusmod", + "dolore", + "officia", + "sint", + "non", + "qui" + ], + "longitude": -7.275151, + "latitude": 75.54202, + "registered": "Wednesday, October 1, 2014 6:35 PM", + "about": "Quis duis ullamco velit qui. Consectetur non adipisicing id magna anim. Deserunt est officia qui esse. Et do pariatur incididunt anim ad mollit non. Et eiusmod sunt fugiat elit mollit ad excepteur anim nisi laboris eiusmod aliquip aliquip.\r\n", + "address": "981 Bush Street, Beaulieu, Vermont, 3775", + "phone": "+1 (956) 506-3807", + "email": "helga.burch@synkgen.name", + "company": "SYNKGEN", + "name": { + "last": "Burch", + "first": "Helga" + }, + "eyeColor": "blue", + "age": 22, + "picture": "http://placehold.it/32x32", + "balance": "$3,827.89", + "isActive": false, + "guid": "ff5dfea0-1052-4ef2-8b66-4dc1aad0a4fb", + "index": 7, + "_id": "551b911946be8358ae40e90e" + }, + { + "favoriteFruit": "banana", + "greeting": "Hello, Shaw! You have 5 unread messages.", + "friends": [ + { + "name": "Christian Cardenas", + "id": 0 + }, + { + "name": "Cohen Pennington", + "id": 1 + }, + { + "name": "Mary Lindsay", + "id": 2 + } + ], + "range": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9 + ], + "tags": [ + "occaecat", + "ut", + "occaecat", + "magna", + "exercitation", + "incididunt", + "irure" + ], + "longitude": -89.102972, + "latitude": 89.489596, + "registered": "Thursday, August 21, 2014 5:00 PM", + "about": "Amet cupidatat quis velit aute Lorem consequat pariatur mollit deserunt et sint culpa excepteur duis. Enim proident duis qui ex tempor sunt nostrud occaecat. Officia sit veniam mollit eiusmod minim do aute eiusmod fugiat qui anim adipisicing in laboris. Do tempor reprehenderit sunt laborum esse irure dolor ad consectetur aute sit id ipsum. Commodo et voluptate anim consequat do. Minim laborum ad veniam ad minim incididunt excepteur excepteur aliqua.\r\n", + "address": "237 Pierrepont Street, Herbster, New York, 3490", + "phone": "+1 (976) 455-2880", + "email": "shaw.zamora@shadease.me", + "company": "SHADEASE", + "name": { + "last": "Zamora", + "first": "Shaw" + }, + "eyeColor": "blue", + "age": 38, + "picture": "http://placehold.it/32x32", + "balance": "$3,440.82", + "isActive": false, + "guid": "ac5fdb0e-e1fb-427e-881d-da461be0d1ca", + "index": 8, + "_id": "551b9119af0077bc28a2de25" + }, + { + "favoriteFruit": "apple", + "greeting": "Hello, Melissa! You have 5 unread messages.", + "friends": [ + { + "name": "Marion Villarreal", + "id": 0 + }, + { + "name": "Kate Rose", + "id": 1 + }, + { + "name": "Hines Simon", + "id": 2 + } + ], + "range": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9 + ], + "tags": [ + "amet", + "veniam", + "mollit", + "ad", + "cupidatat", + "deserunt", + "Lorem" + ], + "longitude": -52.735052, + "latitude": 16.258838, + "registered": "Wednesday, April 16, 2014 7:56 PM", + "about": "Aute ut culpa eiusmod tempor duis dolor tempor incididunt. Nisi non proident excepteur eiusmod incididunt nisi minim irure sit. In veniam commodo deserunt proident reprehenderit et consectetur ullamco quis nulla cupidatat.\r\n", + "address": "642 Halsey Street, Blandburg, Kansas, 6761", + "phone": "+1 (941) 539-3851", + "email": "melissa.vaughn@memora.io", + "company": "MEMORA", + "name": { + "last": "Vaughn", + "first": "Melissa" + }, + "eyeColor": "brown", + "age": 24, + "picture": "http://placehold.it/32x32", + "balance": "$2,399.44", + "isActive": true, + "guid": "1769f022-a7f1-4a69-bf4c-f5a5ebeab2d1", + "index": 9, + "_id": "551b9119b607c09c7ffc3b8a" + } +] \ No newline at end of file diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/bin/types/nulls.json b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/types/nulls.json new file mode 100644 index 0000000000..7a636ec87c --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/types/nulls.json @@ -0,0 +1,102 @@ +[ + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null +] \ No newline at end of file diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/bin/types/paragraphs.json b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/types/paragraphs.json new file mode 100644 index 0000000000..8ab3e1c561 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/types/paragraphs.json @@ -0,0 +1,102 @@ +[ + "Commodo ullamco cupidatat nisi sit proident ex. Cillum pariatur occaecat in officia do commodo nisi cillum tempor minim. Ad dolor ut et aliquip fugiat eu officia cupidatat occaecat consectetur eiusmod veniam enim officia.\r\n", + "Adipisicing cillum laborum nisi irure. Cillum dolor proident duis nulla qui mollit dolore reprehenderit mollit. Irure nulla dolor ipsum irure nulla quis laboris do.\r\n", + "Est adipisicing consectetur incididunt in. Occaecat ea magna ex consequat irure sit laborum cillum officia magna sunt do exercitation aliquip. Laboris id aute in dolore reprehenderit voluptate non deserunt laborum.\r\n", + "Consectetur eu aute est est occaecat adipisicing sint enim dolor eu. Tempor amet id non mollit eu consectetur cillum duis. Eu labore velit nulla ipsum commodo consequat aliquip. Cupidatat commodo dolore mollit enim sit excepteur nisi duis laboris deserunt esse.\r\n", + "Incididunt ullamco est fugiat enim fugiat. Do sit mollit anim ad excepteur eu laboris exercitation officia labore nulla ut. Voluptate non voluptate cillum sit et voluptate anim duis velit consequat aliquip dolor. Elit et et esse laboris consectetur officia eiusmod aliquip nisi est. Qui labore dolore ad dolor.\r\n", + "Anim adipisicing est irure proident sit officia ullamco voluptate sunt consectetur duis mollit excepteur veniam. Nostrud ut duis aute exercitation officia et quis elit commodo elit tempor aute aliquip enim. Est officia non cillum consequat voluptate ipsum sit voluptate nulla id.\r\n", + "Ipsum enim consectetur aliquip nulla commodo ut ex aliqua elit duis do. Officia et sunt aliqua dolor minim voluptate veniam esse elit enim. Adipisicing reprehenderit duis ex magna non in fugiat sunt ipsum nostrud fugiat aliquip. Labore voluptate id officia voluptate eu. Magna do nostrud excepteur sunt aliqua adipisicing qui.\r\n", + "Est occaecat non non cupidatat laborum qui. Veniam sit est voluptate labore sit irure consectetur fugiat. Anim enim enim fugiat exercitation anim ad proident esse in aliqua. Laboris ut aute culpa ullamco.\r\n", + "Sit et aliquip cupidatat deserunt eiusmod sint aliquip occaecat nostrud aliqua elit commodo ut magna. Amet sit est deserunt id duis in officia pariatur cupidatat ex. Mollit duis est consequat nulla aute velit ipsum sit consectetur pariatur ut non ex ipsum. Tempor esse velit pariatur reprehenderit et nostrud commodo laborum mollit labore.\r\n", + "Aliquip irure quis esse aliquip. Ex non deserunt culpa aliqua ad anim occaecat ad. Lorem consectetur mollit eu consectetur est non nisi non ipsum. Qui veniam ullamco officia est ut excepteur. Nulla elit dolore cupidatat aliqua enim Lorem elit consequat eiusmod non aliqua eu in. Pariatur in culpa labore sint ipsum consectetur occaecat ad ex ipsum laboris aliquip officia. Non officia eiusmod nisi officia id id laboris deserunt sunt enim magna mollit sit.\r\n", + "Mollit velit laboris laborum nulla aliquip consequat Lorem non incididunt irure. Eu voluptate sint do consectetur tempor sit Lorem in. Laborum eiusmod nisi Lorem ipsum dolore do aute laborum occaecat aute sunt. Sit laborum in ea do ipsum officia irure cillum irure nisi laboris. Ad anim deserunt excepteur ea veniam eiusmod culpa velit veniam. Commodo incididunt ea Lorem eu enim esse nisi incididunt mollit.\r\n", + "Velit proident sunt aute dolore reprehenderit culpa. Pariatur reprehenderit commodo ad ea voluptate anim nulla ipsum eu irure fugiat aliqua et. Adipisicing incididunt anim excepteur voluptate minim qui culpa. Sunt veniam enim reprehenderit magna magna. Sit ad amet deserunt ut aute dolore ad minim.\r\n", + "Esse ullamco sunt mollit mollit. Eu enim dolore laboris cupidatat. Cupidatat adipisicing non aute exercitation fugiat. Non ut cillum labore fugiat aliquip ex duis quis consectetur ut nisi Lorem amet qui. Proident veniam amet qui reprehenderit duis qui. Nisi culpa sit occaecat ullamco occaecat laborum fugiat ut. Non duis deserunt culpa duis.\r\n", + "Id ipsum eiusmod laboris non est ipsum deserunt labore duis reprehenderit deserunt. Sint tempor fugiat eiusmod nostrud in ut laborum esse in nostrud sit deserunt nostrud reprehenderit. Cupidatat aliqua qui anim consequat eu quis consequat consequat elit ipsum pariatur. Cupidatat in dolore velit quis. Exercitation cillum ullamco ex consectetur commodo tempor incididunt exercitation labore ad dolore. Minim incididunt consequat adipisicing esse eu eu voluptate.\r\n", + "Anim sint eiusmod nisi anim do deserunt voluptate ut cillum eiusmod esse ex reprehenderit laborum. Dolore nulla excepteur duis excepteur. Magna nisi nostrud duis non commodo velit esse ipsum Lorem incididunt. Nulla enim consequat ad aliqua. Incididunt irure culpa nostrud ea aute ex sit non ad esse.\r\n", + "Ullamco nostrud cupidatat adipisicing anim fugiat mollit eu. Et ut eu in nulla consequat. Sunt do pariatur culpa non est.\r\n", + "Pariatur incididunt reprehenderit non qui excepteur cillum exercitation nisi occaecat ad. Lorem aliquip laborum commodo reprehenderit sint. Laboris qui ut veniam magna quis et et ullamco voluptate. Tempor reprehenderit deserunt consequat nisi. Esse duis sint in tempor. Amet aute cupidatat in sint et.\r\n", + "Est officia nisi dolore consequat irure et excepteur. Sit qui elit tempor magna qui cillum anim amet proident exercitation proident. Eu cupidatat laborum consectetur duis ullamco irure nulla. Adipisicing culpa non reprehenderit anim aute.\r\n", + "Eu est laborum culpa velit dolore non sunt. Tempor magna veniam ea sit non qui Lorem qui exercitation aliqua aliqua et excepteur eiusmod. Culpa aute anim proident culpa adipisicing duis tempor elit aliquip elit nulla laboris esse dolore. Sit adipisicing non dolor eiusmod occaecat cupidatat.\r\n", + "Culpa velit eu esse sunt. Laborum irure aliqua reprehenderit velit ipsum fugiat officia dolor ut aute officia deserunt. Ipsum sit quis fugiat nostrud aliqua cupidatat ex pariatur et. Cillum proident est irure nisi dolor aliqua deserunt esse occaecat velit dolor.\r\n", + "Exercitation nulla officia sit eiusmod cillum eu incididunt officia exercitation qui Lorem deserunt. Voluptate Lorem minim commodo laborum esse in duis excepteur do duis aliquip nisi voluptate consectetur. Amet tempor officia enim ex esse minim reprehenderit.\r\n", + "Laboris sint deserunt ad aute incididunt. Anim officia sunt elit qui laborum labore commodo irure non. Mollit adipisicing ullamco do aute nulla eu laborum et quis sint aute adipisicing amet. Aliqua officia irure nostrud duis ex.\r\n", + "Eiusmod ipsum aliqua reprehenderit esse est non aute id veniam eiusmod. Elit consequat ad sit tempor elit eu incididunt quis irure ad. Eu incididunt veniam consequat Lorem nostrud cillum officia ea consequat ad cillum. Non nisi irure cupidatat incididunt pariatur incididunt. Duis velit officia ad cillum qui. Aliquip consequat sint aute nisi cillum. Officia commodo nisi incididunt laborum nisi voluptate aliquip Lorem cupidatat anim consequat sit laboris.\r\n", + "Veniam cupidatat et incididunt mollit do ex voluptate veniam nostrud labore esse. Eiusmod irure sint fugiat esse. Aute irure consectetur ut mollit nulla sint esse. Lorem ut quis ex proident nostrud mollit nostrud ea duis duis in magna anim consectetur.\r\n", + "Irure culpa esse qui do dolor fugiat veniam ad. Elit commodo aute elit magna incididunt tempor pariatur velit irure pariatur cillum et ea ad. Ad consequat ea et ad minim ut sunt qui commodo voluptate. Laboris est aliquip anim reprehenderit eu officia et exercitation. Occaecat laboris cupidatat Lorem ullamco in nostrud commodo ipsum in quis esse ex.\r\n", + "Incididunt officia quis voluptate eiusmod esse nisi ipsum quis commodo. Eiusmod dolore tempor occaecat sit exercitation aliqua minim consequat minim mollit qui ad nisi. Aute quis irure adipisicing veniam nisi nisi velit deserunt incididunt anim nostrud.\r\n", + "Voluptate exercitation exercitation id minim excepteur excepteur mollit. Fugiat aute proident nulla ullamco ea. Nisi ea culpa duis dolore veniam anim tempor officia in dolore exercitation exercitation. Dolore quis cillum adipisicing sunt do nulla esse proident ad sint.\r\n", + "Laborum ut mollit sint commodo nulla laborum deserunt Lorem magna commodo mollit tempor deserunt ut. Qui aliquip commodo ea id. Consectetur dolor fugiat dolor excepteur eiusmod. Eu excepteur ex aute ex ex elit ex esse officia cillum exercitation. Duis ut labore ea nostrud excepteur. Reprehenderit labore aute sunt nisi quis Lorem officia. Ad aliquip cupidatat voluptate exercitation voluptate ad irure magna quis.\r\n", + "Tempor velit veniam sit labore elit minim do elit cillum eiusmod sunt excepteur nisi. Aliquip est deserunt excepteur duis fugiat incididunt veniam fugiat. Pariatur sit irure labore et minim non. Cillum quis aute anim sint laboris laboris ullamco exercitation nostrud. Nulla pariatur id laborum minim nisi est adipisicing irure.\r\n", + "Irure exercitation laboris nostrud in do consectetur ad. Magna aliqua Lorem culpa exercitation sint do culpa incididunt mollit eu exercitation. Elit tempor Lorem dolore enim deserunt. Anim et ullamco sint ullamco mollit cillum officia et. Proident incididunt laboris aliquip laborum sint veniam deserunt eu consequat deserunt voluptate laboris. Anim Lorem non laborum exercitation voluptate. Cupidatat reprehenderit culpa Lorem fugiat enim minim consectetur tempor quis ad reprehenderit laboris irure.\r\n", + "Deserunt elit mollit nostrud occaecat labore reprehenderit laboris ex. Esse reprehenderit adipisicing cillum minim in esse aliquip excepteur ex et nisi cillum quis. Cillum labore ut ex sunt. Occaecat proident et mollit magna consequat irure esse. Dolor do enim esse nisi ad.\r\n", + "Pariatur est anim cillum minim elit magna adipisicing quis tempor proident nisi laboris incididunt cupidatat. Nulla est adipisicing sit adipisicing id nostrud amet qui consequat eiusmod tempor voluptate ad. Adipisicing non magna sit occaecat magna mollit ad ex nulla velit ea pariatur. Irure labore ad ea exercitation ex cillum.\r\n", + "Lorem fugiat eu eu cillum nulla tempor sint. Lorem id officia nulla velit labore ut duis ad tempor non. Excepteur quis aute adipisicing nisi nisi consectetur aliquip enim Lorem id ullamco cillum sint voluptate. Qui aliquip incididunt tempor aliqua voluptate labore reprehenderit. Veniam eiusmod elit occaecat voluptate tempor culpa consectetur ea ut exercitation eiusmod exercitation qui.\r\n", + "Aliqua esse pariatur nulla veniam velit ea. Aliquip consectetur tempor ex magna sit aliquip exercitation veniam. Dolor ullamco minim commodo pariatur. Et amet reprehenderit dolore proident elit tempor eiusmod eu incididunt enim ullamco. Adipisicing id officia incididunt esse dolor sunt cupidatat do deserunt mollit do non. Magna ut officia fugiat adipisicing quis ea cillum laborum dolore ad nostrud magna minim est. Dolor voluptate officia proident enim ea deserunt eu voluptate dolore proident laborum officia ea.\r\n", + "Culpa aute consequat esse fugiat cupidatat minim voluptate voluptate eiusmod irure anim elit. Do eiusmod culpa laboris consequat incididunt minim nostrud eiusmod commodo velit ea ullamco proident. Culpa pariatur magna ut mollit nisi. Ea officia do magna deserunt minim nisi tempor ea deserunt veniam cillum exercitation esse.\r\n", + "Anim ullamco nostrud commodo Lorem. Do sunt laborum exercitation proident proident magna. Lorem officia laborum laborum dolor sunt duis commodo Lorem. Officia aute adipisicing ea cupidatat ea dolore. Aliquip adipisicing pariatur consectetur aliqua sit amet officia reprehenderit laborum culpa. Occaecat Lorem eu nisi do Lorem occaecat enim eiusmod laboris id quis. Ad mollit adipisicing sunt adipisicing esse.\r\n", + "Laborum quis sit adipisicing cupidatat. Veniam Lorem eiusmod esse esse sint nisi labore elit et. Deserunt aliqua mollit ut commodo aliqua non incididunt ipsum reprehenderit consectetur. Eiusmod nulla minim laboris Lorem ea Lorem aute tempor pariatur in sit. Incididunt culpa ut do irure amet irure cupidatat est anim anim culpa occaecat. Est velit consectetur eiusmod veniam reprehenderit officia sunt occaecat eiusmod ut sunt occaecat amet.\r\n", + "Elit minim aute fugiat nulla ex quis. Labore fugiat sint nostrud amet quis culpa excepteur in. Consectetur exercitation cupidatat laborum sit. Aute nisi eu aliqua est deserunt eiusmod commodo dolor id. Mollit laborum esse sint ipsum voluptate reprehenderit velit et. Veniam aliquip enim in veniam Lorem voluptate quis deserunt consequat qui commodo ut excepteur aute.\r\n", + "Dolore deserunt veniam aute nisi labore sunt et voluptate irure nisi anim ea. Magna nisi quis anim mollit nisi est dolor do ex aliquip elit aliquip ipsum minim. Dolore est officia nostrud eiusmod ex laborum ea amet est. Officia culpa non est et tempor consectetur exercitation tempor eiusmod enim. Ea tempor laboris qui amet ex nisi culpa dolore consectetur incididunt sunt sunt. Lorem aliquip incididunt magna do et ullamco ex elit aliqua eiusmod qui. Commodo amet dolor sint incididunt ex veniam non Lorem fugiat.\r\n", + "Officia culpa enim voluptate dolore commodo. Minim commodo aliqua minim ex sint excepteur cupidatat adipisicing eu irure. Anim magna deserunt anim Lorem non.\r\n", + "Cupidatat aliquip nulla excepteur sunt cupidatat cupidatat laborum cupidatat exercitation. Laboris minim ex cupidatat culpa elit. Amet enim reprehenderit aliqua laborum est tempor exercitation cupidatat ex dolore do. Do incididunt labore fugiat commodo consectetur nisi incididunt irure sit culpa sit. Elit aute occaecat qui excepteur velit proident cillum qui aliqua ex do ex. Dolore irure ex excepteur veniam id proident mollit Lorem.\r\n", + "Ad commodo cillum duis deserunt elit officia consectetur veniam eiusmod. Reprehenderit et veniam ad commodo reprehenderit magna elit laboris sunt non quis. Adipisicing dolor aute proident ea magna sunt et proident in consectetur.\r\n", + "Veniam exercitation esse esse veniam est nisi. Minim velit incididunt sint aute dolor anim. Fugiat cupidatat id ad nisi in voluptate dolor culpa eiusmod magna eiusmod amet id. Duis aliquip labore et ex amet amet aliquip laborum eiusmod ipsum. Quis qui ut duis duis. Minim in voluptate reprehenderit aliqua.\r\n", + "Elit ut pariatur dolor veniam ipsum consequat. Voluptate Lorem mollit et esse dolore mollit Lorem ad. Elit nostrud eu Lorem labore mollit minim cupidatat officia quis minim dolore incididunt. In cillum aute cillum ut.\r\n", + "Commodo laborum deserunt ut cupidatat pariatur ullamco in esse anim exercitation cillum duis. Consectetur incididunt sit esse Lorem in aute. Eiusmod mollit Lorem consequat minim reprehenderit laborum enim excepteur irure nisi elit. Laborum esse proident aute aute proident adipisicing laborum. Pariatur tempor duis incididunt qui velit pariatur ut officia ea mollit labore dolore. Cillum pariatur minim ullamco sunt incididunt culpa id ullamco exercitation consectetur. Ea exercitation consequat reprehenderit ut ullamco velit eu ad velit magna excepteur eiusmod.\r\n", + "Eu deserunt magna laboris laborum laborum in consequat dolore. Officia proident consectetur proident do occaecat minim pariatur officia ipsum sit non velit officia cillum. Laborum excepteur labore eu minim eiusmod. Sit anim dolore cillum ad do minim culpa sit est ad.\r\n", + "Cupidatat dolor nostrud Lorem sint consequat quis. Quis labore sint incididunt officia tempor. Fugiat nostrud in elit reprehenderit dolor. Nisi sit enim officia minim est adipisicing nulla aute labore nulla nostrud cupidatat est. Deserunt dolore qui irure Lorem esse voluptate velit qui nostrud.\r\n", + "Fugiat Lorem amet nulla nisi qui amet laboris enim cillum. Dolore occaecat exercitation id labore velit do commodo ut cupidatat laborum velit fugiat mollit. Ut et aliqua pariatur occaecat. Lorem occaecat dolore quis esse enim cupidatat exercitation ut tempor sit laboris fugiat adipisicing. Est tempor ex irure consectetur ipsum magna labore. Lorem non quis qui minim nisi magna amet aliquip ex cillum fugiat tempor.\r\n", + "Aliquip eiusmod laborum ipsum deserunt velit esse do magna excepteur consectetur exercitation sit. Minim ullamco reprehenderit commodo nostrud exercitation id irure ex qui ullamco sit esse laboris. Nulla cillum non minim qui cillum nisi aute proident. Dolor anim culpa elit quis excepteur aliqua eiusmod. Elit ea est excepteur consectetur sunt eiusmod enim id commodo irure amet et pariatur laboris. Voluptate magna ad magna dolore cillum cillum irure laboris ipsum officia id Lorem veniam.\r\n", + "Esse sunt elit est aliquip cupidatat commodo deserunt. Deserunt pariatur ipsum qui ad esse esse magna qui cillum laborum. Exercitation veniam pariatur elit amet enim.\r\n", + "Esse quis in id elit nulla occaecat incididunt. Et amet Lorem mollit in veniam do. Velit mollit Lorem consequat commodo Lorem aliquip cupidatat. Minim consequat nostrud nulla in nostrud.\r\n", + "Cillum nulla et eu est nostrud quis elit cupidatat dolor enim excepteur exercitation nisi voluptate. Nulla dolore non ex velit et qui tempor proident id deserunt nisi eu. Tempor ad Lorem ipsum reprehenderit in anim. Anim dolore ullamco enim deserunt quis ex id exercitation velit. Magna exercitation fugiat mollit pariatur ipsum ex consectetur nostrud. Id dolore officia nostrud excepteur laborum. Magna incididunt elit ipsum pariatur adipisicing enim duis est qui commodo velit aute.\r\n", + "Quis esse ex qui nisi dolor. Ullamco laborum dolor esse laboris eiusmod ea magna laboris ea esse ut. Dolore ipsum pariatur veniam sint mollit. Lorem ea proident fugiat ullamco ut nisi culpa eu exercitation exercitation aliquip veniam laborum consectetur.\r\n", + "Pariatur veniam laboris sit aliquip pariatur tempor aute sunt id et ut. Laboris excepteur eiusmod nisi qui quis elit enim ut cupidatat. Et et laborum in fugiat veniam consectetur ipsum laboris duis excepteur ullamco aliqua dolor Lorem. Aliqua ex amet sint anim cupidatat nisi ipsum anim et sunt deserunt. Occaecat culpa ut tempor cillum pariatur ex tempor.\r\n", + "Dolor deserunt eiusmod magna do officia voluptate excepteur est cupidatat. Veniam qui cupidatat amet anim est qui consectetur sit commodo commodo ea ad. Enim ad adipisicing qui nostrud. Non nulla esse ullamco nulla et ex.\r\n", + "Id ullamco ea consectetur est incididunt deserunt et esse. Elit nostrud voluptate eiusmod ut. Excepteur adipisicing qui cupidatat consequat labore id. Qui dolor aliqua do dolore do cupidatat labore ex consectetur ea sit cillum. Sint veniam eiusmod in consectetur consequat fugiat et mollit ut fugiat esse dolor adipisicing.\r\n", + "Ea magna proident labore duis pariatur. Esse cillum aliquip dolor duis fugiat ea ex officia ea irure. Sint elit nisi pariatur sunt nostrud exercitation ullamco culpa magna do.\r\n", + "Minim aliqua voluptate dolor consequat sint tempor deserunt amet magna excepteur. Irure do voluptate magna velit. Nostrud in reprehenderit magna officia nostrud. Cupidatat nulla irure laboris non fugiat ex ex est cupidatat excepteur officia aute velit duis. Sit voluptate id ea exercitation deserunt culpa voluptate nostrud est adipisicing incididunt. Amet proident laborum commodo magna ipsum quis.\r\n", + "Ipsum consectetur consectetur excepteur tempor eiusmod ea fugiat aute velit magna in officia sunt. Sit ut sunt dolore cupidatat dolor adipisicing. Veniam nisi adipisicing esse reprehenderit amet aliqua voluptate ex commodo occaecat est voluptate mollit sunt. Pariatur aliqua qui qui in dolor. Fugiat reprehenderit sit nostrud do sint esse. Tempor sit irure adipisicing ea pariatur duis est sit est incididunt laboris quis do. Et voluptate anim minim aliquip excepteur consequat nisi anim pariatur aliquip ut ipsum dolor magna.\r\n", + "Cillum sit labore excepteur magna id aliqua exercitation consequat laborum Lorem id pariatur nostrud. Lorem qui est labore sint cupidatat sint excepteur nulla in eu aliqua et. Adipisicing velit do enim occaecat laboris quis excepteur ipsum dolor occaecat Lorem dolore id exercitation.\r\n", + "Incididunt in laborum reprehenderit eiusmod irure ex. Elit duis consequat minim magna. Esse consectetur aliquip cillum excepteur excepteur fugiat. Sint tempor consequat minim reprehenderit consectetur adipisicing dolor id Lorem elit non. Occaecat esse quis mollit ea et sint aute fugiat qui tempor. Adipisicing tempor duis non dolore irure elit deserunt qui do.\r\n", + "Labore fugiat eiusmod sint laborum sit duis occaecat. Magna in laborum non cillum excepteur nostrud sit proident pariatur voluptate voluptate adipisicing exercitation occaecat. Ad non dolor aute ex sint do do minim exercitation veniam laborum irure magna ea. Magna do non quis sit consequat Lorem aliquip.\r\n", + "Velit anim do laborum laboris laborum Lorem. Sunt do Lorem amet ipsum est sint velit sit do voluptate mollit veniam enim. Commodo do deserunt in pariatur ut elit sint elit deserunt ea. Ad dolor anim consequat aliquip ut mollit nostrud tempor sunt mollit elit. Reprehenderit laboris labore excepteur occaecat veniam adipisicing cupidatat esse. Ad enim aliquip ea minim excepteur magna. Sint velit veniam pariatur qui dolor est adipisicing ex laboris.\r\n", + "Ea cupidatat ex nulla in sunt est sit dolor enim ad. Eu tempor consequat cupidatat consequat ex incididunt sint culpa. Est Lorem Lorem non cupidatat sunt ut aliqua non nostrud do ullamco. Reprehenderit ad ad nulla nostrud do nulla in. Ipsum adipisicing commodo mollit ipsum exercitation. Aliqua ea anim anim est elit. Ea incididunt consequat minim ad sunt eu cillum.\r\n", + "Tempor quis excepteur eiusmod cupidatat ipsum occaecat id et occaecat. Eiusmod magna aliquip excepteur id amet elit. Ullamco dolore amet anim dolor enim ea magna magna elit. Occaecat magna pariatur in deserunt consectetur officia aliquip ullamco ex aute anim. Minim laborum eu sit elit officia esse do irure pariatur tempor et reprehenderit ullamco labore.\r\n", + "Sit tempor eu minim dolore velit pariatur magna duis reprehenderit ea nulla in. Amet est do consectetur commodo do adipisicing adipisicing in amet. Cillum id ut commodo do pariatur duis aliqua nisi sint ad irure officia reprehenderit. Mollit labore id enim fugiat ullamco irure mollit cupidatat. Quis nisi amet labore eu dolor occaecat commodo aliqua laboris deserunt excepteur deserunt officia. Aliqua non ut sit ad. Laborum veniam ad velit minim dolore ea id magna dolor qui in.\r\n", + "Dolore nostrud ipsum aliqua pariatur id reprehenderit enim ad eiusmod qui. Deserunt anim commodo pariatur excepteur velit eu irure nulla ex labore ipsum aliqua minim aute. Id consequat amet tempor aliquip ex elit adipisicing est do. Eu enim Lorem consectetur minim id irure nulla culpa. Consectetur do consequat aute tempor anim. Qui ad non elit dolor est adipisicing nisi amet cillum sunt quis anim laboris incididunt. Incididunt proident adipisicing labore Lorem.\r\n", + "Et reprehenderit ea officia veniam. Aliquip ullamco consequat elit nisi magna mollit id elit. Amet amet sint velit labore ad nisi. Consectetur tempor id dolor aliqua esse deserunt amet. Qui laborum enim proident voluptate aute eu aute aute sit sit incididunt eu. Sunt ullamco nisi nostrud labore commodo non consectetur quis do duis minim irure. Tempor sint dolor sint aliquip dolore nostrud fugiat.\r\n", + "Aute ullamco quis nisi ut excepteur nostrud duis elit. Veniam ex ad incididunt veniam voluptate. Commodo dolore ullamco sit sint adipisicing proident amet aute duis deserunt.\r\n", + "Labore velit eu cillum nisi. Laboris do cupidatat et non duis cillum. Ullamco dolor tempor cupidatat voluptate laborum ullamco ea duis.\r\n", + "Deserunt consequat aliqua duis aliquip nostrud nostrud dolore nisi. Culpa do sint laborum consectetur ipsum quis laborum laborum pariatur eiusmod. Consectetur laboris ad ad ut quis. Ullamco laboris qui velit id laborum voluptate qui aute nostrud aliquip ea.\r\n", + "Ad cillum anim ex est consectetur mollit id in. Non enim aliquip consequat qui deserunt commodo cillum ad laborum fugiat. Dolor deserunt amet laborum tempor adipisicing voluptate dolor pariatur dolor cillum. Eu mollit ex sunt officia veniam qui est sunt proident. Non aliqua qui elit eu cupidatat ex enim ex proident. Lorem sit minim ullamco officia cupidatat duis minim. Exercitation laborum deserunt voluptate culpa tempor quis nulla id pariatur.\r\n", + "Nostrud quis consectetur ut aliqua excepteur elit consectetur occaecat. Occaecat voluptate Lorem pariatur consequat ullamco fugiat minim. Anim voluptate eu eu cillum tempor dolore aliquip aliqua. Fugiat incididunt ut tempor amet minim. Voluptate nostrud minim pariatur non excepteur ullamco.\r\n", + "Dolore nulla velit officia exercitation irure laboris incididunt anim in laborum in fugiat ut proident. Fugiat aute id consequat fugiat officia ut. Labore sint amet proident amet sint nisi laboris amet id ullamco culpa quis consequat proident. Magna do fugiat veniam dolore elit irure minim. Esse ullamco excepteur labore tempor labore fugiat dolore nisi cupidatat irure dolor pariatur. Magna excepteur laboris nisi eiusmod sit pariatur mollit.\r\n", + "In enim aliquip officia ea ad exercitation cillum culpa occaecat dolore Lorem. Irure cillum commodo adipisicing sunt pariatur ea duis fugiat exercitation laboris culpa ullamco aute. Ut voluptate exercitation qui dolor. Irure et duis elit consequat deserunt proident.\r\n", + "Officia ea Lorem sunt culpa id et tempor excepteur enim deserunt proident. Dolore aliquip dolor laboris cillum proident velit. Et culpa occaecat exercitation cupidatat irure sint adipisicing excepteur pariatur incididunt ad occaecat. Qui proident ipsum cillum minim. Quis ut culpa irure aliqua minim fugiat. In voluptate cupidatat fugiat est laborum dolor esse in pariatur voluptate.\r\n", + "Voluptate enim ipsum officia aute ea adipisicing nisi ut ex do aliquip amet. Reprehenderit enim voluptate tempor ex adipisicing culpa. Culpa occaecat voluptate dolor mollit ipsum exercitation labore et tempor sit ea consectetur aliqua. Elit elit sit minim ea ea commodo do tempor cupidatat irure dolore. Occaecat esse adipisicing anim eiusmod commodo fugiat mollit amet. Incididunt tempor tempor qui occaecat cupidatat in.\r\n", + "Ut qui anim velit enim aliquip do ut nulla labore. Mollit ut commodo ut eiusmod consectetur laboris aliqua qui voluptate culpa fugiat incididunt elit. Lorem ullamco esse elit elit. Labore amet incididunt ea nulla aliquip eiusmod. Sit nulla est voluptate officia ipsum aute aute cillum tempor deserunt. Laboris commodo eiusmod labore sunt aute excepteur ea consectetur reprehenderit veniam nisi. Culpa nisi sint sunt sint tempor laboris dolore cupidatat.\r\n", + "Duis cillum qui nisi duis amet velit ad cillum ut elit aute sint ad. Amet laboris pariatur excepteur ipsum Lorem aliqua veniam Lorem quis mollit cupidatat aliqua exercitation. Pariatur ex ullamco sit commodo cillum eiusmod ut proident elit cillum. Commodo ut ipsum excepteur occaecat sint elit consequat ex dolor adipisicing consectetur id ut ad. Velit sit eiusmod est esse tempor incididunt consectetur eiusmod duis commodo veniam.\r\n", + "Ut sunt qui officia anim laboris exercitation Lorem quis laborum do eiusmod officia. Enim consectetur occaecat fugiat cillum cillum. Dolore dolore nostrud in commodo fugiat mollit consequat occaecat non et et elit ullamco. Sit voluptate minim ut est culpa velit nulla fugiat reprehenderit eu aliquip adipisicing labore. Sit minim minim do dolor dolor. Lorem Lorem labore exercitation magna veniam eiusmod do.\r\n", + "Fugiat dolor adipisicing quis aliquip aute dolore. Qui proident anim elit veniam ex aliquip eiusmod ipsum sunt pariatur est. Non fugiat duis do est officia adipisicing.\r\n", + "Nulla deserunt do laboris cupidatat veniam do consectetur ipsum elit veniam in mollit eu. Ea in consequat cupidatat laboris sint fugiat irure. In commodo esse reprehenderit deserunt minim velit ullamco enim eu cupidatat tempor ex. Ullamco in non id culpa amet occaecat culpa nostrud id. Non occaecat culpa magna incididunt.\r\n", + "Enim laboris ex mollit reprehenderit eiusmod exercitation magna. Exercitation Lorem ex mollit non non culpa labore enim. Adipisicing labore dolore incididunt do amet aliquip excepteur ad et nostrud officia aute veniam voluptate. Fugiat enim eiusmod Lorem esse. Minim ullamco commodo consequat ex commodo aliqua eu nulla eu. Veniam non enim nulla ut Lorem nostrud minim sint duis.\r\n", + "Enim duis consectetur in ullamco cillum veniam nulla amet. Exercitation nisi sunt sunt duis in culpa nisi magna ex id ipsum laboris reprehenderit qui. Officia pariatur qui ex fugiat veniam et sunt sit nostrud. Veniam ullamco tempor fugiat minim Lorem proident velit in eiusmod elit. Enim minim excepteur aute aliquip ex magna commodo dolore qui et labore. Proident eu aliquip cillum dolor. Nostrud ipsum ut irure consequat fugiat nulla proident occaecat laborum.\r\n", + "Amet duis eiusmod sunt adipisicing esse ex nostrud consectetur voluptate cillum. Ipsum occaecat sit et anim velit irure ea incididunt cupidatat ullamco in nisi quis. Esse officia ipsum commodo qui quis qui do. Commodo aliquip amet aute sit sit ut cupidatat elit nostrud.\r\n", + "Laboris laboris sit mollit cillum nulla deserunt commodo culpa est commodo anim id anim sit. Officia id consectetur velit incididunt est dolor sunt ipsum magna aliqua consectetur. Eiusmod pariatur minim deserunt cupidatat veniam Lorem aliquip sunt proident eu Lorem sit dolor fugiat. Proident qui ut ex in incididunt nulla nulla dolor ex laboris ea ad.\r\n", + "Ex incididunt enim labore nulla cupidatat elit. Quis ut incididunt incididunt non irure commodo do mollit cillum anim excepteur. Qui consequat laborum dolore elit tempor aute ut nulla pariatur eu ullamco veniam. Nisi non velit labore in commodo excepteur culpa nulla tempor cillum. Ipsum qui sit sint reprehenderit ut labore incididunt dolor aliquip sunt. Reprehenderit occaecat tempor nisi laborum.\r\n", + "Lorem officia ullamco eu occaecat in magna eiusmod consectetur nisi aliqua mollit esse. Ullamco ex aute nostrud pariatur do enim cillum sint do fugiat nostrud culpa tempor. Do aliquip excepteur nostrud culpa eu pariatur eiusmod cillum excepteur do. Est sunt non quis cillum voluptate ex.\r\n", + "Deserunt consectetur tempor irure mollit qui tempor et. Labore enim eu irure laboris in. Nisi in tempor ex occaecat amet cupidatat laboris occaecat amet minim ut magna incididunt id. Consequat cillum laborum commodo mollit. Et magna culpa sunt dolore consequat laboris et sit. Deserunt qui voluptate excepteur dolor. Eu qui amet est proident.\r\n", + "Eu elit minim eiusmod occaecat eu nostrud dolor qui ut elit. Sunt dolore proident ea eu do eiusmod fugiat incididunt pariatur duis amet Lorem nisi ut. Adipisicing quis veniam cupidatat Lorem sint culpa sunt veniam sint. Excepteur eu exercitation est magna pariatur veniam dolore qui fugiat labore proident eiusmod cillum. Commodo reprehenderit elit proident duis sint magna.\r\n", + "Ut aliquip pariatur deserunt nostrud commodo ad proident est exercitation. Sit minim do ea enim sint officia nisi incididunt laborum. Ex amet duis commodo fugiat. Ut aute tempor deserunt irure occaecat aliquip voluptate cillum aute elit qui nostrud.\r\n", + "Irure et quis consectetur sit est do sunt aliquip eu. Cupidatat pariatur consequat dolore consectetur. Adipisicing magna velit mollit occaecat do id. Nisi pariatur cupidatat cillum incididunt excepteur consectetur excepteur do laborum deserunt irure pariatur cillum.\r\n", + "Adipisicing esse incididunt cillum est irure consequat irure ad aute voluptate. Incididunt do occaecat nostrud do ipsum pariatur Lorem qui laboris et pariatur. Est exercitation dolor culpa ad velit ut et.\r\n", + "Sit eiusmod id enim ad ex dolor pariatur do. Ullamco occaecat quis dolor minim non elit labore amet est. Commodo velit eu nulla eiusmod ullamco. Incididunt anim pariatur aute eiusmod veniam tempor enim officia elit id. Elit Lorem est commodo dolore nostrud. Labore et consectetur do exercitation veniam laboris incididunt aliqua proident dolore ea officia cupidatat. Velit laboris aliquip deserunt labore commodo.\r\n", + "Proident nostrud labore eu nostrud. Excepteur ut in velit labore ea proident labore ea sint cillum. Incididunt ipsum consectetur officia irure sit pariatur veniam id velit officia mollit. Adipisicing magna voluptate velit excepteur enim consectetur incididunt voluptate tempor occaecat fugiat velit excepteur labore. Do do incididunt qui nisi voluptate enim. Laboris aute sit voluptate cillum pariatur minim excepteur ullamco mollit deserunt.\r\n", + "Excepteur laborum adipisicing nisi elit fugiat tempor. Elit laboris qui enim labore duis. Proident tempor in consectetur proident excepteur do ex laboris sit.\r\n", + "Dolore do ea incididunt do duis dolore eu labore nisi cupidatat voluptate amet incididunt minim. Nulla pariatur mollit cupidatat adipisicing nulla et. Dolor aliquip in ex magna excepteur. Nulla consequat minim consequat ullamco dolor laboris ullamco eu reprehenderit duis nostrud pariatur.\r\n", + "Id nisi labore duis qui. Incididunt laboris tempor aute do sit. Occaecat excepteur est mollit ea in mollit ullamco est amet reprehenderit.\r\n", + "Aute labore ipsum velit non voluptate eiusmod et reprehenderit cupidatat occaecat. Lorem tempor tempor consectetur exercitation qui nostrud sunt cillum quis ut non dolore. Reprehenderit consequat reprehenderit laborum qui pariatur anim et officia est cupidatat enim velit velit.\r\n", + "Commodo ex et fugiat cupidatat non adipisicing commodo. Minim ad dolore fugiat mollit cupidatat aliqua sunt dolor sit. Labore esse labore velit aute enim. Nulla duis incididunt est aliquip consectetur elit qui incididunt minim minim labore amet sit cillum.\r\n" +] \ No newline at end of file diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/bin/types/readme.txt b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/types/readme.txt new file mode 100644 index 0000000000..da1dae675e --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/types/readme.txt @@ -0,0 +1 @@ +Test data obtained from https://github.com/xpol/lua-rapidjson/tree/master/performance diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/bin/unittestschema/address.json b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/unittestschema/address.json new file mode 100644 index 0000000000..c3cf642613 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/unittestschema/address.json @@ -0,0 +1,139 @@ +{ + "type": "object", + "properties": { + "version": { + "$ref": "#/definitions/decimal_type" + }, + "address": { + "$ref": "#/definitions/address_type" + }, + "phones": { + "type": "array", + "minItems": 1, + "maxItems": 2, + "uniqueItems": true, + "items": { + "$ref": "#/definitions/phone_type" + } + }, + "names": { + "type": "array", + "items": [ + { "type": "string" }, + { "type": "string" } + ], + "additionalItems": false + }, + "extra": { + "type": "object", + "patternProperties": { + "^S_": { "type": "string" } + } + }, + "gender": { + "type": "string", + "enum": ["M", "F"] + } + }, + "additionalProperties": false, + "dependencies": { + "address": [ "version" ], + "names": { + "properties": { + "version": { "$ref": "#/definitions/decimal_type" } + }, + "required": ["version"] + } + }, + "definitions": { + "address_type": { + "type": "object", + "properties": { + "number": { + "$ref": "#/definitions/positiveInt_type" + }, + "street1": { + "type": "string" + }, + "street2": { + "type": ["string", "null"] + }, + "street3": { + "not": { "type": ["boolean", "number", ",integer", "object", "null"] } + }, + "city": { + "type": "string", + "maxLength": 10, + "minLength": 4 + }, + "area": { + "oneOf": [ + { "$ref": "#/definitions/county_type" }, + { "$ref": "#/definitions/province_type" } + ] + }, + "country": { + "allOf": [ + { "$ref": "#/definitions/country_type" } + ] + }, + "postcode": { + "anyOf": [ + { "type": "string", "pattern": "^[A-Z]{2}[0-9]{1,2} [0-9][A-Z]{2}$" }, + { "type": "string", "pattern": "^[0-9]{5}$" } + ] + } + }, + "minProperties": 7, + "required": [ + "number", + "street1", + "city" + ] + }, + "country_type": { + "type": "string", + "enum": ["UK", "Canada"] + }, + "county_type": { + "type": "string", + "enum": ["Sussex", "Surrey", "Kent"] + }, + "province_type": { + "type": "string", + "enum": ["Quebec", "BC", "Alberta"] + }, + "date_type": { + "pattern": "^([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)(-(0[1-9]|1[0-2])(-(0[1-9]|[1-2][0-9]|3[0-1]))?)?$", + "type": "string" + }, + "positiveInt_type": { + "minimum": 0, + "exclusiveMinimum": true, + "maximum": 100, + "exclusiveMaximum": true, + "type": "integer" + }, + "decimal_type": { + "multipleOf": 1.0, + "type": "number" + }, + "time_type": { + "pattern": "^([01][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)(\\.[0-9]+)?$", + "type": "string" + }, + "unsignedInt_type": { + "type": "integer", + "minimum": 0, + "maximum": 99999 + }, + "phone_type": { + "pattern": "^[0-9]*-[0-9]*", + "type": "string" + }, + "url_type": { + "pattern": "^\\S*$", + "type": "string" + } + } +} \ No newline at end of file diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/bin/unittestschema/allOf_address.json b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/unittestschema/allOf_address.json new file mode 100644 index 0000000000..fd501f66d4 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/unittestschema/allOf_address.json @@ -0,0 +1,7 @@ +{ + "allOf": [ + { + "$ref": "http://localhost:1234/address.json#" + } + ] +} \ No newline at end of file diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/bin/unittestschema/anyOf_address.json b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/unittestschema/anyOf_address.json new file mode 100644 index 0000000000..5c90308f4e --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/unittestschema/anyOf_address.json @@ -0,0 +1,7 @@ +{ + "anyOf": [ + { + "$ref": "http://localhost:1234/address.json#" + } + ] +} \ No newline at end of file diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/bin/unittestschema/idandref.json b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/unittestschema/idandref.json new file mode 100644 index 0000000000..ad485d29fb --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/unittestschema/idandref.json @@ -0,0 +1,69 @@ +{ + "id": "http://example.com/root.json", + "definitions": { + "A": { + "id": "#foo", + "type": "integer" + }, + "B": { + "id": "other.json", + "definitions": { + "X": { + "id": "#bar", + "type": "boolean" + }, + "Y": { + "$ref": "#/definitions/X" + }, + "W": { + "$ref": "#/definitions/Y" + }, + "Z": { + "$ref": "#bar" + }, + "N": { + "properties": { + "NX": { + "$ref": "#/definitions/X" + } + } + } + } + } + }, + "properties": { + "PA1": { + "$ref": "http://example.com/root.json#/definitions/A" + }, + "PA2": { + "$ref": "#/definitions/A" + }, + "PA3": { + "$ref": "#foo" + }, + "PX1": { + "$ref": "#/definitions/B/definitions/X" + }, + "PX2Y": { + "$ref": "#/definitions/B/definitions/Y" + }, + "PX3Z": { + "$ref": "#/definitions/B/definitions/Z" + }, + "PX4": { + "$ref": "http://example.com/other.json#/definitions/X" + }, + "PX5": { + "$ref": "other.json#/definitions/X" + }, + "PX6": { + "$ref": "other.json#bar" + }, + "PX7W": { + "$ref": "#/definitions/B/definitions/W" + }, + "PX8N": { + "$ref": "#/definitions/B/definitions/N" + } + } +} \ No newline at end of file diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/bin/unittestschema/oneOf_address.json b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/unittestschema/oneOf_address.json new file mode 100644 index 0000000000..a5baadd2a8 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/bin/unittestschema/oneOf_address.json @@ -0,0 +1,7 @@ +{ + "oneOf": [ + { + "$ref": "http://localhost:1234/address.json#" + } + ] +} \ No newline at end of file diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/contrib/natvis/LICENSE b/graphics/asymptote/LspCpp/third_party/rapidjson/contrib/natvis/LICENSE new file mode 100644 index 0000000000..f57da96cf9 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/contrib/natvis/LICENSE @@ -0,0 +1,45 @@ +The MIT License (MIT) + +Copyright (c) 2017 Bart Muzzin + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +Derived from: + +The MIT License (MIT) + +Copyright (c) 2015 mojmir svoboda + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/contrib/natvis/README.md b/graphics/asymptote/LspCpp/third_party/rapidjson/contrib/natvis/README.md new file mode 100644 index 0000000000..9685c7f7c1 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/contrib/natvis/README.md @@ -0,0 +1,7 @@ +# rapidjson.natvis + +This file can be used as a [Visual Studio Visualizer](https://docs.microsoft.com/en-gb/visualstudio/debugger/create-custom-views-of-native-objects) to aid in visualizing rapidjson structures within the Visual Studio debugger. Natvis visualizers are supported in Visual Studio 2012 and later. To install, copy the file into this directory: + +`%USERPROFILE%\Documents\Visual Studio 2012\Visualizers` + +Each version of Visual Studio has a similar directory, it must be copied into each directory to be used with that particular version. In Visual Studio 2015 and later, this can be done without restarting Visual Studio (a new debugging session must be started). diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/contrib/natvis/rapidjson.natvis b/graphics/asymptote/LspCpp/third_party/rapidjson/contrib/natvis/rapidjson.natvis new file mode 100644 index 0000000000..e7bd44b6ed --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/contrib/natvis/rapidjson.natvis @@ -0,0 +1,38 @@ + + + + + null + true + false + {(const Ch*)data_.ss.str,na} + {(const Ch*)((size_t)data_.s.str & 0x0000FFFFFFFFFFFF),na} + {data_.n.i.i} + {data_.n.u.u} + {data_.n.i64} + {data_.n.u64} + {data_.n.d} + Object members={data_.o.size} + Array members={data_.a.size} + + data_.o.size + data_.o.capacity + + data_.o.size + + (rapidjson::GenericMember<$T1,$T2>*)(((size_t)data_.o.members) & 0x0000FFFFFFFFFFFF) + + + data_.a.size + data_.a.capacity + + data_.a.size + + (rapidjson::GenericValue<$T1,$T2>*)(((size_t)data_.a.elements) & 0x0000FFFFFFFFFFFF) + + + + + + + diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/doc/CMakeLists.txt b/graphics/asymptote/LspCpp/third_party/rapidjson/doc/CMakeLists.txt new file mode 100644 index 0000000000..c5345ba697 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/doc/CMakeLists.txt @@ -0,0 +1,27 @@ +find_package(Doxygen) + +IF(NOT DOXYGEN_FOUND) + MESSAGE(STATUS "No Doxygen found. Documentation won't be built") +ELSE() + file(GLOB SOURCES ${CMAKE_CURRENT_LIST_DIR}/../include/*) + file(GLOB MARKDOWN_DOC ${CMAKE_CURRENT_LIST_DIR}/../doc/*.md) + list(APPEND MARKDOWN_DOC ${CMAKE_CURRENT_LIST_DIR}/../readme.md) + + CONFIGURE_FILE(Doxyfile.in Doxyfile @ONLY) + CONFIGURE_FILE(Doxyfile.zh-cn.in Doxyfile.zh-cn @ONLY) + + file(GLOB DOXYFILES ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile*) + + add_custom_command(OUTPUT html + COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile + COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile.zh-cn + COMMAND ${CMAKE_COMMAND} -E touch ${CMAKE_CURRENT_BINARY_DIR}/html + DEPENDS ${MARKDOWN_DOC} ${SOURCES} ${DOXYFILES} + WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}/../ + ) + + add_custom_target(doc ALL DEPENDS html) + install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/html + DESTINATION ${DOC_INSTALL_DIR} + COMPONENT doc) +ENDIF() diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/doc/Doxyfile.in b/graphics/asymptote/LspCpp/third_party/rapidjson/doc/Doxyfile.in new file mode 100644 index 0000000000..6e79f9371d --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/doc/Doxyfile.in @@ -0,0 +1,2369 @@ +# Doxyfile 1.8.7 + +# This file describes the settings to be used by the documentation system +# doxygen (www.doxygen.org) for a project. +# +# All text after a double hash (##) is considered a comment and is placed in +# front of the TAG it is preceding. +# +# All text after a single hash (#) is considered a comment and will be ignored. +# The format is: +# TAG = value [value, ...] +# For lists, items can also be appended using: +# TAG += value [value, ...] +# Values that contain spaces should be placed between quotes (\" \"). + +#--------------------------------------------------------------------------- +# Project related configuration options +#--------------------------------------------------------------------------- + +# This tag specifies the encoding used for all characters in the config file +# that follow. The default is UTF-8 which is also the encoding used for all text +# before the first occurrence of this tag. Doxygen uses libiconv (or the iconv +# built into libc) for the transcoding. See http://www.gnu.org/software/libiconv +# for the list of possible encodings. +# The default value is: UTF-8. + +DOXYFILE_ENCODING = UTF-8 + +# The PROJECT_NAME tag is a single word (or a sequence of words surrounded by +# double-quotes, unless you are using Doxywizard) that should identify the +# project for which the documentation is generated. This name is used in the +# title of most generated pages and in a few other places. +# The default value is: My Project. + +PROJECT_NAME = RapidJSON + +# The PROJECT_NUMBER tag can be used to enter a project or revision number. This +# could be handy for archiving the generated documentation or if some version +# control system is used. + +PROJECT_NUMBER = + +# Using the PROJECT_BRIEF tag one can provide an optional one line description +# for a project that appears at the top of each page and should give viewer a +# quick idea about the purpose of the project. Keep the description short. + +PROJECT_BRIEF = "A fast JSON parser/generator for C++ with both SAX/DOM style API" + +# With the PROJECT_LOGO tag one can specify an logo or icon that is included in +# the documentation. The maximum height of the logo should not exceed 55 pixels +# and the maximum width should not exceed 200 pixels. Doxygen will copy the logo +# to the output directory. + +PROJECT_LOGO = + +# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path +# into which the generated documentation will be written. If a relative path is +# entered, it will be relative to the location where doxygen was started. If +# left blank the current directory will be used. + +OUTPUT_DIRECTORY = @CMAKE_CURRENT_BINARY_DIR@ + +# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create 4096 sub- +# directories (in 2 levels) under the output directory of each output format and +# will distribute the generated files over these directories. Enabling this +# option can be useful when feeding doxygen a huge amount of source files, where +# putting all generated files in the same directory would otherwise causes +# performance problems for the file system. +# The default value is: NO. + +CREATE_SUBDIRS = NO + +# If the ALLOW_UNICODE_NAMES tag is set to YES, doxygen will allow non-ASCII +# characters to appear in the names of generated files. If set to NO, non-ASCII +# characters will be escaped, for example _xE3_x81_x84 will be used for Unicode +# U+3044. +# The default value is: NO. + +ALLOW_UNICODE_NAMES = NO + +# The OUTPUT_LANGUAGE tag is used to specify the language in which all +# documentation generated by doxygen is written. Doxygen will use this +# information to generate all constant output in the proper language. +# Possible values are: Afrikaans, Arabic, Armenian, Brazilian, Catalan, Chinese, +# Chinese-Traditional, Croatian, Czech, Danish, Dutch, English (United States), +# Esperanto, Farsi (Persian), Finnish, French, German, Greek, Hungarian, +# Indonesian, Italian, Japanese, Japanese-en (Japanese with English messages), +# Korean, Korean-en (Korean with English messages), Latvian, Lithuanian, +# Macedonian, Norwegian, Persian (Farsi), Polish, Portuguese, Romanian, Russian, +# Serbian, Serbian-Cyrillic, Slovak, Slovene, Spanish, Swedish, Turkish, +# Ukrainian and Vietnamese. +# The default value is: English. + +OUTPUT_LANGUAGE = English + +# If the BRIEF_MEMBER_DESC tag is set to YES doxygen will include brief member +# descriptions after the members that are listed in the file and class +# documentation (similar to Javadoc). Set to NO to disable this. +# The default value is: YES. + +BRIEF_MEMBER_DESC = YES + +# If the REPEAT_BRIEF tag is set to YES doxygen will prepend the brief +# description of a member or function before the detailed description +# +# Note: If both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the +# brief descriptions will be completely suppressed. +# The default value is: YES. + +REPEAT_BRIEF = YES + +# This tag implements a quasi-intelligent brief description abbreviator that is +# used to form the text in various listings. Each string in this list, if found +# as the leading text of the brief description, will be stripped from the text +# and the result, after processing the whole list, is used as the annotated +# text. Otherwise, the brief description is used as-is. If left blank, the +# following values are used ($name is automatically replaced with the name of +# the entity):The $name class, The $name widget, The $name file, is, provides, +# specifies, contains, represents, a, an and the. + +ABBREVIATE_BRIEF = "The $name class" \ + "The $name widget" \ + "The $name file" \ + is \ + provides \ + specifies \ + contains \ + represents \ + a \ + an \ + the + +# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then +# doxygen will generate a detailed section even if there is only a brief +# description. +# The default value is: NO. + +ALWAYS_DETAILED_SEC = NO + +# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all +# inherited members of a class in the documentation of that class as if those +# members were ordinary class members. Constructors, destructors and assignment +# operators of the base classes will not be shown. +# The default value is: NO. + +INLINE_INHERITED_MEMB = NO + +# If the FULL_PATH_NAMES tag is set to YES doxygen will prepend the full path +# before files name in the file list and in the header files. If set to NO the +# shortest path that makes the file name unique will be used +# The default value is: YES. + +FULL_PATH_NAMES = YES + +# The STRIP_FROM_PATH tag can be used to strip a user-defined part of the path. +# Stripping is only done if one of the specified strings matches the left-hand +# part of the path. The tag can be used to show relative paths in the file list. +# If left blank the directory from which doxygen is run is used as the path to +# strip. +# +# Note that you can specify absolute paths here, but also relative paths, which +# will be relative from the directory where doxygen is started. +# This tag requires that the tag FULL_PATH_NAMES is set to YES. + +STRIP_FROM_PATH = + +# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the +# path mentioned in the documentation of a class, which tells the reader which +# header file to include in order to use a class. If left blank only the name of +# the header file containing the class definition is used. Otherwise one should +# specify the list of include paths that are normally passed to the compiler +# using the -I flag. + +STRIP_FROM_INC_PATH = + +# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but +# less readable) file names. This can be useful is your file systems doesn't +# support long names like on DOS, Mac, or CD-ROM. +# The default value is: NO. + +SHORT_NAMES = NO + +# If the JAVADOC_AUTOBRIEF tag is set to YES then doxygen will interpret the +# first line (until the first dot) of a Javadoc-style comment as the brief +# description. If set to NO, the Javadoc-style will behave just like regular Qt- +# style comments (thus requiring an explicit @brief command for a brief +# description.) +# The default value is: NO. + +JAVADOC_AUTOBRIEF = NO + +# If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first +# line (until the first dot) of a Qt-style comment as the brief description. If +# set to NO, the Qt-style will behave just like regular Qt-style comments (thus +# requiring an explicit \brief command for a brief description.) +# The default value is: NO. + +QT_AUTOBRIEF = NO + +# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make doxygen treat a +# multi-line C++ special comment block (i.e. a block of //! or /// comments) as +# a brief description. This used to be the default behavior. The new default is +# to treat a multi-line C++ comment block as a detailed description. Set this +# tag to YES if you prefer the old behavior instead. +# +# Note that setting this tag to YES also means that rational rose comments are +# not recognized any more. +# The default value is: NO. + +MULTILINE_CPP_IS_BRIEF = NO + +# If the INHERIT_DOCS tag is set to YES then an undocumented member inherits the +# documentation from any documented member that it re-implements. +# The default value is: YES. + +INHERIT_DOCS = YES + +# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce a +# new page for each member. If set to NO, the documentation of a member will be +# part of the file/class/namespace that contains it. +# The default value is: NO. + +SEPARATE_MEMBER_PAGES = NO + +# The TAB_SIZE tag can be used to set the number of spaces in a tab. Doxygen +# uses this value to replace tabs by spaces in code fragments. +# Minimum value: 1, maximum value: 16, default value: 4. + +TAB_SIZE = 4 + +# This tag can be used to specify a number of aliases that act as commands in +# the documentation. An alias has the form: +# name=value +# For example adding +# "sideeffect=@par Side Effects:\n" +# will allow you to put the command \sideeffect (or @sideeffect) in the +# documentation, which will result in a user-defined paragraph with heading +# "Side Effects:". You can put \n's in the value part of an alias to insert +# newlines. + +ALIASES = + +# This tag can be used to specify a number of word-keyword mappings (TCL only). +# A mapping has the form "name=value". For example adding "class=itcl::class" +# will allow you to use the command class in the itcl::class meaning. + +TCL_SUBST = + +# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources +# only. Doxygen will then generate output that is more tailored for C. For +# instance, some of the names that are used will be different. The list of all +# members will be omitted, etc. +# The default value is: NO. + +OPTIMIZE_OUTPUT_FOR_C = NO + +# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java or +# Python sources only. Doxygen will then generate output that is more tailored +# for that language. For instance, namespaces will be presented as packages, +# qualified scopes will look different, etc. +# The default value is: NO. + +OPTIMIZE_OUTPUT_JAVA = NO + +# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran +# sources. Doxygen will then generate output that is tailored for Fortran. +# The default value is: NO. + +OPTIMIZE_FOR_FORTRAN = NO + +# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL +# sources. Doxygen will then generate output that is tailored for VHDL. +# The default value is: NO. + +OPTIMIZE_OUTPUT_VHDL = NO + +# Doxygen selects the parser to use depending on the extension of the files it +# parses. With this tag you can assign which parser to use for a given +# extension. Doxygen has a built-in mapping, but you can override or extend it +# using this tag. The format is ext=language, where ext is a file extension, and +# language is one of the parsers supported by doxygen: IDL, Java, Javascript, +# C#, C, C++, D, PHP, Objective-C, Python, Fortran (fixed format Fortran: +# FortranFixed, free formatted Fortran: FortranFree, unknown formatted Fortran: +# Fortran. In the later case the parser tries to guess whether the code is fixed +# or free formatted code, this is the default for Fortran type files), VHDL. For +# instance to make doxygen treat .inc files as Fortran files (default is PHP), +# and .f files as C (default is Fortran), use: inc=Fortran f=C. +# +# Note For files without extension you can use no_extension as a placeholder. +# +# Note that for custom extensions you also need to set FILE_PATTERNS otherwise +# the files are not read by doxygen. + +EXTENSION_MAPPING = + +# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments +# according to the Markdown format, which allows for more readable +# documentation. See http://daringfireball.net/projects/markdown/ for details. +# The output of markdown processing is further processed by doxygen, so you can +# mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in +# case of backward compatibilities issues. +# The default value is: YES. + +MARKDOWN_SUPPORT = YES + +# When enabled doxygen tries to link words that correspond to documented +# classes, or namespaces to their corresponding documentation. Such a link can +# be prevented in individual cases by by putting a % sign in front of the word +# or globally by setting AUTOLINK_SUPPORT to NO. +# The default value is: YES. + +AUTOLINK_SUPPORT = YES + +# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want +# to include (a tag file for) the STL sources as input, then you should set this +# tag to YES in order to let doxygen match functions declarations and +# definitions whose arguments contain STL classes (e.g. func(std::string); +# versus func(std::string) {}). This also make the inheritance and collaboration +# diagrams that involve STL classes more complete and accurate. +# The default value is: NO. + +BUILTIN_STL_SUPPORT = NO + +# If you use Microsoft's C++/CLI language, you should set this option to YES to +# enable parsing support. +# The default value is: NO. + +CPP_CLI_SUPPORT = NO + +# Set the SIP_SUPPORT tag to YES if your project consists of sip (see: +# http://www.riverbankcomputing.co.uk/software/sip/intro) sources only. Doxygen +# will parse them like normal C++ but will assume all classes use public instead +# of private inheritance when no explicit protection keyword is present. +# The default value is: NO. + +SIP_SUPPORT = NO + +# For Microsoft's IDL there are propget and propput attributes to indicate +# getter and setter methods for a property. Setting this option to YES will make +# doxygen to replace the get and set methods by a property in the documentation. +# This will only work if the methods are indeed getting or setting a simple +# type. If this is not the case, or you want to show the methods anyway, you +# should set this option to NO. +# The default value is: YES. + +IDL_PROPERTY_SUPPORT = YES + +# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC +# tag is set to YES, then doxygen will reuse the documentation of the first +# member in the group (if any) for the other members of the group. By default +# all members of a group must be documented explicitly. +# The default value is: NO. + +DISTRIBUTE_GROUP_DOC = NO + +# Set the SUBGROUPING tag to YES to allow class member groups of the same type +# (for instance a group of public functions) to be put as a subgroup of that +# type (e.g. under the Public Functions section). Set it to NO to prevent +# subgrouping. Alternatively, this can be done per class using the +# \nosubgrouping command. +# The default value is: YES. + +SUBGROUPING = YES + +# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and unions +# are shown inside the group in which they are included (e.g. using \ingroup) +# instead of on a separate page (for HTML and Man pages) or section (for LaTeX +# and RTF). +# +# Note that this feature does not work in combination with +# SEPARATE_MEMBER_PAGES. +# The default value is: NO. + +INLINE_GROUPED_CLASSES = YES + +# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and unions +# with only public data fields or simple typedef fields will be shown inline in +# the documentation of the scope in which they are defined (i.e. file, +# namespace, or group documentation), provided this scope is documented. If set +# to NO, structs, classes, and unions are shown on a separate page (for HTML and +# Man pages) or section (for LaTeX and RTF). +# The default value is: NO. + +INLINE_SIMPLE_STRUCTS = NO + +# When TYPEDEF_HIDES_STRUCT tag is enabled, a typedef of a struct, union, or +# enum is documented as struct, union, or enum with the name of the typedef. So +# typedef struct TypeS {} TypeT, will appear in the documentation as a struct +# with name TypeT. When disabled the typedef will appear as a member of a file, +# namespace, or class. And the struct will be named TypeS. This can typically be +# useful for C code in case the coding convention dictates that all compound +# types are typedef'ed and only the typedef is referenced, never the tag name. +# The default value is: NO. + +TYPEDEF_HIDES_STRUCT = NO + +# The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This +# cache is used to resolve symbols given their name and scope. Since this can be +# an expensive process and often the same symbol appears multiple times in the +# code, doxygen keeps a cache of pre-resolved symbols. If the cache is too small +# doxygen will become slower. If the cache is too large, memory is wasted. The +# cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range +# is 0..9, the default is 0, corresponding to a cache size of 2^16=65536 +# symbols. At the end of a run doxygen will report the cache usage and suggest +# the optimal cache size from a speed point of view. +# Minimum value: 0, maximum value: 9, default value: 0. + +LOOKUP_CACHE_SIZE = 0 + +#--------------------------------------------------------------------------- +# Build related configuration options +#--------------------------------------------------------------------------- + +# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in +# documentation are documented, even if no documentation was available. Private +# class members and static file members will be hidden unless the +# EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES. +# Note: This will also disable the warnings about undocumented members that are +# normally produced when WARNINGS is set to YES. +# The default value is: NO. + +EXTRACT_ALL = NO + +# If the EXTRACT_PRIVATE tag is set to YES all private members of a class will +# be included in the documentation. +# The default value is: NO. + +EXTRACT_PRIVATE = NO + +# If the EXTRACT_PACKAGE tag is set to YES all members with package or internal +# scope will be included in the documentation. +# The default value is: NO. + +EXTRACT_PACKAGE = NO + +# If the EXTRACT_STATIC tag is set to YES all static members of a file will be +# included in the documentation. +# The default value is: NO. + +EXTRACT_STATIC = NO + +# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) defined +# locally in source files will be included in the documentation. If set to NO +# only classes defined in header files are included. Does not have any effect +# for Java sources. +# The default value is: YES. + +EXTRACT_LOCAL_CLASSES = YES + +# This flag is only useful for Objective-C code. When set to YES local methods, +# which are defined in the implementation section but not in the interface are +# included in the documentation. If set to NO only methods in the interface are +# included. +# The default value is: NO. + +EXTRACT_LOCAL_METHODS = NO + +# If this flag is set to YES, the members of anonymous namespaces will be +# extracted and appear in the documentation as a namespace called +# 'anonymous_namespace{file}', where file will be replaced with the base name of +# the file that contains the anonymous namespace. By default anonymous namespace +# are hidden. +# The default value is: NO. + +EXTRACT_ANON_NSPACES = NO + +# If the HIDE_UNDOC_MEMBERS tag is set to YES, doxygen will hide all +# undocumented members inside documented classes or files. If set to NO these +# members will be included in the various overviews, but no documentation +# section is generated. This option has no effect if EXTRACT_ALL is enabled. +# The default value is: NO. + +HIDE_UNDOC_MEMBERS = NO + +# If the HIDE_UNDOC_CLASSES tag is set to YES, doxygen will hide all +# undocumented classes that are normally visible in the class hierarchy. If set +# to NO these classes will be included in the various overviews. This option has +# no effect if EXTRACT_ALL is enabled. +# The default value is: NO. + +HIDE_UNDOC_CLASSES = NO + +# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend +# (class|struct|union) declarations. If set to NO these declarations will be +# included in the documentation. +# The default value is: NO. + +HIDE_FRIEND_COMPOUNDS = NO + +# If the HIDE_IN_BODY_DOCS tag is set to YES, doxygen will hide any +# documentation blocks found inside the body of a function. If set to NO these +# blocks will be appended to the function's detailed documentation block. +# The default value is: NO. + +HIDE_IN_BODY_DOCS = NO + +# The INTERNAL_DOCS tag determines if documentation that is typed after a +# \internal command is included. If the tag is set to NO then the documentation +# will be excluded. Set it to YES to include the internal documentation. +# The default value is: NO. + +INTERNAL_DOCS = NO + +# If the CASE_SENSE_NAMES tag is set to NO then doxygen will only generate file +# names in lower-case letters. If set to YES upper-case letters are also +# allowed. This is useful if you have classes or files whose names only differ +# in case and if your file system supports case sensitive file names. Windows +# and Mac users are advised to set this option to NO. +# The default value is: system dependent. + +CASE_SENSE_NAMES = NO + +# If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with +# their full class and namespace scopes in the documentation. If set to YES the +# scope will be hidden. +# The default value is: NO. + +HIDE_SCOPE_NAMES = NO + +# If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of +# the files that are included by a file in the documentation of that file. +# The default value is: YES. + +SHOW_INCLUDE_FILES = YES + +# If the SHOW_GROUPED_MEMB_INC tag is set to YES then Doxygen will add for each +# grouped member an include statement to the documentation, telling the reader +# which file to include in order to use the member. +# The default value is: NO. + +SHOW_GROUPED_MEMB_INC = NO + +# If the FORCE_LOCAL_INCLUDES tag is set to YES then doxygen will list include +# files with double quotes in the documentation rather than with sharp brackets. +# The default value is: NO. + +FORCE_LOCAL_INCLUDES = NO + +# If the INLINE_INFO tag is set to YES then a tag [inline] is inserted in the +# documentation for inline members. +# The default value is: YES. + +INLINE_INFO = YES + +# If the SORT_MEMBER_DOCS tag is set to YES then doxygen will sort the +# (detailed) documentation of file and class members alphabetically by member +# name. If set to NO the members will appear in declaration order. +# The default value is: YES. + +SORT_MEMBER_DOCS = YES + +# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief +# descriptions of file, namespace and class members alphabetically by member +# name. If set to NO the members will appear in declaration order. Note that +# this will also influence the order of the classes in the class list. +# The default value is: NO. + +SORT_BRIEF_DOCS = NO + +# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the +# (brief and detailed) documentation of class members so that constructors and +# destructors are listed first. If set to NO the constructors will appear in the +# respective orders defined by SORT_BRIEF_DOCS and SORT_MEMBER_DOCS. +# Note: If SORT_BRIEF_DOCS is set to NO this option is ignored for sorting brief +# member documentation. +# Note: If SORT_MEMBER_DOCS is set to NO this option is ignored for sorting +# detailed member documentation. +# The default value is: NO. + +SORT_MEMBERS_CTORS_1ST = NO + +# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the hierarchy +# of group names into alphabetical order. If set to NO the group names will +# appear in their defined order. +# The default value is: NO. + +SORT_GROUP_NAMES = NO + +# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be sorted by +# fully-qualified names, including namespaces. If set to NO, the class list will +# be sorted only by class name, not including the namespace part. +# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. +# Note: This option applies only to the class list, not to the alphabetical +# list. +# The default value is: NO. + +SORT_BY_SCOPE_NAME = NO + +# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to do proper +# type resolution of all parameters of a function it will reject a match between +# the prototype and the implementation of a member function even if there is +# only one candidate or it is obvious which candidate to choose by doing a +# simple string match. By disabling STRICT_PROTO_MATCHING doxygen will still +# accept a match between prototype and implementation in such cases. +# The default value is: NO. + +STRICT_PROTO_MATCHING = NO + +# The GENERATE_TODOLIST tag can be used to enable ( YES) or disable ( NO) the +# todo list. This list is created by putting \todo commands in the +# documentation. +# The default value is: YES. + +GENERATE_TODOLIST = YES + +# The GENERATE_TESTLIST tag can be used to enable ( YES) or disable ( NO) the +# test list. This list is created by putting \test commands in the +# documentation. +# The default value is: YES. + +GENERATE_TESTLIST = YES + +# The GENERATE_BUGLIST tag can be used to enable ( YES) or disable ( NO) the bug +# list. This list is created by putting \bug commands in the documentation. +# The default value is: YES. + +GENERATE_BUGLIST = YES + +# The GENERATE_DEPRECATEDLIST tag can be used to enable ( YES) or disable ( NO) +# the deprecated list. This list is created by putting \deprecated commands in +# the documentation. +# The default value is: YES. + +GENERATE_DEPRECATEDLIST= YES + +# The ENABLED_SECTIONS tag can be used to enable conditional documentation +# sections, marked by \if ... \endif and \cond +# ... \endcond blocks. + +ENABLED_SECTIONS = $(RAPIDJSON_SECTIONS) + +# The MAX_INITIALIZER_LINES tag determines the maximum number of lines that the +# initial value of a variable or macro / define can have for it to appear in the +# documentation. If the initializer consists of more lines than specified here +# it will be hidden. Use a value of 0 to hide initializers completely. The +# appearance of the value of individual variables and macros / defines can be +# controlled using \showinitializer or \hideinitializer command in the +# documentation regardless of this setting. +# Minimum value: 0, maximum value: 10000, default value: 30. + +MAX_INITIALIZER_LINES = 30 + +# Set the SHOW_USED_FILES tag to NO to disable the list of files generated at +# the bottom of the documentation of classes and structs. If set to YES the list +# will mention the files that were used to generate the documentation. +# The default value is: YES. + +SHOW_USED_FILES = YES + +# Set the SHOW_FILES tag to NO to disable the generation of the Files page. This +# will remove the Files entry from the Quick Index and from the Folder Tree View +# (if specified). +# The default value is: YES. + +SHOW_FILES = YES + +# Set the SHOW_NAMESPACES tag to NO to disable the generation of the Namespaces +# page. This will remove the Namespaces entry from the Quick Index and from the +# Folder Tree View (if specified). +# The default value is: YES. + +SHOW_NAMESPACES = NO + +# The FILE_VERSION_FILTER tag can be used to specify a program or script that +# doxygen should invoke to get the current version for each file (typically from +# the version control system). Doxygen will invoke the program by executing (via +# popen()) the command command input-file, where command is the value of the +# FILE_VERSION_FILTER tag, and input-file is the name of an input file provided +# by doxygen. Whatever the program writes to standard output is used as the file +# version. For an example see the documentation. + +FILE_VERSION_FILTER = + +# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed +# by doxygen. The layout file controls the global structure of the generated +# output files in an output format independent way. To create the layout file +# that represents doxygen's defaults, run doxygen with the -l option. You can +# optionally specify a file name after the option, if omitted DoxygenLayout.xml +# will be used as the name of the layout file. +# +# Note that if you run doxygen from a directory containing a file called +# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE +# tag is left empty. + +LAYOUT_FILE = + +# The CITE_BIB_FILES tag can be used to specify one or more bib files containing +# the reference definitions. This must be a list of .bib files. The .bib +# extension is automatically appended if omitted. This requires the bibtex tool +# to be installed. See also http://en.wikipedia.org/wiki/BibTeX for more info. +# For LaTeX the style of the bibliography can be controlled using +# LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the +# search path. Do not use file names with spaces, bibtex cannot handle them. See +# also \cite for info how to create references. + +CITE_BIB_FILES = + +#--------------------------------------------------------------------------- +# Configuration options related to warning and progress messages +#--------------------------------------------------------------------------- + +# The QUIET tag can be used to turn on/off the messages that are generated to +# standard output by doxygen. If QUIET is set to YES this implies that the +# messages are off. +# The default value is: NO. + +QUIET = NO + +# The WARNINGS tag can be used to turn on/off the warning messages that are +# generated to standard error ( stderr) by doxygen. If WARNINGS is set to YES +# this implies that the warnings are on. +# +# Tip: Turn warnings on while writing the documentation. +# The default value is: YES. + +WARNINGS = YES + +# If the WARN_IF_UNDOCUMENTED tag is set to YES, then doxygen will generate +# warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag +# will automatically be disabled. +# The default value is: YES. + +WARN_IF_UNDOCUMENTED = YES + +# If the WARN_IF_DOC_ERROR tag is set to YES, doxygen will generate warnings for +# potential errors in the documentation, such as not documenting some parameters +# in a documented function, or documenting parameters that don't exist or using +# markup commands wrongly. +# The default value is: YES. + +WARN_IF_DOC_ERROR = YES + +# This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that +# are documented, but have no documentation for their parameters or return +# value. If set to NO doxygen will only warn about wrong or incomplete parameter +# documentation, but not about the absence of documentation. +# The default value is: NO. + +WARN_NO_PARAMDOC = NO + +# The WARN_FORMAT tag determines the format of the warning messages that doxygen +# can produce. The string should contain the $file, $line, and $text tags, which +# will be replaced by the file and line number from which the warning originated +# and the warning text. Optionally the format may contain $version, which will +# be replaced by the version of the file (if it could be obtained via +# FILE_VERSION_FILTER) +# The default value is: $file:$line: $text. + +WARN_FORMAT = "$file:$line: $text" + +# The WARN_LOGFILE tag can be used to specify a file to which warning and error +# messages should be written. If left blank the output is written to standard +# error (stderr). + +WARN_LOGFILE = + +#--------------------------------------------------------------------------- +# Configuration options related to the input files +#--------------------------------------------------------------------------- + +# The INPUT tag is used to specify the files and/or directories that contain +# documented source files. You may enter file names like myfile.cpp or +# directories like /usr/src/myproject. Separate the files or directories with +# spaces. +# Note: If this tag is empty the current directory is searched. + +INPUT = readme.md \ + CHANGELOG.md \ + include/rapidjson/rapidjson.h \ + include/ \ + doc/features.md \ + doc/tutorial.md \ + doc/pointer.md \ + doc/stream.md \ + doc/encoding.md \ + doc/dom.md \ + doc/sax.md \ + doc/schema.md \ + doc/performance.md \ + doc/internals.md \ + doc/faq.md + +# This tag can be used to specify the character encoding of the source files +# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses +# libiconv (or the iconv built into libc) for the transcoding. See the libiconv +# documentation (see: http://www.gnu.org/software/libiconv) for the list of +# possible encodings. +# The default value is: UTF-8. + +INPUT_ENCODING = UTF-8 + +# If the value of the INPUT tag contains directories, you can use the +# FILE_PATTERNS tag to specify one or more wildcard patterns (like *.cpp and +# *.h) to filter out the source-files in the directories. If left blank the +# following patterns are tested:*.c, *.cc, *.cxx, *.cpp, *.c++, *.java, *.ii, +# *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h, *.hh, *.hxx, *.hpp, +# *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc, *.m, *.markdown, +# *.md, *.mm, *.dox, *.py, *.f90, *.f, *.for, *.tcl, *.vhd, *.vhdl, *.ucf, +# *.qsf, *.as and *.js. + +FILE_PATTERNS = *.c \ + *.cc \ + *.cxx \ + *.cpp \ + *.h \ + *.hh \ + *.hxx \ + *.hpp \ + *.inc \ + *.md + +# The RECURSIVE tag can be used to specify whether or not subdirectories should +# be searched for input files as well. +# The default value is: NO. + +RECURSIVE = YES + +# The EXCLUDE tag can be used to specify files and/or directories that should be +# excluded from the INPUT source files. This way you can easily exclude a +# subdirectory from a directory tree whose root is specified with the INPUT tag. +# +# Note that relative paths are relative to the directory from which doxygen is +# run. + +EXCLUDE = ./include/rapidjson/msinttypes/ + +# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or +# directories that are symbolic links (a Unix file system feature) are excluded +# from the input. +# The default value is: NO. + +EXCLUDE_SYMLINKS = NO + +# If the value of the INPUT tag contains directories, you can use the +# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude +# certain files from those directories. +# +# Note that the wildcards are matched against the file with absolute path, so to +# exclude all test directories for example use the pattern */test/* + +EXCLUDE_PATTERNS = + +# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names +# (namespaces, classes, functions, etc.) that should be excluded from the +# output. The symbol name can be a fully qualified name, a word, or if the +# wildcard * is used, a substring. Examples: ANamespace, AClass, +# AClass::ANamespace, ANamespace::*Test +# +# Note that the wildcards are matched against the file with absolute path, so to +# exclude all test directories use the pattern */test/* + +EXCLUDE_SYMBOLS = internal + +# The EXAMPLE_PATH tag can be used to specify one or more files or directories +# that contain example code fragments that are included (see the \include +# command). + +EXAMPLE_PATH = + +# If the value of the EXAMPLE_PATH tag contains directories, you can use the +# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and +# *.h) to filter out the source-files in the directories. If left blank all +# files are included. + +EXAMPLE_PATTERNS = * + +# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be +# searched for input files to be used with the \include or \dontinclude commands +# irrespective of the value of the RECURSIVE tag. +# The default value is: NO. + +EXAMPLE_RECURSIVE = NO + +# The IMAGE_PATH tag can be used to specify one or more files or directories +# that contain images that are to be included in the documentation (see the +# \image command). + +IMAGE_PATH = ./doc + +# The INPUT_FILTER tag can be used to specify a program that doxygen should +# invoke to filter for each input file. Doxygen will invoke the filter program +# by executing (via popen()) the command: +# +# +# +# where is the value of the INPUT_FILTER tag, and is the +# name of an input file. Doxygen will then use the output that the filter +# program writes to standard output. If FILTER_PATTERNS is specified, this tag +# will be ignored. +# +# Note that the filter must not add or remove lines; it is applied before the +# code is scanned, but not when the output code is generated. If lines are added +# or removed, the anchors will not be placed correctly. + +INPUT_FILTER = + +# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern +# basis. Doxygen will compare the file name with each pattern and apply the +# filter if there is a match. The filters are a list of the form: pattern=filter +# (like *.cpp=my_cpp_filter). See INPUT_FILTER for further information on how +# filters are used. If the FILTER_PATTERNS tag is empty or if none of the +# patterns match the file name, INPUT_FILTER is applied. + +FILTER_PATTERNS = + +# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using +# INPUT_FILTER ) will also be used to filter the input files that are used for +# producing the source files to browse (i.e. when SOURCE_BROWSER is set to YES). +# The default value is: NO. + +FILTER_SOURCE_FILES = NO + +# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file +# pattern. A pattern will override the setting for FILTER_PATTERN (if any) and +# it is also possible to disable source filtering for a specific pattern using +# *.ext= (so without naming a filter). +# This tag requires that the tag FILTER_SOURCE_FILES is set to YES. + +FILTER_SOURCE_PATTERNS = + +# If the USE_MDFILE_AS_MAINPAGE tag refers to the name of a markdown file that +# is part of the input, its contents will be placed on the main page +# (index.html). This can be useful if you have a project on for instance GitHub +# and want to reuse the introduction page also for the doxygen output. + +USE_MDFILE_AS_MAINPAGE = readme.md + +#--------------------------------------------------------------------------- +# Configuration options related to source browsing +#--------------------------------------------------------------------------- + +# If the SOURCE_BROWSER tag is set to YES then a list of source files will be +# generated. Documented entities will be cross-referenced with these sources. +# +# Note: To get rid of all source code in the generated output, make sure that +# also VERBATIM_HEADERS is set to NO. +# The default value is: NO. + +SOURCE_BROWSER = NO + +# Setting the INLINE_SOURCES tag to YES will include the body of functions, +# classes and enums directly into the documentation. +# The default value is: NO. + +INLINE_SOURCES = NO + +# Setting the STRIP_CODE_COMMENTS tag to YES will instruct doxygen to hide any +# special comment blocks from generated source code fragments. Normal C, C++ and +# Fortran comments will always remain visible. +# The default value is: YES. + +STRIP_CODE_COMMENTS = NO + +# If the REFERENCED_BY_RELATION tag is set to YES then for each documented +# function all documented functions referencing it will be listed. +# The default value is: NO. + +REFERENCED_BY_RELATION = NO + +# If the REFERENCES_RELATION tag is set to YES then for each documented function +# all documented entities called/used by that function will be listed. +# The default value is: NO. + +REFERENCES_RELATION = NO + +# If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set +# to YES, then the hyperlinks from functions in REFERENCES_RELATION and +# REFERENCED_BY_RELATION lists will link to the source code. Otherwise they will +# link to the documentation. +# The default value is: YES. + +REFERENCES_LINK_SOURCE = YES + +# If SOURCE_TOOLTIPS is enabled (the default) then hovering a hyperlink in the +# source code will show a tooltip with additional information such as prototype, +# brief description and links to the definition and documentation. Since this +# will make the HTML file larger and loading of large files a bit slower, you +# can opt to disable this feature. +# The default value is: YES. +# This tag requires that the tag SOURCE_BROWSER is set to YES. + +SOURCE_TOOLTIPS = YES + +# If the USE_HTAGS tag is set to YES then the references to source code will +# point to the HTML generated by the htags(1) tool instead of doxygen built-in +# source browser. The htags tool is part of GNU's global source tagging system +# (see http://www.gnu.org/software/global/global.html). You will need version +# 4.8.6 or higher. +# +# To use it do the following: +# - Install the latest version of global +# - Enable SOURCE_BROWSER and USE_HTAGS in the config file +# - Make sure the INPUT points to the root of the source tree +# - Run doxygen as normal +# +# Doxygen will invoke htags (and that will in turn invoke gtags), so these +# tools must be available from the command line (i.e. in the search path). +# +# The result: instead of the source browser generated by doxygen, the links to +# source code will now point to the output of htags. +# The default value is: NO. +# This tag requires that the tag SOURCE_BROWSER is set to YES. + +USE_HTAGS = NO + +# If the VERBATIM_HEADERS tag is set the YES then doxygen will generate a +# verbatim copy of the header file for each class for which an include is +# specified. Set to NO to disable this. +# See also: Section \class. +# The default value is: YES. + +VERBATIM_HEADERS = YES + +# If the CLANG_ASSISTED_PARSING tag is set to YES, then doxygen will use the +# clang parser (see: http://clang.llvm.org/) for more accurate parsing at the +# cost of reduced performance. This can be particularly helpful with template +# rich C++ code for which doxygen's built-in parser lacks the necessary type +# information. +# Note: The availability of this option depends on whether or not doxygen was +# compiled with the --with-libclang option. +# The default value is: NO. + +CLANG_ASSISTED_PARSING = NO + +# If clang assisted parsing is enabled you can provide the compiler with command +# line options that you would normally use when invoking the compiler. Note that +# the include paths will already be set by doxygen for the files and directories +# specified with INPUT and INCLUDE_PATH. +# This tag requires that the tag CLANG_ASSISTED_PARSING is set to YES. + +CLANG_OPTIONS = + +#--------------------------------------------------------------------------- +# Configuration options related to the alphabetical class index +#--------------------------------------------------------------------------- + +# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index of all +# compounds will be generated. Enable this if the project contains a lot of +# classes, structs, unions or interfaces. +# The default value is: YES. + +ALPHABETICAL_INDEX = NO + +# The COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns in +# which the alphabetical index list will be split. +# Minimum value: 1, maximum value: 20, default value: 5. +# This tag requires that the tag ALPHABETICAL_INDEX is set to YES. + +COLS_IN_ALPHA_INDEX = 5 + +# In case all classes in a project start with a common prefix, all classes will +# be put under the same header in the alphabetical index. The IGNORE_PREFIX tag +# can be used to specify a prefix (or a list of prefixes) that should be ignored +# while generating the index headers. +# This tag requires that the tag ALPHABETICAL_INDEX is set to YES. + +IGNORE_PREFIX = + +#--------------------------------------------------------------------------- +# Configuration options related to the HTML output +#--------------------------------------------------------------------------- + +# If the GENERATE_HTML tag is set to YES doxygen will generate HTML output +# The default value is: YES. + +GENERATE_HTML = YES + +# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. If a +# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of +# it. +# The default directory is: html. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_OUTPUT = html + +# The HTML_FILE_EXTENSION tag can be used to specify the file extension for each +# generated HTML page (for example: .htm, .php, .asp). +# The default value is: .html. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_FILE_EXTENSION = .html + +# The HTML_HEADER tag can be used to specify a user-defined HTML header file for +# each generated HTML page. If the tag is left blank doxygen will generate a +# standard header. +# +# To get valid HTML the header file that includes any scripts and style sheets +# that doxygen needs, which is dependent on the configuration options used (e.g. +# the setting GENERATE_TREEVIEW). It is highly recommended to start with a +# default header using +# doxygen -w html new_header.html new_footer.html new_stylesheet.css +# YourConfigFile +# and then modify the file new_header.html. See also section "Doxygen usage" +# for information on how to generate the default header that doxygen normally +# uses. +# Note: The header is subject to change so you typically have to regenerate the +# default header when upgrading to a newer version of doxygen. For a description +# of the possible markers and block names see the documentation. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_HEADER = ./doc/misc/header.html + +# The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each +# generated HTML page. If the tag is left blank doxygen will generate a standard +# footer. See HTML_HEADER for more information on how to generate a default +# footer and what special commands can be used inside the footer. See also +# section "Doxygen usage" for information on how to generate the default footer +# that doxygen normally uses. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_FOOTER = ./doc/misc/footer.html + +# The HTML_STYLESHEET tag can be used to specify a user-defined cascading style +# sheet that is used by each HTML page. It can be used to fine-tune the look of +# the HTML output. If left blank doxygen will generate a default style sheet. +# See also section "Doxygen usage" for information on how to generate the style +# sheet that doxygen normally uses. +# Note: It is recommended to use HTML_EXTRA_STYLESHEET instead of this tag, as +# it is more robust and this tag (HTML_STYLESHEET) will in the future become +# obsolete. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_STYLESHEET = + +# The HTML_EXTRA_STYLESHEET tag can be used to specify an additional user- +# defined cascading style sheet that is included after the standard style sheets +# created by doxygen. Using this option one can overrule certain style aspects. +# This is preferred over using HTML_STYLESHEET since it does not replace the +# standard style sheet and is therefore more robust against future updates. +# Doxygen will copy the style sheet file to the output directory. For an example +# see the documentation. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_EXTRA_STYLESHEET = ./doc/misc/doxygenextra.css + +# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or +# other source files which should be copied to the HTML output directory. Note +# that these files will be copied to the base HTML output directory. Use the +# $relpath^ marker in the HTML_HEADER and/or HTML_FOOTER files to load these +# files. In the HTML_STYLESHEET file, use the file name only. Also note that the +# files will be copied as-is; there are no commands or markers available. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_EXTRA_FILES = + +# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen +# will adjust the colors in the stylesheet and background images according to +# this color. Hue is specified as an angle on a colorwheel, see +# http://en.wikipedia.org/wiki/Hue for more information. For instance the value +# 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300 +# purple, and 360 is red again. +# Minimum value: 0, maximum value: 359, default value: 220. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_COLORSTYLE_HUE = 220 + +# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of the colors +# in the HTML output. For a value of 0 the output will use grayscales only. A +# value of 255 will produce the most vivid colors. +# Minimum value: 0, maximum value: 255, default value: 100. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_COLORSTYLE_SAT = 100 + +# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to the +# luminance component of the colors in the HTML output. Values below 100 +# gradually make the output lighter, whereas values above 100 make the output +# darker. The value divided by 100 is the actual gamma applied, so 80 represents +# a gamma of 0.8, The value 220 represents a gamma of 2.2, and 100 does not +# change the gamma. +# Minimum value: 40, maximum value: 240, default value: 80. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_COLORSTYLE_GAMMA = 80 + +# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML +# page will contain the date and time when the page was generated. Setting this +# to NO can help when comparing the output of multiple runs. +# The default value is: YES. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_TIMESTAMP = YES + +# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML +# documentation will contain sections that can be hidden and shown after the +# page has loaded. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_DYNAMIC_SECTIONS = NO + +# With HTML_INDEX_NUM_ENTRIES one can control the preferred number of entries +# shown in the various tree structured indices initially; the user can expand +# and collapse entries dynamically later on. Doxygen will expand the tree to +# such a level that at most the specified number of entries are visible (unless +# a fully collapsed tree already exceeds this amount). So setting the number of +# entries 1 will produce a full collapsed tree by default. 0 is a special value +# representing an infinite number of entries and will result in a full expanded +# tree by default. +# Minimum value: 0, maximum value: 9999, default value: 100. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_INDEX_NUM_ENTRIES = 100 + +# If the GENERATE_DOCSET tag is set to YES, additional index files will be +# generated that can be used as input for Apple's Xcode 3 integrated development +# environment (see: http://developer.apple.com/tools/xcode/), introduced with +# OSX 10.5 (Leopard). To create a documentation set, doxygen will generate a +# Makefile in the HTML output directory. Running make will produce the docset in +# that directory and running make install will install the docset in +# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at +# startup. See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html +# for more information. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_DOCSET = NO + +# This tag determines the name of the docset feed. A documentation feed provides +# an umbrella under which multiple documentation sets from a single provider +# (such as a company or product suite) can be grouped. +# The default value is: Doxygen generated docs. +# This tag requires that the tag GENERATE_DOCSET is set to YES. + +DOCSET_FEEDNAME = "Doxygen generated docs" + +# This tag specifies a string that should uniquely identify the documentation +# set bundle. This should be a reverse domain-name style string, e.g. +# com.mycompany.MyDocSet. Doxygen will append .docset to the name. +# The default value is: org.doxygen.Project. +# This tag requires that the tag GENERATE_DOCSET is set to YES. + +DOCSET_BUNDLE_ID = org.doxygen.Project + +# The DOCSET_PUBLISHER_ID tag specifies a string that should uniquely identify +# the documentation publisher. This should be a reverse domain-name style +# string, e.g. com.mycompany.MyDocSet.documentation. +# The default value is: org.doxygen.Publisher. +# This tag requires that the tag GENERATE_DOCSET is set to YES. + +DOCSET_PUBLISHER_ID = org.doxygen.Publisher + +# The DOCSET_PUBLISHER_NAME tag identifies the documentation publisher. +# The default value is: Publisher. +# This tag requires that the tag GENERATE_DOCSET is set to YES. + +DOCSET_PUBLISHER_NAME = Publisher + +# If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three +# additional HTML index files: index.hhp, index.hhc, and index.hhk. The +# index.hhp is a project file that can be read by Microsoft's HTML Help Workshop +# (see: http://www.microsoft.com/en-us/download/details.aspx?id=21138) on +# Windows. +# +# The HTML Help Workshop contains a compiler that can convert all HTML output +# generated by doxygen into a single compiled HTML file (.chm). Compiled HTML +# files are now used as the Windows 98 help format, and will replace the old +# Windows help format (.hlp) on all Windows platforms in the future. Compressed +# HTML files also contain an index, a table of contents, and you can search for +# words in the documentation. The HTML workshop also contains a viewer for +# compressed HTML files. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_HTMLHELP = NO + +# The CHM_FILE tag can be used to specify the file name of the resulting .chm +# file. You can add a path in front of the file if the result should not be +# written to the html output directory. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +CHM_FILE = + +# The HHC_LOCATION tag can be used to specify the location (absolute path +# including file name) of the HTML help compiler ( hhc.exe). If non-empty +# doxygen will try to run the HTML help compiler on the generated index.hhp. +# The file has to be specified with full path. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +HHC_LOCATION = + +# The GENERATE_CHI flag controls if a separate .chi index file is generated ( +# YES) or that it should be included in the master .chm file ( NO). +# The default value is: NO. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +GENERATE_CHI = NO + +# The CHM_INDEX_ENCODING is used to encode HtmlHelp index ( hhk), content ( hhc) +# and project file content. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +CHM_INDEX_ENCODING = + +# The BINARY_TOC flag controls whether a binary table of contents is generated ( +# YES) or a normal table of contents ( NO) in the .chm file. Furthermore it +# enables the Previous and Next buttons. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +BINARY_TOC = NO + +# The TOC_EXPAND flag can be set to YES to add extra items for group members to +# the table of contents of the HTML help documentation and to the tree view. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +TOC_EXPAND = NO + +# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and +# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated that +# can be used as input for Qt's qhelpgenerator to generate a Qt Compressed Help +# (.qch) of the generated HTML documentation. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_QHP = NO + +# If the QHG_LOCATION tag is specified, the QCH_FILE tag can be used to specify +# the file name of the resulting .qch file. The path specified is relative to +# the HTML output folder. +# This tag requires that the tag GENERATE_QHP is set to YES. + +QCH_FILE = + +# The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help +# Project output. For more information please see Qt Help Project / Namespace +# (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#namespace). +# The default value is: org.doxygen.Project. +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_NAMESPACE = org.doxygen.Project + +# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt +# Help Project output. For more information please see Qt Help Project / Virtual +# Folders (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#virtual- +# folders). +# The default value is: doc. +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_VIRTUAL_FOLDER = doc + +# If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom +# filter to add. For more information please see Qt Help Project / Custom +# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom- +# filters). +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_CUST_FILTER_NAME = + +# The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the +# custom filter to add. For more information please see Qt Help Project / Custom +# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom- +# filters). +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_CUST_FILTER_ATTRS = + +# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this +# project's filter section matches. Qt Help Project / Filter Attributes (see: +# http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes). +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_SECT_FILTER_ATTRS = + +# The QHG_LOCATION tag can be used to specify the location of Qt's +# qhelpgenerator. If non-empty doxygen will try to run qhelpgenerator on the +# generated .qhp file. +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHG_LOCATION = + +# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files will be +# generated, together with the HTML files, they form an Eclipse help plugin. To +# install this plugin and make it available under the help contents menu in +# Eclipse, the contents of the directory containing the HTML and XML files needs +# to be copied into the plugins directory of eclipse. The name of the directory +# within the plugins directory should be the same as the ECLIPSE_DOC_ID value. +# After copying Eclipse needs to be restarted before the help appears. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_ECLIPSEHELP = NO + +# A unique identifier for the Eclipse help plugin. When installing the plugin +# the directory name containing the HTML and XML files should also have this +# name. Each documentation set should have its own identifier. +# The default value is: org.doxygen.Project. +# This tag requires that the tag GENERATE_ECLIPSEHELP is set to YES. + +ECLIPSE_DOC_ID = org.doxygen.Project + +# If you want full control over the layout of the generated HTML pages it might +# be necessary to disable the index and replace it with your own. The +# DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) at top +# of each HTML page. A value of NO enables the index and the value YES disables +# it. Since the tabs in the index contain the same information as the navigation +# tree, you can set this option to YES if you also set GENERATE_TREEVIEW to YES. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +DISABLE_INDEX = YES + +# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index +# structure should be generated to display hierarchical information. If the tag +# value is set to YES, a side panel will be generated containing a tree-like +# index structure (just like the one that is generated for HTML Help). For this +# to work a browser that supports JavaScript, DHTML, CSS and frames is required +# (i.e. any modern browser). Windows users are probably better off using the +# HTML help feature. Via custom stylesheets (see HTML_EXTRA_STYLESHEET) one can +# further fine-tune the look of the index. As an example, the default style +# sheet generated by doxygen has an example that shows how to put an image at +# the root of the tree instead of the PROJECT_NAME. Since the tree basically has +# the same information as the tab index, you could consider setting +# DISABLE_INDEX to YES when enabling this option. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_TREEVIEW = YES + +# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values that +# doxygen will group on one line in the generated HTML documentation. +# +# Note that a value of 0 will completely suppress the enum values from appearing +# in the overview section. +# Minimum value: 0, maximum value: 20, default value: 4. +# This tag requires that the tag GENERATE_HTML is set to YES. + +ENUM_VALUES_PER_LINE = 4 + +# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be used +# to set the initial width (in pixels) of the frame in which the tree is shown. +# Minimum value: 0, maximum value: 1500, default value: 250. +# This tag requires that the tag GENERATE_HTML is set to YES. + +TREEVIEW_WIDTH = 250 + +# When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open links to +# external symbols imported via tag files in a separate window. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +EXT_LINKS_IN_WINDOW = NO + +# Use this tag to change the font size of LaTeX formulas included as images in +# the HTML documentation. When you change the font size after a successful +# doxygen run you need to manually remove any form_*.png images from the HTML +# output directory to force them to be regenerated. +# Minimum value: 8, maximum value: 50, default value: 10. +# This tag requires that the tag GENERATE_HTML is set to YES. + +FORMULA_FONTSIZE = 10 + +# Use the FORMULA_TRANPARENT tag to determine whether or not the images +# generated for formulas are transparent PNGs. Transparent PNGs are not +# supported properly for IE 6.0, but are supported on all modern browsers. +# +# Note that when changing this option you need to delete any form_*.png files in +# the HTML output directory before the changes have effect. +# The default value is: YES. +# This tag requires that the tag GENERATE_HTML is set to YES. + +FORMULA_TRANSPARENT = YES + +# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see +# http://www.mathjax.org) which uses client side Javascript for the rendering +# instead of using prerendered bitmaps. Use this if you do not have LaTeX +# installed or if you want to formulas look prettier in the HTML output. When +# enabled you may also need to install MathJax separately and configure the path +# to it using the MATHJAX_RELPATH option. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +USE_MATHJAX = NO + +# When MathJax is enabled you can set the default output format to be used for +# the MathJax output. See the MathJax site (see: +# http://docs.mathjax.org/en/latest/output.html) for more details. +# Possible values are: HTML-CSS (which is slower, but has the best +# compatibility), NativeMML (i.e. MathML) and SVG. +# The default value is: HTML-CSS. +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_FORMAT = HTML-CSS + +# When MathJax is enabled you need to specify the location relative to the HTML +# output directory using the MATHJAX_RELPATH option. The destination directory +# should contain the MathJax.js script. For instance, if the mathjax directory +# is located at the same level as the HTML output directory, then +# MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax +# Content Delivery Network so you can quickly see the result without installing +# MathJax. However, it is strongly recommended to install a local copy of +# MathJax from http://www.mathjax.org before deployment. +# The default value is: http://cdn.mathjax.org/mathjax/latest. +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_RELPATH = http://www.mathjax.org/mathjax + +# The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax +# extension names that should be enabled during MathJax rendering. For example +# MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_EXTENSIONS = + +# The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces +# of code that will be used on startup of the MathJax code. See the MathJax site +# (see: http://docs.mathjax.org/en/latest/output.html) for more details. For an +# example see the documentation. +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_CODEFILE = + +# When the SEARCHENGINE tag is enabled doxygen will generate a search box for +# the HTML output. The underlying search engine uses javascript and DHTML and +# should work on any modern browser. Note that when using HTML help +# (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets (GENERATE_DOCSET) +# there is already a search function so this one should typically be disabled. +# For large projects the javascript based search engine can be slow, then +# enabling SERVER_BASED_SEARCH may provide a better solution. It is possible to +# search using the keyboard; to jump to the search box use + S +# (what the is depends on the OS and browser, but it is typically +# , /

+ + + diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/doc/misc/header.html b/graphics/asymptote/LspCpp/third_party/rapidjson/doc/misc/header.html new file mode 100644 index 0000000000..a89ba46b49 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/doc/misc/header.html @@ -0,0 +1,24 @@ + + + + + + + +$projectname: $title +$title + + + +$treeview +$search +$mathjax + +$extrastylesheet + + +
+
+$searchbox + + diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/doc/npm.md b/graphics/asymptote/LspCpp/third_party/rapidjson/doc/npm.md new file mode 100644 index 0000000000..6f4e85ad96 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/doc/npm.md @@ -0,0 +1,31 @@ +## NPM + +# package.json {#package} + +~~~~~~~~~~js +{ + ... + "dependencies": { + ... + "rapidjson": "git@github.com:Tencent/rapidjson.git" + }, + ... + "gypfile": true +} +~~~~~~~~~~ + +# binding.gyp {#binding} + +~~~~~~~~~~js +{ + ... + 'targets': [ + { + ... + 'include_dirs': [ + 'SetInt(stars->GetInt() + 1); + +// { "project" : "RapidJSON", "stars" : 11 } + +// Set() and Create() automatically generate parents if not exist. +Pointer("/a/b/0").Create(d); + +// { "project" : "RapidJSON", "stars" : 11, "a" : { "b" : [ null ] } } + +// GetWithDefault() returns reference. And it deep clones the default value. +Value& hello = Pointer("/hello").GetWithDefault(d, "world"); + +// { "project" : "RapidJSON", "stars" : 11, "a" : { "b" : [ null ] }, "hello" : "world" } + +// Swap() is similar to Set() +Value x("C++"); +Pointer("/hello").Swap(d, x); + +// { "project" : "RapidJSON", "stars" : 11, "a" : { "b" : [ null ] }, "hello" : "C++" } +// x becomes "world" + +// Erase a member or element, return true if the value exists +bool success = Pointer("/a").Erase(d); +assert(success); + +// { "project" : "RapidJSON", "stars" : 10 } +~~~ + +# Helper Functions {#HelperFunctions} + +Since object-oriented calling convention may be non-intuitive, RapidJSON also provides helper functions, which just wrap the member functions with free-functions. + +The following example does exactly the same as the above one. + +~~~cpp +Document d; + +SetValueByPointer(d, "/project", "RapidJSON"); +SetValueByPointer(d, "/stars", 10); + +if (Value* stars = GetValueByPointer(d, "/stars")) + stars->SetInt(stars->GetInt() + 1); + +CreateValueByPointer(d, "/a/b/0"); + +Value& hello = GetValueByPointerWithDefault(d, "/hello", "world"); + +Value x("C++"); +SwapValueByPointer(d, "/hello", x); + +bool success = EraseValueByPointer(d, "/a"); +assert(success); +~~~ + +The conventions are shown here for comparison: + +1. `Pointer(source).(root, ...)` +2. `ValueByPointer(root, Pointer(source), ...)` +3. `ValueByPointer(root, source, ...)` + +# Resolving Pointer {#ResolvingPointer} + +`Pointer::Get()` or `GetValueByPointer()` function does not modify the DOM. If the tokens cannot match a value in the DOM, it returns `nullptr`. User can use this to check whether a value exists. + +Note that, numerical tokens can represent an array index or member name. The resolving process will match the values according to the types of value. + +~~~javascript +{ + "0" : 123, + "1" : [456] +} +~~~ + +1. `"/0"` → `123` +2. `"/1/0"` → `456` + +The token `"0"` is treated as member name in the first pointer. It is treated as an array index in the second pointer. + +The other functions, including `Create()`, `GetWithDefault()`, `Set()` and `Swap()`, will change the DOM. These functions will always succeed. They will create the parent values if they do not exist. If the parent values do not match the tokens, they will also be forced to change their type. Changing the type also mean fully removal of that DOM subtree. + +Parsing the above JSON into `d`, + +~~~cpp +SetValueByPointer(d, "1/a", 789); // { "0" : 123, "1" : { "a" : 789 } } +~~~ + +## Resolving Minus Sign Token + +Besides, [RFC6901] defines a special token `-` (single minus sign), which represents the pass-the-end element of an array. `Get()` only treats this token as a member name '"-"'. Yet the other functions can resolve this for array, equivalent to calling `Value::PushBack()` to the array. + +~~~cpp +Document d; +d.Parse("{\"foo\":[123]}"); +SetValueByPointer(d, "/foo/-", 456); // { "foo" : [123, 456] } +SetValueByPointer(d, "/-", 789); // { "foo" : [123, 456], "-" : 789 } +~~~ + +## Resolving Document and Value + +When using `p.Get(root)` or `GetValueByPointer(root, p)`, `root` is a (const) `Value&`. That means, it can be a subtree of the DOM. + +The other functions have two groups of signature. One group uses `Document& document` as parameter, another one uses `Value& root`. The first group uses `document.GetAllocator()` for creating values. And the second group needs user to supply an allocator, like the functions in DOM. + +All examples above do not require an allocator parameter, because the first parameter is a `Document&`. But if you want to resolve a pointer to a subtree, you need to supply the allocator as in the following example: + +~~~cpp +class Person { +public: + Person() { + document_ = new Document(); + // CreateValueByPointer() here no need allocator + SetLocation(CreateValueByPointer(*document_, "/residence"), ...); + SetLocation(CreateValueByPointer(*document_, "/office"), ...); + }; + +private: + void SetLocation(Value& location, const char* country, const char* addresses[2]) { + Value::Allocator& a = document_->GetAllocator(); + // SetValueByPointer() here need allocator + SetValueByPointer(location, "/country", country, a); + SetValueByPointer(location, "/address/0", address[0], a); + SetValueByPointer(location, "/address/1", address[1], a); + } + + // ... + + Document* document_; +}; +~~~ + +`Erase()` or `EraseValueByPointer()` does not need allocator. And they return `true` if the value is erased successfully. + +# Error Handling {#ErrorHandling} + +A `Pointer` parses a source string in its constructor. If there is parsing error, `Pointer::IsValid()` returns `false`. And you can use `Pointer::GetParseErrorCode()` and `GetParseErrorOffset()` to retrieve the error information. + +Note that, all resolving functions assumes valid pointer. Resolving with an invalid pointer causes assertion failure. + +# URI Fragment Representation {#URIFragment} + +In addition to the string representation of JSON pointer that we are using till now, [RFC6901] also defines the URI fragment representation of JSON pointer. URI fragment is specified in [RFC3986] "Uniform Resource Identifier (URI): Generic Syntax". + +The main differences are that a the URI fragment always has a `#` (pound sign) in the beginning, and some characters are encoded by percent-encoding in UTF-8 sequence. For example, the following table shows different C/C++ string literals of different representations. + +String Representation | URI Fragment Representation | Pointer Tokens (UTF-8) +----------------------|-----------------------------|------------------------ +`"/foo/0"` | `"#/foo/0"` | `{"foo", 0}` +`"/a~1b"` | `"#/a~1b"` | `{"a/b"}` +`"/m~0n"` | `"#/m~0n"` | `{"m~n"}` +`"/ "` | `"#/%20"` | `{" "}` +`"/\0"` | `"#/%00"` | `{"\0"}` +`"/€"` | `"#/%E2%82%AC"` | `{"€"}` + +RapidJSON fully support URI fragment representation. It automatically detects the pound sign during parsing. + +# Stringify + +You may also stringify a `Pointer` to a string or other output streams. This can be done by: + +~~~ +Pointer p(...); +StringBuffer sb; +p.Stringify(sb); +std::cout << sb.GetString() << std::endl; +~~~ + +It can also stringify to URI fragment representation by `StringifyUriFragment()`. + +# User-Supplied Tokens {#UserSuppliedTokens} + +If a pointer will be resolved multiple times, it should be constructed once, and then apply it to different DOMs or in different times. This reduce time and memory allocation for constructing `Pointer` multiple times. + +We can go one step further, to completely eliminate the parsing process and dynamic memory allocation, we can establish the token array directly: + +~~~cpp +#define NAME(s) { s, sizeof(s) / sizeof(s[0]) - 1, kPointerInvalidIndex } +#define INDEX(i) { #i, sizeof(#i) - 1, i } + +static const Pointer::Token kTokens[] = { NAME("foo"), INDEX(123) }; +static const Pointer p(kTokens, sizeof(kTokens) / sizeof(kTokens[0])); +// Equivalent to static const Pointer p("/foo/123"); +~~~ + +This may be useful for memory constrained systems. + +[RFC3986]: https://tools.ietf.org/html/rfc3986 +[RFC6901]: https://tools.ietf.org/html/rfc6901 diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/doc/pointer.zh-cn.md b/graphics/asymptote/LspCpp/third_party/rapidjson/doc/pointer.zh-cn.md new file mode 100644 index 0000000000..239569d4a0 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/doc/pointer.zh-cn.md @@ -0,0 +1,234 @@ +# Pointer + +(本功能于 v1.1.0 发布) + +JSON Pointer 是一个标准化([RFC6901])的方式去选取一个 JSON Document(DOM)中的值。这类似于 XML 的 XPath。然而,JSON Pointer 简单得多,而且每个 JSON Pointer 仅指向单个值。 + +使用 RapidJSON 的 JSON Pointer 实现能简化一些 DOM 的操作。 + +[TOC] + +# JSON Pointer {#JsonPointer} + +一个 JSON Pointer 由一串(零至多个)token 所组成,每个 token 都有 `/` 前缀。每个 token 可以是一个字符串或数字。例如,给定一个 JSON: +~~~javascript +{ + "foo" : ["bar", "baz"], + "pi" : 3.1416 +} +~~~ + +以下的 JSON Pointer 解析为: + +1. `"/foo"` → `[ "bar", "baz" ]` +2. `"/foo/0"` → `"bar"` +3. `"/foo/1"` → `"baz"` +4. `"/pi"` → `3.1416` + +要注意,一个空 JSON Pointer `""` (零个 token)解析为整个 JSON。 + +# 基本使用方法 {#BasicUsage} + +以下的代码范例不解自明。 + +~~~cpp +#include "rapidjson/pointer.h" + +// ... +Document d; + +// 使用 Set() 创建 DOM +Pointer("/project").Set(d, "RapidJSON"); +Pointer("/stars").Set(d, 10); + +// { "project" : "RapidJSON", "stars" : 10 } + +// 使用 Get() 访问 DOM。若该值不存在则返回 nullptr。 +if (Value* stars = Pointer("/stars").Get(d)) + stars->SetInt(stars->GetInt() + 1); + +// { "project" : "RapidJSON", "stars" : 11 } + +// Set() 和 Create() 自动生成父值(如果它们不存在)。 +Pointer("/a/b/0").Create(d); + +// { "project" : "RapidJSON", "stars" : 11, "a" : { "b" : [ null ] } } + +// GetWithDefault() 返回引用。若该值不存在则会深拷贝缺省值。 +Value& hello = Pointer("/hello").GetWithDefault(d, "world"); + +// { "project" : "RapidJSON", "stars" : 11, "a" : { "b" : [ null ] }, "hello" : "world" } + +// Swap() 和 Set() 相似 +Value x("C++"); +Pointer("/hello").Swap(d, x); + +// { "project" : "RapidJSON", "stars" : 11, "a" : { "b" : [ null ] }, "hello" : "C++" } +// x 变成 "world" + +// 删去一个成员或元素,若值存在返回 true +bool success = Pointer("/a").Erase(d); +assert(success); + +// { "project" : "RapidJSON", "stars" : 10 } +~~~ + +# 辅助函数 {#HelperFunctions} + +由于面向对象的调用习惯可能不符直觉,RapidJSON 也提供了一些辅助函数,它们把成员函数包装成自由函数。 + +以下的例子与上面例子所做的事情完全相同。 + +~~~cpp +Document d; + +SetValueByPointer(d, "/project", "RapidJSON"); +SetValueByPointer(d, "/stars", 10); + +if (Value* stars = GetValueByPointer(d, "/stars")) + stars->SetInt(stars->GetInt() + 1); + +CreateValueByPointer(d, "/a/b/0"); + +Value& hello = GetValueByPointerWithDefault(d, "/hello", "world"); + +Value x("C++"); +SwapValueByPointer(d, "/hello", x); + +bool success = EraseValueByPointer(d, "/a"); +assert(success); +~~~ + +以下对比 3 种调用方式: + +1. `Pointer(source).(root, ...)` +2. `ValueByPointer(root, Pointer(source), ...)` +3. `ValueByPointer(root, source, ...)` + +# 解析 Pointer {#ResolvingPointer} + +`Pointer::Get()` 或 `GetValueByPointer()` 函数并不修改 DOM。若那些 token 不能匹配 DOM 里的值,这些函数便返回 `nullptr`。使用者可利用这个方法来检查一个值是否存在。 + +注意,数值 token 可表示数组索引或成员名字。解析过程中会按值的类型来匹配。 + +~~~javascript +{ + "0" : 123, + "1" : [456] +} +~~~ + +1. `"/0"` → `123` +2. `"/1/0"` → `456` + +Token `"0"` 在第一个 pointer 中被当作成员名字。它在第二个 pointer 中被当作成数组索引。 + +其他函数会改变 DOM,包括 `Create()`、`GetWithDefault()`、`Set()`、`Swap()`。这些函数总是成功的。若一些父值不存在,就会创建它们。若父值类型不匹配 token,也会强行改变其类型。改变类型也意味着完全移除其 DOM 子树的内容。 + +例如,把上面的 JSON 解译至 `d` 之后, + +~~~cpp +SetValueByPointer(d, "1/a", 789); // { "0" : 123, "1" : { "a" : 789 } } +~~~ + +## 解析负号 token + +另外,[RFC6901] 定义了一个特殊 token `-` (单个负号),用于表示数组最后元素的下一个元素。 `Get()` 只会把此 token 当作成员名字 '"-"'。而其他函数则会以此解析数组,等同于对数组调用 `Value::PushBack()` 。 + +~~~cpp +Document d; +d.Parse("{\"foo\":[123]}"); +SetValueByPointer(d, "/foo/-", 456); // { "foo" : [123, 456] } +SetValueByPointer(d, "/-", 789); // { "foo" : [123, 456], "-" : 789 } +~~~ + +## 解析 Document 及 Value + +当使用 `p.Get(root)` 或 `GetValueByPointer(root, p)`,`root` 是一个(常数) `Value&`。这意味着,它也可以是 DOM 里的一个子树。 + +其他函数有两组签名。一组使用 `Document& document` 作为参数,另一组使用 `Value& root`。第一组使用 `document.GetAllocator()` 去创建值,而第二组则需要使用者提供一个 allocator,如同 DOM 里的函数。 + +以上例子都不需要 allocator 参数,因为它的第一个参数是 `Document&`。但如果你需要对一个子树进行解析,就需要如下面的例子般提供 allocator: + +~~~cpp +class Person { +public: + Person() { + document_ = new Document(); + // CreateValueByPointer() here no need allocator + SetLocation(CreateValueByPointer(*document_, "/residence"), ...); + SetLocation(CreateValueByPointer(*document_, "/office"), ...); + }; + +private: + void SetLocation(Value& location, const char* country, const char* addresses[2]) { + Value::Allocator& a = document_->GetAllocator(); + // SetValueByPointer() here need allocator + SetValueByPointer(location, "/country", country, a); + SetValueByPointer(location, "/address/0", address[0], a); + SetValueByPointer(location, "/address/1", address[1], a); + } + + // ... + + Document* document_; +}; +~~~ + +`Erase()` 或 `EraseValueByPointer()` 不需要 allocator。而且它们成功删除值之后会返回 `true`。 + +# 错误处理 {#ErrorHandling} + +`Pointer` 在其建构函数里会解译源字符串。若有解析错误,`Pointer::IsValid()` 返回 `false`。你可使用 `Pointer::GetParseErrorCode()` 和 `GetParseErrorOffset()` 去获取错信息。 + +要注意的是,所有解析函数都假设 pointer 是合法的。对一个非法 pointer 解析会造成断言失败。 + +# URI 片段表示方式 {#URIFragment} + +除了我们一直在使用的字符串方式表示 JSON pointer,[RFC6901] 也定义了一个 JSON Pointer 的 URI 片段(fragment)表示方式。URI 片段是定义于 [RFC3986] "Uniform Resource Identifier (URI): Generic Syntax"。 + +URI 片段的主要分别是必然以 `#` (pound sign)开头,而一些字符也会以百分比编码成 UTF-8 序列。例如,以下的表展示了不同表示法下的 C/C++ 字符串常数。 + +字符串表示方式 | URI 片段表示方式 | Pointer Tokens (UTF-8) +----------------------|-----------------------------|------------------------ +`"/foo/0"` | `"#/foo/0"` | `{"foo", 0}` +`"/a~1b"` | `"#/a~1b"` | `{"a/b"}` +`"/m~0n"` | `"#/m~0n"` | `{"m~n"}` +`"/ "` | `"#/%20"` | `{" "}` +`"/\0"` | `"#/%00"` | `{"\0"}` +`"/€"` | `"#/%E2%82%AC"` | `{"€"}` + +RapidJSON 完全支持 URI 片段表示方式。它在解译时会自动检测 `#` 号。 + +# 字符串化 + +你也可以把一个 `Pointer` 字符串化,储存于字符串或其他输出流。例如: + +~~~ +Pointer p(...); +StringBuffer sb; +p.Stringify(sb); +std::cout << sb.GetString() << std::endl; +~~~ + +使用 `StringifyUriFragment()` 可以把 pointer 字符串化为 URI 片段表示法。 + +# 使用者提供的 tokens {#UserSuppliedTokens} + +若一个 pointer 会用于多次解析,它应该只被创建一次,然后再施于不同的 DOM ,或在不同时间做解析。这样可以避免多次创键 `Pointer`,节省时间和内存分配。 + +我们甚至可以再更进一步,完全消去解析过程及动态内存分配。我们可以直接生成 token 数组: + +~~~cpp +#define NAME(s) { s, sizeof(s) / sizeof(s[0]) - 1, kPointerInvalidIndex } +#define INDEX(i) { #i, sizeof(#i) - 1, i } + +static const Pointer::Token kTokens[] = { NAME("foo"), INDEX(123) }; +static const Pointer p(kTokens, sizeof(kTokens) / sizeof(kTokens[0])); +// Equivalent to static const Pointer p("/foo/123"); +~~~ + +这种做法可能适合内存受限的系统。 + +[RFC3986]: https://tools.ietf.org/html/rfc3986 +[RFC6901]: https://tools.ietf.org/html/rfc6901 diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/doc/sax.md b/graphics/asymptote/LspCpp/third_party/rapidjson/doc/sax.md new file mode 100644 index 0000000000..d42d043888 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/doc/sax.md @@ -0,0 +1,509 @@ +# SAX + +The term "SAX" originated from [Simple API for XML](http://en.wikipedia.org/wiki/Simple_API_for_XML). We borrowed this term for JSON parsing and generation. + +In RapidJSON, `Reader` (typedef of `GenericReader<...>`) is the SAX-style parser for JSON, and `Writer` (typedef of `GenericWriter<...>`) is the SAX-style generator for JSON. + +[TOC] + +# Reader {#Reader} + +`Reader` parses a JSON from a stream. While it reads characters from the stream, it analyzes the characters according to the syntax of JSON, and publishes events to a handler. + +For example, here is a JSON. + +~~~~~~~~~~js +{ + "hello": "world", + "t": true , + "f": false, + "n": null, + "i": 123, + "pi": 3.1416, + "a": [1, 2, 3, 4] +} +~~~~~~~~~~ + +When a `Reader` parses this JSON, it publishes the following events to the handler sequentially: + +~~~~~~~~~~ +StartObject() +Key("hello", 5, true) +String("world", 5, true) +Key("t", 1, true) +Bool(true) +Key("f", 1, true) +Bool(false) +Key("n", 1, true) +Null() +Key("i") +Uint(123) +Key("pi") +Double(3.1416) +Key("a") +StartArray() +Uint(1) +Uint(2) +Uint(3) +Uint(4) +EndArray(4) +EndObject(7) +~~~~~~~~~~ + +These events can be easily matched with the JSON, but some event parameters need further explanation. Let's see the `simplereader` example which produces exactly the same output as above: + +~~~~~~~~~~cpp +#include "rapidjson/reader.h" +#include + +using namespace rapidjson; +using namespace std; + +struct MyHandler : public BaseReaderHandler, MyHandler> { + bool Null() { cout << "Null()" << endl; return true; } + bool Bool(bool b) { cout << "Bool(" << boolalpha << b << ")" << endl; return true; } + bool Int(int i) { cout << "Int(" << i << ")" << endl; return true; } + bool Uint(unsigned u) { cout << "Uint(" << u << ")" << endl; return true; } + bool Int64(int64_t i) { cout << "Int64(" << i << ")" << endl; return true; } + bool Uint64(uint64_t u) { cout << "Uint64(" << u << ")" << endl; return true; } + bool Double(double d) { cout << "Double(" << d << ")" << endl; return true; } + bool String(const char* str, SizeType length, bool copy) { + cout << "String(" << str << ", " << length << ", " << boolalpha << copy << ")" << endl; + return true; + } + bool StartObject() { cout << "StartObject()" << endl; return true; } + bool Key(const char* str, SizeType length, bool copy) { + cout << "Key(" << str << ", " << length << ", " << boolalpha << copy << ")" << endl; + return true; + } + bool EndObject(SizeType memberCount) { cout << "EndObject(" << memberCount << ")" << endl; return true; } + bool StartArray() { cout << "StartArray()" << endl; return true; } + bool EndArray(SizeType elementCount) { cout << "EndArray(" << elementCount << ")" << endl; return true; } +}; + +void main() { + const char json[] = " { \"hello\" : \"world\", \"t\" : true , \"f\" : false, \"n\": null, \"i\":123, \"pi\": 3.1416, \"a\":[1, 2, 3, 4] } "; + + MyHandler handler; + Reader reader; + StringStream ss(json); + reader.Parse(ss, handler); +} +~~~~~~~~~~ + +Note that RapidJSON uses templates to statically bind the `Reader` type and the handler type, instead of using classes with virtual functions. This paradigm can improve performance by inlining functions. + +## Handler {#Handler} + +As shown in the previous example, the user needs to implement a handler which consumes the events (via function calls) from the `Reader`. The handler must contain the following member functions. + +~~~~~~~~~~cpp +class Handler { + bool Null(); + bool Bool(bool b); + bool Int(int i); + bool Uint(unsigned i); + bool Int64(int64_t i); + bool Uint64(uint64_t i); + bool Double(double d); + bool RawNumber(const Ch* str, SizeType length, bool copy); + bool String(const Ch* str, SizeType length, bool copy); + bool StartObject(); + bool Key(const Ch* str, SizeType length, bool copy); + bool EndObject(SizeType memberCount); + bool StartArray(); + bool EndArray(SizeType elementCount); +}; +~~~~~~~~~~ + +`Null()` is called when the `Reader` encounters a JSON null value. + +`Bool(bool)` is called when the `Reader` encounters a JSON true or false value. + +When the `Reader` encounters a JSON number, it chooses a suitable C++ type mapping. And then it calls *one* function out of `Int(int)`, `Uint(unsigned)`, `Int64(int64_t)`, `Uint64(uint64_t)` and `Double(double)`. If `kParseNumbersAsStrings` is enabled, `Reader` will always calls `RawNumber()` instead. + +`String(const char* str, SizeType length, bool copy)` is called when the `Reader` encounters a string. The first parameter is pointer to the string. The second parameter is the length of the string (excluding the null terminator). Note that RapidJSON supports null character `\0` inside a string. If such situation happens, `strlen(str) < length`. The last `copy` indicates whether the handler needs to make a copy of the string. For normal parsing, `copy = true`. Only when *insitu* parsing is used, `copy = false`. And be aware that the character type depends on the target encoding, which will be explained later. + +When the `Reader` encounters the beginning of an object, it calls `StartObject()`. An object in JSON is a set of name-value pairs. If the object contains members it first calls `Key()` for the name of member, and then calls functions depending on the type of the value. These calls of name-value pairs repeat until calling `EndObject(SizeType memberCount)`. Note that the `memberCount` parameter is just an aid for the handler; users who do not need this parameter may ignore it. + +Arrays are similar to objects, but simpler. At the beginning of an array, the `Reader` calls `BeginArray()`. If there is elements, it calls functions according to the types of element. Similarly, in the last call `EndArray(SizeType elementCount)`, the parameter `elementCount` is just an aid for the handler. + +Every handler function returns a `bool`. Normally it should return `true`. If the handler encounters an error, it can return `false` to notify the event publisher to stop further processing. + +For example, when we parse a JSON with `Reader` and the handler detects that the JSON does not conform to the required schema, the handler can return `false` and let the `Reader` stop further parsing. This will place the `Reader` in an error state, with error code `kParseErrorTermination`. + +## GenericReader {#GenericReader} + +As mentioned before, `Reader` is a typedef of a template class `GenericReader`: + +~~~~~~~~~~cpp +namespace rapidjson { + +template > +class GenericReader { + // ... +}; + +typedef GenericReader, UTF8<> > Reader; + +} // namespace rapidjson +~~~~~~~~~~ + +The `Reader` uses UTF-8 as both source and target encoding. The source encoding means the encoding in the JSON stream. The target encoding means the encoding of the `str` parameter in `String()` calls. For example, to parse a UTF-8 stream and output UTF-16 string events, you can define a reader by: + +~~~~~~~~~~cpp +GenericReader, UTF16<> > reader; +~~~~~~~~~~ + +Note that, the default character type of `UTF16` is `wchar_t`. So this `reader` needs to call `String(const wchar_t*, SizeType, bool)` of the handler. + +The third template parameter `Allocator` is the allocator type for internal data structure (actually a stack). + +## Parsing {#SaxParsing} + +The main function of `Reader` is used to parse JSON. + +~~~~~~~~~~cpp +template +bool Parse(InputStream& is, Handler& handler); + +// with parseFlags = kDefaultParseFlags +template +bool Parse(InputStream& is, Handler& handler); +~~~~~~~~~~ + +If an error occurs during parsing, it will return `false`. User can also call `bool HasParseError()`, `ParseErrorCode GetParseErrorCode()` and `size_t GetErrorOffset()` to obtain the error states. In fact, `Document` uses these `Reader` functions to obtain parse errors. Please refer to [DOM](doc/dom.md) for details about parse errors. + +## Token-by-Token Parsing {#TokenByTokenParsing} + +Some users may wish to parse a JSON input stream a single token at a time, instead of immediately parsing an entire document without stopping. To parse JSON this way, instead of calling `Parse`, you can use the `IterativeParse` set of functions: + +~~~~~~~~~~cpp + void IterativeParseInit(); + + template + bool IterativeParseNext(InputStream& is, Handler& handler); + + bool IterativeParseComplete(); +~~~~~~~~~~ + +Here is an example of iteratively parsing JSON, token by token: + +~~~~~~~~~~cpp + reader.IterativeParseInit(); + while (!reader.IterativeParseComplete()) { + reader.IterativeParseNext(is, handler); + // Your handler has been called once. + } +~~~~~~~~~~ + +# Writer {#Writer} + +`Reader` converts (parses) JSON into events. `Writer` does exactly the opposite. It converts events into JSON. + +`Writer` is very easy to use. If your application only need to converts some data into JSON, it may be a good choice to use `Writer` directly, instead of building a `Document` and then stringifying it with a `Writer`. + +In `simplewriter` example, we do exactly the reverse of `simplereader`. + +~~~~~~~~~~cpp +#include "rapidjson/writer.h" +#include "rapidjson/stringbuffer.h" +#include + +using namespace rapidjson; +using namespace std; + +void main() { + StringBuffer s; + Writer writer(s); + + writer.StartObject(); + writer.Key("hello"); + writer.String("world"); + writer.Key("t"); + writer.Bool(true); + writer.Key("f"); + writer.Bool(false); + writer.Key("n"); + writer.Null(); + writer.Key("i"); + writer.Uint(123); + writer.Key("pi"); + writer.Double(3.1416); + writer.Key("a"); + writer.StartArray(); + for (unsigned i = 0; i < 4; i++) + writer.Uint(i); + writer.EndArray(); + writer.EndObject(); + + cout << s.GetString() << endl; +} +~~~~~~~~~~ + +~~~~~~~~~~ +{"hello":"world","t":true,"f":false,"n":null,"i":123,"pi":3.1416,"a":[0,1,2,3]} +~~~~~~~~~~ + +There are two `String()` and `Key()` overloads. One is the same as defined in handler concept with 3 parameters. It can handle string with null characters. Another one is the simpler version used in the above example. + +Note that, the example code does not pass any parameters in `EndArray()` and `EndObject()`. An `SizeType` can be passed but it will be simply ignored by `Writer`. + +You may doubt that, why not just using `sprintf()` or `std::stringstream` to build a JSON? + +There are various reasons: +1. `Writer` must output a well-formed JSON. If there is incorrect event sequence (e.g. `Int()` just after `StartObject()`), it generates assertion fail in debug mode. +2. `Writer::String()` can handle string escaping (e.g. converting code point `U+000A` to `\n`) and Unicode transcoding. +3. `Writer` handles number output consistently. +4. `Writer` implements the event handler concept. It can be used to handle events from `Reader`, `Document` or other event publisher. +5. `Writer` can be optimized for different platforms. + +Anyway, using `Writer` API is even simpler than generating a JSON by ad hoc methods. + +## Template {#WriterTemplate} + +`Writer` has a minor design difference to `Reader`. `Writer` is a template class, not a typedef. There is no `GenericWriter`. The following is the declaration. + +~~~~~~~~~~cpp +namespace rapidjson { + +template, typename TargetEncoding = UTF8<>, typename Allocator = CrtAllocator<>, unsigned writeFlags = kWriteDefaultFlags> +class Writer { +public: + Writer(OutputStream& os, Allocator* allocator = 0, size_t levelDepth = kDefaultLevelDepth) +// ... +}; + +} // namespace rapidjson +~~~~~~~~~~ + +The `OutputStream` template parameter is the type of output stream. It cannot be deduced and must be specified by user. + +The `SourceEncoding` template parameter specifies the encoding to be used in `String(const Ch*, ...)`. + +The `TargetEncoding` template parameter specifies the encoding in the output stream. + +The `Allocator` is the type of allocator, which is used for allocating internal data structure (a stack). + +The `writeFlags` are combination of the following bit-flags: + +Parse flags | Meaning +------------------------------|----------------------------------- +`kWriteNoFlags` | No flag is set. +`kWriteDefaultFlags` | Default write flags. It is equal to macro `RAPIDJSON_WRITE_DEFAULT_FLAGS`, which is defined as `kWriteNoFlags`. +`kWriteValidateEncodingFlag` | Validate encoding of JSON strings. +`kWriteNanAndInfFlag` | Allow writing of `Infinity`, `-Infinity` and `NaN`. + +Besides, the constructor of `Writer` has a `levelDepth` parameter. This parameter affects the initial memory allocated for storing information per hierarchy level. + +## PrettyWriter {#PrettyWriter} + +While the output of `Writer` is the most condensed JSON without white-spaces, suitable for network transfer or storage, it is not easily readable by human. + +Therefore, RapidJSON provides a `PrettyWriter`, which adds indentation and line feeds in the output. + +The usage of `PrettyWriter` is exactly the same as `Writer`, expect that `PrettyWriter` provides a `SetIndent(Ch indentChar, unsigned indentCharCount)` function. The default is 4 spaces. + +## Completeness and Reset {#CompletenessReset} + +A `Writer` can only output a single JSON, which can be any JSON type at the root. Once the singular event for root (e.g. `String()`), or the last matching `EndObject()` or `EndArray()` event, is handled, the output JSON is well-formed and complete. User can detect this state by calling `Writer::IsComplete()`. + +When a JSON is complete, the `Writer` cannot accept any new events. Otherwise the output will be invalid (i.e. having more than one root). To reuse the `Writer` object, user can call `Writer::Reset(OutputStream& os)` to reset all internal states of the `Writer` with a new output stream. + +# Techniques {#SaxTechniques} + +## Parsing JSON to Custom Data Structure {#CustomDataStructure} + +`Document`'s parsing capability is completely based on `Reader`. Actually `Document` is a handler which receives events from a reader to build a DOM during parsing. + +User may uses `Reader` to build other data structures directly. This eliminates building of DOM, thus reducing memory and improving performance. + +In the following `messagereader` example, `ParseMessages()` parses a JSON which should be an object with key-string pairs. + +~~~~~~~~~~cpp +#include "rapidjson/reader.h" +#include "rapidjson/error/en.h" +#include +#include +#include + +using namespace std; +using namespace rapidjson; + +typedef map MessageMap; + +struct MessageHandler + : public BaseReaderHandler, MessageHandler> { + MessageHandler() : state_(kExpectObjectStart) { + } + + bool StartObject() { + switch (state_) { + case kExpectObjectStart: + state_ = kExpectNameOrObjectEnd; + return true; + default: + return false; + } + } + + bool String(const char* str, SizeType length, bool) { + switch (state_) { + case kExpectNameOrObjectEnd: + name_ = string(str, length); + state_ = kExpectValue; + return true; + case kExpectValue: + messages_.insert(MessageMap::value_type(name_, string(str, length))); + state_ = kExpectNameOrObjectEnd; + return true; + default: + return false; + } + } + + bool EndObject(SizeType) { return state_ == kExpectNameOrObjectEnd; } + + bool Default() { return false; } // All other events are invalid. + + MessageMap messages_; + enum State { + kExpectObjectStart, + kExpectNameOrObjectEnd, + kExpectValue, + }state_; + std::string name_; +}; + +void ParseMessages(const char* json, MessageMap& messages) { + Reader reader; + MessageHandler handler; + StringStream ss(json); + if (reader.Parse(ss, handler)) + messages.swap(handler.messages_); // Only change it if success. + else { + ParseErrorCode e = reader.GetParseErrorCode(); + size_t o = reader.GetErrorOffset(); + cout << "Error: " << GetParseError_En(e) << endl;; + cout << " at offset " << o << " near '" << string(json).substr(o, 10) << "...'" << endl; + } +} + +int main() { + MessageMap messages; + + const char* json1 = "{ \"greeting\" : \"Hello!\", \"farewell\" : \"bye-bye!\" }"; + cout << json1 << endl; + ParseMessages(json1, messages); + + for (MessageMap::const_iterator itr = messages.begin(); itr != messages.end(); ++itr) + cout << itr->first << ": " << itr->second << endl; + + cout << endl << "Parse a JSON with invalid schema." << endl; + const char* json2 = "{ \"greeting\" : \"Hello!\", \"farewell\" : \"bye-bye!\", \"foo\" : {} }"; + cout << json2 << endl; + ParseMessages(json2, messages); + + return 0; +} +~~~~~~~~~~ + +~~~~~~~~~~ +{ "greeting" : "Hello!", "farewell" : "bye-bye!" } +farewell: bye-bye! +greeting: Hello! + +Parse a JSON with invalid schema. +{ "greeting" : "Hello!", "farewell" : "bye-bye!", "foo" : {} } +Error: Terminate parsing due to Handler error. + at offset 59 near '} }...' +~~~~~~~~~~ + +The first JSON (`json1`) was successfully parsed into `MessageMap`. Since `MessageMap` is a `std::map`, the printing order are sorted by the key. This order is different from the JSON's order. + +In the second JSON (`json2`), `foo`'s value is an empty object. As it is an object, `MessageHandler::StartObject()` will be called. However, at that moment `state_ = kExpectValue`, so that function returns `false` and cause the parsing process be terminated. The error code is `kParseErrorTermination`. + +## Filtering of JSON {#Filtering} + +As mentioned earlier, `Writer` can handle the events published by `Reader`. `condense` example simply set a `Writer` as handler of a `Reader`, so it can remove all white-spaces in JSON. `pretty` example uses the same relationship, but replacing `Writer` by `PrettyWriter`. So `pretty` can be used to reformat a JSON with indentation and line feed. + +Actually, we can add intermediate layer(s) to filter the contents of JSON via these SAX-style API. For example, `capitalize` example capitalize all strings in a JSON. + +~~~~~~~~~~cpp +#include "rapidjson/reader.h" +#include "rapidjson/writer.h" +#include "rapidjson/filereadstream.h" +#include "rapidjson/filewritestream.h" +#include "rapidjson/error/en.h" +#include +#include + +using namespace rapidjson; + +template +struct CapitalizeFilter { + CapitalizeFilter(OutputHandler& out) : out_(out), buffer_() { + } + + bool Null() { return out_.Null(); } + bool Bool(bool b) { return out_.Bool(b); } + bool Int(int i) { return out_.Int(i); } + bool Uint(unsigned u) { return out_.Uint(u); } + bool Int64(int64_t i) { return out_.Int64(i); } + bool Uint64(uint64_t u) { return out_.Uint64(u); } + bool Double(double d) { return out_.Double(d); } + bool RawNumber(const char* str, SizeType length, bool copy) { return out_.RawNumber(str, length, copy); } + bool String(const char* str, SizeType length, bool) { + buffer_.clear(); + for (SizeType i = 0; i < length; i++) + buffer_.push_back(std::toupper(str[i])); + return out_.String(&buffer_.front(), length, true); // true = output handler need to copy the string + } + bool StartObject() { return out_.StartObject(); } + bool Key(const char* str, SizeType length, bool copy) { return String(str, length, copy); } + bool EndObject(SizeType memberCount) { return out_.EndObject(memberCount); } + bool StartArray() { return out_.StartArray(); } + bool EndArray(SizeType elementCount) { return out_.EndArray(elementCount); } + + OutputHandler& out_; + std::vector buffer_; +}; + +int main(int, char*[]) { + // Prepare JSON reader and input stream. + Reader reader; + char readBuffer[65536]; + FileReadStream is(stdin, readBuffer, sizeof(readBuffer)); + + // Prepare JSON writer and output stream. + char writeBuffer[65536]; + FileWriteStream os(stdout, writeBuffer, sizeof(writeBuffer)); + Writer writer(os); + + // JSON reader parse from the input stream and let writer generate the output. + CapitalizeFilter > filter(writer); + if (!reader.Parse(is, filter)) { + fprintf(stderr, "\nError(%u): %s\n", (unsigned)reader.GetErrorOffset(), GetParseError_En(reader.GetParseErrorCode())); + return 1; + } + + return 0; +} +~~~~~~~~~~ + +Note that, it is incorrect to simply capitalize the JSON as a string. For example: +~~~~~~~~~~ +["Hello\nWorld"] +~~~~~~~~~~ + +Simply capitalizing the whole JSON would contain incorrect escape character: +~~~~~~~~~~ +["HELLO\NWORLD"] +~~~~~~~~~~ + +The correct result by `capitalize`: +~~~~~~~~~~ +["HELLO\nWORLD"] +~~~~~~~~~~ + +More complicated filters can be developed. However, since SAX-style API can only provide information about a single event at a time, user may need to book-keeping the contextual information (e.g. the path from root value, storage of other related values). Some processing may be easier to be implemented in DOM than SAX. diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/doc/sax.zh-cn.md b/graphics/asymptote/LspCpp/third_party/rapidjson/doc/sax.zh-cn.md new file mode 100644 index 0000000000..9b11e7683d --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/doc/sax.zh-cn.md @@ -0,0 +1,487 @@ +# SAX + +"SAX" 此术语源于 [Simple API for XML](http://en.wikipedia.org/wiki/Simple_API_for_XML)。我们借了此术语去套用在 JSON 的解析及生成。 + +在 RapidJSON 中,`Reader`(`GenericReader<...>` 的 typedef)是 JSON 的 SAX 风格解析器,而 `Writer`(`GenericWriter<...>` 的 typedef)则是 JSON 的 SAX 风格生成器。 + +[TOC] + +# Reader {#Reader} + +`Reader` 从输入流解析一个 JSON。当它从流中读取字符时,它会基于 JSON 的语法去分析字符,并向处理器发送事件。 + +例如,以下是一个 JSON。 + +~~~~~~~~~~js +{ + "hello": "world", + "t": true , + "f": false, + "n": null, + "i": 123, + "pi": 3.1416, + "a": [1, 2, 3, 4] +} +~~~~~~~~~~ + +当一个 `Reader` 解析此 JSON 时,它会顺序地向处理器发送以下的事件: + +~~~~~~~~~~ +StartObject() +Key("hello", 5, true) +String("world", 5, true) +Key("t", 1, true) +Bool(true) +Key("f", 1, true) +Bool(false) +Key("n", 1, true) +Null() +Key("i") +Uint(123) +Key("pi") +Double(3.1416) +Key("a") +StartArray() +Uint(1) +Uint(2) +Uint(3) +Uint(4) +EndArray(4) +EndObject(7) +~~~~~~~~~~ + +除了一些事件参数需要再作解释,这些事件可以轻松地与 JSON 对上。我们可以看看 `simplereader` 例子怎样产生和以上完全相同的结果: + +~~~~~~~~~~cpp +#include "rapidjson/reader.h" +#include + +using namespace rapidjson; +using namespace std; + +struct MyHandler : public BaseReaderHandler, MyHandler> { + bool Null() { cout << "Null()" << endl; return true; } + bool Bool(bool b) { cout << "Bool(" << boolalpha << b << ")" << endl; return true; } + bool Int(int i) { cout << "Int(" << i << ")" << endl; return true; } + bool Uint(unsigned u) { cout << "Uint(" << u << ")" << endl; return true; } + bool Int64(int64_t i) { cout << "Int64(" << i << ")" << endl; return true; } + bool Uint64(uint64_t u) { cout << "Uint64(" << u << ")" << endl; return true; } + bool Double(double d) { cout << "Double(" << d << ")" << endl; return true; } + bool String(const char* str, SizeType length, bool copy) { + cout << "String(" << str << ", " << length << ", " << boolalpha << copy << ")" << endl; + return true; + } + bool StartObject() { cout << "StartObject()" << endl; return true; } + bool Key(const char* str, SizeType length, bool copy) { + cout << "Key(" << str << ", " << length << ", " << boolalpha << copy << ")" << endl; + return true; + } + bool EndObject(SizeType memberCount) { cout << "EndObject(" << memberCount << ")" << endl; return true; } + bool StartArray() { cout << "StartArray()" << endl; return true; } + bool EndArray(SizeType elementCount) { cout << "EndArray(" << elementCount << ")" << endl; return true; } +}; + +void main() { + const char json[] = " { \"hello\" : \"world\", \"t\" : true , \"f\" : false, \"n\": null, \"i\":123, \"pi\": 3.1416, \"a\":[1, 2, 3, 4] } "; + + MyHandler handler; + Reader reader; + StringStream ss(json); + reader.Parse(ss, handler); +} +~~~~~~~~~~ + +注意 RapidJSON 使用模板去静态挷定 `Reader` 类型及处理器的类型,而不是使用含虚函数的类。这个范式可以通过把函数内联而改善性能。 + +## 处理器 {#Handler} + +如前例所示,使用者需要实现一个处理器(handler),用于处理来自 `Reader` 的事件(函数调用)。处理器必须包含以下的成员函数。 + +~~~~~~~~~~cpp +class Handler { + bool Null(); + bool Bool(bool b); + bool Int(int i); + bool Uint(unsigned i); + bool Int64(int64_t i); + bool Uint64(uint64_t i); + bool Double(double d); + bool RawNumber(const Ch* str, SizeType length, bool copy); + bool String(const Ch* str, SizeType length, bool copy); + bool StartObject(); + bool Key(const Ch* str, SizeType length, bool copy); + bool EndObject(SizeType memberCount); + bool StartArray(); + bool EndArray(SizeType elementCount); +}; +~~~~~~~~~~ + +当 `Reader` 遇到 JSON null 值时会调用 `Null()`。 + +当 `Reader` 遇到 JSON true 或 false 值时会调用 `Bool(bool)`。 + +当 `Reader` 遇到 JSON number,它会选择一个合适的 C++ 类型映射,然后调用 `Int(int)`、`Uint(unsigned)`、`Int64(int64_t)`、`Uint64(uint64_t)` 及 `Double(double)` 的 * 其中之一个 *。 若开启了 `kParseNumbersAsStrings` 选项,`Reader` 便会改为调用 `RawNumber()`。 + +当 `Reader` 遇到 JSON string,它会调用 `String(const char* str, SizeType length, bool copy)`。第一个参数是字符串的指针。第二个参数是字符串的长度(不包含空终止符号)。注意 RapidJSON 支持字串中含有空字符 `\0`。若出现这种情况,便会有 `strlen(str) < length`。最后的 `copy` 参数表示处理器是否需要复制该字符串。在正常解析时,`copy = true`。仅当使用原位解析时,`copy = false`。此外,还要注意字符的类型与目标编码相关,我们稍后会再谈这一点。 + +当 `Reader` 遇到 JSON object 的开始之时,它会调用 `StartObject()`。JSON 的 object 是一个键值对(成员)的集合。若 object 包含成员,它会先为成员的名字调用 `Key()`,然后再按值的类型调用函数。它不断调用这些键值对,直至最终调用 `EndObject(SizeType memberCount)`。注意 `memberCount` 参数对处理器来说只是协助性质,使用者可能不需要此参数。 + +JSON array 与 object 相似,但更简单。在 array 开始时,`Reader` 会调用 `BeginArary()`。若 array 含有元素,它会按元素的类型来读用函数。相似地,最后它会调用 `EndArray(SizeType elementCount)`,其中 `elementCount` 参数对处理器来说只是协助性质。 + +每个处理器函数都返回一个 `bool`。正常它们应返回 `true`。若处理器遇到错误,它可以返回 `false` 去通知事件发送方停止继续处理。 + +例如,当我们用 `Reader` 解析一个 JSON 时,处理器检测到该 JSON 并不符合所需的 schema,那么处理器可以返回 `false`,令 `Reader` 停止之后的解析工作。而 `Reader` 会进入一个错误状态,并以 `kParseErrorTermination` 错误码标识。 + +## GenericReader {#GenericReader} + +前面提及,`Reader` 是 `GenericReader` 模板类的 typedef: + +~~~~~~~~~~cpp +namespace rapidjson { + +template > +class GenericReader { + // ... +}; + +typedef GenericReader, UTF8<> > Reader; + +} // namespace rapidjson +~~~~~~~~~~ + +`Reader` 使用 UTF-8 作为来源及目标编码。来源编码是指 JSON 流的编码。目标编码是指 `String()` 的 `str` 参数所用的编码。例如,要解析一个 UTF-8 流并输出至 UTF-16 string 事件,你需要这么定义一个 reader: + +~~~~~~~~~~cpp +GenericReader, UTF16<> > reader; +~~~~~~~~~~ + +注意到 `UTF16` 的缺省类型是 `wchar_t`。因此这个 `reader` 需要调用处理器的 `String(const wchar_t*, SizeType, bool)`。 + +第三个模板参数 `Allocator` 是内部数据结构(实际上是一个堆栈)的分配器类型。 + +## 解析 {#SaxParsing} + +`Reader` 的唯一功能就是解析 JSON。 + +~~~~~~~~~~cpp +template +bool Parse(InputStream& is, Handler& handler); + +// 使用 parseFlags = kDefaultParseFlags +template +bool Parse(InputStream& is, Handler& handler); +~~~~~~~~~~ + +若在解析中出现错误,它会返回 `false`。使用者可调用 `bool HasParseEror()`, `ParseErrorCode GetParseErrorCode()` 及 `size_t GetErrorOffset()` 获取错误状态。实际上 `Document` 使用这些 `Reader` 函数去获取解析错误。请参考 [DOM](doc/dom.zh-cn.md) 去了解有关解析错误的细节。 + +# Writer {#Writer} + +`Reader` 把 JSON 转换(解析)成为事件。`Writer` 做完全相反的事情。它把事件转换成 JSON。 + +`Writer` 是非常容易使用的。若你的应用程序只需把一些数据转换成 JSON,可能直接使用 `Writer`,会比建立一个 `Document` 然后用 `Writer` 把它转换成 JSON 更加方便。 + +在 `simplewriter` 例子里,我们做 `simplereader` 完全相反的事情。 + +~~~~~~~~~~cpp +#include "rapidjson/writer.h" +#include "rapidjson/stringbuffer.h" +#include + +using namespace rapidjson; +using namespace std; + +void main() { + StringBuffer s; + Writer writer(s); + + writer.StartObject(); + writer.Key("hello"); + writer.String("world"); + writer.Key("t"); + writer.Bool(true); + writer.Key("f"); + writer.Bool(false); + writer.Key("n"); + writer.Null(); + writer.Key("i"); + writer.Uint(123); + writer.Key("pi"); + writer.Double(3.1416); + writer.Key("a"); + writer.StartArray(); + for (unsigned i = 0; i < 4; i++) + writer.Uint(i); + writer.EndArray(); + writer.EndObject(); + + cout << s.GetString() << endl; +} +~~~~~~~~~~ + +~~~~~~~~~~ +{"hello":"world","t":true,"f":false,"n":null,"i":123,"pi":3.1416,"a":[0,1,2,3]} +~~~~~~~~~~ + +`String()` 及 `Key()` 各有两个重载。一个是如处理器 concept 般,有 3 个参数。它能处理含空字符的字符串。另一个是如上中使用的较简单版本。 + +注意到,例子代码中的 `EndArray()` 及 `EndObject()` 并没有参数。可以传递一个 `SizeType` 的参数,但它会被 `Writer` 忽略。 + +你可能会怀疑,为什么不使用 `sprintf()` 或 `std::stringstream` 去建立一个 JSON? + +这有几个原因: +1. `Writer` 必然会输出一个结构良好(well-formed)的 JSON。若然有错误的事件次序(如 `Int()` 紧随 `StartObject()` 出现),它会在调试模式中产生断言失败。 +2. `Writer::String()` 可处理字符串转义(如把码点 `U+000A` 转换成 `\n`)及进行 Unicode 转码。 +3. `Writer` 一致地处理 number 的输出。 +4. `Writer` 实现了事件处理器 concept。可用于处理来自 `Reader`、`Document` 或其他事件发生器。 +5. `Writer` 可对不同平台进行优化。 + +无论如何,使用 `Writer` API 去生成 JSON 甚至乎比这些临时方法更简单。 + +## 模板 {#WriterTemplate} + +`Writer` 与 `Reader` 有少许设计区别。`Writer` 是一个模板类,而不是一个 typedef。 并没有 `GenericWriter`。以下是 `Writer` 的声明。 + +~~~~~~~~~~cpp +namespace rapidjson { + +template, typename TargetEncoding = UTF8<>, typename Allocator = CrtAllocator<> > +class Writer { +public: + Writer(OutputStream& os, Allocator* allocator = 0, size_t levelDepth = kDefaultLevelDepth) +// ... +}; + +} // namespace rapidjson +~~~~~~~~~~ + +`OutputStream` 模板参数是输出流的类型。它的类型不可以被自动推断,必须由使用者提供。 + +`SourceEncoding` 模板参数指定了 `String(const Ch*, ...)` 的编码。 + +`TargetEncoding` 模板参数指定输出流的编码。 + +`Allocator` 是分配器的类型,用于分配内部数据结构(一个堆栈)。 + +`writeFlags` 是以下位标志的组合: + +写入位标志 | 意义 +------------------------------|----------------------------------- +`kWriteNoFlags` | 没有任何标志。 +`kWriteDefaultFlags` | 缺省的解析选项。它等于 `RAPIDJSON_WRITE_DEFAULT_FLAGS` 宏,此宏定义为 `kWriteNoFlags`。 +`kWriteValidateEncodingFlag` | 校验 JSON 字符串的编码。 +`kWriteNanAndInfFlag` | 容许写入 `Infinity`, `-Infinity` 及 `NaN`。 + +此外,`Writer` 的构造函数有一 `levelDepth` 参数。存储每层阶信息的初始内存分配量受此参数影响。 + +## PrettyWriter {#PrettyWriter} + +`Writer` 所输出的是没有空格字符的最紧凑 JSON,适合网络传输或储存,但不适合人类阅读。 + +因此,RapidJSON 提供了一个 `PrettyWriter`,它在输出中加入缩进及换行。 + +`PrettyWriter` 的用法与 `Writer` 几乎一样,不同之处是 `PrettyWriter` 提供了一个 `SetIndent(Ch indentChar, unsigned indentCharCount)` 函数。缺省的缩进是 4 个空格。 + +## 完整性及重置 {#CompletenessReset} + +一个 `Writer` 只可输出单个 JSON,其根节点可以是任何 JSON 类型。当处理完单个根节点事件(如 `String()`),或匹配的最后 `EndObject()` 或 `EndArray()` 事件,输出的 JSON 是结构完整(well-formed)及完整的。使用者可调用 `Writer::IsComplete()` 去检测完整性。 + +当 JSON 完整时,`Writer` 不能再接受新的事件。不然其输出便会是不合法的(例如有超过一个根节点)。为了重新利用 `Writer` 对象,使用者可调用 `Writer::Reset(OutputStream& os)` 去重置其所有内部状态及设置新的输出流。 + +# 技巧 {#SaxTechniques} + +## 解析 JSON 至自定义结构 {#CustomDataStructure} + +`Document` 的解析功能完全依靠 `Reader`。实际上 `Document` 是一个处理器,在解析 JSON 时接收事件去建立一个 DOM。 + +使用者可以直接使用 `Reader` 去建立其他数据结构。这消除了建立 DOM 的步骤,从而减少了内存开销并改善性能。 + +在以下的 `messagereader` 例子中,`ParseMessages()` 解析一个 JSON,该 JSON 应该是一个含键值对的 object。 + +~~~~~~~~~~cpp +#include "rapidjson/reader.h" +#include "rapidjson/error/en.h" +#include +#include +#include + +using namespace std; +using namespace rapidjson; + +typedef map MessageMap; + +struct MessageHandler + : public BaseReaderHandler, MessageHandler> { + MessageHandler() : state_(kExpectObjectStart) { + } + + bool StartObject() { + switch (state_) { + case kExpectObjectStart: + state_ = kExpectNameOrObjectEnd; + return true; + default: + return false; + } + } + + bool String(const char* str, SizeType length, bool) { + switch (state_) { + case kExpectNameOrObjectEnd: + name_ = string(str, length); + state_ = kExpectValue; + return true; + case kExpectValue: + messages_.insert(MessageMap::value_type(name_, string(str, length))); + state_ = kExpectNameOrObjectEnd; + return true; + default: + return false; + } + } + + bool EndObject(SizeType) { return state_ == kExpectNameOrObjectEnd; } + + bool Default() { return false; } // All other events are invalid. + + MessageMap messages_; + enum State { + kExpectObjectStart, + kExpectNameOrObjectEnd, + kExpectValue, + }state_; + std::string name_; +}; + +void ParseMessages(const char* json, MessageMap& messages) { + Reader reader; + MessageHandler handler; + StringStream ss(json); + if (reader.Parse(ss, handler)) + messages.swap(handler.messages_); // Only change it if success. + else { + ParseErrorCode e = reader.GetParseErrorCode(); + size_t o = reader.GetErrorOffset(); + cout << "Error: " << GetParseError_En(e) << endl;; + cout << " at offset " << o << " near '" << string(json).substr(o, 10) << "...'" << endl; + } +} + +int main() { + MessageMap messages; + + const char* json1 = "{ \"greeting\" : \"Hello!\", \"farewell\" : \"bye-bye!\" }"; + cout << json1 << endl; + ParseMessages(json1, messages); + + for (MessageMap::const_iterator itr = messages.begin(); itr != messages.end(); ++itr) + cout << itr->first << ": " << itr->second << endl; + + cout << endl << "Parse a JSON with invalid schema." << endl; + const char* json2 = "{ \"greeting\" : \"Hello!\", \"farewell\" : \"bye-bye!\", \"foo\" : {} }"; + cout << json2 << endl; + ParseMessages(json2, messages); + + return 0; +} +~~~~~~~~~~ + +~~~~~~~~~~ +{ "greeting" : "Hello!", "farewell" : "bye-bye!" } +farewell: bye-bye! +greeting: Hello! + +Parse a JSON with invalid schema. +{ "greeting" : "Hello!", "farewell" : "bye-bye!", "foo" : {} } +Error: Terminate parsing due to Handler error. + at offset 59 near '} }...' +~~~~~~~~~~ + +第一个 JSON(`json1`)被成功地解析至 `MessageMap`。由于 `MessageMap` 是一个 `std::map`,打印次序按键值排序。此次序与 JSON 中的次序不同。 + +在第二个 JSON(`json2`)中,`foo` 的值是一个空 object。由于它是一个 object,`MessageHandler::StartObject()` 会被调用。然而,在 `state_ = kExpectValue` 的情况下,该函数会返回 `false`,并导致解析过程终止。错误代码是 `kParseErrorTermination`。 + +## 过滤 JSON {#Filtering} + +如前面提及过,`Writer` 可处理 `Reader` 发出的事件。`example/condense/condense.cpp` 例子简单地设置 `Writer` 作为一个 `Reader` 的处理器,因此它能移除 JSON 中的所有空白字符。`example/pretty/pretty.cpp` 例子使用同样的关系,只是以 `PrettyWriter` 取代 `Writer`。因此 `pretty` 能够重新格式化 JSON,加入缩进及换行。 + +实际上,我们可以使用 SAX 风格 API 去加入(多个)中间层去过滤 JSON 的内容。例如 `capitalize` 例子可以把所有 JSON string 改为大写。 + +~~~~~~~~~~cpp +#include "rapidjson/reader.h" +#include "rapidjson/writer.h" +#include "rapidjson/filereadstream.h" +#include "rapidjson/filewritestream.h" +#include "rapidjson/error/en.h" +#include +#include + +using namespace rapidjson; + +template +struct CapitalizeFilter { + CapitalizeFilter(OutputHandler& out) : out_(out), buffer_() { + } + + bool Null() { return out_.Null(); } + bool Bool(bool b) { return out_.Bool(b); } + bool Int(int i) { return out_.Int(i); } + bool Uint(unsigned u) { return out_.Uint(u); } + bool Int64(int64_t i) { return out_.Int64(i); } + bool Uint64(uint64_t u) { return out_.Uint64(u); } + bool Double(double d) { return out_.Double(d); } + bool RawNumber(const char* str, SizeType length, bool copy) { return out_.RawNumber(str, length, copy); } + bool String(const char* str, SizeType length, bool) { + buffer_.clear(); + for (SizeType i = 0; i < length; i++) + buffer_.push_back(std::toupper(str[i])); + return out_.String(&buffer_.front(), length, true); // true = output handler need to copy the string + } + bool StartObject() { return out_.StartObject(); } + bool Key(const char* str, SizeType length, bool copy) { return String(str, length, copy); } + bool EndObject(SizeType memberCount) { return out_.EndObject(memberCount); } + bool StartArray() { return out_.StartArray(); } + bool EndArray(SizeType elementCount) { return out_.EndArray(elementCount); } + + OutputHandler& out_; + std::vector buffer_; +}; + +int main(int, char*[]) { + // Prepare JSON reader and input stream. + Reader reader; + char readBuffer[65536]; + FileReadStream is(stdin, readBuffer, sizeof(readBuffer)); + + // Prepare JSON writer and output stream. + char writeBuffer[65536]; + FileWriteStream os(stdout, writeBuffer, sizeof(writeBuffer)); + Writer writer(os); + + // JSON reader parse from the input stream and let writer generate the output. + CapitalizeFilter > filter(writer); + if (!reader.Parse(is, filter)) { + fprintf(stderr, "\nError(%u): %s\n", (unsigned)reader.GetErrorOffset(), GetParseError_En(reader.GetParseErrorCode())); + return 1; + } + + return 0; +} +~~~~~~~~~~ + +注意到,不可简单地把 JSON 当作字符串去改为大写。例如: +~~~~~~~~~~ +["Hello\nWorld"] +~~~~~~~~~~ + +简单地把整个 JSON 转为大写的话会产生错误的转义符: +~~~~~~~~~~ +["HELLO\NWORLD"] +~~~~~~~~~~ + +而 `capitalize` 就会产生正确的结果: +~~~~~~~~~~ +["HELLO\nWORLD"] +~~~~~~~~~~ + +我们还可以开发更复杂的过滤器。然而,由于 SAX 风格 API 在某一时间点只能提供单一事件的信息,使用者需要自行记录一些上下文信息(例如从根节点起的路径、储存其他相关值)。对于处理某些情况,用 DOM 会比 SAX 更容易实现。 + diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/doc/schema.md b/graphics/asymptote/LspCpp/third_party/rapidjson/doc/schema.md new file mode 100644 index 0000000000..238d7a56ae --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/doc/schema.md @@ -0,0 +1,505 @@ +# Schema + +(This feature was released in v1.1.0) + +JSON Schema is a draft standard for describing the format of JSON data. The schema itself is also JSON data. By validating a JSON structure with JSON Schema, your code can safely access the DOM without manually checking types, or whether a key exists, etc. It can also ensure that the serialized JSON conform to a specified schema. + +RapidJSON implemented a JSON Schema validator for [JSON Schema Draft v4](http://json-schema.org/documentation.html). If you are not familiar with JSON Schema, you may refer to [Understanding JSON Schema](http://spacetelescope.github.io/understanding-json-schema/). + +[TOC] + +# Basic Usage {#Basic} + +First of all, you need to parse a JSON Schema into `Document`, and then compile the `Document` into a `SchemaDocument`. + +Secondly, construct a `SchemaValidator` with the `SchemaDocument`. It is similar to a `Writer` in the sense of handling SAX events. So, you can use `document.Accept(validator)` to validate a document, and then check the validity. + +~~~cpp +#include "rapidjson/schema.h" + +// ... + +Document sd; +if (sd.Parse(schemaJson).HasParseError()) { + // the schema is not a valid JSON. + // ... +} +SchemaDocument schema(sd); // Compile a Document to SchemaDocument +// sd is no longer needed here. + +Document d; +if (d.Parse(inputJson).HasParseError()) { + // the input is not a valid JSON. + // ... +} + +SchemaValidator validator(schema); +if (!d.Accept(validator)) { + // Input JSON is invalid according to the schema + // Output diagnostic information + StringBuffer sb; + validator.GetInvalidSchemaPointer().StringifyUriFragment(sb); + printf("Invalid schema: %s\n", sb.GetString()); + printf("Invalid keyword: %s\n", validator.GetInvalidSchemaKeyword()); + sb.Clear(); + validator.GetInvalidDocumentPointer().StringifyUriFragment(sb); + printf("Invalid document: %s\n", sb.GetString()); +} +~~~ + +Some notes: + +* One `SchemaDocument` can be referenced by multiple `SchemaValidator`s. It will not be modified by `SchemaValidator`s. +* A `SchemaValidator` may be reused to validate multiple documents. To run it for other documents, call `validator.Reset()` first. + +# Validation during parsing/serialization {#Fused} + +Unlike most JSON Schema validator implementations, RapidJSON provides a SAX-based schema validator. Therefore, you can parse a JSON from a stream while validating it on the fly. If the validator encounters a JSON value that invalidates the supplied schema, the parsing will be terminated immediately. This design is especially useful for parsing large JSON files. + +## DOM parsing {#DOM} + +For using DOM in parsing, `Document` needs some preparation and finalizing tasks, in addition to receiving SAX events, thus it needs some work to route the reader, validator and the document. `SchemaValidatingReader` is a helper class that doing such work. + +~~~cpp +#include "rapidjson/filereadstream.h" + +// ... +SchemaDocument schema(sd); // Compile a Document to SchemaDocument + +// Use reader to parse the JSON +FILE* fp = fopen("big.json", "r"); +FileReadStream is(fp, buffer, sizeof(buffer)); + +// Parse JSON from reader, validate the SAX events, and store in d. +Document d; +SchemaValidatingReader > reader(is, schema); +d.Populate(reader); + +if (!reader.GetParseResult()) { + // Not a valid JSON + // When reader.GetParseResult().Code() == kParseErrorTermination, + // it may be terminated by: + // (1) the validator found that the JSON is invalid according to schema; or + // (2) the input stream has I/O error. + + // Check the validation result + if (!reader.IsValid()) { + // Input JSON is invalid according to the schema + // Output diagnostic information + StringBuffer sb; + reader.GetInvalidSchemaPointer().StringifyUriFragment(sb); + printf("Invalid schema: %s\n", sb.GetString()); + printf("Invalid keyword: %s\n", reader.GetInvalidSchemaKeyword()); + sb.Clear(); + reader.GetInvalidDocumentPointer().StringifyUriFragment(sb); + printf("Invalid document: %s\n", sb.GetString()); + } +} +~~~ + +## SAX parsing {#SAX} + +For using SAX in parsing, it is much simpler. If it only need to validate the JSON without further processing, it is simply: + +~~~ +SchemaValidator validator(schema); +Reader reader; +if (!reader.Parse(stream, validator)) { + if (!validator.IsValid()) { + // ... + } +} +~~~ + +This is exactly the method used in the [schemavalidator](example/schemavalidator/schemavalidator.cpp) example. The distinct advantage is low memory usage, no matter how big the JSON was (the memory usage depends on the complexity of the schema). + +If you need to handle the SAX events further, then you need to use the template class `GenericSchemaValidator` to set the output handler of the validator: + +~~~ +MyHandler handler; +GenericSchemaValidator validator(schema, handler); +Reader reader; +if (!reader.Parse(ss, validator)) { + if (!validator.IsValid()) { + // ... + } +} +~~~ + +## Serialization {#Serialization} + +It is also possible to do validation during serializing. This can ensure the result JSON is valid according to the JSON schema. + +~~~ +StringBuffer sb; +Writer writer(sb); +GenericSchemaValidator > validator(s, writer); +if (!d.Accept(validator)) { + // Some problem during Accept(), it may be validation or encoding issues. + if (!validator.IsValid()) { + // ... + } +} +~~~ + +Of course, if your application only needs SAX-style serialization, it can simply send SAX events to `SchemaValidator` instead of `Writer`. + +# Remote Schema {#Remote} + +JSON Schema supports [`$ref` keyword](http://spacetelescope.github.io/understanding-json-schema/structuring.html), which is a [JSON pointer](doc/pointer.md) referencing to a local or remote schema. Local pointer is prefixed with `#`, while remote pointer is an relative or absolute URI. For example: + +~~~js +{ "$ref": "definitions.json#/address" } +~~~ + +As `SchemaDocument` does not know how to resolve such URI, it needs a user-provided `IRemoteSchemaDocumentProvider` instance to do so. + +~~~ +class MyRemoteSchemaDocumentProvider : public IRemoteSchemaDocumentProvider { +public: + virtual const SchemaDocument* GetRemoteDocument(const char* uri, SizeType length) { + // Resolve the uri and returns a pointer to that schema. + } +}; + +// ... + +MyRemoteSchemaDocumentProvider provider; +SchemaDocument schema(sd, &provider); +~~~ + +# Conformance {#Conformance} + +RapidJSON passed 262 out of 263 tests in [JSON Schema Test Suite](https://github.com/json-schema/JSON-Schema-Test-Suite) (Json Schema draft 4). + +The failed test is "changed scope ref invalid" of "change resolution scope" in `refRemote.json`. It is due to that `id` schema keyword and URI combining function are not implemented. + +Besides, the `format` schema keyword for string values is ignored, since it is not required by the specification. + +## Regular Expression {#Regex} + +The schema keyword `pattern` and `patternProperties` uses regular expression to match the required pattern. + +RapidJSON implemented a simple NFA regular expression engine, which is used by default. It supports the following syntax. + +|Syntax|Description| +|------|-----------| +|`ab` | Concatenation | +|a|b | Alternation | +|`a?` | Zero or one | +|`a*` | Zero or more | +|`a+` | One or more | +|`a{3}` | Exactly 3 times | +|`a{3,}` | At least 3 times | +|`a{3,5}`| 3 to 5 times | +|`(ab)` | Grouping | +|`^a` | At the beginning | +|`a$` | At the end | +|`.` | Any character | +|`[abc]` | Character classes | +|`[a-c]` | Character class range | +|`[a-z0-9_]` | Character class combination | +|`[^abc]` | Negated character classes | +|`[^a-c]` | Negated character class range | +|`[\b]` | Backspace (U+0008) | +|\\|, `\\`, ... | Escape characters | +|`\f` | Form feed (U+000C) | +|`\n` | Line feed (U+000A) | +|`\r` | Carriage return (U+000D) | +|`\t` | Tab (U+0009) | +|`\v` | Vertical tab (U+000B) | + +For C++11 compiler, it is also possible to use the `std::regex` by defining `RAPIDJSON_SCHEMA_USE_INTERNALREGEX=0` and `RAPIDJSON_SCHEMA_USE_STDREGEX=1`. If your schemas do not need `pattern` and `patternProperties`, you can set both macros to zero to disable this feature, which will reduce some code size. + +# Performance {#Performance} + +Most C++ JSON libraries do not yet support JSON Schema. So we tried to evaluate the performance of RapidJSON's JSON Schema validator according to [json-schema-benchmark](https://github.com/ebdrup/json-schema-benchmark), which tests 11 JavaScript libraries running on Node.js. + +That benchmark runs validations on [JSON Schema Test Suite](https://github.com/json-schema/JSON-Schema-Test-Suite), in which some test suites and tests are excluded. We made the same benchmarking procedure in [`schematest.cpp`](test/perftest/schematest.cpp). + +On a Mac Book Pro (2.8 GHz Intel Core i7), the following results are collected. + +|Validator|Relative speed|Number of test runs per second| +|---------|:------------:|:----------------------------:| +|RapidJSON|155%|30682| +|[`ajv`](https://github.com/epoberezkin/ajv)|100%|19770 (± 1.31%)| +|[`is-my-json-valid`](https://github.com/mafintosh/is-my-json-valid)|70%|13835 (± 2.84%)| +|[`jsen`](https://github.com/bugventure/jsen)|57.7%|11411 (± 1.27%)| +|[`schemasaurus`](https://github.com/AlexeyGrishin/schemasaurus)|26%|5145 (± 1.62%)| +|[`themis`](https://github.com/playlyfe/themis)|19.9%|3935 (± 2.69%)| +|[`z-schema`](https://github.com/zaggino/z-schema)|7%|1388 (± 0.84%)| +|[`jsck`](https://github.com/pandastrike/jsck#readme)|3.1%|606 (± 2.84%)| +|[`jsonschema`](https://github.com/tdegrunt/jsonschema#readme)|0.9%|185 (± 1.01%)| +|[`skeemas`](https://github.com/Prestaul/skeemas#readme)|0.8%|154 (± 0.79%)| +|tv4|0.5%|93 (± 0.94%)| +|[`jayschema`](https://github.com/natesilva/jayschema)|0.1%|21 (± 1.14%)| + +That is, RapidJSON is about 1.5x faster than the fastest JavaScript library (ajv). And 1400x faster than the slowest one. + +# Schema violation reporting {#Reporting} + +(Unreleased as of 2017-09-20) + +When validating an instance against a JSON Schema, +it is often desirable to report not only whether the instance is valid, +but also the ways in which it violates the schema. + +The `SchemaValidator` class +collects errors encountered during validation +into a JSON `Value`. +This error object can then be accessed as `validator.GetError()`. + +The structure of the error object is subject to change +in future versions of RapidJSON, +as there is no standard schema for violations. +The details below this point are provisional only. + +## General provisions {#ReportingGeneral} + +Validation of an instance value against a schema +produces an error value. +The error value is always an object. +An empty object `{}` indicates the instance is valid. + +* The name of each member + corresponds to the JSON Schema keyword that is violated. +* The value is either an object describing a single violation, + or an array of such objects. + +Each violation object contains two string-valued members +named `instanceRef` and `schemaRef`. +`instanceRef` contains the URI fragment serialization +of a JSON Pointer to the instance subobject +in which the violation was detected. +`schemaRef` contains the URI of the schema +and the fragment serialization of a JSON Pointer +to the subschema that was violated. + +Individual violation objects can contain other keyword-specific members. +These are detailed further. + +For example, validating this instance: + +~~~json +{"numbers": [1, 2, "3", 4, 5]} +~~~ + +against this schema: + +~~~json +{ + "type": "object", + "properties": { + "numbers": {"$ref": "numbers.schema.json"} + } +} +~~~ + +where `numbers.schema.json` refers +(via a suitable `IRemoteSchemaDocumentProvider`) +to this schema: + +~~~json +{ + "type": "array", + "items": {"type": "number"} +} +~~~ + +produces the following error object: + +~~~json +{ + "type": { + "instanceRef": "#/numbers/2", + "schemaRef": "numbers.schema.json#/items", + "expected": ["number"], + "actual": "string" + } +} +~~~ + +## Validation keywords for numbers {#Numbers} + +### multipleOf {#multipleof} + +* `expected`: required number strictly greater than 0. + The value of the `multipleOf` keyword specified in the schema. +* `actual`: required number. + The instance value. + +### maximum {#maximum} + +* `expected`: required number. + The value of the `maximum` keyword specified in the schema. +* `exclusiveMaximum`: optional boolean. + This will be true if the schema specified `"exclusiveMaximum": true`, + and will be omitted otherwise. +* `actual`: required number. + The instance value. + +### minimum {#minimum} + +* `expected`: required number. + The value of the `minimum` keyword specified in the schema. +* `exclusiveMinimum`: optional boolean. + This will be true if the schema specified `"exclusiveMinimum": true`, + and will be omitted otherwise. +* `actual`: required number. + The instance value. + +## Validation keywords for strings {#Strings} + +### maxLength {#maxLength} + +* `expected`: required number greater than or equal to 0. + The value of the `maxLength` keyword specified in the schema. +* `actual`: required string. + The instance value. + +### minLength {#minLength} + +* `expected`: required number greater than or equal to 0. + The value of the `minLength` keyword specified in the schema. +* `actual`: required string. + The instance value. + +### pattern {#pattern} + +* `actual`: required string. + The instance value. + +(The expected pattern is not reported +because the internal representation in `SchemaDocument` +does not store the pattern in original string form.) + +## Validation keywords for arrays {#Arrays} + +### additionalItems {#additionalItems} + +This keyword is reported +when the value of `items` schema keyword is an array, +the value of `additionalItems` is `false`, +and the instance is an array +with more items than specified in the `items` array. + +* `disallowed`: required integer greater than or equal to 0. + The index of the first item that has no corresponding schema. + +### maxItems and minItems {#maxItems-minItems} + +* `expected`: required integer greater than or equal to 0. + The value of `maxItems` (respectively, `minItems`) + specified in the schema. +* `actual`: required integer greater than or equal to 0. + Number of items in the instance array. + +### uniqueItems {#uniqueItems} + +* `duplicates`: required array + whose items are integers greater than or equal to 0. + Indices of items of the instance that are equal. + +(RapidJSON only reports the first two equal items, +for performance reasons.) + +## Validation keywords for objects + +### maxProperties and minProperties {#maxProperties-minProperties} + +* `expected`: required integer greater than or equal to 0. + The value of `maxProperties` (respectively, `minProperties`) + specified in the schema. +* `actual`: required integer greater than or equal to 0. + Number of properties in the instance object. + +### required {#required} + +* `missing`: required array of one or more unique strings. + The names of properties + that are listed in the value of the `required` schema keyword + but not present in the instance object. + +### additionalProperties {#additionalProperties} + +This keyword is reported +when the schema specifies `additionalProperties: false` +and the name of a property of the instance is +neither listed in the `properties` keyword +nor matches any regular expression in the `patternProperties` keyword. + +* `disallowed`: required string. + Name of the offending property of the instance. + +(For performance reasons, +RapidJSON only reports the first such property encountered.) + +### dependencies {#dependencies} + +* `errors`: required object with one or more properties. + Names and values of its properties are described below. + +Recall that JSON Schema Draft 04 supports +*schema dependencies*, +where presence of a named *controlling* property +requires the instance object to be valid against a subschema, +and *property dependencies*, +where presence of a controlling property +requires other *dependent* properties to be also present. + +For a violated schema dependency, +`errors` will contain a property +with the name of the controlling property +and its value will be the error object +produced by validating the instance object +against the dependent schema. + +For a violated property dependency, +`errors` will contain a property +with the name of the controlling property +and its value will be an array of one or more unique strings +listing the missing dependent properties. + +## Validation keywords for any instance type {#AnyTypes} + +### enum {#enum} + +This keyword has no additional properties +beyond `instanceRef` and `schemaRef`. + +* The allowed values are not listed + because `SchemaDocument` does not store them in original form. +* The violating value is not reported + because it might be unwieldy. + +If you need to report these details to your users, +you can access the necessary information +by following `instanceRef` and `schemaRef`. + +### type {#type} + +* `expected`: required array of one or more unique strings, + each of which is one of the seven primitive types + defined by the JSON Schema Draft 04 Core specification. + Lists the types allowed by the `type` schema keyword. +* `actual`: required string, also one of seven primitive types. + The primitive type of the instance. + +### allOf, anyOf, and oneOf {#allOf-anyOf-oneOf} + +* `errors`: required array of at least one object. + There will be as many items as there are subschemas + in the `allOf`, `anyOf` or `oneOf` schema keyword, respectively. + Each item will be the error value + produced by validating the instance + against the corresponding subschema. + +For `allOf`, at least one error value will be non-empty. +For `anyOf`, all error values will be non-empty. +For `oneOf`, either all error values will be non-empty, +or more than one will be empty. + +### not {#not} + +This keyword has no additional properties +apart from `instanceRef` and `schemaRef`. diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/doc/schema.zh-cn.md b/graphics/asymptote/LspCpp/third_party/rapidjson/doc/schema.zh-cn.md new file mode 100644 index 0000000000..c85177f9fd --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/doc/schema.zh-cn.md @@ -0,0 +1,237 @@ +# Schema + +(本功能于 v1.1.0 发布) + +JSON Schema 是描述 JSON 格式的一个标准草案。一个 schema 本身也是一个 JSON。使用 JSON Schema 去校验 JSON,可以让你的代码安全地访问 DOM,而无须检查类型或键值是否存在等。这也能确保输出的 JSON 是符合指定的 schema。 + +RapidJSON 实现了一个 [JSON Schema Draft v4](http://json-schema.org/documentation.html) 的校验器。若你不熟悉 JSON Schema,可以参考 [Understanding JSON Schema](http://spacetelescope.github.io/understanding-json-schema/)。 + +[TOC] + +# 基本用法 {#BasicUsage} + +首先,你要把 JSON Schema 解析成 `Document`,再把它编译成一个 `SchemaDocument`。 + +然后,利用该 `SchemaDocument` 创建一个 `SchemaValidator`。它与 `Writer` 相似,都是能够处理 SAX 事件的。因此,你可以用 `document.Accept(validator)` 去校验一个 JSON,然后再获取校验结果。 + +~~~cpp +#include "rapidjson/schema.h" + +// ... + +Document sd; +if (sd.Parse(schemaJson).HasParseError()) { + // 此 schema 不是合法的 JSON + // ... +} +SchemaDocument schema(sd); // 把一个 Document 编译至 SchemaDocument +// 之后不再需要 sd + +Document d; +if (d.Parse(inputJson).HasParseError()) { + // 输入不是一个合法的 JSON + // ... +} + +SchemaValidator validator(schema); +if (!d.Accept(validator)) { + // 输入的 JSON 不合乎 schema + // 打印诊断信息 + StringBuffer sb; + validator.GetInvalidSchemaPointer().StringifyUriFragment(sb); + printf("Invalid schema: %s\n", sb.GetString()); + printf("Invalid keyword: %s\n", validator.GetInvalidSchemaKeyword()); + sb.Clear(); + validator.GetInvalidDocumentPointer().StringifyUriFragment(sb); + printf("Invalid document: %s\n", sb.GetString()); +} +~~~ + +一些注意点: + +* 一个 `SchemaDocment` 能被多个 `SchemaValidator` 引用。它不会被 `SchemaValidator` 修改。 +* 可以重复使用一个 `SchemaValidator` 来校验多个文件。在校验其他文件前,须先调用 `validator.Reset()`。 + +# 在解析/生成时进行校验 {#ParsingSerialization} + +与大部分 JSON Schema 校验器有所不同,RapidJSON 提供了一个基于 SAX 的 schema 校验器实现。因此,你可以在输入流解析 JSON 的同时进行校验。若校验器遇到一个与 schema 不符的值,就会立即终止解析。这设计对于解析大型 JSON 文件时特别有用。 + +## DOM 解析 {#DomParsing} + +在使用 DOM 进行解析时,`Document` 除了接收 SAX 事件外,还需做一些准备及结束工作,因此,为了连接 `Reader`、`SchemaValidator` 和 `Document` 要做多一点事情。`SchemaValidatingReader` 是一个辅助类去做那些工作。 + +~~~cpp +#include "rapidjson/filereadstream.h" + +// ... +SchemaDocument schema(sd); // 把一个 Document 编译至 SchemaDocument + +// 使用 reader 解析 JSON +FILE* fp = fopen("big.json", "r"); +FileReadStream is(fp, buffer, sizeof(buffer)); + +// 用 reader 解析 JSON,校验它的 SAX 事件,并存储至 d +Document d; +SchemaValidatingReader > reader(is, schema); +d.Populate(reader); + +if (!reader.GetParseResult()) { + // 不是一个合法的 JSON + // 当 reader.GetParseResult().Code() == kParseErrorTermination, + // 它可能是被以下原因中止: + // (1) 校验器发现 JSON 不合乎 schema;或 + // (2) 输入流有 I/O 错误。 + + // 检查校验结果 + if (!reader.IsValid()) { + // 输入的 JSON 不合乎 schema + // 打印诊断信息 + StringBuffer sb; + reader.GetInvalidSchemaPointer().StringifyUriFragment(sb); + printf("Invalid schema: %s\n", sb.GetString()); + printf("Invalid keyword: %s\n", reader.GetInvalidSchemaKeyword()); + sb.Clear(); + reader.GetInvalidDocumentPointer().StringifyUriFragment(sb); + printf("Invalid document: %s\n", sb.GetString()); + } +} +~~~ + +## SAX 解析 {#SaxParsing} + +使用 SAX 解析时,情况就简单得多。若只需要校验 JSON 而无需进一步处理,那么仅需要: + +~~~ +SchemaValidator validator(schema); +Reader reader; +if (!reader.Parse(stream, validator)) { + if (!validator.IsValid()) { + // ... + } +} +~~~ + +这种方式和 [schemavalidator](example/schemavalidator/schemavalidator.cpp) 例子完全相同。这带来的独特优势是,无论 JSON 多巨大,永远维持低内存用量(内存用量只与 Schema 的复杂度相关)。 + +若你需要进一步处理 SAX 事件,便可使用模板类 `GenericSchemaValidator` 去设置校验器的输出 `Handler`: + +~~~ +MyHandler handler; +GenericSchemaValidator validator(schema, handler); +Reader reader; +if (!reader.Parse(ss, validator)) { + if (!validator.IsValid()) { + // ... + } +} +~~~ + +## 生成 {#Serialization} + +我们也可以在生成(serialization)的时候进行校验。这能确保输出的 JSON 符合一个 JSON Schema。 + +~~~ +StringBuffer sb; +Writer writer(sb); +GenericSchemaValidator > validator(s, writer); +if (!d.Accept(validator)) { + // Some problem during Accept(), it may be validation or encoding issues. + if (!validator.IsValid()) { + // ... + } +} +~~~ + +当然,如果你的应用仅需要 SAX 风格的生成,那么只需要把 SAX 事件由原来发送到 `Writer`,改为发送到 `SchemaValidator`。 + +# 远程 Schema {#RemoteSchema} + +JSON Schema 支持 [`$ref` 关键字](http://spacetelescope.github.io/understanding-json-schema/structuring.html),它是一个 [JSON pointer](doc/pointer.zh-cn.md) 引用至一个本地(local)或远程(remote) schema。本地指针的首字符是 `#`,而远程指针是一个相对或绝对 URI。例如: + +~~~js +{ "$ref": "definitions.json#/address" } +~~~ + +由于 `SchemaDocument` 并不知道如何处理那些 URI,它需要使用者提供一个 `IRemoteSchemaDocumentProvider` 的实例去处理。 + +~~~ +class MyRemoteSchemaDocumentProvider : public IRemoteSchemaDocumentProvider { +public: + virtual const SchemaDocument* GetRemoteDocument(const char* uri, SizeType length) { + // Resolve the uri and returns a pointer to that schema. + } +}; + +// ... + +MyRemoteSchemaDocumentProvider provider; +SchemaDocument schema(sd, &provider); +~~~ + +# 标准的符合程度 {#Conformance} + +RapidJSON 通过了 [JSON Schema Test Suite](https://github.com/json-schema/JSON-Schema-Test-Suite) (Json Schema draft 4) 中 263 个测试的 262 个。 + +没通过的测试是 `refRemote.json` 中的 "change resolution scope" - "changed scope ref invalid"。这是由于未实现 `id` schema 关键字及 URI 合并功能。 + +除此以外,关于字符串类型的 `format` schema 关键字也会被忽略,因为标准中并没需求必须实现。 + +## 正则表达式 {#RegEx} + +`pattern` 及 `patternProperties` 这两个 schema 关键字使用了正则表达式去匹配所需的模式。 + +RapidJSON 实现了一个简单的 NFA 正则表达式引擎,并预设使用。它支持以下语法。 + +|语法|描述| +|------|-----------| +|`ab` | 串联 | +|a|b | 交替 | +|`a?` | 零或一次 | +|`a*` | 零或多次 | +|`a+` | 一或多次 | +|`a{3}` | 刚好 3 次 | +|`a{3,}` | 至少 3 次 | +|`a{3,5}`| 3 至 5 次 | +|`(ab)` | 分组 | +|`^a` | 在开始处 | +|`a$` | 在结束处 | +|`.` | 任何字符 | +|`[abc]` | 字符组 | +|`[a-c]` | 字符组范围 | +|`[a-z0-9_]` | 字符组组合 | +|`[^abc]` | 字符组取反 | +|`[^a-c]` | 字符组范围取反 | +|`[\b]` | 退格符 (U+0008) | +|\\|, `\\`, ... | 转义字符 | +|`\f` | 馈页 (U+000C) | +|`\n` | 馈行 (U+000A) | +|`\r` | 回车 (U+000D) | +|`\t` | 制表 (U+0009) | +|`\v` | 垂直制表 (U+000B) | + +对于使用 C++11 编译器的使用者,也可使用 `std::regex`,只需定义 `RAPIDJSON_SCHEMA_USE_INTERNALREGEX=0` 及 `RAPIDJSON_SCHEMA_USE_STDREGEX=1`。若你的 schema 无需使用 `pattern` 或 `patternProperties`,可以把两个宏都设为零,以禁用此功能,这样做可节省一些代码体积。 + +# 性能 {#Performance} + +大部分 C++ JSON 库都未支持 JSON Schema。因此我们尝试按照 [json-schema-benchmark](https://github.com/ebdrup/json-schema-benchmark) 去评估 RapidJSON 的 JSON Schema 校验器。该评测测试了 11 个运行在 node.js 上的 JavaScript 库。 + +该评测校验 [JSON Schema Test Suite](https://github.com/json-schema/JSON-Schema-Test-Suite) 中的测试,当中排除了一些测试套件及个别测试。我们在 [`schematest.cpp`](test/perftest/schematest.cpp) 实现了相同的评测。 + +在 MacBook Pro (2.8 GHz Intel Core i7) 上收集到以下结果。 + +|校验器|相对速度|每秒执行的测试数目| +|---------|:------------:|:----------------------------:| +|RapidJSON|155%|30682| +|[`ajv`](https://github.com/epoberezkin/ajv)|100%|19770 (± 1.31%)| +|[`is-my-json-valid`](https://github.com/mafintosh/is-my-json-valid)|70%|13835 (± 2.84%)| +|[`jsen`](https://github.com/bugventure/jsen)|57.7%|11411 (± 1.27%)| +|[`schemasaurus`](https://github.com/AlexeyGrishin/schemasaurus)|26%|5145 (± 1.62%)| +|[`themis`](https://github.com/playlyfe/themis)|19.9%|3935 (± 2.69%)| +|[`z-schema`](https://github.com/zaggino/z-schema)|7%|1388 (± 0.84%)| +|[`jsck`](https://github.com/pandastrike/jsck#readme)|3.1%|606 (± 2.84%)| +|[`jsonschema`](https://github.com/tdegrunt/jsonschema#readme)|0.9%|185 (± 1.01%)| +|[`skeemas`](https://github.com/Prestaul/skeemas#readme)|0.8%|154 (± 0.79%)| +|tv4|0.5%|93 (± 0.94%)| +|[`jayschema`](https://github.com/natesilva/jayschema)|0.1%|21 (± 1.14%)| + +换言之,RapidJSON 比最快的 JavaScript 库(ajv)快约 1.5x。比最慢的快 1400x。 diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/doc/stream.md b/graphics/asymptote/LspCpp/third_party/rapidjson/doc/stream.md new file mode 100644 index 0000000000..5d0b0f35ee --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/doc/stream.md @@ -0,0 +1,429 @@ +# Stream + +In RapidJSON, `rapidjson::Stream` is a concept for reading/writing JSON. Here we'll first show you how to use provided streams. And then see how to create a custom stream. + +[TOC] + +# Memory Streams {#MemoryStreams} + +Memory streams store JSON in memory. + +## StringStream (Input) {#StringStream} + +`StringStream` is the most basic input stream. It represents a complete, read-only JSON stored in memory. It is defined in `rapidjson/rapidjson.h`. + +~~~~~~~~~~cpp +#include "rapidjson/document.h" // will include "rapidjson/rapidjson.h" + +using namespace rapidjson; + +// ... +const char json[] = "[1, 2, 3, 4]"; +StringStream s(json); + +Document d; +d.ParseStream(s); +~~~~~~~~~~ + +Since this is very common usage, `Document::Parse(const char*)` is provided to do exactly the same as above: + +~~~~~~~~~~cpp +// ... +const char json[] = "[1, 2, 3, 4]"; +Document d; +d.Parse(json); +~~~~~~~~~~ + +Note that, `StringStream` is a typedef of `GenericStringStream >`, user may use another encodings to represent the character set of the stream. + +## StringBuffer (Output) {#StringBuffer} + +`StringBuffer` is a simple output stream. It allocates a memory buffer for writing the whole JSON. Use `GetString()` to obtain the buffer. + +~~~~~~~~~~cpp +#include "rapidjson/stringbuffer.h" +#include + +StringBuffer buffer; +Writer writer(buffer); +d.Accept(writer); + +const char* output = buffer.GetString(); +~~~~~~~~~~ + +When the buffer is full, it will increases the capacity automatically. The default capacity is 256 characters (256 bytes for UTF8, 512 bytes for UTF16, etc.). User can provide an allocator and an initial capacity. + +~~~~~~~~~~cpp +StringBuffer buffer1(0, 1024); // Use its allocator, initial size = 1024 +StringBuffer buffer2(allocator, 1024); +~~~~~~~~~~ + +By default, `StringBuffer` will instantiate an internal allocator. + +Similarly, `StringBuffer` is a typedef of `GenericStringBuffer >`. + +# File Streams {#FileStreams} + +When parsing a JSON from file, you may read the whole JSON into memory and use ``StringStream`` above. + +However, if the JSON is big, or memory is limited, you can use `FileReadStream`. It only read a part of JSON from file into buffer, and then let the part be parsed. If it runs out of characters in the buffer, it will read the next part from file. + +## FileReadStream (Input) {#FileReadStream} + +`FileReadStream` reads the file via a `FILE` pointer. And user need to provide a buffer. + +~~~~~~~~~~cpp +#include "rapidjson/filereadstream.h" +#include + +using namespace rapidjson; + +FILE* fp = fopen("big.json", "rb"); // non-Windows use "r" + +char readBuffer[65536]; +FileReadStream is(fp, readBuffer, sizeof(readBuffer)); + +Document d; +d.ParseStream(is); + +fclose(fp); +~~~~~~~~~~ + +Different from string streams, `FileReadStream` is byte stream. It does not handle encodings. If the file is not UTF-8, the byte stream can be wrapped in a `EncodedInputStream`. We will discuss more about this later in this tutorial. + +Apart from reading file, user can also use `FileReadStream` to read `stdin`. + +## FileWriteStream (Output) {#FileWriteStream} + +`FileWriteStream` is buffered output stream. Its usage is very similar to `FileReadStream`. + +~~~~~~~~~~cpp +#include "rapidjson/filewritestream.h" +#include +#include + +using namespace rapidjson; + +Document d; +d.Parse(json); +// ... + +FILE* fp = fopen("output.json", "wb"); // non-Windows use "w" + +char writeBuffer[65536]; +FileWriteStream os(fp, writeBuffer, sizeof(writeBuffer)); + +Writer writer(os); +d.Accept(writer); + +fclose(fp); +~~~~~~~~~~ + +It can also redirect the output to `stdout`. + +# iostream Wrapper {#iostreamWrapper} + +Due to users' requests, RapidJSON also provides official wrappers for `std::basic_istream` and `std::basic_ostream`. However, please note that the performance will be much lower than the other streams above. + +## IStreamWrapper {#IStreamWrapper} + +`IStreamWrapper` wraps any class derived from `std::istream`, such as `std::istringstream`, `std::stringstream`, `std::ifstream`, `std::fstream`, into RapidJSON's input stream. + +~~~cpp +#include +#include +#include + +using namespace rapidjson; +using namespace std; + +ifstream ifs("test.json"); +IStreamWrapper isw(ifs); + +Document d; +d.ParseStream(isw); +~~~ + +For classes derived from `std::wistream`, use `WIStreamWrapper`. + +## OStreamWrapper {#OStreamWrapper} + +Similarly, `OStreamWrapper` wraps any class derived from `std::ostream`, such as `std::ostringstream`, `std::stringstream`, `std::ofstream`, `std::fstream`, into RapidJSON's input stream. + +~~~cpp +#include +#include +#include +#include + +using namespace rapidjson; +using namespace std; + +Document d; +d.Parse(json); + +// ... + +ofstream ofs("output.json"); +OStreamWrapper osw(ofs); + +Writer writer(osw); +d.Accept(writer); +~~~ + +For classes derived from `std::wostream`, use `WOStreamWrapper`. + +# Encoded Streams {#EncodedStreams} + +Encoded streams do not contain JSON itself, but they wrap byte streams to provide basic encoding/decoding function. + +As mentioned above, UTF-8 byte streams can be read directly. However, UTF-16 and UTF-32 have endian issue. To handle endian correctly, it needs to convert bytes into characters (e.g. `wchar_t` for UTF-16) while reading, and characters into bytes while writing. + +Besides, it also need to handle [byte order mark (BOM)](http://en.wikipedia.org/wiki/Byte_order_mark). When reading from a byte stream, it is needed to detect or just consume the BOM if exists. When writing to a byte stream, it can optionally write BOM. + +If the encoding of stream is known during compile-time, you may use `EncodedInputStream` and `EncodedOutputStream`. If the stream can be UTF-8, UTF-16LE, UTF-16BE, UTF-32LE, UTF-32BE JSON, and it is only known in runtime, you may use `AutoUTFInputStream` and `AutoUTFOutputStream`. These streams are defined in `rapidjson/encodedstream.h`. + +Note that, these encoded streams can be applied to streams other than file. For example, you may have a file in memory, or a custom byte stream, be wrapped in encoded streams. + +## EncodedInputStream {#EncodedInputStream} + +`EncodedInputStream` has two template parameters. The first one is a `Encoding` class, such as `UTF8`, `UTF16LE`, defined in `rapidjson/encodings.h`. The second one is the class of stream to be wrapped. + +~~~~~~~~~~cpp +#include "rapidjson/document.h" +#include "rapidjson/filereadstream.h" // FileReadStream +#include "rapidjson/encodedstream.h" // EncodedInputStream +#include + +using namespace rapidjson; + +FILE* fp = fopen("utf16le.json", "rb"); // non-Windows use "r" + +char readBuffer[256]; +FileReadStream bis(fp, readBuffer, sizeof(readBuffer)); + +EncodedInputStream, FileReadStream> eis(bis); // wraps bis into eis + +Document d; // Document is GenericDocument > +d.ParseStream<0, UTF16LE<> >(eis); // Parses UTF-16LE file into UTF-8 in memory + +fclose(fp); +~~~~~~~~~~ + +## EncodedOutputStream {#EncodedOutputStream} + +`EncodedOutputStream` is similar but it has a `bool putBOM` parameter in the constructor, controlling whether to write BOM into output byte stream. + +~~~~~~~~~~cpp +#include "rapidjson/filewritestream.h" // FileWriteStream +#include "rapidjson/encodedstream.h" // EncodedOutputStream +#include +#include + +Document d; // Document is GenericDocument > +// ... + +FILE* fp = fopen("output_utf32le.json", "wb"); // non-Windows use "w" + +char writeBuffer[256]; +FileWriteStream bos(fp, writeBuffer, sizeof(writeBuffer)); + +typedef EncodedOutputStream, FileWriteStream> OutputStream; +OutputStream eos(bos, true); // Write BOM + +Writer, UTF32LE<>> writer(eos); +d.Accept(writer); // This generates UTF32-LE file from UTF-8 in memory + +fclose(fp); +~~~~~~~~~~ + +## AutoUTFInputStream {#AutoUTFInputStream} + +Sometimes an application may want to handle all supported JSON encoding. `AutoUTFInputStream` will detection encoding by BOM first. If BOM is unavailable, it will use characteristics of valid JSON to make detection. If neither method success, it falls back to the UTF type provided in constructor. + +Since the characters (code units) may be 8-bit, 16-bit or 32-bit. `AutoUTFInputStream` requires a character type which can hold at least 32-bit. We may use `unsigned`, as in the template parameter: + +~~~~~~~~~~cpp +#include "rapidjson/document.h" +#include "rapidjson/filereadstream.h" // FileReadStream +#include "rapidjson/encodedstream.h" // AutoUTFInputStream +#include + +using namespace rapidjson; + +FILE* fp = fopen("any.json", "rb"); // non-Windows use "r" + +char readBuffer[256]; +FileReadStream bis(fp, readBuffer, sizeof(readBuffer)); + +AutoUTFInputStream eis(bis); // wraps bis into eis + +Document d; // Document is GenericDocument > +d.ParseStream<0, AutoUTF >(eis); // This parses any UTF file into UTF-8 in memory + +fclose(fp); +~~~~~~~~~~ + +When specifying the encoding of stream, uses `AutoUTF` as in `ParseStream()` above. + +You can obtain the type of UTF via `UTFType GetType()`. And check whether a BOM is found by `HasBOM()` + +## AutoUTFOutputStream {#AutoUTFOutputStream} + +Similarly, to choose encoding for output during runtime, we can use `AutoUTFOutputStream`. This class is not automatic *per se*. You need to specify the UTF type and whether to write BOM in runtime. + +~~~~~~~~~~cpp +using namespace rapidjson; + +void WriteJSONFile(FILE* fp, UTFType type, bool putBOM, const Document& d) { + char writeBuffer[256]; + FileWriteStream bos(fp, writeBuffer, sizeof(writeBuffer)); + + typedef AutoUTFOutputStream OutputStream; + OutputStream eos(bos, type, putBOM); + + Writer, AutoUTF<> > writer; + d.Accept(writer); +} +~~~~~~~~~~ + +`AutoUTFInputStream` and `AutoUTFOutputStream` is more convenient than `EncodedInputStream` and `EncodedOutputStream`. They just incur a little bit runtime overheads. + +# Custom Stream {#CustomStream} + +In addition to memory/file streams, user can create their own stream classes which fits RapidJSON's API. For example, you may create network stream, stream from compressed file, etc. + +RapidJSON combines different types using templates. A class containing all required interface can be a stream. The Stream interface is defined in comments of `rapidjson/rapidjson.h`: + +~~~~~~~~~~cpp +concept Stream { + typename Ch; //!< Character type of the stream. + + //! Read the current character from stream without moving the read cursor. + Ch Peek() const; + + //! Read the current character from stream and moving the read cursor to next character. + Ch Take(); + + //! Get the current read cursor. + //! \return Number of characters read from start. + size_t Tell(); + + //! Begin writing operation at the current read pointer. + //! \return The begin writer pointer. + Ch* PutBegin(); + + //! Write a character. + void Put(Ch c); + + //! Flush the buffer. + void Flush(); + + //! End the writing operation. + //! \param begin The begin write pointer returned by PutBegin(). + //! \return Number of characters written. + size_t PutEnd(Ch* begin); +} +~~~~~~~~~~ + +For input stream, they must implement `Peek()`, `Take()` and `Tell()`. +For output stream, they must implement `Put()` and `Flush()`. +There are two special interface, `PutBegin()` and `PutEnd()`, which are only for *in situ* parsing. Normal streams do not implement them. However, if the interface is not needed for a particular stream, it is still need to a dummy implementation, otherwise will generate compilation error. + +## Example: istream wrapper {#ExampleIStreamWrapper} + +The following example is a simple wrapper of `std::istream`, which only implements 3 functions. + +~~~~~~~~~~cpp +class MyIStreamWrapper { +public: + typedef char Ch; + + MyIStreamWrapper(std::istream& is) : is_(is) { + } + + Ch Peek() const { // 1 + int c = is_.peek(); + return c == std::char_traits::eof() ? '\0' : (Ch)c; + } + + Ch Take() { // 2 + int c = is_.get(); + return c == std::char_traits::eof() ? '\0' : (Ch)c; + } + + size_t Tell() const { return (size_t)is_.tellg(); } // 3 + + Ch* PutBegin() { assert(false); return 0; } + void Put(Ch) { assert(false); } + void Flush() { assert(false); } + size_t PutEnd(Ch*) { assert(false); return 0; } + +private: + MyIStreamWrapper(const MyIStreamWrapper&); + MyIStreamWrapper& operator=(const MyIStreamWrapper&); + + std::istream& is_; +}; +~~~~~~~~~~ + +User can use it to wrap instances of `std::stringstream`, `std::ifstream`. + +~~~~~~~~~~cpp +const char* json = "[1,2,3,4]"; +std::stringstream ss(json); +MyIStreamWrapper is(ss); + +Document d; +d.ParseStream(is); +~~~~~~~~~~ + +Note that, this implementation may not be as efficient as RapidJSON's memory or file streams, due to internal overheads of the standard library. + +## Example: ostream wrapper {#ExampleOStreamWrapper} + +The following example is a simple wrapper of `std::istream`, which only implements 2 functions. + +~~~~~~~~~~cpp +class MyOStreamWrapper { +public: + typedef char Ch; + + MyOStreamWrapper(std::ostream& os) : os_(os) { + } + + Ch Peek() const { assert(false); return '\0'; } + Ch Take() { assert(false); return '\0'; } + size_t Tell() const { } + + Ch* PutBegin() { assert(false); return 0; } + void Put(Ch c) { os_.put(c); } // 1 + void Flush() { os_.flush(); } // 2 + size_t PutEnd(Ch*) { assert(false); return 0; } + +private: + MyOStreamWrapper(const MyOStreamWrapper&); + MyOStreamWrapper& operator=(const MyOStreamWrapper&); + + std::ostream& os_; +}; +~~~~~~~~~~ + +User can use it to wrap instances of `std::stringstream`, `std::ofstream`. + +~~~~~~~~~~cpp +Document d; +// ... + +std::stringstream ss; +MyOStreamWrapper os(ss); + +Writer writer(os); +d.Accept(writer); +~~~~~~~~~~ + +Note that, this implementation may not be as efficient as RapidJSON's memory or file streams, due to internal overheads of the standard library. + +# Summary {#Summary} + +This section describes stream classes available in RapidJSON. Memory streams are simple. File stream can reduce the memory required during JSON parsing and generation, if the JSON is stored in file system. Encoded streams converts between byte streams and character streams. Finally, user may create custom streams using a simple interface. diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/doc/stream.zh-cn.md b/graphics/asymptote/LspCpp/third_party/rapidjson/doc/stream.zh-cn.md new file mode 100644 index 0000000000..6e379bbd6b --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/doc/stream.zh-cn.md @@ -0,0 +1,429 @@ +# 流 + +在 RapidJSON 中,`rapidjson::Stream` 是用於读写 JSON 的概念(概念是指 C++ 的 concept)。在这里我们先介绍如何使用 RapidJSON 提供的各种流。然后再看看如何自行定义流。 + +[TOC] + +# 内存流 {#MemoryStreams} + +内存流把 JSON 存储在内存之中。 + +## StringStream(输入){#StringStream} + +`StringStream` 是最基本的输入流,它表示一个完整的、只读的、存储于内存的 JSON。它在 `rapidjson/rapidjson.h` 中定义。 + +~~~~~~~~~~cpp +#include "rapidjson/document.h" // 会包含 "rapidjson/rapidjson.h" + +using namespace rapidjson; + +// ... +const char json[] = "[1, 2, 3, 4]"; +StringStream s(json); + +Document d; +d.ParseStream(s); +~~~~~~~~~~ + +由于这是非常常用的用法,RapidJSON 提供 `Document::Parse(const char*)` 去做完全相同的事情: + +~~~~~~~~~~cpp +// ... +const char json[] = "[1, 2, 3, 4]"; +Document d; +d.Parse(json); +~~~~~~~~~~ + +需要注意,`StringStream` 是 `GenericStringStream >` 的 typedef,使用者可用其他编码类去代表流所使用的字符集。 + +## StringBuffer(输出){#StringBuffer} + +`StringBuffer` 是一个简单的输出流。它分配一个内存缓冲区,供写入整个 JSON。可使用 `GetString()` 来获取该缓冲区。 + +~~~~~~~~~~cpp +#include "rapidjson/stringbuffer.h" +#include + +StringBuffer buffer; +Writer writer(buffer); +d.Accept(writer); + +const char* output = buffer.GetString(); +~~~~~~~~~~ + +当缓冲区满溢,它将自动增加容量。缺省容量是 256 个字符(UTF8 是 256 字节,UTF16 是 512 字节等)。使用者能自行提供分配器及初始容量。 + +~~~~~~~~~~cpp +StringBuffer buffer1(0, 1024); // 使用它的分配器,初始大小 = 1024 +StringBuffer buffer2(allocator, 1024); +~~~~~~~~~~ + +如无设置分配器,`StringBuffer` 会自行实例化一个内部分配器。 + +相似地,`StringBuffer` 是 `GenericStringBuffer >` 的 typedef。 + +# 文件流 {#FileStreams} + +当要从文件解析一个 JSON,你可以把整个 JSON 读入内存并使用上述的 `StringStream`。 + +然而,若 JSON 很大,或是内存有限,你可以改用 `FileReadStream`。它只会从文件读取一部分至缓冲区,然后让那部分被解析。若缓冲区的字符都被读完,它会再从文件读取下一部分。 + +## FileReadStream(输入) {#FileReadStream} + +`FileReadStream` 通过 `FILE` 指针读取文件。使用者需要提供一个缓冲区。 + +~~~~~~~~~~cpp +#include "rapidjson/filereadstream.h" +#include + +using namespace rapidjson; + +FILE* fp = fopen("big.json", "rb"); // 非 Windows 平台使用 "r" + +char readBuffer[65536]; +FileReadStream is(fp, readBuffer, sizeof(readBuffer)); + +Document d; +d.ParseStream(is); + +fclose(fp); +~~~~~~~~~~ + +与 `StringStreams` 不一样,`FileReadStream` 是一个字节流。它不处理编码。若文件并非 UTF-8 编码,可以把字节流用 `EncodedInputStream` 包装。我们很快会讨论这个问题。 + +除了读取文件,使用者也可以使用 `FileReadStream` 来读取 `stdin`。 + +## FileWriteStream(输出){#FileWriteStream} + +`FileWriteStream` 是一个含缓冲功能的输出流。它的用法与 `FileReadStream` 非常相似。 + +~~~~~~~~~~cpp +#include "rapidjson/filewritestream.h" +#include +#include + +using namespace rapidjson; + +Document d; +d.Parse(json); +// ... + +FILE* fp = fopen("output.json", "wb"); // 非 Windows 平台使用 "w" + +char writeBuffer[65536]; +FileWriteStream os(fp, writeBuffer, sizeof(writeBuffer)); + +Writer writer(os); +d.Accept(writer); + +fclose(fp); +~~~~~~~~~~ + +它也可以把输出导向 `stdout`。 + +# iostream 包装类 {#iostreamWrapper} + +基于用户的要求,RapidJSON 提供了正式的 `std::basic_istream` 和 `std::basic_ostream` 包装类。然而,请注意其性能会大大低于以上的其他流。 + +## IStreamWrapper {#IStreamWrapper} + +`IStreamWrapper` 把任何继承自 `std::istream` 的类(如 `std::istringstream`、`std::stringstream`、`std::ifstream`、`std::fstream`)包装成 RapidJSON 的输入流。 + +~~~cpp +#include +#include +#include + +using namespace rapidjson; +using namespace std; + +ifstream ifs("test.json"); +IStreamWrapper isw(ifs); + +Document d; +d.ParseStream(isw); +~~~ + +对于继承自 `std::wistream` 的类,则使用 `WIStreamWrapper`。 + +## OStreamWrapper {#OStreamWrapper} + +相似地,`OStreamWrapper` 把任何继承自 `std::ostream` 的类(如 `std::ostringstream`、`std::stringstream`、`std::ofstream`、`std::fstream`)包装成 RapidJSON 的输出流。 + +~~~cpp +#include +#include +#include +#include + +using namespace rapidjson; +using namespace std; + +Document d; +d.Parse(json); + +// ... + +ofstream ofs("output.json"); +OStreamWrapper osw(ofs); + +Writer writer(osw); +d.Accept(writer); +~~~ + +对于继承自 `std::wistream` 的类,则使用 `WIStreamWrapper`。 + +# 编码流 {#EncodedStreams} + +编码流(encoded streams)本身不存储 JSON,它们是通过包装字节流来提供基本的编码/解码功能。 + +如上所述,我们可以直接读入 UTF-8 字节流。然而,UTF-16 及 UTF-32 有字节序(endian)问题。要正确地处理字节序,需要在读取时把字节转换成字符(如对 UTF-16 使用 `wchar_t`),以及在写入时把字符转换为字节。 + +除此以外,我们也需要处理 [字节顺序标记(byte order mark, BOM)](http://en.wikipedia.org/wiki/Byte_order_mark)。当从一个字节流读取时,需要检测 BOM,或者仅仅是把存在的 BOM 消去。当把 JSON 写入字节流时,也可选择写入 BOM。 + +若一个流的编码在编译期已知,你可使用 `EncodedInputStream` 及 `EncodedOutputStream`。若一个流可能存储 UTF-8、UTF-16LE、UTF-16BE、UTF-32LE、UTF-32BE 的 JSON,并且编码只能在运行时得知,你便可以使用 `AutoUTFInputStream` 及 `AutoUTFOutputStream`。这些流定义在 `rapidjson/encodedstream.h`。 + +注意到,这些编码流可以施于文件以外的流。例如,你可以用编码流包装内存中的文件或自定义的字节流。 + +## EncodedInputStream {#EncodedInputStream} + +`EncodedInputStream` 含两个模板参数。第一个是 `Encoding` 类型,例如定义于 `rapidjson/encodings.h` 的 `UTF8`、`UTF16LE`。第二个参数是被包装的流的类型。 + +~~~~~~~~~~cpp +#include "rapidjson/document.h" +#include "rapidjson/filereadstream.h" // FileReadStream +#include "rapidjson/encodedstream.h" // EncodedInputStream +#include + +using namespace rapidjson; + +FILE* fp = fopen("utf16le.json", "rb"); // 非 Windows 平台使用 "r" + +char readBuffer[256]; +FileReadStream bis(fp, readBuffer, sizeof(readBuffer)); + +EncodedInputStream, FileReadStream> eis(bis); // 用 eis 包装 bis + +Document d; // Document 为 GenericDocument > +d.ParseStream<0, UTF16LE<> >(eis); // 把 UTF-16LE 文件解析至内存中的 UTF-8 + +fclose(fp); +~~~~~~~~~~ + +## EncodedOutputStream {#EncodedOutputStream} + +`EncodedOutputStream` 也是相似的,但它的构造函数有一个 `bool putBOM` 参数,用于控制是否在输出字节流写入 BOM。 + +~~~~~~~~~~cpp +#include "rapidjson/filewritestream.h" // FileWriteStream +#include "rapidjson/encodedstream.h" // EncodedOutputStream +#include +#include + +Document d; // Document 为 GenericDocument > +// ... + +FILE* fp = fopen("output_utf32le.json", "wb"); // 非 Windows 平台使用 "w" + +char writeBuffer[256]; +FileWriteStream bos(fp, writeBuffer, sizeof(writeBuffer)); + +typedef EncodedOutputStream, FileWriteStream> OutputStream; +OutputStream eos(bos, true); // 写入 BOM + +Writer, UTF32LE<>> writer(eos); +d.Accept(writer); // 这里从内存的 UTF-8 生成 UTF32-LE 文件 + +fclose(fp); +~~~~~~~~~~ + +## AutoUTFInputStream {#AutoUTFInputStream} + +有时候,应用软件可能需要㲃理所有可支持的 JSON 编码。`AutoUTFInputStream` 会先使用 BOM 来检测编码。若 BOM 不存在,它便会使用合法 JSON 的特性来检测。若两种方法都失败,它就会倒退至构造函数提供的 UTF 类型。 + +由于字符(编码单元/code unit)可能是 8 位、16 位或 32 位,`AutoUTFInputStream` 需要一个能至少储存 32 位的字符类型。我们可以使用 `unsigned` 作为模板参数: + +~~~~~~~~~~cpp +#include "rapidjson/document.h" +#include "rapidjson/filereadstream.h" // FileReadStream +#include "rapidjson/encodedstream.h" // AutoUTFInputStream +#include + +using namespace rapidjson; + +FILE* fp = fopen("any.json", "rb"); // 非 Windows 平台使用 "r" + +char readBuffer[256]; +FileReadStream bis(fp, readBuffer, sizeof(readBuffer)); + +AutoUTFInputStream eis(bis); // 用 eis 包装 bis + +Document d; // Document 为 GenericDocument > +d.ParseStream<0, AutoUTF >(eis); // 把任何 UTF 编码的文件解析至内存中的 UTF-8 + +fclose(fp); +~~~~~~~~~~ + +当要指定流的编码,可使用上面例子中 `ParseStream()` 的参数 `AutoUTF`。 + +你可以使用 `UTFType GetType()` 去获取 UTF 类型,并且用 `HasBOM()` 检测输入流是否含有 BOM。 + +## AutoUTFOutputStream {#AutoUTFOutputStream} + +相似地,要在运行时选择输出的编码,我们可使用 `AutoUTFOutputStream`。这个类本身并非「自动」。你需要在运行时指定 UTF 类型,以及是否写入 BOM。 + +~~~~~~~~~~cpp +using namespace rapidjson; + +void WriteJSONFile(FILE* fp, UTFType type, bool putBOM, const Document& d) { + char writeBuffer[256]; + FileWriteStream bos(fp, writeBuffer, sizeof(writeBuffer)); + + typedef AutoUTFOutputStream OutputStream; + OutputStream eos(bos, type, putBOM); + + Writer, AutoUTF<> > writer; + d.Accept(writer); +} +~~~~~~~~~~ + +`AutoUTFInputStream`/`AutoUTFOutputStream` 是比 `EncodedInputStream`/`EncodedOutputStream` 方便。但前者会产生一点运行期额外开销。 + +# 自定义流 {#CustomStream} + +除了内存/文件流,使用者可创建自行定义适配 RapidJSON API 的流类。例如,你可以创建网络流、从压缩文件读取的流等等。 + +RapidJSON 利用模板结合不同的类型。只要一个类包含所有所需的接口,就可以作为一个流。流的接合定义在 `rapidjson/rapidjson.h` 的注释里: + +~~~~~~~~~~cpp +concept Stream { + typename Ch; //!< 流的字符类型 + + //! 从流读取当前字符,不移动读取指针(read cursor) + Ch Peek() const; + + //! 从流读取当前字符,移动读取指针至下一字符。 + Ch Take(); + + //! 获取读取指针。 + //! \return 从开始以来所读过的字符数量。 + size_t Tell(); + + //! 从当前读取指针开始写入操作。 + //! \return 返回开始写入的指针。 + Ch* PutBegin(); + + //! 写入一个字符。 + void Put(Ch c); + + //! 清空缓冲区。 + void Flush(); + + //! 完成写作操作。 + //! \param begin PutBegin() 返回的开始写入指针。 + //! \return 已写入的字符数量。 + size_t PutEnd(Ch* begin); +} +~~~~~~~~~~ + +输入流必须实现 `Peek()`、`Take()` 及 `Tell()`。 +输出流必须实现 `Put()` 及 `Flush()`。 +`PutBegin()` 及 `PutEnd()` 是特殊的接口,仅用于原位(*in situ*)解析。一般的流不需实现它们。然而,即使接口不需用于某些流,仍然需要提供空实现,否则会产生编译错误。 + +## 例子:istream 的包装类 {#ExampleIStreamWrapper} + +以下的简单例子是 `std::istream` 的包装类,它只需现 3 个函数。 + +~~~~~~~~~~cpp +class MyIStreamWrapper { +public: + typedef char Ch; + + MyIStreamWrapper(std::istream& is) : is_(is) { + } + + Ch Peek() const { // 1 + int c = is_.peek(); + return c == std::char_traits::eof() ? '\0' : (Ch)c; + } + + Ch Take() { // 2 + int c = is_.get(); + return c == std::char_traits::eof() ? '\0' : (Ch)c; + } + + size_t Tell() const { return (size_t)is_.tellg(); } // 3 + + Ch* PutBegin() { assert(false); return 0; } + void Put(Ch) { assert(false); } + void Flush() { assert(false); } + size_t PutEnd(Ch*) { assert(false); return 0; } + +private: + MyIStreamWrapper(const MyIStreamWrapper&); + MyIStreamWrapper& operator=(const MyIStreamWrapper&); + + std::istream& is_; +}; +~~~~~~~~~~ + +使用者能用它来包装 `std::stringstream`、`std::ifstream` 的实例。 + +~~~~~~~~~~cpp +const char* json = "[1,2,3,4]"; +std::stringstream ss(json); +MyIStreamWrapper is(ss); + +Document d; +d.ParseStream(is); +~~~~~~~~~~ + +但要注意,由于标准库的内部开销问,此实现的性能可能不如 RapidJSON 的内存/文件流。 + +## 例子:ostream 的包装类 {#ExampleOStreamWrapper} + +以下的例子是 `std::istream` 的包装类,它只需实现 2 个函数。 + +~~~~~~~~~~cpp +class MyOStreamWrapper { +public: + typedef char Ch; + + OStreamWrapper(std::ostream& os) : os_(os) { + } + + Ch Peek() const { assert(false); return '\0'; } + Ch Take() { assert(false); return '\0'; } + size_t Tell() const { } + + Ch* PutBegin() { assert(false); return 0; } + void Put(Ch c) { os_.put(c); } // 1 + void Flush() { os_.flush(); } // 2 + size_t PutEnd(Ch*) { assert(false); return 0; } + +private: + MyOStreamWrapper(const MyOStreamWrapper&); + MyOStreamWrapper& operator=(const MyOStreamWrapper&); + + std::ostream& os_; +}; +~~~~~~~~~~ + +使用者能用它来包装 `std::stringstream`、`std::ofstream` 的实例。 + +~~~~~~~~~~cpp +Document d; +// ... + +std::stringstream ss; +MyOStreamWrapper os(ss); + +Writer writer(os); +d.Accept(writer); +~~~~~~~~~~ + +但要注意,由于标准库的内部开销问,此实现的性能可能不如 RapidJSON 的内存/文件流。 + +# 总结 {#Summary} + +本节描述了 RapidJSON 提供的各种流的类。内存流很简单。若 JSON 存储在文件中,文件流可减少 JSON 解析及生成所需的内存量。编码流在字节流和字符流之间作转换。最后,使用者可使用一个简单接口创建自定义的流。 diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/doc/tutorial.md b/graphics/asymptote/LspCpp/third_party/rapidjson/doc/tutorial.md new file mode 100644 index 0000000000..a86aafdfc0 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/doc/tutorial.md @@ -0,0 +1,536 @@ +# Tutorial + +This tutorial introduces the basics of the Document Object Model(DOM) API. + +As shown in [Usage at a glance](@ref index), JSON can be parsed into a DOM, and then the DOM can be queried and modified easily, and finally be converted back to JSON. + +[TOC] + +# Value & Document {#ValueDocument} + +Each JSON value is stored in a type called `Value`. A `Document`, representing the DOM, contains the root `Value` of the DOM tree. All public types and functions of RapidJSON are defined in the `rapidjson` namespace. + +# Query Value {#QueryValue} + +In this section, we will use excerpt from `example/tutorial/tutorial.cpp`. + +Assume we have the following JSON stored in a C string (`const char* json`): +~~~~~~~~~~js +{ + "hello": "world", + "t": true , + "f": false, + "n": null, + "i": 123, + "pi": 3.1416, + "a": [1, 2, 3, 4] +} +~~~~~~~~~~ + +Parse it into a `Document`: +~~~~~~~~~~cpp +#include "rapidjson/document.h" + +using namespace rapidjson; + +// ... +Document document; +document.Parse(json); +~~~~~~~~~~ + +The JSON is now parsed into `document` as a *DOM tree*: + +![DOM in the tutorial](diagram/tutorial.png) + +Since the update to RFC 7159, the root of a conforming JSON document can be any JSON value. In earlier RFC 4627, only objects or arrays were allowed as root values. In this case, the root is an object. +~~~~~~~~~~cpp +assert(document.IsObject()); +~~~~~~~~~~ + +Let's query whether a `"hello"` member exists in the root object. Since a `Value` can contain different types of value, we may need to verify its type and use suitable API to obtain the value. In this example, `"hello"` member associates with a JSON string. +~~~~~~~~~~cpp +assert(document.HasMember("hello")); +assert(document["hello"].IsString()); +printf("hello = %s\n", document["hello"].GetString()); +~~~~~~~~~~ + +~~~~~~~~~~ +hello = world +~~~~~~~~~~ + +JSON true/false values are represented as `bool`. +~~~~~~~~~~cpp +assert(document["t"].IsBool()); +printf("t = %s\n", document["t"].GetBool() ? "true" : "false"); +~~~~~~~~~~ + +~~~~~~~~~~ +t = true +~~~~~~~~~~ + +JSON null can be queried with `IsNull()`. +~~~~~~~~~~cpp +printf("n = %s\n", document["n"].IsNull() ? "null" : "?"); +~~~~~~~~~~ + +~~~~~~~~~~ +n = null +~~~~~~~~~~ + +JSON number type represents all numeric values. However, C++ needs more specific type for manipulation. + +~~~~~~~~~~cpp +assert(document["i"].IsNumber()); + +// In this case, IsUint()/IsInt64()/IsUint64() also return true. +assert(document["i"].IsInt()); +printf("i = %d\n", document["i"].GetInt()); +// Alternatively (int)document["i"] + +assert(document["pi"].IsNumber()); +assert(document["pi"].IsDouble()); +printf("pi = %g\n", document["pi"].GetDouble()); +~~~~~~~~~~ + +~~~~~~~~~~ +i = 123 +pi = 3.1416 +~~~~~~~~~~ + +JSON array contains a number of elements. +~~~~~~~~~~cpp +// Using a reference for consecutive access is handy and faster. +const Value& a = document["a"]; +assert(a.IsArray()); +for (SizeType i = 0; i < a.Size(); i++) // Uses SizeType instead of size_t + printf("a[%d] = %d\n", i, a[i].GetInt()); +~~~~~~~~~~ + +~~~~~~~~~~ +a[0] = 1 +a[1] = 2 +a[2] = 3 +a[3] = 4 +~~~~~~~~~~ + +Note that, RapidJSON does not automatically convert values between JSON types. For example, if a value is a string, it is invalid to call `GetInt()`. In debug mode it will fail on assertion. In release mode, the behavior is undefined. + +In the following sections we discuss details about querying individual types. + +## Query Array {#QueryArray} + +By default, `SizeType` is typedef of `unsigned`. In most systems, an array is limited to store up to 2^32-1 elements. + +You may access the elements in an array by integer literal, for example, `a[0]`, `a[1]`, `a[2]`. + +Array is similar to `std::vector`: instead of using indices, you may also use iterator to access all the elements. +~~~~~~~~~~cpp +for (Value::ConstValueIterator itr = a.Begin(); itr != a.End(); ++itr) + printf("%d ", itr->GetInt()); +~~~~~~~~~~ + +And other familiar query functions: +* `SizeType Capacity() const` +* `bool Empty() const` + +### Range-based For Loop (New in v1.1.0) + +When C++11 is enabled, you can use range-based for loop to access all elements in an array. + +~~~~~~~~~~cpp +for (auto& v : a.GetArray()) + printf("%d ", v.GetInt()); +~~~~~~~~~~ + +## Query Object {#QueryObject} + +Similar to Array, we can access all object members by iterator: + +~~~~~~~~~~cpp +static const char* kTypeNames[] = + { "Null", "False", "True", "Object", "Array", "String", "Number" }; + +for (Value::ConstMemberIterator itr = document.MemberBegin(); + itr != document.MemberEnd(); ++itr) +{ + printf("Type of member %s is %s\n", + itr->name.GetString(), kTypeNames[itr->value.GetType()]); +} +~~~~~~~~~~ + +~~~~~~~~~~ +Type of member hello is String +Type of member t is True +Type of member f is False +Type of member n is Null +Type of member i is Number +Type of member pi is Number +Type of member a is Array +~~~~~~~~~~ + +Note that, when `operator[](const char*)` cannot find the member, it will fail on assertion. + +If we are unsure whether a member exists, we need to call `HasMember()` before calling `operator[](const char*)`. However, this incurs two lookup. A better way is to call `FindMember()`, which can check the existence of a member and obtain its value at once: + +~~~~~~~~~~cpp +Value::ConstMemberIterator itr = document.FindMember("hello"); +if (itr != document.MemberEnd()) + printf("%s\n", itr->value.GetString()); +~~~~~~~~~~ + +### Range-based For Loop (New in v1.1.0) + +When C++11 is enabled, you can use range-based for loop to access all members in an object. + +~~~~~~~~~~cpp +for (auto& m : document.GetObject()) + printf("Type of member %s is %s\n", + m.name.GetString(), kTypeNames[m.value.GetType()]); +~~~~~~~~~~ + +## Querying Number {#QueryNumber} + +JSON provides a single numerical type called Number. Number can be an integer or a real number. RFC 4627 says the range of Number is specified by the parser implementation. + +As C++ provides several integer and floating point number types, the DOM tries to handle these with the widest possible range and good performance. + +When a Number is parsed, it is stored in the DOM as one of the following types: + +Type | Description +-----------|--------------------------------------- +`unsigned` | 32-bit unsigned integer +`int` | 32-bit signed integer +`uint64_t` | 64-bit unsigned integer +`int64_t` | 64-bit signed integer +`double` | 64-bit double precision floating point + +When querying a number, you can check whether the number can be obtained as the target type: + +Checking | Obtaining +------------------|--------------------- +`bool IsNumber()` | N/A +`bool IsUint()` | `unsigned GetUint()` +`bool IsInt()` | `int GetInt()` +`bool IsUint64()` | `uint64_t GetUint64()` +`bool IsInt64()` | `int64_t GetInt64()` +`bool IsDouble()` | `double GetDouble()` + +Note that, an integer value may be obtained in various ways without conversion. For example, A value `x` containing 123 will make `x.IsInt() == x.IsUint() == x.IsInt64() == x.IsUint64() == true`. But a value `y` containing -3000000000 will only make `x.IsInt64() == true`. + +When obtaining the numeric values, `GetDouble()` will convert internal integer representation to a `double`. Note that, `int` and `unsigned` can be safely converted to `double`, but `int64_t` and `uint64_t` may lose precision (since mantissa of `double` is only 52-bits). + +## Query String {#QueryString} + +In addition to `GetString()`, the `Value` class also contains `GetStringLength()`. Here explains why: + +According to RFC 4627, JSON strings can contain Unicode character `U+0000`, which must be escaped as `"\u0000"`. The problem is that, C/C++ often uses null-terminated string, which treats `\0` as the terminator symbol. + +To conform with RFC 4627, RapidJSON supports string containing `U+0000` character. If you need to handle this, you can use `GetStringLength()` to obtain the correct string length. + +For example, after parsing the following JSON to `Document d`: + +~~~~~~~~~~js +{ "s" : "a\u0000b" } +~~~~~~~~~~ +The correct length of the string `"a\u0000b"` is 3, as returned by `GetStringLength()`. But `strlen()` returns 1. + +`GetStringLength()` can also improve performance, as user may often need to call `strlen()` for allocating buffer. + +Besides, `std::string` also support a constructor: + +~~~~~~~~~~cpp +string(const char* s, size_t count); +~~~~~~~~~~ + +which accepts the length of string as parameter. This constructor supports storing null character within the string, and should also provide better performance. + +## Comparing values + +You can use `==` and `!=` to compare values. Two values are equal if and only if they have same type and contents. You can also compare values with primitive types. Here is an example: + +~~~~~~~~~~cpp +if (document["hello"] == document["n"]) /*...*/; // Compare values +if (document["hello"] == "world") /*...*/; // Compare value with literal string +if (document["i"] != 123) /*...*/; // Compare with integers +if (document["pi"] != 3.14) /*...*/; // Compare with double. +~~~~~~~~~~ + +Array/object compares their elements/members in order. They are equal if and only if their whole subtrees are equal. + +Note that, currently if an object contains duplicated named member, comparing equality with any object is always `false`. + +# Create/Modify Values {#CreateModifyValues} + +There are several ways to create values. After a DOM tree is created and/or modified, it can be saved as JSON again using `Writer`. + +## Change Value Type {#ChangeValueType} +When creating a `Value` or `Document` by default constructor, its type is Null. To change its type, call `SetXXX()` or assignment operator, for example: + +~~~~~~~~~~cpp +Document d; // Null +d.SetObject(); + +Value v; // Null +v.SetInt(10); +v = 10; // Shortcut, same as above +~~~~~~~~~~ + +### Overloaded Constructors +There are also overloaded constructors for several types: + +~~~~~~~~~~cpp +Value b(true); // calls Value(bool) +Value i(-123); // calls Value(int) +Value u(123u); // calls Value(unsigned) +Value d(1.5); // calls Value(double) +~~~~~~~~~~ + +To create empty object or array, you may use `SetObject()`/`SetArray()` after default constructor, or using the `Value(Type)` in one call: + +~~~~~~~~~~cpp +Value o(kObjectType); +Value a(kArrayType); +~~~~~~~~~~ + +## Move Semantics {#MoveSemantics} + +A very special decision during design of RapidJSON is that, assignment of value does not copy the source value to destination value. Instead, the value from source is moved to the destination. For example, + +~~~~~~~~~~cpp +Value a(123); +Value b(456); +a = b; // b becomes a Null value, a becomes number 456. +~~~~~~~~~~ + +![Assignment with move semantics.](diagram/move1.png) + +Why? What is the advantage of this semantics? + +The simple answer is performance. For fixed size JSON types (Number, True, False, Null), copying them is fast and easy. However, For variable size JSON types (String, Array, Object), copying them will incur a lot of overheads. And these overheads are often unnoticed. Especially when we need to create temporary object, copy it to another variable, and then destruct it. + +For example, if normal *copy* semantics was used: + +~~~~~~~~~~cpp +Document d; +Value o(kObjectType); +{ + Value contacts(kArrayType); + // adding elements to contacts array. + // ... + o.AddMember("contacts", contacts, d.GetAllocator()); // deep clone contacts (may be with lots of allocations) + // destruct contacts. +} +~~~~~~~~~~ + +![Copy semantics makes a lots of copy operations.](diagram/move2.png) + +The object `o` needs to allocate a buffer of same size as contacts, makes a deep clone of it, and then finally contacts is destructed. This will incur a lot of unnecessary allocations/deallocations and memory copying. + +There are solutions to prevent actual copying these data, such as reference counting and garbage collection(GC). + +To make RapidJSON simple and fast, we chose to use *move* semantics for assignment. It is similar to `std::auto_ptr` which transfer ownership during assignment. Move is much faster and simpler, it just destructs the original value, `memcpy()` the source to destination, and finally sets the source as Null type. + +So, with move semantics, the above example becomes: + +~~~~~~~~~~cpp +Document d; +Value o(kObjectType); +{ + Value contacts(kArrayType); + // adding elements to contacts array. + o.AddMember("contacts", contacts, d.GetAllocator()); // just memcpy() of contacts itself to the value of new member (16 bytes) + // contacts became Null here. Its destruction is trivial. +} +~~~~~~~~~~ + +![Move semantics makes no copying.](diagram/move3.png) + +This is called move assignment operator in C++11. As RapidJSON supports C++03, it adopts move semantics using assignment operator, and all other modifying function like `AddMember()`, `PushBack()`. + +### Move semantics and temporary values {#TemporaryValues} + +Sometimes, it is convenient to construct a Value in place, before passing it to one of the "moving" functions, like `PushBack()` or `AddMember()`. As temporary objects can't be converted to proper Value references, the convenience function `Move()` is available: + +~~~~~~~~~~cpp +Value a(kArrayType); +Document::AllocatorType& allocator = document.GetAllocator(); +// a.PushBack(Value(42), allocator); // will not compile +a.PushBack(Value().SetInt(42), allocator); // fluent API +a.PushBack(Value(42).Move(), allocator); // same as above +~~~~~~~~~~ + +## Create String {#CreateString} +RapidJSON provides two strategies for storing string. + +1. copy-string: allocates a buffer, and then copy the source data into it. +2. const-string: simply store a pointer of string. + +Copy-string is always safe because it owns a copy of the data. Const-string can be used for storing a string literal, and for in-situ parsing which will be mentioned in the DOM section. + +To make memory allocation customizable, RapidJSON requires users to pass an instance of allocator, whenever an operation may require allocation. This design is needed to prevent storing an allocator (or Document) pointer per Value. + +Therefore, when we assign a copy-string, we call this overloaded `SetString()` with allocator: + +~~~~~~~~~~cpp +Document document; +Value author; +char buffer[10]; +int len = sprintf(buffer, "%s %s", "Milo", "Yip"); // dynamically created string. +author.SetString(buffer, len, document.GetAllocator()); +memset(buffer, 0, sizeof(buffer)); +// author.GetString() still contains "Milo Yip" after buffer is destroyed +~~~~~~~~~~ + +In this example, we get the allocator from a `Document` instance. This is a common idiom when using RapidJSON. But you may use other instances of allocator. + +Besides, the above `SetString()` requires length. This can handle null characters within a string. There is another `SetString()` overloaded function without the length parameter. And it assumes the input is null-terminated and calls a `strlen()`-like function to obtain the length. + +Finally, for a string literal or string with a safe life-cycle one can use the const-string version of `SetString()`, which lacks an allocator parameter. For string literals (or constant character arrays), simply passing the literal as parameter is safe and efficient: + +~~~~~~~~~~cpp +Value s; +s.SetString("rapidjson"); // can contain null character, length derived at compile time +s = "rapidjson"; // shortcut, same as above +~~~~~~~~~~ + +For a character pointer, RapidJSON requires it to be marked as safe before using it without copying. This can be achieved by using the `StringRef` function: + +~~~~~~~~~cpp +const char * cstr = getenv("USER"); +size_t cstr_len = ...; // in case length is available +Value s; +// s.SetString(cstr); // will not compile +s.SetString(StringRef(cstr)); // ok, assume safe lifetime, null-terminated +s = StringRef(cstr); // shortcut, same as above +s.SetString(StringRef(cstr,cstr_len)); // faster, can contain null character +s = StringRef(cstr,cstr_len); // shortcut, same as above + +~~~~~~~~~ + +## Modify Array {#ModifyArray} +Value with array type provides an API similar to `std::vector`. + +* `Clear()` +* `Reserve(SizeType, Allocator&)` +* `Value& PushBack(Value&, Allocator&)` +* `template GenericValue& PushBack(T, Allocator&)` +* `Value& PopBack()` +* `ValueIterator Erase(ConstValueIterator pos)` +* `ValueIterator Erase(ConstValueIterator first, ConstValueIterator last)` + +Note that, `Reserve(...)` and `PushBack(...)` may allocate memory for the array elements, therefore requiring an allocator. + +Here is an example of `PushBack()`: + +~~~~~~~~~~cpp +Value a(kArrayType); +Document::AllocatorType& allocator = document.GetAllocator(); + +for (int i = 5; i <= 10; i++) + a.PushBack(i, allocator); // allocator is needed for potential realloc(). + +// Fluent interface +a.PushBack("Lua", allocator).PushBack("Mio", allocator); +~~~~~~~~~~ + +This API differs from STL in that `PushBack()`/`PopBack()` return the array reference itself. This is called _fluent interface_. + +If you want to add a non-constant string or a string without sufficient lifetime (see [Create String](#CreateString)) to the array, you need to create a string Value by using the copy-string API. To avoid the need for an intermediate variable, you can use a [temporary value](#TemporaryValues) in place: + +~~~~~~~~~~cpp +// in-place Value parameter +contact.PushBack(Value("copy", document.GetAllocator()).Move(), // copy string + document.GetAllocator()); + +// explicit parameters +Value val("key", document.GetAllocator()); // copy string +contact.PushBack(val, document.GetAllocator()); +~~~~~~~~~~ + +## Modify Object {#ModifyObject} +The Object class is a collection of key-value pairs (members). Each key must be a string value. To modify an object, either add or remove members. The following API is for adding members: + +* `Value& AddMember(Value&, Value&, Allocator& allocator)` +* `Value& AddMember(StringRefType, Value&, Allocator&)` +* `template Value& AddMember(StringRefType, T value, Allocator&)` + +Here is an example. + +~~~~~~~~~~cpp +Value contact(kObject); +contact.AddMember("name", "Milo", document.GetAllocator()); +contact.AddMember("married", true, document.GetAllocator()); +~~~~~~~~~~ + +The name parameter with `StringRefType` is similar to the interface of the `SetString` function for string values. These overloads are used to avoid the need for copying the `name` string, since constant key names are very common in JSON objects. + +If you need to create a name from a non-constant string or a string without sufficient lifetime (see [Create String](#CreateString)), you need to create a string Value by using the copy-string API. To avoid the need for an intermediate variable, you can use a [temporary value](#TemporaryValues) in place: + +~~~~~~~~~~cpp +// in-place Value parameter +contact.AddMember(Value("copy", document.GetAllocator()).Move(), // copy string + Value().Move(), // null value + document.GetAllocator()); + +// explicit parameters +Value key("key", document.GetAllocator()); // copy string name +Value val(42); // some value +contact.AddMember(key, val, document.GetAllocator()); +~~~~~~~~~~ + +For removing members, there are several choices: + +* `bool RemoveMember(const Ch* name)`: Remove a member by search its name (linear time complexity). +* `bool RemoveMember(const Value& name)`: same as above but `name` is a Value. +* `MemberIterator RemoveMember(MemberIterator)`: Remove a member by iterator (_constant_ time complexity). +* `MemberIterator EraseMember(MemberIterator)`: similar to the above but it preserves order of members (linear time complexity). +* `MemberIterator EraseMember(MemberIterator first, MemberIterator last)`: remove a range of members, preserves order (linear time complexity). + +`MemberIterator RemoveMember(MemberIterator)` uses a "move-last" trick to achieve constant time complexity. Basically the member at iterator is destructed, and then the last element is moved to that position. So the order of the remaining members are changed. + +## Deep Copy Value {#DeepCopyValue} +If we really need to copy a DOM tree, we can use two APIs for deep copy: constructor with allocator, and `CopyFrom()`. + +~~~~~~~~~~cpp +Document d; +Document::AllocatorType& a = d.GetAllocator(); +Value v1("foo"); +// Value v2(v1); // not allowed + +Value v2(v1, a); // make a copy +assert(v1.IsString()); // v1 untouched +d.SetArray().PushBack(v1, a).PushBack(v2, a); +assert(v1.IsNull() && v2.IsNull()); // both moved to d + +v2.CopyFrom(d, a); // copy whole document to v2 +assert(d.IsArray() && d.Size() == 2); // d untouched +v1.SetObject().AddMember("array", v2, a); +d.PushBack(v1, a); +~~~~~~~~~~ + +## Swap Values {#SwapValues} + +`Swap()` is also provided. + +~~~~~~~~~~cpp +Value a(123); +Value b("Hello"); +a.Swap(b); +assert(a.IsString()); +assert(b.IsInt()); +~~~~~~~~~~ + +Swapping two DOM trees is fast (constant time), despite the complexity of the trees. + +# What's next {#WhatsNext} + +This tutorial shows the basics of DOM tree query and manipulation. There are several important concepts in RapidJSON: + +1. [Streams](doc/stream.md) are channels for reading/writing JSON, which can be a in-memory string, or file stream, etc. User can also create their streams. +2. [Encoding](doc/encoding.md) defines which character encoding is used in streams and memory. RapidJSON also provide Unicode conversion/validation internally. +3. [DOM](doc/dom.md)'s basics are already covered in this tutorial. Uncover more advanced features such as *in situ* parsing, other parsing options and advanced usages. +4. [SAX](doc/sax.md) is the foundation of parsing/generating facility in RapidJSON. Learn how to use `Reader`/`Writer` to implement even faster applications. Also try `PrettyWriter` to format the JSON. +5. [Performance](doc/performance.md) shows some in-house and third-party benchmarks. +6. [Internals](doc/internals.md) describes some internal designs and techniques of RapidJSON. + +You may also refer to the [FAQ](doc/faq.md), API documentation, examples and unit tests. diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/doc/tutorial.zh-cn.md b/graphics/asymptote/LspCpp/third_party/rapidjson/doc/tutorial.zh-cn.md new file mode 100644 index 0000000000..8b24ff11f6 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/doc/tutorial.zh-cn.md @@ -0,0 +1,535 @@ +# 教程 + +本教程简介文件对象模型(Document Object Model, DOM)API。 + +如 [用法一览](../readme.zh-cn.md#用法一览) 中所示,可以解析一个 JSON 至 DOM,然后就可以轻松查询及修改 DOM,并最终转换回 JSON。 + +[TOC] + +# Value 及 Document {#ValueDocument} + +每个 JSON 值都储存为 `Value` 类,而 `Document` 类则表示整个 DOM,它存储了一个 DOM 树的根 `Value`。RapidJSON 的所有公开类型及函数都在 `rapidjson` 命名空间中。 + +# 查询 Value {#QueryValue} + +在本节中,我们会使用到 `example/tutorial/tutorial.cpp` 中的代码片段。 + +假设我们用 C 语言的字符串储存一个 JSON(`const char* json`): +~~~~~~~~~~js +{ + "hello": "world", + "t": true , + "f": false, + "n": null, + "i": 123, + "pi": 3.1416, + "a": [1, 2, 3, 4] +} +~~~~~~~~~~ + +把它解析至一个 `Document`: +~~~~~~~~~~cpp +#include "rapidjson/document.h" + +using namespace rapidjson; + +// ... +Document document; +document.Parse(json); +~~~~~~~~~~ + +那么现在该 JSON 就会被解析至 `document` 中,成为一棵 *DOM 树 *: + +![教程中的 DOM](diagram/tutorial.png) + +自从 RFC 7159 作出更新,合法 JSON 文件的根可以是任何类型的 JSON 值。而在较早的 RFC 4627 中,根值只允许是 Object 或 Array。而在上述例子中,根是一个 Object。 +~~~~~~~~~~cpp +assert(document.IsObject()); +~~~~~~~~~~ + +让我们查询一下根 Object 中有没有 `"hello"` 成员。由于一个 `Value` 可包含不同类型的值,我们可能需要验证它的类型,并使用合适的 API 去获取其值。在此例中,`"hello"` 成员关联到一个 JSON String。 +~~~~~~~~~~cpp +assert(document.HasMember("hello")); +assert(document["hello"].IsString()); +printf("hello = %s\n", document["hello"].GetString()); +~~~~~~~~~~ + +~~~~~~~~~~ +world +~~~~~~~~~~ + +JSON True/False 值是以 `bool` 表示的。 +~~~~~~~~~~cpp +assert(document["t"].IsBool()); +printf("t = %s\n", document["t"].GetBool() ? "true" : "false"); +~~~~~~~~~~ + +~~~~~~~~~~ +true +~~~~~~~~~~ + +JSON Null 值可用 `IsNull()` 查询。 +~~~~~~~~~~cpp +printf("n = %s\n", document["n"].IsNull() ? "null" : "?"); +~~~~~~~~~~ + +~~~~~~~~~~ +null +~~~~~~~~~~ + +JSON Number 类型表示所有数值。然而,C++ 需要使用更专门的类型。 + +~~~~~~~~~~cpp +assert(document["i"].IsNumber()); + +// 在此情况下,IsUint()/IsInt64()/IsUint64() 也会返回 true +assert(document["i"].IsInt()); +printf("i = %d\n", document["i"].GetInt()); +// 另一种用法: (int)document["i"] + +assert(document["pi"].IsNumber()); +assert(document["pi"].IsDouble()); +printf("pi = %g\n", document["pi"].GetDouble()); +~~~~~~~~~~ + +~~~~~~~~~~ +i = 123 +pi = 3.1416 +~~~~~~~~~~ + +JSON Array 包含一些元素。 +~~~~~~~~~~cpp +// 使用引用来连续访问,方便之余还更高效。 +const Value& a = document["a"]; +assert(a.IsArray()); +for (SizeType i = 0; i < a.Size(); i++) // 使用 SizeType 而不是 size_t + printf("a[%d] = %d\n", i, a[i].GetInt()); +~~~~~~~~~~ + +~~~~~~~~~~ +a[0] = 1 +a[1] = 2 +a[2] = 3 +a[3] = 4 +~~~~~~~~~~ + +注意,RapidJSON 并不自动转换各种 JSON 类型。例如,对一个 String 的 Value 调用 `GetInt()` 是非法的。在调试模式下,它会被断言失败。在发布模式下,其行为是未定义的。 + +以下将会讨论有关查询各类型的细节。 + +## 查询 Array {#QueryArray} + +缺省情况下,`SizeType` 是 `unsigned` 的 typedef。在多数系统中,Array 最多能存储 2^32-1 个元素。 + +你可以用整数字面量访问元素,如 `a[0]`、`a[1]`、`a[2]`。 + +Array 与 `std::vector` 相似,除了使用索引,也可使用迭代器来访问所有元素。 +~~~~~~~~~~cpp +for (Value::ConstValueIterator itr = a.Begin(); itr != a.End(); ++itr) + printf("%d ", itr->GetInt()); +~~~~~~~~~~ + +还有一些熟悉的查询函数: +* `SizeType Capacity() const` +* `bool Empty() const` + +### 范围 for 循环 (v1.1.0 中的新功能) + +当使用 C++11 功能时,你可使用范围 for 循环去访问 Array 内的所有元素。 + +~~~~~~~~~~cpp +for (auto& v : a.GetArray()) + printf("%d ", v.GetInt()); +~~~~~~~~~~ + +## 查询 Object {#QueryObject} + +和 Array 相似,我们可以用迭代器去访问所有 Object 成员: + +~~~~~~~~~~cpp +static const char* kTypeNames[] = + { "Null", "False", "True", "Object", "Array", "String", "Number" }; + +for (Value::ConstMemberIterator itr = document.MemberBegin(); + itr != document.MemberEnd(); ++itr) +{ + printf("Type of member %s is %s\n", + itr->name.GetString(), kTypeNames[itr->value.GetType()]); +} +~~~~~~~~~~ + +~~~~~~~~~~ +Type of member hello is String +Type of member t is True +Type of member f is False +Type of member n is Null +Type of member i is Number +Type of member pi is Number +Type of member a is Array +~~~~~~~~~~ + +注意,当 `operator[](const char*)` 找不到成员,它会断言失败。 + +若我们不确定一个成员是否存在,便需要在调用 `operator[](const char*)` 前先调用 `HasMember()`。然而,这会导致两次查找。更好的做法是调用 `FindMember()`,它能同时检查成员是否存在并返回它的 Value: + +~~~~~~~~~~cpp +Value::ConstMemberIterator itr = document.FindMember("hello"); +if (itr != document.MemberEnd()) + printf("%s\n", itr->value.GetString()); +~~~~~~~~~~ + +### 范围 for 循环 (v1.1.0 中的新功能) + +当使用 C++11 功能时,你可使用范围 for 循环去访问 Object 内的所有成员。 + +~~~~~~~~~~cpp +for (auto& m : document.GetObject()) + printf("Type of member %s is %s\n", + m.name.GetString(), kTypeNames[m.value.GetType()]); +~~~~~~~~~~ + +## 查询 Number {#QueryNumber} + +JSON 只提供一种数值类型──Number。数字可以是整数或实数。RFC 4627 规定数字的范围由解析器指定。 + +由于 C++ 提供多种整数及浮点数类型,DOM 尝试尽量提供最广的范围及良好性能。 + +当解析一个 Number 时, 它会被存储在 DOM 之中,成为下列其中一个类型: + +类型 | 描述 +-----------|--------------------------------------- +`unsigned` | 32 位无号整数 +`int` | 32 位有号整数 +`uint64_t` | 64 位无号整数 +`int64_t` | 64 位有号整数 +`double` | 64 位双精度浮点数 + +当查询一个 Number 时, 你可以检查该数字是否能以目标类型来提取: + +查检 | 提取 +------------------|--------------------- +`bool IsNumber()` | 不适用 +`bool IsUint()` | `unsigned GetUint()` +`bool IsInt()` | `int GetInt()` +`bool IsUint64()` | `uint64_t GetUint64()` +`bool IsInt64()` | `int64_t GetInt64()` +`bool IsDouble()` | `double GetDouble()` + +注意,一个整数可能用几种类型来提取,而无需转换。例如,一个名为 `x` 的 Value 包含 123,那么 `x.IsInt() == x.IsUint() == x.IsInt64() == x.IsUint64() == true`。但如果一个名为 `y` 的 Value 包含 -3000000000,那么仅会令 `x.IsInt64() == true`。 + +当要提取 Number 类型,`GetDouble()` 是会把内部整数的表示转换成 `double`。注意 `int` 和 `unsigned` 可以安全地转换至 `double`,但 `int64_t` 及 `uint64_t` 可能会丧失精度(因为 `double` 的尾数只有 52 位)。 + +## 查询 String {#QueryString} + +除了 `GetString()`,`Value` 类也有一个 `GetStringLength()`。这里会解释个中原因。 + +根据 RFC 4627,JSON String 可包含 Unicode 字符 `U+0000`,在 JSON 中会表示为 `"\u0000"`。问题是,C/C++ 通常使用空字符结尾字符串(null-terminated string),这种字符串把 ``\0'` 作为结束符号。 + +为了符合 RFC 4627,RapidJSON 支持包含 `U+0000` 的 String。若你需要处理这些 String,便可使用 `GetStringLength()` 去获得正确的字符串长度。 + +例如,当解析以下的 JSON 至 `Document d` 之后: + +~~~~~~~~~~js +{ "s" : "a\u0000b" } +~~~~~~~~~~ +`"a\u0000b"` 值的正确长度应该是 3。但 `strlen()` 会返回 1。 + +`GetStringLength()` 也可以提高性能,因为用户可能需要调用 `strlen()` 去分配缓冲。 + +此外,`std::string` 也支持这个构造函数: + +~~~~~~~~~~cpp +string(const char* s, size_t count); +~~~~~~~~~~ + +此构造函数接受字符串长度作为参数。它支持在字符串中存储空字符,也应该会有更好的性能。 + +## 比较两个 Value + +你可使用 `==` 及 `!=` 去比较两个 Value。当且仅当两个 Value 的类型及内容相同,它们才当作相等。你也可以比较 Value 和它的原生类型值。以下是一个例子。 + +~~~~~~~~~~cpp +if (document["hello"] == document["n"]) /*...*/; // 比较两个值 +if (document["hello"] == "world") /*...*/; // 与字符串字面量作比较 +if (document["i"] != 123) /*...*/; // 与整数作比较 +if (document["pi"] != 3.14) /*...*/; // 与 double 作比较 +~~~~~~~~~~ + +Array/Object 顺序以它们的元素/成员作比较。当且仅当它们的整个子树相等,它们才当作相等。 + +注意,现时若一个 Object 含有重复命名的成员,它与任何 Object 作比较都总会返回 `false`。 + +# 创建/修改值 {#CreateModifyValues} + +有多种方法去创建值。 当一个 DOM 树被创建或修改后,可使用 `Writer` 再次存储为 JSON。 + +## 改变 Value 类型 {#ChangeValueType} +当使用默认构造函数创建一个 Value 或 Document,它的类型便会是 Null。要改变其类型,需调用 `SetXXX()` 或赋值操作,例如: + +~~~~~~~~~~cpp +Document d; // Null +d.SetObject(); + +Value v; // Null +v.SetInt(10); +v = 10; // 简写,和上面的相同 +~~~~~~~~~~ + +### 构造函数的各个重载 +几个类型也有重载构造函数: + +~~~~~~~~~~cpp +Value b(true); // 调用 Value(bool) +Value i(-123); // 调用 Value(int) +Value u(123u); // 调用 Value(unsigned) +Value d(1.5); // 调用 Value(double) +~~~~~~~~~~ + +要重建空 Object 或 Array,可在默认构造函数后使用 `SetObject()`/`SetArray()`,或一次性使用 `Value(Type)`: + +~~~~~~~~~~cpp +Value o(kObjectType); +Value a(kArrayType); +~~~~~~~~~~ + +## 转移语义(Move Semantics) {#MoveSemantics} + +在设计 RapidJSON 时有一个非常特别的决定,就是 Value 赋值并不是把来源 Value 复制至目的 Value,而是把来源 Value 转移(move)至目的 Value。例如: + +~~~~~~~~~~cpp +Value a(123); +Value b(456); +b = a; // a 变成 Null,b 变成数字 123。 +~~~~~~~~~~ + +![使用移动语义赋值。](diagram/move1.png) + +为什么?此语义有何优点? + +最简单的答案就是性能。对于固定大小的 JSON 类型(Number、True、False、Null),复制它们是简单快捷。然而,对于可变大小的 JSON 类型(String、Array、Object),复制它们会产生大量开销,而且这些开销常常不被察觉。尤其是当我们需要创建临时 Object,把它复制至另一变量,然后再析构它。 + +例如,若使用正常 * 复制 * 语义: + +~~~~~~~~~~cpp +Value o(kObjectType); +{ + Value contacts(kArrayType); + // 把元素加进 contacts 数组。 + // ... + o.AddMember("contacts", contacts, d.GetAllocator()); // 深度复制 contacts (可能有大量内存分配) + // 析构 contacts。 +} +~~~~~~~~~~ + +![复制语义产生大量的复制操作。](diagram/move2.png) + +那个 `o` Object 需要分配一个和 contacts 相同大小的缓冲区,对 conacts 做深度复制,并最终要析构 contacts。这样会产生大量无必要的内存分配/释放,以及内存复制。 + +有一些方案可避免实质地复制这些数据,例如引用计数(reference counting)、垃圾回收(garbage collection, GC)。 + +为了使 RapidJSON 简单及快速,我们选择了对赋值采用 * 转移 * 语义。这方法与 `std::auto_ptr` 相似,都是在赋值时转移拥有权。转移快得多简单得多,只需要析构原来的 Value,把来源 `memcpy()` 至目标,最后把来源设置为 Null 类型。 + +因此,使用转移语义后,上面的例子变成: + +~~~~~~~~~~cpp +Value o(kObjectType); +{ + Value contacts(kArrayType); + // adding elements to contacts array. + o.AddMember("contacts", contacts, d.GetAllocator()); // 只需 memcpy() contacts 本身至新成员的 Value(16 字节) + // contacts 在这里变成 Null。它的析构是平凡的。 +} +~~~~~~~~~~ + +![转移语义不需复制。](diagram/move3.png) + +在 C++11 中这称为转移赋值操作(move assignment operator)。由于 RapidJSON 支持 C++03,它在赋值操作采用转移语义,其它修改型函数如 `AddMember()`, `PushBack()` 也采用转移语义。 + +### 转移语义及临时值 {#TemporaryValues} + +有时候,我们想直接构造一个 Value 并传递给一个“转移”函数(如 `PushBack()`、`AddMember()`)。由于临时对象是不能转换为正常的 Value 引用,我们加入了一个方便的 `Move()` 函数: + +~~~~~~~~~~cpp +Value a(kArrayType); +Document::AllocatorType& allocator = document.GetAllocator(); +// a.PushBack(Value(42), allocator); // 不能通过编译 +a.PushBack(Value().SetInt(42), allocator); // fluent API +a.PushBack(Value(42).Move(), allocator); // 和上一行相同 +~~~~~~~~~~ + +## 创建 String {#CreateString} +RapidJSON 提供两个 String 的存储策略。 + +1. copy-string: 分配缓冲区,然后把来源数据复制至它。 +2. const-string: 简单地储存字符串的指针。 + +Copy-string 总是安全的,因为它拥有数据的克隆。Const-string 可用于存储字符串字面量,以及用于在 DOM 一节中将会提到的 in-situ 解析中。 + +为了让用户自定义内存分配方式,当一个操作可能需要内存分配时,RapidJSON 要求用户传递一个 allocator 实例作为 API 参数。此设计避免了在每个 Value 存储 allocator(或 document)的指针。 + +因此,当我们把一个 copy-string 赋值时, 调用含有 allocator 的 `SetString()` 重载函数: + +~~~~~~~~~~cpp +Document document; +Value author; +char buffer[10]; +int len = sprintf(buffer, "%s %s", "Milo", "Yip"); // 动态创建的字符串。 +author.SetString(buffer, len, document.GetAllocator()); +memset(buffer, 0, sizeof(buffer)); +// 清空 buffer 后 author.GetString() 仍然包含 "Milo Yip" +~~~~~~~~~~ + +在此例子中,我们使用 `Document` 实例的 allocator。这是使用 RapidJSON 时常用的惯用法。但你也可以用其他 allocator 实例。 + +另外,上面的 `SetString()` 需要长度参数。这个 API 能处理含有空字符的字符串。另一个 `SetString()` 重载函数没有长度参数,它假设输入是空字符结尾的,并会调用类似 `strlen()` 的函数去获取长度。 + +最后,对于字符串字面量或有安全生命周期的字符串,可以使用 const-string 版本的 `SetString()`,它没有 +allocator 参数。对于字符串字面量(或字符数组常量),只需简单地传递字面量,又安全又高效: + +~~~~~~~~~~cpp +Value s; +s.SetString("rapidjson"); // 可包含空字符,长度在编译期推导 +s = "rapidjson"; // 上行的缩写 +~~~~~~~~~~ + +对于字符指针,RapidJSON 需要作一个标记,代表它不复制也是安全的。可以使用 `StringRef` 函数: + +~~~~~~~~~cpp +const char * cstr = getenv("USER"); +size_t cstr_len = ...; // 如果有长度 +Value s; +// s.SetString(cstr); // 这不能通过编译 +s.SetString(StringRef(cstr)); // 可以,假设它的生命周期安全,并且是以空字符结尾的 +s = StringRef(cstr); // 上行的缩写 +s.SetString(StringRef(cstr, cstr_len));// 更快,可处理空字符 +s = StringRef(cstr, cstr_len); // 上行的缩写 + +~~~~~~~~~ + +## 修改 Array {#ModifyArray} +Array 类型的 Value 提供与 `std::vector` 相似的 API。 + +* `Clear()` +* `Reserve(SizeType, Allocator&)` +* `Value& PushBack(Value&, Allocator&)` +* `template GenericValue& PushBack(T, Allocator&)` +* `Value& PopBack()` +* `ValueIterator Erase(ConstValueIterator pos)` +* `ValueIterator Erase(ConstValueIterator first, ConstValueIterator last)` + +注意,`Reserve(...)` 及 `PushBack(...)` 可能会为数组元素分配内存,所以需要一个 allocator。 + +以下是 `PushBack()` 的例子: + +~~~~~~~~~~cpp +Value a(kArrayType); +Document::AllocatorType& allocator = document.GetAllocator(); + +for (int i = 5; i <= 10; i++) + a.PushBack(i, allocator); // 可能需要调用 realloc() 所以需要 allocator + +// 流畅接口(Fluent interface) +a.PushBack("Lua", allocator).PushBack("Mio", allocator); +~~~~~~~~~~ + +与 STL 不一样的是,`PushBack()`/`PopBack()` 返回 Array 本身的引用。这称为流畅接口(_fluent interface_)。 + +如果你想在 Array 中加入一个非常量字符串,或是一个没有足够生命周期的字符串(见 [Create String](#CreateString)),你需要使用 copy-string API 去创建一个 String。为了避免加入中间变量,可以就地使用一个 [临时值](#TemporaryValues): + +~~~~~~~~~~cpp +// 就地 Value 参数 +contact.PushBack(Value("copy", document.GetAllocator()).Move(), // copy string + document.GetAllocator()); + +// 显式 Value 参数 +Value val("key", document.GetAllocator()); // copy string +contact.PushBack(val, document.GetAllocator()); +~~~~~~~~~~ + +## 修改 Object {#ModifyObject} +Object 是键值对的集合。每个键必须为 String。要修改 Object,方法是增加或移除成员。以下的 API 用来增加成员: + +* `Value& AddMember(Value&, Value&, Allocator& allocator)` +* `Value& AddMember(StringRefType, Value&, Allocator&)` +* `template Value& AddMember(StringRefType, T value, Allocator&)` + +以下是一个例子。 + +~~~~~~~~~~cpp +Value contact(kObject); +contact.AddMember("name", "Milo", document.GetAllocator()); +contact.AddMember("married", true, document.GetAllocator()); +~~~~~~~~~~ + +使用 `StringRefType` 作为 name 参数的重载版本与字符串的 `SetString` 的接口相似。 这些重载是为了避免复制 `name` 字符串,因为 JSON object 中经常会使用常数键名。 + +如果你需要从非常数字符串或生命周期不足的字符串创建键名(见 [创建 String](#CreateString)),你需要使用 copy-string API。为了避免中间变量,可以就地使用 [临时值](#TemporaryValues): + +~~~~~~~~~~cpp +// 就地 Value 参数 +contact.AddMember(Value("copy", document.GetAllocator()).Move(), // copy string + Value().Move(), // null value + document.GetAllocator()); + +// 显式参数 +Value key("key", document.GetAllocator()); // copy string name +Value val(42); // 某 Value +contact.AddMember(key, val, document.GetAllocator()); +~~~~~~~~~~ + +移除成员有几个选择: + +* `bool RemoveMember(const Ch* name)`:使用键名来移除成员(线性时间复杂度)。 +* `bool RemoveMember(const Value& name)`:除了 `name` 是一个 Value,和上一行相同。 +* `MemberIterator RemoveMember(MemberIterator)`:使用迭代器移除成员(_ 常数 _ 时间复杂度)。 +* `MemberIterator EraseMember(MemberIterator)`:和上行相似但维持成员次序(线性时间复杂度)。 +* `MemberIterator EraseMember(MemberIterator first, MemberIterator last)`:移除一个范围内的成员,维持次序(线性时间复杂度)。 + +`MemberIterator RemoveMember(MemberIterator)` 使用了“转移最后”手法来达成常数时间复杂度。基本上就是析构迭代器位置的成员,然后把最后的成员转移至迭代器位置。因此,成员的次序会被改变。 + +## 深复制 Value {#DeepCopyValue} +若我们真的要复制一个 DOM 树,我们可使用两个 APIs 作深复制:含 allocator 的构造函数及 `CopyFrom()`。 + +~~~~~~~~~~cpp +Document d; +Document::AllocatorType& a = d.GetAllocator(); +Value v1("foo"); +// Value v2(v1); // 不容许 + +Value v2(v1, a); // 制造一个克隆 +assert(v1.IsString()); // v1 不变 +d.SetArray().PushBack(v1, a).PushBack(v2, a); +assert(v1.IsNull() && v2.IsNull()); // 两个都转移动 d + +v2.CopyFrom(d, a); // 把整个 document 复制至 v2 +assert(d.IsArray() && d.Size() == 2); // d 不变 +v1.SetObject().AddMember("array", v2, a); +d.PushBack(v1, a); +~~~~~~~~~~ + +## 交换 Value {#SwapValues} + +RapidJSON 也提供 `Swap()`。 + +~~~~~~~~~~cpp +Value a(123); +Value b("Hello"); +a.Swap(b); +assert(a.IsString()); +assert(b.IsInt()); +~~~~~~~~~~ + +无论两棵 DOM 树有多复杂,交换是很快的(常数时间)。 + +# 下一部分 {#WhatsNext} + +本教程展示了如何询查及修改 DOM 树。RapidJSON 还有一个重要概念: + +1. [流](doc/stream.zh-cn.md) 是读写 JSON 的通道。流可以是内存字符串、文件流等。用户也可以自定义流。 +2. [编码](doc/encoding.zh-cn.md) 定义在流或内存中使用的字符编码。RapidJSON 也在内部提供 Unicode 转换及校验功能。 +3. [DOM](doc/dom.zh-cn.md) 的基本功能已在本教程里介绍。还有更高级的功能,如原位(*in situ*)解析、其他解析选项及高级用法。 +4. [SAX](doc/sax.zh-cn.md) 是 RapidJSON 解析/生成功能的基础。学习使用 `Reader`/`Writer` 去实现更高性能的应用程序。也可以使用 `PrettyWriter` 去格式化 JSON。 +5. [性能](doc/performance.zh-cn.md) 展示一些我们做的及第三方的性能测试。 +6. [技术内幕](doc/internals.md) 讲述一些 RapidJSON 内部的设计及技术。 + +你也可以参考 [常见问题](doc/faq.zh-cn.md)、API 文档、例子及单元测试。 diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/docker/debian/Dockerfile b/graphics/asymptote/LspCpp/third_party/rapidjson/docker/debian/Dockerfile new file mode 100644 index 0000000000..76f0235e5b --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/docker/debian/Dockerfile @@ -0,0 +1,8 @@ +# BUILD: docker build -t rapidjson-debian . +# RUN: docker run -it -v "$PWD"/../..:/rapidjson rapidjson-debian + +FROM debian:jessie + +RUN apt-get update && apt-get install -y g++ cmake doxygen valgrind + +ENTRYPOINT ["/bin/bash"] diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/example/CMakeLists.txt b/graphics/asymptote/LspCpp/third_party/rapidjson/example/CMakeLists.txt new file mode 100644 index 0000000000..9f53c9aadc --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/example/CMakeLists.txt @@ -0,0 +1,46 @@ +cmake_minimum_required(VERSION 2.8) + +if(POLICY CMP0054) + cmake_policy(SET CMP0054 NEW) +endif() + +set(EXAMPLES + capitalize + condense + filterkey + filterkeydom + jsonx + lookaheadparser + messagereader + parsebyparts + pretty + prettyauto + schemavalidator + serialize + simpledom + simplereader + simplepullreader + simplewriter + sortkeys + tutorial) + +include_directories("../include/") + +add_definitions(-D__STDC_FORMAT_MACROS) +set_property(DIRECTORY PROPERTY COMPILE_OPTIONS ${EXTRA_CXX_FLAGS}) + +if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread") +endif() + +add_executable(archivertest archiver/archiver.cpp archiver/archivertest.cpp) + +foreach (example ${EXAMPLES}) + add_executable(${example} ${example}/${example}.cpp) +endforeach() + +if (CMAKE_CXX_COMPILER_ID MATCHES "Clang") + target_link_libraries(parsebyparts pthread) +endif() + +add_custom_target(examples ALL DEPENDS ${EXAMPLES}) diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/example/archiver/archiver.cpp b/graphics/asymptote/LspCpp/third_party/rapidjson/example/archiver/archiver.cpp new file mode 100644 index 0000000000..59ae4c4101 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/example/archiver/archiver.cpp @@ -0,0 +1,292 @@ +#include "archiver.h" +#include +#include +#include "rapidjson/document.h" +#include "rapidjson/prettywriter.h" +#include "rapidjson/stringbuffer.h" + +using namespace rapidjson; + +struct JsonReaderStackItem { + enum State { + BeforeStart, //!< An object/array is in the stack but it is not yet called by StartObject()/StartArray(). + Started, //!< An object/array is called by StartObject()/StartArray(). + Closed //!< An array is closed after read all element, but before EndArray(). + }; + + JsonReaderStackItem(const Value* value, State state) : value(value), state(state), index() {} + + const Value* value; + State state; + SizeType index; // For array iteration +}; + +typedef std::stack JsonReaderStack; + +#define DOCUMENT reinterpret_cast(mDocument) +#define STACK (reinterpret_cast(mStack)) +#define TOP (STACK->top()) +#define CURRENT (*TOP.value) + +JsonReader::JsonReader(const char* json) : mDocument(), mStack(), mError(false) { + mDocument = new Document; + DOCUMENT->Parse(json); + if (DOCUMENT->HasParseError()) + mError = true; + else { + mStack = new JsonReaderStack; + STACK->push(JsonReaderStackItem(DOCUMENT, JsonReaderStackItem::BeforeStart)); + } +} + +JsonReader::~JsonReader() { + delete DOCUMENT; + delete STACK; +} + +// Archive concept +JsonReader& JsonReader::StartObject() { + if (!mError) { + if (CURRENT.IsObject() && TOP.state == JsonReaderStackItem::BeforeStart) + TOP.state = JsonReaderStackItem::Started; + else + mError = true; + } + return *this; +} + +JsonReader& JsonReader::EndObject() { + if (!mError) { + if (CURRENT.IsObject() && TOP.state == JsonReaderStackItem::Started) + Next(); + else + mError = true; + } + return *this; +} + +JsonReader& JsonReader::Member(const char* name) { + if (!mError) { + if (CURRENT.IsObject() && TOP.state == JsonReaderStackItem::Started) { + Value::ConstMemberIterator memberItr = CURRENT.FindMember(name); + if (memberItr != CURRENT.MemberEnd()) + STACK->push(JsonReaderStackItem(&memberItr->value, JsonReaderStackItem::BeforeStart)); + else + mError = true; + } + else + mError = true; + } + return *this; +} + +bool JsonReader::HasMember(const char* name) const { + if (!mError && CURRENT.IsObject() && TOP.state == JsonReaderStackItem::Started) + return CURRENT.HasMember(name); + return false; +} + +JsonReader& JsonReader::StartArray(size_t* size) { + if (!mError) { + if (CURRENT.IsArray() && TOP.state == JsonReaderStackItem::BeforeStart) { + TOP.state = JsonReaderStackItem::Started; + if (size) + *size = CURRENT.Size(); + + if (!CURRENT.Empty()) { + const Value* value = &CURRENT[TOP.index]; + STACK->push(JsonReaderStackItem(value, JsonReaderStackItem::BeforeStart)); + } + else + TOP.state = JsonReaderStackItem::Closed; + } + else + mError = true; + } + return *this; +} + +JsonReader& JsonReader::EndArray() { + if (!mError) { + if (CURRENT.IsArray() && TOP.state == JsonReaderStackItem::Closed) + Next(); + else + mError = true; + } + return *this; +} + +JsonReader& JsonReader::operator&(bool& b) { + if (!mError) { + if (CURRENT.IsBool()) { + b = CURRENT.GetBool(); + Next(); + } + else + mError = true; + } + return *this; +} + +JsonReader& JsonReader::operator&(unsigned& u) { + if (!mError) { + if (CURRENT.IsUint()) { + u = CURRENT.GetUint(); + Next(); + } + else + mError = true; + } + return *this; +} + +JsonReader& JsonReader::operator&(int& i) { + if (!mError) { + if (CURRENT.IsInt()) { + i = CURRENT.GetInt(); + Next(); + } + else + mError = true; + } + return *this; +} + +JsonReader& JsonReader::operator&(double& d) { + if (!mError) { + if (CURRENT.IsNumber()) { + d = CURRENT.GetDouble(); + Next(); + } + else + mError = true; + } + return *this; +} + +JsonReader& JsonReader::operator&(std::string& s) { + if (!mError) { + if (CURRENT.IsString()) { + s = CURRENT.GetString(); + Next(); + } + else + mError = true; + } + return *this; +} + +JsonReader& JsonReader::SetNull() { + // This function is for JsonWriter only. + mError = true; + return *this; +} + +void JsonReader::Next() { + if (!mError) { + assert(!STACK->empty()); + STACK->pop(); + + if (!STACK->empty() && CURRENT.IsArray()) { + if (TOP.state == JsonReaderStackItem::Started) { // Otherwise means reading array item pass end + if (TOP.index < CURRENT.Size() - 1) { + const Value* value = &CURRENT[++TOP.index]; + STACK->push(JsonReaderStackItem(value, JsonReaderStackItem::BeforeStart)); + } + else + TOP.state = JsonReaderStackItem::Closed; + } + else + mError = true; + } + } +} + +#undef DOCUMENT +#undef STACK +#undef TOP +#undef CURRENT + +//////////////////////////////////////////////////////////////////////////////// +// JsonWriter + +#define WRITER reinterpret_cast*>(mWriter) +#define STREAM reinterpret_cast(mStream) + +JsonWriter::JsonWriter() : mWriter(), mStream() { + mStream = new StringBuffer; + mWriter = new PrettyWriter(*STREAM); +} + +JsonWriter::~JsonWriter() { + delete WRITER; + delete STREAM; +} + +const char* JsonWriter::GetString() const { + return STREAM->GetString(); +} + +JsonWriter& JsonWriter::StartObject() { + WRITER->StartObject(); + return *this; +} + +JsonWriter& JsonWriter::EndObject() { + WRITER->EndObject(); + return *this; +} + +JsonWriter& JsonWriter::Member(const char* name) { + WRITER->String(name, static_cast(strlen(name))); + return *this; +} + +bool JsonWriter::HasMember(const char*) const { + // This function is for JsonReader only. + assert(false); + return false; +} + +JsonWriter& JsonWriter::StartArray(size_t*) { + WRITER->StartArray(); + return *this; +} + +JsonWriter& JsonWriter::EndArray() { + WRITER->EndArray(); + return *this; +} + +JsonWriter& JsonWriter::operator&(bool& b) { + WRITER->Bool(b); + return *this; +} + +JsonWriter& JsonWriter::operator&(unsigned& u) { + WRITER->Uint(u); + return *this; +} + +JsonWriter& JsonWriter::operator&(int& i) { + WRITER->Int(i); + return *this; +} + +JsonWriter& JsonWriter::operator&(double& d) { + WRITER->Double(d); + return *this; +} + +JsonWriter& JsonWriter::operator&(std::string& s) { + WRITER->String(s.c_str(), static_cast(s.size())); + return *this; +} + +JsonWriter& JsonWriter::SetNull() { + WRITER->Null(); + return *this; +} + +#undef STREAM +#undef WRITER diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/example/archiver/archiver.h b/graphics/asymptote/LspCpp/third_party/rapidjson/example/archiver/archiver.h new file mode 100644 index 0000000000..285ca73d6a --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/example/archiver/archiver.h @@ -0,0 +1,145 @@ +#ifndef ARCHIVER_H_ +#define ARCHIVER_H_ + +#include +#include + +/** +\class Archiver +\brief Archiver concept + +Archiver can be a reader or writer for serialization or deserialization respectively. + +class Archiver { +public: + /// \returns true if the archiver is in normal state. false if it has errors. + operator bool() const; + + /// Starts an object + Archiver& StartObject(); + + /// After calling StartObject(), assign a member with a name + Archiver& Member(const char* name); + + /// After calling StartObject(), check if a member presents + bool HasMember(const char* name) const; + + /// Ends an object + Archiver& EndObject(); + + /// Starts an array + /// \param size If Archiver::IsReader is true, the size of array is written. + Archiver& StartArray(size_t* size = 0); + + /// Ends an array + Archiver& EndArray(); + + /// Read/Write primitive types. + Archiver& operator&(bool& b); + Archiver& operator&(unsigned& u); + Archiver& operator&(int& i); + Archiver& operator&(double& d); + Archiver& operator&(std::string& s); + + /// Write primitive types. + Archiver& SetNull(); + + //! Whether it is a reader. + static const bool IsReader; + + //! Whether it is a writer. + static const bool IsWriter; +}; +*/ + +/// Represents a JSON reader which implements Archiver concept. +class JsonReader { +public: + /// Constructor. + /** + \param json A non-const source json string for in-situ parsing. + \note in-situ means the source JSON string will be modified after parsing. + */ + JsonReader(const char* json); + + /// Destructor. + ~JsonReader(); + + // Archive concept + + operator bool() const { return !mError; } + + JsonReader& StartObject(); + JsonReader& Member(const char* name); + bool HasMember(const char* name) const; + JsonReader& EndObject(); + + JsonReader& StartArray(size_t* size = 0); + JsonReader& EndArray(); + + JsonReader& operator&(bool& b); + JsonReader& operator&(unsigned& u); + JsonReader& operator&(int& i); + JsonReader& operator&(double& d); + JsonReader& operator&(std::string& s); + + JsonReader& SetNull(); + + static const bool IsReader = true; + static const bool IsWriter = !IsReader; + +private: + JsonReader(const JsonReader&); + JsonReader& operator=(const JsonReader&); + + void Next(); + + // PIMPL + void* mDocument; ///< DOM result of parsing. + void* mStack; ///< Stack for iterating the DOM + bool mError; ///< Whether an error has occurred. +}; + +class JsonWriter { +public: + /// Constructor. + JsonWriter(); + + /// Destructor. + ~JsonWriter(); + + /// Obtains the serialized JSON string. + const char* GetString() const; + + // Archive concept + + operator bool() const { return true; } + + JsonWriter& StartObject(); + JsonWriter& Member(const char* name); + bool HasMember(const char* name) const; + JsonWriter& EndObject(); + + JsonWriter& StartArray(size_t* size = 0); + JsonWriter& EndArray(); + + JsonWriter& operator&(bool& b); + JsonWriter& operator&(unsigned& u); + JsonWriter& operator&(int& i); + JsonWriter& operator&(double& d); + JsonWriter& operator&(std::string& s); + JsonWriter& SetNull(); + + static const bool IsReader = false; + static const bool IsWriter = !IsReader; + +private: + JsonWriter(const JsonWriter&); + JsonWriter& operator=(const JsonWriter&); + + // PIMPL idiom + void* mWriter; ///< JSON writer. + void* mStream; ///< Stream buffer. +}; + +#endif // ARCHIVER_H__ diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/example/archiver/archivertest.cpp b/graphics/asymptote/LspCpp/third_party/rapidjson/example/archiver/archivertest.cpp new file mode 100644 index 0000000000..417a421a31 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/example/archiver/archivertest.cpp @@ -0,0 +1,287 @@ +#include "archiver.h" +#include +#include + +////////////////////////////////////////////////////////////////////////////// +// Test1: simple object + +struct Student { + Student() : name(), age(), height(), canSwim() {} + Student(const std::string name, unsigned age, double height, bool canSwim) : + name(name), age(age), height(height), canSwim(canSwim) + {} + + std::string name; + unsigned age; + double height; + bool canSwim; +}; + +template +Archiver& operator&(Archiver& ar, Student& s) { + ar.StartObject(); + ar.Member("name") & s.name; + ar.Member("age") & s.age; + ar.Member("height") & s.height; + ar.Member("canSwim") & s.canSwim; + return ar.EndObject(); +} + +std::ostream& operator<<(std::ostream& os, const Student& s) { + return os << s.name << " " << s.age << " " << s.height << " " << s.canSwim; +} + +void test1() { + std::string json; + + // Serialize + { + Student s("Lua", 9, 150.5, true); + + JsonWriter writer; + writer & s; + json = writer.GetString(); + std::cout << json << std::endl; + } + + // Deserialize + { + Student s; + JsonReader reader(json.c_str()); + reader & s; + std::cout << s << std::endl; + } +} + +////////////////////////////////////////////////////////////////////////////// +// Test2: std::vector <=> JSON array +// +// You can map a JSON array to other data structures as well + +struct Group { + Group() : groupName(), students() {} + std::string groupName; + std::vector students; +}; + +template +Archiver& operator&(Archiver& ar, Group& g) { + ar.StartObject(); + + ar.Member("groupName"); + ar & g.groupName; + + ar.Member("students"); + size_t studentCount = g.students.size(); + ar.StartArray(&studentCount); + if (ar.IsReader) + g.students.resize(studentCount); + for (size_t i = 0; i < studentCount; i++) + ar & g.students[i]; + ar.EndArray(); + + return ar.EndObject(); +} + +std::ostream& operator<<(std::ostream& os, const Group& g) { + os << g.groupName << std::endl; + for (std::vector::const_iterator itr = g.students.begin(); itr != g.students.end(); ++itr) + os << *itr << std::endl; + return os; +} + +void test2() { + std::string json; + + // Serialize + { + Group g; + g.groupName = "Rainbow"; + + Student s1("Lua", 9, 150.5, true); + Student s2("Mio", 7, 120.0, false); + g.students.push_back(s1); + g.students.push_back(s2); + + JsonWriter writer; + writer & g; + json = writer.GetString(); + std::cout << json << std::endl; + } + + // Deserialize + { + Group g; + JsonReader reader(json.c_str()); + reader & g; + std::cout << g << std::endl; + } +} + +////////////////////////////////////////////////////////////////////////////// +// Test3: polymorphism & friend +// +// Note that friendship is not necessary but make things simpler. + +class Shape { +public: + virtual ~Shape() {} + virtual const char* GetType() const = 0; + virtual void Print(std::ostream& os) const = 0; + +protected: + Shape() : x_(), y_() {} + Shape(double x, double y) : x_(x), y_(y) {} + + template + friend Archiver& operator&(Archiver& ar, Shape& s); + + double x_, y_; +}; + +template +Archiver& operator&(Archiver& ar, Shape& s) { + ar.Member("x") & s.x_; + ar.Member("y") & s.y_; + return ar; +} + +class Circle : public Shape { +public: + Circle() : radius_() {} + Circle(double x, double y, double radius) : Shape(x, y), radius_(radius) {} + ~Circle() {} + + const char* GetType() const { return "Circle"; } + + void Print(std::ostream& os) const { + os << "Circle (" << x_ << ", " << y_ << ")" << " radius = " << radius_; + } + +private: + template + friend Archiver& operator&(Archiver& ar, Circle& c); + + double radius_; +}; + +template +Archiver& operator&(Archiver& ar, Circle& c) { + ar & static_cast(c); + ar.Member("radius") & c.radius_; + return ar; +} + +class Box : public Shape { +public: + Box() : width_(), height_() {} + Box(double x, double y, double width, double height) : Shape(x, y), width_(width), height_(height) {} + ~Box() {} + + const char* GetType() const { return "Box"; } + + void Print(std::ostream& os) const { + os << "Box (" << x_ << ", " << y_ << ")" << " width = " << width_ << " height = " << height_; + } + +private: + template + friend Archiver& operator&(Archiver& ar, Box& b); + + double width_, height_; +}; + +template +Archiver& operator&(Archiver& ar, Box& b) { + ar & static_cast(b); + ar.Member("width") & b.width_; + ar.Member("height") & b.height_; + return ar; +} + +class Canvas { +public: + Canvas() : shapes_() {} + ~Canvas() { Clear(); } + + void Clear() { + for (std::vector::iterator itr = shapes_.begin(); itr != shapes_.end(); ++itr) + delete *itr; + } + + void AddShape(Shape* shape) { shapes_.push_back(shape); } + + void Print(std::ostream& os) { + for (std::vector::iterator itr = shapes_.begin(); itr != shapes_.end(); ++itr) { + (*itr)->Print(os); + std::cout << std::endl; + } + } + +private: + template + friend Archiver& operator&(Archiver& ar, Canvas& c); + + std::vector shapes_; +}; + +template +Archiver& operator&(Archiver& ar, Shape*& shape) { + std::string type = ar.IsReader ? "" : shape->GetType(); + ar.StartObject(); + ar.Member("type") & type; + if (type == "Circle") { + if (ar.IsReader) shape = new Circle; + ar & static_cast(*shape); + } + else if (type == "Box") { + if (ar.IsReader) shape = new Box; + ar & static_cast(*shape); + } + return ar.EndObject(); +} + +template +Archiver& operator&(Archiver& ar, Canvas& c) { + size_t shapeCount = c.shapes_.size(); + ar.StartArray(&shapeCount); + if (ar.IsReader) { + c.Clear(); + c.shapes_.resize(shapeCount); + } + for (size_t i = 0; i < shapeCount; i++) + ar & c.shapes_[i]; + return ar.EndArray(); +} + +void test3() { + std::string json; + + // Serialize + { + Canvas c; + c.AddShape(new Circle(1.0, 2.0, 3.0)); + c.AddShape(new Box(4.0, 5.0, 6.0, 7.0)); + + JsonWriter writer; + writer & c; + json = writer.GetString(); + std::cout << json << std::endl; + } + + // Deserialize + { + Canvas c; + JsonReader reader(json.c_str()); + reader & c; + c.Print(std::cout); + } +} + +////////////////////////////////////////////////////////////////////////////// + +int main() { + test1(); + test2(); + test3(); +} diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/example/capitalize/capitalize.cpp b/graphics/asymptote/LspCpp/third_party/rapidjson/example/capitalize/capitalize.cpp new file mode 100644 index 0000000000..7da37e9c50 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/example/capitalize/capitalize.cpp @@ -0,0 +1,67 @@ +// JSON condenser example + +// This example parses JSON from stdin with validation, +// and re-output the JSON content to stdout with all string capitalized, and without whitespace. + +#include "rapidjson/reader.h" +#include "rapidjson/writer.h" +#include "rapidjson/filereadstream.h" +#include "rapidjson/filewritestream.h" +#include "rapidjson/error/en.h" +#include +#include + +using namespace rapidjson; + +template +struct CapitalizeFilter { + CapitalizeFilter(OutputHandler& out) : out_(out), buffer_() {} + + bool Null() { return out_.Null(); } + bool Bool(bool b) { return out_.Bool(b); } + bool Int(int i) { return out_.Int(i); } + bool Uint(unsigned u) { return out_.Uint(u); } + bool Int64(int64_t i) { return out_.Int64(i); } + bool Uint64(uint64_t u) { return out_.Uint64(u); } + bool Double(double d) { return out_.Double(d); } + bool RawNumber(const char* str, SizeType length, bool copy) { return out_.RawNumber(str, length, copy); } + bool String(const char* str, SizeType length, bool) { + buffer_.clear(); + for (SizeType i = 0; i < length; i++) + buffer_.push_back(static_cast(std::toupper(str[i]))); + return out_.String(&buffer_.front(), length, true); // true = output handler need to copy the string + } + bool StartObject() { return out_.StartObject(); } + bool Key(const char* str, SizeType length, bool copy) { return String(str, length, copy); } + bool EndObject(SizeType memberCount) { return out_.EndObject(memberCount); } + bool StartArray() { return out_.StartArray(); } + bool EndArray(SizeType elementCount) { return out_.EndArray(elementCount); } + + OutputHandler& out_; + std::vector buffer_; + +private: + CapitalizeFilter(const CapitalizeFilter&); + CapitalizeFilter& operator=(const CapitalizeFilter&); +}; + +int main(int, char*[]) { + // Prepare JSON reader and input stream. + Reader reader; + char readBuffer[65536]; + FileReadStream is(stdin, readBuffer, sizeof(readBuffer)); + + // Prepare JSON writer and output stream. + char writeBuffer[65536]; + FileWriteStream os(stdout, writeBuffer, sizeof(writeBuffer)); + Writer writer(os); + + // JSON reader parse from the input stream and let writer generate the output. + CapitalizeFilter > filter(writer); + if (!reader.Parse(is, filter)) { + fprintf(stderr, "\nError(%u): %s\n", static_cast(reader.GetErrorOffset()), GetParseError_En(reader.GetParseErrorCode())); + return 1; + } + + return 0; +} diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/example/condense/condense.cpp b/graphics/asymptote/LspCpp/third_party/rapidjson/example/condense/condense.cpp new file mode 100644 index 0000000000..46dc350439 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/example/condense/condense.cpp @@ -0,0 +1,32 @@ +// JSON condenser example + +// This example parses JSON text from stdin with validation, +// and re-output the JSON content to stdout without whitespace. + +#include "rapidjson/reader.h" +#include "rapidjson/writer.h" +#include "rapidjson/filereadstream.h" +#include "rapidjson/filewritestream.h" +#include "rapidjson/error/en.h" + +using namespace rapidjson; + +int main(int, char*[]) { + // Prepare JSON reader and input stream. + Reader reader; + char readBuffer[65536]; + FileReadStream is(stdin, readBuffer, sizeof(readBuffer)); + + // Prepare JSON writer and output stream. + char writeBuffer[65536]; + FileWriteStream os(stdout, writeBuffer, sizeof(writeBuffer)); + Writer writer(os); + + // JSON reader parse from the input stream and let writer generate the output. + if (!reader.Parse(is, writer)) { + fprintf(stderr, "\nError(%u): %s\n", static_cast(reader.GetErrorOffset()), GetParseError_En(reader.GetParseErrorCode())); + return 1; + } + + return 0; +} diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/example/filterkey/filterkey.cpp b/graphics/asymptote/LspCpp/third_party/rapidjson/example/filterkey/filterkey.cpp new file mode 100644 index 0000000000..c34a050dc8 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/example/filterkey/filterkey.cpp @@ -0,0 +1,135 @@ +// JSON filterkey example with SAX-style API. + +// This example parses JSON text from stdin with validation. +// During parsing, specified key will be filtered using a SAX handler. +// It re-output the JSON content to stdout without whitespace. + +#include "rapidjson/reader.h" +#include "rapidjson/writer.h" +#include "rapidjson/filereadstream.h" +#include "rapidjson/filewritestream.h" +#include "rapidjson/error/en.h" +#include + +using namespace rapidjson; + +// This handler forwards event into an output handler, with filtering the descendent events of specified key. +template +class FilterKeyHandler { +public: + typedef char Ch; + + FilterKeyHandler(OutputHandler& outputHandler, const Ch* keyString, SizeType keyLength) : + outputHandler_(outputHandler), keyString_(keyString), keyLength_(keyLength), filterValueDepth_(), filteredKeyCount_() + {} + + bool Null() { return filterValueDepth_ > 0 ? EndValue() : outputHandler_.Null() && EndValue(); } + bool Bool(bool b) { return filterValueDepth_ > 0 ? EndValue() : outputHandler_.Bool(b) && EndValue(); } + bool Int(int i) { return filterValueDepth_ > 0 ? EndValue() : outputHandler_.Int(i) && EndValue(); } + bool Uint(unsigned u) { return filterValueDepth_ > 0 ? EndValue() : outputHandler_.Uint(u) && EndValue(); } + bool Int64(int64_t i) { return filterValueDepth_ > 0 ? EndValue() : outputHandler_.Int64(i) && EndValue(); } + bool Uint64(uint64_t u) { return filterValueDepth_ > 0 ? EndValue() : outputHandler_.Uint64(u) && EndValue(); } + bool Double(double d) { return filterValueDepth_ > 0 ? EndValue() : outputHandler_.Double(d) && EndValue(); } + bool RawNumber(const Ch* str, SizeType len, bool copy) { return filterValueDepth_ > 0 ? EndValue() : outputHandler_.RawNumber(str, len, copy) && EndValue(); } + bool String (const Ch* str, SizeType len, bool copy) { return filterValueDepth_ > 0 ? EndValue() : outputHandler_.String (str, len, copy) && EndValue(); } + + bool StartObject() { + if (filterValueDepth_ > 0) { + filterValueDepth_++; + return true; + } + else { + filteredKeyCount_.push(0); + return outputHandler_.StartObject(); + } + } + + bool Key(const Ch* str, SizeType len, bool copy) { + if (filterValueDepth_ > 0) + return true; + else if (len == keyLength_ && std::memcmp(str, keyString_, len) == 0) { + filterValueDepth_ = 1; + return true; + } + else { + ++filteredKeyCount_.top(); + return outputHandler_.Key(str, len, copy); + } + } + + bool EndObject(SizeType) { + if (filterValueDepth_ > 0) { + filterValueDepth_--; + return EndValue(); + } + else { + // Use our own filtered memberCount + SizeType memberCount = filteredKeyCount_.top(); + filteredKeyCount_.pop(); + return outputHandler_.EndObject(memberCount) && EndValue(); + } + } + + bool StartArray() { + if (filterValueDepth_ > 0) { + filterValueDepth_++; + return true; + } + else + return outputHandler_.StartArray(); + } + + bool EndArray(SizeType elementCount) { + if (filterValueDepth_ > 0) { + filterValueDepth_--; + return EndValue(); + } + else + return outputHandler_.EndArray(elementCount) && EndValue(); + } + +private: + FilterKeyHandler(const FilterKeyHandler&); + FilterKeyHandler& operator=(const FilterKeyHandler&); + + bool EndValue() { + if (filterValueDepth_ == 1) // Just at the end of value after filtered key + filterValueDepth_ = 0; + return true; + } + + OutputHandler& outputHandler_; + const char* keyString_; + const SizeType keyLength_; + unsigned filterValueDepth_; + std::stack filteredKeyCount_; +}; + +int main(int argc, char* argv[]) { + if (argc != 2) { + fprintf(stderr, "filterkey key < input.json > output.json\n"); + return 1; + } + + // Prepare JSON reader and input stream. + Reader reader; + char readBuffer[65536]; + FileReadStream is(stdin, readBuffer, sizeof(readBuffer)); + + // Prepare JSON writer and output stream. + char writeBuffer[65536]; + FileWriteStream os(stdout, writeBuffer, sizeof(writeBuffer)); + Writer writer(os); + + // Prepare Filter + FilterKeyHandler > filter(writer, argv[1], static_cast(strlen(argv[1]))); + + // JSON reader parse from the input stream, filter handler filters the events, and forward to writer. + // i.e. the events flow is: reader -> filter -> writer + if (!reader.Parse(is, filter)) { + fprintf(stderr, "\nError(%u): %s\n", static_cast(reader.GetErrorOffset()), GetParseError_En(reader.GetParseErrorCode())); + return 1; + } + + return 0; +} diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/example/filterkeydom/filterkeydom.cpp b/graphics/asymptote/LspCpp/third_party/rapidjson/example/filterkeydom/filterkeydom.cpp new file mode 100644 index 0000000000..732cc81f13 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/example/filterkeydom/filterkeydom.cpp @@ -0,0 +1,170 @@ +// JSON filterkey example which populates filtered SAX events into a Document. + +// This example parses JSON text from stdin with validation. +// During parsing, specified key will be filtered using a SAX handler. +// And finally the filtered events are used to populate a Document. +// As an example, the document is written to standard output. + +#include "rapidjson/document.h" +#include "rapidjson/writer.h" +#include "rapidjson/filereadstream.h" +#include "rapidjson/filewritestream.h" +#include "rapidjson/error/en.h" +#include + +using namespace rapidjson; + +// This handler forwards event into an output handler, with filtering the descendent events of specified key. +template +class FilterKeyHandler { +public: + typedef char Ch; + + FilterKeyHandler(OutputHandler& outputHandler, const Ch* keyString, SizeType keyLength) : + outputHandler_(outputHandler), keyString_(keyString), keyLength_(keyLength), filterValueDepth_(), filteredKeyCount_() + {} + + bool Null() { return filterValueDepth_ > 0 ? EndValue() : outputHandler_.Null() && EndValue(); } + bool Bool(bool b) { return filterValueDepth_ > 0 ? EndValue() : outputHandler_.Bool(b) && EndValue(); } + bool Int(int i) { return filterValueDepth_ > 0 ? EndValue() : outputHandler_.Int(i) && EndValue(); } + bool Uint(unsigned u) { return filterValueDepth_ > 0 ? EndValue() : outputHandler_.Uint(u) && EndValue(); } + bool Int64(int64_t i) { return filterValueDepth_ > 0 ? EndValue() : outputHandler_.Int64(i) && EndValue(); } + bool Uint64(uint64_t u) { return filterValueDepth_ > 0 ? EndValue() : outputHandler_.Uint64(u) && EndValue(); } + bool Double(double d) { return filterValueDepth_ > 0 ? EndValue() : outputHandler_.Double(d) && EndValue(); } + bool RawNumber(const Ch* str, SizeType len, bool copy) { return filterValueDepth_ > 0 ? EndValue() : outputHandler_.RawNumber(str, len, copy) && EndValue(); } + bool String (const Ch* str, SizeType len, bool copy) { return filterValueDepth_ > 0 ? EndValue() : outputHandler_.String (str, len, copy) && EndValue(); } + + bool StartObject() { + if (filterValueDepth_ > 0) { + filterValueDepth_++; + return true; + } + else { + filteredKeyCount_.push(0); + return outputHandler_.StartObject(); + } + } + + bool Key(const Ch* str, SizeType len, bool copy) { + if (filterValueDepth_ > 0) + return true; + else if (len == keyLength_ && std::memcmp(str, keyString_, len) == 0) { + filterValueDepth_ = 1; + return true; + } + else { + ++filteredKeyCount_.top(); + return outputHandler_.Key(str, len, copy); + } + } + + bool EndObject(SizeType) { + if (filterValueDepth_ > 0) { + filterValueDepth_--; + return EndValue(); + } + else { + // Use our own filtered memberCount + SizeType memberCount = filteredKeyCount_.top(); + filteredKeyCount_.pop(); + return outputHandler_.EndObject(memberCount) && EndValue(); + } + } + + bool StartArray() { + if (filterValueDepth_ > 0) { + filterValueDepth_++; + return true; + } + else + return outputHandler_.StartArray(); + } + + bool EndArray(SizeType elementCount) { + if (filterValueDepth_ > 0) { + filterValueDepth_--; + return EndValue(); + } + else + return outputHandler_.EndArray(elementCount) && EndValue(); + } + +private: + FilterKeyHandler(const FilterKeyHandler&); + FilterKeyHandler& operator=(const FilterKeyHandler&); + + bool EndValue() { + if (filterValueDepth_ == 1) // Just at the end of value after filtered key + filterValueDepth_ = 0; + return true; + } + + OutputHandler& outputHandler_; + const char* keyString_; + const SizeType keyLength_; + unsigned filterValueDepth_; + std::stack filteredKeyCount_; +}; + +// Implements a generator for Document::Populate() +template +class FilterKeyReader { +public: + typedef char Ch; + + FilterKeyReader(InputStream& is, const Ch* keyString, SizeType keyLength) : + is_(is), keyString_(keyString), keyLength_(keyLength), parseResult_() + {} + + // SAX event flow: reader -> filter -> handler + template + bool operator()(Handler& handler) { + FilterKeyHandler filter(handler, keyString_, keyLength_); + Reader reader; + parseResult_ = reader.Parse(is_, filter); + return parseResult_; + } + + const ParseResult& GetParseResult() const { return parseResult_; } + +private: + FilterKeyReader(const FilterKeyReader&); + FilterKeyReader& operator=(const FilterKeyReader&); + + InputStream& is_; + const char* keyString_; + const SizeType keyLength_; + ParseResult parseResult_; +}; + +int main(int argc, char* argv[]) { + if (argc != 2) { + fprintf(stderr, "filterkeydom key < input.json > output.json\n"); + return 1; + } + + // Prepare input stream. + char readBuffer[65536]; + FileReadStream is(stdin, readBuffer, sizeof(readBuffer)); + + // Prepare Filter + FilterKeyReader reader(is, argv[1], static_cast(strlen(argv[1]))); + + // Populates the filtered events from reader + Document document; + document.Populate(reader); + ParseResult pr = reader.GetParseResult(); + if (!pr) { + fprintf(stderr, "\nError(%u): %s\n", static_cast(pr.Offset()), GetParseError_En(pr.Code())); + return 1; + } + + // Prepare JSON writer and output stream. + char writeBuffer[65536]; + FileWriteStream os(stdout, writeBuffer, sizeof(writeBuffer)); + Writer writer(os); + + // Write the document to standard output + document.Accept(writer); + return 0; +} diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/example/jsonx/jsonx.cpp b/graphics/asymptote/LspCpp/third_party/rapidjson/example/jsonx/jsonx.cpp new file mode 100644 index 0000000000..954aa2b907 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/example/jsonx/jsonx.cpp @@ -0,0 +1,207 @@ +// JSON to JSONx conversion example, using SAX API. +// JSONx is an IBM standard format to represent JSON as XML. +// https://www-01.ibm.com/support/knowledgecenter/SS9H2Y_7.1.0/com.ibm.dp.doc/json_jsonx.html +// This example parses JSON text from stdin with validation, +// and convert to JSONx format to stdout. +// Need compile with -D__STDC_FORMAT_MACROS for defining PRId64 and PRIu64 macros. + +#include "rapidjson/reader.h" +#include "rapidjson/stringbuffer.h" +#include "rapidjson/filereadstream.h" +#include "rapidjson/filewritestream.h" +#include "rapidjson/error/en.h" +#include + +using namespace rapidjson; + +// For simplicity, this example only read/write in UTF-8 encoding +template +class JsonxWriter { +public: + JsonxWriter(OutputStream& os) : os_(os), name_(), level_(0), hasName_(false) { + } + + bool Null() { + return WriteStartElement("null", true); + } + + bool Bool(bool b) { + return + WriteStartElement("boolean") && + WriteString(b ? "true" : "false") && + WriteEndElement("boolean"); + } + + bool Int(int i) { + char buffer[12]; + return WriteNumberElement(buffer, sprintf(buffer, "%d", i)); + } + + bool Uint(unsigned i) { + char buffer[11]; + return WriteNumberElement(buffer, sprintf(buffer, "%u", i)); + } + + bool Int64(int64_t i) { + char buffer[21]; + return WriteNumberElement(buffer, sprintf(buffer, "%" PRId64, i)); + } + + bool Uint64(uint64_t i) { + char buffer[21]; + return WriteNumberElement(buffer, sprintf(buffer, "%" PRIu64, i)); + } + + bool Double(double d) { + char buffer[30]; + return WriteNumberElement(buffer, sprintf(buffer, "%.17g", d)); + } + + bool RawNumber(const char* str, SizeType length, bool) { + return + WriteStartElement("number") && + WriteEscapedText(str, length) && + WriteEndElement("number"); + } + + bool String(const char* str, SizeType length, bool) { + return + WriteStartElement("string") && + WriteEscapedText(str, length) && + WriteEndElement("string"); + } + + bool StartObject() { + return WriteStartElement("object"); + } + + bool Key(const char* str, SizeType length, bool) { + // backup key to name_ + name_.Clear(); + for (SizeType i = 0; i < length; i++) + name_.Put(str[i]); + hasName_ = true; + return true; + } + + bool EndObject(SizeType) { + return WriteEndElement("object"); + } + + bool StartArray() { + return WriteStartElement("array"); + } + + bool EndArray(SizeType) { + return WriteEndElement("array"); + } + +private: + bool WriteString(const char* s) { + while (*s) + os_.Put(*s++); + return true; + } + + bool WriteEscapedAttributeValue(const char* s, size_t length) { + for (size_t i = 0; i < length; i++) { + switch (s[i]) { + case '&': WriteString("&"); break; + case '<': WriteString("<"); break; + case '"': WriteString("""); break; + default: os_.Put(s[i]); break; + } + } + return true; + } + + bool WriteEscapedText(const char* s, size_t length) { + for (size_t i = 0; i < length; i++) { + switch (s[i]) { + case '&': WriteString("&"); break; + case '<': WriteString("<"); break; + default: os_.Put(s[i]); break; + } + } + return true; + } + + bool WriteStartElement(const char* type, bool emptyElement = false) { + if (level_ == 0) + if (!WriteString("")) + return false; + + if (!WriteString(""); + else { + level_++; + return WriteString(">"); + } + } + + bool WriteEndElement(const char* type) { + if (!WriteString("")) + return false; + + // For the last end tag, flush the output stream. + if (--level_ == 0) + os_.Flush(); + + return true; + } + + bool WriteNumberElement(const char* buffer, int length) { + if (!WriteStartElement("number")) + return false; + for (int j = 0; j < length; j++) + os_.Put(buffer[j]); + return WriteEndElement("number"); + } + + OutputStream& os_; + StringBuffer name_; + unsigned level_; + bool hasName_; +}; + +int main(int, char*[]) { + // Prepare JSON reader and input stream. + Reader reader; + char readBuffer[65536]; + FileReadStream is(stdin, readBuffer, sizeof(readBuffer)); + + // Prepare JSON writer and output stream. + char writeBuffer[65536]; + FileWriteStream os(stdout, writeBuffer, sizeof(writeBuffer)); + JsonxWriter writer(os); + + // JSON reader parse from the input stream and let writer generate the output. + if (!reader.Parse(is, writer)) { + fprintf(stderr, "\nError(%u): %s\n", static_cast(reader.GetErrorOffset()), GetParseError_En(reader.GetParseErrorCode())); + return 1; + } + + return 0; +} diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/example/lookaheadparser/lookaheadparser.cpp b/graphics/asymptote/LspCpp/third_party/rapidjson/example/lookaheadparser/lookaheadparser.cpp new file mode 100644 index 0000000000..f627f4d863 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/example/lookaheadparser/lookaheadparser.cpp @@ -0,0 +1,350 @@ +#include "rapidjson/reader.h" +#include "rapidjson/document.h" +#include + +RAPIDJSON_DIAG_PUSH +#ifdef __GNUC__ +RAPIDJSON_DIAG_OFF(effc++) +#endif + +// This example demonstrates JSON token-by-token parsing with an API that is +// more direct; you don't need to design your logic around a handler object and +// callbacks. Instead, you retrieve values from the JSON stream by calling +// GetInt(), GetDouble(), GetString() and GetBool(), traverse into structures +// by calling EnterObject() and EnterArray(), and skip over unwanted data by +// calling SkipValue(). When you know your JSON's structure, this can be quite +// convenient. +// +// If you aren't sure of what's next in the JSON data, you can use PeekType() and +// PeekValue() to look ahead to the next object before reading it. +// +// If you call the wrong retrieval method--e.g. GetInt when the next JSON token is +// not an int, EnterObject or EnterArray when there isn't actually an object or array +// to read--the stream parsing will end immediately and no more data will be delivered. +// +// After calling EnterObject, you retrieve keys via NextObjectKey() and values via +// the normal getters. When NextObjectKey() returns null, you have exited the +// object, or you can call SkipObject() to skip to the end of the object +// immediately. If you fetch the entire object (i.e. NextObjectKey() returned null), +// you should not call SkipObject(). +// +// After calling EnterArray(), you must alternate between calling NextArrayValue() +// to see if the array has more data, and then retrieving values via the normal +// getters. You can call SkipArray() to skip to the end of the array immediately. +// If you fetch the entire array (i.e. NextArrayValue() returned null), +// you should not call SkipArray(). +// +// This parser uses in-situ strings, so the JSON buffer will be altered during the +// parse. + +using namespace rapidjson; + + +class LookaheadParserHandler { +public: + bool Null() { st_ = kHasNull; v_.SetNull(); return true; } + bool Bool(bool b) { st_ = kHasBool; v_.SetBool(b); return true; } + bool Int(int i) { st_ = kHasNumber; v_.SetInt(i); return true; } + bool Uint(unsigned u) { st_ = kHasNumber; v_.SetUint(u); return true; } + bool Int64(int64_t i) { st_ = kHasNumber; v_.SetInt64(i); return true; } + bool Uint64(uint64_t u) { st_ = kHasNumber; v_.SetUint64(u); return true; } + bool Double(double d) { st_ = kHasNumber; v_.SetDouble(d); return true; } + bool RawNumber(const char*, SizeType, bool) { return false; } + bool String(const char* str, SizeType length, bool) { st_ = kHasString; v_.SetString(str, length); return true; } + bool StartObject() { st_ = kEnteringObject; return true; } + bool Key(const char* str, SizeType length, bool) { st_ = kHasKey; v_.SetString(str, length); return true; } + bool EndObject(SizeType) { st_ = kExitingObject; return true; } + bool StartArray() { st_ = kEnteringArray; return true; } + bool EndArray(SizeType) { st_ = kExitingArray; return true; } + +protected: + LookaheadParserHandler(char* str); + void ParseNext(); + +protected: + enum LookaheadParsingState { + kInit, + kError, + kHasNull, + kHasBool, + kHasNumber, + kHasString, + kHasKey, + kEnteringObject, + kExitingObject, + kEnteringArray, + kExitingArray + }; + + Value v_; + LookaheadParsingState st_; + Reader r_; + InsituStringStream ss_; + + static const int parseFlags = kParseDefaultFlags | kParseInsituFlag; +}; + +LookaheadParserHandler::LookaheadParserHandler(char* str) : v_(), st_(kInit), r_(), ss_(str) { + r_.IterativeParseInit(); + ParseNext(); +} + +void LookaheadParserHandler::ParseNext() { + if (r_.HasParseError()) { + st_ = kError; + return; + } + + r_.IterativeParseNext(ss_, *this); +} + +class LookaheadParser : protected LookaheadParserHandler { +public: + LookaheadParser(char* str) : LookaheadParserHandler(str) {} + + bool EnterObject(); + bool EnterArray(); + const char* NextObjectKey(); + bool NextArrayValue(); + int GetInt(); + double GetDouble(); + const char* GetString(); + bool GetBool(); + void GetNull(); + + void SkipObject(); + void SkipArray(); + void SkipValue(); + Value* PeekValue(); + int PeekType(); // returns a rapidjson::Type, or -1 for no value (at end of object/array) + + bool IsValid() { return st_ != kError; } + +protected: + void SkipOut(int depth); +}; + +bool LookaheadParser::EnterObject() { + if (st_ != kEnteringObject) { + st_ = kError; + return false; + } + + ParseNext(); + return true; +} + +bool LookaheadParser::EnterArray() { + if (st_ != kEnteringArray) { + st_ = kError; + return false; + } + + ParseNext(); + return true; +} + +const char* LookaheadParser::NextObjectKey() { + if (st_ == kHasKey) { + const char* result = v_.GetString(); + ParseNext(); + return result; + } + + if (st_ != kExitingObject) { + st_ = kError; + return 0; + } + + ParseNext(); + return 0; +} + +bool LookaheadParser::NextArrayValue() { + if (st_ == kExitingArray) { + ParseNext(); + return false; + } + + if (st_ == kError || st_ == kExitingObject || st_ == kHasKey) { + st_ = kError; + return false; + } + + return true; +} + +int LookaheadParser::GetInt() { + if (st_ != kHasNumber || !v_.IsInt()) { + st_ = kError; + return 0; + } + + int result = v_.GetInt(); + ParseNext(); + return result; +} + +double LookaheadParser::GetDouble() { + if (st_ != kHasNumber) { + st_ = kError; + return 0.; + } + + double result = v_.GetDouble(); + ParseNext(); + return result; +} + +bool LookaheadParser::GetBool() { + if (st_ != kHasBool) { + st_ = kError; + return false; + } + + bool result = v_.GetBool(); + ParseNext(); + return result; +} + +void LookaheadParser::GetNull() { + if (st_ != kHasNull) { + st_ = kError; + return; + } + + ParseNext(); +} + +const char* LookaheadParser::GetString() { + if (st_ != kHasString) { + st_ = kError; + return 0; + } + + const char* result = v_.GetString(); + ParseNext(); + return result; +} + +void LookaheadParser::SkipOut(int depth) { + do { + if (st_ == kEnteringArray || st_ == kEnteringObject) { + ++depth; + } + else if (st_ == kExitingArray || st_ == kExitingObject) { + --depth; + } + else if (st_ == kError) { + return; + } + + ParseNext(); + } + while (depth > 0); +} + +void LookaheadParser::SkipValue() { + SkipOut(0); +} + +void LookaheadParser::SkipArray() { + SkipOut(1); +} + +void LookaheadParser::SkipObject() { + SkipOut(1); +} + +Value* LookaheadParser::PeekValue() { + if (st_ >= kHasNull && st_ <= kHasKey) { + return &v_; + } + + return 0; +} + +int LookaheadParser::PeekType() { + if (st_ >= kHasNull && st_ <= kHasKey) { + return v_.GetType(); + } + + if (st_ == kEnteringArray) { + return kArrayType; + } + + if (st_ == kEnteringObject) { + return kObjectType; + } + + return -1; +} + +//------------------------------------------------------------------------- + +int main() { + using namespace std; + + char json[] = " { \"hello\" : \"world\", \"t\" : true , \"f\" : false, \"n\": null," + "\"i\":123, \"pi\": 3.1416, \"a\":[-1, 2, 3, 4, \"array\", []], \"skipArrays\":[1, 2, [[[3]]]], " + "\"skipObject\":{ \"i\":0, \"t\":true, \"n\":null, \"d\":123.45 }, " + "\"skipNested\":[[[[{\"\":0}, {\"\":[-9.87]}]]], [], []], " + "\"skipString\":\"zzz\", \"reachedEnd\":null, \"t\":true }"; + + LookaheadParser r(json); + + RAPIDJSON_ASSERT(r.PeekType() == kObjectType); + + r.EnterObject(); + while (const char* key = r.NextObjectKey()) { + if (0 == strcmp(key, "hello")) { + RAPIDJSON_ASSERT(r.PeekType() == kStringType); + cout << key << ":" << r.GetString() << endl; + } + else if (0 == strcmp(key, "t") || 0 == strcmp(key, "f")) { + RAPIDJSON_ASSERT(r.PeekType() == kTrueType || r.PeekType() == kFalseType); + cout << key << ":" << r.GetBool() << endl; + continue; + } + else if (0 == strcmp(key, "n")) { + RAPIDJSON_ASSERT(r.PeekType() == kNullType); + r.GetNull(); + cout << key << endl; + continue; + } + else if (0 == strcmp(key, "pi")) { + RAPIDJSON_ASSERT(r.PeekType() == kNumberType); + cout << key << ":" << r.GetDouble() << endl; + continue; + } + else if (0 == strcmp(key, "a")) { + RAPIDJSON_ASSERT(r.PeekType() == kArrayType); + + r.EnterArray(); + + cout << key << ":[ "; + while (r.NextArrayValue()) { + if (r.PeekType() == kNumberType) { + cout << r.GetDouble() << " "; + } + else if (r.PeekType() == kStringType) { + cout << r.GetString() << " "; + } + else { + r.SkipArray(); + break; + } + } + + cout << "]" << endl; + } + else { + cout << key << ":skipped" << endl; + r.SkipValue(); + } + } + + return 0; +} + +RAPIDJSON_DIAG_POP diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/example/messagereader/messagereader.cpp b/graphics/asymptote/LspCpp/third_party/rapidjson/example/messagereader/messagereader.cpp new file mode 100644 index 0000000000..3399bc9400 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/example/messagereader/messagereader.cpp @@ -0,0 +1,105 @@ +// Reading a message JSON with Reader (SAX-style API). +// The JSON should be an object with key-string pairs. + +#include "rapidjson/reader.h" +#include "rapidjson/error/en.h" +#include +#include +#include + +using namespace std; +using namespace rapidjson; + +typedef map MessageMap; + +#if defined(__GNUC__) +RAPIDJSON_DIAG_PUSH +RAPIDJSON_DIAG_OFF(effc++) +#endif + +#ifdef __clang__ +RAPIDJSON_DIAG_PUSH +RAPIDJSON_DIAG_OFF(switch-enum) +#endif + +struct MessageHandler + : public BaseReaderHandler, MessageHandler> { + MessageHandler() : messages_(), state_(kExpectObjectStart), name_() {} + + bool StartObject() { + switch (state_) { + case kExpectObjectStart: + state_ = kExpectNameOrObjectEnd; + return true; + default: + return false; + } + } + + bool String(const char* str, SizeType length, bool) { + switch (state_) { + case kExpectNameOrObjectEnd: + name_ = string(str, length); + state_ = kExpectValue; + return true; + case kExpectValue: + messages_.insert(MessageMap::value_type(name_, string(str, length))); + state_ = kExpectNameOrObjectEnd; + return true; + default: + return false; + } + } + + bool EndObject(SizeType) { return state_ == kExpectNameOrObjectEnd; } + + bool Default() { return false; } // All other events are invalid. + + MessageMap messages_; + enum State { + kExpectObjectStart, + kExpectNameOrObjectEnd, + kExpectValue + }state_; + std::string name_; +}; + +#if defined(__GNUC__) +RAPIDJSON_DIAG_POP +#endif + +#ifdef __clang__ +RAPIDJSON_DIAG_POP +#endif + +static void ParseMessages(const char* json, MessageMap& messages) { + Reader reader; + MessageHandler handler; + StringStream ss(json); + if (reader.Parse(ss, handler)) + messages.swap(handler.messages_); // Only change it if success. + else { + ParseErrorCode e = reader.GetParseErrorCode(); + size_t o = reader.GetErrorOffset(); + cout << "Error: " << GetParseError_En(e) << endl;; + cout << " at offset " << o << " near '" << string(json).substr(o, 10) << "...'" << endl; + } +} + +int main() { + MessageMap messages; + + const char* json1 = "{ \"greeting\" : \"Hello!\", \"farewell\" : \"bye-bye!\" }"; + cout << json1 << endl; + ParseMessages(json1, messages); + + for (MessageMap::const_iterator itr = messages.begin(); itr != messages.end(); ++itr) + cout << itr->first << ": " << itr->second << endl; + + cout << endl << "Parse a JSON with invalid schema." << endl; + const char* json2 = "{ \"greeting\" : \"Hello!\", \"farewell\" : \"bye-bye!\", \"foo\" : {} }"; + cout << json2 << endl; + ParseMessages(json2, messages); + + return 0; +} diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/example/parsebyparts/parsebyparts.cpp b/graphics/asymptote/LspCpp/third_party/rapidjson/example/parsebyparts/parsebyparts.cpp new file mode 100644 index 0000000000..ff735394ec --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/example/parsebyparts/parsebyparts.cpp @@ -0,0 +1,176 @@ +// Example of parsing JSON to document by parts. + +// Using C++11 threads +// Temporarily disable for clang (older version) due to incompatibility with libstdc++ +#if (__cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1700)) && !defined(__clang__) + +#include "rapidjson/document.h" +#include "rapidjson/error/en.h" +#include "rapidjson/writer.h" +#include "rapidjson/ostreamwrapper.h" +#include +#include +#include +#include + +using namespace rapidjson; + +template +class AsyncDocumentParser { +public: + AsyncDocumentParser(Document& d) + : stream_(*this) + , d_(d) + , parseThread_() + , mutex_() + , notEmpty_() + , finish_() + , completed_() + { + // Create and execute thread after all member variables are initialized. + parseThread_ = std::thread(&AsyncDocumentParser::Parse, this); + } + + ~AsyncDocumentParser() { + if (!parseThread_.joinable()) + return; + + { + std::unique_lock lock(mutex_); + + // Wait until the buffer is read up (or parsing is completed) + while (!stream_.Empty() && !completed_) + finish_.wait(lock); + + // Automatically append '\0' as the terminator in the stream. + static const char terminator[] = ""; + stream_.src_ = terminator; + stream_.end_ = terminator + 1; + notEmpty_.notify_one(); // unblock the AsyncStringStream + } + + parseThread_.join(); + } + + void ParsePart(const char* buffer, size_t length) { + std::unique_lock lock(mutex_); + + // Wait until the buffer is read up (or parsing is completed) + while (!stream_.Empty() && !completed_) + finish_.wait(lock); + + // Stop further parsing if the parsing process is completed. + if (completed_) + return; + + // Set the buffer to stream and unblock the AsyncStringStream + stream_.src_ = buffer; + stream_.end_ = buffer + length; + notEmpty_.notify_one(); + } + +private: + void Parse() { + d_.ParseStream(stream_); + + // The stream may not be fully read, notify finish anyway to unblock ParsePart() + std::unique_lock lock(mutex_); + completed_ = true; // Parsing process is completed + finish_.notify_one(); // Unblock ParsePart() or destructor if they are waiting. + } + + struct AsyncStringStream { + typedef char Ch; + + AsyncStringStream(AsyncDocumentParser& parser) : parser_(parser), src_(), end_(), count_() {} + + char Peek() const { + std::unique_lock lock(parser_.mutex_); + + // If nothing in stream, block to wait. + while (Empty()) + parser_.notEmpty_.wait(lock); + + return *src_; + } + + char Take() { + std::unique_lock lock(parser_.mutex_); + + // If nothing in stream, block to wait. + while (Empty()) + parser_.notEmpty_.wait(lock); + + count_++; + char c = *src_++; + + // If all stream is read up, notify that the stream is finish. + if (Empty()) + parser_.finish_.notify_one(); + + return c; + } + + size_t Tell() const { return count_; } + + // Not implemented + char* PutBegin() { return 0; } + void Put(char) {} + void Flush() {} + size_t PutEnd(char*) { return 0; } + + bool Empty() const { return src_ == end_; } + + AsyncDocumentParser& parser_; + const char* src_; //!< Current read position. + const char* end_; //!< End of buffer + size_t count_; //!< Number of characters taken so far. + }; + + AsyncStringStream stream_; + Document& d_; + std::thread parseThread_; + std::mutex mutex_; + std::condition_variable notEmpty_; + std::condition_variable finish_; + bool completed_; +}; + +int main() { + Document d; + + { + AsyncDocumentParser<> parser(d); + + const char json1[] = " { \"hello\" : \"world\", \"t\" : tr"; + //const char json1[] = " { \"hello\" : \"world\", \"t\" : trX"; // For test parsing error + const char json2[] = "ue, \"f\" : false, \"n\": null, \"i\":123, \"pi\": 3.14"; + const char json3[] = "16, \"a\":[1, 2, 3, 4] } "; + + parser.ParsePart(json1, sizeof(json1) - 1); + parser.ParsePart(json2, sizeof(json2) - 1); + parser.ParsePart(json3, sizeof(json3) - 1); + } + + if (d.HasParseError()) { + std::cout << "Error at offset " << d.GetErrorOffset() << ": " << GetParseError_En(d.GetParseError()) << std::endl; + return EXIT_FAILURE; + } + + // Stringify the JSON to cout + OStreamWrapper os(std::cout); + Writer writer(os); + d.Accept(writer); + std::cout << std::endl; + + return EXIT_SUCCESS; +} + +#else // Not supporting C++11 + +#include +int main() { + std::cout << "This example requires C++11 compiler" << std::endl; +} + +#endif diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/example/pretty/pretty.cpp b/graphics/asymptote/LspCpp/third_party/rapidjson/example/pretty/pretty.cpp new file mode 100644 index 0000000000..2feff5d02e --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/example/pretty/pretty.cpp @@ -0,0 +1,30 @@ +// JSON pretty formatting example +// This example can only handle UTF-8. For handling other encodings, see prettyauto example. + +#include "rapidjson/reader.h" +#include "rapidjson/prettywriter.h" +#include "rapidjson/filereadstream.h" +#include "rapidjson/filewritestream.h" +#include "rapidjson/error/en.h" + +using namespace rapidjson; + +int main(int, char*[]) { + // Prepare reader and input stream. + Reader reader; + char readBuffer[65536]; + FileReadStream is(stdin, readBuffer, sizeof(readBuffer)); + + // Prepare writer and output stream. + char writeBuffer[65536]; + FileWriteStream os(stdout, writeBuffer, sizeof(writeBuffer)); + PrettyWriter writer(os); + + // JSON reader parse from the input stream and let writer generate the output. + if (!reader.Parse(is, writer)) { + fprintf(stderr, "\nError(%u): %s\n", static_cast(reader.GetErrorOffset()), GetParseError_En(reader.GetParseErrorCode())); + return 1; + } + + return 0; +} diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/example/prettyauto/prettyauto.cpp b/graphics/asymptote/LspCpp/third_party/rapidjson/example/prettyauto/prettyauto.cpp new file mode 100644 index 0000000000..1687bae555 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/example/prettyauto/prettyauto.cpp @@ -0,0 +1,56 @@ +// JSON pretty formatting example +// This example can handle UTF-8/UTF-16LE/UTF-16BE/UTF-32LE/UTF-32BE. +// The input firstly convert to UTF8, and then write to the original encoding with pretty formatting. + +#include "rapidjson/reader.h" +#include "rapidjson/prettywriter.h" +#include "rapidjson/filereadstream.h" +#include "rapidjson/filewritestream.h" +#include "rapidjson/encodedstream.h" // NEW +#include "rapidjson/error/en.h" +#ifdef _WIN32 +#include +#include +#endif + +using namespace rapidjson; + +int main(int, char*[]) { +#ifdef _WIN32 + // Prevent Windows converting between CR+LF and LF + _setmode(_fileno(stdin), _O_BINARY); // NEW + _setmode(_fileno(stdout), _O_BINARY); // NEW +#endif + + // Prepare reader and input stream. + //Reader reader; + GenericReader, UTF8<> > reader; // CHANGED + char readBuffer[65536]; + FileReadStream is(stdin, readBuffer, sizeof(readBuffer)); + AutoUTFInputStream eis(is); // NEW + + // Prepare writer and output stream. + char writeBuffer[65536]; + FileWriteStream os(stdout, writeBuffer, sizeof(writeBuffer)); + +#if 1 + // Use the same Encoding of the input. Also use BOM according to input. + typedef AutoUTFOutputStream OutputStream; // NEW + OutputStream eos(os, eis.GetType(), eis.HasBOM()); // NEW + PrettyWriter, AutoUTF > writer(eos); // CHANGED +#else + // You may also use static bound encoding type, such as output to UTF-16LE with BOM + typedef EncodedOutputStream,FileWriteStream> OutputStream; // NEW + OutputStream eos(os, true); // NEW + PrettyWriter, UTF16LE<> > writer(eos); // CHANGED +#endif + + // JSON reader parse from the input stream and let writer generate the output. + //if (!reader.Parse(is, writer)) { + if (!reader.Parse(eis, writer)) { // CHANGED + fprintf(stderr, "\nError(%u): %s\n", static_cast(reader.GetErrorOffset()), GetParseError_En(reader.GetParseErrorCode())); + return 1; + } + + return 0; +} diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/example/schemavalidator/schemavalidator.cpp b/graphics/asymptote/LspCpp/third_party/rapidjson/example/schemavalidator/schemavalidator.cpp new file mode 100644 index 0000000000..8c7e26c795 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/example/schemavalidator/schemavalidator.cpp @@ -0,0 +1,198 @@ +// Schema Validator example + +// The example validates JSON text from stdin with a JSON schema specified in the argument. + +#define RAPIDJSON_HAS_STDSTRING 1 + +#include "rapidjson/error/en.h" +#include "rapidjson/filereadstream.h" +#include "rapidjson/schema.h" +#include "rapidjson/stringbuffer.h" +#include "rapidjson/prettywriter.h" +#include +#include +#include + +using namespace rapidjson; + +typedef GenericValue, CrtAllocator > ValueType; + +// Forward ref +static void CreateErrorMessages(const ValueType& errors, size_t depth, const char* context); + +// Convert GenericValue to std::string +static std::string GetString(const ValueType& val) { + std::ostringstream s; + if (val.IsString()) + s << val.GetString(); + else if (val.IsDouble()) + s << val.GetDouble(); + else if (val.IsUint()) + s << val.GetUint(); + else if (val.IsInt()) + s << val.GetInt(); + else if (val.IsUint64()) + s << val.GetUint64(); + else if (val.IsInt64()) + s << val.GetInt64(); + else if (val.IsBool() && val.GetBool()) + s << "true"; + else if (val.IsBool()) + s << "false"; + else if (val.IsFloat()) + s << val.GetFloat(); + return s.str();} + +// Create the error message for a named error +// The error object can either be empty or contain at least member properties: +// {"errorCode": , "instanceRef": "", "schemaRef": "" } +// Additional properties may be present for use as inserts. +// An "errors" property may be present if there are child errors. +static void HandleError(const char* errorName, const ValueType& error, size_t depth, const char* context) { + if (!error.ObjectEmpty()) { + // Get error code and look up error message text (English) + int code = error["errorCode"].GetInt(); + std::string message(GetValidateError_En(static_cast(code))); + // For each member property in the error, see if its name exists as an insert in the error message and if so replace with the stringified property value + // So for example - "Number '%actual' is not a multiple of the 'multipleOf' value '%expected'." - we would expect "actual" and "expected" members. + for (ValueType::ConstMemberIterator insertsItr = error.MemberBegin(); + insertsItr != error.MemberEnd(); ++insertsItr) { + std::string insertName("%"); + insertName += insertsItr->name.GetString(); // eg "%actual" + size_t insertPos = message.find(insertName); + if (insertPos != std::string::npos) { + std::string insertString(""); + const ValueType &insert = insertsItr->value; + if (insert.IsArray()) { + // Member is an array so create comma-separated list of items for the insert string + for (ValueType::ConstValueIterator itemsItr = insert.Begin(); itemsItr != insert.End(); ++itemsItr) { + if (itemsItr != insert.Begin()) insertString += ","; + insertString += GetString(*itemsItr); + } + } else { + insertString += GetString(insert); + } + message.replace(insertPos, insertName.length(), insertString); + } + } + // Output error message, references, context + std::string indent(depth * 2, ' '); + std::cout << indent << "Error Name: " << errorName << std::endl; + std::cout << indent << "Message: " << message.c_str() << std::endl; + std::cout << indent << "Instance: " << error["instanceRef"].GetString() << std::endl; + std::cout << indent << "Schema: " << error["schemaRef"].GetString() << std::endl; + if (depth > 0) std::cout << indent << "Context: " << context << std::endl; + std::cout << std::endl; + + // If child errors exist, apply the process recursively to each error structure. + // This occurs for "oneOf", "allOf", "anyOf" and "dependencies" errors, so pass the error name as context. + if (error.HasMember("errors")) { + depth++; + const ValueType &childErrors = error["errors"]; + if (childErrors.IsArray()) { + // Array - each item is an error structure - example + // "anyOf": {"errorCode": ..., "errors":[{"pattern": {"errorCode\": ...\"}}, {"pattern": {"errorCode\": ...}}] + for (ValueType::ConstValueIterator errorsItr = childErrors.Begin(); + errorsItr != childErrors.End(); ++errorsItr) { + CreateErrorMessages(*errorsItr, depth, errorName); + } + } else if (childErrors.IsObject()) { + // Object - each member is an error structure - example + // "dependencies": {"errorCode": ..., "errors": {"address": {"required": {"errorCode": ...}}, "name": {"required": {"errorCode": ...}}} + for (ValueType::ConstMemberIterator propsItr = childErrors.MemberBegin(); + propsItr != childErrors.MemberEnd(); ++propsItr) { + CreateErrorMessages(propsItr->value, depth, errorName); + } + } + } + } +} + +// Create error message for all errors in an error structure +// Context is used to indicate whether the error structure has a parent 'dependencies', 'allOf', 'anyOf' or 'oneOf' error +static void CreateErrorMessages(const ValueType& errors, size_t depth = 0, const char* context = 0) { + // Each member property contains one or more errors of a given type + for (ValueType::ConstMemberIterator errorTypeItr = errors.MemberBegin(); errorTypeItr != errors.MemberEnd(); ++errorTypeItr) { + const char* errorName = errorTypeItr->name.GetString(); + const ValueType& errorContent = errorTypeItr->value; + if (errorContent.IsArray()) { + // Member is an array where each item is an error - eg "type": [{"errorCode": ...}, {"errorCode": ...}] + for (ValueType::ConstValueIterator contentItr = errorContent.Begin(); contentItr != errorContent.End(); ++contentItr) { + HandleError(errorName, *contentItr, depth, context); + } + } else if (errorContent.IsObject()) { + // Member is an object which is a single error - eg "type": {"errorCode": ... } + HandleError(errorName, errorContent, depth, context); + } + } +} + +int main(int argc, char *argv[]) { + if (argc != 2) { + fprintf(stderr, "Usage: schemavalidator schema.json < input.json\n"); + return EXIT_FAILURE; + } + + // Read a JSON schema from file into Document + Document d; + char buffer[4096]; + + { + FILE *fp = fopen(argv[1], "r"); + if (!fp) { + printf("Schema file '%s' not found\n", argv[1]); + return -1; + } + FileReadStream fs(fp, buffer, sizeof(buffer)); + d.ParseStream(fs); + if (d.HasParseError()) { + fprintf(stderr, "Schema file '%s' is not a valid JSON\n", argv[1]); + fprintf(stderr, "Error(offset %u): %s\n", + static_cast(d.GetErrorOffset()), + GetParseError_En(d.GetParseError())); + fclose(fp); + return EXIT_FAILURE; + } + fclose(fp); + } + + // Then convert the Document into SchemaDocument + SchemaDocument sd(d); + + // Use reader to parse the JSON in stdin, and forward SAX events to validator + SchemaValidator validator(sd); + Reader reader; + FileReadStream is(stdin, buffer, sizeof(buffer)); + if (!reader.Parse(is, validator) && reader.GetParseErrorCode() != kParseErrorTermination) { + // Schema validator error would cause kParseErrorTermination, which will handle it in next step. + fprintf(stderr, "Input is not a valid JSON\n"); + fprintf(stderr, "Error(offset %u): %s\n", + static_cast(reader.GetErrorOffset()), + GetParseError_En(reader.GetParseErrorCode())); + } + + // Check the validation result + if (validator.IsValid()) { + printf("Input JSON is valid.\n"); + return EXIT_SUCCESS; + } + else { + printf("Input JSON is invalid.\n"); + StringBuffer sb; + validator.GetInvalidSchemaPointer().StringifyUriFragment(sb); + fprintf(stderr, "Invalid schema: %s\n", sb.GetString()); + fprintf(stderr, "Invalid keyword: %s\n", validator.GetInvalidSchemaKeyword()); + fprintf(stderr, "Invalid code: %d\n", validator.GetInvalidSchemaCode()); + fprintf(stderr, "Invalid message: %s\n", GetValidateError_En(validator.GetInvalidSchemaCode())); + sb.Clear(); + validator.GetInvalidDocumentPointer().StringifyUriFragment(sb); + fprintf(stderr, "Invalid document: %s\n", sb.GetString()); + // Detailed violation report is available as a JSON value + sb.Clear(); + PrettyWriter w(sb); + validator.GetError().Accept(w); + fprintf(stderr, "Error report:\n%s\n", sb.GetString()); + CreateErrorMessages(validator.GetError()); + return EXIT_FAILURE; + } +} diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/example/serialize/serialize.cpp b/graphics/asymptote/LspCpp/third_party/rapidjson/example/serialize/serialize.cpp new file mode 100644 index 0000000000..12d87151e6 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/example/serialize/serialize.cpp @@ -0,0 +1,173 @@ +// Serialize example +// This example shows writing JSON string with writer directly. + +#include "rapidjson/prettywriter.h" // for stringify JSON +#include +#include +#include + +using namespace rapidjson; + +class Person { +public: + Person(const std::string& name, unsigned age) : name_(name), age_(age) {} + Person(const Person& rhs) : name_(rhs.name_), age_(rhs.age_) {} + virtual ~Person(); + + Person& operator=(const Person& rhs) { + name_ = rhs.name_; + age_ = rhs.age_; + return *this; + } + +protected: + template + void Serialize(Writer& writer) const { + // This base class just write out name-value pairs, without wrapping within an object. + writer.String("name"); +#if RAPIDJSON_HAS_STDSTRING + writer.String(name_); +#else + writer.String(name_.c_str(), static_cast(name_.length())); // Supplying length of string is faster. +#endif + writer.String("age"); + writer.Uint(age_); + } + +private: + std::string name_; + unsigned age_; +}; + +Person::~Person() { +} + +class Education { +public: + Education(const std::string& school, double GPA) : school_(school), GPA_(GPA) {} + Education(const Education& rhs) : school_(rhs.school_), GPA_(rhs.GPA_) {} + + template + void Serialize(Writer& writer) const { + writer.StartObject(); + + writer.String("school"); +#if RAPIDJSON_HAS_STDSTRING + writer.String(school_); +#else + writer.String(school_.c_str(), static_cast(school_.length())); +#endif + + writer.String("GPA"); + writer.Double(GPA_); + + writer.EndObject(); + } + +private: + std::string school_; + double GPA_; +}; + +class Dependent : public Person { +public: + Dependent(const std::string& name, unsigned age, Education* education = 0) : Person(name, age), education_(education) {} + Dependent(const Dependent& rhs) : Person(rhs), education_(0) { education_ = (rhs.education_ == 0) ? 0 : new Education(*rhs.education_); } + virtual ~Dependent(); + + Dependent& operator=(const Dependent& rhs) { + if (this == &rhs) + return *this; + delete education_; + education_ = (rhs.education_ == 0) ? 0 : new Education(*rhs.education_); + return *this; + } + + template + void Serialize(Writer& writer) const { + writer.StartObject(); + + Person::Serialize(writer); + + writer.String("education"); + if (education_) + education_->Serialize(writer); + else + writer.Null(); + + writer.EndObject(); + } + +private: + + Education *education_; +}; + +Dependent::~Dependent() { + delete education_; +} + +class Employee : public Person { +public: + Employee(const std::string& name, unsigned age, bool married) : Person(name, age), dependents_(), married_(married) {} + Employee(const Employee& rhs) : Person(rhs), dependents_(rhs.dependents_), married_(rhs.married_) {} + virtual ~Employee(); + + Employee& operator=(const Employee& rhs) { + static_cast(*this) = rhs; + dependents_ = rhs.dependents_; + married_ = rhs.married_; + return *this; + } + + void AddDependent(const Dependent& dependent) { + dependents_.push_back(dependent); + } + + template + void Serialize(Writer& writer) const { + writer.StartObject(); + + Person::Serialize(writer); + + writer.String("married"); + writer.Bool(married_); + + writer.String(("dependents")); + writer.StartArray(); + for (std::vector::const_iterator dependentItr = dependents_.begin(); dependentItr != dependents_.end(); ++dependentItr) + dependentItr->Serialize(writer); + writer.EndArray(); + + writer.EndObject(); + } + +private: + std::vector dependents_; + bool married_; +}; + +Employee::~Employee() { +} + +int main(int, char*[]) { + std::vector employees; + + employees.push_back(Employee("Milo YIP", 34, true)); + employees.back().AddDependent(Dependent("Lua YIP", 3, new Education("Happy Kindergarten", 3.5))); + employees.back().AddDependent(Dependent("Mio YIP", 1)); + + employees.push_back(Employee("Percy TSE", 30, false)); + + StringBuffer sb; + PrettyWriter writer(sb); + + writer.StartArray(); + for (std::vector::const_iterator employeeItr = employees.begin(); employeeItr != employees.end(); ++employeeItr) + employeeItr->Serialize(writer); + writer.EndArray(); + + puts(sb.GetString()); + + return 0; +} diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/example/simpledom/simpledom.cpp b/graphics/asymptote/LspCpp/third_party/rapidjson/example/simpledom/simpledom.cpp new file mode 100644 index 0000000000..80384199a9 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/example/simpledom/simpledom.cpp @@ -0,0 +1,29 @@ +// JSON simple example +// This example does not handle errors. + +#include "rapidjson/document.h" +#include "rapidjson/writer.h" +#include "rapidjson/stringbuffer.h" +#include + +using namespace rapidjson; + +int main() { + // 1. Parse a JSON string into DOM. + const char* json = "{\"project\":\"rapidjson\",\"stars\":10}"; + Document d; + d.Parse(json); + + // 2. Modify it by DOM. + Value& s = d["stars"]; + s.SetInt(s.GetInt() + 1); + + // 3. Stringify the DOM + StringBuffer buffer; + Writer writer(buffer); + d.Accept(writer); + + // Output {"project":"rapidjson","stars":11} + std::cout << buffer.GetString() << std::endl; + return 0; +} diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/example/simplepullreader/simplepullreader.cpp b/graphics/asymptote/LspCpp/third_party/rapidjson/example/simplepullreader/simplepullreader.cpp new file mode 100644 index 0000000000..a4fb1161a4 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/example/simplepullreader/simplepullreader.cpp @@ -0,0 +1,53 @@ +#include "rapidjson/reader.h" +#include +#include + +using namespace rapidjson; +using namespace std; + +// If you can require C++11, you could use std::to_string here +template std::string stringify(T x) { + std::stringstream ss; + ss << x; + return ss.str(); +} + +struct MyHandler { + const char* type; + std::string data; + + MyHandler() : type(), data() {} + + bool Null() { type = "Null"; data.clear(); return true; } + bool Bool(bool b) { type = "Bool:"; data = b? "true": "false"; return true; } + bool Int(int i) { type = "Int:"; data = stringify(i); return true; } + bool Uint(unsigned u) { type = "Uint:"; data = stringify(u); return true; } + bool Int64(int64_t i) { type = "Int64:"; data = stringify(i); return true; } + bool Uint64(uint64_t u) { type = "Uint64:"; data = stringify(u); return true; } + bool Double(double d) { type = "Double:"; data = stringify(d); return true; } + bool RawNumber(const char* str, SizeType length, bool) { type = "Number:"; data = std::string(str, length); return true; } + bool String(const char* str, SizeType length, bool) { type = "String:"; data = std::string(str, length); return true; } + bool StartObject() { type = "StartObject"; data.clear(); return true; } + bool Key(const char* str, SizeType length, bool) { type = "Key:"; data = std::string(str, length); return true; } + bool EndObject(SizeType memberCount) { type = "EndObject:"; data = stringify(memberCount); return true; } + bool StartArray() { type = "StartArray"; data.clear(); return true; } + bool EndArray(SizeType elementCount) { type = "EndArray:"; data = stringify(elementCount); return true; } +private: + MyHandler(const MyHandler& noCopyConstruction); + MyHandler& operator=(const MyHandler& noAssignment); +}; + +int main() { + const char json[] = " { \"hello\" : \"world\", \"t\" : true , \"f\" : false, \"n\": null, \"i\":123, \"pi\": 3.1416, \"a\":[1, 2, 3, 4] } "; + + MyHandler handler; + Reader reader; + StringStream ss(json); + reader.IterativeParseInit(); + while (!reader.IterativeParseComplete()) { + reader.IterativeParseNext(ss, handler); + cout << handler.type << handler.data << endl; + } + + return 0; +} diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/example/simplereader/simplereader.cpp b/graphics/asymptote/LspCpp/third_party/rapidjson/example/simplereader/simplereader.cpp new file mode 100644 index 0000000000..5aae8a1c0a --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/example/simplereader/simplereader.cpp @@ -0,0 +1,42 @@ +#include "rapidjson/reader.h" +#include + +using namespace rapidjson; +using namespace std; + +struct MyHandler { + bool Null() { cout << "Null()" << endl; return true; } + bool Bool(bool b) { cout << "Bool(" << boolalpha << b << ")" << endl; return true; } + bool Int(int i) { cout << "Int(" << i << ")" << endl; return true; } + bool Uint(unsigned u) { cout << "Uint(" << u << ")" << endl; return true; } + bool Int64(int64_t i) { cout << "Int64(" << i << ")" << endl; return true; } + bool Uint64(uint64_t u) { cout << "Uint64(" << u << ")" << endl; return true; } + bool Double(double d) { cout << "Double(" << d << ")" << endl; return true; } + bool RawNumber(const char* str, SizeType length, bool copy) { + cout << "Number(" << str << ", " << length << ", " << boolalpha << copy << ")" << endl; + return true; + } + bool String(const char* str, SizeType length, bool copy) { + cout << "String(" << str << ", " << length << ", " << boolalpha << copy << ")" << endl; + return true; + } + bool StartObject() { cout << "StartObject()" << endl; return true; } + bool Key(const char* str, SizeType length, bool copy) { + cout << "Key(" << str << ", " << length << ", " << boolalpha << copy << ")" << endl; + return true; + } + bool EndObject(SizeType memberCount) { cout << "EndObject(" << memberCount << ")" << endl; return true; } + bool StartArray() { cout << "StartArray()" << endl; return true; } + bool EndArray(SizeType elementCount) { cout << "EndArray(" << elementCount << ")" << endl; return true; } +}; + +int main() { + const char json[] = " { \"hello\" : \"world\", \"t\" : true , \"f\" : false, \"n\": null, \"i\":123, \"pi\": 3.1416, \"a\":[1, 2, 3, 4] } "; + + MyHandler handler; + Reader reader; + StringStream ss(json); + reader.Parse(ss, handler); + + return 0; +} diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/example/simplewriter/simplewriter.cpp b/graphics/asymptote/LspCpp/third_party/rapidjson/example/simplewriter/simplewriter.cpp new file mode 100644 index 0000000000..8d1275c292 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/example/simplewriter/simplewriter.cpp @@ -0,0 +1,36 @@ +#include "rapidjson/writer.h" +#include "rapidjson/stringbuffer.h" +#include + +using namespace rapidjson; +using namespace std; + +int main() { + StringBuffer s; + Writer writer(s); + + writer.StartObject(); // Between StartObject()/EndObject(), + writer.Key("hello"); // output a key, + writer.String("world"); // follow by a value. + writer.Key("t"); + writer.Bool(true); + writer.Key("f"); + writer.Bool(false); + writer.Key("n"); + writer.Null(); + writer.Key("i"); + writer.Uint(123); + writer.Key("pi"); + writer.Double(3.1416); + writer.Key("a"); + writer.StartArray(); // Between StartArray()/EndArray(), + for (unsigned i = 0; i < 4; i++) + writer.Uint(i); // all values are elements of the array. + writer.EndArray(); + writer.EndObject(); + + // {"hello":"world","t":true,"f":false,"n":null,"i":123,"pi":3.1416,"a":[0,1,2,3]} + cout << s.GetString() << endl; + + return 0; +} diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/example/sortkeys/sortkeys.cpp b/graphics/asymptote/LspCpp/third_party/rapidjson/example/sortkeys/sortkeys.cpp new file mode 100644 index 0000000000..7ede9fb938 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/example/sortkeys/sortkeys.cpp @@ -0,0 +1,62 @@ +#include "rapidjson/document.h" +#include "rapidjson/filewritestream.h" +#include + +#include +#include + +using namespace rapidjson; +using namespace std; + +static void printIt(const Value &doc) { + char writeBuffer[65536]; + FileWriteStream os(stdout, writeBuffer, sizeof(writeBuffer)); + PrettyWriter writer(os); + doc.Accept(writer); + cout << endl; +} + +struct NameComparator { + bool operator()(const Value::Member &lhs, const Value::Member &rhs) const { + return (strcmp(lhs.name.GetString(), rhs.name.GetString()) < 0); + } +}; + +int main() { + Document d(kObjectType); + Document::AllocatorType &allocator = d.GetAllocator(); + + d.AddMember("zeta", Value().SetBool(false), allocator); + d.AddMember("gama", Value().SetString("test string", allocator), allocator); + d.AddMember("delta", Value().SetInt(123), allocator); + d.AddMember("alpha", Value(kArrayType).Move(), allocator); + + printIt(d); + +/* +{ + "zeta": false, + "gama": "test string", + "delta": 123, + "alpha": [] +} +*/ + +// C++11 supports std::move() of Value so it always have no problem for std::sort(). +// Some C++03 implementations of std::sort() requires copy constructor which causes compilation error. +// Needs a sorting function only depends on std::swap() instead. +#if __cplusplus >= 201103L || (!defined(__GLIBCXX__) && (!defined(_MSC_VER) || _MSC_VER >= 1900)) + std::sort(d.MemberBegin(), d.MemberEnd(), NameComparator()); + + printIt(d); + +/* +{ + "alpha": [], + "delta": 123, + "gama": "test string", + "zeta": false +} +*/ +#endif +} diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/example/traverseaspointer.cpp b/graphics/asymptote/LspCpp/third_party/rapidjson/example/traverseaspointer.cpp new file mode 100644 index 0000000000..7e0c89923e --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/example/traverseaspointer.cpp @@ -0,0 +1,39 @@ +#include "rapidjson/document.h" +#include "rapidjson/filereadstream.h" +#include "rapidjson/pointer.h" +#include "rapidjson/stringbuffer.h" +#include + +using namespace rapidjson; + +void traverse(const Value& v, const Pointer& p) { + StringBuffer sb; + p.Stringify(sb); + std::cout << sb.GetString() << std::endl; + + switch (v.GetType()) { + case kArrayType: + for (SizeType i = 0; i != v.Size(); ++i) + traverse(v[i], p.Append(i)); + break; + case kObjectType: + for (Value::ConstMemberIterator m = v.MemberBegin(); m != v.MemberEnd(); ++m) + traverse(m->value, p.Append(m->name.GetString(), m->name.GetStringLength())); + break; + default: + break; + } +} + +int main(int, char*[]) { + char readBuffer[65536]; + FileReadStream is(stdin, readBuffer, sizeof(readBuffer)); + + Document d; + d.ParseStream(is); + + Pointer root; + traverse(d, root); + + return 0; +} diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/example/tutorial/tutorial.cpp b/graphics/asymptote/LspCpp/third_party/rapidjson/example/tutorial/tutorial.cpp new file mode 100644 index 0000000000..d6021c6689 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/example/tutorial/tutorial.cpp @@ -0,0 +1,151 @@ +// Hello World example +// This example shows basic usage of DOM-style API. + +#include "rapidjson/document.h" // rapidjson's DOM-style API +#include "rapidjson/prettywriter.h" // for stringify JSON +#include + +using namespace rapidjson; +using namespace std; + +int main(int, char*[]) { + //////////////////////////////////////////////////////////////////////////// + // 1. Parse a JSON text string to a document. + + const char json[] = " { \"hello\" : \"world\", \"t\" : true , \"f\" : false, \"n\": null, \"i\":123, \"pi\": 3.1416, \"a\":[1, 2, 3, 4] } "; + printf("Original JSON:\n %s\n", json); + + Document document; // Default template parameter uses UTF8 and MemoryPoolAllocator. + +#if 0 + // "normal" parsing, decode strings to new buffers. Can use other input stream via ParseStream(). + if (document.Parse(json).HasParseError()) + return 1; +#else + // In-situ parsing, decode strings directly in the source string. Source must be string. + char buffer[sizeof(json)]; + memcpy(buffer, json, sizeof(json)); + if (document.ParseInsitu(buffer).HasParseError()) + return 1; +#endif + + printf("\nParsing to document succeeded.\n"); + + //////////////////////////////////////////////////////////////////////////// + // 2. Access values in document. + + printf("\nAccess values in document:\n"); + assert(document.IsObject()); // Document is a JSON value represents the root of DOM. Root can be either an object or array. + + assert(document.HasMember("hello")); + assert(document["hello"].IsString()); + printf("hello = %s\n", document["hello"].GetString()); + + // Since version 0.2, you can use single lookup to check the existing of member and its value: + Value::MemberIterator hello = document.FindMember("hello"); + assert(hello != document.MemberEnd()); + assert(hello->value.IsString()); + assert(strcmp("world", hello->value.GetString()) == 0); + (void)hello; + + assert(document["t"].IsBool()); // JSON true/false are bool. Can also uses more specific function IsTrue(). + printf("t = %s\n", document["t"].GetBool() ? "true" : "false"); + + assert(document["f"].IsBool()); + printf("f = %s\n", document["f"].GetBool() ? "true" : "false"); + + printf("n = %s\n", document["n"].IsNull() ? "null" : "?"); + + assert(document["i"].IsNumber()); // Number is a JSON type, but C++ needs more specific type. + assert(document["i"].IsInt()); // In this case, IsUint()/IsInt64()/IsUint64() also return true. + printf("i = %d\n", document["i"].GetInt()); // Alternative (int)document["i"] + + assert(document["pi"].IsNumber()); + assert(document["pi"].IsDouble()); + printf("pi = %g\n", document["pi"].GetDouble()); + + { + const Value& a = document["a"]; // Using a reference for consecutive access is handy and faster. + assert(a.IsArray()); + for (SizeType i = 0; i < a.Size(); i++) // rapidjson uses SizeType instead of size_t. + printf("a[%d] = %d\n", i, a[i].GetInt()); + + int y = a[0].GetInt(); + (void)y; + + // Iterating array with iterators + printf("a = "); + for (Value::ConstValueIterator itr = a.Begin(); itr != a.End(); ++itr) + printf("%d ", itr->GetInt()); + printf("\n"); + } + + // Iterating object members + static const char* kTypeNames[] = { "Null", "False", "True", "Object", "Array", "String", "Number" }; + for (Value::ConstMemberIterator itr = document.MemberBegin(); itr != document.MemberEnd(); ++itr) + printf("Type of member %s is %s\n", itr->name.GetString(), kTypeNames[itr->value.GetType()]); + + //////////////////////////////////////////////////////////////////////////// + // 3. Modify values in document. + + // Change i to a bigger number + { + uint64_t f20 = 1; // compute factorial of 20 + for (uint64_t j = 1; j <= 20; j++) + f20 *= j; + document["i"] = f20; // Alternate form: document["i"].SetUint64(f20) + assert(!document["i"].IsInt()); // No longer can be cast as int or uint. + } + + // Adding values to array. + { + Value& a = document["a"]; // This time we uses non-const reference. + Document::AllocatorType& allocator = document.GetAllocator(); + for (int i = 5; i <= 10; i++) + a.PushBack(i, allocator); // May look a bit strange, allocator is needed for potentially realloc. We normally uses the document's. + + // Fluent API + a.PushBack("Lua", allocator).PushBack("Mio", allocator); + } + + // Making string values. + + // This version of SetString() just store the pointer to the string. + // So it is for literal and string that exists within value's life-cycle. + { + document["hello"] = "rapidjson"; // This will invoke strlen() + // Faster version: + // document["hello"].SetString("rapidjson", 9); + } + + // This version of SetString() needs an allocator, which means it will allocate a new buffer and copy the the string into the buffer. + Value author; + { + char buffer2[10]; + int len = sprintf(buffer2, "%s %s", "Milo", "Yip"); // synthetic example of dynamically created string. + + author.SetString(buffer2, static_cast(len), document.GetAllocator()); + // Shorter but slower version: + // document["hello"].SetString(buffer, document.GetAllocator()); + + // Constructor version: + // Value author(buffer, len, document.GetAllocator()); + // Value author(buffer, document.GetAllocator()); + memset(buffer2, 0, sizeof(buffer2)); // For demonstration purpose. + } + // Variable 'buffer' is unusable now but 'author' has already made a copy. + document.AddMember("author", author, document.GetAllocator()); + + assert(author.IsNull()); // Move semantic for assignment. After this variable is assigned as a member, the variable becomes null. + + //////////////////////////////////////////////////////////////////////////// + // 4. Stringify JSON + + printf("\nModified JSON with reformatting:\n"); + StringBuffer sb; + PrettyWriter writer(sb); + document.Accept(writer); // Accept() traverses the DOM and generates Handler events. + puts(sb.GetString()); + + return 0; +} diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/allocators.h b/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/allocators.h new file mode 100644 index 0000000000..12bc5bafcb --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/allocators.h @@ -0,0 +1,692 @@ +// Tencent is pleased to support the open source community by making RapidJSON available. +// +// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. +// +// Licensed under the MIT License (the "License"); you may not use this file except +// in compliance with the License. You may obtain a copy of the License at +// +// http://opensource.org/licenses/MIT +// +// Unless required by applicable law or agreed to in writing, software distributed +// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +// CONDITIONS OF ANY KIND, either express or implied. See the License for the +// specific language governing permissions and limitations under the License. + +#ifndef RAPIDJSON_ALLOCATORS_H_ +#define RAPIDJSON_ALLOCATORS_H_ + +#include "rapidjson.h" +#include "internal/meta.h" + +#include + +#if RAPIDJSON_HAS_CXX11 +#include +#endif + +RAPIDJSON_NAMESPACE_BEGIN + +/////////////////////////////////////////////////////////////////////////////// +// Allocator + +/*! \class rapidjson::Allocator + \brief Concept for allocating, resizing and freeing memory block. + + Note that Malloc() and Realloc() are non-static but Free() is static. + + So if an allocator need to support Free(), it needs to put its pointer in + the header of memory block. + +\code +concept Allocator { + static const bool kNeedFree; //!< Whether this allocator needs to call Free(). + + // Allocate a memory block. + // \param size of the memory block in bytes. + // \returns pointer to the memory block. + void* Malloc(size_t size); + + // Resize a memory block. + // \param originalPtr The pointer to current memory block. Null pointer is permitted. + // \param originalSize The current size in bytes. (Design issue: since some allocator may not book-keep this, explicitly pass to it can save memory.) + // \param newSize the new size in bytes. + void* Realloc(void* originalPtr, size_t originalSize, size_t newSize); + + // Free a memory block. + // \param pointer to the memory block. Null pointer is permitted. + static void Free(void *ptr); +}; +\endcode +*/ + + +/*! \def RAPIDJSON_ALLOCATOR_DEFAULT_CHUNK_CAPACITY + \ingroup RAPIDJSON_CONFIG + \brief User-defined kDefaultChunkCapacity definition. + + User can define this as any \c size that is a power of 2. +*/ + +#ifndef RAPIDJSON_ALLOCATOR_DEFAULT_CHUNK_CAPACITY +#define RAPIDJSON_ALLOCATOR_DEFAULT_CHUNK_CAPACITY (64 * 1024) +#endif + + +/////////////////////////////////////////////////////////////////////////////// +// CrtAllocator + +//! C-runtime library allocator. +/*! This class is just wrapper for standard C library memory routines. + \note implements Allocator concept +*/ +class CrtAllocator { +public: + static const bool kNeedFree = true; + void* Malloc(size_t size) { + if (size) // behavior of malloc(0) is implementation defined. + return RAPIDJSON_MALLOC(size); + else + return NULL; // standardize to returning NULL. + } + void* Realloc(void* originalPtr, size_t originalSize, size_t newSize) { + (void)originalSize; + if (newSize == 0) { + RAPIDJSON_FREE(originalPtr); + return NULL; + } + return RAPIDJSON_REALLOC(originalPtr, newSize); + } + static void Free(void *ptr) RAPIDJSON_NOEXCEPT { RAPIDJSON_FREE(ptr); } + + bool operator==(const CrtAllocator&) const RAPIDJSON_NOEXCEPT { + return true; + } + bool operator!=(const CrtAllocator&) const RAPIDJSON_NOEXCEPT { + return false; + } +}; + +/////////////////////////////////////////////////////////////////////////////// +// MemoryPoolAllocator + +//! Default memory allocator used by the parser and DOM. +/*! This allocator allocate memory blocks from pre-allocated memory chunks. + + It does not free memory blocks. And Realloc() only allocate new memory. + + The memory chunks are allocated by BaseAllocator, which is CrtAllocator by default. + + User may also supply a buffer as the first chunk. + + If the user-buffer is full then additional chunks are allocated by BaseAllocator. + + The user-buffer is not deallocated by this allocator. + + \tparam BaseAllocator the allocator type for allocating memory chunks. Default is CrtAllocator. + \note implements Allocator concept +*/ +template +class MemoryPoolAllocator { + //! Chunk header for perpending to each chunk. + /*! Chunks are stored as a singly linked list. + */ + struct ChunkHeader { + size_t capacity; //!< Capacity of the chunk in bytes (excluding the header itself). + size_t size; //!< Current size of allocated memory in bytes. + ChunkHeader *next; //!< Next chunk in the linked list. + }; + + struct SharedData { + ChunkHeader *chunkHead; //!< Head of the chunk linked-list. Only the head chunk serves allocation. + BaseAllocator* ownBaseAllocator; //!< base allocator created by this object. + size_t refcount; + bool ownBuffer; + }; + + static const size_t SIZEOF_SHARED_DATA = RAPIDJSON_ALIGN(sizeof(SharedData)); + static const size_t SIZEOF_CHUNK_HEADER = RAPIDJSON_ALIGN(sizeof(ChunkHeader)); + + static inline ChunkHeader *GetChunkHead(SharedData *shared) + { + return reinterpret_cast(reinterpret_cast(shared) + SIZEOF_SHARED_DATA); + } + static inline uint8_t *GetChunkBuffer(SharedData *shared) + { + return reinterpret_cast(shared->chunkHead) + SIZEOF_CHUNK_HEADER; + } + + static const size_t kDefaultChunkCapacity = RAPIDJSON_ALLOCATOR_DEFAULT_CHUNK_CAPACITY; //!< Default chunk capacity. + +public: + static const bool kNeedFree = false; //!< Tell users that no need to call Free() with this allocator. (concept Allocator) + static const bool kRefCounted = true; //!< Tell users that this allocator is reference counted on copy + + //! Constructor with chunkSize. + /*! \param chunkSize The size of memory chunk. The default is kDefaultChunkSize. + \param baseAllocator The allocator for allocating memory chunks. + */ + explicit + MemoryPoolAllocator(size_t chunkSize = kDefaultChunkCapacity, BaseAllocator* baseAllocator = 0) : + chunk_capacity_(chunkSize), + baseAllocator_(baseAllocator ? baseAllocator : RAPIDJSON_NEW(BaseAllocator)()), + shared_(static_cast(baseAllocator_ ? baseAllocator_->Malloc(SIZEOF_SHARED_DATA + SIZEOF_CHUNK_HEADER) : 0)) + { + RAPIDJSON_ASSERT(baseAllocator_ != 0); + RAPIDJSON_ASSERT(shared_ != 0); + if (baseAllocator) { + shared_->ownBaseAllocator = 0; + } + else { + shared_->ownBaseAllocator = baseAllocator_; + } + shared_->chunkHead = GetChunkHead(shared_); + shared_->chunkHead->capacity = 0; + shared_->chunkHead->size = 0; + shared_->chunkHead->next = 0; + shared_->ownBuffer = true; + shared_->refcount = 1; + } + + //! Constructor with user-supplied buffer. + /*! The user buffer will be used firstly. When it is full, memory pool allocates new chunk with chunk size. + + The user buffer will not be deallocated when this allocator is destructed. + + \param buffer User supplied buffer. + \param size Size of the buffer in bytes. It must at least larger than sizeof(ChunkHeader). + \param chunkSize The size of memory chunk. The default is kDefaultChunkSize. + \param baseAllocator The allocator for allocating memory chunks. + */ + MemoryPoolAllocator(void *buffer, size_t size, size_t chunkSize = kDefaultChunkCapacity, BaseAllocator* baseAllocator = 0) : + chunk_capacity_(chunkSize), + baseAllocator_(baseAllocator), + shared_(static_cast(AlignBuffer(buffer, size))) + { + RAPIDJSON_ASSERT(size >= SIZEOF_SHARED_DATA + SIZEOF_CHUNK_HEADER); + shared_->chunkHead = GetChunkHead(shared_); + shared_->chunkHead->capacity = size - SIZEOF_SHARED_DATA - SIZEOF_CHUNK_HEADER; + shared_->chunkHead->size = 0; + shared_->chunkHead->next = 0; + shared_->ownBaseAllocator = 0; + shared_->ownBuffer = false; + shared_->refcount = 1; + } + + MemoryPoolAllocator(const MemoryPoolAllocator& rhs) RAPIDJSON_NOEXCEPT : + chunk_capacity_(rhs.chunk_capacity_), + baseAllocator_(rhs.baseAllocator_), + shared_(rhs.shared_) + { + RAPIDJSON_NOEXCEPT_ASSERT(shared_->refcount > 0); + ++shared_->refcount; + } + MemoryPoolAllocator& operator=(const MemoryPoolAllocator& rhs) RAPIDJSON_NOEXCEPT + { + RAPIDJSON_NOEXCEPT_ASSERT(rhs.shared_->refcount > 0); + ++rhs.shared_->refcount; + this->~MemoryPoolAllocator(); + baseAllocator_ = rhs.baseAllocator_; + chunk_capacity_ = rhs.chunk_capacity_; + shared_ = rhs.shared_; + return *this; + } + +#if RAPIDJSON_HAS_CXX11_RVALUE_REFS + MemoryPoolAllocator(MemoryPoolAllocator&& rhs) RAPIDJSON_NOEXCEPT : + chunk_capacity_(rhs.chunk_capacity_), + baseAllocator_(rhs.baseAllocator_), + shared_(rhs.shared_) + { + RAPIDJSON_NOEXCEPT_ASSERT(rhs.shared_->refcount > 0); + rhs.shared_ = 0; + } + MemoryPoolAllocator& operator=(MemoryPoolAllocator&& rhs) RAPIDJSON_NOEXCEPT + { + RAPIDJSON_NOEXCEPT_ASSERT(rhs.shared_->refcount > 0); + this->~MemoryPoolAllocator(); + baseAllocator_ = rhs.baseAllocator_; + chunk_capacity_ = rhs.chunk_capacity_; + shared_ = rhs.shared_; + rhs.shared_ = 0; + return *this; + } +#endif + + //! Destructor. + /*! This deallocates all memory chunks, excluding the user-supplied buffer. + */ + ~MemoryPoolAllocator() RAPIDJSON_NOEXCEPT { + if (!shared_) { + // do nothing if moved + return; + } + if (shared_->refcount > 1) { + --shared_->refcount; + return; + } + Clear(); + BaseAllocator *a = shared_->ownBaseAllocator; + if (shared_->ownBuffer) { + baseAllocator_->Free(shared_); + } + RAPIDJSON_DELETE(a); + } + + //! Deallocates all memory chunks, excluding the first/user one. + void Clear() RAPIDJSON_NOEXCEPT { + RAPIDJSON_NOEXCEPT_ASSERT(shared_->refcount > 0); + for (;;) { + ChunkHeader* c = shared_->chunkHead; + if (!c->next) { + break; + } + shared_->chunkHead = c->next; + baseAllocator_->Free(c); + } + shared_->chunkHead->size = 0; + } + + //! Computes the total capacity of allocated memory chunks. + /*! \return total capacity in bytes. + */ + size_t Capacity() const RAPIDJSON_NOEXCEPT { + RAPIDJSON_NOEXCEPT_ASSERT(shared_->refcount > 0); + size_t capacity = 0; + for (ChunkHeader* c = shared_->chunkHead; c != 0; c = c->next) + capacity += c->capacity; + return capacity; + } + + //! Computes the memory blocks allocated. + /*! \return total used bytes. + */ + size_t Size() const RAPIDJSON_NOEXCEPT { + RAPIDJSON_NOEXCEPT_ASSERT(shared_->refcount > 0); + size_t size = 0; + for (ChunkHeader* c = shared_->chunkHead; c != 0; c = c->next) + size += c->size; + return size; + } + + //! Whether the allocator is shared. + /*! \return true or false. + */ + bool Shared() const RAPIDJSON_NOEXCEPT { + RAPIDJSON_NOEXCEPT_ASSERT(shared_->refcount > 0); + return shared_->refcount > 1; + } + + //! Allocates a memory block. (concept Allocator) + void* Malloc(size_t size) { + RAPIDJSON_NOEXCEPT_ASSERT(shared_->refcount > 0); + if (!size) + return NULL; + + size = RAPIDJSON_ALIGN(size); + if (RAPIDJSON_UNLIKELY(shared_->chunkHead->size + size > shared_->chunkHead->capacity)) + if (!AddChunk(chunk_capacity_ > size ? chunk_capacity_ : size)) + return NULL; + + void *buffer = GetChunkBuffer(shared_) + shared_->chunkHead->size; + shared_->chunkHead->size += size; + return buffer; + } + + //! Resizes a memory block (concept Allocator) + void* Realloc(void* originalPtr, size_t originalSize, size_t newSize) { + if (originalPtr == 0) + return Malloc(newSize); + + RAPIDJSON_NOEXCEPT_ASSERT(shared_->refcount > 0); + if (newSize == 0) + return NULL; + + originalSize = RAPIDJSON_ALIGN(originalSize); + newSize = RAPIDJSON_ALIGN(newSize); + + // Do not shrink if new size is smaller than original + if (originalSize >= newSize) + return originalPtr; + + // Simply expand it if it is the last allocation and there is sufficient space + if (originalPtr == GetChunkBuffer(shared_) + shared_->chunkHead->size - originalSize) { + size_t increment = static_cast(newSize - originalSize); + if (shared_->chunkHead->size + increment <= shared_->chunkHead->capacity) { + shared_->chunkHead->size += increment; + return originalPtr; + } + } + + // Realloc process: allocate and copy memory, do not free original buffer. + if (void* newBuffer = Malloc(newSize)) { + if (originalSize) + std::memcpy(newBuffer, originalPtr, originalSize); + return newBuffer; + } + else + return NULL; + } + + //! Frees a memory block (concept Allocator) + static void Free(void *ptr) RAPIDJSON_NOEXCEPT { (void)ptr; } // Do nothing + + //! Compare (equality) with another MemoryPoolAllocator + bool operator==(const MemoryPoolAllocator& rhs) const RAPIDJSON_NOEXCEPT { + RAPIDJSON_NOEXCEPT_ASSERT(shared_->refcount > 0); + RAPIDJSON_NOEXCEPT_ASSERT(rhs.shared_->refcount > 0); + return shared_ == rhs.shared_; + } + //! Compare (inequality) with another MemoryPoolAllocator + bool operator!=(const MemoryPoolAllocator& rhs) const RAPIDJSON_NOEXCEPT { + return !operator==(rhs); + } + +private: + //! Creates a new chunk. + /*! \param capacity Capacity of the chunk in bytes. + \return true if success. + */ + bool AddChunk(size_t capacity) { + if (!baseAllocator_) + shared_->ownBaseAllocator = baseAllocator_ = RAPIDJSON_NEW(BaseAllocator)(); + if (ChunkHeader* chunk = static_cast(baseAllocator_->Malloc(SIZEOF_CHUNK_HEADER + capacity))) { + chunk->capacity = capacity; + chunk->size = 0; + chunk->next = shared_->chunkHead; + shared_->chunkHead = chunk; + return true; + } + else + return false; + } + + static inline void* AlignBuffer(void* buf, size_t &size) + { + RAPIDJSON_NOEXCEPT_ASSERT(buf != 0); + const uintptr_t mask = sizeof(void*) - 1; + const uintptr_t ubuf = reinterpret_cast(buf); + if (RAPIDJSON_UNLIKELY(ubuf & mask)) { + const uintptr_t abuf = (ubuf + mask) & ~mask; + RAPIDJSON_ASSERT(size >= abuf - ubuf); + buf = reinterpret_cast(abuf); + size -= abuf - ubuf; + } + return buf; + } + + size_t chunk_capacity_; //!< The minimum capacity of chunk when they are allocated. + BaseAllocator* baseAllocator_; //!< base allocator for allocating memory chunks. + SharedData *shared_; //!< The shared data of the allocator +}; + +namespace internal { + template + struct IsRefCounted : + public FalseType + { }; + template + struct IsRefCounted::Type> : + public TrueType + { }; +} + +template +inline T* Realloc(A& a, T* old_p, size_t old_n, size_t new_n) +{ + RAPIDJSON_NOEXCEPT_ASSERT(old_n <= SIZE_MAX / sizeof(T) && new_n <= SIZE_MAX / sizeof(T)); + return static_cast(a.Realloc(old_p, old_n * sizeof(T), new_n * sizeof(T))); +} + +template +inline T *Malloc(A& a, size_t n = 1) +{ + return Realloc(a, NULL, 0, n); +} + +template +inline void Free(A& a, T *p, size_t n = 1) +{ + static_cast(Realloc(a, p, n, 0)); +} + +#ifdef __GNUC__ +RAPIDJSON_DIAG_PUSH +RAPIDJSON_DIAG_OFF(effc++) // std::allocator can safely be inherited +#endif + +template +class StdAllocator : + public std::allocator +{ + typedef std::allocator allocator_type; +#if RAPIDJSON_HAS_CXX11 + typedef std::allocator_traits traits_type; +#else + typedef allocator_type traits_type; +#endif + +public: + typedef BaseAllocator BaseAllocatorType; + + StdAllocator() RAPIDJSON_NOEXCEPT : + allocator_type(), + baseAllocator_() + { } + + StdAllocator(const StdAllocator& rhs) RAPIDJSON_NOEXCEPT : + allocator_type(rhs), + baseAllocator_(rhs.baseAllocator_) + { } + + template + StdAllocator(const StdAllocator& rhs) RAPIDJSON_NOEXCEPT : + allocator_type(rhs), + baseAllocator_(rhs.baseAllocator_) + { } + +#if RAPIDJSON_HAS_CXX11_RVALUE_REFS + StdAllocator(StdAllocator&& rhs) RAPIDJSON_NOEXCEPT : + allocator_type(std::move(rhs)), + baseAllocator_(std::move(rhs.baseAllocator_)) + { } +#endif +#if RAPIDJSON_HAS_CXX11 + using propagate_on_container_move_assignment = std::true_type; + using propagate_on_container_swap = std::true_type; +#endif + + /* implicit */ + StdAllocator(const BaseAllocator& allocator) RAPIDJSON_NOEXCEPT : + allocator_type(), + baseAllocator_(allocator) + { } + + ~StdAllocator() RAPIDJSON_NOEXCEPT + { } + + template + struct rebind { + typedef StdAllocator other; + }; + + typedef typename traits_type::size_type size_type; + typedef typename traits_type::difference_type difference_type; + + typedef typename traits_type::value_type value_type; + typedef typename traits_type::pointer pointer; + typedef typename traits_type::const_pointer const_pointer; + +#if RAPIDJSON_HAS_CXX11 + + typedef typename std::add_lvalue_reference::type &reference; + typedef typename std::add_lvalue_reference::type>::type &const_reference; + + pointer address(reference r) const RAPIDJSON_NOEXCEPT + { + return std::addressof(r); + } + const_pointer address(const_reference r) const RAPIDJSON_NOEXCEPT + { + return std::addressof(r); + } + + size_type max_size() const RAPIDJSON_NOEXCEPT + { + return traits_type::max_size(*this); + } + + template + void construct(pointer p, Args&&... args) + { + traits_type::construct(*this, p, std::forward(args)...); + } + void destroy(pointer p) + { + traits_type::destroy(*this, p); + } + +#else // !RAPIDJSON_HAS_CXX11 + + typedef typename allocator_type::reference reference; + typedef typename allocator_type::const_reference const_reference; + + pointer address(reference r) const RAPIDJSON_NOEXCEPT + { + return allocator_type::address(r); + } + const_pointer address(const_reference r) const RAPIDJSON_NOEXCEPT + { + return allocator_type::address(r); + } + + size_type max_size() const RAPIDJSON_NOEXCEPT + { + return allocator_type::max_size(); + } + + void construct(pointer p, const_reference r) + { + allocator_type::construct(p, r); + } + void destroy(pointer p) + { + allocator_type::destroy(p); + } + +#endif // !RAPIDJSON_HAS_CXX11 + + template + U* allocate(size_type n = 1, const void* = 0) + { + return RAPIDJSON_NAMESPACE::Malloc(baseAllocator_, n); + } + template + void deallocate(U* p, size_type n = 1) + { + RAPIDJSON_NAMESPACE::Free(baseAllocator_, p, n); + } + + pointer allocate(size_type n = 1, const void* = 0) + { + return allocate(n); + } + void deallocate(pointer p, size_type n = 1) + { + deallocate(p, n); + } + +#if RAPIDJSON_HAS_CXX11 + using is_always_equal = std::is_empty; +#endif + + template + bool operator==(const StdAllocator& rhs) const RAPIDJSON_NOEXCEPT + { + return baseAllocator_ == rhs.baseAllocator_; + } + template + bool operator!=(const StdAllocator& rhs) const RAPIDJSON_NOEXCEPT + { + return !operator==(rhs); + } + + //! rapidjson Allocator concept + static const bool kNeedFree = BaseAllocator::kNeedFree; + static const bool kRefCounted = internal::IsRefCounted::Value; + void* Malloc(size_t size) + { + return baseAllocator_.Malloc(size); + } + void* Realloc(void* originalPtr, size_t originalSize, size_t newSize) + { + return baseAllocator_.Realloc(originalPtr, originalSize, newSize); + } + static void Free(void *ptr) RAPIDJSON_NOEXCEPT + { + BaseAllocator::Free(ptr); + } + +private: + template + friend class StdAllocator; // access to StdAllocator.* + + BaseAllocator baseAllocator_; +}; + +#if !RAPIDJSON_HAS_CXX17 // std::allocator deprecated in C++17 +template +class StdAllocator : + public std::allocator +{ + typedef std::allocator allocator_type; + +public: + typedef BaseAllocator BaseAllocatorType; + + StdAllocator() RAPIDJSON_NOEXCEPT : + allocator_type(), + baseAllocator_() + { } + + StdAllocator(const StdAllocator& rhs) RAPIDJSON_NOEXCEPT : + allocator_type(rhs), + baseAllocator_(rhs.baseAllocator_) + { } + + template + StdAllocator(const StdAllocator& rhs) RAPIDJSON_NOEXCEPT : + allocator_type(rhs), + baseAllocator_(rhs.baseAllocator_) + { } + + /* implicit */ + StdAllocator(const BaseAllocator& baseAllocator) RAPIDJSON_NOEXCEPT : + allocator_type(), + baseAllocator_(baseAllocator) + { } + + ~StdAllocator() RAPIDJSON_NOEXCEPT + { } + + template + struct rebind { + typedef StdAllocator other; + }; + + typedef typename allocator_type::value_type value_type; + +private: + template + friend class StdAllocator; // access to StdAllocator.* + + BaseAllocator baseAllocator_; +}; +#endif + +#ifdef __GNUC__ +RAPIDJSON_DIAG_POP +#endif + +RAPIDJSON_NAMESPACE_END + +#endif // RAPIDJSON_ENCODINGS_H_ diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/cursorstreamwrapper.h b/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/cursorstreamwrapper.h new file mode 100644 index 0000000000..fd6513db14 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/cursorstreamwrapper.h @@ -0,0 +1,78 @@ +// Tencent is pleased to support the open source community by making RapidJSON available. +// +// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. +// +// Licensed under the MIT License (the "License"); you may not use this file except +// in compliance with the License. You may obtain a copy of the License at +// +// http://opensource.org/licenses/MIT +// +// Unless required by applicable law or agreed to in writing, software distributed +// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +// CONDITIONS OF ANY KIND, either express or implied. See the License for the +// specific language governing permissions and limitations under the License. + +#ifndef RAPIDJSON_CURSORSTREAMWRAPPER_H_ +#define RAPIDJSON_CURSORSTREAMWRAPPER_H_ + +#include "stream.h" + +#if defined(__GNUC__) +RAPIDJSON_DIAG_PUSH +RAPIDJSON_DIAG_OFF(effc++) +#endif + +#if defined(_MSC_VER) && _MSC_VER <= 1800 +RAPIDJSON_DIAG_PUSH +RAPIDJSON_DIAG_OFF(4702) // unreachable code +RAPIDJSON_DIAG_OFF(4512) // assignment operator could not be generated +#endif + +RAPIDJSON_NAMESPACE_BEGIN + + +//! Cursor stream wrapper for counting line and column number if error exists. +/*! + \tparam InputStream Any stream that implements Stream Concept +*/ +template > +class CursorStreamWrapper : public GenericStreamWrapper { +public: + typedef typename Encoding::Ch Ch; + + CursorStreamWrapper(InputStream& is): + GenericStreamWrapper(is), line_(1), col_(0) {} + + // counting line and column number + Ch Take() { + Ch ch = this->is_.Take(); + if(ch == '\n') { + line_ ++; + col_ = 0; + } else { + col_ ++; + } + return ch; + } + + //! Get the error line number, if error exists. + size_t GetLine() const { return line_; } + //! Get the error column number, if error exists. + size_t GetColumn() const { return col_; } + +private: + size_t line_; //!< Current Line + size_t col_; //!< Current Column +}; + +#if defined(_MSC_VER) && _MSC_VER <= 1800 +RAPIDJSON_DIAG_POP +#endif + +#if defined(__GNUC__) +RAPIDJSON_DIAG_POP +#endif + +RAPIDJSON_NAMESPACE_END + +#endif // RAPIDJSON_CURSORSTREAMWRAPPER_H_ diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/document.h b/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/document.h new file mode 100644 index 0000000000..e2cc600064 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/document.h @@ -0,0 +1,3027 @@ +// Tencent is pleased to support the open source community by making RapidJSON available. +// +// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. +// +// Licensed under the MIT License (the "License"); you may not use this file except +// in compliance with the License. You may obtain a copy of the License at +// +// http://opensource.org/licenses/MIT +// +// Unless required by applicable law or agreed to in writing, software distributed +// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +// CONDITIONS OF ANY KIND, either express or implied. See the License for the +// specific language governing permissions and limitations under the License. + +#ifndef RAPIDJSON_DOCUMENT_H_ +#define RAPIDJSON_DOCUMENT_H_ + +/*! \file document.h */ + +#include "reader.h" +#include "internal/meta.h" +#include "internal/strfunc.h" +#include "memorystream.h" +#include "encodedstream.h" +#include // placement new +#include +#ifdef __cpp_lib_three_way_comparison +#include +#endif + +RAPIDJSON_DIAG_PUSH +#ifdef __clang__ +RAPIDJSON_DIAG_OFF(padded) +RAPIDJSON_DIAG_OFF(switch-enum) +RAPIDJSON_DIAG_OFF(c++98-compat) +#elif defined(_MSC_VER) +RAPIDJSON_DIAG_OFF(4127) // conditional expression is constant +RAPIDJSON_DIAG_OFF(4244) // conversion from kXxxFlags to 'uint16_t', possible loss of data +#endif + +#ifdef __GNUC__ +RAPIDJSON_DIAG_OFF(effc++) +#endif // __GNUC__ + +#ifdef GetObject +// see https://github.com/Tencent/rapidjson/issues/1448 +// a former included windows.h might have defined a macro called GetObject, which affects +// GetObject defined here. This ensures the macro does not get applied +#pragma push_macro("GetObject") +#define RAPIDJSON_WINDOWS_GETOBJECT_WORKAROUND_APPLIED +#undef GetObject +#endif + +#ifndef RAPIDJSON_NOMEMBERITERATORCLASS +#include // std::random_access_iterator_tag +#endif + +#if RAPIDJSON_USE_MEMBERSMAP +#include // std::multimap +#endif + +RAPIDJSON_NAMESPACE_BEGIN + +// Forward declaration. +template +class GenericValue; + +template +class GenericDocument; + +/*! \def RAPIDJSON_DEFAULT_ALLOCATOR + \ingroup RAPIDJSON_CONFIG + \brief Allows to choose default allocator. + + User can define this to use CrtAllocator or MemoryPoolAllocator. +*/ +#ifndef RAPIDJSON_DEFAULT_ALLOCATOR +#define RAPIDJSON_DEFAULT_ALLOCATOR MemoryPoolAllocator +#endif + +/*! \def RAPIDJSON_DEFAULT_STACK_ALLOCATOR + \ingroup RAPIDJSON_CONFIG + \brief Allows to choose default stack allocator for Document. + + User can define this to use CrtAllocator or MemoryPoolAllocator. +*/ +#ifndef RAPIDJSON_DEFAULT_STACK_ALLOCATOR +#define RAPIDJSON_DEFAULT_STACK_ALLOCATOR CrtAllocator +#endif + +/*! \def RAPIDJSON_VALUE_DEFAULT_OBJECT_CAPACITY + \ingroup RAPIDJSON_CONFIG + \brief User defined kDefaultObjectCapacity value. + + User can define this as any natural number. +*/ +#ifndef RAPIDJSON_VALUE_DEFAULT_OBJECT_CAPACITY +// number of objects that rapidjson::Value allocates memory for by default +#define RAPIDJSON_VALUE_DEFAULT_OBJECT_CAPACITY 16 +#endif + +/*! \def RAPIDJSON_VALUE_DEFAULT_ARRAY_CAPACITY + \ingroup RAPIDJSON_CONFIG + \brief User defined kDefaultArrayCapacity value. + + User can define this as any natural number. +*/ +#ifndef RAPIDJSON_VALUE_DEFAULT_ARRAY_CAPACITY +// number of array elements that rapidjson::Value allocates memory for by default +#define RAPIDJSON_VALUE_DEFAULT_ARRAY_CAPACITY 16 +#endif + +//! Name-value pair in a JSON object value. +/*! + This class was internal to GenericValue. It used to be a inner struct. + But a compiler (IBM XL C/C++ for AIX) have reported to have problem with that so it moved as a namespace scope struct. + https://code.google.com/p/rapidjson/issues/detail?id=64 +*/ +template +class GenericMember { +public: + GenericValue name; //!< name of member (must be a string) + GenericValue value; //!< value of member. + +#if RAPIDJSON_HAS_CXX11_RVALUE_REFS + //! Move constructor in C++11 + GenericMember(GenericMember&& rhs) RAPIDJSON_NOEXCEPT + : name(std::move(rhs.name)), + value(std::move(rhs.value)) + { + } + + //! Move assignment in C++11 + GenericMember& operator=(GenericMember&& rhs) RAPIDJSON_NOEXCEPT { + return *this = static_cast(rhs); + } +#endif + + //! Assignment with move semantics. + /*! \param rhs Source of the assignment. Its name and value will become a null value after assignment. + */ + GenericMember& operator=(GenericMember& rhs) RAPIDJSON_NOEXCEPT { + if (RAPIDJSON_LIKELY(this != &rhs)) { + name = rhs.name; + value = rhs.value; + } + return *this; + } + + // swap() for std::sort() and other potential use in STL. + friend inline void swap(GenericMember& a, GenericMember& b) RAPIDJSON_NOEXCEPT { + a.name.Swap(b.name); + a.value.Swap(b.value); + } + +private: + //! Copy constructor is not permitted. + GenericMember(const GenericMember& rhs); +}; + +/////////////////////////////////////////////////////////////////////////////// +// GenericMemberIterator + +#ifndef RAPIDJSON_NOMEMBERITERATORCLASS + +//! (Constant) member iterator for a JSON object value +/*! + \tparam Const Is this a constant iterator? + \tparam Encoding Encoding of the value. (Even non-string values need to have the same encoding in a document) + \tparam Allocator Allocator type for allocating memory of object, array and string. + + This class implements a Random Access Iterator for GenericMember elements + of a GenericValue, see ISO/IEC 14882:2003(E) C++ standard, 24.1 [lib.iterator.requirements]. + + \note This iterator implementation is mainly intended to avoid implicit + conversions from iterator values to \c NULL, + e.g. from GenericValue::FindMember. + + \note Define \c RAPIDJSON_NOMEMBERITERATORCLASS to fall back to a + pointer-based implementation, if your platform doesn't provide + the C++ header. + + \see GenericMember, GenericValue::MemberIterator, GenericValue::ConstMemberIterator + */ +template +class GenericMemberIterator { + + friend class GenericValue; + template friend class GenericMemberIterator; + + typedef GenericMember PlainType; + typedef typename internal::MaybeAddConst::Type ValueType; + +public: + //! Iterator type itself + typedef GenericMemberIterator Iterator; + //! Constant iterator type + typedef GenericMemberIterator ConstIterator; + //! Non-constant iterator type + typedef GenericMemberIterator NonConstIterator; + + /** \name std::iterator_traits support */ + //@{ + typedef ValueType value_type; + typedef ValueType * pointer; + typedef ValueType & reference; + typedef std::ptrdiff_t difference_type; + typedef std::random_access_iterator_tag iterator_category; + //@} + + //! Pointer to (const) GenericMember + typedef pointer Pointer; + //! Reference to (const) GenericMember + typedef reference Reference; + //! Signed integer type (e.g. \c ptrdiff_t) + typedef difference_type DifferenceType; + + //! Default constructor (singular value) + /*! Creates an iterator pointing to no element. + \note All operations, except for comparisons, are undefined on such values. + */ + GenericMemberIterator() : ptr_() {} + + //! Iterator conversions to more const + /*! + \param it (Non-const) iterator to copy from + + Allows the creation of an iterator from another GenericMemberIterator + that is "less const". Especially, creating a non-constant iterator + from a constant iterator are disabled: + \li const -> non-const (not ok) + \li const -> const (ok) + \li non-const -> const (ok) + \li non-const -> non-const (ok) + + \note If the \c Const template parameter is already \c false, this + constructor effectively defines a regular copy-constructor. + Otherwise, the copy constructor is implicitly defined. + */ + GenericMemberIterator(const NonConstIterator & it) : ptr_(it.ptr_) {} + Iterator& operator=(const NonConstIterator & it) { ptr_ = it.ptr_; return *this; } + + //! @name stepping + //@{ + Iterator& operator++(){ ++ptr_; return *this; } + Iterator& operator--(){ --ptr_; return *this; } + Iterator operator++(int){ Iterator old(*this); ++ptr_; return old; } + Iterator operator--(int){ Iterator old(*this); --ptr_; return old; } + //@} + + //! @name increment/decrement + //@{ + Iterator operator+(DifferenceType n) const { return Iterator(ptr_+n); } + Iterator operator-(DifferenceType n) const { return Iterator(ptr_-n); } + + Iterator& operator+=(DifferenceType n) { ptr_+=n; return *this; } + Iterator& operator-=(DifferenceType n) { ptr_-=n; return *this; } + //@} + + //! @name relations + //@{ + template bool operator==(const GenericMemberIterator& that) const { return ptr_ == that.ptr_; } + template bool operator!=(const GenericMemberIterator& that) const { return ptr_ != that.ptr_; } + template bool operator<=(const GenericMemberIterator& that) const { return ptr_ <= that.ptr_; } + template bool operator>=(const GenericMemberIterator& that) const { return ptr_ >= that.ptr_; } + template bool operator< (const GenericMemberIterator& that) const { return ptr_ < that.ptr_; } + template bool operator> (const GenericMemberIterator& that) const { return ptr_ > that.ptr_; } + +#ifdef __cpp_lib_three_way_comparison + template std::strong_ordering operator<=>(const GenericMemberIterator& that) const { return ptr_ <=> that.ptr_; } +#endif + //@} + + //! @name dereference + //@{ + Reference operator*() const { return *ptr_; } + Pointer operator->() const { return ptr_; } + Reference operator[](DifferenceType n) const { return ptr_[n]; } + //@} + + //! Distance + DifferenceType operator-(ConstIterator that) const { return ptr_-that.ptr_; } + +private: + //! Internal constructor from plain pointer + explicit GenericMemberIterator(Pointer p) : ptr_(p) {} + + Pointer ptr_; //!< raw pointer +}; + +#else // RAPIDJSON_NOMEMBERITERATORCLASS + +// class-based member iterator implementation disabled, use plain pointers + +template +class GenericMemberIterator; + +//! non-const GenericMemberIterator +template +class GenericMemberIterator { +public: + //! use plain pointer as iterator type + typedef GenericMember* Iterator; +}; +//! const GenericMemberIterator +template +class GenericMemberIterator { +public: + //! use plain const pointer as iterator type + typedef const GenericMember* Iterator; +}; + +#endif // RAPIDJSON_NOMEMBERITERATORCLASS + +/////////////////////////////////////////////////////////////////////////////// +// GenericStringRef + +//! Reference to a constant string (not taking a copy) +/*! + \tparam CharType character type of the string + + This helper class is used to automatically infer constant string + references for string literals, especially from \c const \b (!) + character arrays. + + The main use is for creating JSON string values without copying the + source string via an \ref Allocator. This requires that the referenced + string pointers have a sufficient lifetime, which exceeds the lifetime + of the associated GenericValue. + + \b Example + \code + Value v("foo"); // ok, no need to copy & calculate length + const char foo[] = "foo"; + v.SetString(foo); // ok + + const char* bar = foo; + // Value x(bar); // not ok, can't rely on bar's lifetime + Value x(StringRef(bar)); // lifetime explicitly guaranteed by user + Value y(StringRef(bar, 3)); // ok, explicitly pass length + \endcode + + \see StringRef, GenericValue::SetString +*/ +template +struct GenericStringRef { + typedef CharType Ch; //!< character type of the string + + //! Create string reference from \c const character array +#ifndef __clang__ // -Wdocumentation + /*! + This constructor implicitly creates a constant string reference from + a \c const character array. It has better performance than + \ref StringRef(const CharType*) by inferring the string \ref length + from the array length, and also supports strings containing null + characters. + + \tparam N length of the string, automatically inferred + + \param str Constant character array, lifetime assumed to be longer + than the use of the string in e.g. a GenericValue + + \post \ref s == str + + \note Constant complexity. + \note There is a hidden, private overload to disallow references to + non-const character arrays to be created via this constructor. + By this, e.g. function-scope arrays used to be filled via + \c snprintf are excluded from consideration. + In such cases, the referenced string should be \b copied to the + GenericValue instead. + */ +#endif + template + GenericStringRef(const CharType (&str)[N]) RAPIDJSON_NOEXCEPT + : s(str), length(N-1) {} + + //! Explicitly create string reference from \c const character pointer +#ifndef __clang__ // -Wdocumentation + /*! + This constructor can be used to \b explicitly create a reference to + a constant string pointer. + + \see StringRef(const CharType*) + + \param str Constant character pointer, lifetime assumed to be longer + than the use of the string in e.g. a GenericValue + + \post \ref s == str + + \note There is a hidden, private overload to disallow references to + non-const character arrays to be created via this constructor. + By this, e.g. function-scope arrays used to be filled via + \c snprintf are excluded from consideration. + In such cases, the referenced string should be \b copied to the + GenericValue instead. + */ +#endif + explicit GenericStringRef(const CharType* str) + : s(str), length(NotNullStrLen(str)) {} + + //! Create constant string reference from pointer and length +#ifndef __clang__ // -Wdocumentation + /*! \param str constant string, lifetime assumed to be longer than the use of the string in e.g. a GenericValue + \param len length of the string, excluding the trailing NULL terminator + + \post \ref s == str && \ref length == len + \note Constant complexity. + */ +#endif + GenericStringRef(const CharType* str, SizeType len) + : s(RAPIDJSON_LIKELY(str) ? str : emptyString), length(len) { RAPIDJSON_ASSERT(str != 0 || len == 0u); } + + GenericStringRef(const GenericStringRef& rhs) : s(rhs.s), length(rhs.length) {} + + //! implicit conversion to plain CharType pointer + operator const Ch *() const { return s; } + + const Ch* const s; //!< plain CharType pointer + const SizeType length; //!< length of the string (excluding the trailing NULL terminator) + +private: + SizeType NotNullStrLen(const CharType* str) { + RAPIDJSON_ASSERT(str != 0); + return internal::StrLen(str); + } + + /// Empty string - used when passing in a NULL pointer + static const Ch emptyString[]; + + //! Disallow construction from non-const array + template + GenericStringRef(CharType (&str)[N]) /* = delete */; + //! Copy assignment operator not permitted - immutable type + GenericStringRef& operator=(const GenericStringRef& rhs) /* = delete */; +}; + +template +const CharType GenericStringRef::emptyString[] = { CharType() }; + +//! Mark a character pointer as constant string +/*! Mark a plain character pointer as a "string literal". This function + can be used to avoid copying a character string to be referenced as a + value in a JSON GenericValue object, if the string's lifetime is known + to be valid long enough. + \tparam CharType Character type of the string + \param str Constant string, lifetime assumed to be longer than the use of the string in e.g. a GenericValue + \return GenericStringRef string reference object + \relatesalso GenericStringRef + + \see GenericValue::GenericValue(StringRefType), GenericValue::operator=(StringRefType), GenericValue::SetString(StringRefType), GenericValue::PushBack(StringRefType, Allocator&), GenericValue::AddMember +*/ +template +inline GenericStringRef StringRef(const CharType* str) { + return GenericStringRef(str); +} + +//! Mark a character pointer as constant string +/*! Mark a plain character pointer as a "string literal". This function + can be used to avoid copying a character string to be referenced as a + value in a JSON GenericValue object, if the string's lifetime is known + to be valid long enough. + + This version has better performance with supplied length, and also + supports string containing null characters. + + \tparam CharType character type of the string + \param str Constant string, lifetime assumed to be longer than the use of the string in e.g. a GenericValue + \param length The length of source string. + \return GenericStringRef string reference object + \relatesalso GenericStringRef +*/ +template +inline GenericStringRef StringRef(const CharType* str, size_t length) { + return GenericStringRef(str, SizeType(length)); +} + +#if RAPIDJSON_HAS_STDSTRING +//! Mark a string object as constant string +/*! Mark a string object (e.g. \c std::string) as a "string literal". + This function can be used to avoid copying a string to be referenced as a + value in a JSON GenericValue object, if the string's lifetime is known + to be valid long enough. + + \tparam CharType character type of the string + \param str Constant string, lifetime assumed to be longer than the use of the string in e.g. a GenericValue + \return GenericStringRef string reference object + \relatesalso GenericStringRef + \note Requires the definition of the preprocessor symbol \ref RAPIDJSON_HAS_STDSTRING. +*/ +template +inline GenericStringRef StringRef(const std::basic_string& str) { + return GenericStringRef(str.data(), SizeType(str.size())); +} +#endif + +/////////////////////////////////////////////////////////////////////////////// +// GenericValue type traits +namespace internal { + +template +struct IsGenericValueImpl : FalseType {}; + +// select candidates according to nested encoding and allocator types +template struct IsGenericValueImpl::Type, typename Void::Type> + : IsBaseOf, T>::Type {}; + +// helper to match arbitrary GenericValue instantiations, including derived classes +template struct IsGenericValue : IsGenericValueImpl::Type {}; + +} // namespace internal + +/////////////////////////////////////////////////////////////////////////////// +// TypeHelper + +namespace internal { + +template +struct TypeHelper {}; + +template +struct TypeHelper { + static bool Is(const ValueType& v) { return v.IsBool(); } + static bool Get(const ValueType& v) { return v.GetBool(); } + static ValueType& Set(ValueType& v, bool data) { return v.SetBool(data); } + static ValueType& Set(ValueType& v, bool data, typename ValueType::AllocatorType&) { return v.SetBool(data); } +}; + +template +struct TypeHelper { + static bool Is(const ValueType& v) { return v.IsInt(); } + static int Get(const ValueType& v) { return v.GetInt(); } + static ValueType& Set(ValueType& v, int data) { return v.SetInt(data); } + static ValueType& Set(ValueType& v, int data, typename ValueType::AllocatorType&) { return v.SetInt(data); } +}; + +template +struct TypeHelper { + static bool Is(const ValueType& v) { return v.IsUint(); } + static unsigned Get(const ValueType& v) { return v.GetUint(); } + static ValueType& Set(ValueType& v, unsigned data) { return v.SetUint(data); } + static ValueType& Set(ValueType& v, unsigned data, typename ValueType::AllocatorType&) { return v.SetUint(data); } +}; + +#ifdef _MSC_VER +RAPIDJSON_STATIC_ASSERT(sizeof(long) == sizeof(int)); +template +struct TypeHelper { + static bool Is(const ValueType& v) { return v.IsInt(); } + static long Get(const ValueType& v) { return v.GetInt(); } + static ValueType& Set(ValueType& v, long data) { return v.SetInt(data); } + static ValueType& Set(ValueType& v, long data, typename ValueType::AllocatorType&) { return v.SetInt(data); } +}; + +RAPIDJSON_STATIC_ASSERT(sizeof(unsigned long) == sizeof(unsigned)); +template +struct TypeHelper { + static bool Is(const ValueType& v) { return v.IsUint(); } + static unsigned long Get(const ValueType& v) { return v.GetUint(); } + static ValueType& Set(ValueType& v, unsigned long data) { return v.SetUint(data); } + static ValueType& Set(ValueType& v, unsigned long data, typename ValueType::AllocatorType&) { return v.SetUint(data); } +}; +#endif + +template +struct TypeHelper { + static bool Is(const ValueType& v) { return v.IsInt64(); } + static int64_t Get(const ValueType& v) { return v.GetInt64(); } + static ValueType& Set(ValueType& v, int64_t data) { return v.SetInt64(data); } + static ValueType& Set(ValueType& v, int64_t data, typename ValueType::AllocatorType&) { return v.SetInt64(data); } +}; + +template +struct TypeHelper { + static bool Is(const ValueType& v) { return v.IsUint64(); } + static uint64_t Get(const ValueType& v) { return v.GetUint64(); } + static ValueType& Set(ValueType& v, uint64_t data) { return v.SetUint64(data); } + static ValueType& Set(ValueType& v, uint64_t data, typename ValueType::AllocatorType&) { return v.SetUint64(data); } +}; + +template +struct TypeHelper { + static bool Is(const ValueType& v) { return v.IsDouble(); } + static double Get(const ValueType& v) { return v.GetDouble(); } + static ValueType& Set(ValueType& v, double data) { return v.SetDouble(data); } + static ValueType& Set(ValueType& v, double data, typename ValueType::AllocatorType&) { return v.SetDouble(data); } +}; + +template +struct TypeHelper { + static bool Is(const ValueType& v) { return v.IsFloat(); } + static float Get(const ValueType& v) { return v.GetFloat(); } + static ValueType& Set(ValueType& v, float data) { return v.SetFloat(data); } + static ValueType& Set(ValueType& v, float data, typename ValueType::AllocatorType&) { return v.SetFloat(data); } +}; + +template +struct TypeHelper { + typedef const typename ValueType::Ch* StringType; + static bool Is(const ValueType& v) { return v.IsString(); } + static StringType Get(const ValueType& v) { return v.GetString(); } + static ValueType& Set(ValueType& v, const StringType data) { return v.SetString(typename ValueType::StringRefType(data)); } + static ValueType& Set(ValueType& v, const StringType data, typename ValueType::AllocatorType& a) { return v.SetString(data, a); } +}; + +#if RAPIDJSON_HAS_STDSTRING +template +struct TypeHelper > { + typedef std::basic_string StringType; + static bool Is(const ValueType& v) { return v.IsString(); } + static StringType Get(const ValueType& v) { return StringType(v.GetString(), v.GetStringLength()); } + static ValueType& Set(ValueType& v, const StringType& data, typename ValueType::AllocatorType& a) { return v.SetString(data, a); } +}; +#endif + +template +struct TypeHelper { + typedef typename ValueType::Array ArrayType; + static bool Is(const ValueType& v) { return v.IsArray(); } + static ArrayType Get(ValueType& v) { return v.GetArray(); } + static ValueType& Set(ValueType& v, ArrayType data) { return v = data; } + static ValueType& Set(ValueType& v, ArrayType data, typename ValueType::AllocatorType&) { return v = data; } +}; + +template +struct TypeHelper { + typedef typename ValueType::ConstArray ArrayType; + static bool Is(const ValueType& v) { return v.IsArray(); } + static ArrayType Get(const ValueType& v) { return v.GetArray(); } +}; + +template +struct TypeHelper { + typedef typename ValueType::Object ObjectType; + static bool Is(const ValueType& v) { return v.IsObject(); } + static ObjectType Get(ValueType& v) { return v.GetObject(); } + static ValueType& Set(ValueType& v, ObjectType data) { return v = data; } + static ValueType& Set(ValueType& v, ObjectType data, typename ValueType::AllocatorType&) { return v = data; } +}; + +template +struct TypeHelper { + typedef typename ValueType::ConstObject ObjectType; + static bool Is(const ValueType& v) { return v.IsObject(); } + static ObjectType Get(const ValueType& v) { return v.GetObject(); } +}; + +} // namespace internal + +// Forward declarations +template class GenericArray; +template class GenericObject; + +/////////////////////////////////////////////////////////////////////////////// +// GenericValue + +//! Represents a JSON value. Use Value for UTF8 encoding and default allocator. +/*! + A JSON value can be one of 7 types. This class is a variant type supporting + these types. + + Use the Value if UTF8 and default allocator + + \tparam Encoding Encoding of the value. (Even non-string values need to have the same encoding in a document) + \tparam Allocator Allocator type for allocating memory of object, array and string. +*/ +template +class GenericValue { +public: + //! Name-value pair in an object. + typedef GenericMember Member; + typedef Encoding EncodingType; //!< Encoding type from template parameter. + typedef Allocator AllocatorType; //!< Allocator type from template parameter. + typedef typename Encoding::Ch Ch; //!< Character type derived from Encoding. + typedef GenericStringRef StringRefType; //!< Reference to a constant string + typedef typename GenericMemberIterator::Iterator MemberIterator; //!< Member iterator for iterating in object. + typedef typename GenericMemberIterator::Iterator ConstMemberIterator; //!< Constant member iterator for iterating in object. + typedef GenericValue* ValueIterator; //!< Value iterator for iterating in array. + typedef const GenericValue* ConstValueIterator; //!< Constant value iterator for iterating in array. + typedef GenericValue ValueType; //!< Value type of itself. + typedef GenericArray Array; + typedef GenericArray ConstArray; + typedef GenericObject Object; + typedef GenericObject ConstObject; + + //!@name Constructors and destructor. + //@{ + + //! Default constructor creates a null value. + GenericValue() RAPIDJSON_NOEXCEPT : data_() { data_.f.flags = kNullFlag; } + +#if RAPIDJSON_HAS_CXX11_RVALUE_REFS + //! Move constructor in C++11 + GenericValue(GenericValue&& rhs) RAPIDJSON_NOEXCEPT : data_(rhs.data_) { + rhs.data_.f.flags = kNullFlag; // give up contents + } +#endif + +private: + //! Copy constructor is not permitted. + GenericValue(const GenericValue& rhs); + +#if RAPIDJSON_HAS_CXX11_RVALUE_REFS + //! Moving from a GenericDocument is not permitted. + template + GenericValue(GenericDocument&& rhs); + + //! Move assignment from a GenericDocument is not permitted. + template + GenericValue& operator=(GenericDocument&& rhs); +#endif + +public: + + //! Constructor with JSON value type. + /*! This creates a Value of specified type with default content. + \param type Type of the value. + \note Default content for number is zero. + */ + explicit GenericValue(Type type) RAPIDJSON_NOEXCEPT : data_() { + static const uint16_t defaultFlags[] = { + kNullFlag, kFalseFlag, kTrueFlag, kObjectFlag, kArrayFlag, kShortStringFlag, + kNumberAnyFlag + }; + RAPIDJSON_NOEXCEPT_ASSERT(type >= kNullType && type <= kNumberType); + data_.f.flags = defaultFlags[type]; + + // Use ShortString to store empty string. + if (type == kStringType) + data_.ss.SetLength(0); + } + + //! Explicit copy constructor (with allocator) + /*! Creates a copy of a Value by using the given Allocator + \tparam SourceAllocator allocator of \c rhs + \param rhs Value to copy from (read-only) + \param allocator Allocator for allocating copied elements and buffers. Commonly use GenericDocument::GetAllocator(). + \param copyConstStrings Force copying of constant strings (e.g. referencing an in-situ buffer) + \see CopyFrom() + */ + template + GenericValue(const GenericValue& rhs, Allocator& allocator, bool copyConstStrings = false) { + switch (rhs.GetType()) { + case kObjectType: + DoCopyMembers(rhs, allocator, copyConstStrings); + break; + case kArrayType: { + SizeType count = rhs.data_.a.size; + GenericValue* le = reinterpret_cast(allocator.Malloc(count * sizeof(GenericValue))); + const GenericValue* re = rhs.GetElementsPointer(); + for (SizeType i = 0; i < count; i++) + new (&le[i]) GenericValue(re[i], allocator, copyConstStrings); + data_.f.flags = kArrayFlag; + data_.a.size = data_.a.capacity = count; + SetElementsPointer(le); + } + break; + case kStringType: + if (rhs.data_.f.flags == kConstStringFlag && !copyConstStrings) { + data_.f.flags = rhs.data_.f.flags; + data_ = *reinterpret_cast(&rhs.data_); + } + else + SetStringRaw(StringRef(rhs.GetString(), rhs.GetStringLength()), allocator); + break; + default: + data_.f.flags = rhs.data_.f.flags; + data_ = *reinterpret_cast(&rhs.data_); + break; + } + } + + //! Constructor for boolean value. + /*! \param b Boolean value + \note This constructor is limited to \em real boolean values and rejects + implicitly converted types like arbitrary pointers. Use an explicit cast + to \c bool, if you want to construct a boolean JSON value in such cases. + */ +#ifndef RAPIDJSON_DOXYGEN_RUNNING // hide SFINAE from Doxygen + template + explicit GenericValue(T b, RAPIDJSON_ENABLEIF((internal::IsSame))) RAPIDJSON_NOEXCEPT // See #472 +#else + explicit GenericValue(bool b) RAPIDJSON_NOEXCEPT +#endif + : data_() { + // safe-guard against failing SFINAE + RAPIDJSON_STATIC_ASSERT((internal::IsSame::Value)); + data_.f.flags = b ? kTrueFlag : kFalseFlag; + } + + //! Constructor for int value. + explicit GenericValue(int i) RAPIDJSON_NOEXCEPT : data_() { + data_.n.i64 = i; + data_.f.flags = (i >= 0) ? (kNumberIntFlag | kUintFlag | kUint64Flag) : kNumberIntFlag; + } + + //! Constructor for unsigned value. + explicit GenericValue(unsigned u) RAPIDJSON_NOEXCEPT : data_() { + data_.n.u64 = u; + data_.f.flags = (u & 0x80000000) ? kNumberUintFlag : (kNumberUintFlag | kIntFlag | kInt64Flag); + } + + //! Constructor for int64_t value. + explicit GenericValue(int64_t i64) RAPIDJSON_NOEXCEPT : data_() { + data_.n.i64 = i64; + data_.f.flags = kNumberInt64Flag; + if (i64 >= 0) { + data_.f.flags |= kNumberUint64Flag; + if (!(static_cast(i64) & RAPIDJSON_UINT64_C2(0xFFFFFFFF, 0x00000000))) + data_.f.flags |= kUintFlag; + if (!(static_cast(i64) & RAPIDJSON_UINT64_C2(0xFFFFFFFF, 0x80000000))) + data_.f.flags |= kIntFlag; + } + else if (i64 >= static_cast(RAPIDJSON_UINT64_C2(0xFFFFFFFF, 0x80000000))) + data_.f.flags |= kIntFlag; + } + + //! Constructor for uint64_t value. + explicit GenericValue(uint64_t u64) RAPIDJSON_NOEXCEPT : data_() { + data_.n.u64 = u64; + data_.f.flags = kNumberUint64Flag; + if (!(u64 & RAPIDJSON_UINT64_C2(0x80000000, 0x00000000))) + data_.f.flags |= kInt64Flag; + if (!(u64 & RAPIDJSON_UINT64_C2(0xFFFFFFFF, 0x00000000))) + data_.f.flags |= kUintFlag; + if (!(u64 & RAPIDJSON_UINT64_C2(0xFFFFFFFF, 0x80000000))) + data_.f.flags |= kIntFlag; + } + + //! Constructor for double value. + explicit GenericValue(double d) RAPIDJSON_NOEXCEPT : data_() { data_.n.d = d; data_.f.flags = kNumberDoubleFlag; } + + //! Constructor for float value. + explicit GenericValue(float f) RAPIDJSON_NOEXCEPT : data_() { data_.n.d = static_cast(f); data_.f.flags = kNumberDoubleFlag; } + + //! Constructor for constant string (i.e. do not make a copy of string) + GenericValue(const Ch* s, SizeType length) RAPIDJSON_NOEXCEPT : data_() { SetStringRaw(StringRef(s, length)); } + + //! Constructor for constant string (i.e. do not make a copy of string) + explicit GenericValue(StringRefType s) RAPIDJSON_NOEXCEPT : data_() { SetStringRaw(s); } + + //! Constructor for copy-string (i.e. do make a copy of string) + GenericValue(const Ch* s, SizeType length, Allocator& allocator) : data_() { SetStringRaw(StringRef(s, length), allocator); } + + //! Constructor for copy-string (i.e. do make a copy of string) + GenericValue(const Ch*s, Allocator& allocator) : data_() { SetStringRaw(StringRef(s), allocator); } + +#if RAPIDJSON_HAS_STDSTRING + //! Constructor for copy-string from a string object (i.e. do make a copy of string) + /*! \note Requires the definition of the preprocessor symbol \ref RAPIDJSON_HAS_STDSTRING. + */ + GenericValue(const std::basic_string& s, Allocator& allocator) : data_() { SetStringRaw(StringRef(s), allocator); } +#endif + + //! Constructor for Array. + /*! + \param a An array obtained by \c GetArray(). + \note \c Array is always pass-by-value. + \note the source array is moved into this value and the sourec array becomes empty. + */ + GenericValue(Array a) RAPIDJSON_NOEXCEPT : data_(a.value_.data_) { + a.value_.data_ = Data(); + a.value_.data_.f.flags = kArrayFlag; + } + + //! Constructor for Object. + /*! + \param o An object obtained by \c GetObject(). + \note \c Object is always pass-by-value. + \note the source object is moved into this value and the sourec object becomes empty. + */ + GenericValue(Object o) RAPIDJSON_NOEXCEPT : data_(o.value_.data_) { + o.value_.data_ = Data(); + o.value_.data_.f.flags = kObjectFlag; + } + + //! Destructor. + /*! Need to destruct elements of array, members of object, or copy-string. + */ + ~GenericValue() { + // With RAPIDJSON_USE_MEMBERSMAP, the maps need to be destroyed to release + // their Allocator if it's refcounted (e.g. MemoryPoolAllocator). + if (Allocator::kNeedFree || (RAPIDJSON_USE_MEMBERSMAP+0 && + internal::IsRefCounted::Value)) { + switch(data_.f.flags) { + case kArrayFlag: + { + GenericValue* e = GetElementsPointer(); + for (GenericValue* v = e; v != e + data_.a.size; ++v) + v->~GenericValue(); + if (Allocator::kNeedFree) { // Shortcut by Allocator's trait + Allocator::Free(e); + } + } + break; + + case kObjectFlag: + DoFreeMembers(); + break; + + case kCopyStringFlag: + if (Allocator::kNeedFree) { // Shortcut by Allocator's trait + Allocator::Free(const_cast(GetStringPointer())); + } + break; + + default: + break; // Do nothing for other types. + } + } + } + + //@} + + //!@name Assignment operators + //@{ + + //! Assignment with move semantics. + /*! \param rhs Source of the assignment. It will become a null value after assignment. + */ + GenericValue& operator=(GenericValue& rhs) RAPIDJSON_NOEXCEPT { + if (RAPIDJSON_LIKELY(this != &rhs)) { + // Can't destroy "this" before assigning "rhs", otherwise "rhs" + // could be used after free if it's an sub-Value of "this", + // hence the temporary danse. + GenericValue temp; + temp.RawAssign(rhs); + this->~GenericValue(); + RawAssign(temp); + } + return *this; + } + +#if RAPIDJSON_HAS_CXX11_RVALUE_REFS + //! Move assignment in C++11 + GenericValue& operator=(GenericValue&& rhs) RAPIDJSON_NOEXCEPT { + return *this = rhs.Move(); + } +#endif + + //! Assignment of constant string reference (no copy) + /*! \param str Constant string reference to be assigned + \note This overload is needed to avoid clashes with the generic primitive type assignment overload below. + \see GenericStringRef, operator=(T) + */ + GenericValue& operator=(StringRefType str) RAPIDJSON_NOEXCEPT { + GenericValue s(str); + return *this = s; + } + + //! Assignment with primitive types. + /*! \tparam T Either \ref Type, \c int, \c unsigned, \c int64_t, \c uint64_t + \param value The value to be assigned. + + \note The source type \c T explicitly disallows all pointer types, + especially (\c const) \ref Ch*. This helps avoiding implicitly + referencing character strings with insufficient lifetime, use + \ref SetString(const Ch*, Allocator&) (for copying) or + \ref StringRef() (to explicitly mark the pointer as constant) instead. + All other pointer types would implicitly convert to \c bool, + use \ref SetBool() instead. + */ + template + RAPIDJSON_DISABLEIF_RETURN((internal::IsPointer), (GenericValue&)) + operator=(T value) { + GenericValue v(value); + return *this = v; + } + + //! Deep-copy assignment from Value + /*! Assigns a \b copy of the Value to the current Value object + \tparam SourceAllocator Allocator type of \c rhs + \param rhs Value to copy from (read-only) + \param allocator Allocator to use for copying + \param copyConstStrings Force copying of constant strings (e.g. referencing an in-situ buffer) + */ + template + GenericValue& CopyFrom(const GenericValue& rhs, Allocator& allocator, bool copyConstStrings = false) { + RAPIDJSON_ASSERT(static_cast(this) != static_cast(&rhs)); + this->~GenericValue(); + new (this) GenericValue(rhs, allocator, copyConstStrings); + return *this; + } + + //! Exchange the contents of this value with those of other. + /*! + \param other Another value. + \note Constant complexity. + */ + GenericValue& Swap(GenericValue& other) RAPIDJSON_NOEXCEPT { + GenericValue temp; + temp.RawAssign(*this); + RawAssign(other); + other.RawAssign(temp); + return *this; + } + + //! free-standing swap function helper + /*! + Helper function to enable support for common swap implementation pattern based on \c std::swap: + \code + void swap(MyClass& a, MyClass& b) { + using std::swap; + swap(a.value, b.value); + // ... + } + \endcode + \see Swap() + */ + friend inline void swap(GenericValue& a, GenericValue& b) RAPIDJSON_NOEXCEPT { a.Swap(b); } + + //! Prepare Value for move semantics + /*! \return *this */ + GenericValue& Move() RAPIDJSON_NOEXCEPT { return *this; } + //@} + + //!@name Equal-to and not-equal-to operators + //@{ + //! Equal-to operator + /*! + \note If an object contains duplicated named member, comparing equality with any object is always \c false. + \note Complexity is quadratic in Object's member number and linear for the rest (number of all values in the subtree and total lengths of all strings). + */ + template + bool operator==(const GenericValue& rhs) const { + typedef GenericValue RhsType; + if (GetType() != rhs.GetType()) + return false; + + switch (GetType()) { + case kObjectType: // Warning: O(n^2) inner-loop + if (data_.o.size != rhs.data_.o.size) + return false; + for (ConstMemberIterator lhsMemberItr = MemberBegin(); lhsMemberItr != MemberEnd(); ++lhsMemberItr) { + typename RhsType::ConstMemberIterator rhsMemberItr = rhs.FindMember(lhsMemberItr->name); + if (rhsMemberItr == rhs.MemberEnd() || lhsMemberItr->value != rhsMemberItr->value) + return false; + } + return true; + + case kArrayType: + if (data_.a.size != rhs.data_.a.size) + return false; + for (SizeType i = 0; i < data_.a.size; i++) + if ((*this)[i] != rhs[i]) + return false; + return true; + + case kStringType: + return StringEqual(rhs); + + case kNumberType: + if (IsDouble() || rhs.IsDouble()) { + double a = GetDouble(); // May convert from integer to double. + double b = rhs.GetDouble(); // Ditto + return a >= b && a <= b; // Prevent -Wfloat-equal + } + else + return data_.n.u64 == rhs.data_.n.u64; + + default: + return true; + } + } + + //! Equal-to operator with const C-string pointer + bool operator==(const Ch* rhs) const { return *this == GenericValue(StringRef(rhs)); } + +#if RAPIDJSON_HAS_STDSTRING + //! Equal-to operator with string object + /*! \note Requires the definition of the preprocessor symbol \ref RAPIDJSON_HAS_STDSTRING. + */ + bool operator==(const std::basic_string& rhs) const { return *this == GenericValue(StringRef(rhs)); } +#endif + + //! Equal-to operator with primitive types + /*! \tparam T Either \ref Type, \c int, \c unsigned, \c int64_t, \c uint64_t, \c double, \c true, \c false + */ + template RAPIDJSON_DISABLEIF_RETURN((internal::OrExpr,internal::IsGenericValue >), (bool)) operator==(const T& rhs) const { return *this == GenericValue(rhs); } + + //! Not-equal-to operator + /*! \return !(*this == rhs) + */ + template + bool operator!=(const GenericValue& rhs) const { return !(*this == rhs); } + + //! Not-equal-to operator with const C-string pointer + bool operator!=(const Ch* rhs) const { return !(*this == rhs); } + + //! Not-equal-to operator with arbitrary types + /*! \return !(*this == rhs) + */ + template RAPIDJSON_DISABLEIF_RETURN((internal::IsGenericValue), (bool)) operator!=(const T& rhs) const { return !(*this == rhs); } + +#ifndef __cpp_lib_three_way_comparison + //! Equal-to operator with arbitrary types (symmetric version) + /*! \return (rhs == lhs) + */ + template friend RAPIDJSON_DISABLEIF_RETURN((internal::IsGenericValue), (bool)) operator==(const T& lhs, const GenericValue& rhs) { return rhs == lhs; } + + //! Not-Equal-to operator with arbitrary types (symmetric version) + /*! \return !(rhs == lhs) + */ + template friend RAPIDJSON_DISABLEIF_RETURN((internal::IsGenericValue), (bool)) operator!=(const T& lhs, const GenericValue& rhs) { return !(rhs == lhs); } + //@} +#endif + + //!@name Type + //@{ + + Type GetType() const { return static_cast(data_.f.flags & kTypeMask); } + bool IsNull() const { return data_.f.flags == kNullFlag; } + bool IsFalse() const { return data_.f.flags == kFalseFlag; } + bool IsTrue() const { return data_.f.flags == kTrueFlag; } + bool IsBool() const { return (data_.f.flags & kBoolFlag) != 0; } + bool IsObject() const { return data_.f.flags == kObjectFlag; } + bool IsArray() const { return data_.f.flags == kArrayFlag; } + bool IsNumber() const { return (data_.f.flags & kNumberFlag) != 0; } + bool IsInt() const { return (data_.f.flags & kIntFlag) != 0; } + bool IsUint() const { return (data_.f.flags & kUintFlag) != 0; } + bool IsInt64() const { return (data_.f.flags & kInt64Flag) != 0; } + bool IsUint64() const { return (data_.f.flags & kUint64Flag) != 0; } + bool IsDouble() const { return (data_.f.flags & kDoubleFlag) != 0; } + bool IsString() const { return (data_.f.flags & kStringFlag) != 0; } + + // Checks whether a number can be losslessly converted to a double. + bool IsLosslessDouble() const { + if (!IsNumber()) return false; + if (IsUint64()) { + uint64_t u = GetUint64(); + volatile double d = static_cast(u); + return (d >= 0.0) + && (d < static_cast((std::numeric_limits::max)())) + && (u == static_cast(d)); + } + if (IsInt64()) { + int64_t i = GetInt64(); + volatile double d = static_cast(i); + return (d >= static_cast((std::numeric_limits::min)())) + && (d < static_cast((std::numeric_limits::max)())) + && (i == static_cast(d)); + } + return true; // double, int, uint are always lossless + } + + // Checks whether a number is a float (possible lossy). + bool IsFloat() const { + if ((data_.f.flags & kDoubleFlag) == 0) + return false; + double d = GetDouble(); + return d >= -3.4028234e38 && d <= 3.4028234e38; + } + // Checks whether a number can be losslessly converted to a float. + bool IsLosslessFloat() const { + if (!IsNumber()) return false; + double a = GetDouble(); + if (a < static_cast(-(std::numeric_limits::max)()) + || a > static_cast((std::numeric_limits::max)())) + return false; + double b = static_cast(static_cast(a)); + return a >= b && a <= b; // Prevent -Wfloat-equal + } + + //@} + + //!@name Null + //@{ + + GenericValue& SetNull() { this->~GenericValue(); new (this) GenericValue(); return *this; } + + //@} + + //!@name Bool + //@{ + + bool GetBool() const { RAPIDJSON_ASSERT(IsBool()); return data_.f.flags == kTrueFlag; } + //!< Set boolean value + /*! \post IsBool() == true */ + GenericValue& SetBool(bool b) { this->~GenericValue(); new (this) GenericValue(b); return *this; } + + //@} + + //!@name Object + //@{ + + //! Set this value as an empty object. + /*! \post IsObject() == true */ + GenericValue& SetObject() { this->~GenericValue(); new (this) GenericValue(kObjectType); return *this; } + + //! Get the number of members in the object. + SizeType MemberCount() const { RAPIDJSON_ASSERT(IsObject()); return data_.o.size; } + + //! Get the capacity of object. + SizeType MemberCapacity() const { RAPIDJSON_ASSERT(IsObject()); return data_.o.capacity; } + + //! Check whether the object is empty. + bool ObjectEmpty() const { RAPIDJSON_ASSERT(IsObject()); return data_.o.size == 0; } + + //! Get a value from an object associated with the name. + /*! \pre IsObject() == true + \tparam T Either \c Ch or \c const \c Ch (template used for disambiguation with \ref operator[](SizeType)) + \note In version 0.1x, if the member is not found, this function returns a null value. This makes issue 7. + Since 0.2, if the name is not correct, it will assert. + If user is unsure whether a member exists, user should use HasMember() first. + A better approach is to use FindMember(). + \note Linear time complexity. + */ + template + RAPIDJSON_DISABLEIF_RETURN((internal::NotExpr::Type, Ch> >),(GenericValue&)) operator[](T* name) { + GenericValue n(StringRef(name)); + return (*this)[n]; + } + template + RAPIDJSON_DISABLEIF_RETURN((internal::NotExpr::Type, Ch> >),(const GenericValue&)) operator[](T* name) const { return const_cast(*this)[name]; } + + //! Get a value from an object associated with the name. + /*! \pre IsObject() == true + \tparam SourceAllocator Allocator of the \c name value + + \note Compared to \ref operator[](T*), this version is faster because it does not need a StrLen(). + And it can also handle strings with embedded null characters. + + \note Linear time complexity. + */ + template + GenericValue& operator[](const GenericValue& name) { + MemberIterator member = FindMember(name); + if (member != MemberEnd()) + return member->value; + else { + RAPIDJSON_ASSERT(false); // see above note + + // This will generate -Wexit-time-destructors in clang + // static GenericValue NullValue; + // return NullValue; + + // Use static buffer and placement-new to prevent destruction + static char buffer[sizeof(GenericValue)]; + return *new (buffer) GenericValue(); + } + } + template + const GenericValue& operator[](const GenericValue& name) const { return const_cast(*this)[name]; } + +#if RAPIDJSON_HAS_STDSTRING + //! Get a value from an object associated with name (string object). + GenericValue& operator[](const std::basic_string& name) { return (*this)[GenericValue(StringRef(name))]; } + const GenericValue& operator[](const std::basic_string& name) const { return (*this)[GenericValue(StringRef(name))]; } +#endif + + //! Const member iterator + /*! \pre IsObject() == true */ + ConstMemberIterator MemberBegin() const { RAPIDJSON_ASSERT(IsObject()); return ConstMemberIterator(GetMembersPointer()); } + //! Const \em past-the-end member iterator + /*! \pre IsObject() == true */ + ConstMemberIterator MemberEnd() const { RAPIDJSON_ASSERT(IsObject()); return ConstMemberIterator(GetMembersPointer() + data_.o.size); } + //! Member iterator + /*! \pre IsObject() == true */ + MemberIterator MemberBegin() { RAPIDJSON_ASSERT(IsObject()); return MemberIterator(GetMembersPointer()); } + //! \em Past-the-end member iterator + /*! \pre IsObject() == true */ + MemberIterator MemberEnd() { RAPIDJSON_ASSERT(IsObject()); return MemberIterator(GetMembersPointer() + data_.o.size); } + + //! Request the object to have enough capacity to store members. + /*! \param newCapacity The capacity that the object at least need to have. + \param allocator Allocator for reallocating memory. It must be the same one as used before. Commonly use GenericDocument::GetAllocator(). + \return The value itself for fluent API. + \note Linear time complexity. + */ + GenericValue& MemberReserve(SizeType newCapacity, Allocator &allocator) { + RAPIDJSON_ASSERT(IsObject()); + DoReserveMembers(newCapacity, allocator); + return *this; + } + + //! Check whether a member exists in the object. + /*! + \param name Member name to be searched. + \pre IsObject() == true + \return Whether a member with that name exists. + \note It is better to use FindMember() directly if you need the obtain the value as well. + \note Linear time complexity. + */ + bool HasMember(const Ch* name) const { return FindMember(name) != MemberEnd(); } + +#if RAPIDJSON_HAS_STDSTRING + //! Check whether a member exists in the object with string object. + /*! + \param name Member name to be searched. + \pre IsObject() == true + \return Whether a member with that name exists. + \note It is better to use FindMember() directly if you need the obtain the value as well. + \note Linear time complexity. + */ + bool HasMember(const std::basic_string& name) const { return FindMember(name) != MemberEnd(); } +#endif + + //! Check whether a member exists in the object with GenericValue name. + /*! + This version is faster because it does not need a StrLen(). It can also handle string with null character. + \param name Member name to be searched. + \pre IsObject() == true + \return Whether a member with that name exists. + \note It is better to use FindMember() directly if you need the obtain the value as well. + \note Linear time complexity. + */ + template + bool HasMember(const GenericValue& name) const { return FindMember(name) != MemberEnd(); } + + //! Find member by name. + /*! + \param name Member name to be searched. + \pre IsObject() == true + \return Iterator to member, if it exists. + Otherwise returns \ref MemberEnd(). + + \note Earlier versions of Rapidjson returned a \c NULL pointer, in case + the requested member doesn't exist. For consistency with e.g. + \c std::map, this has been changed to MemberEnd() now. + \note Linear time complexity. + */ + MemberIterator FindMember(const Ch* name) { + GenericValue n(StringRef(name)); + return FindMember(n); + } + + ConstMemberIterator FindMember(const Ch* name) const { return const_cast(*this).FindMember(name); } + + //! Find member by name. + /*! + This version is faster because it does not need a StrLen(). It can also handle string with null character. + \param name Member name to be searched. + \pre IsObject() == true + \return Iterator to member, if it exists. + Otherwise returns \ref MemberEnd(). + + \note Earlier versions of Rapidjson returned a \c NULL pointer, in case + the requested member doesn't exist. For consistency with e.g. + \c std::map, this has been changed to MemberEnd() now. + \note Linear time complexity. + */ + template + MemberIterator FindMember(const GenericValue& name) { + RAPIDJSON_ASSERT(IsObject()); + RAPIDJSON_ASSERT(name.IsString()); + return DoFindMember(name); + } + template ConstMemberIterator FindMember(const GenericValue& name) const { return const_cast(*this).FindMember(name); } + +#if RAPIDJSON_HAS_STDSTRING + //! Find member by string object name. + /*! + \param name Member name to be searched. + \pre IsObject() == true + \return Iterator to member, if it exists. + Otherwise returns \ref MemberEnd(). + */ + MemberIterator FindMember(const std::basic_string& name) { return FindMember(GenericValue(StringRef(name))); } + ConstMemberIterator FindMember(const std::basic_string& name) const { return FindMember(GenericValue(StringRef(name))); } +#endif + + //! Add a member (name-value pair) to the object. + /*! \param name A string value as name of member. + \param value Value of any type. + \param allocator Allocator for reallocating memory. It must be the same one as used before. Commonly use GenericDocument::GetAllocator(). + \return The value itself for fluent API. + \note The ownership of \c name and \c value will be transferred to this object on success. + \pre IsObject() && name.IsString() + \post name.IsNull() && value.IsNull() + \note Amortized Constant time complexity. + */ + GenericValue& AddMember(GenericValue& name, GenericValue& value, Allocator& allocator) { + RAPIDJSON_ASSERT(IsObject()); + RAPIDJSON_ASSERT(name.IsString()); + DoAddMember(name, value, allocator); + return *this; + } + + //! Add a constant string value as member (name-value pair) to the object. + /*! \param name A string value as name of member. + \param value constant string reference as value of member. + \param allocator Allocator for reallocating memory. It must be the same one as used before. Commonly use GenericDocument::GetAllocator(). + \return The value itself for fluent API. + \pre IsObject() + \note This overload is needed to avoid clashes with the generic primitive type AddMember(GenericValue&,T,Allocator&) overload below. + \note Amortized Constant time complexity. + */ + GenericValue& AddMember(GenericValue& name, StringRefType value, Allocator& allocator) { + GenericValue v(value); + return AddMember(name, v, allocator); + } + +#if RAPIDJSON_HAS_STDSTRING + //! Add a string object as member (name-value pair) to the object. + /*! \param name A string value as name of member. + \param value constant string reference as value of member. + \param allocator Allocator for reallocating memory. It must be the same one as used before. Commonly use GenericDocument::GetAllocator(). + \return The value itself for fluent API. + \pre IsObject() + \note This overload is needed to avoid clashes with the generic primitive type AddMember(GenericValue&,T,Allocator&) overload below. + \note Amortized Constant time complexity. + */ + GenericValue& AddMember(GenericValue& name, std::basic_string& value, Allocator& allocator) { + GenericValue v(value, allocator); + return AddMember(name, v, allocator); + } +#endif + + //! Add any primitive value as member (name-value pair) to the object. + /*! \tparam T Either \ref Type, \c int, \c unsigned, \c int64_t, \c uint64_t + \param name A string value as name of member. + \param value Value of primitive type \c T as value of member + \param allocator Allocator for reallocating memory. Commonly use GenericDocument::GetAllocator(). + \return The value itself for fluent API. + \pre IsObject() + + \note The source type \c T explicitly disallows all pointer types, + especially (\c const) \ref Ch*. This helps avoiding implicitly + referencing character strings with insufficient lifetime, use + \ref AddMember(StringRefType, GenericValue&, Allocator&) or \ref + AddMember(StringRefType, StringRefType, Allocator&). + All other pointer types would implicitly convert to \c bool, + use an explicit cast instead, if needed. + \note Amortized Constant time complexity. + */ + template + RAPIDJSON_DISABLEIF_RETURN((internal::OrExpr, internal::IsGenericValue >), (GenericValue&)) + AddMember(GenericValue& name, T value, Allocator& allocator) { + GenericValue v(value); + return AddMember(name, v, allocator); + } + +#if RAPIDJSON_HAS_CXX11_RVALUE_REFS + GenericValue& AddMember(GenericValue&& name, GenericValue&& value, Allocator& allocator) { + return AddMember(name, value, allocator); + } + GenericValue& AddMember(GenericValue&& name, GenericValue& value, Allocator& allocator) { + return AddMember(name, value, allocator); + } + GenericValue& AddMember(GenericValue& name, GenericValue&& value, Allocator& allocator) { + return AddMember(name, value, allocator); + } + GenericValue& AddMember(StringRefType name, GenericValue&& value, Allocator& allocator) { + GenericValue n(name); + return AddMember(n, value, allocator); + } +#endif // RAPIDJSON_HAS_CXX11_RVALUE_REFS + + + //! Add a member (name-value pair) to the object. + /*! \param name A constant string reference as name of member. + \param value Value of any type. + \param allocator Allocator for reallocating memory. It must be the same one as used before. Commonly use GenericDocument::GetAllocator(). + \return The value itself for fluent API. + \note The ownership of \c value will be transferred to this object on success. + \pre IsObject() + \post value.IsNull() + \note Amortized Constant time complexity. + */ + GenericValue& AddMember(StringRefType name, GenericValue& value, Allocator& allocator) { + GenericValue n(name); + return AddMember(n, value, allocator); + } + + //! Add a constant string value as member (name-value pair) to the object. + /*! \param name A constant string reference as name of member. + \param value constant string reference as value of member. + \param allocator Allocator for reallocating memory. It must be the same one as used before. Commonly use GenericDocument::GetAllocator(). + \return The value itself for fluent API. + \pre IsObject() + \note This overload is needed to avoid clashes with the generic primitive type AddMember(StringRefType,T,Allocator&) overload below. + \note Amortized Constant time complexity. + */ + GenericValue& AddMember(StringRefType name, StringRefType value, Allocator& allocator) { + GenericValue v(value); + return AddMember(name, v, allocator); + } + + //! Add any primitive value as member (name-value pair) to the object. + /*! \tparam T Either \ref Type, \c int, \c unsigned, \c int64_t, \c uint64_t + \param name A constant string reference as name of member. + \param value Value of primitive type \c T as value of member + \param allocator Allocator for reallocating memory. Commonly use GenericDocument::GetAllocator(). + \return The value itself for fluent API. + \pre IsObject() + + \note The source type \c T explicitly disallows all pointer types, + especially (\c const) \ref Ch*. This helps avoiding implicitly + referencing character strings with insufficient lifetime, use + \ref AddMember(StringRefType, GenericValue&, Allocator&) or \ref + AddMember(StringRefType, StringRefType, Allocator&). + All other pointer types would implicitly convert to \c bool, + use an explicit cast instead, if needed. + \note Amortized Constant time complexity. + */ + template + RAPIDJSON_DISABLEIF_RETURN((internal::OrExpr, internal::IsGenericValue >), (GenericValue&)) + AddMember(StringRefType name, T value, Allocator& allocator) { + GenericValue n(name); + return AddMember(n, value, allocator); + } + + //! Remove all members in the object. + /*! This function do not deallocate memory in the object, i.e. the capacity is unchanged. + \note Linear time complexity. + */ + void RemoveAllMembers() { + RAPIDJSON_ASSERT(IsObject()); + DoClearMembers(); + } + + //! Remove a member in object by its name. + /*! \param name Name of member to be removed. + \return Whether the member existed. + \note This function may reorder the object members. Use \ref + EraseMember(ConstMemberIterator) if you need to preserve the + relative order of the remaining members. + \note Linear time complexity. + */ + bool RemoveMember(const Ch* name) { + GenericValue n(StringRef(name)); + return RemoveMember(n); + } + +#if RAPIDJSON_HAS_STDSTRING + bool RemoveMember(const std::basic_string& name) { return RemoveMember(GenericValue(StringRef(name))); } +#endif + + template + bool RemoveMember(const GenericValue& name) { + MemberIterator m = FindMember(name); + if (m != MemberEnd()) { + RemoveMember(m); + return true; + } + else + return false; + } + + //! Remove a member in object by iterator. + /*! \param m member iterator (obtained by FindMember() or MemberBegin()). + \return the new iterator after removal. + \note This function may reorder the object members. Use \ref + EraseMember(ConstMemberIterator) if you need to preserve the + relative order of the remaining members. + \note Constant time complexity. + */ + MemberIterator RemoveMember(MemberIterator m) { + RAPIDJSON_ASSERT(IsObject()); + RAPIDJSON_ASSERT(data_.o.size > 0); + RAPIDJSON_ASSERT(GetMembersPointer() != 0); + RAPIDJSON_ASSERT(m >= MemberBegin() && m < MemberEnd()); + return DoRemoveMember(m); + } + + //! Remove a member from an object by iterator. + /*! \param pos iterator to the member to remove + \pre IsObject() == true && \ref MemberBegin() <= \c pos < \ref MemberEnd() + \return Iterator following the removed element. + If the iterator \c pos refers to the last element, the \ref MemberEnd() iterator is returned. + \note This function preserves the relative order of the remaining object + members. If you do not need this, use the more efficient \ref RemoveMember(MemberIterator). + \note Linear time complexity. + */ + MemberIterator EraseMember(ConstMemberIterator pos) { + return EraseMember(pos, pos +1); + } + + //! Remove members in the range [first, last) from an object. + /*! \param first iterator to the first member to remove + \param last iterator following the last member to remove + \pre IsObject() == true && \ref MemberBegin() <= \c first <= \c last <= \ref MemberEnd() + \return Iterator following the last removed element. + \note This function preserves the relative order of the remaining object + members. + \note Linear time complexity. + */ + MemberIterator EraseMember(ConstMemberIterator first, ConstMemberIterator last) { + RAPIDJSON_ASSERT(IsObject()); + RAPIDJSON_ASSERT(data_.o.size > 0); + RAPIDJSON_ASSERT(GetMembersPointer() != 0); + RAPIDJSON_ASSERT(first >= MemberBegin()); + RAPIDJSON_ASSERT(first <= last); + RAPIDJSON_ASSERT(last <= MemberEnd()); + return DoEraseMembers(first, last); + } + + //! Erase a member in object by its name. + /*! \param name Name of member to be removed. + \return Whether the member existed. + \note Linear time complexity. + */ + bool EraseMember(const Ch* name) { + GenericValue n(StringRef(name)); + return EraseMember(n); + } + +#if RAPIDJSON_HAS_STDSTRING + bool EraseMember(const std::basic_string& name) { return EraseMember(GenericValue(StringRef(name))); } +#endif + + template + bool EraseMember(const GenericValue& name) { + MemberIterator m = FindMember(name); + if (m != MemberEnd()) { + EraseMember(m); + return true; + } + else + return false; + } + + Object GetObject() { RAPIDJSON_ASSERT(IsObject()); return Object(*this); } + Object GetObj() { RAPIDJSON_ASSERT(IsObject()); return Object(*this); } + ConstObject GetObject() const { RAPIDJSON_ASSERT(IsObject()); return ConstObject(*this); } + ConstObject GetObj() const { RAPIDJSON_ASSERT(IsObject()); return ConstObject(*this); } + + //@} + + //!@name Array + //@{ + + //! Set this value as an empty array. + /*! \post IsArray == true */ + GenericValue& SetArray() { this->~GenericValue(); new (this) GenericValue(kArrayType); return *this; } + + //! Get the number of elements in array. + SizeType Size() const { RAPIDJSON_ASSERT(IsArray()); return data_.a.size; } + + //! Get the capacity of array. + SizeType Capacity() const { RAPIDJSON_ASSERT(IsArray()); return data_.a.capacity; } + + //! Check whether the array is empty. + bool Empty() const { RAPIDJSON_ASSERT(IsArray()); return data_.a.size == 0; } + + //! Remove all elements in the array. + /*! This function do not deallocate memory in the array, i.e. the capacity is unchanged. + \note Linear time complexity. + */ + void Clear() { + RAPIDJSON_ASSERT(IsArray()); + GenericValue* e = GetElementsPointer(); + for (GenericValue* v = e; v != e + data_.a.size; ++v) + v->~GenericValue(); + data_.a.size = 0; + } + + //! Get an element from array by index. + /*! \pre IsArray() == true + \param index Zero-based index of element. + \see operator[](T*) + */ + GenericValue& operator[](SizeType index) { + RAPIDJSON_ASSERT(IsArray()); + RAPIDJSON_ASSERT(index < data_.a.size); + return GetElementsPointer()[index]; + } + const GenericValue& operator[](SizeType index) const { return const_cast(*this)[index]; } + + //! Element iterator + /*! \pre IsArray() == true */ + ValueIterator Begin() { RAPIDJSON_ASSERT(IsArray()); return GetElementsPointer(); } + //! \em Past-the-end element iterator + /*! \pre IsArray() == true */ + ValueIterator End() { RAPIDJSON_ASSERT(IsArray()); return GetElementsPointer() + data_.a.size; } + //! Constant element iterator + /*! \pre IsArray() == true */ + ConstValueIterator Begin() const { return const_cast(*this).Begin(); } + //! Constant \em past-the-end element iterator + /*! \pre IsArray() == true */ + ConstValueIterator End() const { return const_cast(*this).End(); } + + //! Request the array to have enough capacity to store elements. + /*! \param newCapacity The capacity that the array at least need to have. + \param allocator Allocator for reallocating memory. It must be the same one as used before. Commonly use GenericDocument::GetAllocator(). + \return The value itself for fluent API. + \note Linear time complexity. + */ + GenericValue& Reserve(SizeType newCapacity, Allocator &allocator) { + RAPIDJSON_ASSERT(IsArray()); + if (newCapacity > data_.a.capacity) { + SetElementsPointer(reinterpret_cast(allocator.Realloc(GetElementsPointer(), data_.a.capacity * sizeof(GenericValue), newCapacity * sizeof(GenericValue)))); + data_.a.capacity = newCapacity; + } + return *this; + } + + //! Append a GenericValue at the end of the array. + /*! \param value Value to be appended. + \param allocator Allocator for reallocating memory. It must be the same one as used before. Commonly use GenericDocument::GetAllocator(). + \pre IsArray() == true + \post value.IsNull() == true + \return The value itself for fluent API. + \note The ownership of \c value will be transferred to this array on success. + \note If the number of elements to be appended is known, calls Reserve() once first may be more efficient. + \note Amortized constant time complexity. + */ + GenericValue& PushBack(GenericValue& value, Allocator& allocator) { + RAPIDJSON_ASSERT(IsArray()); + if (data_.a.size >= data_.a.capacity) + Reserve(data_.a.capacity == 0 ? kDefaultArrayCapacity : (data_.a.capacity + (data_.a.capacity + 1) / 2), allocator); + GetElementsPointer()[data_.a.size++].RawAssign(value); + return *this; + } + +#if RAPIDJSON_HAS_CXX11_RVALUE_REFS + GenericValue& PushBack(GenericValue&& value, Allocator& allocator) { + return PushBack(value, allocator); + } +#endif // RAPIDJSON_HAS_CXX11_RVALUE_REFS + + //! Append a constant string reference at the end of the array. + /*! \param value Constant string reference to be appended. + \param allocator Allocator for reallocating memory. It must be the same one used previously. Commonly use GenericDocument::GetAllocator(). + \pre IsArray() == true + \return The value itself for fluent API. + \note If the number of elements to be appended is known, calls Reserve() once first may be more efficient. + \note Amortized constant time complexity. + \see GenericStringRef + */ + GenericValue& PushBack(StringRefType value, Allocator& allocator) { + return (*this).template PushBack(value, allocator); + } + + //! Append a primitive value at the end of the array. + /*! \tparam T Either \ref Type, \c int, \c unsigned, \c int64_t, \c uint64_t + \param value Value of primitive type T to be appended. + \param allocator Allocator for reallocating memory. It must be the same one as used before. Commonly use GenericDocument::GetAllocator(). + \pre IsArray() == true + \return The value itself for fluent API. + \note If the number of elements to be appended is known, calls Reserve() once first may be more efficient. + + \note The source type \c T explicitly disallows all pointer types, + especially (\c const) \ref Ch*. This helps avoiding implicitly + referencing character strings with insufficient lifetime, use + \ref PushBack(GenericValue&, Allocator&) or \ref + PushBack(StringRefType, Allocator&). + All other pointer types would implicitly convert to \c bool, + use an explicit cast instead, if needed. + \note Amortized constant time complexity. + */ + template + RAPIDJSON_DISABLEIF_RETURN((internal::OrExpr, internal::IsGenericValue >), (GenericValue&)) + PushBack(T value, Allocator& allocator) { + GenericValue v(value); + return PushBack(v, allocator); + } + + //! Remove the last element in the array. + /*! + \note Constant time complexity. + */ + GenericValue& PopBack() { + RAPIDJSON_ASSERT(IsArray()); + RAPIDJSON_ASSERT(!Empty()); + GetElementsPointer()[--data_.a.size].~GenericValue(); + return *this; + } + + //! Remove an element of array by iterator. + /*! + \param pos iterator to the element to remove + \pre IsArray() == true && \ref Begin() <= \c pos < \ref End() + \return Iterator following the removed element. If the iterator pos refers to the last element, the End() iterator is returned. + \note Linear time complexity. + */ + ValueIterator Erase(ConstValueIterator pos) { + return Erase(pos, pos + 1); + } + + //! Remove elements in the range [first, last) of the array. + /*! + \param first iterator to the first element to remove + \param last iterator following the last element to remove + \pre IsArray() == true && \ref Begin() <= \c first <= \c last <= \ref End() + \return Iterator following the last removed element. + \note Linear time complexity. + */ + ValueIterator Erase(ConstValueIterator first, ConstValueIterator last) { + RAPIDJSON_ASSERT(IsArray()); + RAPIDJSON_ASSERT(data_.a.size > 0); + RAPIDJSON_ASSERT(GetElementsPointer() != 0); + RAPIDJSON_ASSERT(first >= Begin()); + RAPIDJSON_ASSERT(first <= last); + RAPIDJSON_ASSERT(last <= End()); + ValueIterator pos = Begin() + (first - Begin()); + for (ValueIterator itr = pos; itr != last; ++itr) + itr->~GenericValue(); + std::memmove(static_cast(pos), last, static_cast(End() - last) * sizeof(GenericValue)); + data_.a.size -= static_cast(last - first); + return pos; + } + + Array GetArray() { RAPIDJSON_ASSERT(IsArray()); return Array(*this); } + ConstArray GetArray() const { RAPIDJSON_ASSERT(IsArray()); return ConstArray(*this); } + + //@} + + //!@name Number + //@{ + + int GetInt() const { RAPIDJSON_ASSERT(data_.f.flags & kIntFlag); return data_.n.i.i; } + unsigned GetUint() const { RAPIDJSON_ASSERT(data_.f.flags & kUintFlag); return data_.n.u.u; } + int64_t GetInt64() const { RAPIDJSON_ASSERT(data_.f.flags & kInt64Flag); return data_.n.i64; } + uint64_t GetUint64() const { RAPIDJSON_ASSERT(data_.f.flags & kUint64Flag); return data_.n.u64; } + + //! Get the value as double type. + /*! \note If the value is 64-bit integer type, it may lose precision. Use \c IsLosslessDouble() to check whether the converison is lossless. + */ + double GetDouble() const { + RAPIDJSON_ASSERT(IsNumber()); + if ((data_.f.flags & kDoubleFlag) != 0) return data_.n.d; // exact type, no conversion. + if ((data_.f.flags & kIntFlag) != 0) return data_.n.i.i; // int -> double + if ((data_.f.flags & kUintFlag) != 0) return data_.n.u.u; // unsigned -> double + if ((data_.f.flags & kInt64Flag) != 0) return static_cast(data_.n.i64); // int64_t -> double (may lose precision) + RAPIDJSON_ASSERT((data_.f.flags & kUint64Flag) != 0); return static_cast(data_.n.u64); // uint64_t -> double (may lose precision) + } + + //! Get the value as float type. + /*! \note If the value is 64-bit integer type, it may lose precision. Use \c IsLosslessFloat() to check whether the converison is lossless. + */ + float GetFloat() const { + return static_cast(GetDouble()); + } + + GenericValue& SetInt(int i) { this->~GenericValue(); new (this) GenericValue(i); return *this; } + GenericValue& SetUint(unsigned u) { this->~GenericValue(); new (this) GenericValue(u); return *this; } + GenericValue& SetInt64(int64_t i64) { this->~GenericValue(); new (this) GenericValue(i64); return *this; } + GenericValue& SetUint64(uint64_t u64) { this->~GenericValue(); new (this) GenericValue(u64); return *this; } + GenericValue& SetDouble(double d) { this->~GenericValue(); new (this) GenericValue(d); return *this; } + GenericValue& SetFloat(float f) { this->~GenericValue(); new (this) GenericValue(static_cast(f)); return *this; } + + //@} + + //!@name String + //@{ + + const Ch* GetString() const { RAPIDJSON_ASSERT(IsString()); return DataString(data_); } + + //! Get the length of string. + /*! Since rapidjson permits "\\u0000" in the json string, strlen(v.GetString()) may not equal to v.GetStringLength(). + */ + SizeType GetStringLength() const { RAPIDJSON_ASSERT(IsString()); return DataStringLength(data_); } + + //! Set this value as a string without copying source string. + /*! This version has better performance with supplied length, and also support string containing null character. + \param s source string pointer. + \param length The length of source string, excluding the trailing null terminator. + \return The value itself for fluent API. + \post IsString() == true && GetString() == s && GetStringLength() == length + \see SetString(StringRefType) + */ + GenericValue& SetString(const Ch* s, SizeType length) { return SetString(StringRef(s, length)); } + + //! Set this value as a string without copying source string. + /*! \param s source string reference + \return The value itself for fluent API. + \post IsString() == true && GetString() == s && GetStringLength() == s.length + */ + GenericValue& SetString(StringRefType s) { this->~GenericValue(); SetStringRaw(s); return *this; } + + //! Set this value as a string by copying from source string. + /*! This version has better performance with supplied length, and also support string containing null character. + \param s source string. + \param length The length of source string, excluding the trailing null terminator. + \param allocator Allocator for allocating copied buffer. Commonly use GenericDocument::GetAllocator(). + \return The value itself for fluent API. + \post IsString() == true && GetString() != s && strcmp(GetString(),s) == 0 && GetStringLength() == length + */ + GenericValue& SetString(const Ch* s, SizeType length, Allocator& allocator) { return SetString(StringRef(s, length), allocator); } + + //! Set this value as a string by copying from source string. + /*! \param s source string. + \param allocator Allocator for allocating copied buffer. Commonly use GenericDocument::GetAllocator(). + \return The value itself for fluent API. + \post IsString() == true && GetString() != s && strcmp(GetString(),s) == 0 && GetStringLength() == length + */ + GenericValue& SetString(const Ch* s, Allocator& allocator) { return SetString(StringRef(s), allocator); } + + //! Set this value as a string by copying from source string. + /*! \param s source string reference + \param allocator Allocator for allocating copied buffer. Commonly use GenericDocument::GetAllocator(). + \return The value itself for fluent API. + \post IsString() == true && GetString() != s.s && strcmp(GetString(),s) == 0 && GetStringLength() == length + */ + GenericValue& SetString(StringRefType s, Allocator& allocator) { this->~GenericValue(); SetStringRaw(s, allocator); return *this; } + +#if RAPIDJSON_HAS_STDSTRING + //! Set this value as a string by copying from source string. + /*! \param s source string. + \param allocator Allocator for allocating copied buffer. Commonly use GenericDocument::GetAllocator(). + \return The value itself for fluent API. + \post IsString() == true && GetString() != s.data() && strcmp(GetString(),s.data() == 0 && GetStringLength() == s.size() + \note Requires the definition of the preprocessor symbol \ref RAPIDJSON_HAS_STDSTRING. + */ + GenericValue& SetString(const std::basic_string& s, Allocator& allocator) { return SetString(StringRef(s), allocator); } +#endif + + //@} + + //!@name Array + //@{ + + //! Templated version for checking whether this value is type T. + /*! + \tparam T Either \c bool, \c int, \c unsigned, \c int64_t, \c uint64_t, \c double, \c float, \c const \c char*, \c std::basic_string + */ + template + bool Is() const { return internal::TypeHelper::Is(*this); } + + template + T Get() const { return internal::TypeHelper::Get(*this); } + + template + T Get() { return internal::TypeHelper::Get(*this); } + + template + ValueType& Set(const T& data) { return internal::TypeHelper::Set(*this, data); } + + template + ValueType& Set(const T& data, AllocatorType& allocator) { return internal::TypeHelper::Set(*this, data, allocator); } + + //@} + + //! Generate events of this value to a Handler. + /*! This function adopts the GoF visitor pattern. + Typical usage is to output this JSON value as JSON text via Writer, which is a Handler. + It can also be used to deep clone this value via GenericDocument, which is also a Handler. + \tparam Handler type of handler. + \param handler An object implementing concept Handler. + */ + template + bool Accept(Handler& handler) const { + switch(GetType()) { + case kNullType: return handler.Null(); + case kFalseType: return handler.Bool(false); + case kTrueType: return handler.Bool(true); + + case kObjectType: + if (RAPIDJSON_UNLIKELY(!handler.StartObject())) + return false; + for (ConstMemberIterator m = MemberBegin(); m != MemberEnd(); ++m) { + RAPIDJSON_ASSERT(m->name.IsString()); // User may change the type of name by MemberIterator. + if (RAPIDJSON_UNLIKELY(!handler.Key(m->name.GetString(), m->name.GetStringLength(), (m->name.data_.f.flags & kCopyFlag) != 0))) + return false; + if (RAPIDJSON_UNLIKELY(!m->value.Accept(handler))) + return false; + } + return handler.EndObject(data_.o.size); + + case kArrayType: + if (RAPIDJSON_UNLIKELY(!handler.StartArray())) + return false; + for (ConstValueIterator v = Begin(); v != End(); ++v) + if (RAPIDJSON_UNLIKELY(!v->Accept(handler))) + return false; + return handler.EndArray(data_.a.size); + + case kStringType: + return handler.String(GetString(), GetStringLength(), (data_.f.flags & kCopyFlag) != 0); + + default: + RAPIDJSON_ASSERT(GetType() == kNumberType); + if (IsDouble()) return handler.Double(data_.n.d); + else if (IsInt()) return handler.Int(data_.n.i.i); + else if (IsUint()) return handler.Uint(data_.n.u.u); + else if (IsInt64()) return handler.Int64(data_.n.i64); + else return handler.Uint64(data_.n.u64); + } + } + +private: + template friend class GenericValue; + template friend class GenericDocument; + + enum { + kBoolFlag = 0x0008, + kNumberFlag = 0x0010, + kIntFlag = 0x0020, + kUintFlag = 0x0040, + kInt64Flag = 0x0080, + kUint64Flag = 0x0100, + kDoubleFlag = 0x0200, + kStringFlag = 0x0400, + kCopyFlag = 0x0800, + kInlineStrFlag = 0x1000, + + // Initial flags of different types. + kNullFlag = kNullType, + // These casts are added to suppress the warning on MSVC about bitwise operations between enums of different types. + kTrueFlag = static_cast(kTrueType) | static_cast(kBoolFlag), + kFalseFlag = static_cast(kFalseType) | static_cast(kBoolFlag), + kNumberIntFlag = static_cast(kNumberType) | static_cast(kNumberFlag | kIntFlag | kInt64Flag), + kNumberUintFlag = static_cast(kNumberType) | static_cast(kNumberFlag | kUintFlag | kUint64Flag | kInt64Flag), + kNumberInt64Flag = static_cast(kNumberType) | static_cast(kNumberFlag | kInt64Flag), + kNumberUint64Flag = static_cast(kNumberType) | static_cast(kNumberFlag | kUint64Flag), + kNumberDoubleFlag = static_cast(kNumberType) | static_cast(kNumberFlag | kDoubleFlag), + kNumberAnyFlag = static_cast(kNumberType) | static_cast(kNumberFlag | kIntFlag | kInt64Flag | kUintFlag | kUint64Flag | kDoubleFlag), + kConstStringFlag = static_cast(kStringType) | static_cast(kStringFlag), + kCopyStringFlag = static_cast(kStringType) | static_cast(kStringFlag | kCopyFlag), + kShortStringFlag = static_cast(kStringType) | static_cast(kStringFlag | kCopyFlag | kInlineStrFlag), + kObjectFlag = kObjectType, + kArrayFlag = kArrayType, + + kTypeMask = 0x07 + }; + + static const SizeType kDefaultArrayCapacity = RAPIDJSON_VALUE_DEFAULT_ARRAY_CAPACITY; + static const SizeType kDefaultObjectCapacity = RAPIDJSON_VALUE_DEFAULT_OBJECT_CAPACITY; + + struct Flag { +#if RAPIDJSON_48BITPOINTER_OPTIMIZATION + char payload[sizeof(SizeType) * 2 + 6]; // 2 x SizeType + lower 48-bit pointer +#elif RAPIDJSON_64BIT + char payload[sizeof(SizeType) * 2 + sizeof(void*) + 6]; // 6 padding bytes +#else + char payload[sizeof(SizeType) * 2 + sizeof(void*) + 2]; // 2 padding bytes +#endif + uint16_t flags; + }; + + struct String { + SizeType length; + SizeType hashcode; //!< reserved + const Ch* str; + }; // 12 bytes in 32-bit mode, 16 bytes in 64-bit mode + + // implementation detail: ShortString can represent zero-terminated strings up to MaxSize chars + // (excluding the terminating zero) and store a value to determine the length of the contained + // string in the last character str[LenPos] by storing "MaxSize - length" there. If the string + // to store has the maximal length of MaxSize then str[LenPos] will be 0 and therefore act as + // the string terminator as well. For getting the string length back from that value just use + // "MaxSize - str[LenPos]". + // This allows to store 13-chars strings in 32-bit mode, 21-chars strings in 64-bit mode, + // 13-chars strings for RAPIDJSON_48BITPOINTER_OPTIMIZATION=1 inline (for `UTF8`-encoded strings). + struct ShortString { + enum { MaxChars = sizeof(static_cast(0)->payload) / sizeof(Ch), MaxSize = MaxChars - 1, LenPos = MaxSize }; + Ch str[MaxChars]; + + inline static bool Usable(SizeType len) { return (MaxSize >= len); } + inline void SetLength(SizeType len) { str[LenPos] = static_cast(MaxSize - len); } + inline SizeType GetLength() const { return static_cast(MaxSize - str[LenPos]); } + }; // at most as many bytes as "String" above => 12 bytes in 32-bit mode, 16 bytes in 64-bit mode + + // By using proper binary layout, retrieval of different integer types do not need conversions. + union Number { +#if RAPIDJSON_ENDIAN == RAPIDJSON_LITTLEENDIAN + struct I { + int i; + char padding[4]; + }i; + struct U { + unsigned u; + char padding2[4]; + }u; +#else + struct I { + char padding[4]; + int i; + }i; + struct U { + char padding2[4]; + unsigned u; + }u; +#endif + int64_t i64; + uint64_t u64; + double d; + }; // 8 bytes + + struct ObjectData { + SizeType size; + SizeType capacity; + Member* members; + }; // 12 bytes in 32-bit mode, 16 bytes in 64-bit mode + + struct ArrayData { + SizeType size; + SizeType capacity; + GenericValue* elements; + }; // 12 bytes in 32-bit mode, 16 bytes in 64-bit mode + + union Data { + String s; + ShortString ss; + Number n; + ObjectData o; + ArrayData a; + Flag f; + }; // 16 bytes in 32-bit mode, 24 bytes in 64-bit mode, 16 bytes in 64-bit with RAPIDJSON_48BITPOINTER_OPTIMIZATION + + static RAPIDJSON_FORCEINLINE const Ch* DataString(const Data& data) { + return (data.f.flags & kInlineStrFlag) ? data.ss.str : RAPIDJSON_GETPOINTER(Ch, data.s.str); + } + static RAPIDJSON_FORCEINLINE SizeType DataStringLength(const Data& data) { + return (data.f.flags & kInlineStrFlag) ? data.ss.GetLength() : data.s.length; + } + + RAPIDJSON_FORCEINLINE const Ch* GetStringPointer() const { return RAPIDJSON_GETPOINTER(Ch, data_.s.str); } + RAPIDJSON_FORCEINLINE const Ch* SetStringPointer(const Ch* str) { return RAPIDJSON_SETPOINTER(Ch, data_.s.str, str); } + RAPIDJSON_FORCEINLINE GenericValue* GetElementsPointer() const { return RAPIDJSON_GETPOINTER(GenericValue, data_.a.elements); } + RAPIDJSON_FORCEINLINE GenericValue* SetElementsPointer(GenericValue* elements) { return RAPIDJSON_SETPOINTER(GenericValue, data_.a.elements, elements); } + RAPIDJSON_FORCEINLINE Member* GetMembersPointer() const { return RAPIDJSON_GETPOINTER(Member, data_.o.members); } + RAPIDJSON_FORCEINLINE Member* SetMembersPointer(Member* members) { return RAPIDJSON_SETPOINTER(Member, data_.o.members, members); } + +#if RAPIDJSON_USE_MEMBERSMAP + + struct MapTraits { + struct Less { + bool operator()(const Data& s1, const Data& s2) const { + SizeType n1 = DataStringLength(s1), n2 = DataStringLength(s2); + int cmp = std::memcmp(DataString(s1), DataString(s2), sizeof(Ch) * (n1 < n2 ? n1 : n2)); + return cmp < 0 || (cmp == 0 && n1 < n2); + } + }; + typedef std::pair Pair; + typedef std::multimap > Map; + typedef typename Map::iterator Iterator; + }; + typedef typename MapTraits::Map Map; + typedef typename MapTraits::Less MapLess; + typedef typename MapTraits::Pair MapPair; + typedef typename MapTraits::Iterator MapIterator; + + // + // Layout of the members' map/array, re(al)located according to the needed capacity: + // + // {Map*}<>{capacity}<>{Member[capacity]}<>{MapIterator[capacity]} + // + // (where <> stands for the RAPIDJSON_ALIGN-ment, if needed) + // + + static RAPIDJSON_FORCEINLINE size_t GetMapLayoutSize(SizeType capacity) { + return RAPIDJSON_ALIGN(sizeof(Map*)) + + RAPIDJSON_ALIGN(sizeof(SizeType)) + + RAPIDJSON_ALIGN(capacity * sizeof(Member)) + + capacity * sizeof(MapIterator); + } + + static RAPIDJSON_FORCEINLINE SizeType &GetMapCapacity(Map* &map) { + return *reinterpret_cast(reinterpret_cast(&map) + + RAPIDJSON_ALIGN(sizeof(Map*))); + } + + static RAPIDJSON_FORCEINLINE Member* GetMapMembers(Map* &map) { + return reinterpret_cast(reinterpret_cast(&map) + + RAPIDJSON_ALIGN(sizeof(Map*)) + + RAPIDJSON_ALIGN(sizeof(SizeType))); + } + + static RAPIDJSON_FORCEINLINE MapIterator* GetMapIterators(Map* &map) { + return reinterpret_cast(reinterpret_cast(&map) + + RAPIDJSON_ALIGN(sizeof(Map*)) + + RAPIDJSON_ALIGN(sizeof(SizeType)) + + RAPIDJSON_ALIGN(GetMapCapacity(map) * sizeof(Member))); + } + + static RAPIDJSON_FORCEINLINE Map* &GetMap(Member* members) { + RAPIDJSON_ASSERT(members != 0); + return *reinterpret_cast(reinterpret_cast(members) - + RAPIDJSON_ALIGN(sizeof(SizeType)) - + RAPIDJSON_ALIGN(sizeof(Map*))); + } + + // Some compilers' debug mechanisms want all iterators to be destroyed, for their accounting.. + RAPIDJSON_FORCEINLINE MapIterator DropMapIterator(MapIterator& rhs) { +#if RAPIDJSON_HAS_CXX11 + MapIterator ret = std::move(rhs); +#else + MapIterator ret = rhs; +#endif + rhs.~MapIterator(); + return ret; + } + + Map* &DoReallocMap(Map** oldMap, SizeType newCapacity, Allocator& allocator) { + Map **newMap = static_cast(allocator.Malloc(GetMapLayoutSize(newCapacity))); + GetMapCapacity(*newMap) = newCapacity; + if (!oldMap) { + *newMap = new (allocator.Malloc(sizeof(Map))) Map(MapLess(), allocator); + } + else { + *newMap = *oldMap; + size_t count = (*oldMap)->size(); + std::memcpy(static_cast(GetMapMembers(*newMap)), + static_cast(GetMapMembers(*oldMap)), + count * sizeof(Member)); + MapIterator *oldIt = GetMapIterators(*oldMap), + *newIt = GetMapIterators(*newMap); + while (count--) { + new (&newIt[count]) MapIterator(DropMapIterator(oldIt[count])); + } + Allocator::Free(oldMap); + } + return *newMap; + } + + RAPIDJSON_FORCEINLINE Member* DoAllocMembers(SizeType capacity, Allocator& allocator) { + return GetMapMembers(DoReallocMap(0, capacity, allocator)); + } + + void DoReserveMembers(SizeType newCapacity, Allocator& allocator) { + ObjectData& o = data_.o; + if (newCapacity > o.capacity) { + Member* oldMembers = GetMembersPointer(); + Map **oldMap = oldMembers ? &GetMap(oldMembers) : 0, + *&newMap = DoReallocMap(oldMap, newCapacity, allocator); + RAPIDJSON_SETPOINTER(Member, o.members, GetMapMembers(newMap)); + o.capacity = newCapacity; + } + } + + template + MemberIterator DoFindMember(const GenericValue& name) { + if (Member* members = GetMembersPointer()) { + Map* &map = GetMap(members); + MapIterator mit = map->find(reinterpret_cast(name.data_)); + if (mit != map->end()) { + return MemberIterator(&members[mit->second]); + } + } + return MemberEnd(); + } + + void DoClearMembers() { + if (Member* members = GetMembersPointer()) { + Map* &map = GetMap(members); + MapIterator* mit = GetMapIterators(map); + for (SizeType i = 0; i < data_.o.size; i++) { + map->erase(DropMapIterator(mit[i])); + members[i].~Member(); + } + data_.o.size = 0; + } + } + + void DoFreeMembers() { + if (Member* members = GetMembersPointer()) { + GetMap(members)->~Map(); + for (SizeType i = 0; i < data_.o.size; i++) { + members[i].~Member(); + } + if (Allocator::kNeedFree) { // Shortcut by Allocator's trait + Map** map = &GetMap(members); + Allocator::Free(*map); + Allocator::Free(map); + } + } + } + +#else // !RAPIDJSON_USE_MEMBERSMAP + + RAPIDJSON_FORCEINLINE Member* DoAllocMembers(SizeType capacity, Allocator& allocator) { + return Malloc(allocator, capacity); + } + + void DoReserveMembers(SizeType newCapacity, Allocator& allocator) { + ObjectData& o = data_.o; + if (newCapacity > o.capacity) { + Member* newMembers = Realloc(allocator, GetMembersPointer(), o.capacity, newCapacity); + RAPIDJSON_SETPOINTER(Member, o.members, newMembers); + o.capacity = newCapacity; + } + } + + template + MemberIterator DoFindMember(const GenericValue& name) { + MemberIterator member = MemberBegin(); + for ( ; member != MemberEnd(); ++member) + if (name.StringEqual(member->name)) + break; + return member; + } + + void DoClearMembers() { + for (MemberIterator m = MemberBegin(); m != MemberEnd(); ++m) + m->~Member(); + data_.o.size = 0; + } + + void DoFreeMembers() { + for (MemberIterator m = MemberBegin(); m != MemberEnd(); ++m) + m->~Member(); + Allocator::Free(GetMembersPointer()); + } + +#endif // !RAPIDJSON_USE_MEMBERSMAP + + void DoAddMember(GenericValue& name, GenericValue& value, Allocator& allocator) { + ObjectData& o = data_.o; + if (o.size >= o.capacity) + DoReserveMembers(o.capacity ? (o.capacity + (o.capacity + 1) / 2) : kDefaultObjectCapacity, allocator); + Member* members = GetMembersPointer(); + Member* m = members + o.size; + m->name.RawAssign(name); + m->value.RawAssign(value); +#if RAPIDJSON_USE_MEMBERSMAP + Map* &map = GetMap(members); + MapIterator* mit = GetMapIterators(map); + new (&mit[o.size]) MapIterator(map->insert(MapPair(m->name.data_, o.size))); +#endif + ++o.size; + } + + MemberIterator DoRemoveMember(MemberIterator m) { + ObjectData& o = data_.o; + Member* members = GetMembersPointer(); +#if RAPIDJSON_USE_MEMBERSMAP + Map* &map = GetMap(members); + MapIterator* mit = GetMapIterators(map); + SizeType mpos = static_cast(&*m - members); + map->erase(DropMapIterator(mit[mpos])); +#endif + MemberIterator last(members + (o.size - 1)); + if (o.size > 1 && m != last) { +#if RAPIDJSON_USE_MEMBERSMAP + new (&mit[mpos]) MapIterator(DropMapIterator(mit[&*last - members])); + mit[mpos]->second = mpos; +#endif + *m = *last; // Move the last one to this place + } + else { + m->~Member(); // Only one left, just destroy + } + --o.size; + return m; + } + + MemberIterator DoEraseMembers(ConstMemberIterator first, ConstMemberIterator last) { + ObjectData& o = data_.o; + MemberIterator beg = MemberBegin(), + pos = beg + (first - beg), + end = MemberEnd(); +#if RAPIDJSON_USE_MEMBERSMAP + Map* &map = GetMap(GetMembersPointer()); + MapIterator* mit = GetMapIterators(map); +#endif + for (MemberIterator itr = pos; itr != last; ++itr) { +#if RAPIDJSON_USE_MEMBERSMAP + map->erase(DropMapIterator(mit[itr - beg])); +#endif + itr->~Member(); + } +#if RAPIDJSON_USE_MEMBERSMAP + if (first != last) { + // Move remaining members/iterators + MemberIterator next = pos + (last - first); + for (MemberIterator itr = pos; next != end; ++itr, ++next) { + std::memcpy(static_cast(&*itr), &*next, sizeof(Member)); + SizeType mpos = static_cast(itr - beg); + new (&mit[mpos]) MapIterator(DropMapIterator(mit[next - beg])); + mit[mpos]->second = mpos; + } + } +#else + std::memmove(static_cast(&*pos), &*last, + static_cast(end - last) * sizeof(Member)); +#endif + o.size -= static_cast(last - first); + return pos; + } + + template + void DoCopyMembers(const GenericValue& rhs, Allocator& allocator, bool copyConstStrings) { + RAPIDJSON_ASSERT(rhs.GetType() == kObjectType); + + data_.f.flags = kObjectFlag; + SizeType count = rhs.data_.o.size; + Member* lm = DoAllocMembers(count, allocator); + const typename GenericValue::Member* rm = rhs.GetMembersPointer(); +#if RAPIDJSON_USE_MEMBERSMAP + Map* &map = GetMap(lm); + MapIterator* mit = GetMapIterators(map); +#endif + for (SizeType i = 0; i < count; i++) { + new (&lm[i].name) GenericValue(rm[i].name, allocator, copyConstStrings); + new (&lm[i].value) GenericValue(rm[i].value, allocator, copyConstStrings); +#if RAPIDJSON_USE_MEMBERSMAP + new (&mit[i]) MapIterator(map->insert(MapPair(lm[i].name.data_, i))); +#endif + } + data_.o.size = data_.o.capacity = count; + SetMembersPointer(lm); + } + + // Initialize this value as array with initial data, without calling destructor. + void SetArrayRaw(GenericValue* values, SizeType count, Allocator& allocator) { + data_.f.flags = kArrayFlag; + if (count) { + GenericValue* e = static_cast(allocator.Malloc(count * sizeof(GenericValue))); + SetElementsPointer(e); + std::memcpy(static_cast(e), values, count * sizeof(GenericValue)); + } + else + SetElementsPointer(0); + data_.a.size = data_.a.capacity = count; + } + + //! Initialize this value as object with initial data, without calling destructor. + void SetObjectRaw(Member* members, SizeType count, Allocator& allocator) { + data_.f.flags = kObjectFlag; + if (count) { + Member* m = DoAllocMembers(count, allocator); + SetMembersPointer(m); + std::memcpy(static_cast(m), members, count * sizeof(Member)); +#if RAPIDJSON_USE_MEMBERSMAP + Map* &map = GetMap(m); + MapIterator* mit = GetMapIterators(map); + for (SizeType i = 0; i < count; i++) { + new (&mit[i]) MapIterator(map->insert(MapPair(m[i].name.data_, i))); + } +#endif + } + else + SetMembersPointer(0); + data_.o.size = data_.o.capacity = count; + } + + //! Initialize this value as constant string, without calling destructor. + void SetStringRaw(StringRefType s) RAPIDJSON_NOEXCEPT { + data_.f.flags = kConstStringFlag; + SetStringPointer(s); + data_.s.length = s.length; + } + + //! Initialize this value as copy string with initial data, without calling destructor. + void SetStringRaw(StringRefType s, Allocator& allocator) { + Ch* str = 0; + if (ShortString::Usable(s.length)) { + data_.f.flags = kShortStringFlag; + data_.ss.SetLength(s.length); + str = data_.ss.str; + } else { + data_.f.flags = kCopyStringFlag; + data_.s.length = s.length; + str = static_cast(allocator.Malloc((s.length + 1) * sizeof(Ch))); + SetStringPointer(str); + } + std::memcpy(str, s, s.length * sizeof(Ch)); + str[s.length] = '\0'; + } + + //! Assignment without calling destructor + void RawAssign(GenericValue& rhs) RAPIDJSON_NOEXCEPT { + data_ = rhs.data_; + // data_.f.flags = rhs.data_.f.flags; + rhs.data_.f.flags = kNullFlag; + } + + template + bool StringEqual(const GenericValue& rhs) const { + RAPIDJSON_ASSERT(IsString()); + RAPIDJSON_ASSERT(rhs.IsString()); + + const SizeType len1 = GetStringLength(); + const SizeType len2 = rhs.GetStringLength(); + if(len1 != len2) { return false; } + + const Ch* const str1 = GetString(); + const Ch* const str2 = rhs.GetString(); + if(str1 == str2) { return true; } // fast path for constant string + + return (std::memcmp(str1, str2, sizeof(Ch) * len1) == 0); + } + + Data data_; +}; + +//! GenericValue with UTF8 encoding +typedef GenericValue > Value; + +/////////////////////////////////////////////////////////////////////////////// +// GenericDocument + +//! A document for parsing JSON text as DOM. +/*! + \note implements Handler concept + \tparam Encoding Encoding for both parsing and string storage. + \tparam Allocator Allocator for allocating memory for the DOM + \tparam StackAllocator Allocator for allocating memory for stack during parsing. + \warning Although GenericDocument inherits from GenericValue, the API does \b not provide any virtual functions, especially no virtual destructor. To avoid memory leaks, do not \c delete a GenericDocument object via a pointer to a GenericValue. +*/ +template +class GenericDocument : public GenericValue { +public: + typedef typename Encoding::Ch Ch; //!< Character type derived from Encoding. + typedef GenericValue ValueType; //!< Value type of the document. + typedef Allocator AllocatorType; //!< Allocator type from template parameter. + + //! Constructor + /*! Creates an empty document of specified type. + \param type Mandatory type of object to create. + \param allocator Optional allocator for allocating memory. + \param stackCapacity Optional initial capacity of stack in bytes. + \param stackAllocator Optional allocator for allocating memory for stack. + */ + explicit GenericDocument(Type type, Allocator* allocator = 0, size_t stackCapacity = kDefaultStackCapacity, StackAllocator* stackAllocator = 0) : + GenericValue(type), allocator_(allocator), ownAllocator_(0), stack_(stackAllocator, stackCapacity), parseResult_() + { + if (!allocator_) + ownAllocator_ = allocator_ = RAPIDJSON_NEW(Allocator)(); + } + + //! Constructor + /*! Creates an empty document which type is Null. + \param allocator Optional allocator for allocating memory. + \param stackCapacity Optional initial capacity of stack in bytes. + \param stackAllocator Optional allocator for allocating memory for stack. + */ + GenericDocument(Allocator* allocator = 0, size_t stackCapacity = kDefaultStackCapacity, StackAllocator* stackAllocator = 0) : + allocator_(allocator), ownAllocator_(0), stack_(stackAllocator, stackCapacity), parseResult_() + { + if (!allocator_) + ownAllocator_ = allocator_ = RAPIDJSON_NEW(Allocator)(); + } + +#if RAPIDJSON_HAS_CXX11_RVALUE_REFS + //! Move constructor in C++11 + GenericDocument(GenericDocument&& rhs) RAPIDJSON_NOEXCEPT + : ValueType(std::forward(rhs)), // explicit cast to avoid prohibited move from Document + allocator_(rhs.allocator_), + ownAllocator_(rhs.ownAllocator_), + stack_(std::move(rhs.stack_)), + parseResult_(rhs.parseResult_) + { + rhs.allocator_ = 0; + rhs.ownAllocator_ = 0; + rhs.parseResult_ = ParseResult(); + } +#endif + + ~GenericDocument() { + // Clear the ::ValueType before ownAllocator is destroyed, ~ValueType() + // runs last and may access its elements or members which would be freed + // with an allocator like MemoryPoolAllocator (CrtAllocator does not + // free its data when destroyed, but MemoryPoolAllocator does). + if (ownAllocator_) { + ValueType::SetNull(); + } + Destroy(); + } + +#if RAPIDJSON_HAS_CXX11_RVALUE_REFS + //! Move assignment in C++11 + GenericDocument& operator=(GenericDocument&& rhs) RAPIDJSON_NOEXCEPT + { + // The cast to ValueType is necessary here, because otherwise it would + // attempt to call GenericValue's templated assignment operator. + ValueType::operator=(std::forward(rhs)); + + // Calling the destructor here would prematurely call stack_'s destructor + Destroy(); + + allocator_ = rhs.allocator_; + ownAllocator_ = rhs.ownAllocator_; + stack_ = std::move(rhs.stack_); + parseResult_ = rhs.parseResult_; + + rhs.allocator_ = 0; + rhs.ownAllocator_ = 0; + rhs.parseResult_ = ParseResult(); + + return *this; + } +#endif + + //! Exchange the contents of this document with those of another. + /*! + \param rhs Another document. + \note Constant complexity. + \see GenericValue::Swap + */ + GenericDocument& Swap(GenericDocument& rhs) RAPIDJSON_NOEXCEPT { + ValueType::Swap(rhs); + stack_.Swap(rhs.stack_); + internal::Swap(allocator_, rhs.allocator_); + internal::Swap(ownAllocator_, rhs.ownAllocator_); + internal::Swap(parseResult_, rhs.parseResult_); + return *this; + } + + // Allow Swap with ValueType. + // Refer to Effective C++ 3rd Edition/Item 33: Avoid hiding inherited names. + using ValueType::Swap; + + //! free-standing swap function helper + /*! + Helper function to enable support for common swap implementation pattern based on \c std::swap: + \code + void swap(MyClass& a, MyClass& b) { + using std::swap; + swap(a.doc, b.doc); + // ... + } + \endcode + \see Swap() + */ + friend inline void swap(GenericDocument& a, GenericDocument& b) RAPIDJSON_NOEXCEPT { a.Swap(b); } + + //! Populate this document by a generator which produces SAX events. + /*! \tparam Generator A functor with bool f(Handler) prototype. + \param g Generator functor which sends SAX events to the parameter. + \return The document itself for fluent API. + */ + template + GenericDocument& Populate(Generator& g) { + ClearStackOnExit scope(*this); + if (g(*this)) { + RAPIDJSON_ASSERT(stack_.GetSize() == sizeof(ValueType)); // Got one and only one root object + ValueType::operator=(*stack_.template Pop(1));// Move value from stack to document + } + return *this; + } + + //!@name Parse from stream + //!@{ + + //! Parse JSON text from an input stream (with Encoding conversion) + /*! \tparam parseFlags Combination of \ref ParseFlag. + \tparam SourceEncoding Encoding of input stream + \tparam InputStream Type of input stream, implementing Stream concept + \param is Input stream to be parsed. + \return The document itself for fluent API. + */ + template + GenericDocument& ParseStream(InputStream& is) { + GenericReader reader( + stack_.HasAllocator() ? &stack_.GetAllocator() : 0); + ClearStackOnExit scope(*this); + parseResult_ = reader.template Parse(is, *this); + if (parseResult_) { + RAPIDJSON_ASSERT(stack_.GetSize() == sizeof(ValueType)); // Got one and only one root object + ValueType::operator=(*stack_.template Pop(1));// Move value from stack to document + } + return *this; + } + + //! Parse JSON text from an input stream + /*! \tparam parseFlags Combination of \ref ParseFlag. + \tparam InputStream Type of input stream, implementing Stream concept + \param is Input stream to be parsed. + \return The document itself for fluent API. + */ + template + GenericDocument& ParseStream(InputStream& is) { + return ParseStream(is); + } + + //! Parse JSON text from an input stream (with \ref kParseDefaultFlags) + /*! \tparam InputStream Type of input stream, implementing Stream concept + \param is Input stream to be parsed. + \return The document itself for fluent API. + */ + template + GenericDocument& ParseStream(InputStream& is) { + return ParseStream(is); + } + //!@} + + //!@name Parse in-place from mutable string + //!@{ + + //! Parse JSON text from a mutable string + /*! \tparam parseFlags Combination of \ref ParseFlag. + \param str Mutable zero-terminated string to be parsed. + \return The document itself for fluent API. + */ + template + GenericDocument& ParseInsitu(Ch* str) { + GenericInsituStringStream s(str); + return ParseStream(s); + } + + //! Parse JSON text from a mutable string (with \ref kParseDefaultFlags) + /*! \param str Mutable zero-terminated string to be parsed. + \return The document itself for fluent API. + */ + GenericDocument& ParseInsitu(Ch* str) { + return ParseInsitu(str); + } + //!@} + + //!@name Parse from read-only string + //!@{ + + //! Parse JSON text from a read-only string (with Encoding conversion) + /*! \tparam parseFlags Combination of \ref ParseFlag (must not contain \ref kParseInsituFlag). + \tparam SourceEncoding Transcoding from input Encoding + \param str Read-only zero-terminated string to be parsed. + */ + template + GenericDocument& Parse(const typename SourceEncoding::Ch* str) { + RAPIDJSON_ASSERT(!(parseFlags & kParseInsituFlag)); + GenericStringStream s(str); + return ParseStream(s); + } + + //! Parse JSON text from a read-only string + /*! \tparam parseFlags Combination of \ref ParseFlag (must not contain \ref kParseInsituFlag). + \param str Read-only zero-terminated string to be parsed. + */ + template + GenericDocument& Parse(const Ch* str) { + return Parse(str); + } + + //! Parse JSON text from a read-only string (with \ref kParseDefaultFlags) + /*! \param str Read-only zero-terminated string to be parsed. + */ + GenericDocument& Parse(const Ch* str) { + return Parse(str); + } + + template + GenericDocument& Parse(const typename SourceEncoding::Ch* str, size_t length) { + RAPIDJSON_ASSERT(!(parseFlags & kParseInsituFlag)); + MemoryStream ms(reinterpret_cast(str), length * sizeof(typename SourceEncoding::Ch)); + EncodedInputStream is(ms); + ParseStream(is); + return *this; + } + + template + GenericDocument& Parse(const Ch* str, size_t length) { + return Parse(str, length); + } + + GenericDocument& Parse(const Ch* str, size_t length) { + return Parse(str, length); + } + +#if RAPIDJSON_HAS_STDSTRING + template + GenericDocument& Parse(const std::basic_string& str) { + // c_str() is constant complexity according to standard. Should be faster than Parse(const char*, size_t) + return Parse(str.c_str()); + } + + template + GenericDocument& Parse(const std::basic_string& str) { + return Parse(str.c_str()); + } + + GenericDocument& Parse(const std::basic_string& str) { + return Parse(str); + } +#endif // RAPIDJSON_HAS_STDSTRING + + //!@} + + //!@name Handling parse errors + //!@{ + + //! Whether a parse error has occurred in the last parsing. + bool HasParseError() const { return parseResult_.IsError(); } + + //! Get the \ref ParseErrorCode of last parsing. + ParseErrorCode GetParseError() const { return parseResult_.Code(); } + + //! Get the position of last parsing error in input, 0 otherwise. + size_t GetErrorOffset() const { return parseResult_.Offset(); } + + //! Implicit conversion to get the last parse result +#ifndef __clang // -Wdocumentation + /*! \return \ref ParseResult of the last parse operation + + \code + Document doc; + ParseResult ok = doc.Parse(json); + if (!ok) + printf( "JSON parse error: %s (%u)\n", GetParseError_En(ok.Code()), ok.Offset()); + \endcode + */ +#endif + operator ParseResult() const { return parseResult_; } + //!@} + + //! Get the allocator of this document. + Allocator& GetAllocator() { + RAPIDJSON_ASSERT(allocator_); + return *allocator_; + } + + //! Get the capacity of stack in bytes. + size_t GetStackCapacity() const { return stack_.GetCapacity(); } + +private: + // clear stack on any exit from ParseStream, e.g. due to exception + struct ClearStackOnExit { + explicit ClearStackOnExit(GenericDocument& d) : d_(d) {} + ~ClearStackOnExit() { d_.ClearStack(); } + private: + ClearStackOnExit(const ClearStackOnExit&); + ClearStackOnExit& operator=(const ClearStackOnExit&); + GenericDocument& d_; + }; + + // callers of the following private Handler functions + // template friend class GenericReader; // for parsing + template friend class GenericValue; // for deep copying + +public: + // Implementation of Handler + bool Null() { new (stack_.template Push()) ValueType(); return true; } + bool Bool(bool b) { new (stack_.template Push()) ValueType(b); return true; } + bool Int(int i) { new (stack_.template Push()) ValueType(i); return true; } + bool Uint(unsigned i) { new (stack_.template Push()) ValueType(i); return true; } + bool Int64(int64_t i) { new (stack_.template Push()) ValueType(i); return true; } + bool Uint64(uint64_t i) { new (stack_.template Push()) ValueType(i); return true; } + bool Double(double d) { new (stack_.template Push()) ValueType(d); return true; } + + bool RawNumber(const Ch* str, SizeType length, bool copy) { + if (copy) + new (stack_.template Push()) ValueType(str, length, GetAllocator()); + else + new (stack_.template Push()) ValueType(str, length); + return true; + } + + bool String(const Ch* str, SizeType length, bool copy) { + if (copy) + new (stack_.template Push()) ValueType(str, length, GetAllocator()); + else + new (stack_.template Push()) ValueType(str, length); + return true; + } + + bool StartObject() { new (stack_.template Push()) ValueType(kObjectType); return true; } + + bool Key(const Ch* str, SizeType length, bool copy) { return String(str, length, copy); } + + bool EndObject(SizeType memberCount) { + typename ValueType::Member* members = stack_.template Pop(memberCount); + stack_.template Top()->SetObjectRaw(members, memberCount, GetAllocator()); + return true; + } + + bool StartArray() { new (stack_.template Push()) ValueType(kArrayType); return true; } + + bool EndArray(SizeType elementCount) { + ValueType* elements = stack_.template Pop(elementCount); + stack_.template Top()->SetArrayRaw(elements, elementCount, GetAllocator()); + return true; + } + +private: + //! Prohibit copying + GenericDocument(const GenericDocument&); + //! Prohibit assignment + GenericDocument& operator=(const GenericDocument&); + + void ClearStack() { + if (Allocator::kNeedFree) + while (stack_.GetSize() > 0) // Here assumes all elements in stack array are GenericValue (Member is actually 2 GenericValue objects) + (stack_.template Pop(1))->~ValueType(); + else + stack_.Clear(); + stack_.ShrinkToFit(); + } + + void Destroy() { + RAPIDJSON_DELETE(ownAllocator_); + } + + static const size_t kDefaultStackCapacity = 1024; + Allocator* allocator_; + Allocator* ownAllocator_; + internal::Stack stack_; + ParseResult parseResult_; +}; + +//! GenericDocument with UTF8 encoding +typedef GenericDocument > Document; + + +//! Helper class for accessing Value of array type. +/*! + Instance of this helper class is obtained by \c GenericValue::GetArray(). + In addition to all APIs for array type, it provides range-based for loop if \c RAPIDJSON_HAS_CXX11_RANGE_FOR=1. +*/ +template +class GenericArray { +public: + typedef GenericArray ConstArray; + typedef GenericArray Array; + typedef ValueT PlainType; + typedef typename internal::MaybeAddConst::Type ValueType; + typedef ValueType* ValueIterator; // This may be const or non-const iterator + typedef const ValueT* ConstValueIterator; + typedef typename ValueType::AllocatorType AllocatorType; + typedef typename ValueType::StringRefType StringRefType; + + template + friend class GenericValue; + + GenericArray(const GenericArray& rhs) : value_(rhs.value_) {} + GenericArray& operator=(const GenericArray& rhs) { value_ = rhs.value_; return *this; } + ~GenericArray() {} + + operator ValueType&() const { return value_; } + SizeType Size() const { return value_.Size(); } + SizeType Capacity() const { return value_.Capacity(); } + bool Empty() const { return value_.Empty(); } + void Clear() const { value_.Clear(); } + ValueType& operator[](SizeType index) const { return value_[index]; } + ValueIterator Begin() const { return value_.Begin(); } + ValueIterator End() const { return value_.End(); } + GenericArray Reserve(SizeType newCapacity, AllocatorType &allocator) const { value_.Reserve(newCapacity, allocator); return *this; } + GenericArray PushBack(ValueType& value, AllocatorType& allocator) const { value_.PushBack(value, allocator); return *this; } +#if RAPIDJSON_HAS_CXX11_RVALUE_REFS + GenericArray PushBack(ValueType&& value, AllocatorType& allocator) const { value_.PushBack(value, allocator); return *this; } +#endif // RAPIDJSON_HAS_CXX11_RVALUE_REFS + GenericArray PushBack(StringRefType value, AllocatorType& allocator) const { value_.PushBack(value, allocator); return *this; } + template RAPIDJSON_DISABLEIF_RETURN((internal::OrExpr, internal::IsGenericValue >), (const GenericArray&)) PushBack(T value, AllocatorType& allocator) const { value_.PushBack(value, allocator); return *this; } + GenericArray PopBack() const { value_.PopBack(); return *this; } + ValueIterator Erase(ConstValueIterator pos) const { return value_.Erase(pos); } + ValueIterator Erase(ConstValueIterator first, ConstValueIterator last) const { return value_.Erase(first, last); } + +#if RAPIDJSON_HAS_CXX11_RANGE_FOR + ValueIterator begin() const { return value_.Begin(); } + ValueIterator end() const { return value_.End(); } +#endif + +private: + GenericArray(); + GenericArray(ValueType& value) : value_(value) {} + ValueType& value_; +}; + +//! Helper class for accessing Value of object type. +/*! + Instance of this helper class is obtained by \c GenericValue::GetObject(). + In addition to all APIs for array type, it provides range-based for loop if \c RAPIDJSON_HAS_CXX11_RANGE_FOR=1. +*/ +template +class GenericObject { +public: + typedef GenericObject ConstObject; + typedef GenericObject Object; + typedef ValueT PlainType; + typedef typename internal::MaybeAddConst::Type ValueType; + typedef GenericMemberIterator MemberIterator; // This may be const or non-const iterator + typedef GenericMemberIterator ConstMemberIterator; + typedef typename ValueType::AllocatorType AllocatorType; + typedef typename ValueType::StringRefType StringRefType; + typedef typename ValueType::EncodingType EncodingType; + typedef typename ValueType::Ch Ch; + + template + friend class GenericValue; + + GenericObject(const GenericObject& rhs) : value_(rhs.value_) {} + GenericObject& operator=(const GenericObject& rhs) { value_ = rhs.value_; return *this; } + ~GenericObject() {} + + operator ValueType&() const { return value_; } + SizeType MemberCount() const { return value_.MemberCount(); } + SizeType MemberCapacity() const { return value_.MemberCapacity(); } + bool ObjectEmpty() const { return value_.ObjectEmpty(); } + template ValueType& operator[](T* name) const { return value_[name]; } + template ValueType& operator[](const GenericValue& name) const { return value_[name]; } +#if RAPIDJSON_HAS_STDSTRING + ValueType& operator[](const std::basic_string& name) const { return value_[name]; } +#endif + MemberIterator MemberBegin() const { return value_.MemberBegin(); } + MemberIterator MemberEnd() const { return value_.MemberEnd(); } + GenericObject MemberReserve(SizeType newCapacity, AllocatorType &allocator) const { value_.MemberReserve(newCapacity, allocator); return *this; } + bool HasMember(const Ch* name) const { return value_.HasMember(name); } +#if RAPIDJSON_HAS_STDSTRING + bool HasMember(const std::basic_string& name) const { return value_.HasMember(name); } +#endif + template bool HasMember(const GenericValue& name) const { return value_.HasMember(name); } + MemberIterator FindMember(const Ch* name) const { return value_.FindMember(name); } + template MemberIterator FindMember(const GenericValue& name) const { return value_.FindMember(name); } +#if RAPIDJSON_HAS_STDSTRING + MemberIterator FindMember(const std::basic_string& name) const { return value_.FindMember(name); } +#endif + GenericObject AddMember(ValueType& name, ValueType& value, AllocatorType& allocator) const { value_.AddMember(name, value, allocator); return *this; } + GenericObject AddMember(ValueType& name, StringRefType value, AllocatorType& allocator) const { value_.AddMember(name, value, allocator); return *this; } +#if RAPIDJSON_HAS_STDSTRING + GenericObject AddMember(ValueType& name, std::basic_string& value, AllocatorType& allocator) const { value_.AddMember(name, value, allocator); return *this; } +#endif + template RAPIDJSON_DISABLEIF_RETURN((internal::OrExpr, internal::IsGenericValue >), (ValueType&)) AddMember(ValueType& name, T value, AllocatorType& allocator) const { value_.AddMember(name, value, allocator); return *this; } +#if RAPIDJSON_HAS_CXX11_RVALUE_REFS + GenericObject AddMember(ValueType&& name, ValueType&& value, AllocatorType& allocator) const { value_.AddMember(name, value, allocator); return *this; } + GenericObject AddMember(ValueType&& name, ValueType& value, AllocatorType& allocator) const { value_.AddMember(name, value, allocator); return *this; } + GenericObject AddMember(ValueType& name, ValueType&& value, AllocatorType& allocator) const { value_.AddMember(name, value, allocator); return *this; } + GenericObject AddMember(StringRefType name, ValueType&& value, AllocatorType& allocator) const { value_.AddMember(name, value, allocator); return *this; } +#endif // RAPIDJSON_HAS_CXX11_RVALUE_REFS + GenericObject AddMember(StringRefType name, ValueType& value, AllocatorType& allocator) const { value_.AddMember(name, value, allocator); return *this; } + GenericObject AddMember(StringRefType name, StringRefType value, AllocatorType& allocator) const { value_.AddMember(name, value, allocator); return *this; } + template RAPIDJSON_DISABLEIF_RETURN((internal::OrExpr, internal::IsGenericValue >), (GenericObject)) AddMember(StringRefType name, T value, AllocatorType& allocator) const { value_.AddMember(name, value, allocator); return *this; } + void RemoveAllMembers() { value_.RemoveAllMembers(); } + bool RemoveMember(const Ch* name) const { return value_.RemoveMember(name); } +#if RAPIDJSON_HAS_STDSTRING + bool RemoveMember(const std::basic_string& name) const { return value_.RemoveMember(name); } +#endif + template bool RemoveMember(const GenericValue& name) const { return value_.RemoveMember(name); } + MemberIterator RemoveMember(MemberIterator m) const { return value_.RemoveMember(m); } + MemberIterator EraseMember(ConstMemberIterator pos) const { return value_.EraseMember(pos); } + MemberIterator EraseMember(ConstMemberIterator first, ConstMemberIterator last) const { return value_.EraseMember(first, last); } + bool EraseMember(const Ch* name) const { return value_.EraseMember(name); } +#if RAPIDJSON_HAS_STDSTRING + bool EraseMember(const std::basic_string& name) const { return EraseMember(ValueType(StringRef(name))); } +#endif + template bool EraseMember(const GenericValue& name) const { return value_.EraseMember(name); } + +#if RAPIDJSON_HAS_CXX11_RANGE_FOR + MemberIterator begin() const { return value_.MemberBegin(); } + MemberIterator end() const { return value_.MemberEnd(); } +#endif + +private: + GenericObject(); + GenericObject(ValueType& value) : value_(value) {} + ValueType& value_; +}; + +RAPIDJSON_NAMESPACE_END +RAPIDJSON_DIAG_POP + +#ifdef RAPIDJSON_WINDOWS_GETOBJECT_WORKAROUND_APPLIED +#pragma pop_macro("GetObject") +#undef RAPIDJSON_WINDOWS_GETOBJECT_WORKAROUND_APPLIED +#endif + +#endif // RAPIDJSON_DOCUMENT_H_ diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/encodedstream.h b/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/encodedstream.h new file mode 100644 index 0000000000..cf046b8923 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/encodedstream.h @@ -0,0 +1,299 @@ +// Tencent is pleased to support the open source community by making RapidJSON available. +// +// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. +// +// Licensed under the MIT License (the "License"); you may not use this file except +// in compliance with the License. You may obtain a copy of the License at +// +// http://opensource.org/licenses/MIT +// +// Unless required by applicable law or agreed to in writing, software distributed +// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +// CONDITIONS OF ANY KIND, either express or implied. See the License for the +// specific language governing permissions and limitations under the License. + +#ifndef RAPIDJSON_ENCODEDSTREAM_H_ +#define RAPIDJSON_ENCODEDSTREAM_H_ + +#include "stream.h" +#include "memorystream.h" + +#ifdef __GNUC__ +RAPIDJSON_DIAG_PUSH +RAPIDJSON_DIAG_OFF(effc++) +#endif + +#ifdef __clang__ +RAPIDJSON_DIAG_PUSH +RAPIDJSON_DIAG_OFF(padded) +#endif + +RAPIDJSON_NAMESPACE_BEGIN + +//! Input byte stream wrapper with a statically bound encoding. +/*! + \tparam Encoding The interpretation of encoding of the stream. Either UTF8, UTF16LE, UTF16BE, UTF32LE, UTF32BE. + \tparam InputByteStream Type of input byte stream. For example, FileReadStream. +*/ +template +class EncodedInputStream { + RAPIDJSON_STATIC_ASSERT(sizeof(typename InputByteStream::Ch) == 1); +public: + typedef typename Encoding::Ch Ch; + + EncodedInputStream(InputByteStream& is) : is_(is) { + current_ = Encoding::TakeBOM(is_); + } + + Ch Peek() const { return current_; } + Ch Take() { Ch c = current_; current_ = Encoding::Take(is_); return c; } + size_t Tell() const { return is_.Tell(); } + + // Not implemented + void Put(Ch) { RAPIDJSON_ASSERT(false); } + void Flush() { RAPIDJSON_ASSERT(false); } + Ch* PutBegin() { RAPIDJSON_ASSERT(false); return 0; } + size_t PutEnd(Ch*) { RAPIDJSON_ASSERT(false); return 0; } + +private: + EncodedInputStream(const EncodedInputStream&); + EncodedInputStream& operator=(const EncodedInputStream&); + + InputByteStream& is_; + Ch current_; +}; + +//! Specialized for UTF8 MemoryStream. +template <> +class EncodedInputStream, MemoryStream> { +public: + typedef UTF8<>::Ch Ch; + + EncodedInputStream(MemoryStream& is) : is_(is) { + if (static_cast(is_.Peek()) == 0xEFu) is_.Take(); + if (static_cast(is_.Peek()) == 0xBBu) is_.Take(); + if (static_cast(is_.Peek()) == 0xBFu) is_.Take(); + } + Ch Peek() const { return is_.Peek(); } + Ch Take() { return is_.Take(); } + size_t Tell() const { return is_.Tell(); } + + // Not implemented + void Put(Ch) {} + void Flush() {} + Ch* PutBegin() { return 0; } + size_t PutEnd(Ch*) { return 0; } + + MemoryStream& is_; + +private: + EncodedInputStream(const EncodedInputStream&); + EncodedInputStream& operator=(const EncodedInputStream&); +}; + +//! Output byte stream wrapper with statically bound encoding. +/*! + \tparam Encoding The interpretation of encoding of the stream. Either UTF8, UTF16LE, UTF16BE, UTF32LE, UTF32BE. + \tparam OutputByteStream Type of input byte stream. For example, FileWriteStream. +*/ +template +class EncodedOutputStream { + RAPIDJSON_STATIC_ASSERT(sizeof(typename OutputByteStream::Ch) == 1); +public: + typedef typename Encoding::Ch Ch; + + EncodedOutputStream(OutputByteStream& os, bool putBOM = true) : os_(os) { + if (putBOM) + Encoding::PutBOM(os_); + } + + void Put(Ch c) { Encoding::Put(os_, c); } + void Flush() { os_.Flush(); } + + // Not implemented + Ch Peek() const { RAPIDJSON_ASSERT(false); return 0;} + Ch Take() { RAPIDJSON_ASSERT(false); return 0;} + size_t Tell() const { RAPIDJSON_ASSERT(false); return 0; } + Ch* PutBegin() { RAPIDJSON_ASSERT(false); return 0; } + size_t PutEnd(Ch*) { RAPIDJSON_ASSERT(false); return 0; } + +private: + EncodedOutputStream(const EncodedOutputStream&); + EncodedOutputStream& operator=(const EncodedOutputStream&); + + OutputByteStream& os_; +}; + +#define RAPIDJSON_ENCODINGS_FUNC(x) UTF8::x, UTF16LE::x, UTF16BE::x, UTF32LE::x, UTF32BE::x + +//! Input stream wrapper with dynamically bound encoding and automatic encoding detection. +/*! + \tparam CharType Type of character for reading. + \tparam InputByteStream type of input byte stream to be wrapped. +*/ +template +class AutoUTFInputStream { + RAPIDJSON_STATIC_ASSERT(sizeof(typename InputByteStream::Ch) == 1); +public: + typedef CharType Ch; + + //! Constructor. + /*! + \param is input stream to be wrapped. + \param type UTF encoding type if it is not detected from the stream. + */ + AutoUTFInputStream(InputByteStream& is, UTFType type = kUTF8) : is_(&is), type_(type), hasBOM_(false) { + RAPIDJSON_ASSERT(type >= kUTF8 && type <= kUTF32BE); + DetectType(); + static const TakeFunc f[] = { RAPIDJSON_ENCODINGS_FUNC(Take) }; + takeFunc_ = f[type_]; + current_ = takeFunc_(*is_); + } + + UTFType GetType() const { return type_; } + bool HasBOM() const { return hasBOM_; } + + Ch Peek() const { return current_; } + Ch Take() { Ch c = current_; current_ = takeFunc_(*is_); return c; } + size_t Tell() const { return is_->Tell(); } + + // Not implemented + void Put(Ch) { RAPIDJSON_ASSERT(false); } + void Flush() { RAPIDJSON_ASSERT(false); } + Ch* PutBegin() { RAPIDJSON_ASSERT(false); return 0; } + size_t PutEnd(Ch*) { RAPIDJSON_ASSERT(false); return 0; } + +private: + AutoUTFInputStream(const AutoUTFInputStream&); + AutoUTFInputStream& operator=(const AutoUTFInputStream&); + + // Detect encoding type with BOM or RFC 4627 + void DetectType() { + // BOM (Byte Order Mark): + // 00 00 FE FF UTF-32BE + // FF FE 00 00 UTF-32LE + // FE FF UTF-16BE + // FF FE UTF-16LE + // EF BB BF UTF-8 + + const unsigned char* c = reinterpret_cast(is_->Peek4()); + if (!c) + return; + + unsigned bom = static_cast(c[0] | (c[1] << 8) | (c[2] << 16) | (c[3] << 24)); + hasBOM_ = false; + if (bom == 0xFFFE0000) { type_ = kUTF32BE; hasBOM_ = true; is_->Take(); is_->Take(); is_->Take(); is_->Take(); } + else if (bom == 0x0000FEFF) { type_ = kUTF32LE; hasBOM_ = true; is_->Take(); is_->Take(); is_->Take(); is_->Take(); } + else if ((bom & 0xFFFF) == 0xFFFE) { type_ = kUTF16BE; hasBOM_ = true; is_->Take(); is_->Take(); } + else if ((bom & 0xFFFF) == 0xFEFF) { type_ = kUTF16LE; hasBOM_ = true; is_->Take(); is_->Take(); } + else if ((bom & 0xFFFFFF) == 0xBFBBEF) { type_ = kUTF8; hasBOM_ = true; is_->Take(); is_->Take(); is_->Take(); } + + // RFC 4627: Section 3 + // "Since the first two characters of a JSON text will always be ASCII + // characters [RFC0020], it is possible to determine whether an octet + // stream is UTF-8, UTF-16 (BE or LE), or UTF-32 (BE or LE) by looking + // at the pattern of nulls in the first four octets." + // 00 00 00 xx UTF-32BE + // 00 xx 00 xx UTF-16BE + // xx 00 00 00 UTF-32LE + // xx 00 xx 00 UTF-16LE + // xx xx xx xx UTF-8 + + if (!hasBOM_) { + int pattern = (c[0] ? 1 : 0) | (c[1] ? 2 : 0) | (c[2] ? 4 : 0) | (c[3] ? 8 : 0); + switch (pattern) { + case 0x08: type_ = kUTF32BE; break; + case 0x0A: type_ = kUTF16BE; break; + case 0x01: type_ = kUTF32LE; break; + case 0x05: type_ = kUTF16LE; break; + case 0x0F: type_ = kUTF8; break; + default: break; // Use type defined by user. + } + } + + // Runtime check whether the size of character type is sufficient. It only perform checks with assertion. + if (type_ == kUTF16LE || type_ == kUTF16BE) RAPIDJSON_ASSERT(sizeof(Ch) >= 2); + if (type_ == kUTF32LE || type_ == kUTF32BE) RAPIDJSON_ASSERT(sizeof(Ch) >= 4); + } + + typedef Ch (*TakeFunc)(InputByteStream& is); + InputByteStream* is_; + UTFType type_; + Ch current_; + TakeFunc takeFunc_; + bool hasBOM_; +}; + +//! Output stream wrapper with dynamically bound encoding and automatic encoding detection. +/*! + \tparam CharType Type of character for writing. + \tparam OutputByteStream type of output byte stream to be wrapped. +*/ +template +class AutoUTFOutputStream { + RAPIDJSON_STATIC_ASSERT(sizeof(typename OutputByteStream::Ch) == 1); +public: + typedef CharType Ch; + + //! Constructor. + /*! + \param os output stream to be wrapped. + \param type UTF encoding type. + \param putBOM Whether to write BOM at the beginning of the stream. + */ + AutoUTFOutputStream(OutputByteStream& os, UTFType type, bool putBOM) : os_(&os), type_(type) { + RAPIDJSON_ASSERT(type >= kUTF8 && type <= kUTF32BE); + + // Runtime check whether the size of character type is sufficient. It only perform checks with assertion. + if (type_ == kUTF16LE || type_ == kUTF16BE) RAPIDJSON_ASSERT(sizeof(Ch) >= 2); + if (type_ == kUTF32LE || type_ == kUTF32BE) RAPIDJSON_ASSERT(sizeof(Ch) >= 4); + + static const PutFunc f[] = { RAPIDJSON_ENCODINGS_FUNC(Put) }; + putFunc_ = f[type_]; + + if (putBOM) + PutBOM(); + } + + UTFType GetType() const { return type_; } + + void Put(Ch c) { putFunc_(*os_, c); } + void Flush() { os_->Flush(); } + + // Not implemented + Ch Peek() const { RAPIDJSON_ASSERT(false); return 0;} + Ch Take() { RAPIDJSON_ASSERT(false); return 0;} + size_t Tell() const { RAPIDJSON_ASSERT(false); return 0; } + Ch* PutBegin() { RAPIDJSON_ASSERT(false); return 0; } + size_t PutEnd(Ch*) { RAPIDJSON_ASSERT(false); return 0; } + +private: + AutoUTFOutputStream(const AutoUTFOutputStream&); + AutoUTFOutputStream& operator=(const AutoUTFOutputStream&); + + void PutBOM() { + typedef void (*PutBOMFunc)(OutputByteStream&); + static const PutBOMFunc f[] = { RAPIDJSON_ENCODINGS_FUNC(PutBOM) }; + f[type_](*os_); + } + + typedef void (*PutFunc)(OutputByteStream&, Ch); + + OutputByteStream* os_; + UTFType type_; + PutFunc putFunc_; +}; + +#undef RAPIDJSON_ENCODINGS_FUNC + +RAPIDJSON_NAMESPACE_END + +#ifdef __clang__ +RAPIDJSON_DIAG_POP +#endif + +#ifdef __GNUC__ +RAPIDJSON_DIAG_POP +#endif + +#endif // RAPIDJSON_FILESTREAM_H_ diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/encodings.h b/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/encodings.h new file mode 100644 index 0000000000..50ad18bdc0 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/encodings.h @@ -0,0 +1,716 @@ +// Tencent is pleased to support the open source community by making RapidJSON available. +// +// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. +// +// Licensed under the MIT License (the "License"); you may not use this file except +// in compliance with the License. You may obtain a copy of the License at +// +// http://opensource.org/licenses/MIT +// +// Unless required by applicable law or agreed to in writing, software distributed +// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +// CONDITIONS OF ANY KIND, either express or implied. See the License for the +// specific language governing permissions and limitations under the License. + +#ifndef RAPIDJSON_ENCODINGS_H_ +#define RAPIDJSON_ENCODINGS_H_ + +#include "rapidjson.h" + +#if defined(_MSC_VER) && !defined(__clang__) +RAPIDJSON_DIAG_PUSH +RAPIDJSON_DIAG_OFF(4244) // conversion from 'type1' to 'type2', possible loss of data +RAPIDJSON_DIAG_OFF(4702) // unreachable code +#elif defined(__GNUC__) +RAPIDJSON_DIAG_PUSH +RAPIDJSON_DIAG_OFF(effc++) +RAPIDJSON_DIAG_OFF(overflow) +#endif + +RAPIDJSON_NAMESPACE_BEGIN + +/////////////////////////////////////////////////////////////////////////////// +// Encoding + +/*! \class rapidjson::Encoding + \brief Concept for encoding of Unicode characters. + +\code +concept Encoding { + typename Ch; //! Type of character. A "character" is actually a code unit in unicode's definition. + + enum { supportUnicode = 1 }; // or 0 if not supporting unicode + + //! \brief Encode a Unicode codepoint to an output stream. + //! \param os Output stream. + //! \param codepoint An unicode codepoint, ranging from 0x0 to 0x10FFFF inclusively. + template + static void Encode(OutputStream& os, unsigned codepoint); + + //! \brief Decode a Unicode codepoint from an input stream. + //! \param is Input stream. + //! \param codepoint Output of the unicode codepoint. + //! \return true if a valid codepoint can be decoded from the stream. + template + static bool Decode(InputStream& is, unsigned* codepoint); + + //! \brief Validate one Unicode codepoint from an encoded stream. + //! \param is Input stream to obtain codepoint. + //! \param os Output for copying one codepoint. + //! \return true if it is valid. + //! \note This function just validating and copying the codepoint without actually decode it. + template + static bool Validate(InputStream& is, OutputStream& os); + + // The following functions are deal with byte streams. + + //! Take a character from input byte stream, skip BOM if exist. + template + static CharType TakeBOM(InputByteStream& is); + + //! Take a character from input byte stream. + template + static Ch Take(InputByteStream& is); + + //! Put BOM to output byte stream. + template + static void PutBOM(OutputByteStream& os); + + //! Put a character to output byte stream. + template + static void Put(OutputByteStream& os, Ch c); +}; +\endcode +*/ + +/////////////////////////////////////////////////////////////////////////////// +// UTF8 + +//! UTF-8 encoding. +/*! http://en.wikipedia.org/wiki/UTF-8 + http://tools.ietf.org/html/rfc3629 + \tparam CharType Code unit for storing 8-bit UTF-8 data. Default is char. + \note implements Encoding concept +*/ +template +struct UTF8 { + typedef CharType Ch; + + enum { supportUnicode = 1 }; + + template + static void Encode(OutputStream& os, unsigned codepoint) { + if (codepoint <= 0x7F) + os.Put(static_cast(codepoint & 0xFF)); + else if (codepoint <= 0x7FF) { + os.Put(static_cast(0xC0 | ((codepoint >> 6) & 0xFF))); + os.Put(static_cast(0x80 | ((codepoint & 0x3F)))); + } + else if (codepoint <= 0xFFFF) { + os.Put(static_cast(0xE0 | ((codepoint >> 12) & 0xFF))); + os.Put(static_cast(0x80 | ((codepoint >> 6) & 0x3F))); + os.Put(static_cast(0x80 | (codepoint & 0x3F))); + } + else { + RAPIDJSON_ASSERT(codepoint <= 0x10FFFF); + os.Put(static_cast(0xF0 | ((codepoint >> 18) & 0xFF))); + os.Put(static_cast(0x80 | ((codepoint >> 12) & 0x3F))); + os.Put(static_cast(0x80 | ((codepoint >> 6) & 0x3F))); + os.Put(static_cast(0x80 | (codepoint & 0x3F))); + } + } + + template + static void EncodeUnsafe(OutputStream& os, unsigned codepoint) { + if (codepoint <= 0x7F) + PutUnsafe(os, static_cast(codepoint & 0xFF)); + else if (codepoint <= 0x7FF) { + PutUnsafe(os, static_cast(0xC0 | ((codepoint >> 6) & 0xFF))); + PutUnsafe(os, static_cast(0x80 | ((codepoint & 0x3F)))); + } + else if (codepoint <= 0xFFFF) { + PutUnsafe(os, static_cast(0xE0 | ((codepoint >> 12) & 0xFF))); + PutUnsafe(os, static_cast(0x80 | ((codepoint >> 6) & 0x3F))); + PutUnsafe(os, static_cast(0x80 | (codepoint & 0x3F))); + } + else { + RAPIDJSON_ASSERT(codepoint <= 0x10FFFF); + PutUnsafe(os, static_cast(0xF0 | ((codepoint >> 18) & 0xFF))); + PutUnsafe(os, static_cast(0x80 | ((codepoint >> 12) & 0x3F))); + PutUnsafe(os, static_cast(0x80 | ((codepoint >> 6) & 0x3F))); + PutUnsafe(os, static_cast(0x80 | (codepoint & 0x3F))); + } + } + + template + static bool Decode(InputStream& is, unsigned* codepoint) { +#define RAPIDJSON_COPY() c = is.Take(); *codepoint = (*codepoint << 6) | (static_cast(c) & 0x3Fu) +#define RAPIDJSON_TRANS(mask) result &= ((GetRange(static_cast(c)) & mask) != 0) +#define RAPIDJSON_TAIL() RAPIDJSON_COPY(); RAPIDJSON_TRANS(0x70) + typename InputStream::Ch c = is.Take(); + if (!(c & 0x80)) { + *codepoint = static_cast(c); + return true; + } + + unsigned char type = GetRange(static_cast(c)); + if (type >= 32) { + *codepoint = 0; + } else { + *codepoint = (0xFFu >> type) & static_cast(c); + } + bool result = true; + switch (type) { + case 2: RAPIDJSON_TAIL(); return result; + case 3: RAPIDJSON_TAIL(); RAPIDJSON_TAIL(); return result; + case 4: RAPIDJSON_COPY(); RAPIDJSON_TRANS(0x50); RAPIDJSON_TAIL(); return result; + case 5: RAPIDJSON_COPY(); RAPIDJSON_TRANS(0x10); RAPIDJSON_TAIL(); RAPIDJSON_TAIL(); return result; + case 6: RAPIDJSON_TAIL(); RAPIDJSON_TAIL(); RAPIDJSON_TAIL(); return result; + case 10: RAPIDJSON_COPY(); RAPIDJSON_TRANS(0x20); RAPIDJSON_TAIL(); return result; + case 11: RAPIDJSON_COPY(); RAPIDJSON_TRANS(0x60); RAPIDJSON_TAIL(); RAPIDJSON_TAIL(); return result; + default: return false; + } +#undef RAPIDJSON_COPY +#undef RAPIDJSON_TRANS +#undef RAPIDJSON_TAIL + } + + template + static bool Validate(InputStream& is, OutputStream& os) { +#define RAPIDJSON_COPY() os.Put(c = is.Take()) +#define RAPIDJSON_TRANS(mask) result &= ((GetRange(static_cast(c)) & mask) != 0) +#define RAPIDJSON_TAIL() RAPIDJSON_COPY(); RAPIDJSON_TRANS(0x70) + Ch c; + RAPIDJSON_COPY(); + if (!(c & 0x80)) + return true; + + bool result = true; + switch (GetRange(static_cast(c))) { + case 2: RAPIDJSON_TAIL(); return result; + case 3: RAPIDJSON_TAIL(); RAPIDJSON_TAIL(); return result; + case 4: RAPIDJSON_COPY(); RAPIDJSON_TRANS(0x50); RAPIDJSON_TAIL(); return result; + case 5: RAPIDJSON_COPY(); RAPIDJSON_TRANS(0x10); RAPIDJSON_TAIL(); RAPIDJSON_TAIL(); return result; + case 6: RAPIDJSON_TAIL(); RAPIDJSON_TAIL(); RAPIDJSON_TAIL(); return result; + case 10: RAPIDJSON_COPY(); RAPIDJSON_TRANS(0x20); RAPIDJSON_TAIL(); return result; + case 11: RAPIDJSON_COPY(); RAPIDJSON_TRANS(0x60); RAPIDJSON_TAIL(); RAPIDJSON_TAIL(); return result; + default: return false; + } +#undef RAPIDJSON_COPY +#undef RAPIDJSON_TRANS +#undef RAPIDJSON_TAIL + } + + static unsigned char GetRange(unsigned char c) { + // Referring to DFA of http://bjoern.hoehrmann.de/utf-8/decoder/dfa/ + // With new mapping 1 -> 0x10, 7 -> 0x20, 9 -> 0x40, such that AND operation can test multiple types. + static const unsigned char type[] = { + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10, + 0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40, + 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, + 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, + 8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2, 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, + 10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3, 11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8, + }; + return type[c]; + } + + template + static CharType TakeBOM(InputByteStream& is) { + RAPIDJSON_STATIC_ASSERT(sizeof(typename InputByteStream::Ch) == 1); + typename InputByteStream::Ch c = Take(is); + if (static_cast(c) != 0xEFu) return c; + c = is.Take(); + if (static_cast(c) != 0xBBu) return c; + c = is.Take(); + if (static_cast(c) != 0xBFu) return c; + c = is.Take(); + return c; + } + + template + static Ch Take(InputByteStream& is) { + RAPIDJSON_STATIC_ASSERT(sizeof(typename InputByteStream::Ch) == 1); + return static_cast(is.Take()); + } + + template + static void PutBOM(OutputByteStream& os) { + RAPIDJSON_STATIC_ASSERT(sizeof(typename OutputByteStream::Ch) == 1); + os.Put(static_cast(0xEFu)); + os.Put(static_cast(0xBBu)); + os.Put(static_cast(0xBFu)); + } + + template + static void Put(OutputByteStream& os, Ch c) { + RAPIDJSON_STATIC_ASSERT(sizeof(typename OutputByteStream::Ch) == 1); + os.Put(static_cast(c)); + } +}; + +/////////////////////////////////////////////////////////////////////////////// +// UTF16 + +//! UTF-16 encoding. +/*! http://en.wikipedia.org/wiki/UTF-16 + http://tools.ietf.org/html/rfc2781 + \tparam CharType Type for storing 16-bit UTF-16 data. Default is wchar_t. C++11 may use char16_t instead. + \note implements Encoding concept + + \note For in-memory access, no need to concern endianness. The code units and code points are represented by CPU's endianness. + For streaming, use UTF16LE and UTF16BE, which handle endianness. +*/ +template +struct UTF16 { + typedef CharType Ch; + RAPIDJSON_STATIC_ASSERT(sizeof(Ch) >= 2); + + enum { supportUnicode = 1 }; + + template + static void Encode(OutputStream& os, unsigned codepoint) { + RAPIDJSON_STATIC_ASSERT(sizeof(typename OutputStream::Ch) >= 2); + if (codepoint <= 0xFFFF) { + RAPIDJSON_ASSERT(codepoint < 0xD800 || codepoint > 0xDFFF); // Code point itself cannot be surrogate pair + os.Put(static_cast(codepoint)); + } + else { + RAPIDJSON_ASSERT(codepoint <= 0x10FFFF); + unsigned v = codepoint - 0x10000; + os.Put(static_cast((v >> 10) | 0xD800)); + os.Put(static_cast((v & 0x3FF) | 0xDC00)); + } + } + + + template + static void EncodeUnsafe(OutputStream& os, unsigned codepoint) { + RAPIDJSON_STATIC_ASSERT(sizeof(typename OutputStream::Ch) >= 2); + if (codepoint <= 0xFFFF) { + RAPIDJSON_ASSERT(codepoint < 0xD800 || codepoint > 0xDFFF); // Code point itself cannot be surrogate pair + PutUnsafe(os, static_cast(codepoint)); + } + else { + RAPIDJSON_ASSERT(codepoint <= 0x10FFFF); + unsigned v = codepoint - 0x10000; + PutUnsafe(os, static_cast((v >> 10) | 0xD800)); + PutUnsafe(os, static_cast((v & 0x3FF) | 0xDC00)); + } + } + + template + static bool Decode(InputStream& is, unsigned* codepoint) { + RAPIDJSON_STATIC_ASSERT(sizeof(typename InputStream::Ch) >= 2); + typename InputStream::Ch c = is.Take(); + if (c < 0xD800 || c > 0xDFFF) { + *codepoint = static_cast(c); + return true; + } + else if (c <= 0xDBFF) { + *codepoint = (static_cast(c) & 0x3FF) << 10; + c = is.Take(); + *codepoint |= (static_cast(c) & 0x3FF); + *codepoint += 0x10000; + return c >= 0xDC00 && c <= 0xDFFF; + } + return false; + } + + template + static bool Validate(InputStream& is, OutputStream& os) { + RAPIDJSON_STATIC_ASSERT(sizeof(typename InputStream::Ch) >= 2); + RAPIDJSON_STATIC_ASSERT(sizeof(typename OutputStream::Ch) >= 2); + typename InputStream::Ch c; + os.Put(static_cast(c = is.Take())); + if (c < 0xD800 || c > 0xDFFF) + return true; + else if (c <= 0xDBFF) { + os.Put(c = is.Take()); + return c >= 0xDC00 && c <= 0xDFFF; + } + return false; + } +}; + +//! UTF-16 little endian encoding. +template +struct UTF16LE : UTF16 { + template + static CharType TakeBOM(InputByteStream& is) { + RAPIDJSON_STATIC_ASSERT(sizeof(typename InputByteStream::Ch) == 1); + CharType c = Take(is); + return static_cast(c) == 0xFEFFu ? Take(is) : c; + } + + template + static CharType Take(InputByteStream& is) { + RAPIDJSON_STATIC_ASSERT(sizeof(typename InputByteStream::Ch) == 1); + unsigned c = static_cast(is.Take()); + c |= static_cast(static_cast(is.Take())) << 8; + return static_cast(c); + } + + template + static void PutBOM(OutputByteStream& os) { + RAPIDJSON_STATIC_ASSERT(sizeof(typename OutputByteStream::Ch) == 1); + os.Put(static_cast(0xFFu)); + os.Put(static_cast(0xFEu)); + } + + template + static void Put(OutputByteStream& os, CharType c) { + RAPIDJSON_STATIC_ASSERT(sizeof(typename OutputByteStream::Ch) == 1); + os.Put(static_cast(static_cast(c) & 0xFFu)); + os.Put(static_cast((static_cast(c) >> 8) & 0xFFu)); + } +}; + +//! UTF-16 big endian encoding. +template +struct UTF16BE : UTF16 { + template + static CharType TakeBOM(InputByteStream& is) { + RAPIDJSON_STATIC_ASSERT(sizeof(typename InputByteStream::Ch) == 1); + CharType c = Take(is); + return static_cast(c) == 0xFEFFu ? Take(is) : c; + } + + template + static CharType Take(InputByteStream& is) { + RAPIDJSON_STATIC_ASSERT(sizeof(typename InputByteStream::Ch) == 1); + unsigned c = static_cast(static_cast(is.Take())) << 8; + c |= static_cast(static_cast(is.Take())); + return static_cast(c); + } + + template + static void PutBOM(OutputByteStream& os) { + RAPIDJSON_STATIC_ASSERT(sizeof(typename OutputByteStream::Ch) == 1); + os.Put(static_cast(0xFEu)); + os.Put(static_cast(0xFFu)); + } + + template + static void Put(OutputByteStream& os, CharType c) { + RAPIDJSON_STATIC_ASSERT(sizeof(typename OutputByteStream::Ch) == 1); + os.Put(static_cast((static_cast(c) >> 8) & 0xFFu)); + os.Put(static_cast(static_cast(c) & 0xFFu)); + } +}; + +/////////////////////////////////////////////////////////////////////////////// +// UTF32 + +//! UTF-32 encoding. +/*! http://en.wikipedia.org/wiki/UTF-32 + \tparam CharType Type for storing 32-bit UTF-32 data. Default is unsigned. C++11 may use char32_t instead. + \note implements Encoding concept + + \note For in-memory access, no need to concern endianness. The code units and code points are represented by CPU's endianness. + For streaming, use UTF32LE and UTF32BE, which handle endianness. +*/ +template +struct UTF32 { + typedef CharType Ch; + RAPIDJSON_STATIC_ASSERT(sizeof(Ch) >= 4); + + enum { supportUnicode = 1 }; + + template + static void Encode(OutputStream& os, unsigned codepoint) { + RAPIDJSON_STATIC_ASSERT(sizeof(typename OutputStream::Ch) >= 4); + RAPIDJSON_ASSERT(codepoint <= 0x10FFFF); + os.Put(codepoint); + } + + template + static void EncodeUnsafe(OutputStream& os, unsigned codepoint) { + RAPIDJSON_STATIC_ASSERT(sizeof(typename OutputStream::Ch) >= 4); + RAPIDJSON_ASSERT(codepoint <= 0x10FFFF); + PutUnsafe(os, codepoint); + } + + template + static bool Decode(InputStream& is, unsigned* codepoint) { + RAPIDJSON_STATIC_ASSERT(sizeof(typename InputStream::Ch) >= 4); + Ch c = is.Take(); + *codepoint = c; + return c <= 0x10FFFF; + } + + template + static bool Validate(InputStream& is, OutputStream& os) { + RAPIDJSON_STATIC_ASSERT(sizeof(typename InputStream::Ch) >= 4); + Ch c; + os.Put(c = is.Take()); + return c <= 0x10FFFF; + } +}; + +//! UTF-32 little endian enocoding. +template +struct UTF32LE : UTF32 { + template + static CharType TakeBOM(InputByteStream& is) { + RAPIDJSON_STATIC_ASSERT(sizeof(typename InputByteStream::Ch) == 1); + CharType c = Take(is); + return static_cast(c) == 0x0000FEFFu ? Take(is) : c; + } + + template + static CharType Take(InputByteStream& is) { + RAPIDJSON_STATIC_ASSERT(sizeof(typename InputByteStream::Ch) == 1); + unsigned c = static_cast(is.Take()); + c |= static_cast(static_cast(is.Take())) << 8; + c |= static_cast(static_cast(is.Take())) << 16; + c |= static_cast(static_cast(is.Take())) << 24; + return static_cast(c); + } + + template + static void PutBOM(OutputByteStream& os) { + RAPIDJSON_STATIC_ASSERT(sizeof(typename OutputByteStream::Ch) == 1); + os.Put(static_cast(0xFFu)); + os.Put(static_cast(0xFEu)); + os.Put(static_cast(0x00u)); + os.Put(static_cast(0x00u)); + } + + template + static void Put(OutputByteStream& os, CharType c) { + RAPIDJSON_STATIC_ASSERT(sizeof(typename OutputByteStream::Ch) == 1); + os.Put(static_cast(c & 0xFFu)); + os.Put(static_cast((c >> 8) & 0xFFu)); + os.Put(static_cast((c >> 16) & 0xFFu)); + os.Put(static_cast((c >> 24) & 0xFFu)); + } +}; + +//! UTF-32 big endian encoding. +template +struct UTF32BE : UTF32 { + template + static CharType TakeBOM(InputByteStream& is) { + RAPIDJSON_STATIC_ASSERT(sizeof(typename InputByteStream::Ch) == 1); + CharType c = Take(is); + return static_cast(c) == 0x0000FEFFu ? Take(is) : c; + } + + template + static CharType Take(InputByteStream& is) { + RAPIDJSON_STATIC_ASSERT(sizeof(typename InputByteStream::Ch) == 1); + unsigned c = static_cast(static_cast(is.Take())) << 24; + c |= static_cast(static_cast(is.Take())) << 16; + c |= static_cast(static_cast(is.Take())) << 8; + c |= static_cast(static_cast(is.Take())); + return static_cast(c); + } + + template + static void PutBOM(OutputByteStream& os) { + RAPIDJSON_STATIC_ASSERT(sizeof(typename OutputByteStream::Ch) == 1); + os.Put(static_cast(0x00u)); + os.Put(static_cast(0x00u)); + os.Put(static_cast(0xFEu)); + os.Put(static_cast(0xFFu)); + } + + template + static void Put(OutputByteStream& os, CharType c) { + RAPIDJSON_STATIC_ASSERT(sizeof(typename OutputByteStream::Ch) == 1); + os.Put(static_cast((c >> 24) & 0xFFu)); + os.Put(static_cast((c >> 16) & 0xFFu)); + os.Put(static_cast((c >> 8) & 0xFFu)); + os.Put(static_cast(c & 0xFFu)); + } +}; + +/////////////////////////////////////////////////////////////////////////////// +// ASCII + +//! ASCII encoding. +/*! http://en.wikipedia.org/wiki/ASCII + \tparam CharType Code unit for storing 7-bit ASCII data. Default is char. + \note implements Encoding concept +*/ +template +struct ASCII { + typedef CharType Ch; + + enum { supportUnicode = 0 }; + + template + static void Encode(OutputStream& os, unsigned codepoint) { + RAPIDJSON_ASSERT(codepoint <= 0x7F); + os.Put(static_cast(codepoint & 0xFF)); + } + + template + static void EncodeUnsafe(OutputStream& os, unsigned codepoint) { + RAPIDJSON_ASSERT(codepoint <= 0x7F); + PutUnsafe(os, static_cast(codepoint & 0xFF)); + } + + template + static bool Decode(InputStream& is, unsigned* codepoint) { + uint8_t c = static_cast(is.Take()); + *codepoint = c; + return c <= 0X7F; + } + + template + static bool Validate(InputStream& is, OutputStream& os) { + uint8_t c = static_cast(is.Take()); + os.Put(static_cast(c)); + return c <= 0x7F; + } + + template + static CharType TakeBOM(InputByteStream& is) { + RAPIDJSON_STATIC_ASSERT(sizeof(typename InputByteStream::Ch) == 1); + uint8_t c = static_cast(Take(is)); + return static_cast(c); + } + + template + static Ch Take(InputByteStream& is) { + RAPIDJSON_STATIC_ASSERT(sizeof(typename InputByteStream::Ch) == 1); + return static_cast(is.Take()); + } + + template + static void PutBOM(OutputByteStream& os) { + RAPIDJSON_STATIC_ASSERT(sizeof(typename OutputByteStream::Ch) == 1); + (void)os; + } + + template + static void Put(OutputByteStream& os, Ch c) { + RAPIDJSON_STATIC_ASSERT(sizeof(typename OutputByteStream::Ch) == 1); + os.Put(static_cast(c)); + } +}; + +/////////////////////////////////////////////////////////////////////////////// +// AutoUTF + +//! Runtime-specified UTF encoding type of a stream. +enum UTFType { + kUTF8 = 0, //!< UTF-8. + kUTF16LE = 1, //!< UTF-16 little endian. + kUTF16BE = 2, //!< UTF-16 big endian. + kUTF32LE = 3, //!< UTF-32 little endian. + kUTF32BE = 4 //!< UTF-32 big endian. +}; + +//! Dynamically select encoding according to stream's runtime-specified UTF encoding type. +/*! \note This class can be used with AutoUTFInputtStream and AutoUTFOutputStream, which provides GetType(). +*/ +template +struct AutoUTF { + typedef CharType Ch; + + enum { supportUnicode = 1 }; + +#define RAPIDJSON_ENCODINGS_FUNC(x) UTF8::x, UTF16LE::x, UTF16BE::x, UTF32LE::x, UTF32BE::x + + template + static RAPIDJSON_FORCEINLINE void Encode(OutputStream& os, unsigned codepoint) { + typedef void (*EncodeFunc)(OutputStream&, unsigned); + static const EncodeFunc f[] = { RAPIDJSON_ENCODINGS_FUNC(Encode) }; + (*f[os.GetType()])(os, codepoint); + } + + template + static RAPIDJSON_FORCEINLINE void EncodeUnsafe(OutputStream& os, unsigned codepoint) { + typedef void (*EncodeFunc)(OutputStream&, unsigned); + static const EncodeFunc f[] = { RAPIDJSON_ENCODINGS_FUNC(EncodeUnsafe) }; + (*f[os.GetType()])(os, codepoint); + } + + template + static RAPIDJSON_FORCEINLINE bool Decode(InputStream& is, unsigned* codepoint) { + typedef bool (*DecodeFunc)(InputStream&, unsigned*); + static const DecodeFunc f[] = { RAPIDJSON_ENCODINGS_FUNC(Decode) }; + return (*f[is.GetType()])(is, codepoint); + } + + template + static RAPIDJSON_FORCEINLINE bool Validate(InputStream& is, OutputStream& os) { + typedef bool (*ValidateFunc)(InputStream&, OutputStream&); + static const ValidateFunc f[] = { RAPIDJSON_ENCODINGS_FUNC(Validate) }; + return (*f[is.GetType()])(is, os); + } + +#undef RAPIDJSON_ENCODINGS_FUNC +}; + +/////////////////////////////////////////////////////////////////////////////// +// Transcoder + +//! Encoding conversion. +template +struct Transcoder { + //! Take one Unicode codepoint from source encoding, convert it to target encoding and put it to the output stream. + template + static RAPIDJSON_FORCEINLINE bool Transcode(InputStream& is, OutputStream& os) { + unsigned codepoint; + if (!SourceEncoding::Decode(is, &codepoint)) + return false; + TargetEncoding::Encode(os, codepoint); + return true; + } + + template + static RAPIDJSON_FORCEINLINE bool TranscodeUnsafe(InputStream& is, OutputStream& os) { + unsigned codepoint; + if (!SourceEncoding::Decode(is, &codepoint)) + return false; + TargetEncoding::EncodeUnsafe(os, codepoint); + return true; + } + + //! Validate one Unicode codepoint from an encoded stream. + template + static RAPIDJSON_FORCEINLINE bool Validate(InputStream& is, OutputStream& os) { + return Transcode(is, os); // Since source/target encoding is different, must transcode. + } +}; + +// Forward declaration. +template +inline void PutUnsafe(Stream& stream, typename Stream::Ch c); + +//! Specialization of Transcoder with same source and target encoding. +template +struct Transcoder { + template + static RAPIDJSON_FORCEINLINE bool Transcode(InputStream& is, OutputStream& os) { + os.Put(is.Take()); // Just copy one code unit. This semantic is different from primary template class. + return true; + } + + template + static RAPIDJSON_FORCEINLINE bool TranscodeUnsafe(InputStream& is, OutputStream& os) { + PutUnsafe(os, is.Take()); // Just copy one code unit. This semantic is different from primary template class. + return true; + } + + template + static RAPIDJSON_FORCEINLINE bool Validate(InputStream& is, OutputStream& os) { + return Encoding::Validate(is, os); // source/target encoding are the same + } +}; + +RAPIDJSON_NAMESPACE_END + +#if defined(__GNUC__) || (defined(_MSC_VER) && !defined(__clang__)) +RAPIDJSON_DIAG_POP +#endif + +#endif // RAPIDJSON_ENCODINGS_H_ diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/error/en.h b/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/error/en.h new file mode 100644 index 0000000000..5d2e57b7fd --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/error/en.h @@ -0,0 +1,122 @@ +// Tencent is pleased to support the open source community by making RapidJSON available. +// +// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. +// +// Licensed under the MIT License (the "License"); you may not use this file except +// in compliance with the License. You may obtain a copy of the License at +// +// http://opensource.org/licenses/MIT +// +// Unless required by applicable law or agreed to in writing, software distributed +// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +// CONDITIONS OF ANY KIND, either express or implied. See the License for the +// specific language governing permissions and limitations under the License. + +#ifndef RAPIDJSON_ERROR_EN_H_ +#define RAPIDJSON_ERROR_EN_H_ + +#include "error.h" + +#ifdef __clang__ +RAPIDJSON_DIAG_PUSH +RAPIDJSON_DIAG_OFF(switch-enum) +RAPIDJSON_DIAG_OFF(covered-switch-default) +#endif + +RAPIDJSON_NAMESPACE_BEGIN + +//! Maps error code of parsing into error message. +/*! + \ingroup RAPIDJSON_ERRORS + \param parseErrorCode Error code obtained in parsing. + \return the error message. + \note User can make a copy of this function for localization. + Using switch-case is safer for future modification of error codes. +*/ +inline const RAPIDJSON_ERROR_CHARTYPE* GetParseError_En(ParseErrorCode parseErrorCode) { + switch (parseErrorCode) { + case kParseErrorNone: return RAPIDJSON_ERROR_STRING("No error."); + + case kParseErrorDocumentEmpty: return RAPIDJSON_ERROR_STRING("The document is empty."); + case kParseErrorDocumentRootNotSingular: return RAPIDJSON_ERROR_STRING("The document root must not be followed by other values."); + + case kParseErrorValueInvalid: return RAPIDJSON_ERROR_STRING("Invalid value."); + + case kParseErrorObjectMissName: return RAPIDJSON_ERROR_STRING("Missing a name for object member."); + case kParseErrorObjectMissColon: return RAPIDJSON_ERROR_STRING("Missing a colon after a name of object member."); + case kParseErrorObjectMissCommaOrCurlyBracket: return RAPIDJSON_ERROR_STRING("Missing a comma or '}' after an object member."); + + case kParseErrorArrayMissCommaOrSquareBracket: return RAPIDJSON_ERROR_STRING("Missing a comma or ']' after an array element."); + + case kParseErrorStringUnicodeEscapeInvalidHex: return RAPIDJSON_ERROR_STRING("Incorrect hex digit after \\u escape in string."); + case kParseErrorStringUnicodeSurrogateInvalid: return RAPIDJSON_ERROR_STRING("The surrogate pair in string is invalid."); + case kParseErrorStringEscapeInvalid: return RAPIDJSON_ERROR_STRING("Invalid escape character in string."); + case kParseErrorStringMissQuotationMark: return RAPIDJSON_ERROR_STRING("Missing a closing quotation mark in string."); + case kParseErrorStringInvalidEncoding: return RAPIDJSON_ERROR_STRING("Invalid encoding in string."); + + case kParseErrorNumberTooBig: return RAPIDJSON_ERROR_STRING("Number too big to be stored in double."); + case kParseErrorNumberMissFraction: return RAPIDJSON_ERROR_STRING("Miss fraction part in number."); + case kParseErrorNumberMissExponent: return RAPIDJSON_ERROR_STRING("Miss exponent in number."); + + case kParseErrorTermination: return RAPIDJSON_ERROR_STRING("Terminate parsing due to Handler error."); + case kParseErrorUnspecificSyntaxError: return RAPIDJSON_ERROR_STRING("Unspecific syntax error."); + + default: return RAPIDJSON_ERROR_STRING("Unknown error."); + } +} + +//! Maps error code of validation into error message. +/*! + \ingroup RAPIDJSON_ERRORS + \param validateErrorCode Error code obtained from validator. + \return the error message. + \note User can make a copy of this function for localization. + Using switch-case is safer for future modification of error codes. +*/ +inline const RAPIDJSON_ERROR_CHARTYPE* GetValidateError_En(ValidateErrorCode validateErrorCode) { + switch (validateErrorCode) { + case kValidateErrors: return RAPIDJSON_ERROR_STRING("One or more validation errors have occurred"); + case kValidateErrorNone: return RAPIDJSON_ERROR_STRING("No error."); + + case kValidateErrorMultipleOf: return RAPIDJSON_ERROR_STRING("Number '%actual' is not a multiple of the 'multipleOf' value '%expected'."); + case kValidateErrorMaximum: return RAPIDJSON_ERROR_STRING("Number '%actual' is greater than the 'maximum' value '%expected'."); + case kValidateErrorExclusiveMaximum: return RAPIDJSON_ERROR_STRING("Number '%actual' is greater than or equal to the 'exclusiveMaximum' value '%expected'."); + case kValidateErrorMinimum: return RAPIDJSON_ERROR_STRING("Number '%actual' is less than the 'minimum' value '%expected'."); + case kValidateErrorExclusiveMinimum: return RAPIDJSON_ERROR_STRING("Number '%actual' is less than or equal to the 'exclusiveMinimum' value '%expected'."); + + case kValidateErrorMaxLength: return RAPIDJSON_ERROR_STRING("String '%actual' is longer than the 'maxLength' value '%expected'."); + case kValidateErrorMinLength: return RAPIDJSON_ERROR_STRING("String '%actual' is shorter than the 'minLength' value '%expected'."); + case kValidateErrorPattern: return RAPIDJSON_ERROR_STRING("String '%actual' does not match the 'pattern' regular expression."); + + case kValidateErrorMaxItems: return RAPIDJSON_ERROR_STRING("Array of length '%actual' is longer than the 'maxItems' value '%expected'."); + case kValidateErrorMinItems: return RAPIDJSON_ERROR_STRING("Array of length '%actual' is shorter than the 'minItems' value '%expected'."); + case kValidateErrorUniqueItems: return RAPIDJSON_ERROR_STRING("Array has duplicate items at indices '%duplicates' but 'uniqueItems' is true."); + case kValidateErrorAdditionalItems: return RAPIDJSON_ERROR_STRING("Array has an additional item at index '%disallowed' that is not allowed by the schema."); + + case kValidateErrorMaxProperties: return RAPIDJSON_ERROR_STRING("Object has '%actual' members which is more than 'maxProperties' value '%expected'."); + case kValidateErrorMinProperties: return RAPIDJSON_ERROR_STRING("Object has '%actual' members which is less than 'minProperties' value '%expected'."); + case kValidateErrorRequired: return RAPIDJSON_ERROR_STRING("Object is missing the following members required by the schema: '%missing'."); + case kValidateErrorAdditionalProperties: return RAPIDJSON_ERROR_STRING("Object has an additional member '%disallowed' that is not allowed by the schema."); + case kValidateErrorPatternProperties: return RAPIDJSON_ERROR_STRING("Object has 'patternProperties' that are not allowed by the schema."); + case kValidateErrorDependencies: return RAPIDJSON_ERROR_STRING("Object has missing property or schema dependencies, refer to following errors."); + + case kValidateErrorEnum: return RAPIDJSON_ERROR_STRING("Property has a value that is not one of its allowed enumerated values."); + case kValidateErrorType: return RAPIDJSON_ERROR_STRING("Property has a type '%actual' that is not in the following list: '%expected'."); + + case kValidateErrorOneOf: return RAPIDJSON_ERROR_STRING("Property did not match any of the sub-schemas specified by 'oneOf', refer to following errors."); + case kValidateErrorOneOfMatch: return RAPIDJSON_ERROR_STRING("Property matched more than one of the sub-schemas specified by 'oneOf'."); + case kValidateErrorAllOf: return RAPIDJSON_ERROR_STRING("Property did not match all of the sub-schemas specified by 'allOf', refer to following errors."); + case kValidateErrorAnyOf: return RAPIDJSON_ERROR_STRING("Property did not match any of the sub-schemas specified by 'anyOf', refer to following errors."); + case kValidateErrorNot: return RAPIDJSON_ERROR_STRING("Property matched the sub-schema specified by 'not'."); + + default: return RAPIDJSON_ERROR_STRING("Unknown error."); + } +} + +RAPIDJSON_NAMESPACE_END + +#ifdef __clang__ +RAPIDJSON_DIAG_POP +#endif + +#endif // RAPIDJSON_ERROR_EN_H_ diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/error/error.h b/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/error/error.h new file mode 100644 index 0000000000..6270da11a5 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/error/error.h @@ -0,0 +1,216 @@ +// Tencent is pleased to support the open source community by making RapidJSON available. +// +// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. +// +// Licensed under the MIT License (the "License"); you may not use this file except +// in compliance with the License. You may obtain a copy of the License at +// +// http://opensource.org/licenses/MIT +// +// Unless required by applicable law or agreed to in writing, software distributed +// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +// CONDITIONS OF ANY KIND, either express or implied. See the License for the +// specific language governing permissions and limitations under the License. + +#ifndef RAPIDJSON_ERROR_ERROR_H_ +#define RAPIDJSON_ERROR_ERROR_H_ + +#include "../rapidjson.h" + +#ifdef __clang__ +RAPIDJSON_DIAG_PUSH +RAPIDJSON_DIAG_OFF(padded) +#endif + +/*! \file error.h */ + +/*! \defgroup RAPIDJSON_ERRORS RapidJSON error handling */ + +/////////////////////////////////////////////////////////////////////////////// +// RAPIDJSON_ERROR_CHARTYPE + +//! Character type of error messages. +/*! \ingroup RAPIDJSON_ERRORS + The default character type is \c char. + On Windows, user can define this macro as \c TCHAR for supporting both + unicode/non-unicode settings. +*/ +#ifndef RAPIDJSON_ERROR_CHARTYPE +#define RAPIDJSON_ERROR_CHARTYPE char +#endif + +/////////////////////////////////////////////////////////////////////////////// +// RAPIDJSON_ERROR_STRING + +//! Macro for converting string literial to \ref RAPIDJSON_ERROR_CHARTYPE[]. +/*! \ingroup RAPIDJSON_ERRORS + By default this conversion macro does nothing. + On Windows, user can define this macro as \c _T(x) for supporting both + unicode/non-unicode settings. +*/ +#ifndef RAPIDJSON_ERROR_STRING +#define RAPIDJSON_ERROR_STRING(x) x +#endif + +RAPIDJSON_NAMESPACE_BEGIN + +/////////////////////////////////////////////////////////////////////////////// +// ParseErrorCode + +//! Error code of parsing. +/*! \ingroup RAPIDJSON_ERRORS + \see GenericReader::Parse, GenericReader::GetParseErrorCode +*/ +enum ParseErrorCode { + kParseErrorNone = 0, //!< No error. + + kParseErrorDocumentEmpty, //!< The document is empty. + kParseErrorDocumentRootNotSingular, //!< The document root must not follow by other values. + + kParseErrorValueInvalid, //!< Invalid value. + + kParseErrorObjectMissName, //!< Missing a name for object member. + kParseErrorObjectMissColon, //!< Missing a colon after a name of object member. + kParseErrorObjectMissCommaOrCurlyBracket, //!< Missing a comma or '}' after an object member. + + kParseErrorArrayMissCommaOrSquareBracket, //!< Missing a comma or ']' after an array element. + + kParseErrorStringUnicodeEscapeInvalidHex, //!< Incorrect hex digit after \\u escape in string. + kParseErrorStringUnicodeSurrogateInvalid, //!< The surrogate pair in string is invalid. + kParseErrorStringEscapeInvalid, //!< Invalid escape character in string. + kParseErrorStringMissQuotationMark, //!< Missing a closing quotation mark in string. + kParseErrorStringInvalidEncoding, //!< Invalid encoding in string. + + kParseErrorNumberTooBig, //!< Number too big to be stored in double. + kParseErrorNumberMissFraction, //!< Miss fraction part in number. + kParseErrorNumberMissExponent, //!< Miss exponent in number. + + kParseErrorTermination, //!< Parsing was terminated. + kParseErrorUnspecificSyntaxError //!< Unspecific syntax error. +}; + +//! Result of parsing (wraps ParseErrorCode) +/*! + \ingroup RAPIDJSON_ERRORS + \code + Document doc; + ParseResult ok = doc.Parse("[42]"); + if (!ok) { + fprintf(stderr, "JSON parse error: %s (%u)", + GetParseError_En(ok.Code()), ok.Offset()); + exit(EXIT_FAILURE); + } + \endcode + \see GenericReader::Parse, GenericDocument::Parse +*/ +struct ParseResult { + //!! Unspecified boolean type + typedef bool (ParseResult::*BooleanType)() const; +public: + //! Default constructor, no error. + ParseResult() : code_(kParseErrorNone), offset_(0) {} + //! Constructor to set an error. + ParseResult(ParseErrorCode code, size_t offset) : code_(code), offset_(offset) {} + + //! Get the error code. + ParseErrorCode Code() const { return code_; } + //! Get the error offset, if \ref IsError(), 0 otherwise. + size_t Offset() const { return offset_; } + + //! Explicit conversion to \c bool, returns \c true, iff !\ref IsError(). + operator BooleanType() const { return !IsError() ? &ParseResult::IsError : NULL; } + //! Whether the result is an error. + bool IsError() const { return code_ != kParseErrorNone; } + + bool operator==(const ParseResult& that) const { return code_ == that.code_; } + bool operator==(ParseErrorCode code) const { return code_ == code; } + friend bool operator==(ParseErrorCode code, const ParseResult & err) { return code == err.code_; } + + bool operator!=(const ParseResult& that) const { return !(*this == that); } + bool operator!=(ParseErrorCode code) const { return !(*this == code); } + friend bool operator!=(ParseErrorCode code, const ParseResult & err) { return err != code; } + + //! Reset error code. + void Clear() { Set(kParseErrorNone); } + //! Update error code and offset. + void Set(ParseErrorCode code, size_t offset = 0) { code_ = code; offset_ = offset; } + +private: + ParseErrorCode code_; + size_t offset_; +}; + +//! Function pointer type of GetParseError(). +/*! \ingroup RAPIDJSON_ERRORS + + This is the prototype for \c GetParseError_X(), where \c X is a locale. + User can dynamically change locale in runtime, e.g.: +\code + GetParseErrorFunc GetParseError = GetParseError_En; // or whatever + const RAPIDJSON_ERROR_CHARTYPE* s = GetParseError(document.GetParseErrorCode()); +\endcode +*/ +typedef const RAPIDJSON_ERROR_CHARTYPE* (*GetParseErrorFunc)(ParseErrorCode); + +/////////////////////////////////////////////////////////////////////////////// +// ValidateErrorCode + +//! Error codes when validating. +/*! \ingroup RAPIDJSON_ERRORS + \see GenericSchemaValidator +*/ +enum ValidateErrorCode { + kValidateErrors = -1, //!< Top level error code when kValidateContinueOnErrorsFlag set. + kValidateErrorNone = 0, //!< No error. + + kValidateErrorMultipleOf, //!< Number is not a multiple of the 'multipleOf' value. + kValidateErrorMaximum, //!< Number is greater than the 'maximum' value. + kValidateErrorExclusiveMaximum, //!< Number is greater than or equal to the 'maximum' value. + kValidateErrorMinimum, //!< Number is less than the 'minimum' value. + kValidateErrorExclusiveMinimum, //!< Number is less than or equal to the 'minimum' value. + + kValidateErrorMaxLength, //!< String is longer than the 'maxLength' value. + kValidateErrorMinLength, //!< String is longer than the 'maxLength' value. + kValidateErrorPattern, //!< String does not match the 'pattern' regular expression. + + kValidateErrorMaxItems, //!< Array is longer than the 'maxItems' value. + kValidateErrorMinItems, //!< Array is shorter than the 'minItems' value. + kValidateErrorUniqueItems, //!< Array has duplicate items but 'uniqueItems' is true. + kValidateErrorAdditionalItems, //!< Array has additional items that are not allowed by the schema. + + kValidateErrorMaxProperties, //!< Object has more members than 'maxProperties' value. + kValidateErrorMinProperties, //!< Object has less members than 'minProperties' value. + kValidateErrorRequired, //!< Object is missing one or more members required by the schema. + kValidateErrorAdditionalProperties, //!< Object has additional members that are not allowed by the schema. + kValidateErrorPatternProperties, //!< See other errors. + kValidateErrorDependencies, //!< Object has missing property or schema dependencies. + + kValidateErrorEnum, //!< Property has a value that is not one of its allowed enumerated values + kValidateErrorType, //!< Property has a type that is not allowed by the schema.. + + kValidateErrorOneOf, //!< Property did not match any of the sub-schemas specified by 'oneOf'. + kValidateErrorOneOfMatch, //!< Property matched more than one of the sub-schemas specified by 'oneOf'. + kValidateErrorAllOf, //!< Property did not match all of the sub-schemas specified by 'allOf'. + kValidateErrorAnyOf, //!< Property did not match any of the sub-schemas specified by 'anyOf'. + kValidateErrorNot //!< Property matched the sub-schema specified by 'not'. +}; + +//! Function pointer type of GetValidateError(). +/*! \ingroup RAPIDJSON_ERRORS + + This is the prototype for \c GetValidateError_X(), where \c X is a locale. + User can dynamically change locale in runtime, e.g.: +\code + GetValidateErrorFunc GetValidateError = GetValidateError_En; // or whatever + const RAPIDJSON_ERROR_CHARTYPE* s = GetValidateError(validator.GetInvalidSchemaCode()); +\endcode +*/ +typedef const RAPIDJSON_ERROR_CHARTYPE* (*GetValidateErrorFunc)(ValidateErrorCode); + +RAPIDJSON_NAMESPACE_END + +#ifdef __clang__ +RAPIDJSON_DIAG_POP +#endif + +#endif // RAPIDJSON_ERROR_ERROR_H_ diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/filereadstream.h b/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/filereadstream.h new file mode 100644 index 0000000000..f8bb43cb0c --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/filereadstream.h @@ -0,0 +1,99 @@ +// Tencent is pleased to support the open source community by making RapidJSON available. +// +// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. +// +// Licensed under the MIT License (the "License"); you may not use this file except +// in compliance with the License. You may obtain a copy of the License at +// +// http://opensource.org/licenses/MIT +// +// Unless required by applicable law or agreed to in writing, software distributed +// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +// CONDITIONS OF ANY KIND, either express or implied. See the License for the +// specific language governing permissions and limitations under the License. + +#ifndef RAPIDJSON_FILEREADSTREAM_H_ +#define RAPIDJSON_FILEREADSTREAM_H_ + +#include "stream.h" +#include + +#ifdef __clang__ +RAPIDJSON_DIAG_PUSH +RAPIDJSON_DIAG_OFF(padded) +RAPIDJSON_DIAG_OFF(unreachable-code) +RAPIDJSON_DIAG_OFF(missing-noreturn) +#endif + +RAPIDJSON_NAMESPACE_BEGIN + +//! File byte stream for input using fread(). +/*! + \note implements Stream concept +*/ +class FileReadStream { +public: + typedef char Ch; //!< Character type (byte). + + //! Constructor. + /*! + \param fp File pointer opened for read. + \param buffer user-supplied buffer. + \param bufferSize size of buffer in bytes. Must >=4 bytes. + */ + FileReadStream(std::FILE* fp, char* buffer, size_t bufferSize) : fp_(fp), buffer_(buffer), bufferSize_(bufferSize), bufferLast_(0), current_(buffer_), readCount_(0), count_(0), eof_(false) { + RAPIDJSON_ASSERT(fp_ != 0); + RAPIDJSON_ASSERT(bufferSize >= 4); + Read(); + } + + Ch Peek() const { return *current_; } + Ch Take() { Ch c = *current_; Read(); return c; } + size_t Tell() const { return count_ + static_cast(current_ - buffer_); } + + // Not implemented + void Put(Ch) { RAPIDJSON_ASSERT(false); } + void Flush() { RAPIDJSON_ASSERT(false); } + Ch* PutBegin() { RAPIDJSON_ASSERT(false); return 0; } + size_t PutEnd(Ch*) { RAPIDJSON_ASSERT(false); return 0; } + + // For encoding detection only. + const Ch* Peek4() const { + return (current_ + 4 - !eof_ <= bufferLast_) ? current_ : 0; + } + +private: + void Read() { + if (current_ < bufferLast_) + ++current_; + else if (!eof_) { + count_ += readCount_; + readCount_ = std::fread(buffer_, 1, bufferSize_, fp_); + bufferLast_ = buffer_ + readCount_ - 1; + current_ = buffer_; + + if (readCount_ < bufferSize_) { + buffer_[readCount_] = '\0'; + ++bufferLast_; + eof_ = true; + } + } + } + + std::FILE* fp_; + Ch *buffer_; + size_t bufferSize_; + Ch *bufferLast_; + Ch *current_; + size_t readCount_; + size_t count_; //!< Number of characters read + bool eof_; +}; + +RAPIDJSON_NAMESPACE_END + +#ifdef __clang__ +RAPIDJSON_DIAG_POP +#endif + +#endif // RAPIDJSON_FILESTREAM_H_ diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/filewritestream.h b/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/filewritestream.h new file mode 100644 index 0000000000..5d89588c21 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/filewritestream.h @@ -0,0 +1,104 @@ +// Tencent is pleased to support the open source community by making RapidJSON available. +// +// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. +// +// Licensed under the MIT License (the "License"); you may not use this file except +// in compliance with the License. You may obtain a copy of the License at +// +// http://opensource.org/licenses/MIT +// +// Unless required by applicable law or agreed to in writing, software distributed +// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +// CONDITIONS OF ANY KIND, either express or implied. See the License for the +// specific language governing permissions and limitations under the License. + +#ifndef RAPIDJSON_FILEWRITESTREAM_H_ +#define RAPIDJSON_FILEWRITESTREAM_H_ + +#include "stream.h" +#include + +#ifdef __clang__ +RAPIDJSON_DIAG_PUSH +RAPIDJSON_DIAG_OFF(unreachable-code) +#endif + +RAPIDJSON_NAMESPACE_BEGIN + +//! Wrapper of C file stream for output using fwrite(). +/*! + \note implements Stream concept +*/ +class FileWriteStream { +public: + typedef char Ch; //!< Character type. Only support char. + + FileWriteStream(std::FILE* fp, char* buffer, size_t bufferSize) : fp_(fp), buffer_(buffer), bufferEnd_(buffer + bufferSize), current_(buffer_) { + RAPIDJSON_ASSERT(fp_ != 0); + } + + void Put(char c) { + if (current_ >= bufferEnd_) + Flush(); + + *current_++ = c; + } + + void PutN(char c, size_t n) { + size_t avail = static_cast(bufferEnd_ - current_); + while (n > avail) { + std::memset(current_, c, avail); + current_ += avail; + Flush(); + n -= avail; + avail = static_cast(bufferEnd_ - current_); + } + + if (n > 0) { + std::memset(current_, c, n); + current_ += n; + } + } + + void Flush() { + if (current_ != buffer_) { + size_t result = std::fwrite(buffer_, 1, static_cast(current_ - buffer_), fp_); + if (result < static_cast(current_ - buffer_)) { + // failure deliberately ignored at this time + // added to avoid warn_unused_result build errors + } + current_ = buffer_; + } + } + + // Not implemented + char Peek() const { RAPIDJSON_ASSERT(false); return 0; } + char Take() { RAPIDJSON_ASSERT(false); return 0; } + size_t Tell() const { RAPIDJSON_ASSERT(false); return 0; } + char* PutBegin() { RAPIDJSON_ASSERT(false); return 0; } + size_t PutEnd(char*) { RAPIDJSON_ASSERT(false); return 0; } + +private: + // Prohibit copy constructor & assignment operator. + FileWriteStream(const FileWriteStream&); + FileWriteStream& operator=(const FileWriteStream&); + + std::FILE* fp_; + char *buffer_; + char *bufferEnd_; + char *current_; +}; + +//! Implement specialized version of PutN() with memset() for better performance. +template<> +inline void PutN(FileWriteStream& stream, char c, size_t n) { + stream.PutN(c, n); +} + +RAPIDJSON_NAMESPACE_END + +#ifdef __clang__ +RAPIDJSON_DIAG_POP +#endif + +#endif // RAPIDJSON_FILESTREAM_H_ diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/fwd.h b/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/fwd.h new file mode 100644 index 0000000000..d62f77f0ec --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/fwd.h @@ -0,0 +1,151 @@ +// Tencent is pleased to support the open source community by making RapidJSON available. +// +// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. +// +// Licensed under the MIT License (the "License"); you may not use this file except +// in compliance with the License. You may obtain a copy of the License at +// +// http://opensource.org/licenses/MIT +// +// Unless required by applicable law or agreed to in writing, software distributed +// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +// CONDITIONS OF ANY KIND, either express or implied. See the License for the +// specific language governing permissions and limitations under the License. + +#ifndef RAPIDJSON_FWD_H_ +#define RAPIDJSON_FWD_H_ + +#include "rapidjson.h" + +RAPIDJSON_NAMESPACE_BEGIN + +// encodings.h + +template struct UTF8; +template struct UTF16; +template struct UTF16BE; +template struct UTF16LE; +template struct UTF32; +template struct UTF32BE; +template struct UTF32LE; +template struct ASCII; +template struct AutoUTF; + +template +struct Transcoder; + +// allocators.h + +class CrtAllocator; + +template +class MemoryPoolAllocator; + +// stream.h + +template +struct GenericStringStream; + +typedef GenericStringStream > StringStream; + +template +struct GenericInsituStringStream; + +typedef GenericInsituStringStream > InsituStringStream; + +// stringbuffer.h + +template +class GenericStringBuffer; + +typedef GenericStringBuffer, CrtAllocator> StringBuffer; + +// filereadstream.h + +class FileReadStream; + +// filewritestream.h + +class FileWriteStream; + +// memorybuffer.h + +template +struct GenericMemoryBuffer; + +typedef GenericMemoryBuffer MemoryBuffer; + +// memorystream.h + +struct MemoryStream; + +// reader.h + +template +struct BaseReaderHandler; + +template +class GenericReader; + +typedef GenericReader, UTF8, CrtAllocator> Reader; + +// writer.h + +template +class Writer; + +// prettywriter.h + +template +class PrettyWriter; + +// document.h + +template +class GenericMember; + +template +class GenericMemberIterator; + +template +struct GenericStringRef; + +template +class GenericValue; + +typedef GenericValue, MemoryPoolAllocator > Value; + +template +class GenericDocument; + +typedef GenericDocument, MemoryPoolAllocator, CrtAllocator> Document; + +// pointer.h + +template +class GenericPointer; + +typedef GenericPointer Pointer; + +// schema.h + +template +class IGenericRemoteSchemaDocumentProvider; + +template +class GenericSchemaDocument; + +typedef GenericSchemaDocument SchemaDocument; +typedef IGenericRemoteSchemaDocumentProvider IRemoteSchemaDocumentProvider; + +template < + typename SchemaDocumentType, + typename OutputHandler, + typename StateAllocator> +class GenericSchemaValidator; + +typedef GenericSchemaValidator, void>, CrtAllocator> SchemaValidator; + +RAPIDJSON_NAMESPACE_END + +#endif // RAPIDJSON_RAPIDJSONFWD_H_ diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/internal/biginteger.h b/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/internal/biginteger.h new file mode 100644 index 0000000000..af48738038 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/internal/biginteger.h @@ -0,0 +1,297 @@ +// Tencent is pleased to support the open source community by making RapidJSON available. +// +// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. +// +// Licensed under the MIT License (the "License"); you may not use this file except +// in compliance with the License. You may obtain a copy of the License at +// +// http://opensource.org/licenses/MIT +// +// Unless required by applicable law or agreed to in writing, software distributed +// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +// CONDITIONS OF ANY KIND, either express or implied. See the License for the +// specific language governing permissions and limitations under the License. + +#ifndef RAPIDJSON_BIGINTEGER_H_ +#define RAPIDJSON_BIGINTEGER_H_ + +#include "../rapidjson.h" + +#if defined(_MSC_VER) && !defined(__INTEL_COMPILER) && defined(_M_AMD64) +#include // for _umul128 +#if !defined(_ARM64EC_) +#pragma intrinsic(_umul128) +#else +#pragma comment(lib,"softintrin") +#endif +#endif + +RAPIDJSON_NAMESPACE_BEGIN +namespace internal { + +class BigInteger { +public: + typedef uint64_t Type; + + BigInteger(const BigInteger& rhs) : count_(rhs.count_) { + std::memcpy(digits_, rhs.digits_, count_ * sizeof(Type)); + } + + explicit BigInteger(uint64_t u) : count_(1) { + digits_[0] = u; + } + + template + BigInteger(const Ch* decimals, size_t length) : count_(1) { + RAPIDJSON_ASSERT(length > 0); + digits_[0] = 0; + size_t i = 0; + const size_t kMaxDigitPerIteration = 19; // 2^64 = 18446744073709551616 > 10^19 + while (length >= kMaxDigitPerIteration) { + AppendDecimal64(decimals + i, decimals + i + kMaxDigitPerIteration); + length -= kMaxDigitPerIteration; + i += kMaxDigitPerIteration; + } + + if (length > 0) + AppendDecimal64(decimals + i, decimals + i + length); + } + + BigInteger& operator=(const BigInteger &rhs) + { + if (this != &rhs) { + count_ = rhs.count_; + std::memcpy(digits_, rhs.digits_, count_ * sizeof(Type)); + } + return *this; + } + + BigInteger& operator=(uint64_t u) { + digits_[0] = u; + count_ = 1; + return *this; + } + + BigInteger& operator+=(uint64_t u) { + Type backup = digits_[0]; + digits_[0] += u; + for (size_t i = 0; i < count_ - 1; i++) { + if (digits_[i] >= backup) + return *this; // no carry + backup = digits_[i + 1]; + digits_[i + 1] += 1; + } + + // Last carry + if (digits_[count_ - 1] < backup) + PushBack(1); + + return *this; + } + + BigInteger& operator*=(uint64_t u) { + if (u == 0) return *this = 0; + if (u == 1) return *this; + if (*this == 1) return *this = u; + + uint64_t k = 0; + for (size_t i = 0; i < count_; i++) { + uint64_t hi; + digits_[i] = MulAdd64(digits_[i], u, k, &hi); + k = hi; + } + + if (k > 0) + PushBack(k); + + return *this; + } + + BigInteger& operator*=(uint32_t u) { + if (u == 0) return *this = 0; + if (u == 1) return *this; + if (*this == 1) return *this = u; + + uint64_t k = 0; + for (size_t i = 0; i < count_; i++) { + const uint64_t c = digits_[i] >> 32; + const uint64_t d = digits_[i] & 0xFFFFFFFF; + const uint64_t uc = u * c; + const uint64_t ud = u * d; + const uint64_t p0 = ud + k; + const uint64_t p1 = uc + (p0 >> 32); + digits_[i] = (p0 & 0xFFFFFFFF) | (p1 << 32); + k = p1 >> 32; + } + + if (k > 0) + PushBack(k); + + return *this; + } + + BigInteger& operator<<=(size_t shift) { + if (IsZero() || shift == 0) return *this; + + size_t offset = shift / kTypeBit; + size_t interShift = shift % kTypeBit; + RAPIDJSON_ASSERT(count_ + offset <= kCapacity); + + if (interShift == 0) { + std::memmove(digits_ + offset, digits_, count_ * sizeof(Type)); + count_ += offset; + } + else { + digits_[count_] = 0; + for (size_t i = count_; i > 0; i--) + digits_[i + offset] = (digits_[i] << interShift) | (digits_[i - 1] >> (kTypeBit - interShift)); + digits_[offset] = digits_[0] << interShift; + count_ += offset; + if (digits_[count_]) + count_++; + } + + std::memset(digits_, 0, offset * sizeof(Type)); + + return *this; + } + + bool operator==(const BigInteger& rhs) const { + return count_ == rhs.count_ && std::memcmp(digits_, rhs.digits_, count_ * sizeof(Type)) == 0; + } + + bool operator==(const Type rhs) const { + return count_ == 1 && digits_[0] == rhs; + } + + BigInteger& MultiplyPow5(unsigned exp) { + static const uint32_t kPow5[12] = { + 5, + 5 * 5, + 5 * 5 * 5, + 5 * 5 * 5 * 5, + 5 * 5 * 5 * 5 * 5, + 5 * 5 * 5 * 5 * 5 * 5, + 5 * 5 * 5 * 5 * 5 * 5 * 5, + 5 * 5 * 5 * 5 * 5 * 5 * 5 * 5, + 5 * 5 * 5 * 5 * 5 * 5 * 5 * 5 * 5, + 5 * 5 * 5 * 5 * 5 * 5 * 5 * 5 * 5 * 5, + 5 * 5 * 5 * 5 * 5 * 5 * 5 * 5 * 5 * 5 * 5, + 5 * 5 * 5 * 5 * 5 * 5 * 5 * 5 * 5 * 5 * 5 * 5 + }; + if (exp == 0) return *this; + for (; exp >= 27; exp -= 27) *this *= RAPIDJSON_UINT64_C2(0X6765C793, 0XFA10079D); // 5^27 + for (; exp >= 13; exp -= 13) *this *= static_cast(1220703125u); // 5^13 + if (exp > 0) *this *= kPow5[exp - 1]; + return *this; + } + + // Compute absolute difference of this and rhs. + // Assume this != rhs + bool Difference(const BigInteger& rhs, BigInteger* out) const { + int cmp = Compare(rhs); + RAPIDJSON_ASSERT(cmp != 0); + const BigInteger *a, *b; // Makes a > b + bool ret; + if (cmp < 0) { a = &rhs; b = this; ret = true; } + else { a = this; b = &rhs; ret = false; } + + Type borrow = 0; + for (size_t i = 0; i < a->count_; i++) { + Type d = a->digits_[i] - borrow; + if (i < b->count_) + d -= b->digits_[i]; + borrow = (d > a->digits_[i]) ? 1 : 0; + out->digits_[i] = d; + if (d != 0) + out->count_ = i + 1; + } + + return ret; + } + + int Compare(const BigInteger& rhs) const { + if (count_ != rhs.count_) + return count_ < rhs.count_ ? -1 : 1; + + for (size_t i = count_; i-- > 0;) + if (digits_[i] != rhs.digits_[i]) + return digits_[i] < rhs.digits_[i] ? -1 : 1; + + return 0; + } + + size_t GetCount() const { return count_; } + Type GetDigit(size_t index) const { RAPIDJSON_ASSERT(index < count_); return digits_[index]; } + bool IsZero() const { return count_ == 1 && digits_[0] == 0; } + +private: + template + void AppendDecimal64(const Ch* begin, const Ch* end) { + uint64_t u = ParseUint64(begin, end); + if (IsZero()) + *this = u; + else { + unsigned exp = static_cast(end - begin); + (MultiplyPow5(exp) <<= exp) += u; // *this = *this * 10^exp + u + } + } + + void PushBack(Type digit) { + RAPIDJSON_ASSERT(count_ < kCapacity); + digits_[count_++] = digit; + } + + template + static uint64_t ParseUint64(const Ch* begin, const Ch* end) { + uint64_t r = 0; + for (const Ch* p = begin; p != end; ++p) { + RAPIDJSON_ASSERT(*p >= Ch('0') && *p <= Ch('9')); + r = r * 10u + static_cast(*p - Ch('0')); + } + return r; + } + + // Assume a * b + k < 2^128 + static uint64_t MulAdd64(uint64_t a, uint64_t b, uint64_t k, uint64_t* outHigh) { +#if defined(_MSC_VER) && defined(_M_AMD64) + uint64_t low = _umul128(a, b, outHigh) + k; + if (low < k) + (*outHigh)++; + return low; +#elif (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) && defined(__x86_64__) + __extension__ typedef unsigned __int128 uint128; + uint128 p = static_cast(a) * static_cast(b); + p += k; + *outHigh = static_cast(p >> 64); + return static_cast(p); +#else + const uint64_t a0 = a & 0xFFFFFFFF, a1 = a >> 32, b0 = b & 0xFFFFFFFF, b1 = b >> 32; + uint64_t x0 = a0 * b0, x1 = a0 * b1, x2 = a1 * b0, x3 = a1 * b1; + x1 += (x0 >> 32); // can't give carry + x1 += x2; + if (x1 < x2) + x3 += (static_cast(1) << 32); + uint64_t lo = (x1 << 32) + (x0 & 0xFFFFFFFF); + uint64_t hi = x3 + (x1 >> 32); + + lo += k; + if (lo < k) + hi++; + *outHigh = hi; + return lo; +#endif + } + + static const size_t kBitCount = 3328; // 64bit * 54 > 10^1000 + static const size_t kCapacity = kBitCount / sizeof(Type); + static const size_t kTypeBit = sizeof(Type) * 8; + + Type digits_[kCapacity]; + size_t count_; +}; + +} // namespace internal +RAPIDJSON_NAMESPACE_END + +#endif // RAPIDJSON_BIGINTEGER_H_ diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/internal/clzll.h b/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/internal/clzll.h new file mode 100644 index 0000000000..8fc5118aa4 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/internal/clzll.h @@ -0,0 +1,71 @@ +// Tencent is pleased to support the open source community by making RapidJSON available. +// +// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. +// +// Licensed under the MIT License (the "License"); you may not use this file except +// in compliance with the License. You may obtain a copy of the License at +// +// http://opensource.org/licenses/MIT +// +// Unless required by applicable law or agreed to in writing, software distributed +// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +// CONDITIONS OF ANY KIND, either express or implied. See the License for the +// specific language governing permissions and limitations under the License. + +#ifndef RAPIDJSON_CLZLL_H_ +#define RAPIDJSON_CLZLL_H_ + +#include "../rapidjson.h" + +#if defined(_MSC_VER) && !defined(UNDER_CE) +#include +#if defined(_WIN64) +#pragma intrinsic(_BitScanReverse64) +#else +#pragma intrinsic(_BitScanReverse) +#endif +#endif + +RAPIDJSON_NAMESPACE_BEGIN +namespace internal { + +inline uint32_t clzll(uint64_t x) { + // Passing 0 to __builtin_clzll is UB in GCC and results in an + // infinite loop in the software implementation. + RAPIDJSON_ASSERT(x != 0); + +#if defined(_MSC_VER) && !defined(UNDER_CE) + unsigned long r = 0; +#if defined(_WIN64) + _BitScanReverse64(&r, x); +#else + // Scan the high 32 bits. + if (_BitScanReverse(&r, static_cast(x >> 32))) + return 63 - (r + 32); + + // Scan the low 32 bits. + _BitScanReverse(&r, static_cast(x & 0xFFFFFFFF)); +#endif // _WIN64 + + return 63 - r; +#elif (defined(__GNUC__) && __GNUC__ >= 4) || RAPIDJSON_HAS_BUILTIN(__builtin_clzll) + // __builtin_clzll wrapper + return static_cast(__builtin_clzll(x)); +#else + // naive version + uint32_t r = 0; + while (!(x & (static_cast(1) << 63))) { + x <<= 1; + ++r; + } + + return r; +#endif // _MSC_VER +} + +#define RAPIDJSON_CLZLL RAPIDJSON_NAMESPACE::internal::clzll + +} // namespace internal +RAPIDJSON_NAMESPACE_END + +#endif // RAPIDJSON_CLZLL_H_ diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/internal/diyfp.h b/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/internal/diyfp.h new file mode 100644 index 0000000000..f7d46539a9 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/internal/diyfp.h @@ -0,0 +1,261 @@ +// Tencent is pleased to support the open source community by making RapidJSON available. +// +// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. +// +// Licensed under the MIT License (the "License"); you may not use this file except +// in compliance with the License. You may obtain a copy of the License at +// +// http://opensource.org/licenses/MIT +// +// Unless required by applicable law or agreed to in writing, software distributed +// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +// CONDITIONS OF ANY KIND, either express or implied. See the License for the +// specific language governing permissions and limitations under the License. + +// This is a C++ header-only implementation of Grisu2 algorithm from the publication: +// Loitsch, Florian. "Printing floating-point numbers quickly and accurately with +// integers." ACM Sigplan Notices 45.6 (2010): 233-243. + +#ifndef RAPIDJSON_DIYFP_H_ +#define RAPIDJSON_DIYFP_H_ + +#include "../rapidjson.h" +#include "clzll.h" +#include + +#if defined(_MSC_VER) && defined(_M_AMD64) && !defined(__INTEL_COMPILER) +#include +#if !defined(_ARM64EC_) +#pragma intrinsic(_umul128) +#else +#pragma comment(lib,"softintrin") +#endif +#endif + +RAPIDJSON_NAMESPACE_BEGIN +namespace internal { + +#ifdef __GNUC__ +RAPIDJSON_DIAG_PUSH +RAPIDJSON_DIAG_OFF(effc++) +#endif + +#ifdef __clang__ +RAPIDJSON_DIAG_PUSH +RAPIDJSON_DIAG_OFF(padded) +#endif + +struct DiyFp { + DiyFp() : f(), e() {} + + DiyFp(uint64_t fp, int exp) : f(fp), e(exp) {} + + explicit DiyFp(double d) { + union { + double d; + uint64_t u64; + } u = { d }; + + int biased_e = static_cast((u.u64 & kDpExponentMask) >> kDpSignificandSize); + uint64_t significand = (u.u64 & kDpSignificandMask); + if (biased_e != 0) { + f = significand + kDpHiddenBit; + e = biased_e - kDpExponentBias; + } + else { + f = significand; + e = kDpMinExponent + 1; + } + } + + DiyFp operator-(const DiyFp& rhs) const { + return DiyFp(f - rhs.f, e); + } + + DiyFp operator*(const DiyFp& rhs) const { +#if defined(_MSC_VER) && defined(_M_AMD64) + uint64_t h; + uint64_t l = _umul128(f, rhs.f, &h); + if (l & (uint64_t(1) << 63)) // rounding + h++; + return DiyFp(h, e + rhs.e + 64); +#elif (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) && defined(__x86_64__) + __extension__ typedef unsigned __int128 uint128; + uint128 p = static_cast(f) * static_cast(rhs.f); + uint64_t h = static_cast(p >> 64); + uint64_t l = static_cast(p); + if (l & (uint64_t(1) << 63)) // rounding + h++; + return DiyFp(h, e + rhs.e + 64); +#else + const uint64_t M32 = 0xFFFFFFFF; + const uint64_t a = f >> 32; + const uint64_t b = f & M32; + const uint64_t c = rhs.f >> 32; + const uint64_t d = rhs.f & M32; + const uint64_t ac = a * c; + const uint64_t bc = b * c; + const uint64_t ad = a * d; + const uint64_t bd = b * d; + uint64_t tmp = (bd >> 32) + (ad & M32) + (bc & M32); + tmp += 1U << 31; /// mult_round + return DiyFp(ac + (ad >> 32) + (bc >> 32) + (tmp >> 32), e + rhs.e + 64); +#endif + } + + DiyFp Normalize() const { + int s = static_cast(clzll(f)); + return DiyFp(f << s, e - s); + } + + DiyFp NormalizeBoundary() const { + DiyFp res = *this; + while (!(res.f & (kDpHiddenBit << 1))) { + res.f <<= 1; + res.e--; + } + res.f <<= (kDiySignificandSize - kDpSignificandSize - 2); + res.e = res.e - (kDiySignificandSize - kDpSignificandSize - 2); + return res; + } + + void NormalizedBoundaries(DiyFp* minus, DiyFp* plus) const { + DiyFp pl = DiyFp((f << 1) + 1, e - 1).NormalizeBoundary(); + DiyFp mi = (f == kDpHiddenBit) ? DiyFp((f << 2) - 1, e - 2) : DiyFp((f << 1) - 1, e - 1); + mi.f <<= mi.e - pl.e; + mi.e = pl.e; + *plus = pl; + *minus = mi; + } + + double ToDouble() const { + union { + double d; + uint64_t u64; + }u; + RAPIDJSON_ASSERT(f <= kDpHiddenBit + kDpSignificandMask); + if (e < kDpDenormalExponent) { + // Underflow. + return 0.0; + } + if (e >= kDpMaxExponent) { + // Overflow. + return std::numeric_limits::infinity(); + } + const uint64_t be = (e == kDpDenormalExponent && (f & kDpHiddenBit) == 0) ? 0 : + static_cast(e + kDpExponentBias); + u.u64 = (f & kDpSignificandMask) | (be << kDpSignificandSize); + return u.d; + } + + static const int kDiySignificandSize = 64; + static const int kDpSignificandSize = 52; + static const int kDpExponentBias = 0x3FF + kDpSignificandSize; + static const int kDpMaxExponent = 0x7FF - kDpExponentBias; + static const int kDpMinExponent = -kDpExponentBias; + static const int kDpDenormalExponent = -kDpExponentBias + 1; + static const uint64_t kDpExponentMask = RAPIDJSON_UINT64_C2(0x7FF00000, 0x00000000); + static const uint64_t kDpSignificandMask = RAPIDJSON_UINT64_C2(0x000FFFFF, 0xFFFFFFFF); + static const uint64_t kDpHiddenBit = RAPIDJSON_UINT64_C2(0x00100000, 0x00000000); + + uint64_t f; + int e; +}; + +inline DiyFp GetCachedPowerByIndex(size_t index) { + // 10^-348, 10^-340, ..., 10^340 + static const uint64_t kCachedPowers_F[] = { + RAPIDJSON_UINT64_C2(0xfa8fd5a0, 0x081c0288), RAPIDJSON_UINT64_C2(0xbaaee17f, 0xa23ebf76), + RAPIDJSON_UINT64_C2(0x8b16fb20, 0x3055ac76), RAPIDJSON_UINT64_C2(0xcf42894a, 0x5dce35ea), + RAPIDJSON_UINT64_C2(0x9a6bb0aa, 0x55653b2d), RAPIDJSON_UINT64_C2(0xe61acf03, 0x3d1a45df), + RAPIDJSON_UINT64_C2(0xab70fe17, 0xc79ac6ca), RAPIDJSON_UINT64_C2(0xff77b1fc, 0xbebcdc4f), + RAPIDJSON_UINT64_C2(0xbe5691ef, 0x416bd60c), RAPIDJSON_UINT64_C2(0x8dd01fad, 0x907ffc3c), + RAPIDJSON_UINT64_C2(0xd3515c28, 0x31559a83), RAPIDJSON_UINT64_C2(0x9d71ac8f, 0xada6c9b5), + RAPIDJSON_UINT64_C2(0xea9c2277, 0x23ee8bcb), RAPIDJSON_UINT64_C2(0xaecc4991, 0x4078536d), + RAPIDJSON_UINT64_C2(0x823c1279, 0x5db6ce57), RAPIDJSON_UINT64_C2(0xc2109436, 0x4dfb5637), + RAPIDJSON_UINT64_C2(0x9096ea6f, 0x3848984f), RAPIDJSON_UINT64_C2(0xd77485cb, 0x25823ac7), + RAPIDJSON_UINT64_C2(0xa086cfcd, 0x97bf97f4), RAPIDJSON_UINT64_C2(0xef340a98, 0x172aace5), + RAPIDJSON_UINT64_C2(0xb23867fb, 0x2a35b28e), RAPIDJSON_UINT64_C2(0x84c8d4df, 0xd2c63f3b), + RAPIDJSON_UINT64_C2(0xc5dd4427, 0x1ad3cdba), RAPIDJSON_UINT64_C2(0x936b9fce, 0xbb25c996), + RAPIDJSON_UINT64_C2(0xdbac6c24, 0x7d62a584), RAPIDJSON_UINT64_C2(0xa3ab6658, 0x0d5fdaf6), + RAPIDJSON_UINT64_C2(0xf3e2f893, 0xdec3f126), RAPIDJSON_UINT64_C2(0xb5b5ada8, 0xaaff80b8), + RAPIDJSON_UINT64_C2(0x87625f05, 0x6c7c4a8b), RAPIDJSON_UINT64_C2(0xc9bcff60, 0x34c13053), + RAPIDJSON_UINT64_C2(0x964e858c, 0x91ba2655), RAPIDJSON_UINT64_C2(0xdff97724, 0x70297ebd), + RAPIDJSON_UINT64_C2(0xa6dfbd9f, 0xb8e5b88f), RAPIDJSON_UINT64_C2(0xf8a95fcf, 0x88747d94), + RAPIDJSON_UINT64_C2(0xb9447093, 0x8fa89bcf), RAPIDJSON_UINT64_C2(0x8a08f0f8, 0xbf0f156b), + RAPIDJSON_UINT64_C2(0xcdb02555, 0x653131b6), RAPIDJSON_UINT64_C2(0x993fe2c6, 0xd07b7fac), + RAPIDJSON_UINT64_C2(0xe45c10c4, 0x2a2b3b06), RAPIDJSON_UINT64_C2(0xaa242499, 0x697392d3), + RAPIDJSON_UINT64_C2(0xfd87b5f2, 0x8300ca0e), RAPIDJSON_UINT64_C2(0xbce50864, 0x92111aeb), + RAPIDJSON_UINT64_C2(0x8cbccc09, 0x6f5088cc), RAPIDJSON_UINT64_C2(0xd1b71758, 0xe219652c), + RAPIDJSON_UINT64_C2(0x9c400000, 0x00000000), RAPIDJSON_UINT64_C2(0xe8d4a510, 0x00000000), + RAPIDJSON_UINT64_C2(0xad78ebc5, 0xac620000), RAPIDJSON_UINT64_C2(0x813f3978, 0xf8940984), + RAPIDJSON_UINT64_C2(0xc097ce7b, 0xc90715b3), RAPIDJSON_UINT64_C2(0x8f7e32ce, 0x7bea5c70), + RAPIDJSON_UINT64_C2(0xd5d238a4, 0xabe98068), RAPIDJSON_UINT64_C2(0x9f4f2726, 0x179a2245), + RAPIDJSON_UINT64_C2(0xed63a231, 0xd4c4fb27), RAPIDJSON_UINT64_C2(0xb0de6538, 0x8cc8ada8), + RAPIDJSON_UINT64_C2(0x83c7088e, 0x1aab65db), RAPIDJSON_UINT64_C2(0xc45d1df9, 0x42711d9a), + RAPIDJSON_UINT64_C2(0x924d692c, 0xa61be758), RAPIDJSON_UINT64_C2(0xda01ee64, 0x1a708dea), + RAPIDJSON_UINT64_C2(0xa26da399, 0x9aef774a), RAPIDJSON_UINT64_C2(0xf209787b, 0xb47d6b85), + RAPIDJSON_UINT64_C2(0xb454e4a1, 0x79dd1877), RAPIDJSON_UINT64_C2(0x865b8692, 0x5b9bc5c2), + RAPIDJSON_UINT64_C2(0xc83553c5, 0xc8965d3d), RAPIDJSON_UINT64_C2(0x952ab45c, 0xfa97a0b3), + RAPIDJSON_UINT64_C2(0xde469fbd, 0x99a05fe3), RAPIDJSON_UINT64_C2(0xa59bc234, 0xdb398c25), + RAPIDJSON_UINT64_C2(0xf6c69a72, 0xa3989f5c), RAPIDJSON_UINT64_C2(0xb7dcbf53, 0x54e9bece), + RAPIDJSON_UINT64_C2(0x88fcf317, 0xf22241e2), RAPIDJSON_UINT64_C2(0xcc20ce9b, 0xd35c78a5), + RAPIDJSON_UINT64_C2(0x98165af3, 0x7b2153df), RAPIDJSON_UINT64_C2(0xe2a0b5dc, 0x971f303a), + RAPIDJSON_UINT64_C2(0xa8d9d153, 0x5ce3b396), RAPIDJSON_UINT64_C2(0xfb9b7cd9, 0xa4a7443c), + RAPIDJSON_UINT64_C2(0xbb764c4c, 0xa7a44410), RAPIDJSON_UINT64_C2(0x8bab8eef, 0xb6409c1a), + RAPIDJSON_UINT64_C2(0xd01fef10, 0xa657842c), RAPIDJSON_UINT64_C2(0x9b10a4e5, 0xe9913129), + RAPIDJSON_UINT64_C2(0xe7109bfb, 0xa19c0c9d), RAPIDJSON_UINT64_C2(0xac2820d9, 0x623bf429), + RAPIDJSON_UINT64_C2(0x80444b5e, 0x7aa7cf85), RAPIDJSON_UINT64_C2(0xbf21e440, 0x03acdd2d), + RAPIDJSON_UINT64_C2(0x8e679c2f, 0x5e44ff8f), RAPIDJSON_UINT64_C2(0xd433179d, 0x9c8cb841), + RAPIDJSON_UINT64_C2(0x9e19db92, 0xb4e31ba9), RAPIDJSON_UINT64_C2(0xeb96bf6e, 0xbadf77d9), + RAPIDJSON_UINT64_C2(0xaf87023b, 0x9bf0ee6b) + }; + static const int16_t kCachedPowers_E[] = { + -1220, -1193, -1166, -1140, -1113, -1087, -1060, -1034, -1007, -980, + -954, -927, -901, -874, -847, -821, -794, -768, -741, -715, + -688, -661, -635, -608, -582, -555, -529, -502, -475, -449, + -422, -396, -369, -343, -316, -289, -263, -236, -210, -183, + -157, -130, -103, -77, -50, -24, 3, 30, 56, 83, + 109, 136, 162, 189, 216, 242, 269, 295, 322, 348, + 375, 402, 428, 455, 481, 508, 534, 561, 588, 614, + 641, 667, 694, 720, 747, 774, 800, 827, 853, 880, + 907, 933, 960, 986, 1013, 1039, 1066 + }; + RAPIDJSON_ASSERT(index < 87); + return DiyFp(kCachedPowers_F[index], kCachedPowers_E[index]); +} + +inline DiyFp GetCachedPower(int e, int* K) { + + //int k = static_cast(ceil((-61 - e) * 0.30102999566398114)) + 374; + double dk = (-61 - e) * 0.30102999566398114 + 347; // dk must be positive, so can do ceiling in positive + int k = static_cast(dk); + if (dk - k > 0.0) + k++; + + unsigned index = static_cast((k >> 3) + 1); + *K = -(-348 + static_cast(index << 3)); // decimal exponent no need lookup table + + return GetCachedPowerByIndex(index); +} + +inline DiyFp GetCachedPower10(int exp, int *outExp) { + RAPIDJSON_ASSERT(exp >= -348); + unsigned index = static_cast(exp + 348) / 8u; + *outExp = -348 + static_cast(index) * 8; + return GetCachedPowerByIndex(index); +} + +#ifdef __GNUC__ +RAPIDJSON_DIAG_POP +#endif + +#ifdef __clang__ +RAPIDJSON_DIAG_POP +RAPIDJSON_DIAG_OFF(padded) +#endif + +} // namespace internal +RAPIDJSON_NAMESPACE_END + +#endif // RAPIDJSON_DIYFP_H_ diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/internal/dtoa.h b/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/internal/dtoa.h new file mode 100644 index 0000000000..9f6ae3b3f0 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/internal/dtoa.h @@ -0,0 +1,249 @@ +// Tencent is pleased to support the open source community by making RapidJSON available. +// +// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. +// +// Licensed under the MIT License (the "License"); you may not use this file except +// in compliance with the License. You may obtain a copy of the License at +// +// http://opensource.org/licenses/MIT +// +// Unless required by applicable law or agreed to in writing, software distributed +// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +// CONDITIONS OF ANY KIND, either express or implied. See the License for the +// specific language governing permissions and limitations under the License. + +// This is a C++ header-only implementation of Grisu2 algorithm from the publication: +// Loitsch, Florian. "Printing floating-point numbers quickly and accurately with +// integers." ACM Sigplan Notices 45.6 (2010): 233-243. + +#ifndef RAPIDJSON_DTOA_ +#define RAPIDJSON_DTOA_ + +#include "itoa.h" // GetDigitsLut() +#include "diyfp.h" +#include "ieee754.h" + +RAPIDJSON_NAMESPACE_BEGIN +namespace internal { + +#ifdef __GNUC__ +RAPIDJSON_DIAG_PUSH +RAPIDJSON_DIAG_OFF(effc++) +RAPIDJSON_DIAG_OFF(array-bounds) // some gcc versions generate wrong warnings https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59124 +#endif + +inline void GrisuRound(char* buffer, int len, uint64_t delta, uint64_t rest, uint64_t ten_kappa, uint64_t wp_w) { + while (rest < wp_w && delta - rest >= ten_kappa && + (rest + ten_kappa < wp_w || /// closer + wp_w - rest > rest + ten_kappa - wp_w)) { + buffer[len - 1]--; + rest += ten_kappa; + } +} + +inline int CountDecimalDigit32(uint32_t n) { + // Simple pure C++ implementation was faster than __builtin_clz version in this situation. + if (n < 10) return 1; + if (n < 100) return 2; + if (n < 1000) return 3; + if (n < 10000) return 4; + if (n < 100000) return 5; + if (n < 1000000) return 6; + if (n < 10000000) return 7; + if (n < 100000000) return 8; + // Will not reach 10 digits in DigitGen() + //if (n < 1000000000) return 9; + //return 10; + return 9; +} + +inline void DigitGen(const DiyFp& W, const DiyFp& Mp, uint64_t delta, char* buffer, int* len, int* K) { + static const uint64_t kPow10[] = { 1U, 10U, 100U, 1000U, 10000U, 100000U, 1000000U, 10000000U, 100000000U, + 1000000000U, 10000000000U, 100000000000U, 1000000000000U, + 10000000000000U, 100000000000000U, 1000000000000000U, + 10000000000000000U, 100000000000000000U, 1000000000000000000U, + 10000000000000000000U }; + const DiyFp one(uint64_t(1) << -Mp.e, Mp.e); + const DiyFp wp_w = Mp - W; + uint32_t p1 = static_cast(Mp.f >> -one.e); + uint64_t p2 = Mp.f & (one.f - 1); + int kappa = CountDecimalDigit32(p1); // kappa in [0, 9] + *len = 0; + + while (kappa > 0) { + uint32_t d = 0; + switch (kappa) { + case 9: d = p1 / 100000000; p1 %= 100000000; break; + case 8: d = p1 / 10000000; p1 %= 10000000; break; + case 7: d = p1 / 1000000; p1 %= 1000000; break; + case 6: d = p1 / 100000; p1 %= 100000; break; + case 5: d = p1 / 10000; p1 %= 10000; break; + case 4: d = p1 / 1000; p1 %= 1000; break; + case 3: d = p1 / 100; p1 %= 100; break; + case 2: d = p1 / 10; p1 %= 10; break; + case 1: d = p1; p1 = 0; break; + default:; + } + if (d || *len) + buffer[(*len)++] = static_cast('0' + static_cast(d)); + kappa--; + uint64_t tmp = (static_cast(p1) << -one.e) + p2; + if (tmp <= delta) { + *K += kappa; + GrisuRound(buffer, *len, delta, tmp, kPow10[kappa] << -one.e, wp_w.f); + return; + } + } + + // kappa = 0 + for (;;) { + p2 *= 10; + delta *= 10; + char d = static_cast(p2 >> -one.e); + if (d || *len) + buffer[(*len)++] = static_cast('0' + d); + p2 &= one.f - 1; + kappa--; + if (p2 < delta) { + *K += kappa; + int index = -kappa; + GrisuRound(buffer, *len, delta, p2, one.f, wp_w.f * (index < 20 ? kPow10[index] : 0)); + return; + } + } +} + +inline void Grisu2(double value, char* buffer, int* length, int* K) { + const DiyFp v(value); + DiyFp w_m, w_p; + v.NormalizedBoundaries(&w_m, &w_p); + + const DiyFp c_mk = GetCachedPower(w_p.e, K); + const DiyFp W = v.Normalize() * c_mk; + DiyFp Wp = w_p * c_mk; + DiyFp Wm = w_m * c_mk; + Wm.f++; + Wp.f--; + DigitGen(W, Wp, Wp.f - Wm.f, buffer, length, K); +} + +inline char* WriteExponent(int K, char* buffer) { + if (K < 0) { + *buffer++ = '-'; + K = -K; + } + + if (K >= 100) { + *buffer++ = static_cast('0' + static_cast(K / 100)); + K %= 100; + const char* d = GetDigitsLut() + K * 2; + *buffer++ = d[0]; + *buffer++ = d[1]; + } + else if (K >= 10) { + const char* d = GetDigitsLut() + K * 2; + *buffer++ = d[0]; + *buffer++ = d[1]; + } + else + *buffer++ = static_cast('0' + static_cast(K)); + + return buffer; +} + +inline char* Prettify(char* buffer, int length, int k, int maxDecimalPlaces) { + const int kk = length + k; // 10^(kk-1) <= v < 10^kk + + if (0 <= k && kk <= 21) { + // 1234e7 -> 12340000000 + for (int i = length; i < kk; i++) + buffer[i] = '0'; + buffer[kk] = '.'; + buffer[kk + 1] = '0'; + return &buffer[kk + 2]; + } + else if (0 < kk && kk <= 21) { + // 1234e-2 -> 12.34 + std::memmove(&buffer[kk + 1], &buffer[kk], static_cast(length - kk)); + buffer[kk] = '.'; + if (0 > k + maxDecimalPlaces) { + // When maxDecimalPlaces = 2, 1.2345 -> 1.23, 1.102 -> 1.1 + // Remove extra trailing zeros (at least one) after truncation. + for (int i = kk + maxDecimalPlaces; i > kk + 1; i--) + if (buffer[i] != '0') + return &buffer[i + 1]; + return &buffer[kk + 2]; // Reserve one zero + } + else + return &buffer[length + 1]; + } + else if (-6 < kk && kk <= 0) { + // 1234e-6 -> 0.001234 + const int offset = 2 - kk; + std::memmove(&buffer[offset], &buffer[0], static_cast(length)); + buffer[0] = '0'; + buffer[1] = '.'; + for (int i = 2; i < offset; i++) + buffer[i] = '0'; + if (length - kk > maxDecimalPlaces) { + // When maxDecimalPlaces = 2, 0.123 -> 0.12, 0.102 -> 0.1 + // Remove extra trailing zeros (at least one) after truncation. + for (int i = maxDecimalPlaces + 1; i > 2; i--) + if (buffer[i] != '0') + return &buffer[i + 1]; + return &buffer[3]; // Reserve one zero + } + else + return &buffer[length + offset]; + } + else if (kk < -maxDecimalPlaces) { + // Truncate to zero + buffer[0] = '0'; + buffer[1] = '.'; + buffer[2] = '0'; + return &buffer[3]; + } + else if (length == 1) { + // 1e30 + buffer[1] = 'e'; + return WriteExponent(kk - 1, &buffer[2]); + } + else { + // 1234e30 -> 1.234e33 + std::memmove(&buffer[2], &buffer[1], static_cast(length - 1)); + buffer[1] = '.'; + buffer[length + 1] = 'e'; + return WriteExponent(kk - 1, &buffer[0 + length + 2]); + } +} + +inline char* dtoa(double value, char* buffer, int maxDecimalPlaces = 324) { + RAPIDJSON_ASSERT(maxDecimalPlaces >= 1); + Double d(value); + if (d.IsZero()) { + if (d.Sign()) + *buffer++ = '-'; // -0.0, Issue #289 + buffer[0] = '0'; + buffer[1] = '.'; + buffer[2] = '0'; + return &buffer[3]; + } + else { + if (value < 0) { + *buffer++ = '-'; + value = -value; + } + int length, K; + Grisu2(value, buffer, &length, &K); + return Prettify(buffer, length, K, maxDecimalPlaces); + } +} + +#ifdef __GNUC__ +RAPIDJSON_DIAG_POP +#endif + +} // namespace internal +RAPIDJSON_NAMESPACE_END + +#endif // RAPIDJSON_DTOA_ diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/internal/ieee754.h b/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/internal/ieee754.h new file mode 100644 index 0000000000..68c9e96649 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/internal/ieee754.h @@ -0,0 +1,78 @@ +// Tencent is pleased to support the open source community by making RapidJSON available. +// +// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. +// +// Licensed under the MIT License (the "License"); you may not use this file except +// in compliance with the License. You may obtain a copy of the License at +// +// http://opensource.org/licenses/MIT +// +// Unless required by applicable law or agreed to in writing, software distributed +// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +// CONDITIONS OF ANY KIND, either express or implied. See the License for the +// specific language governing permissions and limitations under the License. + +#ifndef RAPIDJSON_IEEE754_ +#define RAPIDJSON_IEEE754_ + +#include "../rapidjson.h" + +RAPIDJSON_NAMESPACE_BEGIN +namespace internal { + +class Double { +public: + Double() {} + Double(double d) : d_(d) {} + Double(uint64_t u) : u_(u) {} + + double Value() const { return d_; } + uint64_t Uint64Value() const { return u_; } + + double NextPositiveDouble() const { + RAPIDJSON_ASSERT(!Sign()); + return Double(u_ + 1).Value(); + } + + bool Sign() const { return (u_ & kSignMask) != 0; } + uint64_t Significand() const { return u_ & kSignificandMask; } + int Exponent() const { return static_cast(((u_ & kExponentMask) >> kSignificandSize) - kExponentBias); } + + bool IsNan() const { return (u_ & kExponentMask) == kExponentMask && Significand() != 0; } + bool IsInf() const { return (u_ & kExponentMask) == kExponentMask && Significand() == 0; } + bool IsNanOrInf() const { return (u_ & kExponentMask) == kExponentMask; } + bool IsNormal() const { return (u_ & kExponentMask) != 0 || Significand() == 0; } + bool IsZero() const { return (u_ & (kExponentMask | kSignificandMask)) == 0; } + + uint64_t IntegerSignificand() const { return IsNormal() ? Significand() | kHiddenBit : Significand(); } + int IntegerExponent() const { return (IsNormal() ? Exponent() : kDenormalExponent) - kSignificandSize; } + uint64_t ToBias() const { return (u_ & kSignMask) ? ~u_ + 1 : u_ | kSignMask; } + + static int EffectiveSignificandSize(int order) { + if (order >= -1021) + return 53; + else if (order <= -1074) + return 0; + else + return order + 1074; + } + +private: + static const int kSignificandSize = 52; + static const int kExponentBias = 0x3FF; + static const int kDenormalExponent = 1 - kExponentBias; + static const uint64_t kSignMask = RAPIDJSON_UINT64_C2(0x80000000, 0x00000000); + static const uint64_t kExponentMask = RAPIDJSON_UINT64_C2(0x7FF00000, 0x00000000); + static const uint64_t kSignificandMask = RAPIDJSON_UINT64_C2(0x000FFFFF, 0xFFFFFFFF); + static const uint64_t kHiddenBit = RAPIDJSON_UINT64_C2(0x00100000, 0x00000000); + + union { + double d_; + uint64_t u_; + }; +}; + +} // namespace internal +RAPIDJSON_NAMESPACE_END + +#endif // RAPIDJSON_IEEE754_ diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/internal/itoa.h b/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/internal/itoa.h new file mode 100644 index 0000000000..9fe8c932ff --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/internal/itoa.h @@ -0,0 +1,308 @@ +// Tencent is pleased to support the open source community by making RapidJSON available. +// +// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. +// +// Licensed under the MIT License (the "License"); you may not use this file except +// in compliance with the License. You may obtain a copy of the License at +// +// http://opensource.org/licenses/MIT +// +// Unless required by applicable law or agreed to in writing, software distributed +// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +// CONDITIONS OF ANY KIND, either express or implied. See the License for the +// specific language governing permissions and limitations under the License. + +#ifndef RAPIDJSON_ITOA_ +#define RAPIDJSON_ITOA_ + +#include "../rapidjson.h" + +RAPIDJSON_NAMESPACE_BEGIN +namespace internal { + +inline const char* GetDigitsLut() { + static const char cDigitsLut[200] = { + '0','0','0','1','0','2','0','3','0','4','0','5','0','6','0','7','0','8','0','9', + '1','0','1','1','1','2','1','3','1','4','1','5','1','6','1','7','1','8','1','9', + '2','0','2','1','2','2','2','3','2','4','2','5','2','6','2','7','2','8','2','9', + '3','0','3','1','3','2','3','3','3','4','3','5','3','6','3','7','3','8','3','9', + '4','0','4','1','4','2','4','3','4','4','4','5','4','6','4','7','4','8','4','9', + '5','0','5','1','5','2','5','3','5','4','5','5','5','6','5','7','5','8','5','9', + '6','0','6','1','6','2','6','3','6','4','6','5','6','6','6','7','6','8','6','9', + '7','0','7','1','7','2','7','3','7','4','7','5','7','6','7','7','7','8','7','9', + '8','0','8','1','8','2','8','3','8','4','8','5','8','6','8','7','8','8','8','9', + '9','0','9','1','9','2','9','3','9','4','9','5','9','6','9','7','9','8','9','9' + }; + return cDigitsLut; +} + +inline char* u32toa(uint32_t value, char* buffer) { + RAPIDJSON_ASSERT(buffer != 0); + + const char* cDigitsLut = GetDigitsLut(); + + if (value < 10000) { + const uint32_t d1 = (value / 100) << 1; + const uint32_t d2 = (value % 100) << 1; + + if (value >= 1000) + *buffer++ = cDigitsLut[d1]; + if (value >= 100) + *buffer++ = cDigitsLut[d1 + 1]; + if (value >= 10) + *buffer++ = cDigitsLut[d2]; + *buffer++ = cDigitsLut[d2 + 1]; + } + else if (value < 100000000) { + // value = bbbbcccc + const uint32_t b = value / 10000; + const uint32_t c = value % 10000; + + const uint32_t d1 = (b / 100) << 1; + const uint32_t d2 = (b % 100) << 1; + + const uint32_t d3 = (c / 100) << 1; + const uint32_t d4 = (c % 100) << 1; + + if (value >= 10000000) + *buffer++ = cDigitsLut[d1]; + if (value >= 1000000) + *buffer++ = cDigitsLut[d1 + 1]; + if (value >= 100000) + *buffer++ = cDigitsLut[d2]; + *buffer++ = cDigitsLut[d2 + 1]; + + *buffer++ = cDigitsLut[d3]; + *buffer++ = cDigitsLut[d3 + 1]; + *buffer++ = cDigitsLut[d4]; + *buffer++ = cDigitsLut[d4 + 1]; + } + else { + // value = aabbbbcccc in decimal + + const uint32_t a = value / 100000000; // 1 to 42 + value %= 100000000; + + if (a >= 10) { + const unsigned i = a << 1; + *buffer++ = cDigitsLut[i]; + *buffer++ = cDigitsLut[i + 1]; + } + else + *buffer++ = static_cast('0' + static_cast(a)); + + const uint32_t b = value / 10000; // 0 to 9999 + const uint32_t c = value % 10000; // 0 to 9999 + + const uint32_t d1 = (b / 100) << 1; + const uint32_t d2 = (b % 100) << 1; + + const uint32_t d3 = (c / 100) << 1; + const uint32_t d4 = (c % 100) << 1; + + *buffer++ = cDigitsLut[d1]; + *buffer++ = cDigitsLut[d1 + 1]; + *buffer++ = cDigitsLut[d2]; + *buffer++ = cDigitsLut[d2 + 1]; + *buffer++ = cDigitsLut[d3]; + *buffer++ = cDigitsLut[d3 + 1]; + *buffer++ = cDigitsLut[d4]; + *buffer++ = cDigitsLut[d4 + 1]; + } + return buffer; +} + +inline char* i32toa(int32_t value, char* buffer) { + RAPIDJSON_ASSERT(buffer != 0); + uint32_t u = static_cast(value); + if (value < 0) { + *buffer++ = '-'; + u = ~u + 1; + } + + return u32toa(u, buffer); +} + +inline char* u64toa(uint64_t value, char* buffer) { + RAPIDJSON_ASSERT(buffer != 0); + const char* cDigitsLut = GetDigitsLut(); + const uint64_t kTen8 = 100000000; + const uint64_t kTen9 = kTen8 * 10; + const uint64_t kTen10 = kTen8 * 100; + const uint64_t kTen11 = kTen8 * 1000; + const uint64_t kTen12 = kTen8 * 10000; + const uint64_t kTen13 = kTen8 * 100000; + const uint64_t kTen14 = kTen8 * 1000000; + const uint64_t kTen15 = kTen8 * 10000000; + const uint64_t kTen16 = kTen8 * kTen8; + + if (value < kTen8) { + uint32_t v = static_cast(value); + if (v < 10000) { + const uint32_t d1 = (v / 100) << 1; + const uint32_t d2 = (v % 100) << 1; + + if (v >= 1000) + *buffer++ = cDigitsLut[d1]; + if (v >= 100) + *buffer++ = cDigitsLut[d1 + 1]; + if (v >= 10) + *buffer++ = cDigitsLut[d2]; + *buffer++ = cDigitsLut[d2 + 1]; + } + else { + // value = bbbbcccc + const uint32_t b = v / 10000; + const uint32_t c = v % 10000; + + const uint32_t d1 = (b / 100) << 1; + const uint32_t d2 = (b % 100) << 1; + + const uint32_t d3 = (c / 100) << 1; + const uint32_t d4 = (c % 100) << 1; + + if (value >= 10000000) + *buffer++ = cDigitsLut[d1]; + if (value >= 1000000) + *buffer++ = cDigitsLut[d1 + 1]; + if (value >= 100000) + *buffer++ = cDigitsLut[d2]; + *buffer++ = cDigitsLut[d2 + 1]; + + *buffer++ = cDigitsLut[d3]; + *buffer++ = cDigitsLut[d3 + 1]; + *buffer++ = cDigitsLut[d4]; + *buffer++ = cDigitsLut[d4 + 1]; + } + } + else if (value < kTen16) { + const uint32_t v0 = static_cast(value / kTen8); + const uint32_t v1 = static_cast(value % kTen8); + + const uint32_t b0 = v0 / 10000; + const uint32_t c0 = v0 % 10000; + + const uint32_t d1 = (b0 / 100) << 1; + const uint32_t d2 = (b0 % 100) << 1; + + const uint32_t d3 = (c0 / 100) << 1; + const uint32_t d4 = (c0 % 100) << 1; + + const uint32_t b1 = v1 / 10000; + const uint32_t c1 = v1 % 10000; + + const uint32_t d5 = (b1 / 100) << 1; + const uint32_t d6 = (b1 % 100) << 1; + + const uint32_t d7 = (c1 / 100) << 1; + const uint32_t d8 = (c1 % 100) << 1; + + if (value >= kTen15) + *buffer++ = cDigitsLut[d1]; + if (value >= kTen14) + *buffer++ = cDigitsLut[d1 + 1]; + if (value >= kTen13) + *buffer++ = cDigitsLut[d2]; + if (value >= kTen12) + *buffer++ = cDigitsLut[d2 + 1]; + if (value >= kTen11) + *buffer++ = cDigitsLut[d3]; + if (value >= kTen10) + *buffer++ = cDigitsLut[d3 + 1]; + if (value >= kTen9) + *buffer++ = cDigitsLut[d4]; + + *buffer++ = cDigitsLut[d4 + 1]; + *buffer++ = cDigitsLut[d5]; + *buffer++ = cDigitsLut[d5 + 1]; + *buffer++ = cDigitsLut[d6]; + *buffer++ = cDigitsLut[d6 + 1]; + *buffer++ = cDigitsLut[d7]; + *buffer++ = cDigitsLut[d7 + 1]; + *buffer++ = cDigitsLut[d8]; + *buffer++ = cDigitsLut[d8 + 1]; + } + else { + const uint32_t a = static_cast(value / kTen16); // 1 to 1844 + value %= kTen16; + + if (a < 10) + *buffer++ = static_cast('0' + static_cast(a)); + else if (a < 100) { + const uint32_t i = a << 1; + *buffer++ = cDigitsLut[i]; + *buffer++ = cDigitsLut[i + 1]; + } + else if (a < 1000) { + *buffer++ = static_cast('0' + static_cast(a / 100)); + + const uint32_t i = (a % 100) << 1; + *buffer++ = cDigitsLut[i]; + *buffer++ = cDigitsLut[i + 1]; + } + else { + const uint32_t i = (a / 100) << 1; + const uint32_t j = (a % 100) << 1; + *buffer++ = cDigitsLut[i]; + *buffer++ = cDigitsLut[i + 1]; + *buffer++ = cDigitsLut[j]; + *buffer++ = cDigitsLut[j + 1]; + } + + const uint32_t v0 = static_cast(value / kTen8); + const uint32_t v1 = static_cast(value % kTen8); + + const uint32_t b0 = v0 / 10000; + const uint32_t c0 = v0 % 10000; + + const uint32_t d1 = (b0 / 100) << 1; + const uint32_t d2 = (b0 % 100) << 1; + + const uint32_t d3 = (c0 / 100) << 1; + const uint32_t d4 = (c0 % 100) << 1; + + const uint32_t b1 = v1 / 10000; + const uint32_t c1 = v1 % 10000; + + const uint32_t d5 = (b1 / 100) << 1; + const uint32_t d6 = (b1 % 100) << 1; + + const uint32_t d7 = (c1 / 100) << 1; + const uint32_t d8 = (c1 % 100) << 1; + + *buffer++ = cDigitsLut[d1]; + *buffer++ = cDigitsLut[d1 + 1]; + *buffer++ = cDigitsLut[d2]; + *buffer++ = cDigitsLut[d2 + 1]; + *buffer++ = cDigitsLut[d3]; + *buffer++ = cDigitsLut[d3 + 1]; + *buffer++ = cDigitsLut[d4]; + *buffer++ = cDigitsLut[d4 + 1]; + *buffer++ = cDigitsLut[d5]; + *buffer++ = cDigitsLut[d5 + 1]; + *buffer++ = cDigitsLut[d6]; + *buffer++ = cDigitsLut[d6 + 1]; + *buffer++ = cDigitsLut[d7]; + *buffer++ = cDigitsLut[d7 + 1]; + *buffer++ = cDigitsLut[d8]; + *buffer++ = cDigitsLut[d8 + 1]; + } + + return buffer; +} + +inline char* i64toa(int64_t value, char* buffer) { + RAPIDJSON_ASSERT(buffer != 0); + uint64_t u = static_cast(value); + if (value < 0) { + *buffer++ = '-'; + u = ~u + 1; + } + + return u64toa(u, buffer); +} + +} // namespace internal +RAPIDJSON_NAMESPACE_END + +#endif // RAPIDJSON_ITOA_ diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/internal/meta.h b/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/internal/meta.h new file mode 100644 index 0000000000..27092dc0d6 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/internal/meta.h @@ -0,0 +1,186 @@ +// Tencent is pleased to support the open source community by making RapidJSON available. +// +// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. +// +// Licensed under the MIT License (the "License"); you may not use this file except +// in compliance with the License. You may obtain a copy of the License at +// +// http://opensource.org/licenses/MIT +// +// Unless required by applicable law or agreed to in writing, software distributed +// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +// CONDITIONS OF ANY KIND, either express or implied. See the License for the +// specific language governing permissions and limitations under the License. + +#ifndef RAPIDJSON_INTERNAL_META_H_ +#define RAPIDJSON_INTERNAL_META_H_ + +#include "../rapidjson.h" + +#ifdef __GNUC__ +RAPIDJSON_DIAG_PUSH +RAPIDJSON_DIAG_OFF(effc++) +#endif + +#if defined(_MSC_VER) && !defined(__clang__) +RAPIDJSON_DIAG_PUSH +RAPIDJSON_DIAG_OFF(6334) +#endif + +#if RAPIDJSON_HAS_CXX11_TYPETRAITS +#include +#endif + +//@cond RAPIDJSON_INTERNAL +RAPIDJSON_NAMESPACE_BEGIN +namespace internal { + +// Helper to wrap/convert arbitrary types to void, useful for arbitrary type matching +template struct Void { typedef void Type; }; + +/////////////////////////////////////////////////////////////////////////////// +// BoolType, TrueType, FalseType +// +template struct BoolType { + static const bool Value = Cond; + typedef BoolType Type; +}; +typedef BoolType TrueType; +typedef BoolType FalseType; + + +/////////////////////////////////////////////////////////////////////////////// +// SelectIf, BoolExpr, NotExpr, AndExpr, OrExpr +// + +template struct SelectIfImpl { template struct Apply { typedef T1 Type; }; }; +template <> struct SelectIfImpl { template struct Apply { typedef T2 Type; }; }; +template struct SelectIfCond : SelectIfImpl::template Apply {}; +template struct SelectIf : SelectIfCond {}; + +template struct AndExprCond : FalseType {}; +template <> struct AndExprCond : TrueType {}; +template struct OrExprCond : TrueType {}; +template <> struct OrExprCond : FalseType {}; + +template struct BoolExpr : SelectIf::Type {}; +template struct NotExpr : SelectIf::Type {}; +template struct AndExpr : AndExprCond::Type {}; +template struct OrExpr : OrExprCond::Type {}; + + +/////////////////////////////////////////////////////////////////////////////// +// AddConst, MaybeAddConst, RemoveConst +template struct AddConst { typedef const T Type; }; +template struct MaybeAddConst : SelectIfCond {}; +template struct RemoveConst { typedef T Type; }; +template struct RemoveConst { typedef T Type; }; + + +/////////////////////////////////////////////////////////////////////////////// +// IsSame, IsConst, IsMoreConst, IsPointer +// +template struct IsSame : FalseType {}; +template struct IsSame : TrueType {}; + +template struct IsConst : FalseType {}; +template struct IsConst : TrueType {}; + +template +struct IsMoreConst + : AndExpr::Type, typename RemoveConst::Type>, + BoolType::Value >= IsConst::Value> >::Type {}; + +template struct IsPointer : FalseType {}; +template struct IsPointer : TrueType {}; + +/////////////////////////////////////////////////////////////////////////////// +// IsBaseOf +// +#if RAPIDJSON_HAS_CXX11_TYPETRAITS + +template struct IsBaseOf + : BoolType< ::std::is_base_of::value> {}; + +#else // simplified version adopted from Boost + +template struct IsBaseOfImpl { + RAPIDJSON_STATIC_ASSERT(sizeof(B) != 0); + RAPIDJSON_STATIC_ASSERT(sizeof(D) != 0); + + typedef char (&Yes)[1]; + typedef char (&No) [2]; + + template + static Yes Check(const D*, T); + static No Check(const B*, int); + + struct Host { + operator const B*() const; + operator const D*(); + }; + + enum { Value = (sizeof(Check(Host(), 0)) == sizeof(Yes)) }; +}; + +template struct IsBaseOf + : OrExpr, BoolExpr > >::Type {}; + +#endif // RAPIDJSON_HAS_CXX11_TYPETRAITS + + +////////////////////////////////////////////////////////////////////////// +// EnableIf / DisableIf +// +template struct EnableIfCond { typedef T Type; }; +template struct EnableIfCond { /* empty */ }; + +template struct DisableIfCond { typedef T Type; }; +template struct DisableIfCond { /* empty */ }; + +template +struct EnableIf : EnableIfCond {}; + +template +struct DisableIf : DisableIfCond {}; + +// SFINAE helpers +struct SfinaeTag {}; +template struct RemoveSfinaeTag; +template struct RemoveSfinaeTag { typedef T Type; }; + +#define RAPIDJSON_REMOVEFPTR_(type) \ + typename ::RAPIDJSON_NAMESPACE::internal::RemoveSfinaeTag \ + < ::RAPIDJSON_NAMESPACE::internal::SfinaeTag&(*) type>::Type + +#define RAPIDJSON_ENABLEIF(cond) \ + typename ::RAPIDJSON_NAMESPACE::internal::EnableIf \ + ::Type * = NULL + +#define RAPIDJSON_DISABLEIF(cond) \ + typename ::RAPIDJSON_NAMESPACE::internal::DisableIf \ + ::Type * = NULL + +#define RAPIDJSON_ENABLEIF_RETURN(cond,returntype) \ + typename ::RAPIDJSON_NAMESPACE::internal::EnableIf \ + ::Type + +#define RAPIDJSON_DISABLEIF_RETURN(cond,returntype) \ + typename ::RAPIDJSON_NAMESPACE::internal::DisableIf \ + ::Type + +} // namespace internal +RAPIDJSON_NAMESPACE_END +//@endcond + +#if defined(_MSC_VER) && !defined(__clang__) +RAPIDJSON_DIAG_POP +#endif + +#ifdef __GNUC__ +RAPIDJSON_DIAG_POP +#endif + +#endif // RAPIDJSON_INTERNAL_META_H_ diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/internal/pow10.h b/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/internal/pow10.h new file mode 100644 index 0000000000..eae1a43ed1 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/internal/pow10.h @@ -0,0 +1,55 @@ +// Tencent is pleased to support the open source community by making RapidJSON available. +// +// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. +// +// Licensed under the MIT License (the "License"); you may not use this file except +// in compliance with the License. You may obtain a copy of the License at +// +// http://opensource.org/licenses/MIT +// +// Unless required by applicable law or agreed to in writing, software distributed +// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +// CONDITIONS OF ANY KIND, either express or implied. See the License for the +// specific language governing permissions and limitations under the License. + +#ifndef RAPIDJSON_POW10_ +#define RAPIDJSON_POW10_ + +#include "../rapidjson.h" + +RAPIDJSON_NAMESPACE_BEGIN +namespace internal { + +//! Computes integer powers of 10 in double (10.0^n). +/*! This function uses lookup table for fast and accurate results. + \param n non-negative exponent. Must <= 308. + \return 10.0^n +*/ +inline double Pow10(int n) { + static const double e[] = { // 1e-0...1e308: 309 * 8 bytes = 2472 bytes + 1e+0, + 1e+1, 1e+2, 1e+3, 1e+4, 1e+5, 1e+6, 1e+7, 1e+8, 1e+9, 1e+10, 1e+11, 1e+12, 1e+13, 1e+14, 1e+15, 1e+16, 1e+17, 1e+18, 1e+19, 1e+20, + 1e+21, 1e+22, 1e+23, 1e+24, 1e+25, 1e+26, 1e+27, 1e+28, 1e+29, 1e+30, 1e+31, 1e+32, 1e+33, 1e+34, 1e+35, 1e+36, 1e+37, 1e+38, 1e+39, 1e+40, + 1e+41, 1e+42, 1e+43, 1e+44, 1e+45, 1e+46, 1e+47, 1e+48, 1e+49, 1e+50, 1e+51, 1e+52, 1e+53, 1e+54, 1e+55, 1e+56, 1e+57, 1e+58, 1e+59, 1e+60, + 1e+61, 1e+62, 1e+63, 1e+64, 1e+65, 1e+66, 1e+67, 1e+68, 1e+69, 1e+70, 1e+71, 1e+72, 1e+73, 1e+74, 1e+75, 1e+76, 1e+77, 1e+78, 1e+79, 1e+80, + 1e+81, 1e+82, 1e+83, 1e+84, 1e+85, 1e+86, 1e+87, 1e+88, 1e+89, 1e+90, 1e+91, 1e+92, 1e+93, 1e+94, 1e+95, 1e+96, 1e+97, 1e+98, 1e+99, 1e+100, + 1e+101,1e+102,1e+103,1e+104,1e+105,1e+106,1e+107,1e+108,1e+109,1e+110,1e+111,1e+112,1e+113,1e+114,1e+115,1e+116,1e+117,1e+118,1e+119,1e+120, + 1e+121,1e+122,1e+123,1e+124,1e+125,1e+126,1e+127,1e+128,1e+129,1e+130,1e+131,1e+132,1e+133,1e+134,1e+135,1e+136,1e+137,1e+138,1e+139,1e+140, + 1e+141,1e+142,1e+143,1e+144,1e+145,1e+146,1e+147,1e+148,1e+149,1e+150,1e+151,1e+152,1e+153,1e+154,1e+155,1e+156,1e+157,1e+158,1e+159,1e+160, + 1e+161,1e+162,1e+163,1e+164,1e+165,1e+166,1e+167,1e+168,1e+169,1e+170,1e+171,1e+172,1e+173,1e+174,1e+175,1e+176,1e+177,1e+178,1e+179,1e+180, + 1e+181,1e+182,1e+183,1e+184,1e+185,1e+186,1e+187,1e+188,1e+189,1e+190,1e+191,1e+192,1e+193,1e+194,1e+195,1e+196,1e+197,1e+198,1e+199,1e+200, + 1e+201,1e+202,1e+203,1e+204,1e+205,1e+206,1e+207,1e+208,1e+209,1e+210,1e+211,1e+212,1e+213,1e+214,1e+215,1e+216,1e+217,1e+218,1e+219,1e+220, + 1e+221,1e+222,1e+223,1e+224,1e+225,1e+226,1e+227,1e+228,1e+229,1e+230,1e+231,1e+232,1e+233,1e+234,1e+235,1e+236,1e+237,1e+238,1e+239,1e+240, + 1e+241,1e+242,1e+243,1e+244,1e+245,1e+246,1e+247,1e+248,1e+249,1e+250,1e+251,1e+252,1e+253,1e+254,1e+255,1e+256,1e+257,1e+258,1e+259,1e+260, + 1e+261,1e+262,1e+263,1e+264,1e+265,1e+266,1e+267,1e+268,1e+269,1e+270,1e+271,1e+272,1e+273,1e+274,1e+275,1e+276,1e+277,1e+278,1e+279,1e+280, + 1e+281,1e+282,1e+283,1e+284,1e+285,1e+286,1e+287,1e+288,1e+289,1e+290,1e+291,1e+292,1e+293,1e+294,1e+295,1e+296,1e+297,1e+298,1e+299,1e+300, + 1e+301,1e+302,1e+303,1e+304,1e+305,1e+306,1e+307,1e+308 + }; + RAPIDJSON_ASSERT(n >= 0 && n <= 308); + return e[n]; +} + +} // namespace internal +RAPIDJSON_NAMESPACE_END + +#endif // RAPIDJSON_POW10_ diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/internal/regex.h b/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/internal/regex.h new file mode 100644 index 0000000000..6446c403af --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/internal/regex.h @@ -0,0 +1,739 @@ +// Tencent is pleased to support the open source community by making RapidJSON available. +// +// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. +// +// Licensed under the MIT License (the "License"); you may not use this file except +// in compliance with the License. You may obtain a copy of the License at +// +// http://opensource.org/licenses/MIT +// +// Unless required by applicable law or agreed to in writing, software distributed +// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +// CONDITIONS OF ANY KIND, either express or implied. See the License for the +// specific language governing permissions and limitations under the License. + +#ifndef RAPIDJSON_INTERNAL_REGEX_H_ +#define RAPIDJSON_INTERNAL_REGEX_H_ + +#include "../allocators.h" +#include "../stream.h" +#include "stack.h" + +#ifdef __clang__ +RAPIDJSON_DIAG_PUSH +RAPIDJSON_DIAG_OFF(padded) +RAPIDJSON_DIAG_OFF(switch-enum) +#elif defined(_MSC_VER) +RAPIDJSON_DIAG_PUSH +RAPIDJSON_DIAG_OFF(4512) // assignment operator could not be generated +#endif + +#ifdef __GNUC__ +RAPIDJSON_DIAG_PUSH +RAPIDJSON_DIAG_OFF(effc++) +#endif + +#ifndef RAPIDJSON_REGEX_VERBOSE +#define RAPIDJSON_REGEX_VERBOSE 0 +#endif + +RAPIDJSON_NAMESPACE_BEGIN +namespace internal { + +/////////////////////////////////////////////////////////////////////////////// +// DecodedStream + +template +class DecodedStream { +public: + DecodedStream(SourceStream& ss) : ss_(ss), codepoint_() { Decode(); } + unsigned Peek() { return codepoint_; } + unsigned Take() { + unsigned c = codepoint_; + if (c) // No further decoding when '\0' + Decode(); + return c; + } + +private: + void Decode() { + if (!Encoding::Decode(ss_, &codepoint_)) + codepoint_ = 0; + } + + SourceStream& ss_; + unsigned codepoint_; +}; + +/////////////////////////////////////////////////////////////////////////////// +// GenericRegex + +static const SizeType kRegexInvalidState = ~SizeType(0); //!< Represents an invalid index in GenericRegex::State::out, out1 +static const SizeType kRegexInvalidRange = ~SizeType(0); + +template +class GenericRegexSearch; + +//! Regular expression engine with subset of ECMAscript grammar. +/*! + Supported regular expression syntax: + - \c ab Concatenation + - \c a|b Alternation + - \c a? Zero or one + - \c a* Zero or more + - \c a+ One or more + - \c a{3} Exactly 3 times + - \c a{3,} At least 3 times + - \c a{3,5} 3 to 5 times + - \c (ab) Grouping + - \c ^a At the beginning + - \c a$ At the end + - \c . Any character + - \c [abc] Character classes + - \c [a-c] Character class range + - \c [a-z0-9_] Character class combination + - \c [^abc] Negated character classes + - \c [^a-c] Negated character class range + - \c [\b] Backspace (U+0008) + - \c \\| \\\\ ... Escape characters + - \c \\f Form feed (U+000C) + - \c \\n Line feed (U+000A) + - \c \\r Carriage return (U+000D) + - \c \\t Tab (U+0009) + - \c \\v Vertical tab (U+000B) + + \note This is a Thompson NFA engine, implemented with reference to + Cox, Russ. "Regular Expression Matching Can Be Simple And Fast (but is slow in Java, Perl, PHP, Python, Ruby,...).", + https://swtch.com/~rsc/regexp/regexp1.html +*/ +template +class GenericRegex { +public: + typedef Encoding EncodingType; + typedef typename Encoding::Ch Ch; + template friend class GenericRegexSearch; + + GenericRegex(const Ch* source, Allocator* allocator = 0) : + ownAllocator_(allocator ? 0 : RAPIDJSON_NEW(Allocator)()), allocator_(allocator ? allocator : ownAllocator_), + states_(allocator_, 256), ranges_(allocator_, 256), root_(kRegexInvalidState), stateCount_(), rangeCount_(), + anchorBegin_(), anchorEnd_() + { + GenericStringStream ss(source); + DecodedStream, Encoding> ds(ss); + Parse(ds); + } + + ~GenericRegex() + { + RAPIDJSON_DELETE(ownAllocator_); + } + + bool IsValid() const { + return root_ != kRegexInvalidState; + } + +private: + enum Operator { + kZeroOrOne, + kZeroOrMore, + kOneOrMore, + kConcatenation, + kAlternation, + kLeftParenthesis + }; + + static const unsigned kAnyCharacterClass = 0xFFFFFFFF; //!< For '.' + static const unsigned kRangeCharacterClass = 0xFFFFFFFE; + static const unsigned kRangeNegationFlag = 0x80000000; + + struct Range { + unsigned start; // + unsigned end; + SizeType next; + }; + + struct State { + SizeType out; //!< Equals to kInvalid for matching state + SizeType out1; //!< Equals to non-kInvalid for split + SizeType rangeStart; + unsigned codepoint; + }; + + struct Frag { + Frag(SizeType s, SizeType o, SizeType m) : start(s), out(o), minIndex(m) {} + SizeType start; + SizeType out; //!< link-list of all output states + SizeType minIndex; + }; + + State& GetState(SizeType index) { + RAPIDJSON_ASSERT(index < stateCount_); + return states_.template Bottom()[index]; + } + + const State& GetState(SizeType index) const { + RAPIDJSON_ASSERT(index < stateCount_); + return states_.template Bottom()[index]; + } + + Range& GetRange(SizeType index) { + RAPIDJSON_ASSERT(index < rangeCount_); + return ranges_.template Bottom()[index]; + } + + const Range& GetRange(SizeType index) const { + RAPIDJSON_ASSERT(index < rangeCount_); + return ranges_.template Bottom()[index]; + } + + template + void Parse(DecodedStream& ds) { + Stack operandStack(allocator_, 256); // Frag + Stack operatorStack(allocator_, 256); // Operator + Stack atomCountStack(allocator_, 256); // unsigned (Atom per parenthesis) + + *atomCountStack.template Push() = 0; + + unsigned codepoint; + while (ds.Peek() != 0) { + switch (codepoint = ds.Take()) { + case '^': + anchorBegin_ = true; + break; + + case '$': + anchorEnd_ = true; + break; + + case '|': + while (!operatorStack.Empty() && *operatorStack.template Top() < kAlternation) + if (!Eval(operandStack, *operatorStack.template Pop(1))) + return; + *operatorStack.template Push() = kAlternation; + *atomCountStack.template Top() = 0; + break; + + case '(': + *operatorStack.template Push() = kLeftParenthesis; + *atomCountStack.template Push() = 0; + break; + + case ')': + while (!operatorStack.Empty() && *operatorStack.template Top() != kLeftParenthesis) + if (!Eval(operandStack, *operatorStack.template Pop(1))) + return; + if (operatorStack.Empty()) + return; + operatorStack.template Pop(1); + atomCountStack.template Pop(1); + ImplicitConcatenation(atomCountStack, operatorStack); + break; + + case '?': + if (!Eval(operandStack, kZeroOrOne)) + return; + break; + + case '*': + if (!Eval(operandStack, kZeroOrMore)) + return; + break; + + case '+': + if (!Eval(operandStack, kOneOrMore)) + return; + break; + + case '{': + { + unsigned n, m; + if (!ParseUnsigned(ds, &n)) + return; + + if (ds.Peek() == ',') { + ds.Take(); + if (ds.Peek() == '}') + m = kInfinityQuantifier; + else if (!ParseUnsigned(ds, &m) || m < n) + return; + } + else + m = n; + + if (!EvalQuantifier(operandStack, n, m) || ds.Peek() != '}') + return; + ds.Take(); + } + break; + + case '.': + PushOperand(operandStack, kAnyCharacterClass); + ImplicitConcatenation(atomCountStack, operatorStack); + break; + + case '[': + { + SizeType range; + if (!ParseRange(ds, &range)) + return; + SizeType s = NewState(kRegexInvalidState, kRegexInvalidState, kRangeCharacterClass); + GetState(s).rangeStart = range; + *operandStack.template Push() = Frag(s, s, s); + } + ImplicitConcatenation(atomCountStack, operatorStack); + break; + + case '\\': // Escape character + if (!CharacterEscape(ds, &codepoint)) + return; // Unsupported escape character + // fall through to default + RAPIDJSON_DELIBERATE_FALLTHROUGH; + + default: // Pattern character + PushOperand(operandStack, codepoint); + ImplicitConcatenation(atomCountStack, operatorStack); + } + } + + while (!operatorStack.Empty()) + if (!Eval(operandStack, *operatorStack.template Pop(1))) + return; + + // Link the operand to matching state. + if (operandStack.GetSize() == sizeof(Frag)) { + Frag* e = operandStack.template Pop(1); + Patch(e->out, NewState(kRegexInvalidState, kRegexInvalidState, 0)); + root_ = e->start; + +#if RAPIDJSON_REGEX_VERBOSE + printf("root: %d\n", root_); + for (SizeType i = 0; i < stateCount_ ; i++) { + State& s = GetState(i); + printf("[%2d] out: %2d out1: %2d c: '%c'\n", i, s.out, s.out1, (char)s.codepoint); + } + printf("\n"); +#endif + } + } + + SizeType NewState(SizeType out, SizeType out1, unsigned codepoint) { + State* s = states_.template Push(); + s->out = out; + s->out1 = out1; + s->codepoint = codepoint; + s->rangeStart = kRegexInvalidRange; + return stateCount_++; + } + + void PushOperand(Stack& operandStack, unsigned codepoint) { + SizeType s = NewState(kRegexInvalidState, kRegexInvalidState, codepoint); + *operandStack.template Push() = Frag(s, s, s); + } + + void ImplicitConcatenation(Stack& atomCountStack, Stack& operatorStack) { + if (*atomCountStack.template Top()) + *operatorStack.template Push() = kConcatenation; + (*atomCountStack.template Top())++; + } + + SizeType Append(SizeType l1, SizeType l2) { + SizeType old = l1; + while (GetState(l1).out != kRegexInvalidState) + l1 = GetState(l1).out; + GetState(l1).out = l2; + return old; + } + + void Patch(SizeType l, SizeType s) { + for (SizeType next; l != kRegexInvalidState; l = next) { + next = GetState(l).out; + GetState(l).out = s; + } + } + + bool Eval(Stack& operandStack, Operator op) { + switch (op) { + case kConcatenation: + RAPIDJSON_ASSERT(operandStack.GetSize() >= sizeof(Frag) * 2); + { + Frag e2 = *operandStack.template Pop(1); + Frag e1 = *operandStack.template Pop(1); + Patch(e1.out, e2.start); + *operandStack.template Push() = Frag(e1.start, e2.out, Min(e1.minIndex, e2.minIndex)); + } + return true; + + case kAlternation: + if (operandStack.GetSize() >= sizeof(Frag) * 2) { + Frag e2 = *operandStack.template Pop(1); + Frag e1 = *operandStack.template Pop(1); + SizeType s = NewState(e1.start, e2.start, 0); + *operandStack.template Push() = Frag(s, Append(e1.out, e2.out), Min(e1.minIndex, e2.minIndex)); + return true; + } + return false; + + case kZeroOrOne: + if (operandStack.GetSize() >= sizeof(Frag)) { + Frag e = *operandStack.template Pop(1); + SizeType s = NewState(kRegexInvalidState, e.start, 0); + *operandStack.template Push() = Frag(s, Append(e.out, s), e.minIndex); + return true; + } + return false; + + case kZeroOrMore: + if (operandStack.GetSize() >= sizeof(Frag)) { + Frag e = *operandStack.template Pop(1); + SizeType s = NewState(kRegexInvalidState, e.start, 0); + Patch(e.out, s); + *operandStack.template Push() = Frag(s, s, e.minIndex); + return true; + } + return false; + + case kOneOrMore: + if (operandStack.GetSize() >= sizeof(Frag)) { + Frag e = *operandStack.template Pop(1); + SizeType s = NewState(kRegexInvalidState, e.start, 0); + Patch(e.out, s); + *operandStack.template Push() = Frag(e.start, s, e.minIndex); + return true; + } + return false; + + default: + // syntax error (e.g. unclosed kLeftParenthesis) + return false; + } + } + + bool EvalQuantifier(Stack& operandStack, unsigned n, unsigned m) { + RAPIDJSON_ASSERT(n <= m); + RAPIDJSON_ASSERT(operandStack.GetSize() >= sizeof(Frag)); + + if (n == 0) { + if (m == 0) // a{0} not support + return false; + else if (m == kInfinityQuantifier) + Eval(operandStack, kZeroOrMore); // a{0,} -> a* + else { + Eval(operandStack, kZeroOrOne); // a{0,5} -> a? + for (unsigned i = 0; i < m - 1; i++) + CloneTopOperand(operandStack); // a{0,5} -> a? a? a? a? a? + for (unsigned i = 0; i < m - 1; i++) + Eval(operandStack, kConcatenation); // a{0,5} -> a?a?a?a?a? + } + return true; + } + + for (unsigned i = 0; i < n - 1; i++) // a{3} -> a a a + CloneTopOperand(operandStack); + + if (m == kInfinityQuantifier) + Eval(operandStack, kOneOrMore); // a{3,} -> a a a+ + else if (m > n) { + CloneTopOperand(operandStack); // a{3,5} -> a a a a + Eval(operandStack, kZeroOrOne); // a{3,5} -> a a a a? + for (unsigned i = n; i < m - 1; i++) + CloneTopOperand(operandStack); // a{3,5} -> a a a a? a? + for (unsigned i = n; i < m; i++) + Eval(operandStack, kConcatenation); // a{3,5} -> a a aa?a? + } + + for (unsigned i = 0; i < n - 1; i++) + Eval(operandStack, kConcatenation); // a{3} -> aaa, a{3,} -> aaa+, a{3.5} -> aaaa?a? + + return true; + } + + static SizeType Min(SizeType a, SizeType b) { return a < b ? a : b; } + + void CloneTopOperand(Stack& operandStack) { + const Frag src = *operandStack.template Top(); // Copy constructor to prevent invalidation + SizeType count = stateCount_ - src.minIndex; // Assumes top operand contains states in [src->minIndex, stateCount_) + State* s = states_.template Push(count); + memcpy(s, &GetState(src.minIndex), count * sizeof(State)); + for (SizeType j = 0; j < count; j++) { + if (s[j].out != kRegexInvalidState) + s[j].out += count; + if (s[j].out1 != kRegexInvalidState) + s[j].out1 += count; + } + *operandStack.template Push() = Frag(src.start + count, src.out + count, src.minIndex + count); + stateCount_ += count; + } + + template + bool ParseUnsigned(DecodedStream& ds, unsigned* u) { + unsigned r = 0; + if (ds.Peek() < '0' || ds.Peek() > '9') + return false; + while (ds.Peek() >= '0' && ds.Peek() <= '9') { + if (r >= 429496729 && ds.Peek() > '5') // 2^32 - 1 = 4294967295 + return false; // overflow + r = r * 10 + (ds.Take() - '0'); + } + *u = r; + return true; + } + + template + bool ParseRange(DecodedStream& ds, SizeType* range) { + bool isBegin = true; + bool negate = false; + int step = 0; + SizeType start = kRegexInvalidRange; + SizeType current = kRegexInvalidRange; + unsigned codepoint; + while ((codepoint = ds.Take()) != 0) { + if (isBegin) { + isBegin = false; + if (codepoint == '^') { + negate = true; + continue; + } + } + + switch (codepoint) { + case ']': + if (start == kRegexInvalidRange) + return false; // Error: nothing inside [] + if (step == 2) { // Add trailing '-' + SizeType r = NewRange('-'); + RAPIDJSON_ASSERT(current != kRegexInvalidRange); + GetRange(current).next = r; + } + if (negate) + GetRange(start).start |= kRangeNegationFlag; + *range = start; + return true; + + case '\\': + if (ds.Peek() == 'b') { + ds.Take(); + codepoint = 0x0008; // Escape backspace character + } + else if (!CharacterEscape(ds, &codepoint)) + return false; + // fall through to default + RAPIDJSON_DELIBERATE_FALLTHROUGH; + + default: + switch (step) { + case 1: + if (codepoint == '-') { + step++; + break; + } + // fall through to step 0 for other characters + RAPIDJSON_DELIBERATE_FALLTHROUGH; + + case 0: + { + SizeType r = NewRange(codepoint); + if (current != kRegexInvalidRange) + GetRange(current).next = r; + if (start == kRegexInvalidRange) + start = r; + current = r; + } + step = 1; + break; + + default: + RAPIDJSON_ASSERT(step == 2); + GetRange(current).end = codepoint; + step = 0; + } + } + } + return false; + } + + SizeType NewRange(unsigned codepoint) { + Range* r = ranges_.template Push(); + r->start = r->end = codepoint; + r->next = kRegexInvalidRange; + return rangeCount_++; + } + + template + bool CharacterEscape(DecodedStream& ds, unsigned* escapedCodepoint) { + unsigned codepoint; + switch (codepoint = ds.Take()) { + case '^': + case '$': + case '|': + case '(': + case ')': + case '?': + case '*': + case '+': + case '.': + case '[': + case ']': + case '{': + case '}': + case '\\': + *escapedCodepoint = codepoint; return true; + case 'f': *escapedCodepoint = 0x000C; return true; + case 'n': *escapedCodepoint = 0x000A; return true; + case 'r': *escapedCodepoint = 0x000D; return true; + case 't': *escapedCodepoint = 0x0009; return true; + case 'v': *escapedCodepoint = 0x000B; return true; + default: + return false; // Unsupported escape character + } + } + + Allocator* ownAllocator_; + Allocator* allocator_; + Stack states_; + Stack ranges_; + SizeType root_; + SizeType stateCount_; + SizeType rangeCount_; + + static const unsigned kInfinityQuantifier = ~0u; + + // For SearchWithAnchoring() + bool anchorBegin_; + bool anchorEnd_; +}; + +template +class GenericRegexSearch { +public: + typedef typename RegexType::EncodingType Encoding; + typedef typename Encoding::Ch Ch; + + GenericRegexSearch(const RegexType& regex, Allocator* allocator = 0) : + regex_(regex), allocator_(allocator), ownAllocator_(0), + state0_(allocator, 0), state1_(allocator, 0), stateSet_() + { + RAPIDJSON_ASSERT(regex_.IsValid()); + if (!allocator_) + ownAllocator_ = allocator_ = RAPIDJSON_NEW(Allocator)(); + stateSet_ = static_cast(allocator_->Malloc(GetStateSetSize())); + state0_.template Reserve(regex_.stateCount_); + state1_.template Reserve(regex_.stateCount_); + } + + ~GenericRegexSearch() { + Allocator::Free(stateSet_); + RAPIDJSON_DELETE(ownAllocator_); + } + + template + bool Match(InputStream& is) { + return SearchWithAnchoring(is, true, true); + } + + bool Match(const Ch* s) { + GenericStringStream is(s); + return Match(is); + } + + template + bool Search(InputStream& is) { + return SearchWithAnchoring(is, regex_.anchorBegin_, regex_.anchorEnd_); + } + + bool Search(const Ch* s) { + GenericStringStream is(s); + return Search(is); + } + +private: + typedef typename RegexType::State State; + typedef typename RegexType::Range Range; + + template + bool SearchWithAnchoring(InputStream& is, bool anchorBegin, bool anchorEnd) { + DecodedStream ds(is); + + state0_.Clear(); + Stack *current = &state0_, *next = &state1_; + const size_t stateSetSize = GetStateSetSize(); + std::memset(stateSet_, 0, stateSetSize); + + bool matched = AddState(*current, regex_.root_); + unsigned codepoint; + while (!current->Empty() && (codepoint = ds.Take()) != 0) { + std::memset(stateSet_, 0, stateSetSize); + next->Clear(); + matched = false; + for (const SizeType* s = current->template Bottom(); s != current->template End(); ++s) { + const State& sr = regex_.GetState(*s); + if (sr.codepoint == codepoint || + sr.codepoint == RegexType::kAnyCharacterClass || + (sr.codepoint == RegexType::kRangeCharacterClass && MatchRange(sr.rangeStart, codepoint))) + { + matched = AddState(*next, sr.out) || matched; + if (!anchorEnd && matched) + return true; + } + if (!anchorBegin) + AddState(*next, regex_.root_); + } + internal::Swap(current, next); + } + + return matched; + } + + size_t GetStateSetSize() const { + return (regex_.stateCount_ + 31) / 32 * 4; + } + + // Return whether the added states is a match state + bool AddState(Stack& l, SizeType index) { + RAPIDJSON_ASSERT(index != kRegexInvalidState); + + const State& s = regex_.GetState(index); + if (s.out1 != kRegexInvalidState) { // Split + bool matched = AddState(l, s.out); + return AddState(l, s.out1) || matched; + } + else if (!(stateSet_[index >> 5] & (1u << (index & 31)))) { + stateSet_[index >> 5] |= (1u << (index & 31)); + *l.template PushUnsafe() = index; + } + return s.out == kRegexInvalidState; // by using PushUnsafe() above, we can ensure s is not validated due to reallocation. + } + + bool MatchRange(SizeType rangeIndex, unsigned codepoint) const { + bool yes = (regex_.GetRange(rangeIndex).start & RegexType::kRangeNegationFlag) == 0; + while (rangeIndex != kRegexInvalidRange) { + const Range& r = regex_.GetRange(rangeIndex); + if (codepoint >= (r.start & ~RegexType::kRangeNegationFlag) && codepoint <= r.end) + return yes; + rangeIndex = r.next; + } + return !yes; + } + + const RegexType& regex_; + Allocator* allocator_; + Allocator* ownAllocator_; + Stack state0_; + Stack state1_; + uint32_t* stateSet_; +}; + +typedef GenericRegex > Regex; +typedef GenericRegexSearch RegexSearch; + +} // namespace internal +RAPIDJSON_NAMESPACE_END + +#ifdef __GNUC__ +RAPIDJSON_DIAG_POP +#endif + +#if defined(__clang__) || defined(_MSC_VER) +RAPIDJSON_DIAG_POP +#endif + +#endif // RAPIDJSON_INTERNAL_REGEX_H_ diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/internal/stack.h b/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/internal/stack.h new file mode 100644 index 0000000000..73abd706e9 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/internal/stack.h @@ -0,0 +1,232 @@ +// Tencent is pleased to support the open source community by making RapidJSON available. +// +// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. +// +// Licensed under the MIT License (the "License"); you may not use this file except +// in compliance with the License. You may obtain a copy of the License at +// +// http://opensource.org/licenses/MIT +// +// Unless required by applicable law or agreed to in writing, software distributed +// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +// CONDITIONS OF ANY KIND, either express or implied. See the License for the +// specific language governing permissions and limitations under the License. + +#ifndef RAPIDJSON_INTERNAL_STACK_H_ +#define RAPIDJSON_INTERNAL_STACK_H_ + +#include "../allocators.h" +#include "swap.h" +#include + +#if defined(__clang__) +RAPIDJSON_DIAG_PUSH +RAPIDJSON_DIAG_OFF(c++98-compat) +#endif + +RAPIDJSON_NAMESPACE_BEGIN +namespace internal { + +/////////////////////////////////////////////////////////////////////////////// +// Stack + +//! A type-unsafe stack for storing different types of data. +/*! \tparam Allocator Allocator for allocating stack memory. +*/ +template +class Stack { +public: + // Optimization note: Do not allocate memory for stack_ in constructor. + // Do it lazily when first Push() -> Expand() -> Resize(). + Stack(Allocator* allocator, size_t stackCapacity) : allocator_(allocator), ownAllocator_(0), stack_(0), stackTop_(0), stackEnd_(0), initialCapacity_(stackCapacity) { + } + +#if RAPIDJSON_HAS_CXX11_RVALUE_REFS + Stack(Stack&& rhs) + : allocator_(rhs.allocator_), + ownAllocator_(rhs.ownAllocator_), + stack_(rhs.stack_), + stackTop_(rhs.stackTop_), + stackEnd_(rhs.stackEnd_), + initialCapacity_(rhs.initialCapacity_) + { + rhs.allocator_ = 0; + rhs.ownAllocator_ = 0; + rhs.stack_ = 0; + rhs.stackTop_ = 0; + rhs.stackEnd_ = 0; + rhs.initialCapacity_ = 0; + } +#endif + + ~Stack() { + Destroy(); + } + +#if RAPIDJSON_HAS_CXX11_RVALUE_REFS + Stack& operator=(Stack&& rhs) { + if (&rhs != this) + { + Destroy(); + + allocator_ = rhs.allocator_; + ownAllocator_ = rhs.ownAllocator_; + stack_ = rhs.stack_; + stackTop_ = rhs.stackTop_; + stackEnd_ = rhs.stackEnd_; + initialCapacity_ = rhs.initialCapacity_; + + rhs.allocator_ = 0; + rhs.ownAllocator_ = 0; + rhs.stack_ = 0; + rhs.stackTop_ = 0; + rhs.stackEnd_ = 0; + rhs.initialCapacity_ = 0; + } + return *this; + } +#endif + + void Swap(Stack& rhs) RAPIDJSON_NOEXCEPT { + internal::Swap(allocator_, rhs.allocator_); + internal::Swap(ownAllocator_, rhs.ownAllocator_); + internal::Swap(stack_, rhs.stack_); + internal::Swap(stackTop_, rhs.stackTop_); + internal::Swap(stackEnd_, rhs.stackEnd_); + internal::Swap(initialCapacity_, rhs.initialCapacity_); + } + + void Clear() { stackTop_ = stack_; } + + void ShrinkToFit() { + if (Empty()) { + // If the stack is empty, completely deallocate the memory. + Allocator::Free(stack_); // NOLINT (+clang-analyzer-unix.Malloc) + stack_ = 0; + stackTop_ = 0; + stackEnd_ = 0; + } + else + Resize(GetSize()); + } + + // Optimization note: try to minimize the size of this function for force inline. + // Expansion is run very infrequently, so it is moved to another (probably non-inline) function. + template + RAPIDJSON_FORCEINLINE void Reserve(size_t count = 1) { + // Expand the stack if needed + if (RAPIDJSON_UNLIKELY(static_cast(sizeof(T) * count) > (stackEnd_ - stackTop_))) + Expand(count); + } + + template + RAPIDJSON_FORCEINLINE T* Push(size_t count = 1) { + Reserve(count); + return PushUnsafe(count); + } + + template + RAPIDJSON_FORCEINLINE T* PushUnsafe(size_t count = 1) { + RAPIDJSON_ASSERT(stackTop_); + RAPIDJSON_ASSERT(static_cast(sizeof(T) * count) <= (stackEnd_ - stackTop_)); + T* ret = reinterpret_cast(stackTop_); + stackTop_ += sizeof(T) * count; + return ret; + } + + template + T* Pop(size_t count) { + RAPIDJSON_ASSERT(GetSize() >= count * sizeof(T)); + stackTop_ -= count * sizeof(T); + return reinterpret_cast(stackTop_); + } + + template + T* Top() { + RAPIDJSON_ASSERT(GetSize() >= sizeof(T)); + return reinterpret_cast(stackTop_ - sizeof(T)); + } + + template + const T* Top() const { + RAPIDJSON_ASSERT(GetSize() >= sizeof(T)); + return reinterpret_cast(stackTop_ - sizeof(T)); + } + + template + T* End() { return reinterpret_cast(stackTop_); } + + template + const T* End() const { return reinterpret_cast(stackTop_); } + + template + T* Bottom() { return reinterpret_cast(stack_); } + + template + const T* Bottom() const { return reinterpret_cast(stack_); } + + bool HasAllocator() const { + return allocator_ != 0; + } + + Allocator& GetAllocator() { + RAPIDJSON_ASSERT(allocator_); + return *allocator_; + } + + bool Empty() const { return stackTop_ == stack_; } + size_t GetSize() const { return static_cast(stackTop_ - stack_); } + size_t GetCapacity() const { return static_cast(stackEnd_ - stack_); } + +private: + template + void Expand(size_t count) { + // Only expand the capacity if the current stack exists. Otherwise just create a stack with initial capacity. + size_t newCapacity; + if (stack_ == 0) { + if (!allocator_) + ownAllocator_ = allocator_ = RAPIDJSON_NEW(Allocator)(); + newCapacity = initialCapacity_; + } else { + newCapacity = GetCapacity(); + newCapacity += (newCapacity + 1) / 2; + } + size_t newSize = GetSize() + sizeof(T) * count; + if (newCapacity < newSize) + newCapacity = newSize; + + Resize(newCapacity); + } + + void Resize(size_t newCapacity) { + const size_t size = GetSize(); // Backup the current size + stack_ = static_cast(allocator_->Realloc(stack_, GetCapacity(), newCapacity)); + stackTop_ = stack_ + size; + stackEnd_ = stack_ + newCapacity; + } + + void Destroy() { + Allocator::Free(stack_); + RAPIDJSON_DELETE(ownAllocator_); // Only delete if it is owned by the stack + } + + // Prohibit copy constructor & assignment operator. + Stack(const Stack&); + Stack& operator=(const Stack&); + + Allocator* allocator_; + Allocator* ownAllocator_; + char *stack_; + char *stackTop_; + char *stackEnd_; + size_t initialCapacity_; +}; + +} // namespace internal +RAPIDJSON_NAMESPACE_END + +#if defined(__clang__) +RAPIDJSON_DIAG_POP +#endif + +#endif // RAPIDJSON_STACK_H_ diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/internal/strfunc.h b/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/internal/strfunc.h new file mode 100644 index 0000000000..b698a8f43f --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/internal/strfunc.h @@ -0,0 +1,83 @@ +// Tencent is pleased to support the open source community by making RapidJSON available. +// +// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. +// +// Licensed under the MIT License (the "License"); you may not use this file except +// in compliance with the License. You may obtain a copy of the License at +// +// http://opensource.org/licenses/MIT +// +// Unless required by applicable law or agreed to in writing, software distributed +// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +// CONDITIONS OF ANY KIND, either express or implied. See the License for the +// specific language governing permissions and limitations under the License. + +#ifndef RAPIDJSON_INTERNAL_STRFUNC_H_ +#define RAPIDJSON_INTERNAL_STRFUNC_H_ + +#include "../stream.h" +#include + +RAPIDJSON_NAMESPACE_BEGIN +namespace internal { + +//! Custom strlen() which works on different character types. +/*! \tparam Ch Character type (e.g. char, wchar_t, short) + \param s Null-terminated input string. + \return Number of characters in the string. + \note This has the same semantics as strlen(), the return value is not number of Unicode codepoints. +*/ +template +inline SizeType StrLen(const Ch* s) { + RAPIDJSON_ASSERT(s != 0); + const Ch* p = s; + while (*p) ++p; + return SizeType(p - s); +} + +template <> +inline SizeType StrLen(const char* s) { + return SizeType(std::strlen(s)); +} + +template <> +inline SizeType StrLen(const wchar_t* s) { + return SizeType(std::wcslen(s)); +} + +//! Custom strcmpn() which works on different character types. +/*! \tparam Ch Character type (e.g. char, wchar_t, short) + \param s1 Null-terminated input string. + \param s2 Null-terminated input string. + \return 0 if equal +*/ +template +inline int StrCmp(const Ch* s1, const Ch* s2) { + RAPIDJSON_ASSERT(s1 != 0); + RAPIDJSON_ASSERT(s2 != 0); + while(*s1 && (*s1 == *s2)) { s1++; s2++; } + return static_cast(*s1) < static_cast(*s2) ? -1 : static_cast(*s1) > static_cast(*s2); +} + +//! Returns number of code points in a encoded string. +template +bool CountStringCodePoint(const typename Encoding::Ch* s, SizeType length, SizeType* outCount) { + RAPIDJSON_ASSERT(s != 0); + RAPIDJSON_ASSERT(outCount != 0); + GenericStringStream is(s); + const typename Encoding::Ch* end = s + length; + SizeType count = 0; + while (is.src_ < end) { + unsigned codepoint; + if (!Encoding::Decode(is, &codepoint)) + return false; + count++; + } + *outCount = count; + return true; +} + +} // namespace internal +RAPIDJSON_NAMESPACE_END + +#endif // RAPIDJSON_INTERNAL_STRFUNC_H_ diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/internal/strtod.h b/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/internal/strtod.h new file mode 100644 index 0000000000..55f0e380bf --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/internal/strtod.h @@ -0,0 +1,293 @@ +// Tencent is pleased to support the open source community by making RapidJSON available. +// +// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. +// +// Licensed under the MIT License (the "License"); you may not use this file except +// in compliance with the License. You may obtain a copy of the License at +// +// http://opensource.org/licenses/MIT +// +// Unless required by applicable law or agreed to in writing, software distributed +// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +// CONDITIONS OF ANY KIND, either express or implied. See the License for the +// specific language governing permissions and limitations under the License. + +#ifndef RAPIDJSON_STRTOD_ +#define RAPIDJSON_STRTOD_ + +#include "ieee754.h" +#include "biginteger.h" +#include "diyfp.h" +#include "pow10.h" +#include +#include + +RAPIDJSON_NAMESPACE_BEGIN +namespace internal { + +inline double FastPath(double significand, int exp) { + if (exp < -308) + return 0.0; + else if (exp >= 0) + return significand * internal::Pow10(exp); + else + return significand / internal::Pow10(-exp); +} + +inline double StrtodNormalPrecision(double d, int p) { + if (p < -308) { + // Prevent expSum < -308, making Pow10(p) = 0 + d = FastPath(d, -308); + d = FastPath(d, p + 308); + } + else + d = FastPath(d, p); + return d; +} + +template +inline T Min3(T a, T b, T c) { + T m = a; + if (m > b) m = b; + if (m > c) m = c; + return m; +} + +inline int CheckWithinHalfULP(double b, const BigInteger& d, int dExp) { + const Double db(b); + const uint64_t bInt = db.IntegerSignificand(); + const int bExp = db.IntegerExponent(); + const int hExp = bExp - 1; + + int dS_Exp2 = 0, dS_Exp5 = 0, bS_Exp2 = 0, bS_Exp5 = 0, hS_Exp2 = 0, hS_Exp5 = 0; + + // Adjust for decimal exponent + if (dExp >= 0) { + dS_Exp2 += dExp; + dS_Exp5 += dExp; + } + else { + bS_Exp2 -= dExp; + bS_Exp5 -= dExp; + hS_Exp2 -= dExp; + hS_Exp5 -= dExp; + } + + // Adjust for binary exponent + if (bExp >= 0) + bS_Exp2 += bExp; + else { + dS_Exp2 -= bExp; + hS_Exp2 -= bExp; + } + + // Adjust for half ulp exponent + if (hExp >= 0) + hS_Exp2 += hExp; + else { + dS_Exp2 -= hExp; + bS_Exp2 -= hExp; + } + + // Remove common power of two factor from all three scaled values + int common_Exp2 = Min3(dS_Exp2, bS_Exp2, hS_Exp2); + dS_Exp2 -= common_Exp2; + bS_Exp2 -= common_Exp2; + hS_Exp2 -= common_Exp2; + + BigInteger dS = d; + dS.MultiplyPow5(static_cast(dS_Exp5)) <<= static_cast(dS_Exp2); + + BigInteger bS(bInt); + bS.MultiplyPow5(static_cast(bS_Exp5)) <<= static_cast(bS_Exp2); + + BigInteger hS(1); + hS.MultiplyPow5(static_cast(hS_Exp5)) <<= static_cast(hS_Exp2); + + BigInteger delta(0); + dS.Difference(bS, &delta); + + return delta.Compare(hS); +} + +inline bool StrtodFast(double d, int p, double* result) { + // Use fast path for string-to-double conversion if possible + // see http://www.exploringbinary.com/fast-path-decimal-to-floating-point-conversion/ + if (p > 22 && p < 22 + 16) { + // Fast Path Cases In Disguise + d *= internal::Pow10(p - 22); + p = 22; + } + + if (p >= -22 && p <= 22 && d <= 9007199254740991.0) { // 2^53 - 1 + *result = FastPath(d, p); + return true; + } + else + return false; +} + +// Compute an approximation and see if it is within 1/2 ULP +template +inline bool StrtodDiyFp(const Ch* decimals, int dLen, int dExp, double* result) { + uint64_t significand = 0; + int i = 0; // 2^64 - 1 = 18446744073709551615, 1844674407370955161 = 0x1999999999999999 + for (; i < dLen; i++) { + if (significand > RAPIDJSON_UINT64_C2(0x19999999, 0x99999999) || + (significand == RAPIDJSON_UINT64_C2(0x19999999, 0x99999999) && decimals[i] > Ch('5'))) + break; + significand = significand * 10u + static_cast(decimals[i] - Ch('0')); + } + + if (i < dLen && decimals[i] >= Ch('5')) // Rounding + significand++; + + int remaining = dLen - i; + const int kUlpShift = 3; + const int kUlp = 1 << kUlpShift; + int64_t error = (remaining == 0) ? 0 : kUlp / 2; + + DiyFp v(significand, 0); + v = v.Normalize(); + error <<= -v.e; + + dExp += remaining; + + int actualExp; + DiyFp cachedPower = GetCachedPower10(dExp, &actualExp); + if (actualExp != dExp) { + static const DiyFp kPow10[] = { + DiyFp(RAPIDJSON_UINT64_C2(0xa0000000, 0x00000000), -60), // 10^1 + DiyFp(RAPIDJSON_UINT64_C2(0xc8000000, 0x00000000), -57), // 10^2 + DiyFp(RAPIDJSON_UINT64_C2(0xfa000000, 0x00000000), -54), // 10^3 + DiyFp(RAPIDJSON_UINT64_C2(0x9c400000, 0x00000000), -50), // 10^4 + DiyFp(RAPIDJSON_UINT64_C2(0xc3500000, 0x00000000), -47), // 10^5 + DiyFp(RAPIDJSON_UINT64_C2(0xf4240000, 0x00000000), -44), // 10^6 + DiyFp(RAPIDJSON_UINT64_C2(0x98968000, 0x00000000), -40) // 10^7 + }; + int adjustment = dExp - actualExp; + RAPIDJSON_ASSERT(adjustment >= 1 && adjustment < 8); + v = v * kPow10[adjustment - 1]; + if (dLen + adjustment > 19) // has more digits than decimal digits in 64-bit + error += kUlp / 2; + } + + v = v * cachedPower; + + error += kUlp + (error == 0 ? 0 : 1); + + const int oldExp = v.e; + v = v.Normalize(); + error <<= oldExp - v.e; + + const int effectiveSignificandSize = Double::EffectiveSignificandSize(64 + v.e); + int precisionSize = 64 - effectiveSignificandSize; + if (precisionSize + kUlpShift >= 64) { + int scaleExp = (precisionSize + kUlpShift) - 63; + v.f >>= scaleExp; + v.e += scaleExp; + error = (error >> scaleExp) + 1 + kUlp; + precisionSize -= scaleExp; + } + + DiyFp rounded(v.f >> precisionSize, v.e + precisionSize); + const uint64_t precisionBits = (v.f & ((uint64_t(1) << precisionSize) - 1)) * kUlp; + const uint64_t halfWay = (uint64_t(1) << (precisionSize - 1)) * kUlp; + if (precisionBits >= halfWay + static_cast(error)) { + rounded.f++; + if (rounded.f & (DiyFp::kDpHiddenBit << 1)) { // rounding overflows mantissa (issue #340) + rounded.f >>= 1; + rounded.e++; + } + } + + *result = rounded.ToDouble(); + + return halfWay - static_cast(error) >= precisionBits || precisionBits >= halfWay + static_cast(error); +} + +template +inline double StrtodBigInteger(double approx, const Ch* decimals, int dLen, int dExp) { + RAPIDJSON_ASSERT(dLen >= 0); + const BigInteger dInt(decimals, static_cast(dLen)); + Double a(approx); + int cmp = CheckWithinHalfULP(a.Value(), dInt, dExp); + if (cmp < 0) + return a.Value(); // within half ULP + else if (cmp == 0) { + // Round towards even + if (a.Significand() & 1) + return a.NextPositiveDouble(); + else + return a.Value(); + } + else // adjustment + return a.NextPositiveDouble(); +} + +template +inline double StrtodFullPrecision(double d, int p, const Ch* decimals, size_t length, size_t decimalPosition, int exp) { + RAPIDJSON_ASSERT(d >= 0.0); + RAPIDJSON_ASSERT(length >= 1); + + double result = 0.0; + if (StrtodFast(d, p, &result)) + return result; + + RAPIDJSON_ASSERT(length <= INT_MAX); + int dLen = static_cast(length); + + RAPIDJSON_ASSERT(length >= decimalPosition); + RAPIDJSON_ASSERT(length - decimalPosition <= INT_MAX); + int dExpAdjust = static_cast(length - decimalPosition); + + RAPIDJSON_ASSERT(exp >= INT_MIN + dExpAdjust); + int dExp = exp - dExpAdjust; + + // Make sure length+dExp does not overflow + RAPIDJSON_ASSERT(dExp <= INT_MAX - dLen); + + // Trim leading zeros + while (dLen > 0 && *decimals == '0') { + dLen--; + decimals++; + } + + // Trim trailing zeros + while (dLen > 0 && decimals[dLen - 1] == '0') { + dLen--; + dExp++; + } + + if (dLen == 0) { // Buffer only contains zeros. + return 0.0; + } + + // Trim right-most digits + const int kMaxDecimalDigit = 767 + 1; + if (dLen > kMaxDecimalDigit) { + dExp += dLen - kMaxDecimalDigit; + dLen = kMaxDecimalDigit; + } + + // If too small, underflow to zero. + // Any x <= 10^-324 is interpreted as zero. + if (dLen + dExp <= -324) + return 0.0; + + // If too large, overflow to infinity. + // Any x >= 10^309 is interpreted as +infinity. + if (dLen + dExp > 309) + return std::numeric_limits::infinity(); + + if (StrtodDiyFp(decimals, dLen, dExp, &result)) + return result; + + // Use approximation from StrtodDiyFp and make adjustment with BigInteger comparison + return StrtodBigInteger(result, decimals, dLen, dExp); +} + +} // namespace internal +RAPIDJSON_NAMESPACE_END + +#endif // RAPIDJSON_STRTOD_ diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/internal/swap.h b/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/internal/swap.h new file mode 100644 index 0000000000..2cf92f93a1 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/internal/swap.h @@ -0,0 +1,46 @@ +// Tencent is pleased to support the open source community by making RapidJSON available. +// +// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. +// +// Licensed under the MIT License (the "License"); you may not use this file except +// in compliance with the License. You may obtain a copy of the License at +// +// http://opensource.org/licenses/MIT +// +// Unless required by applicable law or agreed to in writing, software distributed +// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +// CONDITIONS OF ANY KIND, either express or implied. See the License for the +// specific language governing permissions and limitations under the License. + +#ifndef RAPIDJSON_INTERNAL_SWAP_H_ +#define RAPIDJSON_INTERNAL_SWAP_H_ + +#include "../rapidjson.h" + +#if defined(__clang__) +RAPIDJSON_DIAG_PUSH +RAPIDJSON_DIAG_OFF(c++98-compat) +#endif + +RAPIDJSON_NAMESPACE_BEGIN +namespace internal { + +//! Custom swap() to avoid dependency on C++ header +/*! \tparam T Type of the arguments to swap, should be instantiated with primitive C++ types only. + \note This has the same semantics as std::swap(). +*/ +template +inline void Swap(T& a, T& b) RAPIDJSON_NOEXCEPT { + T tmp = a; + a = b; + b = tmp; +} + +} // namespace internal +RAPIDJSON_NAMESPACE_END + +#if defined(__clang__) +RAPIDJSON_DIAG_POP +#endif + +#endif // RAPIDJSON_INTERNAL_SWAP_H_ diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/istreamwrapper.h b/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/istreamwrapper.h new file mode 100644 index 0000000000..01437ec012 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/istreamwrapper.h @@ -0,0 +1,128 @@ +// Tencent is pleased to support the open source community by making RapidJSON available. +// +// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. +// +// Licensed under the MIT License (the "License"); you may not use this file except +// in compliance with the License. You may obtain a copy of the License at +// +// http://opensource.org/licenses/MIT +// +// Unless required by applicable law or agreed to in writing, software distributed +// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +// CONDITIONS OF ANY KIND, either express or implied. See the License for the +// specific language governing permissions and limitations under the License. + +#ifndef RAPIDJSON_ISTREAMWRAPPER_H_ +#define RAPIDJSON_ISTREAMWRAPPER_H_ + +#include "stream.h" +#include +#include + +#ifdef __clang__ +RAPIDJSON_DIAG_PUSH +RAPIDJSON_DIAG_OFF(padded) +#elif defined(_MSC_VER) +RAPIDJSON_DIAG_PUSH +RAPIDJSON_DIAG_OFF(4351) // new behavior: elements of array 'array' will be default initialized +#endif + +RAPIDJSON_NAMESPACE_BEGIN + +//! Wrapper of \c std::basic_istream into RapidJSON's Stream concept. +/*! + The classes can be wrapped including but not limited to: + + - \c std::istringstream + - \c std::stringstream + - \c std::wistringstream + - \c std::wstringstream + - \c std::ifstream + - \c std::fstream + - \c std::wifstream + - \c std::wfstream + + \tparam StreamType Class derived from \c std::basic_istream. +*/ + +template +class BasicIStreamWrapper { +public: + typedef typename StreamType::char_type Ch; + + //! Constructor. + /*! + \param stream stream opened for read. + */ + BasicIStreamWrapper(StreamType &stream) : stream_(stream), buffer_(peekBuffer_), bufferSize_(4), bufferLast_(0), current_(buffer_), readCount_(0), count_(0), eof_(false) { + Read(); + } + + //! Constructor. + /*! + \param stream stream opened for read. + \param buffer user-supplied buffer. + \param bufferSize size of buffer in bytes. Must >=4 bytes. + */ + BasicIStreamWrapper(StreamType &stream, char* buffer, size_t bufferSize) : stream_(stream), buffer_(buffer), bufferSize_(bufferSize), bufferLast_(0), current_(buffer_), readCount_(0), count_(0), eof_(false) { + RAPIDJSON_ASSERT(bufferSize >= 4); + Read(); + } + + Ch Peek() const { return *current_; } + Ch Take() { Ch c = *current_; Read(); return c; } + size_t Tell() const { return count_ + static_cast(current_ - buffer_); } + + // Not implemented + void Put(Ch) { RAPIDJSON_ASSERT(false); } + void Flush() { RAPIDJSON_ASSERT(false); } + Ch* PutBegin() { RAPIDJSON_ASSERT(false); return 0; } + size_t PutEnd(Ch*) { RAPIDJSON_ASSERT(false); return 0; } + + // For encoding detection only. + const Ch* Peek4() const { + return (current_ + 4 - !eof_ <= bufferLast_) ? current_ : 0; + } + +private: + BasicIStreamWrapper(); + BasicIStreamWrapper(const BasicIStreamWrapper&); + BasicIStreamWrapper& operator=(const BasicIStreamWrapper&); + + void Read() { + if (current_ < bufferLast_) + ++current_; + else if (!eof_) { + count_ += readCount_; + readCount_ = bufferSize_; + bufferLast_ = buffer_ + readCount_ - 1; + current_ = buffer_; + + if (!stream_.read(buffer_, static_cast(bufferSize_))) { + readCount_ = static_cast(stream_.gcount()); + *(bufferLast_ = buffer_ + readCount_) = '\0'; + eof_ = true; + } + } + } + + StreamType &stream_; + Ch peekBuffer_[4], *buffer_; + size_t bufferSize_; + Ch *bufferLast_; + Ch *current_; + size_t readCount_; + size_t count_; //!< Number of characters read + bool eof_; +}; + +typedef BasicIStreamWrapper IStreamWrapper; +typedef BasicIStreamWrapper WIStreamWrapper; + +#if defined(__clang__) || defined(_MSC_VER) +RAPIDJSON_DIAG_POP +#endif + +RAPIDJSON_NAMESPACE_END + +#endif // RAPIDJSON_ISTREAMWRAPPER_H_ diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/memorybuffer.h b/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/memorybuffer.h new file mode 100644 index 0000000000..ffbc41ed1f --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/memorybuffer.h @@ -0,0 +1,70 @@ +// Tencent is pleased to support the open source community by making RapidJSON available. +// +// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. +// +// Licensed under the MIT License (the "License"); you may not use this file except +// in compliance with the License. You may obtain a copy of the License at +// +// http://opensource.org/licenses/MIT +// +// Unless required by applicable law or agreed to in writing, software distributed +// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +// CONDITIONS OF ANY KIND, either express or implied. See the License for the +// specific language governing permissions and limitations under the License. + +#ifndef RAPIDJSON_MEMORYBUFFER_H_ +#define RAPIDJSON_MEMORYBUFFER_H_ + +#include "stream.h" +#include "internal/stack.h" + +RAPIDJSON_NAMESPACE_BEGIN + +//! Represents an in-memory output byte stream. +/*! + This class is mainly for being wrapped by EncodedOutputStream or AutoUTFOutputStream. + + It is similar to FileWriteBuffer but the destination is an in-memory buffer instead of a file. + + Differences between MemoryBuffer and StringBuffer: + 1. StringBuffer has Encoding but MemoryBuffer is only a byte buffer. + 2. StringBuffer::GetString() returns a null-terminated string. MemoryBuffer::GetBuffer() returns a buffer without terminator. + + \tparam Allocator type for allocating memory buffer. + \note implements Stream concept +*/ +template +struct GenericMemoryBuffer { + typedef char Ch; // byte + + GenericMemoryBuffer(Allocator* allocator = 0, size_t capacity = kDefaultCapacity) : stack_(allocator, capacity) {} + + void Put(Ch c) { *stack_.template Push() = c; } + void Flush() {} + + void Clear() { stack_.Clear(); } + void ShrinkToFit() { stack_.ShrinkToFit(); } + Ch* Push(size_t count) { return stack_.template Push(count); } + void Pop(size_t count) { stack_.template Pop(count); } + + const Ch* GetBuffer() const { + return stack_.template Bottom(); + } + + size_t GetSize() const { return stack_.GetSize(); } + + static const size_t kDefaultCapacity = 256; + mutable internal::Stack stack_; +}; + +typedef GenericMemoryBuffer<> MemoryBuffer; + +//! Implement specialized version of PutN() with memset() for better performance. +template<> +inline void PutN(MemoryBuffer& memoryBuffer, char c, size_t n) { + std::memset(memoryBuffer.stack_.Push(n), c, n * sizeof(c)); +} + +RAPIDJSON_NAMESPACE_END + +#endif // RAPIDJSON_MEMORYBUFFER_H_ diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/memorystream.h b/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/memorystream.h new file mode 100644 index 0000000000..77af6c999e --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/memorystream.h @@ -0,0 +1,71 @@ +// Tencent is pleased to support the open source community by making RapidJSON available. +// +// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. +// +// Licensed under the MIT License (the "License"); you may not use this file except +// in compliance with the License. You may obtain a copy of the License at +// +// http://opensource.org/licenses/MIT +// +// Unless required by applicable law or agreed to in writing, software distributed +// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +// CONDITIONS OF ANY KIND, either express or implied. See the License for the +// specific language governing permissions and limitations under the License. + +#ifndef RAPIDJSON_MEMORYSTREAM_H_ +#define RAPIDJSON_MEMORYSTREAM_H_ + +#include "stream.h" + +#ifdef __clang__ +RAPIDJSON_DIAG_PUSH +RAPIDJSON_DIAG_OFF(unreachable-code) +RAPIDJSON_DIAG_OFF(missing-noreturn) +#endif + +RAPIDJSON_NAMESPACE_BEGIN + +//! Represents an in-memory input byte stream. +/*! + This class is mainly for being wrapped by EncodedInputStream or AutoUTFInputStream. + + It is similar to FileReadBuffer but the source is an in-memory buffer instead of a file. + + Differences between MemoryStream and StringStream: + 1. StringStream has encoding but MemoryStream is a byte stream. + 2. MemoryStream needs size of the source buffer and the buffer don't need to be null terminated. StringStream assume null-terminated string as source. + 3. MemoryStream supports Peek4() for encoding detection. StringStream is specified with an encoding so it should not have Peek4(). + \note implements Stream concept +*/ +struct MemoryStream { + typedef char Ch; // byte + + MemoryStream(const Ch *src, size_t size) : src_(src), begin_(src), end_(src + size), size_(size) {} + + Ch Peek() const { return RAPIDJSON_UNLIKELY(src_ == end_) ? '\0' : *src_; } + Ch Take() { return RAPIDJSON_UNLIKELY(src_ == end_) ? '\0' : *src_++; } + size_t Tell() const { return static_cast(src_ - begin_); } + + Ch* PutBegin() { RAPIDJSON_ASSERT(false); return 0; } + void Put(Ch) { RAPIDJSON_ASSERT(false); } + void Flush() { RAPIDJSON_ASSERT(false); } + size_t PutEnd(Ch*) { RAPIDJSON_ASSERT(false); return 0; } + + // For encoding detection only. + const Ch* Peek4() const { + return Tell() + 4 <= size_ ? src_ : 0; + } + + const Ch* src_; //!< Current read position. + const Ch* begin_; //!< Original head of the string. + const Ch* end_; //!< End of stream. + size_t size_; //!< Size of the stream. +}; + +RAPIDJSON_NAMESPACE_END + +#ifdef __clang__ +RAPIDJSON_DIAG_POP +#endif + +#endif // RAPIDJSON_MEMORYBUFFER_H_ diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/msinttypes/inttypes.h b/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/msinttypes/inttypes.h new file mode 100644 index 0000000000..18111286bf --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/msinttypes/inttypes.h @@ -0,0 +1,316 @@ +// ISO C9x compliant inttypes.h for Microsoft Visual Studio +// Based on ISO/IEC 9899:TC2 Committee draft (May 6, 2005) WG14/N1124 +// +// Copyright (c) 2006-2013 Alexander Chemeris +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are met: +// +// 1. Redistributions of source code must retain the above copyright notice, +// this list of conditions and the following disclaimer. +// +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// 3. Neither the name of the product nor the names of its contributors may +// be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED +// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +// EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +/////////////////////////////////////////////////////////////////////////////// + +// The above software in this distribution may have been modified by +// THL A29 Limited ("Tencent Modifications"). +// All Tencent Modifications are Copyright (C) 2015 THL A29 Limited. + +#ifndef _MSC_VER // [ +#error "Use this header only with Microsoft Visual C++ compilers!" +#endif // _MSC_VER ] + +#ifndef _MSC_INTTYPES_H_ // [ +#define _MSC_INTTYPES_H_ + +#if _MSC_VER > 1000 +#pragma once +#endif + +#include "stdint.h" + +// miloyip: VC supports inttypes.h since VC2013 +#if _MSC_VER >= 1800 +#include +#else + +// 7.8 Format conversion of integer types + +typedef struct { + intmax_t quot; + intmax_t rem; +} imaxdiv_t; + +// 7.8.1 Macros for format specifiers + +#if !defined(__cplusplus) || defined(__STDC_FORMAT_MACROS) // [ See footnote 185 at page 198 + +// The fprintf macros for signed integers are: +#define PRId8 "d" +#define PRIi8 "i" +#define PRIdLEAST8 "d" +#define PRIiLEAST8 "i" +#define PRIdFAST8 "d" +#define PRIiFAST8 "i" + +#define PRId16 "hd" +#define PRIi16 "hi" +#define PRIdLEAST16 "hd" +#define PRIiLEAST16 "hi" +#define PRIdFAST16 "hd" +#define PRIiFAST16 "hi" + +#define PRId32 "I32d" +#define PRIi32 "I32i" +#define PRIdLEAST32 "I32d" +#define PRIiLEAST32 "I32i" +#define PRIdFAST32 "I32d" +#define PRIiFAST32 "I32i" + +#define PRId64 "I64d" +#define PRIi64 "I64i" +#define PRIdLEAST64 "I64d" +#define PRIiLEAST64 "I64i" +#define PRIdFAST64 "I64d" +#define PRIiFAST64 "I64i" + +#define PRIdMAX "I64d" +#define PRIiMAX "I64i" + +#define PRIdPTR "Id" +#define PRIiPTR "Ii" + +// The fprintf macros for unsigned integers are: +#define PRIo8 "o" +#define PRIu8 "u" +#define PRIx8 "x" +#define PRIX8 "X" +#define PRIoLEAST8 "o" +#define PRIuLEAST8 "u" +#define PRIxLEAST8 "x" +#define PRIXLEAST8 "X" +#define PRIoFAST8 "o" +#define PRIuFAST8 "u" +#define PRIxFAST8 "x" +#define PRIXFAST8 "X" + +#define PRIo16 "ho" +#define PRIu16 "hu" +#define PRIx16 "hx" +#define PRIX16 "hX" +#define PRIoLEAST16 "ho" +#define PRIuLEAST16 "hu" +#define PRIxLEAST16 "hx" +#define PRIXLEAST16 "hX" +#define PRIoFAST16 "ho" +#define PRIuFAST16 "hu" +#define PRIxFAST16 "hx" +#define PRIXFAST16 "hX" + +#define PRIo32 "I32o" +#define PRIu32 "I32u" +#define PRIx32 "I32x" +#define PRIX32 "I32X" +#define PRIoLEAST32 "I32o" +#define PRIuLEAST32 "I32u" +#define PRIxLEAST32 "I32x" +#define PRIXLEAST32 "I32X" +#define PRIoFAST32 "I32o" +#define PRIuFAST32 "I32u" +#define PRIxFAST32 "I32x" +#define PRIXFAST32 "I32X" + +#define PRIo64 "I64o" +#define PRIu64 "I64u" +#define PRIx64 "I64x" +#define PRIX64 "I64X" +#define PRIoLEAST64 "I64o" +#define PRIuLEAST64 "I64u" +#define PRIxLEAST64 "I64x" +#define PRIXLEAST64 "I64X" +#define PRIoFAST64 "I64o" +#define PRIuFAST64 "I64u" +#define PRIxFAST64 "I64x" +#define PRIXFAST64 "I64X" + +#define PRIoMAX "I64o" +#define PRIuMAX "I64u" +#define PRIxMAX "I64x" +#define PRIXMAX "I64X" + +#define PRIoPTR "Io" +#define PRIuPTR "Iu" +#define PRIxPTR "Ix" +#define PRIXPTR "IX" + +// The fscanf macros for signed integers are: +#define SCNd8 "d" +#define SCNi8 "i" +#define SCNdLEAST8 "d" +#define SCNiLEAST8 "i" +#define SCNdFAST8 "d" +#define SCNiFAST8 "i" + +#define SCNd16 "hd" +#define SCNi16 "hi" +#define SCNdLEAST16 "hd" +#define SCNiLEAST16 "hi" +#define SCNdFAST16 "hd" +#define SCNiFAST16 "hi" + +#define SCNd32 "ld" +#define SCNi32 "li" +#define SCNdLEAST32 "ld" +#define SCNiLEAST32 "li" +#define SCNdFAST32 "ld" +#define SCNiFAST32 "li" + +#define SCNd64 "I64d" +#define SCNi64 "I64i" +#define SCNdLEAST64 "I64d" +#define SCNiLEAST64 "I64i" +#define SCNdFAST64 "I64d" +#define SCNiFAST64 "I64i" + +#define SCNdMAX "I64d" +#define SCNiMAX "I64i" + +#ifdef _WIN64 // [ +# define SCNdPTR "I64d" +# define SCNiPTR "I64i" +#else // _WIN64 ][ +# define SCNdPTR "ld" +# define SCNiPTR "li" +#endif // _WIN64 ] + +// The fscanf macros for unsigned integers are: +#define SCNo8 "o" +#define SCNu8 "u" +#define SCNx8 "x" +#define SCNX8 "X" +#define SCNoLEAST8 "o" +#define SCNuLEAST8 "u" +#define SCNxLEAST8 "x" +#define SCNXLEAST8 "X" +#define SCNoFAST8 "o" +#define SCNuFAST8 "u" +#define SCNxFAST8 "x" +#define SCNXFAST8 "X" + +#define SCNo16 "ho" +#define SCNu16 "hu" +#define SCNx16 "hx" +#define SCNX16 "hX" +#define SCNoLEAST16 "ho" +#define SCNuLEAST16 "hu" +#define SCNxLEAST16 "hx" +#define SCNXLEAST16 "hX" +#define SCNoFAST16 "ho" +#define SCNuFAST16 "hu" +#define SCNxFAST16 "hx" +#define SCNXFAST16 "hX" + +#define SCNo32 "lo" +#define SCNu32 "lu" +#define SCNx32 "lx" +#define SCNX32 "lX" +#define SCNoLEAST32 "lo" +#define SCNuLEAST32 "lu" +#define SCNxLEAST32 "lx" +#define SCNXLEAST32 "lX" +#define SCNoFAST32 "lo" +#define SCNuFAST32 "lu" +#define SCNxFAST32 "lx" +#define SCNXFAST32 "lX" + +#define SCNo64 "I64o" +#define SCNu64 "I64u" +#define SCNx64 "I64x" +#define SCNX64 "I64X" +#define SCNoLEAST64 "I64o" +#define SCNuLEAST64 "I64u" +#define SCNxLEAST64 "I64x" +#define SCNXLEAST64 "I64X" +#define SCNoFAST64 "I64o" +#define SCNuFAST64 "I64u" +#define SCNxFAST64 "I64x" +#define SCNXFAST64 "I64X" + +#define SCNoMAX "I64o" +#define SCNuMAX "I64u" +#define SCNxMAX "I64x" +#define SCNXMAX "I64X" + +#ifdef _WIN64 // [ +# define SCNoPTR "I64o" +# define SCNuPTR "I64u" +# define SCNxPTR "I64x" +# define SCNXPTR "I64X" +#else // _WIN64 ][ +# define SCNoPTR "lo" +# define SCNuPTR "lu" +# define SCNxPTR "lx" +# define SCNXPTR "lX" +#endif // _WIN64 ] + +#endif // __STDC_FORMAT_MACROS ] + +// 7.8.2 Functions for greatest-width integer types + +// 7.8.2.1 The imaxabs function +#define imaxabs _abs64 + +// 7.8.2.2 The imaxdiv function + +// This is modified version of div() function from Microsoft's div.c found +// in %MSVC.NET%\crt\src\div.c +#ifdef STATIC_IMAXDIV // [ +static +#else // STATIC_IMAXDIV ][ +_inline +#endif // STATIC_IMAXDIV ] +imaxdiv_t __cdecl imaxdiv(intmax_t numer, intmax_t denom) +{ + imaxdiv_t result; + + result.quot = numer / denom; + result.rem = numer % denom; + + if (numer < 0 && result.rem > 0) { + // did division wrong; must fix up + ++result.quot; + result.rem -= denom; + } + + return result; +} + +// 7.8.2.3 The strtoimax and strtoumax functions +#define strtoimax _strtoi64 +#define strtoumax _strtoui64 + +// 7.8.2.4 The wcstoimax and wcstoumax functions +#define wcstoimax _wcstoi64 +#define wcstoumax _wcstoui64 + +#endif // _MSC_VER >= 1800 + +#endif // _MSC_INTTYPES_H_ ] diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/msinttypes/stdint.h b/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/msinttypes/stdint.h new file mode 100644 index 0000000000..3d4477b9a0 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/msinttypes/stdint.h @@ -0,0 +1,300 @@ +// ISO C9x compliant stdint.h for Microsoft Visual Studio +// Based on ISO/IEC 9899:TC2 Committee draft (May 6, 2005) WG14/N1124 +// +// Copyright (c) 2006-2013 Alexander Chemeris +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are met: +// +// 1. Redistributions of source code must retain the above copyright notice, +// this list of conditions and the following disclaimer. +// +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// 3. Neither the name of the product nor the names of its contributors may +// be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED +// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +// EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +/////////////////////////////////////////////////////////////////////////////// + +// The above software in this distribution may have been modified by +// THL A29 Limited ("Tencent Modifications"). +// All Tencent Modifications are Copyright (C) 2015 THL A29 Limited. + +#ifndef _MSC_VER // [ +#error "Use this header only with Microsoft Visual C++ compilers!" +#endif // _MSC_VER ] + +#ifndef _MSC_STDINT_H_ // [ +#define _MSC_STDINT_H_ + +#if _MSC_VER > 1000 +#pragma once +#endif + +// miloyip: Originally Visual Studio 2010 uses its own stdint.h. However it generates warning with INT64_C(), so change to use this file for vs2010. +#if _MSC_VER >= 1600 // [ +#include + +#if !defined(__cplusplus) || defined(__STDC_CONSTANT_MACROS) // [ See footnote 224 at page 260 + +#undef INT8_C +#undef INT16_C +#undef INT32_C +#undef INT64_C +#undef UINT8_C +#undef UINT16_C +#undef UINT32_C +#undef UINT64_C + +// 7.18.4.1 Macros for minimum-width integer constants + +#define INT8_C(val) val##i8 +#define INT16_C(val) val##i16 +#define INT32_C(val) val##i32 +#define INT64_C(val) val##i64 + +#define UINT8_C(val) val##ui8 +#define UINT16_C(val) val##ui16 +#define UINT32_C(val) val##ui32 +#define UINT64_C(val) val##ui64 + +// 7.18.4.2 Macros for greatest-width integer constants +// These #ifndef's are needed to prevent collisions with . +// Check out Issue 9 for the details. +#ifndef INTMAX_C // [ +# define INTMAX_C INT64_C +#endif // INTMAX_C ] +#ifndef UINTMAX_C // [ +# define UINTMAX_C UINT64_C +#endif // UINTMAX_C ] + +#endif // __STDC_CONSTANT_MACROS ] + +#else // ] _MSC_VER >= 1700 [ + +#include + +// For Visual Studio 6 in C++ mode and for many Visual Studio versions when +// compiling for ARM we have to wrap include with 'extern "C++" {}' +// or compiler would give many errors like this: +// error C2733: second C linkage of overloaded function 'wmemchr' not allowed +#if defined(__cplusplus) && !defined(_M_ARM) +extern "C" { +#endif +# include +#if defined(__cplusplus) && !defined(_M_ARM) +} +#endif + +// Define _W64 macros to mark types changing their size, like intptr_t. +#ifndef _W64 +# if !defined(__midl) && (defined(_X86_) || defined(_M_IX86)) && _MSC_VER >= 1300 +# define _W64 __w64 +# else +# define _W64 +# endif +#endif + + +// 7.18.1 Integer types + +// 7.18.1.1 Exact-width integer types + +// Visual Studio 6 and Embedded Visual C++ 4 doesn't +// realize that, e.g. char has the same size as __int8 +// so we give up on __intX for them. +#if (_MSC_VER < 1300) + typedef signed char int8_t; + typedef signed short int16_t; + typedef signed int int32_t; + typedef unsigned char uint8_t; + typedef unsigned short uint16_t; + typedef unsigned int uint32_t; +#else + typedef signed __int8 int8_t; + typedef signed __int16 int16_t; + typedef signed __int32 int32_t; + typedef unsigned __int8 uint8_t; + typedef unsigned __int16 uint16_t; + typedef unsigned __int32 uint32_t; +#endif +typedef signed __int64 int64_t; +typedef unsigned __int64 uint64_t; + + +// 7.18.1.2 Minimum-width integer types +typedef int8_t int_least8_t; +typedef int16_t int_least16_t; +typedef int32_t int_least32_t; +typedef int64_t int_least64_t; +typedef uint8_t uint_least8_t; +typedef uint16_t uint_least16_t; +typedef uint32_t uint_least32_t; +typedef uint64_t uint_least64_t; + +// 7.18.1.3 Fastest minimum-width integer types +typedef int8_t int_fast8_t; +typedef int16_t int_fast16_t; +typedef int32_t int_fast32_t; +typedef int64_t int_fast64_t; +typedef uint8_t uint_fast8_t; +typedef uint16_t uint_fast16_t; +typedef uint32_t uint_fast32_t; +typedef uint64_t uint_fast64_t; + +// 7.18.1.4 Integer types capable of holding object pointers +#ifdef _WIN64 // [ + typedef signed __int64 intptr_t; + typedef unsigned __int64 uintptr_t; +#else // _WIN64 ][ + typedef _W64 signed int intptr_t; + typedef _W64 unsigned int uintptr_t; +#endif // _WIN64 ] + +// 7.18.1.5 Greatest-width integer types +typedef int64_t intmax_t; +typedef uint64_t uintmax_t; + + +// 7.18.2 Limits of specified-width integer types + +#if !defined(__cplusplus) || defined(__STDC_LIMIT_MACROS) // [ See footnote 220 at page 257 and footnote 221 at page 259 + +// 7.18.2.1 Limits of exact-width integer types +#define INT8_MIN ((int8_t)_I8_MIN) +#define INT8_MAX _I8_MAX +#define INT16_MIN ((int16_t)_I16_MIN) +#define INT16_MAX _I16_MAX +#define INT32_MIN ((int32_t)_I32_MIN) +#define INT32_MAX _I32_MAX +#define INT64_MIN ((int64_t)_I64_MIN) +#define INT64_MAX _I64_MAX +#define UINT8_MAX _UI8_MAX +#define UINT16_MAX _UI16_MAX +#define UINT32_MAX _UI32_MAX +#define UINT64_MAX _UI64_MAX + +// 7.18.2.2 Limits of minimum-width integer types +#define INT_LEAST8_MIN INT8_MIN +#define INT_LEAST8_MAX INT8_MAX +#define INT_LEAST16_MIN INT16_MIN +#define INT_LEAST16_MAX INT16_MAX +#define INT_LEAST32_MIN INT32_MIN +#define INT_LEAST32_MAX INT32_MAX +#define INT_LEAST64_MIN INT64_MIN +#define INT_LEAST64_MAX INT64_MAX +#define UINT_LEAST8_MAX UINT8_MAX +#define UINT_LEAST16_MAX UINT16_MAX +#define UINT_LEAST32_MAX UINT32_MAX +#define UINT_LEAST64_MAX UINT64_MAX + +// 7.18.2.3 Limits of fastest minimum-width integer types +#define INT_FAST8_MIN INT8_MIN +#define INT_FAST8_MAX INT8_MAX +#define INT_FAST16_MIN INT16_MIN +#define INT_FAST16_MAX INT16_MAX +#define INT_FAST32_MIN INT32_MIN +#define INT_FAST32_MAX INT32_MAX +#define INT_FAST64_MIN INT64_MIN +#define INT_FAST64_MAX INT64_MAX +#define UINT_FAST8_MAX UINT8_MAX +#define UINT_FAST16_MAX UINT16_MAX +#define UINT_FAST32_MAX UINT32_MAX +#define UINT_FAST64_MAX UINT64_MAX + +// 7.18.2.4 Limits of integer types capable of holding object pointers +#ifdef _WIN64 // [ +# define INTPTR_MIN INT64_MIN +# define INTPTR_MAX INT64_MAX +# define UINTPTR_MAX UINT64_MAX +#else // _WIN64 ][ +# define INTPTR_MIN INT32_MIN +# define INTPTR_MAX INT32_MAX +# define UINTPTR_MAX UINT32_MAX +#endif // _WIN64 ] + +// 7.18.2.5 Limits of greatest-width integer types +#define INTMAX_MIN INT64_MIN +#define INTMAX_MAX INT64_MAX +#define UINTMAX_MAX UINT64_MAX + +// 7.18.3 Limits of other integer types + +#ifdef _WIN64 // [ +# define PTRDIFF_MIN _I64_MIN +# define PTRDIFF_MAX _I64_MAX +#else // _WIN64 ][ +# define PTRDIFF_MIN _I32_MIN +# define PTRDIFF_MAX _I32_MAX +#endif // _WIN64 ] + +#define SIG_ATOMIC_MIN INT_MIN +#define SIG_ATOMIC_MAX INT_MAX + +#ifndef SIZE_MAX // [ +# ifdef _WIN64 // [ +# define SIZE_MAX _UI64_MAX +# else // _WIN64 ][ +# define SIZE_MAX _UI32_MAX +# endif // _WIN64 ] +#endif // SIZE_MAX ] + +// WCHAR_MIN and WCHAR_MAX are also defined in +#ifndef WCHAR_MIN // [ +# define WCHAR_MIN 0 +#endif // WCHAR_MIN ] +#ifndef WCHAR_MAX // [ +# define WCHAR_MAX _UI16_MAX +#endif // WCHAR_MAX ] + +#define WINT_MIN 0 +#define WINT_MAX _UI16_MAX + +#endif // __STDC_LIMIT_MACROS ] + + +// 7.18.4 Limits of other integer types + +#if !defined(__cplusplus) || defined(__STDC_CONSTANT_MACROS) // [ See footnote 224 at page 260 + +// 7.18.4.1 Macros for minimum-width integer constants + +#define INT8_C(val) val##i8 +#define INT16_C(val) val##i16 +#define INT32_C(val) val##i32 +#define INT64_C(val) val##i64 + +#define UINT8_C(val) val##ui8 +#define UINT16_C(val) val##ui16 +#define UINT32_C(val) val##ui32 +#define UINT64_C(val) val##ui64 + +// 7.18.4.2 Macros for greatest-width integer constants +// These #ifndef's are needed to prevent collisions with . +// Check out Issue 9 for the details. +#ifndef INTMAX_C // [ +# define INTMAX_C INT64_C +#endif // INTMAX_C ] +#ifndef UINTMAX_C // [ +# define UINTMAX_C UINT64_C +#endif // UINTMAX_C ] + +#endif // __STDC_CONSTANT_MACROS ] + +#endif // _MSC_VER >= 1600 ] + +#endif // _MSC_STDINT_H_ ] diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/ostreamwrapper.h b/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/ostreamwrapper.h new file mode 100644 index 0000000000..11ed4d33f9 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/ostreamwrapper.h @@ -0,0 +1,81 @@ +// Tencent is pleased to support the open source community by making RapidJSON available. +// +// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. +// +// Licensed under the MIT License (the "License"); you may not use this file except +// in compliance with the License. You may obtain a copy of the License at +// +// http://opensource.org/licenses/MIT +// +// Unless required by applicable law or agreed to in writing, software distributed +// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +// CONDITIONS OF ANY KIND, either express or implied. See the License for the +// specific language governing permissions and limitations under the License. + +#ifndef RAPIDJSON_OSTREAMWRAPPER_H_ +#define RAPIDJSON_OSTREAMWRAPPER_H_ + +#include "stream.h" +#include + +#ifdef __clang__ +RAPIDJSON_DIAG_PUSH +RAPIDJSON_DIAG_OFF(padded) +#endif + +RAPIDJSON_NAMESPACE_BEGIN + +//! Wrapper of \c std::basic_ostream into RapidJSON's Stream concept. +/*! + The classes can be wrapped including but not limited to: + + - \c std::ostringstream + - \c std::stringstream + - \c std::wpstringstream + - \c std::wstringstream + - \c std::ifstream + - \c std::fstream + - \c std::wofstream + - \c std::wfstream + + \tparam StreamType Class derived from \c std::basic_ostream. +*/ + +template +class BasicOStreamWrapper { +public: + typedef typename StreamType::char_type Ch; + BasicOStreamWrapper(StreamType& stream) : stream_(stream) {} + + void Put(Ch c) { + stream_.put(c); + } + + void Flush() { + stream_.flush(); + } + + // Not implemented + char Peek() const { RAPIDJSON_ASSERT(false); return 0; } + char Take() { RAPIDJSON_ASSERT(false); return 0; } + size_t Tell() const { RAPIDJSON_ASSERT(false); return 0; } + char* PutBegin() { RAPIDJSON_ASSERT(false); return 0; } + size_t PutEnd(char*) { RAPIDJSON_ASSERT(false); return 0; } + +private: + BasicOStreamWrapper(const BasicOStreamWrapper&); + BasicOStreamWrapper& operator=(const BasicOStreamWrapper&); + + StreamType& stream_; +}; + +typedef BasicOStreamWrapper OStreamWrapper; +typedef BasicOStreamWrapper WOStreamWrapper; + +#ifdef __clang__ +RAPIDJSON_DIAG_POP +#endif + +RAPIDJSON_NAMESPACE_END + +#endif // RAPIDJSON_OSTREAMWRAPPER_H_ diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/pointer.h b/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/pointer.h new file mode 100644 index 0000000000..67a9cb0768 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/pointer.h @@ -0,0 +1,1482 @@ +// Tencent is pleased to support the open source community by making RapidJSON available. +// +// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. +// +// Licensed under the MIT License (the "License"); you may not use this file except +// in compliance with the License. You may obtain a copy of the License at +// +// http://opensource.org/licenses/MIT +// +// Unless required by applicable law or agreed to in writing, software distributed +// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +// CONDITIONS OF ANY KIND, either express or implied. See the License for the +// specific language governing permissions and limitations under the License. + +#ifndef RAPIDJSON_POINTER_H_ +#define RAPIDJSON_POINTER_H_ + +#include "document.h" +#include "uri.h" +#include "internal/itoa.h" + +#ifdef __clang__ +RAPIDJSON_DIAG_PUSH +RAPIDJSON_DIAG_OFF(switch-enum) +#elif defined(_MSC_VER) +RAPIDJSON_DIAG_PUSH +RAPIDJSON_DIAG_OFF(4512) // assignment operator could not be generated +#endif + +RAPIDJSON_NAMESPACE_BEGIN + +static const SizeType kPointerInvalidIndex = ~SizeType(0); //!< Represents an invalid index in GenericPointer::Token + +//! Error code of parsing. +/*! \ingroup RAPIDJSON_ERRORS + \see GenericPointer::GenericPointer, GenericPointer::GetParseErrorCode +*/ +enum PointerParseErrorCode { + kPointerParseErrorNone = 0, //!< The parse is successful + + kPointerParseErrorTokenMustBeginWithSolidus, //!< A token must begin with a '/' + kPointerParseErrorInvalidEscape, //!< Invalid escape + kPointerParseErrorInvalidPercentEncoding, //!< Invalid percent encoding in URI fragment + kPointerParseErrorCharacterMustPercentEncode //!< A character must percent encoded in URI fragment +}; + +/////////////////////////////////////////////////////////////////////////////// +// GenericPointer + +//! Represents a JSON Pointer. Use Pointer for UTF8 encoding and default allocator. +/*! + This class implements RFC 6901 "JavaScript Object Notation (JSON) Pointer" + (https://tools.ietf.org/html/rfc6901). + + A JSON pointer is for identifying a specific value in a JSON document + (GenericDocument). It can simplify coding of DOM tree manipulation, because it + can access multiple-level depth of DOM tree with single API call. + + After it parses a string representation (e.g. "/foo/0" or URI fragment + representation (e.g. "#/foo/0") into its internal representation (tokens), + it can be used to resolve a specific value in multiple documents, or sub-tree + of documents. + + Contrary to GenericValue, Pointer can be copy constructed and copy assigned. + Apart from assignment, a Pointer cannot be modified after construction. + + Although Pointer is very convenient, please aware that constructing Pointer + involves parsing and dynamic memory allocation. A special constructor with user- + supplied tokens eliminates these. + + GenericPointer depends on GenericDocument and GenericValue. + + \tparam ValueType The value type of the DOM tree. E.g. GenericValue > + \tparam Allocator The allocator type for allocating memory for internal representation. + + \note GenericPointer uses same encoding of ValueType. + However, Allocator of GenericPointer is independent of Allocator of Value. +*/ +template +class GenericPointer { +public: + typedef typename ValueType::EncodingType EncodingType; //!< Encoding type from Value + typedef typename ValueType::Ch Ch; //!< Character type from Value + typedef GenericUri UriType; + + + //! A token is the basic units of internal representation. + /*! + A JSON pointer string representation "/foo/123" is parsed to two tokens: + "foo" and 123. 123 will be represented in both numeric form and string form. + They are resolved according to the actual value type (object or array). + + For token that are not numbers, or the numeric value is out of bound + (greater than limits of SizeType), they are only treated as string form + (i.e. the token's index will be equal to kPointerInvalidIndex). + + This struct is public so that user can create a Pointer without parsing and + allocation, using a special constructor. + */ + struct Token { + const Ch* name; //!< Name of the token. It has null character at the end but it can contain null character. + SizeType length; //!< Length of the name. + SizeType index; //!< A valid array index, if it is not equal to kPointerInvalidIndex. + }; + + //!@name Constructors and destructor. + //@{ + + //! Default constructor. + GenericPointer(Allocator* allocator = 0) : allocator_(allocator), ownAllocator_(), nameBuffer_(), tokens_(), tokenCount_(), parseErrorOffset_(), parseErrorCode_(kPointerParseErrorNone) {} + + //! Constructor that parses a string or URI fragment representation. + /*! + \param source A null-terminated, string or URI fragment representation of JSON pointer. + \param allocator User supplied allocator for this pointer. If no allocator is provided, it creates a self-owned one. + */ + explicit GenericPointer(const Ch* source, Allocator* allocator = 0) : allocator_(allocator), ownAllocator_(), nameBuffer_(), tokens_(), tokenCount_(), parseErrorOffset_(), parseErrorCode_(kPointerParseErrorNone) { + Parse(source, internal::StrLen(source)); + } + +#if RAPIDJSON_HAS_STDSTRING + //! Constructor that parses a string or URI fragment representation. + /*! + \param source A string or URI fragment representation of JSON pointer. + \param allocator User supplied allocator for this pointer. If no allocator is provided, it creates a self-owned one. + \note Requires the definition of the preprocessor symbol \ref RAPIDJSON_HAS_STDSTRING. + */ + explicit GenericPointer(const std::basic_string& source, Allocator* allocator = 0) : allocator_(allocator), ownAllocator_(), nameBuffer_(), tokens_(), tokenCount_(), parseErrorOffset_(), parseErrorCode_(kPointerParseErrorNone) { + Parse(source.c_str(), source.size()); + } +#endif + + //! Constructor that parses a string or URI fragment representation, with length of the source string. + /*! + \param source A string or URI fragment representation of JSON pointer. + \param length Length of source. + \param allocator User supplied allocator for this pointer. If no allocator is provided, it creates a self-owned one. + \note Slightly faster than the overload without length. + */ + GenericPointer(const Ch* source, size_t length, Allocator* allocator = 0) : allocator_(allocator), ownAllocator_(), nameBuffer_(), tokens_(), tokenCount_(), parseErrorOffset_(), parseErrorCode_(kPointerParseErrorNone) { + Parse(source, length); + } + + //! Constructor with user-supplied tokens. + /*! + This constructor let user supplies const array of tokens. + This prevents the parsing process and eliminates allocation. + This is preferred for memory constrained environments. + + \param tokens An constant array of tokens representing the JSON pointer. + \param tokenCount Number of tokens. + + \b Example + \code + #define NAME(s) { s, sizeof(s) / sizeof(s[0]) - 1, kPointerInvalidIndex } + #define INDEX(i) { #i, sizeof(#i) - 1, i } + + static const Pointer::Token kTokens[] = { NAME("foo"), INDEX(123) }; + static const Pointer p(kTokens, sizeof(kTokens) / sizeof(kTokens[0])); + // Equivalent to static const Pointer p("/foo/123"); + + #undef NAME + #undef INDEX + \endcode + */ + GenericPointer(const Token* tokens, size_t tokenCount) : allocator_(), ownAllocator_(), nameBuffer_(), tokens_(const_cast(tokens)), tokenCount_(tokenCount), parseErrorOffset_(), parseErrorCode_(kPointerParseErrorNone) {} + + //! Copy constructor. + GenericPointer(const GenericPointer& rhs) : allocator_(), ownAllocator_(), nameBuffer_(), tokens_(), tokenCount_(), parseErrorOffset_(), parseErrorCode_(kPointerParseErrorNone) { + *this = rhs; + } + + //! Copy constructor. + GenericPointer(const GenericPointer& rhs, Allocator* allocator) : allocator_(allocator), ownAllocator_(), nameBuffer_(), tokens_(), tokenCount_(), parseErrorOffset_(), parseErrorCode_(kPointerParseErrorNone) { + *this = rhs; + } + + //! Destructor. + ~GenericPointer() { + if (nameBuffer_) // If user-supplied tokens constructor is used, nameBuffer_ is nullptr and tokens_ are not deallocated. + Allocator::Free(tokens_); + RAPIDJSON_DELETE(ownAllocator_); + } + + //! Assignment operator. + GenericPointer& operator=(const GenericPointer& rhs) { + if (this != &rhs) { + // Do not delete ownAllcator + if (nameBuffer_) + Allocator::Free(tokens_); + + tokenCount_ = rhs.tokenCount_; + parseErrorOffset_ = rhs.parseErrorOffset_; + parseErrorCode_ = rhs.parseErrorCode_; + + if (rhs.nameBuffer_) + CopyFromRaw(rhs); // Normally parsed tokens. + else { + tokens_ = rhs.tokens_; // User supplied const tokens. + nameBuffer_ = 0; + } + } + return *this; + } + + //! Swap the content of this pointer with an other. + /*! + \param other The pointer to swap with. + \note Constant complexity. + */ + GenericPointer& Swap(GenericPointer& other) RAPIDJSON_NOEXCEPT { + internal::Swap(allocator_, other.allocator_); + internal::Swap(ownAllocator_, other.ownAllocator_); + internal::Swap(nameBuffer_, other.nameBuffer_); + internal::Swap(tokens_, other.tokens_); + internal::Swap(tokenCount_, other.tokenCount_); + internal::Swap(parseErrorOffset_, other.parseErrorOffset_); + internal::Swap(parseErrorCode_, other.parseErrorCode_); + return *this; + } + + //! free-standing swap function helper + /*! + Helper function to enable support for common swap implementation pattern based on \c std::swap: + \code + void swap(MyClass& a, MyClass& b) { + using std::swap; + swap(a.pointer, b.pointer); + // ... + } + \endcode + \see Swap() + */ + friend inline void swap(GenericPointer& a, GenericPointer& b) RAPIDJSON_NOEXCEPT { a.Swap(b); } + + //@} + + //!@name Append token + //@{ + + //! Append a token and return a new Pointer + /*! + \param token Token to be appended. + \param allocator Allocator for the newly return Pointer. + \return A new Pointer with appended token. + */ + GenericPointer Append(const Token& token, Allocator* allocator = 0) const { + GenericPointer r; + r.allocator_ = allocator; + Ch *p = r.CopyFromRaw(*this, 1, token.length + 1); + std::memcpy(p, token.name, (token.length + 1) * sizeof(Ch)); + r.tokens_[tokenCount_].name = p; + r.tokens_[tokenCount_].length = token.length; + r.tokens_[tokenCount_].index = token.index; + return r; + } + + //! Append a name token with length, and return a new Pointer + /*! + \param name Name to be appended. + \param length Length of name. + \param allocator Allocator for the newly return Pointer. + \return A new Pointer with appended token. + */ + GenericPointer Append(const Ch* name, SizeType length, Allocator* allocator = 0) const { + Token token = { name, length, kPointerInvalidIndex }; + return Append(token, allocator); + } + + //! Append a name token without length, and return a new Pointer + /*! + \param name Name (const Ch*) to be appended. + \param allocator Allocator for the newly return Pointer. + \return A new Pointer with appended token. + */ + template + RAPIDJSON_DISABLEIF_RETURN((internal::NotExpr::Type, Ch> >), (GenericPointer)) + Append(T* name, Allocator* allocator = 0) const { + return Append(name, internal::StrLen(name), allocator); + } + +#if RAPIDJSON_HAS_STDSTRING + //! Append a name token, and return a new Pointer + /*! + \param name Name to be appended. + \param allocator Allocator for the newly return Pointer. + \return A new Pointer with appended token. + */ + GenericPointer Append(const std::basic_string& name, Allocator* allocator = 0) const { + return Append(name.c_str(), static_cast(name.size()), allocator); + } +#endif + + //! Append a index token, and return a new Pointer + /*! + \param index Index to be appended. + \param allocator Allocator for the newly return Pointer. + \return A new Pointer with appended token. + */ + GenericPointer Append(SizeType index, Allocator* allocator = 0) const { + char buffer[21]; + char* end = sizeof(SizeType) == 4 ? internal::u32toa(index, buffer) : internal::u64toa(index, buffer); + SizeType length = static_cast(end - buffer); + buffer[length] = '\0'; + + if (sizeof(Ch) == 1) { + Token token = { reinterpret_cast(buffer), length, index }; + return Append(token, allocator); + } + else { + Ch name[21]; + for (size_t i = 0; i <= length; i++) + name[i] = static_cast(buffer[i]); + Token token = { name, length, index }; + return Append(token, allocator); + } + } + + //! Append a token by value, and return a new Pointer + /*! + \param token token to be appended. + \param allocator Allocator for the newly return Pointer. + \return A new Pointer with appended token. + */ + GenericPointer Append(const ValueType& token, Allocator* allocator = 0) const { + if (token.IsString()) + return Append(token.GetString(), token.GetStringLength(), allocator); + else { + RAPIDJSON_ASSERT(token.IsUint64()); + RAPIDJSON_ASSERT(token.GetUint64() <= SizeType(~0)); + return Append(static_cast(token.GetUint64()), allocator); + } + } + + //!@name Handling Parse Error + //@{ + + //! Check whether this is a valid pointer. + bool IsValid() const { return parseErrorCode_ == kPointerParseErrorNone; } + + //! Get the parsing error offset in code unit. + size_t GetParseErrorOffset() const { return parseErrorOffset_; } + + //! Get the parsing error code. + PointerParseErrorCode GetParseErrorCode() const { return parseErrorCode_; } + + //@} + + //! Get the allocator of this pointer. + Allocator& GetAllocator() { return *allocator_; } + + //!@name Tokens + //@{ + + //! Get the token array (const version only). + const Token* GetTokens() const { return tokens_; } + + //! Get the number of tokens. + size_t GetTokenCount() const { return tokenCount_; } + + //@} + + //!@name Equality/inequality operators + //@{ + + //! Equality operator. + /*! + \note When any pointers are invalid, always returns false. + */ + bool operator==(const GenericPointer& rhs) const { + if (!IsValid() || !rhs.IsValid() || tokenCount_ != rhs.tokenCount_) + return false; + + for (size_t i = 0; i < tokenCount_; i++) { + if (tokens_[i].index != rhs.tokens_[i].index || + tokens_[i].length != rhs.tokens_[i].length || + (tokens_[i].length != 0 && std::memcmp(tokens_[i].name, rhs.tokens_[i].name, sizeof(Ch)* tokens_[i].length) != 0)) + { + return false; + } + } + + return true; + } + + //! Inequality operator. + /*! + \note When any pointers are invalid, always returns true. + */ + bool operator!=(const GenericPointer& rhs) const { return !(*this == rhs); } + + //! Less than operator. + /*! + \note Invalid pointers are always greater than valid ones. + */ + bool operator<(const GenericPointer& rhs) const { + if (!IsValid()) + return false; + if (!rhs.IsValid()) + return true; + + if (tokenCount_ != rhs.tokenCount_) + return tokenCount_ < rhs.tokenCount_; + + for (size_t i = 0; i < tokenCount_; i++) { + if (tokens_[i].index != rhs.tokens_[i].index) + return tokens_[i].index < rhs.tokens_[i].index; + + if (tokens_[i].length != rhs.tokens_[i].length) + return tokens_[i].length < rhs.tokens_[i].length; + + if (int cmp = std::memcmp(tokens_[i].name, rhs.tokens_[i].name, sizeof(Ch) * tokens_[i].length)) + return cmp < 0; + } + + return false; + } + + //@} + + //!@name Stringify + //@{ + + //! Stringify the pointer into string representation. + /*! + \tparam OutputStream Type of output stream. + \param os The output stream. + */ + template + bool Stringify(OutputStream& os) const { + return Stringify(os); + } + + //! Stringify the pointer into URI fragment representation. + /*! + \tparam OutputStream Type of output stream. + \param os The output stream. + */ + template + bool StringifyUriFragment(OutputStream& os) const { + return Stringify(os); + } + + //@} + + //!@name Create value + //@{ + + //! Create a value in a subtree. + /*! + If the value is not exist, it creates all parent values and a JSON Null value. + So it always succeed and return the newly created or existing value. + + Remind that it may change types of parents according to tokens, so it + potentially removes previously stored values. For example, if a document + was an array, and "/foo" is used to create a value, then the document + will be changed to an object, and all existing array elements are lost. + + \param root Root value of a DOM subtree to be resolved. It can be any value other than document root. + \param allocator Allocator for creating the values if the specified value or its parents are not exist. + \param alreadyExist If non-null, it stores whether the resolved value is already exist. + \return The resolved newly created (a JSON Null value), or already exists value. + */ + ValueType& Create(ValueType& root, typename ValueType::AllocatorType& allocator, bool* alreadyExist = 0) const { + RAPIDJSON_ASSERT(IsValid()); + ValueType* v = &root; + bool exist = true; + for (const Token *t = tokens_; t != tokens_ + tokenCount_; ++t) { + if (v->IsArray() && t->name[0] == '-' && t->length == 1) { + v->PushBack(ValueType().Move(), allocator); + v = &((*v)[v->Size() - 1]); + exist = false; + } + else { + if (t->index == kPointerInvalidIndex) { // must be object name + if (!v->IsObject()) + v->SetObject(); // Change to Object + } + else { // object name or array index + if (!v->IsArray() && !v->IsObject()) + v->SetArray(); // Change to Array + } + + if (v->IsArray()) { + if (t->index >= v->Size()) { + v->Reserve(t->index + 1, allocator); + while (t->index >= v->Size()) + v->PushBack(ValueType().Move(), allocator); + exist = false; + } + v = &((*v)[t->index]); + } + else { + typename ValueType::MemberIterator m = v->FindMember(GenericValue(GenericStringRef(t->name, t->length))); + if (m == v->MemberEnd()) { + v->AddMember(ValueType(t->name, t->length, allocator).Move(), ValueType().Move(), allocator); + m = v->MemberEnd(); + v = &(--m)->value; // Assumes AddMember() appends at the end + exist = false; + } + else + v = &m->value; + } + } + } + + if (alreadyExist) + *alreadyExist = exist; + + return *v; + } + + //! Creates a value in a document. + /*! + \param document A document to be resolved. + \param alreadyExist If non-null, it stores whether the resolved value is already exist. + \return The resolved newly created, or already exists value. + */ + template + ValueType& Create(GenericDocument& document, bool* alreadyExist = 0) const { + return Create(document, document.GetAllocator(), alreadyExist); + } + + //@} + + //!@name Compute URI + //@{ + + //! Compute the in-scope URI for a subtree. + // For use with JSON pointers into JSON schema documents. + /*! + \param root Root value of a DOM sub-tree to be resolved. It can be any value other than document root. + \param rootUri Root URI + \param unresolvedTokenIndex If the pointer cannot resolve a token in the pointer, this parameter can obtain the index of unresolved token. + \param allocator Allocator for Uris + \return Uri if it can be resolved. Otherwise null. + + \note + There are only 3 situations when a URI cannot be resolved: + 1. A value in the path is not an array nor object. + 2. An object value does not contain the token. + 3. A token is out of range of an array value. + + Use unresolvedTokenIndex to retrieve the token index. + */ + UriType GetUri(ValueType& root, const UriType& rootUri, size_t* unresolvedTokenIndex = 0, Allocator* allocator = 0) const { + static const Ch kIdString[] = { 'i', 'd', '\0' }; + static const ValueType kIdValue(kIdString, 2); + UriType base = UriType(rootUri, allocator); + RAPIDJSON_ASSERT(IsValid()); + ValueType* v = &root; + for (const Token *t = tokens_; t != tokens_ + tokenCount_; ++t) { + switch (v->GetType()) { + case kObjectType: + { + // See if we have an id, and if so resolve with the current base + typename ValueType::MemberIterator m = v->FindMember(kIdValue); + if (m != v->MemberEnd() && (m->value).IsString()) { + UriType here = UriType(m->value, allocator).Resolve(base, allocator); + base = here; + } + m = v->FindMember(GenericValue(GenericStringRef(t->name, t->length))); + if (m == v->MemberEnd()) + break; + v = &m->value; + } + continue; + case kArrayType: + if (t->index == kPointerInvalidIndex || t->index >= v->Size()) + break; + v = &((*v)[t->index]); + continue; + default: + break; + } + + // Error: unresolved token + if (unresolvedTokenIndex) + *unresolvedTokenIndex = static_cast(t - tokens_); + return UriType(allocator); + } + return base; + } + + UriType GetUri(const ValueType& root, const UriType& rootUri, size_t* unresolvedTokenIndex = 0, Allocator* allocator = 0) const { + return GetUri(const_cast(root), rootUri, unresolvedTokenIndex, allocator); + } + + + //!@name Query value + //@{ + + //! Query a value in a subtree. + /*! + \param root Root value of a DOM sub-tree to be resolved. It can be any value other than document root. + \param unresolvedTokenIndex If the pointer cannot resolve a token in the pointer, this parameter can obtain the index of unresolved token. + \return Pointer to the value if it can be resolved. Otherwise null. + + \note + There are only 3 situations when a value cannot be resolved: + 1. A value in the path is not an array nor object. + 2. An object value does not contain the token. + 3. A token is out of range of an array value. + + Use unresolvedTokenIndex to retrieve the token index. + */ + ValueType* Get(ValueType& root, size_t* unresolvedTokenIndex = 0) const { + RAPIDJSON_ASSERT(IsValid()); + ValueType* v = &root; + for (const Token *t = tokens_; t != tokens_ + tokenCount_; ++t) { + switch (v->GetType()) { + case kObjectType: + { + typename ValueType::MemberIterator m = v->FindMember(GenericValue(GenericStringRef(t->name, t->length))); + if (m == v->MemberEnd()) + break; + v = &m->value; + } + continue; + case kArrayType: + if (t->index == kPointerInvalidIndex || t->index >= v->Size()) + break; + v = &((*v)[t->index]); + continue; + default: + break; + } + + // Error: unresolved token + if (unresolvedTokenIndex) + *unresolvedTokenIndex = static_cast(t - tokens_); + return 0; + } + return v; + } + + //! Query a const value in a const subtree. + /*! + \param root Root value of a DOM sub-tree to be resolved. It can be any value other than document root. + \return Pointer to the value if it can be resolved. Otherwise null. + */ + const ValueType* Get(const ValueType& root, size_t* unresolvedTokenIndex = 0) const { + return Get(const_cast(root), unresolvedTokenIndex); + } + + //@} + + //!@name Query a value with default + //@{ + + //! Query a value in a subtree with default value. + /*! + Similar to Get(), but if the specified value do not exists, it creates all parents and clone the default value. + So that this function always succeed. + + \param root Root value of a DOM sub-tree to be resolved. It can be any value other than document root. + \param defaultValue Default value to be cloned if the value was not exists. + \param allocator Allocator for creating the values if the specified value or its parents are not exist. + \see Create() + */ + ValueType& GetWithDefault(ValueType& root, const ValueType& defaultValue, typename ValueType::AllocatorType& allocator) const { + bool alreadyExist; + ValueType& v = Create(root, allocator, &alreadyExist); + return alreadyExist ? v : v.CopyFrom(defaultValue, allocator); + } + + //! Query a value in a subtree with default null-terminated string. + ValueType& GetWithDefault(ValueType& root, const Ch* defaultValue, typename ValueType::AllocatorType& allocator) const { + bool alreadyExist; + ValueType& v = Create(root, allocator, &alreadyExist); + return alreadyExist ? v : v.SetString(defaultValue, allocator); + } + +#if RAPIDJSON_HAS_STDSTRING + //! Query a value in a subtree with default std::basic_string. + ValueType& GetWithDefault(ValueType& root, const std::basic_string& defaultValue, typename ValueType::AllocatorType& allocator) const { + bool alreadyExist; + ValueType& v = Create(root, allocator, &alreadyExist); + return alreadyExist ? v : v.SetString(defaultValue, allocator); + } +#endif + + //! Query a value in a subtree with default primitive value. + /*! + \tparam T Either \ref Type, \c int, \c unsigned, \c int64_t, \c uint64_t, \c bool + */ + template + RAPIDJSON_DISABLEIF_RETURN((internal::OrExpr, internal::IsGenericValue >), (ValueType&)) + GetWithDefault(ValueType& root, T defaultValue, typename ValueType::AllocatorType& allocator) const { + return GetWithDefault(root, ValueType(defaultValue).Move(), allocator); + } + + //! Query a value in a document with default value. + template + ValueType& GetWithDefault(GenericDocument& document, const ValueType& defaultValue) const { + return GetWithDefault(document, defaultValue, document.GetAllocator()); + } + + //! Query a value in a document with default null-terminated string. + template + ValueType& GetWithDefault(GenericDocument& document, const Ch* defaultValue) const { + return GetWithDefault(document, defaultValue, document.GetAllocator()); + } + +#if RAPIDJSON_HAS_STDSTRING + //! Query a value in a document with default std::basic_string. + template + ValueType& GetWithDefault(GenericDocument& document, const std::basic_string& defaultValue) const { + return GetWithDefault(document, defaultValue, document.GetAllocator()); + } +#endif + + //! Query a value in a document with default primitive value. + /*! + \tparam T Either \ref Type, \c int, \c unsigned, \c int64_t, \c uint64_t, \c bool + */ + template + RAPIDJSON_DISABLEIF_RETURN((internal::OrExpr, internal::IsGenericValue >), (ValueType&)) + GetWithDefault(GenericDocument& document, T defaultValue) const { + return GetWithDefault(document, defaultValue, document.GetAllocator()); + } + + //@} + + //!@name Set a value + //@{ + + //! Set a value in a subtree, with move semantics. + /*! + It creates all parents if they are not exist or types are different to the tokens. + So this function always succeeds but potentially remove existing values. + + \param root Root value of a DOM sub-tree to be resolved. It can be any value other than document root. + \param value Value to be set. + \param allocator Allocator for creating the values if the specified value or its parents are not exist. + \see Create() + */ + ValueType& Set(ValueType& root, ValueType& value, typename ValueType::AllocatorType& allocator) const { + return Create(root, allocator) = value; + } + + //! Set a value in a subtree, with copy semantics. + ValueType& Set(ValueType& root, const ValueType& value, typename ValueType::AllocatorType& allocator) const { + return Create(root, allocator).CopyFrom(value, allocator); + } + + //! Set a null-terminated string in a subtree. + ValueType& Set(ValueType& root, const Ch* value, typename ValueType::AllocatorType& allocator) const { + return Create(root, allocator) = ValueType(value, allocator).Move(); + } + +#if RAPIDJSON_HAS_STDSTRING + //! Set a std::basic_string in a subtree. + ValueType& Set(ValueType& root, const std::basic_string& value, typename ValueType::AllocatorType& allocator) const { + return Create(root, allocator) = ValueType(value, allocator).Move(); + } +#endif + + //! Set a primitive value in a subtree. + /*! + \tparam T Either \ref Type, \c int, \c unsigned, \c int64_t, \c uint64_t, \c bool + */ + template + RAPIDJSON_DISABLEIF_RETURN((internal::OrExpr, internal::IsGenericValue >), (ValueType&)) + Set(ValueType& root, T value, typename ValueType::AllocatorType& allocator) const { + return Create(root, allocator) = ValueType(value).Move(); + } + + //! Set a value in a document, with move semantics. + template + ValueType& Set(GenericDocument& document, ValueType& value) const { + return Create(document) = value; + } + + //! Set a value in a document, with copy semantics. + template + ValueType& Set(GenericDocument& document, const ValueType& value) const { + return Create(document).CopyFrom(value, document.GetAllocator()); + } + + //! Set a null-terminated string in a document. + template + ValueType& Set(GenericDocument& document, const Ch* value) const { + return Create(document) = ValueType(value, document.GetAllocator()).Move(); + } + +#if RAPIDJSON_HAS_STDSTRING + //! Sets a std::basic_string in a document. + template + ValueType& Set(GenericDocument& document, const std::basic_string& value) const { + return Create(document) = ValueType(value, document.GetAllocator()).Move(); + } +#endif + + //! Set a primitive value in a document. + /*! + \tparam T Either \ref Type, \c int, \c unsigned, \c int64_t, \c uint64_t, \c bool + */ + template + RAPIDJSON_DISABLEIF_RETURN((internal::OrExpr, internal::IsGenericValue >), (ValueType&)) + Set(GenericDocument& document, T value) const { + return Create(document) = value; + } + + //@} + + //!@name Swap a value + //@{ + + //! Swap a value with a value in a subtree. + /*! + It creates all parents if they are not exist or types are different to the tokens. + So this function always succeeds but potentially remove existing values. + + \param root Root value of a DOM sub-tree to be resolved. It can be any value other than document root. + \param value Value to be swapped. + \param allocator Allocator for creating the values if the specified value or its parents are not exist. + \see Create() + */ + ValueType& Swap(ValueType& root, ValueType& value, typename ValueType::AllocatorType& allocator) const { + return Create(root, allocator).Swap(value); + } + + //! Swap a value with a value in a document. + template + ValueType& Swap(GenericDocument& document, ValueType& value) const { + return Create(document).Swap(value); + } + + //@} + + //! Erase a value in a subtree. + /*! + \param root Root value of a DOM sub-tree to be resolved. It can be any value other than document root. + \return Whether the resolved value is found and erased. + + \note Erasing with an empty pointer \c Pointer(""), i.e. the root, always fail and return false. + */ + bool Erase(ValueType& root) const { + RAPIDJSON_ASSERT(IsValid()); + if (tokenCount_ == 0) // Cannot erase the root + return false; + + ValueType* v = &root; + const Token* last = tokens_ + (tokenCount_ - 1); + for (const Token *t = tokens_; t != last; ++t) { + switch (v->GetType()) { + case kObjectType: + { + typename ValueType::MemberIterator m = v->FindMember(GenericValue(GenericStringRef(t->name, t->length))); + if (m == v->MemberEnd()) + return false; + v = &m->value; + } + break; + case kArrayType: + if (t->index == kPointerInvalidIndex || t->index >= v->Size()) + return false; + v = &((*v)[t->index]); + break; + default: + return false; + } + } + + switch (v->GetType()) { + case kObjectType: + return v->EraseMember(GenericStringRef(last->name, last->length)); + case kArrayType: + if (last->index == kPointerInvalidIndex || last->index >= v->Size()) + return false; + v->Erase(v->Begin() + last->index); + return true; + default: + return false; + } + } + +private: + //! Clone the content from rhs to this. + /*! + \param rhs Source pointer. + \param extraToken Extra tokens to be allocated. + \param extraNameBufferSize Extra name buffer size (in number of Ch) to be allocated. + \return Start of non-occupied name buffer, for storing extra names. + */ + Ch* CopyFromRaw(const GenericPointer& rhs, size_t extraToken = 0, size_t extraNameBufferSize = 0) { + if (!allocator_) // allocator is independently owned. + ownAllocator_ = allocator_ = RAPIDJSON_NEW(Allocator)(); + + size_t nameBufferSize = rhs.tokenCount_; // null terminators for tokens + for (Token *t = rhs.tokens_; t != rhs.tokens_ + rhs.tokenCount_; ++t) + nameBufferSize += t->length; + + tokenCount_ = rhs.tokenCount_ + extraToken; + tokens_ = static_cast(allocator_->Malloc(tokenCount_ * sizeof(Token) + (nameBufferSize + extraNameBufferSize) * sizeof(Ch))); + nameBuffer_ = reinterpret_cast(tokens_ + tokenCount_); + if (rhs.tokenCount_ > 0) { + std::memcpy(tokens_, rhs.tokens_, rhs.tokenCount_ * sizeof(Token)); + } + if (nameBufferSize > 0) { + std::memcpy(nameBuffer_, rhs.nameBuffer_, nameBufferSize * sizeof(Ch)); + } + + // Adjust pointers to name buffer + std::ptrdiff_t diff = nameBuffer_ - rhs.nameBuffer_; + for (Token *t = tokens_; t != tokens_ + rhs.tokenCount_; ++t) + t->name += diff; + + return nameBuffer_ + nameBufferSize; + } + + //! Check whether a character should be percent-encoded. + /*! + According to RFC 3986 2.3 Unreserved Characters. + \param c The character (code unit) to be tested. + */ + bool NeedPercentEncode(Ch c) const { + return !((c >= '0' && c <= '9') || (c >= 'A' && c <='Z') || (c >= 'a' && c <= 'z') || c == '-' || c == '.' || c == '_' || c =='~'); + } + + //! Parse a JSON String or its URI fragment representation into tokens. +#ifndef __clang__ // -Wdocumentation + /*! + \param source Either a JSON Pointer string, or its URI fragment representation. Not need to be null terminated. + \param length Length of the source string. + \note Source cannot be JSON String Representation of JSON Pointer, e.g. In "/\u0000", \u0000 will not be unescaped. + */ +#endif + void Parse(const Ch* source, size_t length) { + RAPIDJSON_ASSERT(source != NULL); + RAPIDJSON_ASSERT(nameBuffer_ == 0); + RAPIDJSON_ASSERT(tokens_ == 0); + + // Create own allocator if user did not supply. + if (!allocator_) + ownAllocator_ = allocator_ = RAPIDJSON_NEW(Allocator)(); + + // Count number of '/' as tokenCount + tokenCount_ = 0; + for (const Ch* s = source; s != source + length; s++) + if (*s == '/') + tokenCount_++; + + Token* token = tokens_ = static_cast(allocator_->Malloc(tokenCount_ * sizeof(Token) + length * sizeof(Ch))); + Ch* name = nameBuffer_ = reinterpret_cast(tokens_ + tokenCount_); + size_t i = 0; + + // Detect if it is a URI fragment + bool uriFragment = false; + if (source[i] == '#') { + uriFragment = true; + i++; + } + + if (i != length && source[i] != '/') { + parseErrorCode_ = kPointerParseErrorTokenMustBeginWithSolidus; + goto error; + } + + while (i < length) { + RAPIDJSON_ASSERT(source[i] == '/'); + i++; // consumes '/' + + token->name = name; + bool isNumber = true; + + while (i < length && source[i] != '/') { + Ch c = source[i]; + if (uriFragment) { + // Decoding percent-encoding for URI fragment + if (c == '%') { + PercentDecodeStream is(&source[i], source + length); + GenericInsituStringStream os(name); + Ch* begin = os.PutBegin(); + if (!Transcoder, EncodingType>().Validate(is, os) || !is.IsValid()) { + parseErrorCode_ = kPointerParseErrorInvalidPercentEncoding; + goto error; + } + size_t len = os.PutEnd(begin); + i += is.Tell() - 1; + if (len == 1) + c = *name; + else { + name += len; + isNumber = false; + i++; + continue; + } + } + else if (NeedPercentEncode(c)) { + parseErrorCode_ = kPointerParseErrorCharacterMustPercentEncode; + goto error; + } + } + + i++; + + // Escaping "~0" -> '~', "~1" -> '/' + if (c == '~') { + if (i < length) { + c = source[i]; + if (c == '0') c = '~'; + else if (c == '1') c = '/'; + else { + parseErrorCode_ = kPointerParseErrorInvalidEscape; + goto error; + } + i++; + } + else { + parseErrorCode_ = kPointerParseErrorInvalidEscape; + goto error; + } + } + + // First check for index: all of characters are digit + if (c < '0' || c > '9') + isNumber = false; + + *name++ = c; + } + token->length = static_cast(name - token->name); + if (token->length == 0) + isNumber = false; + *name++ = '\0'; // Null terminator + + // Second check for index: more than one digit cannot have leading zero + if (isNumber && token->length > 1 && token->name[0] == '0') + isNumber = false; + + // String to SizeType conversion + SizeType n = 0; + if (isNumber) { + for (size_t j = 0; j < token->length; j++) { + SizeType m = n * 10 + static_cast(token->name[j] - '0'); + if (m < n) { // overflow detection + isNumber = false; + break; + } + n = m; + } + } + + token->index = isNumber ? n : kPointerInvalidIndex; + token++; + } + + RAPIDJSON_ASSERT(name <= nameBuffer_ + length); // Should not overflow buffer + parseErrorCode_ = kPointerParseErrorNone; + return; + + error: + Allocator::Free(tokens_); + nameBuffer_ = 0; + tokens_ = 0; + tokenCount_ = 0; + parseErrorOffset_ = i; + return; + } + + //! Stringify to string or URI fragment representation. + /*! + \tparam uriFragment True for stringifying to URI fragment representation. False for string representation. + \tparam OutputStream type of output stream. + \param os The output stream. + */ + template + bool Stringify(OutputStream& os) const { + RAPIDJSON_ASSERT(IsValid()); + + if (uriFragment) + os.Put('#'); + + for (Token *t = tokens_; t != tokens_ + tokenCount_; ++t) { + os.Put('/'); + for (size_t j = 0; j < t->length; j++) { + Ch c = t->name[j]; + if (c == '~') { + os.Put('~'); + os.Put('0'); + } + else if (c == '/') { + os.Put('~'); + os.Put('1'); + } + else if (uriFragment && NeedPercentEncode(c)) { + // Transcode to UTF8 sequence + GenericStringStream source(&t->name[j]); + PercentEncodeStream target(os); + if (!Transcoder >().Validate(source, target)) + return false; + j += source.Tell() - 1; + } + else + os.Put(c); + } + } + return true; + } + + //! A helper stream for decoding a percent-encoded sequence into code unit. + /*! + This stream decodes %XY triplet into code unit (0-255). + If it encounters invalid characters, it sets output code unit as 0 and + mark invalid, and to be checked by IsValid(). + */ + class PercentDecodeStream { + public: + typedef typename ValueType::Ch Ch; + + //! Constructor + /*! + \param source Start of the stream + \param end Past-the-end of the stream. + */ + PercentDecodeStream(const Ch* source, const Ch* end) : src_(source), head_(source), end_(end), valid_(true) {} + + Ch Take() { + if (*src_ != '%' || src_ + 3 > end_) { // %XY triplet + valid_ = false; + return 0; + } + src_++; + Ch c = 0; + for (int j = 0; j < 2; j++) { + c = static_cast(c << 4); + Ch h = *src_; + if (h >= '0' && h <= '9') c = static_cast(c + h - '0'); + else if (h >= 'A' && h <= 'F') c = static_cast(c + h - 'A' + 10); + else if (h >= 'a' && h <= 'f') c = static_cast(c + h - 'a' + 10); + else { + valid_ = false; + return 0; + } + src_++; + } + return c; + } + + size_t Tell() const { return static_cast(src_ - head_); } + bool IsValid() const { return valid_; } + + private: + const Ch* src_; //!< Current read position. + const Ch* head_; //!< Original head of the string. + const Ch* end_; //!< Past-the-end position. + bool valid_; //!< Whether the parsing is valid. + }; + + //! A helper stream to encode character (UTF-8 code unit) into percent-encoded sequence. + template + class PercentEncodeStream { + public: + PercentEncodeStream(OutputStream& os) : os_(os) {} + void Put(char c) { // UTF-8 must be byte + unsigned char u = static_cast(c); + static const char hexDigits[16] = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' }; + os_.Put('%'); + os_.Put(static_cast(hexDigits[u >> 4])); + os_.Put(static_cast(hexDigits[u & 15])); + } + private: + OutputStream& os_; + }; + + Allocator* allocator_; //!< The current allocator. It is either user-supplied or equal to ownAllocator_. + Allocator* ownAllocator_; //!< Allocator owned by this Pointer. + Ch* nameBuffer_; //!< A buffer containing all names in tokens. + Token* tokens_; //!< A list of tokens. + size_t tokenCount_; //!< Number of tokens in tokens_. + size_t parseErrorOffset_; //!< Offset in code unit when parsing fail. + PointerParseErrorCode parseErrorCode_; //!< Parsing error code. +}; + +//! GenericPointer for Value (UTF-8, default allocator). +typedef GenericPointer Pointer; + +//!@name Helper functions for GenericPointer +//@{ + +////////////////////////////////////////////////////////////////////////////// + +template +typename T::ValueType& CreateValueByPointer(T& root, const GenericPointer& pointer, typename T::AllocatorType& a) { + return pointer.Create(root, a); +} + +template +typename T::ValueType& CreateValueByPointer(T& root, const CharType(&source)[N], typename T::AllocatorType& a) { + return GenericPointer(source, N - 1).Create(root, a); +} + +// No allocator parameter + +template +typename DocumentType::ValueType& CreateValueByPointer(DocumentType& document, const GenericPointer& pointer) { + return pointer.Create(document); +} + +template +typename DocumentType::ValueType& CreateValueByPointer(DocumentType& document, const CharType(&source)[N]) { + return GenericPointer(source, N - 1).Create(document); +} + +////////////////////////////////////////////////////////////////////////////// + +template +typename T::ValueType* GetValueByPointer(T& root, const GenericPointer& pointer, size_t* unresolvedTokenIndex = 0) { + return pointer.Get(root, unresolvedTokenIndex); +} + +template +const typename T::ValueType* GetValueByPointer(const T& root, const GenericPointer& pointer, size_t* unresolvedTokenIndex = 0) { + return pointer.Get(root, unresolvedTokenIndex); +} + +template +typename T::ValueType* GetValueByPointer(T& root, const CharType (&source)[N], size_t* unresolvedTokenIndex = 0) { + return GenericPointer(source, N - 1).Get(root, unresolvedTokenIndex); +} + +template +const typename T::ValueType* GetValueByPointer(const T& root, const CharType(&source)[N], size_t* unresolvedTokenIndex = 0) { + return GenericPointer(source, N - 1).Get(root, unresolvedTokenIndex); +} + +////////////////////////////////////////////////////////////////////////////// + +template +typename T::ValueType& GetValueByPointerWithDefault(T& root, const GenericPointer& pointer, const typename T::ValueType& defaultValue, typename T::AllocatorType& a) { + return pointer.GetWithDefault(root, defaultValue, a); +} + +template +typename T::ValueType& GetValueByPointerWithDefault(T& root, const GenericPointer& pointer, const typename T::Ch* defaultValue, typename T::AllocatorType& a) { + return pointer.GetWithDefault(root, defaultValue, a); +} + +#if RAPIDJSON_HAS_STDSTRING +template +typename T::ValueType& GetValueByPointerWithDefault(T& root, const GenericPointer& pointer, const std::basic_string& defaultValue, typename T::AllocatorType& a) { + return pointer.GetWithDefault(root, defaultValue, a); +} +#endif + +template +RAPIDJSON_DISABLEIF_RETURN((internal::OrExpr, internal::IsGenericValue >), (typename T::ValueType&)) +GetValueByPointerWithDefault(T& root, const GenericPointer& pointer, T2 defaultValue, typename T::AllocatorType& a) { + return pointer.GetWithDefault(root, defaultValue, a); +} + +template +typename T::ValueType& GetValueByPointerWithDefault(T& root, const CharType(&source)[N], const typename T::ValueType& defaultValue, typename T::AllocatorType& a) { + return GenericPointer(source, N - 1).GetWithDefault(root, defaultValue, a); +} + +template +typename T::ValueType& GetValueByPointerWithDefault(T& root, const CharType(&source)[N], const typename T::Ch* defaultValue, typename T::AllocatorType& a) { + return GenericPointer(source, N - 1).GetWithDefault(root, defaultValue, a); +} + +#if RAPIDJSON_HAS_STDSTRING +template +typename T::ValueType& GetValueByPointerWithDefault(T& root, const CharType(&source)[N], const std::basic_string& defaultValue, typename T::AllocatorType& a) { + return GenericPointer(source, N - 1).GetWithDefault(root, defaultValue, a); +} +#endif + +template +RAPIDJSON_DISABLEIF_RETURN((internal::OrExpr, internal::IsGenericValue >), (typename T::ValueType&)) +GetValueByPointerWithDefault(T& root, const CharType(&source)[N], T2 defaultValue, typename T::AllocatorType& a) { + return GenericPointer(source, N - 1).GetWithDefault(root, defaultValue, a); +} + +// No allocator parameter + +template +typename DocumentType::ValueType& GetValueByPointerWithDefault(DocumentType& document, const GenericPointer& pointer, const typename DocumentType::ValueType& defaultValue) { + return pointer.GetWithDefault(document, defaultValue); +} + +template +typename DocumentType::ValueType& GetValueByPointerWithDefault(DocumentType& document, const GenericPointer& pointer, const typename DocumentType::Ch* defaultValue) { + return pointer.GetWithDefault(document, defaultValue); +} + +#if RAPIDJSON_HAS_STDSTRING +template +typename DocumentType::ValueType& GetValueByPointerWithDefault(DocumentType& document, const GenericPointer& pointer, const std::basic_string& defaultValue) { + return pointer.GetWithDefault(document, defaultValue); +} +#endif + +template +RAPIDJSON_DISABLEIF_RETURN((internal::OrExpr, internal::IsGenericValue >), (typename DocumentType::ValueType&)) +GetValueByPointerWithDefault(DocumentType& document, const GenericPointer& pointer, T2 defaultValue) { + return pointer.GetWithDefault(document, defaultValue); +} + +template +typename DocumentType::ValueType& GetValueByPointerWithDefault(DocumentType& document, const CharType(&source)[N], const typename DocumentType::ValueType& defaultValue) { + return GenericPointer(source, N - 1).GetWithDefault(document, defaultValue); +} + +template +typename DocumentType::ValueType& GetValueByPointerWithDefault(DocumentType& document, const CharType(&source)[N], const typename DocumentType::Ch* defaultValue) { + return GenericPointer(source, N - 1).GetWithDefault(document, defaultValue); +} + +#if RAPIDJSON_HAS_STDSTRING +template +typename DocumentType::ValueType& GetValueByPointerWithDefault(DocumentType& document, const CharType(&source)[N], const std::basic_string& defaultValue) { + return GenericPointer(source, N - 1).GetWithDefault(document, defaultValue); +} +#endif + +template +RAPIDJSON_DISABLEIF_RETURN((internal::OrExpr, internal::IsGenericValue >), (typename DocumentType::ValueType&)) +GetValueByPointerWithDefault(DocumentType& document, const CharType(&source)[N], T2 defaultValue) { + return GenericPointer(source, N - 1).GetWithDefault(document, defaultValue); +} + +////////////////////////////////////////////////////////////////////////////// + +template +typename T::ValueType& SetValueByPointer(T& root, const GenericPointer& pointer, typename T::ValueType& value, typename T::AllocatorType& a) { + return pointer.Set(root, value, a); +} + +template +typename T::ValueType& SetValueByPointer(T& root, const GenericPointer& pointer, const typename T::ValueType& value, typename T::AllocatorType& a) { + return pointer.Set(root, value, a); +} + +template +typename T::ValueType& SetValueByPointer(T& root, const GenericPointer& pointer, const typename T::Ch* value, typename T::AllocatorType& a) { + return pointer.Set(root, value, a); +} + +#if RAPIDJSON_HAS_STDSTRING +template +typename T::ValueType& SetValueByPointer(T& root, const GenericPointer& pointer, const std::basic_string& value, typename T::AllocatorType& a) { + return pointer.Set(root, value, a); +} +#endif + +template +RAPIDJSON_DISABLEIF_RETURN((internal::OrExpr, internal::IsGenericValue >), (typename T::ValueType&)) +SetValueByPointer(T& root, const GenericPointer& pointer, T2 value, typename T::AllocatorType& a) { + return pointer.Set(root, value, a); +} + +template +typename T::ValueType& SetValueByPointer(T& root, const CharType(&source)[N], typename T::ValueType& value, typename T::AllocatorType& a) { + return GenericPointer(source, N - 1).Set(root, value, a); +} + +template +typename T::ValueType& SetValueByPointer(T& root, const CharType(&source)[N], const typename T::ValueType& value, typename T::AllocatorType& a) { + return GenericPointer(source, N - 1).Set(root, value, a); +} + +template +typename T::ValueType& SetValueByPointer(T& root, const CharType(&source)[N], const typename T::Ch* value, typename T::AllocatorType& a) { + return GenericPointer(source, N - 1).Set(root, value, a); +} + +#if RAPIDJSON_HAS_STDSTRING +template +typename T::ValueType& SetValueByPointer(T& root, const CharType(&source)[N], const std::basic_string& value, typename T::AllocatorType& a) { + return GenericPointer(source, N - 1).Set(root, value, a); +} +#endif + +template +RAPIDJSON_DISABLEIF_RETURN((internal::OrExpr, internal::IsGenericValue >), (typename T::ValueType&)) +SetValueByPointer(T& root, const CharType(&source)[N], T2 value, typename T::AllocatorType& a) { + return GenericPointer(source, N - 1).Set(root, value, a); +} + +// No allocator parameter + +template +typename DocumentType::ValueType& SetValueByPointer(DocumentType& document, const GenericPointer& pointer, typename DocumentType::ValueType& value) { + return pointer.Set(document, value); +} + +template +typename DocumentType::ValueType& SetValueByPointer(DocumentType& document, const GenericPointer& pointer, const typename DocumentType::ValueType& value) { + return pointer.Set(document, value); +} + +template +typename DocumentType::ValueType& SetValueByPointer(DocumentType& document, const GenericPointer& pointer, const typename DocumentType::Ch* value) { + return pointer.Set(document, value); +} + +#if RAPIDJSON_HAS_STDSTRING +template +typename DocumentType::ValueType& SetValueByPointer(DocumentType& document, const GenericPointer& pointer, const std::basic_string& value) { + return pointer.Set(document, value); +} +#endif + +template +RAPIDJSON_DISABLEIF_RETURN((internal::OrExpr, internal::IsGenericValue >), (typename DocumentType::ValueType&)) +SetValueByPointer(DocumentType& document, const GenericPointer& pointer, T2 value) { + return pointer.Set(document, value); +} + +template +typename DocumentType::ValueType& SetValueByPointer(DocumentType& document, const CharType(&source)[N], typename DocumentType::ValueType& value) { + return GenericPointer(source, N - 1).Set(document, value); +} + +template +typename DocumentType::ValueType& SetValueByPointer(DocumentType& document, const CharType(&source)[N], const typename DocumentType::ValueType& value) { + return GenericPointer(source, N - 1).Set(document, value); +} + +template +typename DocumentType::ValueType& SetValueByPointer(DocumentType& document, const CharType(&source)[N], const typename DocumentType::Ch* value) { + return GenericPointer(source, N - 1).Set(document, value); +} + +#if RAPIDJSON_HAS_STDSTRING +template +typename DocumentType::ValueType& SetValueByPointer(DocumentType& document, const CharType(&source)[N], const std::basic_string& value) { + return GenericPointer(source, N - 1).Set(document, value); +} +#endif + +template +RAPIDJSON_DISABLEIF_RETURN((internal::OrExpr, internal::IsGenericValue >), (typename DocumentType::ValueType&)) +SetValueByPointer(DocumentType& document, const CharType(&source)[N], T2 value) { + return GenericPointer(source, N - 1).Set(document, value); +} + +////////////////////////////////////////////////////////////////////////////// + +template +typename T::ValueType& SwapValueByPointer(T& root, const GenericPointer& pointer, typename T::ValueType& value, typename T::AllocatorType& a) { + return pointer.Swap(root, value, a); +} + +template +typename T::ValueType& SwapValueByPointer(T& root, const CharType(&source)[N], typename T::ValueType& value, typename T::AllocatorType& a) { + return GenericPointer(source, N - 1).Swap(root, value, a); +} + +template +typename DocumentType::ValueType& SwapValueByPointer(DocumentType& document, const GenericPointer& pointer, typename DocumentType::ValueType& value) { + return pointer.Swap(document, value); +} + +template +typename DocumentType::ValueType& SwapValueByPointer(DocumentType& document, const CharType(&source)[N], typename DocumentType::ValueType& value) { + return GenericPointer(source, N - 1).Swap(document, value); +} + +////////////////////////////////////////////////////////////////////////////// + +template +bool EraseValueByPointer(T& root, const GenericPointer& pointer) { + return pointer.Erase(root); +} + +template +bool EraseValueByPointer(T& root, const CharType(&source)[N]) { + return GenericPointer(source, N - 1).Erase(root); +} + +//@} + +RAPIDJSON_NAMESPACE_END + +#if defined(__clang__) || defined(_MSC_VER) +RAPIDJSON_DIAG_POP +#endif + +#endif // RAPIDJSON_POINTER_H_ diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/prettywriter.h b/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/prettywriter.h new file mode 100644 index 0000000000..fe45df1d10 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/prettywriter.h @@ -0,0 +1,277 @@ +// Tencent is pleased to support the open source community by making RapidJSON available. +// +// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. +// +// Licensed under the MIT License (the "License"); you may not use this file except +// in compliance with the License. You may obtain a copy of the License at +// +// http://opensource.org/licenses/MIT +// +// Unless required by applicable law or agreed to in writing, software distributed +// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +// CONDITIONS OF ANY KIND, either express or implied. See the License for the +// specific language governing permissions and limitations under the License. + +#ifndef RAPIDJSON_PRETTYWRITER_H_ +#define RAPIDJSON_PRETTYWRITER_H_ + +#include "writer.h" + +#ifdef __GNUC__ +RAPIDJSON_DIAG_PUSH +RAPIDJSON_DIAG_OFF(effc++) +#endif + +#if defined(__clang__) +RAPIDJSON_DIAG_PUSH +RAPIDJSON_DIAG_OFF(c++98-compat) +#endif + +RAPIDJSON_NAMESPACE_BEGIN + +//! Combination of PrettyWriter format flags. +/*! \see PrettyWriter::SetFormatOptions + */ +enum PrettyFormatOptions { + kFormatDefault = 0, //!< Default pretty formatting. + kFormatSingleLineArray = 1 //!< Format arrays on a single line. +}; + +//! Writer with indentation and spacing. +/*! + \tparam OutputStream Type of output os. + \tparam SourceEncoding Encoding of source string. + \tparam TargetEncoding Encoding of output stream. + \tparam StackAllocator Type of allocator for allocating memory of stack. +*/ +template, typename TargetEncoding = UTF8<>, typename StackAllocator = CrtAllocator, unsigned writeFlags = kWriteDefaultFlags> +class PrettyWriter : public Writer { +public: + typedef Writer Base; + typedef typename Base::Ch Ch; + + //! Constructor + /*! \param os Output stream. + \param allocator User supplied allocator. If it is null, it will create a private one. + \param levelDepth Initial capacity of stack. + */ + explicit PrettyWriter(OutputStream& os, StackAllocator* allocator = 0, size_t levelDepth = Base::kDefaultLevelDepth) : + Base(os, allocator, levelDepth), indentChar_(' '), indentCharCount_(4), formatOptions_(kFormatDefault) {} + + + explicit PrettyWriter(StackAllocator* allocator = 0, size_t levelDepth = Base::kDefaultLevelDepth) : + Base(allocator, levelDepth), indentChar_(' '), indentCharCount_(4), formatOptions_(kFormatDefault) {} + +#if RAPIDJSON_HAS_CXX11_RVALUE_REFS + PrettyWriter(PrettyWriter&& rhs) : + Base(std::forward(rhs)), indentChar_(rhs.indentChar_), indentCharCount_(rhs.indentCharCount_), formatOptions_(rhs.formatOptions_) {} +#endif + + //! Set custom indentation. + /*! \param indentChar Character for indentation. Must be whitespace character (' ', '\\t', '\\n', '\\r'). + \param indentCharCount Number of indent characters for each indentation level. + \note The default indentation is 4 spaces. + */ + PrettyWriter& SetIndent(Ch indentChar, unsigned indentCharCount) { + RAPIDJSON_ASSERT(indentChar == ' ' || indentChar == '\t' || indentChar == '\n' || indentChar == '\r'); + indentChar_ = indentChar; + indentCharCount_ = indentCharCount; + return *this; + } + + //! Set pretty writer formatting options. + /*! \param options Formatting options. + */ + PrettyWriter& SetFormatOptions(PrettyFormatOptions options) { + formatOptions_ = options; + return *this; + } + + /*! @name Implementation of Handler + \see Handler + */ + //@{ + + bool Null() { PrettyPrefix(kNullType); return Base::EndValue(Base::WriteNull()); } + bool Bool(bool b) { PrettyPrefix(b ? kTrueType : kFalseType); return Base::EndValue(Base::WriteBool(b)); } + bool Int(int i) { PrettyPrefix(kNumberType); return Base::EndValue(Base::WriteInt(i)); } + bool Uint(unsigned u) { PrettyPrefix(kNumberType); return Base::EndValue(Base::WriteUint(u)); } + bool Int64(int64_t i64) { PrettyPrefix(kNumberType); return Base::EndValue(Base::WriteInt64(i64)); } + bool Uint64(uint64_t u64) { PrettyPrefix(kNumberType); return Base::EndValue(Base::WriteUint64(u64)); } + bool Double(double d) { PrettyPrefix(kNumberType); return Base::EndValue(Base::WriteDouble(d)); } + + bool RawNumber(const Ch* str, SizeType length, bool copy = false) { + RAPIDJSON_ASSERT(str != 0); + (void)copy; + PrettyPrefix(kNumberType); + return Base::EndValue(Base::WriteString(str, length)); + } + + bool String(const Ch* str, SizeType length, bool copy = false) { + RAPIDJSON_ASSERT(str != 0); + (void)copy; + PrettyPrefix(kStringType); + return Base::EndValue(Base::WriteString(str, length)); + } + +#if RAPIDJSON_HAS_STDSTRING + bool String(const std::basic_string& str) { + return String(str.data(), SizeType(str.size())); + } +#endif + + bool StartObject() { + PrettyPrefix(kObjectType); + new (Base::level_stack_.template Push()) typename Base::Level(false); + return Base::WriteStartObject(); + } + + bool Key(const Ch* str, SizeType length, bool copy = false) { return String(str, length, copy); } + +#if RAPIDJSON_HAS_STDSTRING + bool Key(const std::basic_string& str) { + return Key(str.data(), SizeType(str.size())); + } +#endif + + bool EndObject(SizeType memberCount = 0) { + (void)memberCount; + RAPIDJSON_ASSERT(Base::level_stack_.GetSize() >= sizeof(typename Base::Level)); // not inside an Object + RAPIDJSON_ASSERT(!Base::level_stack_.template Top()->inArray); // currently inside an Array, not Object + RAPIDJSON_ASSERT(0 == Base::level_stack_.template Top()->valueCount % 2); // Object has a Key without a Value + + bool empty = Base::level_stack_.template Pop(1)->valueCount == 0; + + if (!empty) { + Base::os_->Put('\n'); + WriteIndent(); + } + bool ret = Base::EndValue(Base::WriteEndObject()); + (void)ret; + RAPIDJSON_ASSERT(ret == true); + if (Base::level_stack_.Empty()) // end of json text + Base::Flush(); + return true; + } + + bool StartArray() { + PrettyPrefix(kArrayType); + new (Base::level_stack_.template Push()) typename Base::Level(true); + return Base::WriteStartArray(); + } + + bool EndArray(SizeType memberCount = 0) { + (void)memberCount; + RAPIDJSON_ASSERT(Base::level_stack_.GetSize() >= sizeof(typename Base::Level)); + RAPIDJSON_ASSERT(Base::level_stack_.template Top()->inArray); + bool empty = Base::level_stack_.template Pop(1)->valueCount == 0; + + if (!empty && !(formatOptions_ & kFormatSingleLineArray)) { + Base::os_->Put('\n'); + WriteIndent(); + } + bool ret = Base::EndValue(Base::WriteEndArray()); + (void)ret; + RAPIDJSON_ASSERT(ret == true); + if (Base::level_stack_.Empty()) // end of json text + Base::Flush(); + return true; + } + + //@} + + /*! @name Convenience extensions */ + //@{ + + //! Simpler but slower overload. + bool String(const Ch* str) { return String(str, internal::StrLen(str)); } + bool Key(const Ch* str) { return Key(str, internal::StrLen(str)); } + + //@} + + //! Write a raw JSON value. + /*! + For user to write a stringified JSON as a value. + + \param json A well-formed JSON value. It should not contain null character within [0, length - 1] range. + \param length Length of the json. + \param type Type of the root of json. + \note When using PrettyWriter::RawValue(), the result json may not be indented correctly. + */ + bool RawValue(const Ch* json, size_t length, Type type) { + RAPIDJSON_ASSERT(json != 0); + PrettyPrefix(type); + return Base::EndValue(Base::WriteRawValue(json, length)); + } + +protected: + void PrettyPrefix(Type type) { + (void)type; + if (Base::level_stack_.GetSize() != 0) { // this value is not at root + typename Base::Level* level = Base::level_stack_.template Top(); + + if (level->inArray) { + if (level->valueCount > 0) { + Base::os_->Put(','); // add comma if it is not the first element in array + if (formatOptions_ & kFormatSingleLineArray) + Base::os_->Put(' '); + } + + if (!(formatOptions_ & kFormatSingleLineArray)) { + Base::os_->Put('\n'); + WriteIndent(); + } + } + else { // in object + if (level->valueCount > 0) { + if (level->valueCount % 2 == 0) { + Base::os_->Put(','); + Base::os_->Put('\n'); + } + else { + Base::os_->Put(':'); + Base::os_->Put(' '); + } + } + else + Base::os_->Put('\n'); + + if (level->valueCount % 2 == 0) + WriteIndent(); + } + if (!level->inArray && level->valueCount % 2 == 0) + RAPIDJSON_ASSERT(type == kStringType); // if it's in object, then even number should be a name + level->valueCount++; + } + else { + RAPIDJSON_ASSERT(!Base::hasRoot_); // Should only has one and only one root. + Base::hasRoot_ = true; + } + } + + void WriteIndent() { + size_t count = (Base::level_stack_.GetSize() / sizeof(typename Base::Level)) * indentCharCount_; + PutN(*Base::os_, static_cast(indentChar_), count); + } + + Ch indentChar_; + unsigned indentCharCount_; + PrettyFormatOptions formatOptions_; + +private: + // Prohibit copy constructor & assignment operator. + PrettyWriter(const PrettyWriter&); + PrettyWriter& operator=(const PrettyWriter&); +}; + +RAPIDJSON_NAMESPACE_END + +#if defined(__clang__) +RAPIDJSON_DIAG_POP +#endif + +#ifdef __GNUC__ +RAPIDJSON_DIAG_POP +#endif + +#endif // RAPIDJSON_RAPIDJSON_H_ diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/rapidjson.h b/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/rapidjson.h new file mode 100644 index 0000000000..a4e8953244 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/rapidjson.h @@ -0,0 +1,741 @@ +// Tencent is pleased to support the open source community by making RapidJSON available. +// +// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. +// +// Licensed under the MIT License (the "License"); you may not use this file except +// in compliance with the License. You may obtain a copy of the License at +// +// http://opensource.org/licenses/MIT +// +// Unless required by applicable law or agreed to in writing, software distributed +// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +// CONDITIONS OF ANY KIND, either express or implied. See the License for the +// specific language governing permissions and limitations under the License. + +#ifndef RAPIDJSON_RAPIDJSON_H_ +#define RAPIDJSON_RAPIDJSON_H_ + +/*!\file rapidjson.h + \brief common definitions and configuration + + \see RAPIDJSON_CONFIG + */ + +/*! \defgroup RAPIDJSON_CONFIG RapidJSON configuration + \brief Configuration macros for library features + + Some RapidJSON features are configurable to adapt the library to a wide + variety of platforms, environments and usage scenarios. Most of the + features can be configured in terms of overridden or predefined + preprocessor macros at compile-time. + + Some additional customization is available in the \ref RAPIDJSON_ERRORS APIs. + + \note These macros should be given on the compiler command-line + (where applicable) to avoid inconsistent values when compiling + different translation units of a single application. + */ + +#include // malloc(), realloc(), free(), size_t +#include // memset(), memcpy(), memmove(), memcmp() + +/////////////////////////////////////////////////////////////////////////////// +// RAPIDJSON_VERSION_STRING +// +// ALWAYS synchronize the following 3 macros with corresponding variables in /CMakeLists.txt. +// + +//!@cond RAPIDJSON_HIDDEN_FROM_DOXYGEN +// token stringification +#define RAPIDJSON_STRINGIFY(x) RAPIDJSON_DO_STRINGIFY(x) +#define RAPIDJSON_DO_STRINGIFY(x) #x + +// token concatenation +#define RAPIDJSON_JOIN(X, Y) RAPIDJSON_DO_JOIN(X, Y) +#define RAPIDJSON_DO_JOIN(X, Y) RAPIDJSON_DO_JOIN2(X, Y) +#define RAPIDJSON_DO_JOIN2(X, Y) X##Y +//!@endcond + +/*! \def RAPIDJSON_MAJOR_VERSION + \ingroup RAPIDJSON_CONFIG + \brief Major version of RapidJSON in integer. +*/ +/*! \def RAPIDJSON_MINOR_VERSION + \ingroup RAPIDJSON_CONFIG + \brief Minor version of RapidJSON in integer. +*/ +/*! \def RAPIDJSON_PATCH_VERSION + \ingroup RAPIDJSON_CONFIG + \brief Patch version of RapidJSON in integer. +*/ +/*! \def RAPIDJSON_VERSION_STRING + \ingroup RAPIDJSON_CONFIG + \brief Version of RapidJSON in ".." string format. +*/ +#define RAPIDJSON_MAJOR_VERSION 1 +#define RAPIDJSON_MINOR_VERSION 1 +#define RAPIDJSON_PATCH_VERSION 0 +#define RAPIDJSON_VERSION_STRING \ + RAPIDJSON_STRINGIFY(RAPIDJSON_MAJOR_VERSION.RAPIDJSON_MINOR_VERSION.RAPIDJSON_PATCH_VERSION) + +/////////////////////////////////////////////////////////////////////////////// +// RAPIDJSON_NAMESPACE_(BEGIN|END) +/*! \def RAPIDJSON_NAMESPACE + \ingroup RAPIDJSON_CONFIG + \brief provide custom rapidjson namespace + + In order to avoid symbol clashes and/or "One Definition Rule" errors + between multiple inclusions of (different versions of) RapidJSON in + a single binary, users can customize the name of the main RapidJSON + namespace. + + In case of a single nesting level, defining \c RAPIDJSON_NAMESPACE + to a custom name (e.g. \c MyRapidJSON) is sufficient. If multiple + levels are needed, both \ref RAPIDJSON_NAMESPACE_BEGIN and \ref + RAPIDJSON_NAMESPACE_END need to be defined as well: + + \code + // in some .cpp file + #define RAPIDJSON_NAMESPACE my::rapidjson + #define RAPIDJSON_NAMESPACE_BEGIN namespace my { namespace rapidjson { + #define RAPIDJSON_NAMESPACE_END } } + #include "rapidjson/..." + \endcode + + \see rapidjson + */ +/*! \def RAPIDJSON_NAMESPACE_BEGIN + \ingroup RAPIDJSON_CONFIG + \brief provide custom rapidjson namespace (opening expression) + \see RAPIDJSON_NAMESPACE +*/ +/*! \def RAPIDJSON_NAMESPACE_END + \ingroup RAPIDJSON_CONFIG + \brief provide custom rapidjson namespace (closing expression) + \see RAPIDJSON_NAMESPACE +*/ +#ifndef RAPIDJSON_NAMESPACE +#define RAPIDJSON_NAMESPACE rapidjson +#endif +#ifndef RAPIDJSON_NAMESPACE_BEGIN +#define RAPIDJSON_NAMESPACE_BEGIN namespace RAPIDJSON_NAMESPACE { +#endif +#ifndef RAPIDJSON_NAMESPACE_END +#define RAPIDJSON_NAMESPACE_END } +#endif + +/////////////////////////////////////////////////////////////////////////////// +// __cplusplus macro + +//!@cond RAPIDJSON_HIDDEN_FROM_DOXYGEN + +#if defined(_MSC_VER) +#define RAPIDJSON_CPLUSPLUS _MSVC_LANG +#else +#define RAPIDJSON_CPLUSPLUS __cplusplus +#endif + +//!@endcond + +/////////////////////////////////////////////////////////////////////////////// +// RAPIDJSON_HAS_STDSTRING + +#ifndef RAPIDJSON_HAS_STDSTRING +#ifdef RAPIDJSON_DOXYGEN_RUNNING +#define RAPIDJSON_HAS_STDSTRING 1 // force generation of documentation +#else +#define RAPIDJSON_HAS_STDSTRING 0 // no std::string support by default +#endif +/*! \def RAPIDJSON_HAS_STDSTRING + \ingroup RAPIDJSON_CONFIG + \brief Enable RapidJSON support for \c std::string + + By defining this preprocessor symbol to \c 1, several convenience functions for using + \ref rapidjson::GenericValue with \c std::string are enabled, especially + for construction and comparison. + + \hideinitializer +*/ +#endif // !defined(RAPIDJSON_HAS_STDSTRING) + +#if RAPIDJSON_HAS_STDSTRING +#include +#endif // RAPIDJSON_HAS_STDSTRING + +/////////////////////////////////////////////////////////////////////////////// +// RAPIDJSON_USE_MEMBERSMAP + +/*! \def RAPIDJSON_USE_MEMBERSMAP + \ingroup RAPIDJSON_CONFIG + \brief Enable RapidJSON support for object members handling in a \c std::multimap + + By defining this preprocessor symbol to \c 1, \ref rapidjson::GenericValue object + members are stored in a \c std::multimap for faster lookup and deletion times, a + trade off with a slightly slower insertion time and a small object allocat(or)ed + memory overhead. + + \hideinitializer +*/ +#ifndef RAPIDJSON_USE_MEMBERSMAP +#define RAPIDJSON_USE_MEMBERSMAP 0 // not by default +#endif + +/////////////////////////////////////////////////////////////////////////////// +// RAPIDJSON_NO_INT64DEFINE + +/*! \def RAPIDJSON_NO_INT64DEFINE + \ingroup RAPIDJSON_CONFIG + \brief Use external 64-bit integer types. + + RapidJSON requires the 64-bit integer types \c int64_t and \c uint64_t types + to be available at global scope. + + If users have their own definition, define RAPIDJSON_NO_INT64DEFINE to + prevent RapidJSON from defining its own types. +*/ +#ifndef RAPIDJSON_NO_INT64DEFINE +//!@cond RAPIDJSON_HIDDEN_FROM_DOXYGEN +#if defined(_MSC_VER) && (_MSC_VER < 1800) // Visual Studio 2013 +#include "msinttypes/stdint.h" +#include "msinttypes/inttypes.h" +#else +// Other compilers should have this. +#include +#include +#endif +//!@endcond +#ifdef RAPIDJSON_DOXYGEN_RUNNING +#define RAPIDJSON_NO_INT64DEFINE +#endif +#endif // RAPIDJSON_NO_INT64TYPEDEF + +/////////////////////////////////////////////////////////////////////////////// +// RAPIDJSON_FORCEINLINE + +#ifndef RAPIDJSON_FORCEINLINE +//!@cond RAPIDJSON_HIDDEN_FROM_DOXYGEN +#if defined(_MSC_VER) && defined(NDEBUG) +#define RAPIDJSON_FORCEINLINE __forceinline +#elif defined(__GNUC__) && __GNUC__ >= 4 && defined(NDEBUG) +#define RAPIDJSON_FORCEINLINE __attribute__((always_inline)) +#else +#define RAPIDJSON_FORCEINLINE +#endif +//!@endcond +#endif // RAPIDJSON_FORCEINLINE + +/////////////////////////////////////////////////////////////////////////////// +// RAPIDJSON_ENDIAN +#define RAPIDJSON_LITTLEENDIAN 0 //!< Little endian machine +#define RAPIDJSON_BIGENDIAN 1 //!< Big endian machine + +//! Endianness of the machine. +/*! + \def RAPIDJSON_ENDIAN + \ingroup RAPIDJSON_CONFIG + + GCC 4.6 provided macro for detecting endianness of the target machine. But other + compilers may not have this. User can define RAPIDJSON_ENDIAN to either + \ref RAPIDJSON_LITTLEENDIAN or \ref RAPIDJSON_BIGENDIAN. + + Default detection implemented with reference to + \li https://gcc.gnu.org/onlinedocs/gcc-4.6.0/cpp/Common-Predefined-Macros.html + \li http://www.boost.org/doc/libs/1_42_0/boost/detail/endian.hpp +*/ +#ifndef RAPIDJSON_ENDIAN +// Detect with GCC 4.6's macro +# ifdef __BYTE_ORDER__ +# if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ +# define RAPIDJSON_ENDIAN RAPIDJSON_LITTLEENDIAN +# elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ +# define RAPIDJSON_ENDIAN RAPIDJSON_BIGENDIAN +# else +# error Unknown machine endianness detected. User needs to define RAPIDJSON_ENDIAN. +# endif // __BYTE_ORDER__ +// Detect with GLIBC's endian.h +# elif defined(__GLIBC__) +# include +# if (__BYTE_ORDER == __LITTLE_ENDIAN) +# define RAPIDJSON_ENDIAN RAPIDJSON_LITTLEENDIAN +# elif (__BYTE_ORDER == __BIG_ENDIAN) +# define RAPIDJSON_ENDIAN RAPIDJSON_BIGENDIAN +# else +# error Unknown machine endianness detected. User needs to define RAPIDJSON_ENDIAN. +# endif // __GLIBC__ +// Detect with _LITTLE_ENDIAN and _BIG_ENDIAN macro +# elif defined(_LITTLE_ENDIAN) && !defined(_BIG_ENDIAN) +# define RAPIDJSON_ENDIAN RAPIDJSON_LITTLEENDIAN +# elif defined(_BIG_ENDIAN) && !defined(_LITTLE_ENDIAN) +# define RAPIDJSON_ENDIAN RAPIDJSON_BIGENDIAN +// Detect with architecture macros +# elif defined(__sparc) || defined(__sparc__) || defined(_POWER) || defined(__powerpc__) || defined(__ppc__) || defined(__hpux) || defined(__hppa) || defined(_MIPSEB) || defined(_POWER) || defined(__s390__) +# define RAPIDJSON_ENDIAN RAPIDJSON_BIGENDIAN +# elif defined(__i386__) || defined(__alpha__) || defined(__ia64) || defined(__ia64__) || defined(_M_IX86) || defined(_M_IA64) || defined(_M_ALPHA) || defined(__amd64) || defined(__amd64__) || defined(_M_AMD64) || defined(__x86_64) || defined(__x86_64__) || defined(_M_X64) || defined(__bfin__) +# define RAPIDJSON_ENDIAN RAPIDJSON_LITTLEENDIAN +# elif defined(_MSC_VER) && (defined(_M_ARM) || defined(_M_ARM64)) +# define RAPIDJSON_ENDIAN RAPIDJSON_LITTLEENDIAN +# elif defined(RAPIDJSON_DOXYGEN_RUNNING) +# define RAPIDJSON_ENDIAN +# else +# error Unknown machine endianness detected. User needs to define RAPIDJSON_ENDIAN. +# endif +#endif // RAPIDJSON_ENDIAN + +/////////////////////////////////////////////////////////////////////////////// +// RAPIDJSON_64BIT + +//! Whether using 64-bit architecture +#ifndef RAPIDJSON_64BIT +#if defined(__LP64__) || (defined(__x86_64__) && defined(__ILP32__)) || defined(_WIN64) || defined(__EMSCRIPTEN__) +#define RAPIDJSON_64BIT 1 +#else +#define RAPIDJSON_64BIT 0 +#endif +#endif // RAPIDJSON_64BIT + +/////////////////////////////////////////////////////////////////////////////// +// RAPIDJSON_ALIGN + +//! Data alignment of the machine. +/*! \ingroup RAPIDJSON_CONFIG + \param x pointer to align + + Some machines require strict data alignment. The default is 8 bytes. + User can customize by defining the RAPIDJSON_ALIGN function macro. +*/ +#ifndef RAPIDJSON_ALIGN +#define RAPIDJSON_ALIGN(x) (((x) + static_cast(7u)) & ~static_cast(7u)) +#endif + +/////////////////////////////////////////////////////////////////////////////// +// RAPIDJSON_UINT64_C2 + +//! Construct a 64-bit literal by a pair of 32-bit integer. +/*! + 64-bit literal with or without ULL suffix is prone to compiler warnings. + UINT64_C() is C macro which cause compilation problems. + Use this macro to define 64-bit constants by a pair of 32-bit integer. +*/ +#ifndef RAPIDJSON_UINT64_C2 +#define RAPIDJSON_UINT64_C2(high32, low32) ((static_cast(high32) << 32) | static_cast(low32)) +#endif + +/////////////////////////////////////////////////////////////////////////////// +// RAPIDJSON_48BITPOINTER_OPTIMIZATION + +//! Use only lower 48-bit address for some pointers. +/*! + \ingroup RAPIDJSON_CONFIG + + This optimization uses the fact that current X86-64 architecture only implement lower 48-bit virtual address. + The higher 16-bit can be used for storing other data. + \c GenericValue uses this optimization to reduce its size form 24 bytes to 16 bytes in 64-bit architecture. +*/ +#ifndef RAPIDJSON_48BITPOINTER_OPTIMIZATION +#if defined(__amd64__) || defined(__amd64) || defined(__x86_64__) || defined(__x86_64) || defined(_M_X64) || defined(_M_AMD64) +#define RAPIDJSON_48BITPOINTER_OPTIMIZATION 1 +#else +#define RAPIDJSON_48BITPOINTER_OPTIMIZATION 0 +#endif +#endif // RAPIDJSON_48BITPOINTER_OPTIMIZATION + +#if RAPIDJSON_48BITPOINTER_OPTIMIZATION == 1 +#if RAPIDJSON_64BIT != 1 +#error RAPIDJSON_48BITPOINTER_OPTIMIZATION can only be set to 1 when RAPIDJSON_64BIT=1 +#endif +#define RAPIDJSON_SETPOINTER(type, p, x) (p = reinterpret_cast((reinterpret_cast(p) & static_cast(RAPIDJSON_UINT64_C2(0xFFFF0000, 0x00000000))) | reinterpret_cast(reinterpret_cast(x)))) +#define RAPIDJSON_GETPOINTER(type, p) (reinterpret_cast(reinterpret_cast(p) & static_cast(RAPIDJSON_UINT64_C2(0x0000FFFF, 0xFFFFFFFF)))) +#else +#define RAPIDJSON_SETPOINTER(type, p, x) (p = (x)) +#define RAPIDJSON_GETPOINTER(type, p) (p) +#endif + +/////////////////////////////////////////////////////////////////////////////// +// RAPIDJSON_SSE2/RAPIDJSON_SSE42/RAPIDJSON_NEON/RAPIDJSON_SIMD + +/*! \def RAPIDJSON_SIMD + \ingroup RAPIDJSON_CONFIG + \brief Enable SSE2/SSE4.2/Neon optimization. + + RapidJSON supports optimized implementations for some parsing operations + based on the SSE2, SSE4.2 or NEon SIMD extensions on modern Intel + or ARM compatible processors. + + To enable these optimizations, three different symbols can be defined; + \code + // Enable SSE2 optimization. + #define RAPIDJSON_SSE2 + + // Enable SSE4.2 optimization. + #define RAPIDJSON_SSE42 + \endcode + + // Enable ARM Neon optimization. + #define RAPIDJSON_NEON + \endcode + + \c RAPIDJSON_SSE42 takes precedence over SSE2, if both are defined. + + If any of these symbols is defined, RapidJSON defines the macro + \c RAPIDJSON_SIMD to indicate the availability of the optimized code. +*/ +#if defined(RAPIDJSON_SSE2) || defined(RAPIDJSON_SSE42) \ + || defined(RAPIDJSON_NEON) || defined(RAPIDJSON_DOXYGEN_RUNNING) +#define RAPIDJSON_SIMD +#endif + +/////////////////////////////////////////////////////////////////////////////// +// RAPIDJSON_NO_SIZETYPEDEFINE + +#ifndef RAPIDJSON_NO_SIZETYPEDEFINE +/*! \def RAPIDJSON_NO_SIZETYPEDEFINE + \ingroup RAPIDJSON_CONFIG + \brief User-provided \c SizeType definition. + + In order to avoid using 32-bit size types for indexing strings and arrays, + define this preprocessor symbol and provide the type rapidjson::SizeType + before including RapidJSON: + \code + #define RAPIDJSON_NO_SIZETYPEDEFINE + namespace rapidjson { typedef ::std::size_t SizeType; } + #include "rapidjson/..." + \endcode + + \see rapidjson::SizeType +*/ +#ifdef RAPIDJSON_DOXYGEN_RUNNING +#define RAPIDJSON_NO_SIZETYPEDEFINE +#endif +RAPIDJSON_NAMESPACE_BEGIN +//! Size type (for string lengths, array sizes, etc.) +/*! RapidJSON uses 32-bit array/string indices even on 64-bit platforms, + instead of using \c size_t. Users may override the SizeType by defining + \ref RAPIDJSON_NO_SIZETYPEDEFINE. +*/ +typedef unsigned SizeType; +RAPIDJSON_NAMESPACE_END +#endif + +// always import std::size_t to rapidjson namespace +RAPIDJSON_NAMESPACE_BEGIN +using std::size_t; +RAPIDJSON_NAMESPACE_END + +/////////////////////////////////////////////////////////////////////////////// +// RAPIDJSON_ASSERT + +//! Assertion. +/*! \ingroup RAPIDJSON_CONFIG + By default, rapidjson uses C \c assert() for internal assertions. + User can override it by defining RAPIDJSON_ASSERT(x) macro. + + \note Parsing errors are handled and can be customized by the + \ref RAPIDJSON_ERRORS APIs. +*/ +#ifndef RAPIDJSON_ASSERT +#include +#define RAPIDJSON_ASSERT(x) assert(x) +#endif // RAPIDJSON_ASSERT + +/////////////////////////////////////////////////////////////////////////////// +// RAPIDJSON_STATIC_ASSERT + +// Prefer C++11 static_assert, if available +#ifndef RAPIDJSON_STATIC_ASSERT +#if RAPIDJSON_CPLUSPLUS >= 201103L || ( defined(_MSC_VER) && _MSC_VER >= 1800 ) +#define RAPIDJSON_STATIC_ASSERT(x) \ + static_assert(x, RAPIDJSON_STRINGIFY(x)) +#endif // C++11 +#endif // RAPIDJSON_STATIC_ASSERT + +// Adopt C++03 implementation from boost +#ifndef RAPIDJSON_STATIC_ASSERT +#ifndef __clang__ +//!@cond RAPIDJSON_HIDDEN_FROM_DOXYGEN +#endif +RAPIDJSON_NAMESPACE_BEGIN +template struct STATIC_ASSERTION_FAILURE; +template <> struct STATIC_ASSERTION_FAILURE { enum { value = 1 }; }; +template struct StaticAssertTest {}; +RAPIDJSON_NAMESPACE_END + +#if defined(__GNUC__) || defined(__clang__) +#define RAPIDJSON_STATIC_ASSERT_UNUSED_ATTRIBUTE __attribute__((unused)) +#else +#define RAPIDJSON_STATIC_ASSERT_UNUSED_ATTRIBUTE +#endif +#ifndef __clang__ +//!@endcond +#endif + +/*! \def RAPIDJSON_STATIC_ASSERT + \brief (Internal) macro to check for conditions at compile-time + \param x compile-time condition + \hideinitializer + */ +#define RAPIDJSON_STATIC_ASSERT(x) \ + typedef ::RAPIDJSON_NAMESPACE::StaticAssertTest< \ + sizeof(::RAPIDJSON_NAMESPACE::STATIC_ASSERTION_FAILURE)> \ + RAPIDJSON_JOIN(StaticAssertTypedef, __LINE__) RAPIDJSON_STATIC_ASSERT_UNUSED_ATTRIBUTE +#endif // RAPIDJSON_STATIC_ASSERT + +/////////////////////////////////////////////////////////////////////////////// +// RAPIDJSON_LIKELY, RAPIDJSON_UNLIKELY + +//! Compiler branching hint for expression with high probability to be true. +/*! + \ingroup RAPIDJSON_CONFIG + \param x Boolean expression likely to be true. +*/ +#ifndef RAPIDJSON_LIKELY +#if defined(__GNUC__) || defined(__clang__) +#define RAPIDJSON_LIKELY(x) __builtin_expect(!!(x), 1) +#else +#define RAPIDJSON_LIKELY(x) (x) +#endif +#endif + +//! Compiler branching hint for expression with low probability to be true. +/*! + \ingroup RAPIDJSON_CONFIG + \param x Boolean expression unlikely to be true. +*/ +#ifndef RAPIDJSON_UNLIKELY +#if defined(__GNUC__) || defined(__clang__) +#define RAPIDJSON_UNLIKELY(x) __builtin_expect(!!(x), 0) +#else +#define RAPIDJSON_UNLIKELY(x) (x) +#endif +#endif + +/////////////////////////////////////////////////////////////////////////////// +// Helpers + +//!@cond RAPIDJSON_HIDDEN_FROM_DOXYGEN + +#define RAPIDJSON_MULTILINEMACRO_BEGIN do { +#define RAPIDJSON_MULTILINEMACRO_END \ +} while((void)0, 0) + +// adopted from Boost +#define RAPIDJSON_VERSION_CODE(x,y,z) \ + (((x)*100000) + ((y)*100) + (z)) + +#if defined(__has_builtin) +#define RAPIDJSON_HAS_BUILTIN(x) __has_builtin(x) +#else +#define RAPIDJSON_HAS_BUILTIN(x) 0 +#endif + +/////////////////////////////////////////////////////////////////////////////// +// RAPIDJSON_DIAG_PUSH/POP, RAPIDJSON_DIAG_OFF + +#if defined(__GNUC__) +#define RAPIDJSON_GNUC \ + RAPIDJSON_VERSION_CODE(__GNUC__,__GNUC_MINOR__,__GNUC_PATCHLEVEL__) +#endif + +#if defined(__clang__) || (defined(RAPIDJSON_GNUC) && RAPIDJSON_GNUC >= RAPIDJSON_VERSION_CODE(4,2,0)) + +#define RAPIDJSON_PRAGMA(x) _Pragma(RAPIDJSON_STRINGIFY(x)) +#define RAPIDJSON_DIAG_PRAGMA(x) RAPIDJSON_PRAGMA(GCC diagnostic x) +#define RAPIDJSON_DIAG_OFF(x) \ + RAPIDJSON_DIAG_PRAGMA(ignored RAPIDJSON_STRINGIFY(RAPIDJSON_JOIN(-W,x))) + +// push/pop support in Clang and GCC>=4.6 +#if defined(__clang__) || (defined(RAPIDJSON_GNUC) && RAPIDJSON_GNUC >= RAPIDJSON_VERSION_CODE(4,6,0)) +#define RAPIDJSON_DIAG_PUSH RAPIDJSON_DIAG_PRAGMA(push) +#define RAPIDJSON_DIAG_POP RAPIDJSON_DIAG_PRAGMA(pop) +#else // GCC >= 4.2, < 4.6 +#define RAPIDJSON_DIAG_PUSH /* ignored */ +#define RAPIDJSON_DIAG_POP /* ignored */ +#endif + +#elif defined(_MSC_VER) + +// pragma (MSVC specific) +#define RAPIDJSON_PRAGMA(x) __pragma(x) +#define RAPIDJSON_DIAG_PRAGMA(x) RAPIDJSON_PRAGMA(warning(x)) + +#define RAPIDJSON_DIAG_OFF(x) RAPIDJSON_DIAG_PRAGMA(disable: x) +#define RAPIDJSON_DIAG_PUSH RAPIDJSON_DIAG_PRAGMA(push) +#define RAPIDJSON_DIAG_POP RAPIDJSON_DIAG_PRAGMA(pop) + +#else + +#define RAPIDJSON_DIAG_OFF(x) /* ignored */ +#define RAPIDJSON_DIAG_PUSH /* ignored */ +#define RAPIDJSON_DIAG_POP /* ignored */ + +#endif // RAPIDJSON_DIAG_* + +/////////////////////////////////////////////////////////////////////////////// +// C++11 features + +#ifndef RAPIDJSON_HAS_CXX11 +#define RAPIDJSON_HAS_CXX11 (RAPIDJSON_CPLUSPLUS >= 201103L) +#endif + +#ifndef RAPIDJSON_HAS_CXX11_RVALUE_REFS +#if RAPIDJSON_HAS_CXX11 +#define RAPIDJSON_HAS_CXX11_RVALUE_REFS 1 +#elif defined(__clang__) +#if __has_feature(cxx_rvalue_references) && \ + (defined(_MSC_VER) || defined(_LIBCPP_VERSION) || defined(__GLIBCXX__) && __GLIBCXX__ >= 20080306) +#define RAPIDJSON_HAS_CXX11_RVALUE_REFS 1 +#else +#define RAPIDJSON_HAS_CXX11_RVALUE_REFS 0 +#endif +#elif (defined(RAPIDJSON_GNUC) && (RAPIDJSON_GNUC >= RAPIDJSON_VERSION_CODE(4,3,0)) && defined(__GXX_EXPERIMENTAL_CXX0X__)) || \ + (defined(_MSC_VER) && _MSC_VER >= 1600) || \ + (defined(__SUNPRO_CC) && __SUNPRO_CC >= 0x5140 && defined(__GXX_EXPERIMENTAL_CXX0X__)) + +#define RAPIDJSON_HAS_CXX11_RVALUE_REFS 1 +#else +#define RAPIDJSON_HAS_CXX11_RVALUE_REFS 0 +#endif +#endif // RAPIDJSON_HAS_CXX11_RVALUE_REFS + +#if RAPIDJSON_HAS_CXX11_RVALUE_REFS +#include // std::move +#endif + +#ifndef RAPIDJSON_HAS_CXX11_NOEXCEPT +#if RAPIDJSON_HAS_CXX11 +#define RAPIDJSON_HAS_CXX11_NOEXCEPT 1 +#elif defined(__clang__) +#define RAPIDJSON_HAS_CXX11_NOEXCEPT __has_feature(cxx_noexcept) +#elif (defined(RAPIDJSON_GNUC) && (RAPIDJSON_GNUC >= RAPIDJSON_VERSION_CODE(4,6,0)) && defined(__GXX_EXPERIMENTAL_CXX0X__)) || \ + (defined(_MSC_VER) && _MSC_VER >= 1900) || \ + (defined(__SUNPRO_CC) && __SUNPRO_CC >= 0x5140 && defined(__GXX_EXPERIMENTAL_CXX0X__)) +#define RAPIDJSON_HAS_CXX11_NOEXCEPT 1 +#else +#define RAPIDJSON_HAS_CXX11_NOEXCEPT 0 +#endif +#endif +#ifndef RAPIDJSON_NOEXCEPT +#if RAPIDJSON_HAS_CXX11_NOEXCEPT +#define RAPIDJSON_NOEXCEPT noexcept +#else +#define RAPIDJSON_NOEXCEPT throw() +#endif // RAPIDJSON_HAS_CXX11_NOEXCEPT +#endif + +// no automatic detection, yet +#ifndef RAPIDJSON_HAS_CXX11_TYPETRAITS +#if (defined(_MSC_VER) && _MSC_VER >= 1700) +#define RAPIDJSON_HAS_CXX11_TYPETRAITS 1 +#else +#define RAPIDJSON_HAS_CXX11_TYPETRAITS 0 +#endif +#endif + +#ifndef RAPIDJSON_HAS_CXX11_RANGE_FOR +#if defined(__clang__) +#define RAPIDJSON_HAS_CXX11_RANGE_FOR __has_feature(cxx_range_for) +#elif (defined(RAPIDJSON_GNUC) && (RAPIDJSON_GNUC >= RAPIDJSON_VERSION_CODE(4,6,0)) && defined(__GXX_EXPERIMENTAL_CXX0X__)) || \ + (defined(_MSC_VER) && _MSC_VER >= 1700) || \ + (defined(__SUNPRO_CC) && __SUNPRO_CC >= 0x5140 && defined(__GXX_EXPERIMENTAL_CXX0X__)) +#define RAPIDJSON_HAS_CXX11_RANGE_FOR 1 +#else +#define RAPIDJSON_HAS_CXX11_RANGE_FOR 0 +#endif +#endif // RAPIDJSON_HAS_CXX11_RANGE_FOR + +/////////////////////////////////////////////////////////////////////////////// +// C++17 features + +#ifndef RAPIDJSON_HAS_CXX17 +#define RAPIDJSON_HAS_CXX17 (RAPIDJSON_CPLUSPLUS >= 201703L) +#endif + +#if RAPIDJSON_HAS_CXX17 +# define RAPIDJSON_DELIBERATE_FALLTHROUGH [[fallthrough]] +#elif defined(__has_cpp_attribute) +# if __has_cpp_attribute(clang::fallthrough) +# define RAPIDJSON_DELIBERATE_FALLTHROUGH [[clang::fallthrough]] +# elif __has_cpp_attribute(fallthrough) +# define RAPIDJSON_DELIBERATE_FALLTHROUGH __attribute__((fallthrough)) +# else +# define RAPIDJSON_DELIBERATE_FALLTHROUGH +# endif +#else +# define RAPIDJSON_DELIBERATE_FALLTHROUGH +#endif + +//!@endcond + +//! Assertion (in non-throwing contexts). + /*! \ingroup RAPIDJSON_CONFIG + Some functions provide a \c noexcept guarantee, if the compiler supports it. + In these cases, the \ref RAPIDJSON_ASSERT macro cannot be overridden to + throw an exception. This macro adds a separate customization point for + such cases. + + Defaults to C \c assert() (as \ref RAPIDJSON_ASSERT), if \c noexcept is + supported, and to \ref RAPIDJSON_ASSERT otherwise. + */ + +/////////////////////////////////////////////////////////////////////////////// +// RAPIDJSON_NOEXCEPT_ASSERT + +#ifndef RAPIDJSON_NOEXCEPT_ASSERT +#ifdef RAPIDJSON_ASSERT_THROWS +#include +#define RAPIDJSON_NOEXCEPT_ASSERT(x) assert(x) +#else +#define RAPIDJSON_NOEXCEPT_ASSERT(x) RAPIDJSON_ASSERT(x) +#endif // RAPIDJSON_ASSERT_THROWS +#endif // RAPIDJSON_NOEXCEPT_ASSERT + +/////////////////////////////////////////////////////////////////////////////// +// malloc/realloc/free + +#ifndef RAPIDJSON_MALLOC +///! customization point for global \c malloc +#define RAPIDJSON_MALLOC(size) std::malloc(size) +#endif +#ifndef RAPIDJSON_REALLOC +///! customization point for global \c realloc +#define RAPIDJSON_REALLOC(ptr, new_size) std::realloc(ptr, new_size) +#endif +#ifndef RAPIDJSON_FREE +///! customization point for global \c free +#define RAPIDJSON_FREE(ptr) std::free(ptr) +#endif + +/////////////////////////////////////////////////////////////////////////////// +// new/delete + +#ifndef RAPIDJSON_NEW +///! customization point for global \c new +#define RAPIDJSON_NEW(TypeName) new TypeName +#endif +#ifndef RAPIDJSON_DELETE +///! customization point for global \c delete +#define RAPIDJSON_DELETE(x) delete x +#endif + +/////////////////////////////////////////////////////////////////////////////// +// Type + +/*! \namespace rapidjson + \brief main RapidJSON namespace + \see RAPIDJSON_NAMESPACE +*/ +RAPIDJSON_NAMESPACE_BEGIN + +//! Type of JSON value +enum Type { + kNullType = 0, //!< null + kFalseType = 1, //!< false + kTrueType = 2, //!< true + kObjectType = 3, //!< object + kArrayType = 4, //!< array + kStringType = 5, //!< string + kNumberType = 6 //!< number +}; + +RAPIDJSON_NAMESPACE_END + +#endif // RAPIDJSON_RAPIDJSON_H_ diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/reader.h b/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/reader.h new file mode 100644 index 0000000000..b37afffb2e --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/reader.h @@ -0,0 +1,2246 @@ +// Tencent is pleased to support the open source community by making RapidJSON available. +// +// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. +// +// Licensed under the MIT License (the "License"); you may not use this file except +// in compliance with the License. You may obtain a copy of the License at +// +// http://opensource.org/licenses/MIT +// +// Unless required by applicable law or agreed to in writing, software distributed +// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +// CONDITIONS OF ANY KIND, either express or implied. See the License for the +// specific language governing permissions and limitations under the License. + +#ifndef RAPIDJSON_READER_H_ +#define RAPIDJSON_READER_H_ + +/*! \file reader.h */ + +#include "allocators.h" +#include "stream.h" +#include "encodedstream.h" +#include "internal/clzll.h" +#include "internal/meta.h" +#include "internal/stack.h" +#include "internal/strtod.h" +#include + +#if defined(RAPIDJSON_SIMD) && defined(_MSC_VER) +#include +#pragma intrinsic(_BitScanForward) +#endif +#ifdef RAPIDJSON_SSE42 +#include +#elif defined(RAPIDJSON_SSE2) +#include +#elif defined(RAPIDJSON_NEON) +#include +#endif + +#ifdef __clang__ +RAPIDJSON_DIAG_PUSH +RAPIDJSON_DIAG_OFF(old-style-cast) +RAPIDJSON_DIAG_OFF(padded) +RAPIDJSON_DIAG_OFF(switch-enum) +#elif defined(_MSC_VER) +RAPIDJSON_DIAG_PUSH +RAPIDJSON_DIAG_OFF(4127) // conditional expression is constant +RAPIDJSON_DIAG_OFF(4702) // unreachable code +#endif + +#ifdef __GNUC__ +RAPIDJSON_DIAG_PUSH +RAPIDJSON_DIAG_OFF(effc++) +#endif + +//!@cond RAPIDJSON_HIDDEN_FROM_DOXYGEN +#define RAPIDJSON_NOTHING /* deliberately empty */ +#ifndef RAPIDJSON_PARSE_ERROR_EARLY_RETURN +#define RAPIDJSON_PARSE_ERROR_EARLY_RETURN(value) \ + RAPIDJSON_MULTILINEMACRO_BEGIN \ + if (RAPIDJSON_UNLIKELY(HasParseError())) { return value; } \ + RAPIDJSON_MULTILINEMACRO_END +#endif +#define RAPIDJSON_PARSE_ERROR_EARLY_RETURN_VOID \ + RAPIDJSON_PARSE_ERROR_EARLY_RETURN(RAPIDJSON_NOTHING) +//!@endcond + +/*! \def RAPIDJSON_PARSE_ERROR_NORETURN + \ingroup RAPIDJSON_ERRORS + \brief Macro to indicate a parse error. + \param parseErrorCode \ref rapidjson::ParseErrorCode of the error + \param offset position of the error in JSON input (\c size_t) + + This macros can be used as a customization point for the internal + error handling mechanism of RapidJSON. + + A common usage model is to throw an exception instead of requiring the + caller to explicitly check the \ref rapidjson::GenericReader::Parse's + return value: + + \code + #define RAPIDJSON_PARSE_ERROR_NORETURN(parseErrorCode,offset) \ + throw ParseException(parseErrorCode, #parseErrorCode, offset) + + #include // std::runtime_error + #include "rapidjson/error/error.h" // rapidjson::ParseResult + + struct ParseException : std::runtime_error, rapidjson::ParseResult { + ParseException(rapidjson::ParseErrorCode code, const char* msg, size_t offset) + : std::runtime_error(msg), ParseResult(code, offset) {} + }; + + #include "rapidjson/reader.h" + \endcode + + \see RAPIDJSON_PARSE_ERROR, rapidjson::GenericReader::Parse + */ +#ifndef RAPIDJSON_PARSE_ERROR_NORETURN +#define RAPIDJSON_PARSE_ERROR_NORETURN(parseErrorCode, offset) \ + RAPIDJSON_MULTILINEMACRO_BEGIN \ + RAPIDJSON_ASSERT(!HasParseError()); /* Error can only be assigned once */ \ + SetParseError(parseErrorCode, offset); \ + RAPIDJSON_MULTILINEMACRO_END +#endif + +/*! \def RAPIDJSON_PARSE_ERROR + \ingroup RAPIDJSON_ERRORS + \brief (Internal) macro to indicate and handle a parse error. + \param parseErrorCode \ref rapidjson::ParseErrorCode of the error + \param offset position of the error in JSON input (\c size_t) + + Invokes RAPIDJSON_PARSE_ERROR_NORETURN and stops the parsing. + + \see RAPIDJSON_PARSE_ERROR_NORETURN + \hideinitializer + */ +#ifndef RAPIDJSON_PARSE_ERROR +#define RAPIDJSON_PARSE_ERROR(parseErrorCode, offset) \ + RAPIDJSON_MULTILINEMACRO_BEGIN \ + RAPIDJSON_PARSE_ERROR_NORETURN(parseErrorCode, offset); \ + RAPIDJSON_PARSE_ERROR_EARLY_RETURN_VOID; \ + RAPIDJSON_MULTILINEMACRO_END +#endif + +#include "error/error.h" // ParseErrorCode, ParseResult + +RAPIDJSON_NAMESPACE_BEGIN + +/////////////////////////////////////////////////////////////////////////////// +// ParseFlag + +/*! \def RAPIDJSON_PARSE_DEFAULT_FLAGS + \ingroup RAPIDJSON_CONFIG + \brief User-defined kParseDefaultFlags definition. + + User can define this as any \c ParseFlag combinations. +*/ +#ifndef RAPIDJSON_PARSE_DEFAULT_FLAGS +#define RAPIDJSON_PARSE_DEFAULT_FLAGS kParseNoFlags +#endif + +//! Combination of parseFlags +/*! \see Reader::Parse, Document::Parse, Document::ParseInsitu, Document::ParseStream + */ +enum ParseFlag { + kParseNoFlags = 0, //!< No flags are set. + kParseInsituFlag = 1, //!< In-situ(destructive) parsing. + kParseValidateEncodingFlag = 2, //!< Validate encoding of JSON strings. + kParseIterativeFlag = 4, //!< Iterative(constant complexity in terms of function call stack size) parsing. + kParseStopWhenDoneFlag = 8, //!< After parsing a complete JSON root from stream, stop further processing the rest of stream. When this flag is used, parser will not generate kParseErrorDocumentRootNotSingular error. + kParseFullPrecisionFlag = 16, //!< Parse number in full precision (but slower). + kParseCommentsFlag = 32, //!< Allow one-line (//) and multi-line (/**/) comments. + kParseNumbersAsStringsFlag = 64, //!< Parse all numbers (ints/doubles) as strings. + kParseTrailingCommasFlag = 128, //!< Allow trailing commas at the end of objects and arrays. + kParseNanAndInfFlag = 256, //!< Allow parsing NaN, Inf, Infinity, -Inf and -Infinity as doubles. + kParseEscapedApostropheFlag = 512, //!< Allow escaped apostrophe in strings. + kParseDefaultFlags = RAPIDJSON_PARSE_DEFAULT_FLAGS //!< Default parse flags. Can be customized by defining RAPIDJSON_PARSE_DEFAULT_FLAGS +}; + +/////////////////////////////////////////////////////////////////////////////// +// Handler + +/*! \class rapidjson::Handler + \brief Concept for receiving events from GenericReader upon parsing. + The functions return true if no error occurs. If they return false, + the event publisher should terminate the process. +\code +concept Handler { + typename Ch; + + bool Null(); + bool Bool(bool b); + bool Int(int i); + bool Uint(unsigned i); + bool Int64(int64_t i); + bool Uint64(uint64_t i); + bool Double(double d); + /// enabled via kParseNumbersAsStringsFlag, string is not null-terminated (use length) + bool RawNumber(const Ch* str, SizeType length, bool copy); + bool String(const Ch* str, SizeType length, bool copy); + bool StartObject(); + bool Key(const Ch* str, SizeType length, bool copy); + bool EndObject(SizeType memberCount); + bool StartArray(); + bool EndArray(SizeType elementCount); +}; +\endcode +*/ +/////////////////////////////////////////////////////////////////////////////// +// BaseReaderHandler + +//! Default implementation of Handler. +/*! This can be used as base class of any reader handler. + \note implements Handler concept +*/ +template, typename Derived = void> +struct BaseReaderHandler { + typedef typename Encoding::Ch Ch; + + typedef typename internal::SelectIf, BaseReaderHandler, Derived>::Type Override; + + bool Default() { return true; } + bool Null() { return static_cast(*this).Default(); } + bool Bool(bool) { return static_cast(*this).Default(); } + bool Int(int) { return static_cast(*this).Default(); } + bool Uint(unsigned) { return static_cast(*this).Default(); } + bool Int64(int64_t) { return static_cast(*this).Default(); } + bool Uint64(uint64_t) { return static_cast(*this).Default(); } + bool Double(double) { return static_cast(*this).Default(); } + /// enabled via kParseNumbersAsStringsFlag, string is not null-terminated (use length) + bool RawNumber(const Ch* str, SizeType len, bool copy) { return static_cast(*this).String(str, len, copy); } + bool String(const Ch*, SizeType, bool) { return static_cast(*this).Default(); } + bool StartObject() { return static_cast(*this).Default(); } + bool Key(const Ch* str, SizeType len, bool copy) { return static_cast(*this).String(str, len, copy); } + bool EndObject(SizeType) { return static_cast(*this).Default(); } + bool StartArray() { return static_cast(*this).Default(); } + bool EndArray(SizeType) { return static_cast(*this).Default(); } +}; + +/////////////////////////////////////////////////////////////////////////////// +// StreamLocalCopy + +namespace internal { + +template::copyOptimization> +class StreamLocalCopy; + +//! Do copy optimization. +template +class StreamLocalCopy { +public: + StreamLocalCopy(Stream& original) : s(original), original_(original) {} + ~StreamLocalCopy() { original_ = s; } + + Stream s; + +private: + StreamLocalCopy& operator=(const StreamLocalCopy&) /* = delete */; + + Stream& original_; +}; + +//! Keep reference. +template +class StreamLocalCopy { +public: + StreamLocalCopy(Stream& original) : s(original) {} + + Stream& s; + +private: + StreamLocalCopy& operator=(const StreamLocalCopy&) /* = delete */; +}; + +} // namespace internal + +/////////////////////////////////////////////////////////////////////////////// +// SkipWhitespace + +//! Skip the JSON white spaces in a stream. +/*! \param is A input stream for skipping white spaces. + \note This function has SSE2/SSE4.2 specialization. +*/ +template +void SkipWhitespace(InputStream& is) { + internal::StreamLocalCopy copy(is); + InputStream& s(copy.s); + + typename InputStream::Ch c; + while ((c = s.Peek()) == ' ' || c == '\n' || c == '\r' || c == '\t') + s.Take(); +} + +inline const char* SkipWhitespace(const char* p, const char* end) { + while (p != end && (*p == ' ' || *p == '\n' || *p == '\r' || *p == '\t')) + ++p; + return p; +} + +#ifdef RAPIDJSON_SSE42 +//! Skip whitespace with SSE 4.2 pcmpistrm instruction, testing 16 8-byte characters at once. +inline const char *SkipWhitespace_SIMD(const char* p) { + // Fast return for single non-whitespace + if (*p == ' ' || *p == '\n' || *p == '\r' || *p == '\t') + ++p; + else + return p; + + // 16-byte align to the next boundary + const char* nextAligned = reinterpret_cast((reinterpret_cast(p) + 15) & static_cast(~15)); + while (p != nextAligned) + if (*p == ' ' || *p == '\n' || *p == '\r' || *p == '\t') + ++p; + else + return p; + + // The rest of string using SIMD + static const char whitespace[16] = " \n\r\t"; + const __m128i w = _mm_loadu_si128(reinterpret_cast(&whitespace[0])); + + for (;; p += 16) { + const __m128i s = _mm_load_si128(reinterpret_cast(p)); + const int r = _mm_cmpistri(w, s, _SIDD_UBYTE_OPS | _SIDD_CMP_EQUAL_ANY | _SIDD_LEAST_SIGNIFICANT | _SIDD_NEGATIVE_POLARITY); + if (r != 16) // some of characters is non-whitespace + return p + r; + } +} + +inline const char *SkipWhitespace_SIMD(const char* p, const char* end) { + // Fast return for single non-whitespace + if (p != end && (*p == ' ' || *p == '\n' || *p == '\r' || *p == '\t')) + ++p; + else + return p; + + // The middle of string using SIMD + static const char whitespace[16] = " \n\r\t"; + const __m128i w = _mm_loadu_si128(reinterpret_cast(&whitespace[0])); + + for (; p <= end - 16; p += 16) { + const __m128i s = _mm_loadu_si128(reinterpret_cast(p)); + const int r = _mm_cmpistri(w, s, _SIDD_UBYTE_OPS | _SIDD_CMP_EQUAL_ANY | _SIDD_LEAST_SIGNIFICANT | _SIDD_NEGATIVE_POLARITY); + if (r != 16) // some of characters is non-whitespace + return p + r; + } + + return SkipWhitespace(p, end); +} + +#elif defined(RAPIDJSON_SSE2) + +//! Skip whitespace with SSE2 instructions, testing 16 8-byte characters at once. +inline const char *SkipWhitespace_SIMD(const char* p) { + // Fast return for single non-whitespace + if (*p == ' ' || *p == '\n' || *p == '\r' || *p == '\t') + ++p; + else + return p; + + // 16-byte align to the next boundary + const char* nextAligned = reinterpret_cast((reinterpret_cast(p) + 15) & static_cast(~15)); + while (p != nextAligned) + if (*p == ' ' || *p == '\n' || *p == '\r' || *p == '\t') + ++p; + else + return p; + + // The rest of string + #define C16(c) { c, c, c, c, c, c, c, c, c, c, c, c, c, c, c, c } + static const char whitespaces[4][16] = { C16(' '), C16('\n'), C16('\r'), C16('\t') }; + #undef C16 + + const __m128i w0 = _mm_loadu_si128(reinterpret_cast(&whitespaces[0][0])); + const __m128i w1 = _mm_loadu_si128(reinterpret_cast(&whitespaces[1][0])); + const __m128i w2 = _mm_loadu_si128(reinterpret_cast(&whitespaces[2][0])); + const __m128i w3 = _mm_loadu_si128(reinterpret_cast(&whitespaces[3][0])); + + for (;; p += 16) { + const __m128i s = _mm_load_si128(reinterpret_cast(p)); + __m128i x = _mm_cmpeq_epi8(s, w0); + x = _mm_or_si128(x, _mm_cmpeq_epi8(s, w1)); + x = _mm_or_si128(x, _mm_cmpeq_epi8(s, w2)); + x = _mm_or_si128(x, _mm_cmpeq_epi8(s, w3)); + unsigned short r = static_cast(~_mm_movemask_epi8(x)); + if (r != 0) { // some of characters may be non-whitespace +#ifdef _MSC_VER // Find the index of first non-whitespace + unsigned long offset; + _BitScanForward(&offset, r); + return p + offset; +#else + return p + __builtin_ffs(r) - 1; +#endif + } + } +} + +inline const char *SkipWhitespace_SIMD(const char* p, const char* end) { + // Fast return for single non-whitespace + if (p != end && (*p == ' ' || *p == '\n' || *p == '\r' || *p == '\t')) + ++p; + else + return p; + + // The rest of string + #define C16(c) { c, c, c, c, c, c, c, c, c, c, c, c, c, c, c, c } + static const char whitespaces[4][16] = { C16(' '), C16('\n'), C16('\r'), C16('\t') }; + #undef C16 + + const __m128i w0 = _mm_loadu_si128(reinterpret_cast(&whitespaces[0][0])); + const __m128i w1 = _mm_loadu_si128(reinterpret_cast(&whitespaces[1][0])); + const __m128i w2 = _mm_loadu_si128(reinterpret_cast(&whitespaces[2][0])); + const __m128i w3 = _mm_loadu_si128(reinterpret_cast(&whitespaces[3][0])); + + for (; p <= end - 16; p += 16) { + const __m128i s = _mm_loadu_si128(reinterpret_cast(p)); + __m128i x = _mm_cmpeq_epi8(s, w0); + x = _mm_or_si128(x, _mm_cmpeq_epi8(s, w1)); + x = _mm_or_si128(x, _mm_cmpeq_epi8(s, w2)); + x = _mm_or_si128(x, _mm_cmpeq_epi8(s, w3)); + unsigned short r = static_cast(~_mm_movemask_epi8(x)); + if (r != 0) { // some of characters may be non-whitespace +#ifdef _MSC_VER // Find the index of first non-whitespace + unsigned long offset; + _BitScanForward(&offset, r); + return p + offset; +#else + return p + __builtin_ffs(r) - 1; +#endif + } + } + + return SkipWhitespace(p, end); +} + +#elif defined(RAPIDJSON_NEON) + +//! Skip whitespace with ARM Neon instructions, testing 16 8-byte characters at once. +inline const char *SkipWhitespace_SIMD(const char* p) { + // Fast return for single non-whitespace + if (*p == ' ' || *p == '\n' || *p == '\r' || *p == '\t') + ++p; + else + return p; + + // 16-byte align to the next boundary + const char* nextAligned = reinterpret_cast((reinterpret_cast(p) + 15) & static_cast(~15)); + while (p != nextAligned) + if (*p == ' ' || *p == '\n' || *p == '\r' || *p == '\t') + ++p; + else + return p; + + const uint8x16_t w0 = vmovq_n_u8(' '); + const uint8x16_t w1 = vmovq_n_u8('\n'); + const uint8x16_t w2 = vmovq_n_u8('\r'); + const uint8x16_t w3 = vmovq_n_u8('\t'); + + for (;; p += 16) { + const uint8x16_t s = vld1q_u8(reinterpret_cast(p)); + uint8x16_t x = vceqq_u8(s, w0); + x = vorrq_u8(x, vceqq_u8(s, w1)); + x = vorrq_u8(x, vceqq_u8(s, w2)); + x = vorrq_u8(x, vceqq_u8(s, w3)); + + x = vmvnq_u8(x); // Negate + x = vrev64q_u8(x); // Rev in 64 + uint64_t low = vgetq_lane_u64(vreinterpretq_u64_u8(x), 0); // extract + uint64_t high = vgetq_lane_u64(vreinterpretq_u64_u8(x), 1); // extract + + if (low == 0) { + if (high != 0) { + uint32_t lz = internal::clzll(high); + return p + 8 + (lz >> 3); + } + } else { + uint32_t lz = internal::clzll(low); + return p + (lz >> 3); + } + } +} + +inline const char *SkipWhitespace_SIMD(const char* p, const char* end) { + // Fast return for single non-whitespace + if (p != end && (*p == ' ' || *p == '\n' || *p == '\r' || *p == '\t')) + ++p; + else + return p; + + const uint8x16_t w0 = vmovq_n_u8(' '); + const uint8x16_t w1 = vmovq_n_u8('\n'); + const uint8x16_t w2 = vmovq_n_u8('\r'); + const uint8x16_t w3 = vmovq_n_u8('\t'); + + for (; p <= end - 16; p += 16) { + const uint8x16_t s = vld1q_u8(reinterpret_cast(p)); + uint8x16_t x = vceqq_u8(s, w0); + x = vorrq_u8(x, vceqq_u8(s, w1)); + x = vorrq_u8(x, vceqq_u8(s, w2)); + x = vorrq_u8(x, vceqq_u8(s, w3)); + + x = vmvnq_u8(x); // Negate + x = vrev64q_u8(x); // Rev in 64 + uint64_t low = vgetq_lane_u64(vreinterpretq_u64_u8(x), 0); // extract + uint64_t high = vgetq_lane_u64(vreinterpretq_u64_u8(x), 1); // extract + + if (low == 0) { + if (high != 0) { + uint32_t lz = internal::clzll(high); + return p + 8 + (lz >> 3); + } + } else { + uint32_t lz = internal::clzll(low); + return p + (lz >> 3); + } + } + + return SkipWhitespace(p, end); +} + +#endif // RAPIDJSON_NEON + +#ifdef RAPIDJSON_SIMD +//! Template function specialization for InsituStringStream +template<> inline void SkipWhitespace(InsituStringStream& is) { + is.src_ = const_cast(SkipWhitespace_SIMD(is.src_)); +} + +//! Template function specialization for StringStream +template<> inline void SkipWhitespace(StringStream& is) { + is.src_ = SkipWhitespace_SIMD(is.src_); +} + +template<> inline void SkipWhitespace(EncodedInputStream, MemoryStream>& is) { + is.is_.src_ = SkipWhitespace_SIMD(is.is_.src_, is.is_.end_); +} +#endif // RAPIDJSON_SIMD + +/////////////////////////////////////////////////////////////////////////////// +// GenericReader + +//! SAX-style JSON parser. Use \ref Reader for UTF8 encoding and default allocator. +/*! GenericReader parses JSON text from a stream, and send events synchronously to an + object implementing Handler concept. + + It needs to allocate a stack for storing a single decoded string during + non-destructive parsing. + + For in-situ parsing, the decoded string is directly written to the source + text string, no temporary buffer is required. + + A GenericReader object can be reused for parsing multiple JSON text. + + \tparam SourceEncoding Encoding of the input stream. + \tparam TargetEncoding Encoding of the parse output. + \tparam StackAllocator Allocator type for stack. +*/ +template +class GenericReader { +public: + typedef typename SourceEncoding::Ch Ch; //!< SourceEncoding character type + + //! Constructor. + /*! \param stackAllocator Optional allocator for allocating stack memory. (Only use for non-destructive parsing) + \param stackCapacity stack capacity in bytes for storing a single decoded string. (Only use for non-destructive parsing) + */ + GenericReader(StackAllocator* stackAllocator = 0, size_t stackCapacity = kDefaultStackCapacity) : + stack_(stackAllocator, stackCapacity), parseResult_(), state_(IterativeParsingStartState) {} + + //! Parse JSON text. + /*! \tparam parseFlags Combination of \ref ParseFlag. + \tparam InputStream Type of input stream, implementing Stream concept. + \tparam Handler Type of handler, implementing Handler concept. + \param is Input stream to be parsed. + \param handler The handler to receive events. + \return Whether the parsing is successful. + */ + template + ParseResult Parse(InputStream& is, Handler& handler) { + if (parseFlags & kParseIterativeFlag) + return IterativeParse(is, handler); + + parseResult_.Clear(); + + ClearStackOnExit scope(*this); + + SkipWhitespaceAndComments(is); + RAPIDJSON_PARSE_ERROR_EARLY_RETURN(parseResult_); + + if (RAPIDJSON_UNLIKELY(is.Peek() == '\0')) { + RAPIDJSON_PARSE_ERROR_NORETURN(kParseErrorDocumentEmpty, is.Tell()); + RAPIDJSON_PARSE_ERROR_EARLY_RETURN(parseResult_); + } + else { + ParseValue(is, handler); + RAPIDJSON_PARSE_ERROR_EARLY_RETURN(parseResult_); + + if (!(parseFlags & kParseStopWhenDoneFlag)) { + SkipWhitespaceAndComments(is); + RAPIDJSON_PARSE_ERROR_EARLY_RETURN(parseResult_); + + if (RAPIDJSON_UNLIKELY(is.Peek() != '\0')) { + RAPIDJSON_PARSE_ERROR_NORETURN(kParseErrorDocumentRootNotSingular, is.Tell()); + RAPIDJSON_PARSE_ERROR_EARLY_RETURN(parseResult_); + } + } + } + + return parseResult_; + } + + //! Parse JSON text (with \ref kParseDefaultFlags) + /*! \tparam InputStream Type of input stream, implementing Stream concept + \tparam Handler Type of handler, implementing Handler concept. + \param is Input stream to be parsed. + \param handler The handler to receive events. + \return Whether the parsing is successful. + */ + template + ParseResult Parse(InputStream& is, Handler& handler) { + return Parse(is, handler); + } + + //! Initialize JSON text token-by-token parsing + /*! + */ + void IterativeParseInit() { + parseResult_.Clear(); + state_ = IterativeParsingStartState; + } + + //! Parse one token from JSON text + /*! \tparam InputStream Type of input stream, implementing Stream concept + \tparam Handler Type of handler, implementing Handler concept. + \param is Input stream to be parsed. + \param handler The handler to receive events. + \return Whether the parsing is successful. + */ + template + bool IterativeParseNext(InputStream& is, Handler& handler) { + while (RAPIDJSON_LIKELY(is.Peek() != '\0')) { + SkipWhitespaceAndComments(is); + + Token t = Tokenize(is.Peek()); + IterativeParsingState n = Predict(state_, t); + IterativeParsingState d = Transit(state_, t, n, is, handler); + + // If we've finished or hit an error... + if (RAPIDJSON_UNLIKELY(IsIterativeParsingCompleteState(d))) { + // Report errors. + if (d == IterativeParsingErrorState) { + HandleError(state_, is); + return false; + } + + // Transition to the finish state. + RAPIDJSON_ASSERT(d == IterativeParsingFinishState); + state_ = d; + + // If StopWhenDone is not set... + if (!(parseFlags & kParseStopWhenDoneFlag)) { + // ... and extra non-whitespace data is found... + SkipWhitespaceAndComments(is); + if (is.Peek() != '\0') { + // ... this is considered an error. + HandleError(state_, is); + return false; + } + } + + // Success! We are done! + return true; + } + + // Transition to the new state. + state_ = d; + + // If we parsed anything other than a delimiter, we invoked the handler, so we can return true now. + if (!IsIterativeParsingDelimiterState(n)) + return true; + } + + // We reached the end of file. + stack_.Clear(); + + if (state_ != IterativeParsingFinishState) { + HandleError(state_, is); + return false; + } + + return true; + } + + //! Check if token-by-token parsing JSON text is complete + /*! \return Whether the JSON has been fully decoded. + */ + RAPIDJSON_FORCEINLINE bool IterativeParseComplete() const { + return IsIterativeParsingCompleteState(state_); + } + + //! Whether a parse error has occurred in the last parsing. + bool HasParseError() const { return parseResult_.IsError(); } + + //! Get the \ref ParseErrorCode of last parsing. + ParseErrorCode GetParseErrorCode() const { return parseResult_.Code(); } + + //! Get the position of last parsing error in input, 0 otherwise. + size_t GetErrorOffset() const { return parseResult_.Offset(); } + +protected: + void SetParseError(ParseErrorCode code, size_t offset) { parseResult_.Set(code, offset); } + +private: + // Prohibit copy constructor & assignment operator. + GenericReader(const GenericReader&); + GenericReader& operator=(const GenericReader&); + + void ClearStack() { stack_.Clear(); } + + // clear stack on any exit from ParseStream, e.g. due to exception + struct ClearStackOnExit { + explicit ClearStackOnExit(GenericReader& r) : r_(r) {} + ~ClearStackOnExit() { r_.ClearStack(); } + private: + GenericReader& r_; + ClearStackOnExit(const ClearStackOnExit&); + ClearStackOnExit& operator=(const ClearStackOnExit&); + }; + + template + void SkipWhitespaceAndComments(InputStream& is) { + SkipWhitespace(is); + + if (parseFlags & kParseCommentsFlag) { + while (RAPIDJSON_UNLIKELY(Consume(is, '/'))) { + if (Consume(is, '*')) { + while (true) { + if (RAPIDJSON_UNLIKELY(is.Peek() == '\0')) + RAPIDJSON_PARSE_ERROR(kParseErrorUnspecificSyntaxError, is.Tell()); + else if (Consume(is, '*')) { + if (Consume(is, '/')) + break; + } + else + is.Take(); + } + } + else if (RAPIDJSON_LIKELY(Consume(is, '/'))) + while (is.Peek() != '\0' && is.Take() != '\n') {} + else + RAPIDJSON_PARSE_ERROR(kParseErrorUnspecificSyntaxError, is.Tell()); + + SkipWhitespace(is); + } + } + } + + // Parse object: { string : value, ... } + template + void ParseObject(InputStream& is, Handler& handler) { + RAPIDJSON_ASSERT(is.Peek() == '{'); + is.Take(); // Skip '{' + + if (RAPIDJSON_UNLIKELY(!handler.StartObject())) + RAPIDJSON_PARSE_ERROR(kParseErrorTermination, is.Tell()); + + SkipWhitespaceAndComments(is); + RAPIDJSON_PARSE_ERROR_EARLY_RETURN_VOID; + + if (Consume(is, '}')) { + if (RAPIDJSON_UNLIKELY(!handler.EndObject(0))) // empty object + RAPIDJSON_PARSE_ERROR(kParseErrorTermination, is.Tell()); + return; + } + + for (SizeType memberCount = 0;;) { + if (RAPIDJSON_UNLIKELY(is.Peek() != '"')) + RAPIDJSON_PARSE_ERROR(kParseErrorObjectMissName, is.Tell()); + + ParseString(is, handler, true); + RAPIDJSON_PARSE_ERROR_EARLY_RETURN_VOID; + + SkipWhitespaceAndComments(is); + RAPIDJSON_PARSE_ERROR_EARLY_RETURN_VOID; + + if (RAPIDJSON_UNLIKELY(!Consume(is, ':'))) + RAPIDJSON_PARSE_ERROR(kParseErrorObjectMissColon, is.Tell()); + + SkipWhitespaceAndComments(is); + RAPIDJSON_PARSE_ERROR_EARLY_RETURN_VOID; + + ParseValue(is, handler); + RAPIDJSON_PARSE_ERROR_EARLY_RETURN_VOID; + + SkipWhitespaceAndComments(is); + RAPIDJSON_PARSE_ERROR_EARLY_RETURN_VOID; + + ++memberCount; + + switch (is.Peek()) { + case ',': + is.Take(); + SkipWhitespaceAndComments(is); + RAPIDJSON_PARSE_ERROR_EARLY_RETURN_VOID; + break; + case '}': + is.Take(); + if (RAPIDJSON_UNLIKELY(!handler.EndObject(memberCount))) + RAPIDJSON_PARSE_ERROR(kParseErrorTermination, is.Tell()); + return; + default: + RAPIDJSON_PARSE_ERROR(kParseErrorObjectMissCommaOrCurlyBracket, is.Tell()); break; // This useless break is only for making warning and coverage happy + } + + if (parseFlags & kParseTrailingCommasFlag) { + if (is.Peek() == '}') { + if (RAPIDJSON_UNLIKELY(!handler.EndObject(memberCount))) + RAPIDJSON_PARSE_ERROR(kParseErrorTermination, is.Tell()); + is.Take(); + return; + } + } + } + } + + // Parse array: [ value, ... ] + template + void ParseArray(InputStream& is, Handler& handler) { + RAPIDJSON_ASSERT(is.Peek() == '['); + is.Take(); // Skip '[' + + if (RAPIDJSON_UNLIKELY(!handler.StartArray())) + RAPIDJSON_PARSE_ERROR(kParseErrorTermination, is.Tell()); + + SkipWhitespaceAndComments(is); + RAPIDJSON_PARSE_ERROR_EARLY_RETURN_VOID; + + if (Consume(is, ']')) { + if (RAPIDJSON_UNLIKELY(!handler.EndArray(0))) // empty array + RAPIDJSON_PARSE_ERROR(kParseErrorTermination, is.Tell()); + return; + } + + for (SizeType elementCount = 0;;) { + ParseValue(is, handler); + RAPIDJSON_PARSE_ERROR_EARLY_RETURN_VOID; + + ++elementCount; + SkipWhitespaceAndComments(is); + RAPIDJSON_PARSE_ERROR_EARLY_RETURN_VOID; + + if (Consume(is, ',')) { + SkipWhitespaceAndComments(is); + RAPIDJSON_PARSE_ERROR_EARLY_RETURN_VOID; + } + else if (Consume(is, ']')) { + if (RAPIDJSON_UNLIKELY(!handler.EndArray(elementCount))) + RAPIDJSON_PARSE_ERROR(kParseErrorTermination, is.Tell()); + return; + } + else + RAPIDJSON_PARSE_ERROR(kParseErrorArrayMissCommaOrSquareBracket, is.Tell()); + + if (parseFlags & kParseTrailingCommasFlag) { + if (is.Peek() == ']') { + if (RAPIDJSON_UNLIKELY(!handler.EndArray(elementCount))) + RAPIDJSON_PARSE_ERROR(kParseErrorTermination, is.Tell()); + is.Take(); + return; + } + } + } + } + + template + void ParseNull(InputStream& is, Handler& handler) { + RAPIDJSON_ASSERT(is.Peek() == 'n'); + is.Take(); + + if (RAPIDJSON_LIKELY(Consume(is, 'u') && Consume(is, 'l') && Consume(is, 'l'))) { + if (RAPIDJSON_UNLIKELY(!handler.Null())) + RAPIDJSON_PARSE_ERROR(kParseErrorTermination, is.Tell()); + } + else + RAPIDJSON_PARSE_ERROR(kParseErrorValueInvalid, is.Tell()); + } + + template + void ParseTrue(InputStream& is, Handler& handler) { + RAPIDJSON_ASSERT(is.Peek() == 't'); + is.Take(); + + if (RAPIDJSON_LIKELY(Consume(is, 'r') && Consume(is, 'u') && Consume(is, 'e'))) { + if (RAPIDJSON_UNLIKELY(!handler.Bool(true))) + RAPIDJSON_PARSE_ERROR(kParseErrorTermination, is.Tell()); + } + else + RAPIDJSON_PARSE_ERROR(kParseErrorValueInvalid, is.Tell()); + } + + template + void ParseFalse(InputStream& is, Handler& handler) { + RAPIDJSON_ASSERT(is.Peek() == 'f'); + is.Take(); + + if (RAPIDJSON_LIKELY(Consume(is, 'a') && Consume(is, 'l') && Consume(is, 's') && Consume(is, 'e'))) { + if (RAPIDJSON_UNLIKELY(!handler.Bool(false))) + RAPIDJSON_PARSE_ERROR(kParseErrorTermination, is.Tell()); + } + else + RAPIDJSON_PARSE_ERROR(kParseErrorValueInvalid, is.Tell()); + } + + template + RAPIDJSON_FORCEINLINE static bool Consume(InputStream& is, typename InputStream::Ch expect) { + if (RAPIDJSON_LIKELY(is.Peek() == expect)) { + is.Take(); + return true; + } + else + return false; + } + + // Helper function to parse four hexadecimal digits in \uXXXX in ParseString(). + template + unsigned ParseHex4(InputStream& is, size_t escapeOffset) { + unsigned codepoint = 0; + for (int i = 0; i < 4; i++) { + Ch c = is.Peek(); + codepoint <<= 4; + codepoint += static_cast(c); + if (c >= '0' && c <= '9') + codepoint -= '0'; + else if (c >= 'A' && c <= 'F') + codepoint -= 'A' - 10; + else if (c >= 'a' && c <= 'f') + codepoint -= 'a' - 10; + else { + RAPIDJSON_PARSE_ERROR_NORETURN(kParseErrorStringUnicodeEscapeInvalidHex, escapeOffset); + RAPIDJSON_PARSE_ERROR_EARLY_RETURN(0); + } + is.Take(); + } + return codepoint; + } + + template + class StackStream { + public: + typedef CharType Ch; + + StackStream(internal::Stack& stack) : stack_(stack), length_(0) {} + RAPIDJSON_FORCEINLINE void Put(Ch c) { + *stack_.template Push() = c; + ++length_; + } + + RAPIDJSON_FORCEINLINE void* Push(SizeType count) { + length_ += count; + return stack_.template Push(count); + } + + size_t Length() const { return length_; } + + Ch* Pop() { + return stack_.template Pop(length_); + } + + private: + StackStream(const StackStream&); + StackStream& operator=(const StackStream&); + + internal::Stack& stack_; + SizeType length_; + }; + + // Parse string and generate String event. Different code paths for kParseInsituFlag. + template + void ParseString(InputStream& is, Handler& handler, bool isKey = false) { + internal::StreamLocalCopy copy(is); + InputStream& s(copy.s); + + RAPIDJSON_ASSERT(s.Peek() == '\"'); + s.Take(); // Skip '\"' + + bool success = false; + if (parseFlags & kParseInsituFlag) { + typename InputStream::Ch *head = s.PutBegin(); + ParseStringToStream(s, s); + RAPIDJSON_PARSE_ERROR_EARLY_RETURN_VOID; + size_t length = s.PutEnd(head) - 1; + RAPIDJSON_ASSERT(length <= 0xFFFFFFFF); + const typename TargetEncoding::Ch* const str = reinterpret_cast(head); + success = (isKey ? handler.Key(str, SizeType(length), false) : handler.String(str, SizeType(length), false)); + } + else { + StackStream stackStream(stack_); + ParseStringToStream(s, stackStream); + RAPIDJSON_PARSE_ERROR_EARLY_RETURN_VOID; + SizeType length = static_cast(stackStream.Length()) - 1; + const typename TargetEncoding::Ch* const str = stackStream.Pop(); + success = (isKey ? handler.Key(str, length, true) : handler.String(str, length, true)); + } + if (RAPIDJSON_UNLIKELY(!success)) + RAPIDJSON_PARSE_ERROR(kParseErrorTermination, s.Tell()); + } + + // Parse string to an output is + // This function handles the prefix/suffix double quotes, escaping, and optional encoding validation. + template + RAPIDJSON_FORCEINLINE void ParseStringToStream(InputStream& is, OutputStream& os) { +//!@cond RAPIDJSON_HIDDEN_FROM_DOXYGEN +#define Z16 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + static const char escape[256] = { + Z16, Z16, 0, 0,'\"', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '/', + Z16, Z16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,'\\', 0, 0, 0, + 0, 0,'\b', 0, 0, 0,'\f', 0, 0, 0, 0, 0, 0, 0,'\n', 0, + 0, 0,'\r', 0,'\t', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + Z16, Z16, Z16, Z16, Z16, Z16, Z16, Z16 + }; +#undef Z16 +//!@endcond + + for (;;) { + // Scan and copy string before "\\\"" or < 0x20. This is an optional optimzation. + if (!(parseFlags & kParseValidateEncodingFlag)) + ScanCopyUnescapedString(is, os); + + Ch c = is.Peek(); + if (RAPIDJSON_UNLIKELY(c == '\\')) { // Escape + size_t escapeOffset = is.Tell(); // For invalid escaping, report the initial '\\' as error offset + is.Take(); + Ch e = is.Peek(); + if ((sizeof(Ch) == 1 || unsigned(e) < 256) && RAPIDJSON_LIKELY(escape[static_cast(e)])) { + is.Take(); + os.Put(static_cast(escape[static_cast(e)])); + } + else if ((parseFlags & kParseEscapedApostropheFlag) && RAPIDJSON_LIKELY(e == '\'')) { // Allow escaped apostrophe + is.Take(); + os.Put('\''); + } + else if (RAPIDJSON_LIKELY(e == 'u')) { // Unicode + is.Take(); + unsigned codepoint = ParseHex4(is, escapeOffset); + RAPIDJSON_PARSE_ERROR_EARLY_RETURN_VOID; + if (RAPIDJSON_UNLIKELY(codepoint >= 0xD800 && codepoint <= 0xDFFF)) { + // high surrogate, check if followed by valid low surrogate + if (RAPIDJSON_LIKELY(codepoint <= 0xDBFF)) { + // Handle UTF-16 surrogate pair + if (RAPIDJSON_UNLIKELY(!Consume(is, '\\') || !Consume(is, 'u'))) + RAPIDJSON_PARSE_ERROR(kParseErrorStringUnicodeSurrogateInvalid, escapeOffset); + unsigned codepoint2 = ParseHex4(is, escapeOffset); + RAPIDJSON_PARSE_ERROR_EARLY_RETURN_VOID; + if (RAPIDJSON_UNLIKELY(codepoint2 < 0xDC00 || codepoint2 > 0xDFFF)) + RAPIDJSON_PARSE_ERROR(kParseErrorStringUnicodeSurrogateInvalid, escapeOffset); + codepoint = (((codepoint - 0xD800) << 10) | (codepoint2 - 0xDC00)) + 0x10000; + } + // single low surrogate + else + { + RAPIDJSON_PARSE_ERROR(kParseErrorStringUnicodeSurrogateInvalid, escapeOffset); + } + } + TEncoding::Encode(os, codepoint); + } + else + RAPIDJSON_PARSE_ERROR(kParseErrorStringEscapeInvalid, escapeOffset); + } + else if (RAPIDJSON_UNLIKELY(c == '"')) { // Closing double quote + is.Take(); + os.Put('\0'); // null-terminate the string + return; + } + else if (RAPIDJSON_UNLIKELY(static_cast(c) < 0x20)) { // RFC 4627: unescaped = %x20-21 / %x23-5B / %x5D-10FFFF + if (c == '\0') + RAPIDJSON_PARSE_ERROR(kParseErrorStringMissQuotationMark, is.Tell()); + else + RAPIDJSON_PARSE_ERROR(kParseErrorStringInvalidEncoding, is.Tell()); + } + else { + size_t offset = is.Tell(); + if (RAPIDJSON_UNLIKELY((parseFlags & kParseValidateEncodingFlag ? + !Transcoder::Validate(is, os) : + !Transcoder::Transcode(is, os)))) + RAPIDJSON_PARSE_ERROR(kParseErrorStringInvalidEncoding, offset); + } + } + } + + template + static RAPIDJSON_FORCEINLINE void ScanCopyUnescapedString(InputStream&, OutputStream&) { + // Do nothing for generic version + } + +#if defined(RAPIDJSON_SSE2) || defined(RAPIDJSON_SSE42) + // StringStream -> StackStream + static RAPIDJSON_FORCEINLINE void ScanCopyUnescapedString(StringStream& is, StackStream& os) { + const char* p = is.src_; + + // Scan one by one until alignment (unaligned load may cross page boundary and cause crash) + const char* nextAligned = reinterpret_cast((reinterpret_cast(p) + 15) & static_cast(~15)); + while (p != nextAligned) + if (RAPIDJSON_UNLIKELY(*p == '\"') || RAPIDJSON_UNLIKELY(*p == '\\') || RAPIDJSON_UNLIKELY(static_cast(*p) < 0x20)) { + is.src_ = p; + return; + } + else + os.Put(*p++); + + // The rest of string using SIMD + static const char dquote[16] = { '\"', '\"', '\"', '\"', '\"', '\"', '\"', '\"', '\"', '\"', '\"', '\"', '\"', '\"', '\"', '\"' }; + static const char bslash[16] = { '\\', '\\', '\\', '\\', '\\', '\\', '\\', '\\', '\\', '\\', '\\', '\\', '\\', '\\', '\\', '\\' }; + static const char space[16] = { 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F }; + const __m128i dq = _mm_loadu_si128(reinterpret_cast(&dquote[0])); + const __m128i bs = _mm_loadu_si128(reinterpret_cast(&bslash[0])); + const __m128i sp = _mm_loadu_si128(reinterpret_cast(&space[0])); + + for (;; p += 16) { + const __m128i s = _mm_load_si128(reinterpret_cast(p)); + const __m128i t1 = _mm_cmpeq_epi8(s, dq); + const __m128i t2 = _mm_cmpeq_epi8(s, bs); + const __m128i t3 = _mm_cmpeq_epi8(_mm_max_epu8(s, sp), sp); // s < 0x20 <=> max(s, 0x1F) == 0x1F + const __m128i x = _mm_or_si128(_mm_or_si128(t1, t2), t3); + unsigned short r = static_cast(_mm_movemask_epi8(x)); + if (RAPIDJSON_UNLIKELY(r != 0)) { // some of characters is escaped + SizeType length; + #ifdef _MSC_VER // Find the index of first escaped + unsigned long offset; + _BitScanForward(&offset, r); + length = offset; + #else + length = static_cast(__builtin_ffs(r) - 1); + #endif + if (length != 0) { + char* q = reinterpret_cast(os.Push(length)); + for (size_t i = 0; i < length; i++) + q[i] = p[i]; + + p += length; + } + break; + } + _mm_storeu_si128(reinterpret_cast<__m128i *>(os.Push(16)), s); + } + + is.src_ = p; + } + + // InsituStringStream -> InsituStringStream + static RAPIDJSON_FORCEINLINE void ScanCopyUnescapedString(InsituStringStream& is, InsituStringStream& os) { + RAPIDJSON_ASSERT(&is == &os); + (void)os; + + if (is.src_ == is.dst_) { + SkipUnescapedString(is); + return; + } + + char* p = is.src_; + char *q = is.dst_; + + // Scan one by one until alignment (unaligned load may cross page boundary and cause crash) + const char* nextAligned = reinterpret_cast((reinterpret_cast(p) + 15) & static_cast(~15)); + while (p != nextAligned) + if (RAPIDJSON_UNLIKELY(*p == '\"') || RAPIDJSON_UNLIKELY(*p == '\\') || RAPIDJSON_UNLIKELY(static_cast(*p) < 0x20)) { + is.src_ = p; + is.dst_ = q; + return; + } + else + *q++ = *p++; + + // The rest of string using SIMD + static const char dquote[16] = { '\"', '\"', '\"', '\"', '\"', '\"', '\"', '\"', '\"', '\"', '\"', '\"', '\"', '\"', '\"', '\"' }; + static const char bslash[16] = { '\\', '\\', '\\', '\\', '\\', '\\', '\\', '\\', '\\', '\\', '\\', '\\', '\\', '\\', '\\', '\\' }; + static const char space[16] = { 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F }; + const __m128i dq = _mm_loadu_si128(reinterpret_cast(&dquote[0])); + const __m128i bs = _mm_loadu_si128(reinterpret_cast(&bslash[0])); + const __m128i sp = _mm_loadu_si128(reinterpret_cast(&space[0])); + + for (;; p += 16, q += 16) { + const __m128i s = _mm_load_si128(reinterpret_cast(p)); + const __m128i t1 = _mm_cmpeq_epi8(s, dq); + const __m128i t2 = _mm_cmpeq_epi8(s, bs); + const __m128i t3 = _mm_cmpeq_epi8(_mm_max_epu8(s, sp), sp); // s < 0x20 <=> max(s, 0x1F) == 0x1F + const __m128i x = _mm_or_si128(_mm_or_si128(t1, t2), t3); + unsigned short r = static_cast(_mm_movemask_epi8(x)); + if (RAPIDJSON_UNLIKELY(r != 0)) { // some of characters is escaped + size_t length; +#ifdef _MSC_VER // Find the index of first escaped + unsigned long offset; + _BitScanForward(&offset, r); + length = offset; +#else + length = static_cast(__builtin_ffs(r) - 1); +#endif + for (const char* pend = p + length; p != pend; ) + *q++ = *p++; + break; + } + _mm_storeu_si128(reinterpret_cast<__m128i *>(q), s); + } + + is.src_ = p; + is.dst_ = q; + } + + // When read/write pointers are the same for insitu stream, just skip unescaped characters + static RAPIDJSON_FORCEINLINE void SkipUnescapedString(InsituStringStream& is) { + RAPIDJSON_ASSERT(is.src_ == is.dst_); + char* p = is.src_; + + // Scan one by one until alignment (unaligned load may cross page boundary and cause crash) + const char* nextAligned = reinterpret_cast((reinterpret_cast(p) + 15) & static_cast(~15)); + for (; p != nextAligned; p++) + if (RAPIDJSON_UNLIKELY(*p == '\"') || RAPIDJSON_UNLIKELY(*p == '\\') || RAPIDJSON_UNLIKELY(static_cast(*p) < 0x20)) { + is.src_ = is.dst_ = p; + return; + } + + // The rest of string using SIMD + static const char dquote[16] = { '\"', '\"', '\"', '\"', '\"', '\"', '\"', '\"', '\"', '\"', '\"', '\"', '\"', '\"', '\"', '\"' }; + static const char bslash[16] = { '\\', '\\', '\\', '\\', '\\', '\\', '\\', '\\', '\\', '\\', '\\', '\\', '\\', '\\', '\\', '\\' }; + static const char space[16] = { 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F }; + const __m128i dq = _mm_loadu_si128(reinterpret_cast(&dquote[0])); + const __m128i bs = _mm_loadu_si128(reinterpret_cast(&bslash[0])); + const __m128i sp = _mm_loadu_si128(reinterpret_cast(&space[0])); + + for (;; p += 16) { + const __m128i s = _mm_load_si128(reinterpret_cast(p)); + const __m128i t1 = _mm_cmpeq_epi8(s, dq); + const __m128i t2 = _mm_cmpeq_epi8(s, bs); + const __m128i t3 = _mm_cmpeq_epi8(_mm_max_epu8(s, sp), sp); // s < 0x20 <=> max(s, 0x1F) == 0x1F + const __m128i x = _mm_or_si128(_mm_or_si128(t1, t2), t3); + unsigned short r = static_cast(_mm_movemask_epi8(x)); + if (RAPIDJSON_UNLIKELY(r != 0)) { // some of characters is escaped + size_t length; +#ifdef _MSC_VER // Find the index of first escaped + unsigned long offset; + _BitScanForward(&offset, r); + length = offset; +#else + length = static_cast(__builtin_ffs(r) - 1); +#endif + p += length; + break; + } + } + + is.src_ = is.dst_ = p; + } +#elif defined(RAPIDJSON_NEON) + // StringStream -> StackStream + static RAPIDJSON_FORCEINLINE void ScanCopyUnescapedString(StringStream& is, StackStream& os) { + const char* p = is.src_; + + // Scan one by one until alignment (unaligned load may cross page boundary and cause crash) + const char* nextAligned = reinterpret_cast((reinterpret_cast(p) + 15) & static_cast(~15)); + while (p != nextAligned) + if (RAPIDJSON_UNLIKELY(*p == '\"') || RAPIDJSON_UNLIKELY(*p == '\\') || RAPIDJSON_UNLIKELY(static_cast(*p) < 0x20)) { + is.src_ = p; + return; + } + else + os.Put(*p++); + + // The rest of string using SIMD + const uint8x16_t s0 = vmovq_n_u8('"'); + const uint8x16_t s1 = vmovq_n_u8('\\'); + const uint8x16_t s2 = vmovq_n_u8('\b'); + const uint8x16_t s3 = vmovq_n_u8(32); + + for (;; p += 16) { + const uint8x16_t s = vld1q_u8(reinterpret_cast(p)); + uint8x16_t x = vceqq_u8(s, s0); + x = vorrq_u8(x, vceqq_u8(s, s1)); + x = vorrq_u8(x, vceqq_u8(s, s2)); + x = vorrq_u8(x, vcltq_u8(s, s3)); + + x = vrev64q_u8(x); // Rev in 64 + uint64_t low = vgetq_lane_u64(vreinterpretq_u64_u8(x), 0); // extract + uint64_t high = vgetq_lane_u64(vreinterpretq_u64_u8(x), 1); // extract + + SizeType length = 0; + bool escaped = false; + if (low == 0) { + if (high != 0) { + uint32_t lz = internal::clzll(high); + length = 8 + (lz >> 3); + escaped = true; + } + } else { + uint32_t lz = internal::clzll(low); + length = lz >> 3; + escaped = true; + } + if (RAPIDJSON_UNLIKELY(escaped)) { // some of characters is escaped + if (length != 0) { + char* q = reinterpret_cast(os.Push(length)); + for (size_t i = 0; i < length; i++) + q[i] = p[i]; + + p += length; + } + break; + } + vst1q_u8(reinterpret_cast(os.Push(16)), s); + } + + is.src_ = p; + } + + // InsituStringStream -> InsituStringStream + static RAPIDJSON_FORCEINLINE void ScanCopyUnescapedString(InsituStringStream& is, InsituStringStream& os) { + RAPIDJSON_ASSERT(&is == &os); + (void)os; + + if (is.src_ == is.dst_) { + SkipUnescapedString(is); + return; + } + + char* p = is.src_; + char *q = is.dst_; + + // Scan one by one until alignment (unaligned load may cross page boundary and cause crash) + const char* nextAligned = reinterpret_cast((reinterpret_cast(p) + 15) & static_cast(~15)); + while (p != nextAligned) + if (RAPIDJSON_UNLIKELY(*p == '\"') || RAPIDJSON_UNLIKELY(*p == '\\') || RAPIDJSON_UNLIKELY(static_cast(*p) < 0x20)) { + is.src_ = p; + is.dst_ = q; + return; + } + else + *q++ = *p++; + + // The rest of string using SIMD + const uint8x16_t s0 = vmovq_n_u8('"'); + const uint8x16_t s1 = vmovq_n_u8('\\'); + const uint8x16_t s2 = vmovq_n_u8('\b'); + const uint8x16_t s3 = vmovq_n_u8(32); + + for (;; p += 16, q += 16) { + const uint8x16_t s = vld1q_u8(reinterpret_cast(p)); + uint8x16_t x = vceqq_u8(s, s0); + x = vorrq_u8(x, vceqq_u8(s, s1)); + x = vorrq_u8(x, vceqq_u8(s, s2)); + x = vorrq_u8(x, vcltq_u8(s, s3)); + + x = vrev64q_u8(x); // Rev in 64 + uint64_t low = vgetq_lane_u64(vreinterpretq_u64_u8(x), 0); // extract + uint64_t high = vgetq_lane_u64(vreinterpretq_u64_u8(x), 1); // extract + + SizeType length = 0; + bool escaped = false; + if (low == 0) { + if (high != 0) { + uint32_t lz = internal::clzll(high); + length = 8 + (lz >> 3); + escaped = true; + } + } else { + uint32_t lz = internal::clzll(low); + length = lz >> 3; + escaped = true; + } + if (RAPIDJSON_UNLIKELY(escaped)) { // some of characters is escaped + for (const char* pend = p + length; p != pend; ) { + *q++ = *p++; + } + break; + } + vst1q_u8(reinterpret_cast(q), s); + } + + is.src_ = p; + is.dst_ = q; + } + + // When read/write pointers are the same for insitu stream, just skip unescaped characters + static RAPIDJSON_FORCEINLINE void SkipUnescapedString(InsituStringStream& is) { + RAPIDJSON_ASSERT(is.src_ == is.dst_); + char* p = is.src_; + + // Scan one by one until alignment (unaligned load may cross page boundary and cause crash) + const char* nextAligned = reinterpret_cast((reinterpret_cast(p) + 15) & static_cast(~15)); + for (; p != nextAligned; p++) + if (RAPIDJSON_UNLIKELY(*p == '\"') || RAPIDJSON_UNLIKELY(*p == '\\') || RAPIDJSON_UNLIKELY(static_cast(*p) < 0x20)) { + is.src_ = is.dst_ = p; + return; + } + + // The rest of string using SIMD + const uint8x16_t s0 = vmovq_n_u8('"'); + const uint8x16_t s1 = vmovq_n_u8('\\'); + const uint8x16_t s2 = vmovq_n_u8('\b'); + const uint8x16_t s3 = vmovq_n_u8(32); + + for (;; p += 16) { + const uint8x16_t s = vld1q_u8(reinterpret_cast(p)); + uint8x16_t x = vceqq_u8(s, s0); + x = vorrq_u8(x, vceqq_u8(s, s1)); + x = vorrq_u8(x, vceqq_u8(s, s2)); + x = vorrq_u8(x, vcltq_u8(s, s3)); + + x = vrev64q_u8(x); // Rev in 64 + uint64_t low = vgetq_lane_u64(vreinterpretq_u64_u8(x), 0); // extract + uint64_t high = vgetq_lane_u64(vreinterpretq_u64_u8(x), 1); // extract + + if (low == 0) { + if (high != 0) { + uint32_t lz = internal::clzll(high); + p += 8 + (lz >> 3); + break; + } + } else { + uint32_t lz = internal::clzll(low); + p += lz >> 3; + break; + } + } + + is.src_ = is.dst_ = p; + } +#endif // RAPIDJSON_NEON + + template + class NumberStream; + + template + class NumberStream { + public: + typedef typename InputStream::Ch Ch; + + NumberStream(GenericReader& reader, InputStream& s) : is(s) { (void)reader; } + + RAPIDJSON_FORCEINLINE Ch Peek() const { return is.Peek(); } + RAPIDJSON_FORCEINLINE Ch TakePush() { return is.Take(); } + RAPIDJSON_FORCEINLINE Ch Take() { return is.Take(); } + RAPIDJSON_FORCEINLINE void Push(char) {} + + size_t Tell() { return is.Tell(); } + size_t Length() { return 0; } + const StackCharacter* Pop() { return 0; } + + protected: + NumberStream& operator=(const NumberStream&); + + InputStream& is; + }; + + template + class NumberStream : public NumberStream { + typedef NumberStream Base; + public: + NumberStream(GenericReader& reader, InputStream& is) : Base(reader, is), stackStream(reader.stack_) {} + + RAPIDJSON_FORCEINLINE Ch TakePush() { + stackStream.Put(static_cast(Base::is.Peek())); + return Base::is.Take(); + } + + RAPIDJSON_FORCEINLINE void Push(StackCharacter c) { + stackStream.Put(c); + } + + size_t Length() { return stackStream.Length(); } + + const StackCharacter* Pop() { + stackStream.Put('\0'); + return stackStream.Pop(); + } + + private: + StackStream stackStream; + }; + + template + class NumberStream : public NumberStream { + typedef NumberStream Base; + public: + NumberStream(GenericReader& reader, InputStream& is) : Base(reader, is) {} + + RAPIDJSON_FORCEINLINE Ch Take() { return Base::TakePush(); } + }; + + template + void ParseNumber(InputStream& is, Handler& handler) { + typedef typename internal::SelectIf, typename TargetEncoding::Ch, char>::Type NumberCharacter; + + internal::StreamLocalCopy copy(is); + NumberStream s(*this, copy.s); + + size_t startOffset = s.Tell(); + double d = 0.0; + bool useNanOrInf = false; + + // Parse minus + bool minus = Consume(s, '-'); + + // Parse int: zero / ( digit1-9 *DIGIT ) + unsigned i = 0; + uint64_t i64 = 0; + bool use64bit = false; + int significandDigit = 0; + if (RAPIDJSON_UNLIKELY(s.Peek() == '0')) { + i = 0; + s.TakePush(); + } + else if (RAPIDJSON_LIKELY(s.Peek() >= '1' && s.Peek() <= '9')) { + i = static_cast(s.TakePush() - '0'); + + if (minus) + while (RAPIDJSON_LIKELY(s.Peek() >= '0' && s.Peek() <= '9')) { + if (RAPIDJSON_UNLIKELY(i >= 214748364)) { // 2^31 = 2147483648 + if (RAPIDJSON_LIKELY(i != 214748364 || s.Peek() > '8')) { + i64 = i; + use64bit = true; + break; + } + } + i = i * 10 + static_cast(s.TakePush() - '0'); + significandDigit++; + } + else + while (RAPIDJSON_LIKELY(s.Peek() >= '0' && s.Peek() <= '9')) { + if (RAPIDJSON_UNLIKELY(i >= 429496729)) { // 2^32 - 1 = 4294967295 + if (RAPIDJSON_LIKELY(i != 429496729 || s.Peek() > '5')) { + i64 = i; + use64bit = true; + break; + } + } + i = i * 10 + static_cast(s.TakePush() - '0'); + significandDigit++; + } + } + // Parse NaN or Infinity here + else if ((parseFlags & kParseNanAndInfFlag) && RAPIDJSON_LIKELY((s.Peek() == 'I' || s.Peek() == 'N'))) { + if (Consume(s, 'N')) { + if (Consume(s, 'a') && Consume(s, 'N')) { + d = std::numeric_limits::quiet_NaN(); + useNanOrInf = true; + } + } + else if (RAPIDJSON_LIKELY(Consume(s, 'I'))) { + if (Consume(s, 'n') && Consume(s, 'f')) { + d = (minus ? -std::numeric_limits::infinity() : std::numeric_limits::infinity()); + useNanOrInf = true; + + if (RAPIDJSON_UNLIKELY(s.Peek() == 'i' && !(Consume(s, 'i') && Consume(s, 'n') + && Consume(s, 'i') && Consume(s, 't') && Consume(s, 'y')))) { + RAPIDJSON_PARSE_ERROR(kParseErrorValueInvalid, s.Tell()); + } + } + } + + if (RAPIDJSON_UNLIKELY(!useNanOrInf)) { + RAPIDJSON_PARSE_ERROR(kParseErrorValueInvalid, s.Tell()); + } + } + else + RAPIDJSON_PARSE_ERROR(kParseErrorValueInvalid, s.Tell()); + + // Parse 64bit int + bool useDouble = false; + if (use64bit) { + if (minus) + while (RAPIDJSON_LIKELY(s.Peek() >= '0' && s.Peek() <= '9')) { + if (RAPIDJSON_UNLIKELY(i64 >= RAPIDJSON_UINT64_C2(0x0CCCCCCC, 0xCCCCCCCC))) // 2^63 = 9223372036854775808 + if (RAPIDJSON_LIKELY(i64 != RAPIDJSON_UINT64_C2(0x0CCCCCCC, 0xCCCCCCCC) || s.Peek() > '8')) { + d = static_cast(i64); + useDouble = true; + break; + } + i64 = i64 * 10 + static_cast(s.TakePush() - '0'); + significandDigit++; + } + else + while (RAPIDJSON_LIKELY(s.Peek() >= '0' && s.Peek() <= '9')) { + if (RAPIDJSON_UNLIKELY(i64 >= RAPIDJSON_UINT64_C2(0x19999999, 0x99999999))) // 2^64 - 1 = 18446744073709551615 + if (RAPIDJSON_LIKELY(i64 != RAPIDJSON_UINT64_C2(0x19999999, 0x99999999) || s.Peek() > '5')) { + d = static_cast(i64); + useDouble = true; + break; + } + i64 = i64 * 10 + static_cast(s.TakePush() - '0'); + significandDigit++; + } + } + + // Force double for big integer + if (useDouble) { + while (RAPIDJSON_LIKELY(s.Peek() >= '0' && s.Peek() <= '9')) { + d = d * 10 + (s.TakePush() - '0'); + } + } + + // Parse frac = decimal-point 1*DIGIT + int expFrac = 0; + size_t decimalPosition; + if (Consume(s, '.')) { + decimalPosition = s.Length(); + + if (RAPIDJSON_UNLIKELY(!(s.Peek() >= '0' && s.Peek() <= '9'))) + RAPIDJSON_PARSE_ERROR(kParseErrorNumberMissFraction, s.Tell()); + + if (!useDouble) { +#if RAPIDJSON_64BIT + // Use i64 to store significand in 64-bit architecture + if (!use64bit) + i64 = i; + + while (RAPIDJSON_LIKELY(s.Peek() >= '0' && s.Peek() <= '9')) { + if (i64 > RAPIDJSON_UINT64_C2(0x1FFFFF, 0xFFFFFFFF)) // 2^53 - 1 for fast path + break; + else { + i64 = i64 * 10 + static_cast(s.TakePush() - '0'); + --expFrac; + if (i64 != 0) + significandDigit++; + } + } + + d = static_cast(i64); +#else + // Use double to store significand in 32-bit architecture + d = static_cast(use64bit ? i64 : i); +#endif + useDouble = true; + } + + while (RAPIDJSON_LIKELY(s.Peek() >= '0' && s.Peek() <= '9')) { + if (significandDigit < 17) { + d = d * 10.0 + (s.TakePush() - '0'); + --expFrac; + if (RAPIDJSON_LIKELY(d > 0.0)) + significandDigit++; + } + else + s.TakePush(); + } + } + else + decimalPosition = s.Length(); // decimal position at the end of integer. + + // Parse exp = e [ minus / plus ] 1*DIGIT + int exp = 0; + if (Consume(s, 'e') || Consume(s, 'E')) { + if (!useDouble) { + d = static_cast(use64bit ? i64 : i); + useDouble = true; + } + + bool expMinus = false; + if (Consume(s, '+')) + ; + else if (Consume(s, '-')) + expMinus = true; + + if (RAPIDJSON_LIKELY(s.Peek() >= '0' && s.Peek() <= '9')) { + exp = static_cast(s.Take() - '0'); + if (expMinus) { + // (exp + expFrac) must not underflow int => we're detecting when -exp gets + // dangerously close to INT_MIN (a pessimistic next digit 9 would push it into + // underflow territory): + // + // -(exp * 10 + 9) + expFrac >= INT_MIN + // <=> exp <= (expFrac - INT_MIN - 9) / 10 + RAPIDJSON_ASSERT(expFrac <= 0); + int maxExp = (expFrac + 2147483639) / 10; + + while (RAPIDJSON_LIKELY(s.Peek() >= '0' && s.Peek() <= '9')) { + exp = exp * 10 + static_cast(s.Take() - '0'); + if (RAPIDJSON_UNLIKELY(exp > maxExp)) { + while (RAPIDJSON_UNLIKELY(s.Peek() >= '0' && s.Peek() <= '9')) // Consume the rest of exponent + s.Take(); + } + } + } + else { // positive exp + int maxExp = 308 - expFrac; + while (RAPIDJSON_LIKELY(s.Peek() >= '0' && s.Peek() <= '9')) { + exp = exp * 10 + static_cast(s.Take() - '0'); + if (RAPIDJSON_UNLIKELY(exp > maxExp)) + RAPIDJSON_PARSE_ERROR(kParseErrorNumberTooBig, startOffset); + } + } + } + else + RAPIDJSON_PARSE_ERROR(kParseErrorNumberMissExponent, s.Tell()); + + if (expMinus) + exp = -exp; + } + + // Finish parsing, call event according to the type of number. + bool cont = true; + + if (parseFlags & kParseNumbersAsStringsFlag) { + if (parseFlags & kParseInsituFlag) { + s.Pop(); // Pop stack no matter if it will be used or not. + typename InputStream::Ch* head = is.PutBegin(); + const size_t length = s.Tell() - startOffset; + RAPIDJSON_ASSERT(length <= 0xFFFFFFFF); + // unable to insert the \0 character here, it will erase the comma after this number + const typename TargetEncoding::Ch* const str = reinterpret_cast(head); + cont = handler.RawNumber(str, SizeType(length), false); + } + else { + SizeType numCharsToCopy = static_cast(s.Length()); + GenericStringStream > srcStream(s.Pop()); + StackStream dstStream(stack_); + while (numCharsToCopy--) { + Transcoder, TargetEncoding>::Transcode(srcStream, dstStream); + } + dstStream.Put('\0'); + const typename TargetEncoding::Ch* str = dstStream.Pop(); + const SizeType length = static_cast(dstStream.Length()) - 1; + cont = handler.RawNumber(str, SizeType(length), true); + } + } + else { + size_t length = s.Length(); + const NumberCharacter* decimal = s.Pop(); // Pop stack no matter if it will be used or not. + + if (useDouble) { + int p = exp + expFrac; + if (parseFlags & kParseFullPrecisionFlag) + d = internal::StrtodFullPrecision(d, p, decimal, length, decimalPosition, exp); + else + d = internal::StrtodNormalPrecision(d, p); + + // Use > max, instead of == inf, to fix bogus warning -Wfloat-equal + if (d > (std::numeric_limits::max)()) { + // Overflow + // TODO: internal::StrtodX should report overflow (or underflow) + RAPIDJSON_PARSE_ERROR(kParseErrorNumberTooBig, startOffset); + } + + cont = handler.Double(minus ? -d : d); + } + else if (useNanOrInf) { + cont = handler.Double(d); + } + else { + if (use64bit) { + if (minus) + cont = handler.Int64(static_cast(~i64 + 1)); + else + cont = handler.Uint64(i64); + } + else { + if (minus) + cont = handler.Int(static_cast(~i + 1)); + else + cont = handler.Uint(i); + } + } + } + if (RAPIDJSON_UNLIKELY(!cont)) + RAPIDJSON_PARSE_ERROR(kParseErrorTermination, startOffset); + } + + // Parse any JSON value + template + void ParseValue(InputStream& is, Handler& handler) { + switch (is.Peek()) { + case 'n': ParseNull (is, handler); break; + case 't': ParseTrue (is, handler); break; + case 'f': ParseFalse (is, handler); break; + case '"': ParseString(is, handler); break; + case '{': ParseObject(is, handler); break; + case '[': ParseArray (is, handler); break; + default : + ParseNumber(is, handler); + break; + + } + } + + // Iterative Parsing + + // States + enum IterativeParsingState { + IterativeParsingFinishState = 0, // sink states at top + IterativeParsingErrorState, // sink states at top + IterativeParsingStartState, + + // Object states + IterativeParsingObjectInitialState, + IterativeParsingMemberKeyState, + IterativeParsingMemberValueState, + IterativeParsingObjectFinishState, + + // Array states + IterativeParsingArrayInitialState, + IterativeParsingElementState, + IterativeParsingArrayFinishState, + + // Single value state + IterativeParsingValueState, + + // Delimiter states (at bottom) + IterativeParsingElementDelimiterState, + IterativeParsingMemberDelimiterState, + IterativeParsingKeyValueDelimiterState, + + cIterativeParsingStateCount + }; + + // Tokens + enum Token { + LeftBracketToken = 0, + RightBracketToken, + + LeftCurlyBracketToken, + RightCurlyBracketToken, + + CommaToken, + ColonToken, + + StringToken, + FalseToken, + TrueToken, + NullToken, + NumberToken, + + kTokenCount + }; + + RAPIDJSON_FORCEINLINE Token Tokenize(Ch c) const { + +//!@cond RAPIDJSON_HIDDEN_FROM_DOXYGEN +#define N NumberToken +#define N16 N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N + // Maps from ASCII to Token + static const unsigned char tokenMap[256] = { + N16, // 00~0F + N16, // 10~1F + N, N, StringToken, N, N, N, N, N, N, N, N, N, CommaToken, N, N, N, // 20~2F + N, N, N, N, N, N, N, N, N, N, ColonToken, N, N, N, N, N, // 30~3F + N16, // 40~4F + N, N, N, N, N, N, N, N, N, N, N, LeftBracketToken, N, RightBracketToken, N, N, // 50~5F + N, N, N, N, N, N, FalseToken, N, N, N, N, N, N, N, NullToken, N, // 60~6F + N, N, N, N, TrueToken, N, N, N, N, N, N, LeftCurlyBracketToken, N, RightCurlyBracketToken, N, N, // 70~7F + N16, N16, N16, N16, N16, N16, N16, N16 // 80~FF + }; +#undef N +#undef N16 +//!@endcond + + if (sizeof(Ch) == 1 || static_cast(c) < 256) + return static_cast(tokenMap[static_cast(c)]); + else + return NumberToken; + } + + RAPIDJSON_FORCEINLINE IterativeParsingState Predict(IterativeParsingState state, Token token) const { + // current state x one lookahead token -> new state + static const char G[cIterativeParsingStateCount][kTokenCount] = { + // Finish(sink state) + { + IterativeParsingErrorState, IterativeParsingErrorState, IterativeParsingErrorState, IterativeParsingErrorState, IterativeParsingErrorState, + IterativeParsingErrorState, IterativeParsingErrorState, IterativeParsingErrorState, IterativeParsingErrorState, IterativeParsingErrorState, + IterativeParsingErrorState + }, + // Error(sink state) + { + IterativeParsingErrorState, IterativeParsingErrorState, IterativeParsingErrorState, IterativeParsingErrorState, IterativeParsingErrorState, + IterativeParsingErrorState, IterativeParsingErrorState, IterativeParsingErrorState, IterativeParsingErrorState, IterativeParsingErrorState, + IterativeParsingErrorState + }, + // Start + { + IterativeParsingArrayInitialState, // Left bracket + IterativeParsingErrorState, // Right bracket + IterativeParsingObjectInitialState, // Left curly bracket + IterativeParsingErrorState, // Right curly bracket + IterativeParsingErrorState, // Comma + IterativeParsingErrorState, // Colon + IterativeParsingValueState, // String + IterativeParsingValueState, // False + IterativeParsingValueState, // True + IterativeParsingValueState, // Null + IterativeParsingValueState // Number + }, + // ObjectInitial + { + IterativeParsingErrorState, // Left bracket + IterativeParsingErrorState, // Right bracket + IterativeParsingErrorState, // Left curly bracket + IterativeParsingObjectFinishState, // Right curly bracket + IterativeParsingErrorState, // Comma + IterativeParsingErrorState, // Colon + IterativeParsingMemberKeyState, // String + IterativeParsingErrorState, // False + IterativeParsingErrorState, // True + IterativeParsingErrorState, // Null + IterativeParsingErrorState // Number + }, + // MemberKey + { + IterativeParsingErrorState, // Left bracket + IterativeParsingErrorState, // Right bracket + IterativeParsingErrorState, // Left curly bracket + IterativeParsingErrorState, // Right curly bracket + IterativeParsingErrorState, // Comma + IterativeParsingKeyValueDelimiterState, // Colon + IterativeParsingErrorState, // String + IterativeParsingErrorState, // False + IterativeParsingErrorState, // True + IterativeParsingErrorState, // Null + IterativeParsingErrorState // Number + }, + // MemberValue + { + IterativeParsingErrorState, // Left bracket + IterativeParsingErrorState, // Right bracket + IterativeParsingErrorState, // Left curly bracket + IterativeParsingObjectFinishState, // Right curly bracket + IterativeParsingMemberDelimiterState, // Comma + IterativeParsingErrorState, // Colon + IterativeParsingErrorState, // String + IterativeParsingErrorState, // False + IterativeParsingErrorState, // True + IterativeParsingErrorState, // Null + IterativeParsingErrorState // Number + }, + // ObjectFinish(sink state) + { + IterativeParsingErrorState, IterativeParsingErrorState, IterativeParsingErrorState, IterativeParsingErrorState, IterativeParsingErrorState, + IterativeParsingErrorState, IterativeParsingErrorState, IterativeParsingErrorState, IterativeParsingErrorState, IterativeParsingErrorState, + IterativeParsingErrorState + }, + // ArrayInitial + { + IterativeParsingArrayInitialState, // Left bracket(push Element state) + IterativeParsingArrayFinishState, // Right bracket + IterativeParsingObjectInitialState, // Left curly bracket(push Element state) + IterativeParsingErrorState, // Right curly bracket + IterativeParsingErrorState, // Comma + IterativeParsingErrorState, // Colon + IterativeParsingElementState, // String + IterativeParsingElementState, // False + IterativeParsingElementState, // True + IterativeParsingElementState, // Null + IterativeParsingElementState // Number + }, + // Element + { + IterativeParsingErrorState, // Left bracket + IterativeParsingArrayFinishState, // Right bracket + IterativeParsingErrorState, // Left curly bracket + IterativeParsingErrorState, // Right curly bracket + IterativeParsingElementDelimiterState, // Comma + IterativeParsingErrorState, // Colon + IterativeParsingErrorState, // String + IterativeParsingErrorState, // False + IterativeParsingErrorState, // True + IterativeParsingErrorState, // Null + IterativeParsingErrorState // Number + }, + // ArrayFinish(sink state) + { + IterativeParsingErrorState, IterativeParsingErrorState, IterativeParsingErrorState, IterativeParsingErrorState, IterativeParsingErrorState, + IterativeParsingErrorState, IterativeParsingErrorState, IterativeParsingErrorState, IterativeParsingErrorState, IterativeParsingErrorState, + IterativeParsingErrorState + }, + // Single Value (sink state) + { + IterativeParsingErrorState, IterativeParsingErrorState, IterativeParsingErrorState, IterativeParsingErrorState, IterativeParsingErrorState, + IterativeParsingErrorState, IterativeParsingErrorState, IterativeParsingErrorState, IterativeParsingErrorState, IterativeParsingErrorState, + IterativeParsingErrorState + }, + // ElementDelimiter + { + IterativeParsingArrayInitialState, // Left bracket(push Element state) + IterativeParsingArrayFinishState, // Right bracket + IterativeParsingObjectInitialState, // Left curly bracket(push Element state) + IterativeParsingErrorState, // Right curly bracket + IterativeParsingErrorState, // Comma + IterativeParsingErrorState, // Colon + IterativeParsingElementState, // String + IterativeParsingElementState, // False + IterativeParsingElementState, // True + IterativeParsingElementState, // Null + IterativeParsingElementState // Number + }, + // MemberDelimiter + { + IterativeParsingErrorState, // Left bracket + IterativeParsingErrorState, // Right bracket + IterativeParsingErrorState, // Left curly bracket + IterativeParsingObjectFinishState, // Right curly bracket + IterativeParsingErrorState, // Comma + IterativeParsingErrorState, // Colon + IterativeParsingMemberKeyState, // String + IterativeParsingErrorState, // False + IterativeParsingErrorState, // True + IterativeParsingErrorState, // Null + IterativeParsingErrorState // Number + }, + // KeyValueDelimiter + { + IterativeParsingArrayInitialState, // Left bracket(push MemberValue state) + IterativeParsingErrorState, // Right bracket + IterativeParsingObjectInitialState, // Left curly bracket(push MemberValue state) + IterativeParsingErrorState, // Right curly bracket + IterativeParsingErrorState, // Comma + IterativeParsingErrorState, // Colon + IterativeParsingMemberValueState, // String + IterativeParsingMemberValueState, // False + IterativeParsingMemberValueState, // True + IterativeParsingMemberValueState, // Null + IterativeParsingMemberValueState // Number + }, + }; // End of G + + return static_cast(G[state][token]); + } + + // Make an advance in the token stream and state based on the candidate destination state which was returned by Transit(). + // May return a new state on state pop. + template + RAPIDJSON_FORCEINLINE IterativeParsingState Transit(IterativeParsingState src, Token token, IterativeParsingState dst, InputStream& is, Handler& handler) { + (void)token; + + switch (dst) { + case IterativeParsingErrorState: + return dst; + + case IterativeParsingObjectInitialState: + case IterativeParsingArrayInitialState: + { + // Push the state(Element or MemeberValue) if we are nested in another array or value of member. + // In this way we can get the correct state on ObjectFinish or ArrayFinish by frame pop. + IterativeParsingState n = src; + if (src == IterativeParsingArrayInitialState || src == IterativeParsingElementDelimiterState) + n = IterativeParsingElementState; + else if (src == IterativeParsingKeyValueDelimiterState) + n = IterativeParsingMemberValueState; + // Push current state. + *stack_.template Push(1) = n; + // Initialize and push the member/element count. + *stack_.template Push(1) = 0; + // Call handler + bool hr = (dst == IterativeParsingObjectInitialState) ? handler.StartObject() : handler.StartArray(); + // On handler short circuits the parsing. + if (!hr) { + RAPIDJSON_PARSE_ERROR_NORETURN(kParseErrorTermination, is.Tell()); + return IterativeParsingErrorState; + } + else { + is.Take(); + return dst; + } + } + + case IterativeParsingMemberKeyState: + ParseString(is, handler, true); + if (HasParseError()) + return IterativeParsingErrorState; + else + return dst; + + case IterativeParsingKeyValueDelimiterState: + RAPIDJSON_ASSERT(token == ColonToken); + is.Take(); + return dst; + + case IterativeParsingMemberValueState: + // Must be non-compound value. Or it would be ObjectInitial or ArrayInitial state. + ParseValue(is, handler); + if (HasParseError()) { + return IterativeParsingErrorState; + } + return dst; + + case IterativeParsingElementState: + // Must be non-compound value. Or it would be ObjectInitial or ArrayInitial state. + ParseValue(is, handler); + if (HasParseError()) { + return IterativeParsingErrorState; + } + return dst; + + case IterativeParsingMemberDelimiterState: + case IterativeParsingElementDelimiterState: + is.Take(); + // Update member/element count. + *stack_.template Top() = *stack_.template Top() + 1; + return dst; + + case IterativeParsingObjectFinishState: + { + // Transit from delimiter is only allowed when trailing commas are enabled + if (!(parseFlags & kParseTrailingCommasFlag) && src == IterativeParsingMemberDelimiterState) { + RAPIDJSON_PARSE_ERROR_NORETURN(kParseErrorObjectMissName, is.Tell()); + return IterativeParsingErrorState; + } + // Get member count. + SizeType c = *stack_.template Pop(1); + // If the object is not empty, count the last member. + if (src == IterativeParsingMemberValueState) + ++c; + // Restore the state. + IterativeParsingState n = static_cast(*stack_.template Pop(1)); + // Transit to Finish state if this is the topmost scope. + if (n == IterativeParsingStartState) + n = IterativeParsingFinishState; + // Call handler + bool hr = handler.EndObject(c); + // On handler short circuits the parsing. + if (!hr) { + RAPIDJSON_PARSE_ERROR_NORETURN(kParseErrorTermination, is.Tell()); + return IterativeParsingErrorState; + } + else { + is.Take(); + return n; + } + } + + case IterativeParsingArrayFinishState: + { + // Transit from delimiter is only allowed when trailing commas are enabled + if (!(parseFlags & kParseTrailingCommasFlag) && src == IterativeParsingElementDelimiterState) { + RAPIDJSON_PARSE_ERROR_NORETURN(kParseErrorValueInvalid, is.Tell()); + return IterativeParsingErrorState; + } + // Get element count. + SizeType c = *stack_.template Pop(1); + // If the array is not empty, count the last element. + if (src == IterativeParsingElementState) + ++c; + // Restore the state. + IterativeParsingState n = static_cast(*stack_.template Pop(1)); + // Transit to Finish state if this is the topmost scope. + if (n == IterativeParsingStartState) + n = IterativeParsingFinishState; + // Call handler + bool hr = handler.EndArray(c); + // On handler short circuits the parsing. + if (!hr) { + RAPIDJSON_PARSE_ERROR_NORETURN(kParseErrorTermination, is.Tell()); + return IterativeParsingErrorState; + } + else { + is.Take(); + return n; + } + } + + default: + // This branch is for IterativeParsingValueState actually. + // Use `default:` rather than + // `case IterativeParsingValueState:` is for code coverage. + + // The IterativeParsingStartState is not enumerated in this switch-case. + // It is impossible for that case. And it can be caught by following assertion. + + // The IterativeParsingFinishState is not enumerated in this switch-case either. + // It is a "derivative" state which cannot triggered from Predict() directly. + // Therefore it cannot happen here. And it can be caught by following assertion. + RAPIDJSON_ASSERT(dst == IterativeParsingValueState); + + // Must be non-compound value. Or it would be ObjectInitial or ArrayInitial state. + ParseValue(is, handler); + if (HasParseError()) { + return IterativeParsingErrorState; + } + return IterativeParsingFinishState; + } + } + + template + void HandleError(IterativeParsingState src, InputStream& is) { + if (HasParseError()) { + // Error flag has been set. + return; + } + + switch (src) { + case IterativeParsingStartState: RAPIDJSON_PARSE_ERROR(kParseErrorDocumentEmpty, is.Tell()); return; + case IterativeParsingFinishState: RAPIDJSON_PARSE_ERROR(kParseErrorDocumentRootNotSingular, is.Tell()); return; + case IterativeParsingObjectInitialState: + case IterativeParsingMemberDelimiterState: RAPIDJSON_PARSE_ERROR(kParseErrorObjectMissName, is.Tell()); return; + case IterativeParsingMemberKeyState: RAPIDJSON_PARSE_ERROR(kParseErrorObjectMissColon, is.Tell()); return; + case IterativeParsingMemberValueState: RAPIDJSON_PARSE_ERROR(kParseErrorObjectMissCommaOrCurlyBracket, is.Tell()); return; + case IterativeParsingKeyValueDelimiterState: + case IterativeParsingArrayInitialState: + case IterativeParsingElementDelimiterState: RAPIDJSON_PARSE_ERROR(kParseErrorValueInvalid, is.Tell()); return; + default: RAPIDJSON_ASSERT(src == IterativeParsingElementState); RAPIDJSON_PARSE_ERROR(kParseErrorArrayMissCommaOrSquareBracket, is.Tell()); return; + } + } + + RAPIDJSON_FORCEINLINE bool IsIterativeParsingDelimiterState(IterativeParsingState s) const { + return s >= IterativeParsingElementDelimiterState; + } + + RAPIDJSON_FORCEINLINE bool IsIterativeParsingCompleteState(IterativeParsingState s) const { + return s <= IterativeParsingErrorState; + } + + template + ParseResult IterativeParse(InputStream& is, Handler& handler) { + parseResult_.Clear(); + ClearStackOnExit scope(*this); + IterativeParsingState state = IterativeParsingStartState; + + SkipWhitespaceAndComments(is); + RAPIDJSON_PARSE_ERROR_EARLY_RETURN(parseResult_); + while (is.Peek() != '\0') { + Token t = Tokenize(is.Peek()); + IterativeParsingState n = Predict(state, t); + IterativeParsingState d = Transit(state, t, n, is, handler); + + if (d == IterativeParsingErrorState) { + HandleError(state, is); + break; + } + + state = d; + + // Do not further consume streams if a root JSON has been parsed. + if ((parseFlags & kParseStopWhenDoneFlag) && state == IterativeParsingFinishState) + break; + + SkipWhitespaceAndComments(is); + RAPIDJSON_PARSE_ERROR_EARLY_RETURN(parseResult_); + } + + // Handle the end of file. + if (state != IterativeParsingFinishState) + HandleError(state, is); + + return parseResult_; + } + + static const size_t kDefaultStackCapacity = 256; //!< Default stack capacity in bytes for storing a single decoded string. + internal::Stack stack_; //!< A stack for storing decoded string temporarily during non-destructive parsing. + ParseResult parseResult_; + IterativeParsingState state_; +}; // class GenericReader + +//! Reader with UTF8 encoding and default allocator. +typedef GenericReader, UTF8<> > Reader; + +RAPIDJSON_NAMESPACE_END + +#if defined(__clang__) || defined(_MSC_VER) +RAPIDJSON_DIAG_POP +#endif + + +#ifdef __GNUC__ +RAPIDJSON_DIAG_POP +#endif + +#endif // RAPIDJSON_READER_H_ diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/schema.h b/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/schema.h new file mode 100644 index 0000000000..f0759ffcf5 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/schema.h @@ -0,0 +1,2795 @@ +// Tencent is pleased to support the open source community by making RapidJSON available-> +// +// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip-> All rights reserved-> +// +// Licensed under the MIT License (the "License"); you may not use this file except +// in compliance with the License-> You may obtain a copy of the License at +// +// http://opensource->org/licenses/MIT +// +// Unless required by applicable law or agreed to in writing, software distributed +// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +// CONDITIONS OF ANY KIND, either express or implied-> See the License for the +// specific language governing permissions and limitations under the License-> + +#ifndef RAPIDJSON_SCHEMA_H_ +#define RAPIDJSON_SCHEMA_H_ + +#include "document.h" +#include "pointer.h" +#include "stringbuffer.h" +#include "error/en.h" +#include "uri.h" +#include // abs, floor + +#if !defined(RAPIDJSON_SCHEMA_USE_INTERNALREGEX) +#define RAPIDJSON_SCHEMA_USE_INTERNALREGEX 1 +#else +#define RAPIDJSON_SCHEMA_USE_INTERNALREGEX 0 +#endif + +#if !RAPIDJSON_SCHEMA_USE_INTERNALREGEX && defined(RAPIDJSON_SCHEMA_USE_STDREGEX) && (__cplusplus >=201103L || (defined(_MSC_VER) && _MSC_VER >= 1800)) +#define RAPIDJSON_SCHEMA_USE_STDREGEX 1 +#else +#define RAPIDJSON_SCHEMA_USE_STDREGEX 0 +#endif + +#if RAPIDJSON_SCHEMA_USE_INTERNALREGEX +#include "internal/regex.h" +#elif RAPIDJSON_SCHEMA_USE_STDREGEX +#include +#endif + +#if RAPIDJSON_SCHEMA_USE_INTERNALREGEX || RAPIDJSON_SCHEMA_USE_STDREGEX +#define RAPIDJSON_SCHEMA_HAS_REGEX 1 +#else +#define RAPIDJSON_SCHEMA_HAS_REGEX 0 +#endif + +#ifndef RAPIDJSON_SCHEMA_VERBOSE +#define RAPIDJSON_SCHEMA_VERBOSE 0 +#endif + +#if RAPIDJSON_SCHEMA_VERBOSE +#include "stringbuffer.h" +#endif + +RAPIDJSON_DIAG_PUSH + +#if defined(__GNUC__) +RAPIDJSON_DIAG_OFF(effc++) +#endif + +#ifdef __clang__ +RAPIDJSON_DIAG_OFF(weak-vtables) +RAPIDJSON_DIAG_OFF(exit-time-destructors) +RAPIDJSON_DIAG_OFF(c++98-compat-pedantic) +RAPIDJSON_DIAG_OFF(variadic-macros) +#elif defined(_MSC_VER) +RAPIDJSON_DIAG_OFF(4512) // assignment operator could not be generated +#endif + +RAPIDJSON_NAMESPACE_BEGIN + +/////////////////////////////////////////////////////////////////////////////// +// Verbose Utilities + +#if RAPIDJSON_SCHEMA_VERBOSE + +namespace internal { + +inline void PrintInvalidKeyword(const char* keyword) { + printf("Fail keyword: %s\n", keyword); +} + +inline void PrintInvalidKeyword(const wchar_t* keyword) { + wprintf(L"Fail keyword: %ls\n", keyword); +} + +inline void PrintInvalidDocument(const char* document) { + printf("Fail document: %s\n\n", document); +} + +inline void PrintInvalidDocument(const wchar_t* document) { + wprintf(L"Fail document: %ls\n\n", document); +} + +inline void PrintValidatorPointers(unsigned depth, const char* s, const char* d) { + printf("S: %*s%s\nD: %*s%s\n\n", depth * 4, " ", s, depth * 4, " ", d); +} + +inline void PrintValidatorPointers(unsigned depth, const wchar_t* s, const wchar_t* d) { + wprintf(L"S: %*ls%ls\nD: %*ls%ls\n\n", depth * 4, L" ", s, depth * 4, L" ", d); +} + +} // namespace internal + +#endif // RAPIDJSON_SCHEMA_VERBOSE + +/////////////////////////////////////////////////////////////////////////////// +// RAPIDJSON_INVALID_KEYWORD_RETURN + +#if RAPIDJSON_SCHEMA_VERBOSE +#define RAPIDJSON_INVALID_KEYWORD_VERBOSE(keyword) internal::PrintInvalidKeyword(keyword) +#else +#define RAPIDJSON_INVALID_KEYWORD_VERBOSE(keyword) +#endif + +#define RAPIDJSON_INVALID_KEYWORD_RETURN(code)\ +RAPIDJSON_MULTILINEMACRO_BEGIN\ + context.invalidCode = code;\ + context.invalidKeyword = SchemaType::GetValidateErrorKeyword(code).GetString();\ + RAPIDJSON_INVALID_KEYWORD_VERBOSE(context.invalidKeyword);\ + return false;\ +RAPIDJSON_MULTILINEMACRO_END + +/////////////////////////////////////////////////////////////////////////////// +// ValidateFlag + +/*! \def RAPIDJSON_VALIDATE_DEFAULT_FLAGS + \ingroup RAPIDJSON_CONFIG + \brief User-defined kValidateDefaultFlags definition. + + User can define this as any \c ValidateFlag combinations. +*/ +#ifndef RAPIDJSON_VALIDATE_DEFAULT_FLAGS +#define RAPIDJSON_VALIDATE_DEFAULT_FLAGS kValidateNoFlags +#endif + +//! Combination of validate flags +/*! \see + */ +enum ValidateFlag { + kValidateNoFlags = 0, //!< No flags are set. + kValidateContinueOnErrorFlag = 1, //!< Don't stop after first validation error. + kValidateDefaultFlags = RAPIDJSON_VALIDATE_DEFAULT_FLAGS //!< Default validate flags. Can be customized by defining RAPIDJSON_VALIDATE_DEFAULT_FLAGS +}; + +/////////////////////////////////////////////////////////////////////////////// +// Forward declarations + +template +class GenericSchemaDocument; + +namespace internal { + +template +class Schema; + +/////////////////////////////////////////////////////////////////////////////// +// ISchemaValidator + +class ISchemaValidator { +public: + virtual ~ISchemaValidator() {} + virtual bool IsValid() const = 0; + virtual void SetValidateFlags(unsigned flags) = 0; + virtual unsigned GetValidateFlags() const = 0; +}; + +/////////////////////////////////////////////////////////////////////////////// +// ISchemaStateFactory + +template +class ISchemaStateFactory { +public: + virtual ~ISchemaStateFactory() {} + virtual ISchemaValidator* CreateSchemaValidator(const SchemaType&, const bool inheritContinueOnErrors) = 0; + virtual void DestroySchemaValidator(ISchemaValidator* validator) = 0; + virtual void* CreateHasher() = 0; + virtual uint64_t GetHashCode(void* hasher) = 0; + virtual void DestroryHasher(void* hasher) = 0; + virtual void* MallocState(size_t size) = 0; + virtual void FreeState(void* p) = 0; +}; + +/////////////////////////////////////////////////////////////////////////////// +// IValidationErrorHandler + +template +class IValidationErrorHandler { +public: + typedef typename SchemaType::Ch Ch; + typedef typename SchemaType::SValue SValue; + + virtual ~IValidationErrorHandler() {} + + virtual void NotMultipleOf(int64_t actual, const SValue& expected) = 0; + virtual void NotMultipleOf(uint64_t actual, const SValue& expected) = 0; + virtual void NotMultipleOf(double actual, const SValue& expected) = 0; + virtual void AboveMaximum(int64_t actual, const SValue& expected, bool exclusive) = 0; + virtual void AboveMaximum(uint64_t actual, const SValue& expected, bool exclusive) = 0; + virtual void AboveMaximum(double actual, const SValue& expected, bool exclusive) = 0; + virtual void BelowMinimum(int64_t actual, const SValue& expected, bool exclusive) = 0; + virtual void BelowMinimum(uint64_t actual, const SValue& expected, bool exclusive) = 0; + virtual void BelowMinimum(double actual, const SValue& expected, bool exclusive) = 0; + + virtual void TooLong(const Ch* str, SizeType length, SizeType expected) = 0; + virtual void TooShort(const Ch* str, SizeType length, SizeType expected) = 0; + virtual void DoesNotMatch(const Ch* str, SizeType length) = 0; + + virtual void DisallowedItem(SizeType index) = 0; + virtual void TooFewItems(SizeType actualCount, SizeType expectedCount) = 0; + virtual void TooManyItems(SizeType actualCount, SizeType expectedCount) = 0; + virtual void DuplicateItems(SizeType index1, SizeType index2) = 0; + + virtual void TooManyProperties(SizeType actualCount, SizeType expectedCount) = 0; + virtual void TooFewProperties(SizeType actualCount, SizeType expectedCount) = 0; + virtual void StartMissingProperties() = 0; + virtual void AddMissingProperty(const SValue& name) = 0; + virtual bool EndMissingProperties() = 0; + virtual void PropertyViolations(ISchemaValidator** subvalidators, SizeType count) = 0; + virtual void DisallowedProperty(const Ch* name, SizeType length) = 0; + + virtual void StartDependencyErrors() = 0; + virtual void StartMissingDependentProperties() = 0; + virtual void AddMissingDependentProperty(const SValue& targetName) = 0; + virtual void EndMissingDependentProperties(const SValue& sourceName) = 0; + virtual void AddDependencySchemaError(const SValue& souceName, ISchemaValidator* subvalidator) = 0; + virtual bool EndDependencyErrors() = 0; + + virtual void DisallowedValue(const ValidateErrorCode code) = 0; + virtual void StartDisallowedType() = 0; + virtual void AddExpectedType(const typename SchemaType::ValueType& expectedType) = 0; + virtual void EndDisallowedType(const typename SchemaType::ValueType& actualType) = 0; + virtual void NotAllOf(ISchemaValidator** subvalidators, SizeType count) = 0; + virtual void NoneOf(ISchemaValidator** subvalidators, SizeType count) = 0; + virtual void NotOneOf(ISchemaValidator** subvalidators, SizeType count, bool matched) = 0; + virtual void Disallowed() = 0; +}; + + +/////////////////////////////////////////////////////////////////////////////// +// Hasher + +// For comparison of compound value +template +class Hasher { +public: + typedef typename Encoding::Ch Ch; + + Hasher(Allocator* allocator = 0, size_t stackCapacity = kDefaultSize) : stack_(allocator, stackCapacity) {} + + bool Null() { return WriteType(kNullType); } + bool Bool(bool b) { return WriteType(b ? kTrueType : kFalseType); } + bool Int(int i) { Number n; n.u.i = i; n.d = static_cast(i); return WriteNumber(n); } + bool Uint(unsigned u) { Number n; n.u.u = u; n.d = static_cast(u); return WriteNumber(n); } + bool Int64(int64_t i) { Number n; n.u.i = i; n.d = static_cast(i); return WriteNumber(n); } + bool Uint64(uint64_t u) { Number n; n.u.u = u; n.d = static_cast(u); return WriteNumber(n); } + bool Double(double d) { + Number n; + if (d < 0) n.u.i = static_cast(d); + else n.u.u = static_cast(d); + n.d = d; + return WriteNumber(n); + } + + bool RawNumber(const Ch* str, SizeType len, bool) { + WriteBuffer(kNumberType, str, len * sizeof(Ch)); + return true; + } + + bool String(const Ch* str, SizeType len, bool) { + WriteBuffer(kStringType, str, len * sizeof(Ch)); + return true; + } + + bool StartObject() { return true; } + bool Key(const Ch* str, SizeType len, bool copy) { return String(str, len, copy); } + bool EndObject(SizeType memberCount) { + uint64_t h = Hash(0, kObjectType); + uint64_t* kv = stack_.template Pop(memberCount * 2); + for (SizeType i = 0; i < memberCount; i++) + h ^= Hash(kv[i * 2], kv[i * 2 + 1]); // Use xor to achieve member order insensitive + *stack_.template Push() = h; + return true; + } + + bool StartArray() { return true; } + bool EndArray(SizeType elementCount) { + uint64_t h = Hash(0, kArrayType); + uint64_t* e = stack_.template Pop(elementCount); + for (SizeType i = 0; i < elementCount; i++) + h = Hash(h, e[i]); // Use hash to achieve element order sensitive + *stack_.template Push() = h; + return true; + } + + bool IsValid() const { return stack_.GetSize() == sizeof(uint64_t); } + + uint64_t GetHashCode() const { + RAPIDJSON_ASSERT(IsValid()); + return *stack_.template Top(); + } + +private: + static const size_t kDefaultSize = 256; + struct Number { + union U { + uint64_t u; + int64_t i; + }u; + double d; + }; + + bool WriteType(Type type) { return WriteBuffer(type, 0, 0); } + + bool WriteNumber(const Number& n) { return WriteBuffer(kNumberType, &n, sizeof(n)); } + + bool WriteBuffer(Type type, const void* data, size_t len) { + // FNV-1a from http://isthe.com/chongo/tech/comp/fnv/ + uint64_t h = Hash(RAPIDJSON_UINT64_C2(0x84222325, 0xcbf29ce4), type); + const unsigned char* d = static_cast(data); + for (size_t i = 0; i < len; i++) + h = Hash(h, d[i]); + *stack_.template Push() = h; + return true; + } + + static uint64_t Hash(uint64_t h, uint64_t d) { + static const uint64_t kPrime = RAPIDJSON_UINT64_C2(0x00000100, 0x000001b3); + h ^= d; + h *= kPrime; + return h; + } + + Stack stack_; +}; + +/////////////////////////////////////////////////////////////////////////////// +// SchemaValidationContext + +template +struct SchemaValidationContext { + typedef Schema SchemaType; + typedef ISchemaStateFactory SchemaValidatorFactoryType; + typedef IValidationErrorHandler ErrorHandlerType; + typedef typename SchemaType::ValueType ValueType; + typedef typename ValueType::Ch Ch; + + enum PatternValidatorType { + kPatternValidatorOnly, + kPatternValidatorWithProperty, + kPatternValidatorWithAdditionalProperty + }; + + SchemaValidationContext(SchemaValidatorFactoryType& f, ErrorHandlerType& eh, const SchemaType* s) : + factory(f), + error_handler(eh), + schema(s), + valueSchema(), + invalidKeyword(), + invalidCode(), + hasher(), + arrayElementHashCodes(), + validators(), + validatorCount(), + patternPropertiesValidators(), + patternPropertiesValidatorCount(), + patternPropertiesSchemas(), + patternPropertiesSchemaCount(), + valuePatternValidatorType(kPatternValidatorOnly), + propertyExist(), + inArray(false), + valueUniqueness(false), + arrayUniqueness(false) + { + } + + ~SchemaValidationContext() { + if (hasher) + factory.DestroryHasher(hasher); + if (validators) { + for (SizeType i = 0; i < validatorCount; i++) + factory.DestroySchemaValidator(validators[i]); + factory.FreeState(validators); + } + if (patternPropertiesValidators) { + for (SizeType i = 0; i < patternPropertiesValidatorCount; i++) + factory.DestroySchemaValidator(patternPropertiesValidators[i]); + factory.FreeState(patternPropertiesValidators); + } + if (patternPropertiesSchemas) + factory.FreeState(patternPropertiesSchemas); + if (propertyExist) + factory.FreeState(propertyExist); + } + + SchemaValidatorFactoryType& factory; + ErrorHandlerType& error_handler; + const SchemaType* schema; + const SchemaType* valueSchema; + const Ch* invalidKeyword; + ValidateErrorCode invalidCode; + void* hasher; // Only validator access + void* arrayElementHashCodes; // Only validator access this + ISchemaValidator** validators; + SizeType validatorCount; + ISchemaValidator** patternPropertiesValidators; + SizeType patternPropertiesValidatorCount; + const SchemaType** patternPropertiesSchemas; + SizeType patternPropertiesSchemaCount; + PatternValidatorType valuePatternValidatorType; + PatternValidatorType objectPatternValidatorType; + SizeType arrayElementIndex; + bool* propertyExist; + bool inArray; + bool valueUniqueness; + bool arrayUniqueness; +}; + +/////////////////////////////////////////////////////////////////////////////// +// Schema + +template +class Schema { +public: + typedef typename SchemaDocumentType::ValueType ValueType; + typedef typename SchemaDocumentType::AllocatorType AllocatorType; + typedef typename SchemaDocumentType::PointerType PointerType; + typedef typename ValueType::EncodingType EncodingType; + typedef typename EncodingType::Ch Ch; + typedef SchemaValidationContext Context; + typedef Schema SchemaType; + typedef GenericValue SValue; + typedef IValidationErrorHandler ErrorHandler; + typedef GenericUri UriType; + friend class GenericSchemaDocument; + + Schema(SchemaDocumentType* schemaDocument, const PointerType& p, const ValueType& value, const ValueType& document, AllocatorType* allocator, const UriType& id = UriType()) : + allocator_(allocator), + uri_(schemaDocument->GetURI(), *allocator), + id_(id), + pointer_(p, allocator), + typeless_(schemaDocument->GetTypeless()), + enum_(), + enumCount_(), + not_(), + type_((1 << kTotalSchemaType) - 1), // typeless + validatorCount_(), + notValidatorIndex_(), + properties_(), + additionalPropertiesSchema_(), + patternProperties_(), + patternPropertyCount_(), + propertyCount_(), + minProperties_(), + maxProperties_(SizeType(~0)), + additionalProperties_(true), + hasDependencies_(), + hasRequired_(), + hasSchemaDependencies_(), + additionalItemsSchema_(), + itemsList_(), + itemsTuple_(), + itemsTupleCount_(), + minItems_(), + maxItems_(SizeType(~0)), + additionalItems_(true), + uniqueItems_(false), + pattern_(), + minLength_(0), + maxLength_(~SizeType(0)), + exclusiveMinimum_(false), + exclusiveMaximum_(false), + defaultValueLength_(0) + { + typedef typename ValueType::ConstValueIterator ConstValueIterator; + typedef typename ValueType::ConstMemberIterator ConstMemberIterator; + + // PR #1393 + // Early add this Schema and its $ref(s) in schemaDocument's map to avoid infinite + // recursion (with recursive schemas), since schemaDocument->getSchema() is always + // checked before creating a new one. Don't cache typeless_, though. + if (this != typeless_) { + typedef typename SchemaDocumentType::SchemaEntry SchemaEntry; + SchemaEntry *entry = schemaDocument->schemaMap_.template Push(); + new (entry) SchemaEntry(pointer_, this, true, allocator_); + schemaDocument->AddSchemaRefs(this); + } + + if (!value.IsObject()) + return; + + // If we have an id property, resolve it with the in-scope id + if (const ValueType* v = GetMember(value, GetIdString())) { + if (v->IsString()) { + UriType local(*v, allocator); + id_ = local.Resolve(id_, allocator); + } + } + + if (const ValueType* v = GetMember(value, GetTypeString())) { + type_ = 0; + if (v->IsString()) + AddType(*v); + else if (v->IsArray()) + for (ConstValueIterator itr = v->Begin(); itr != v->End(); ++itr) + AddType(*itr); + } + + if (const ValueType* v = GetMember(value, GetEnumString())) { + if (v->IsArray() && v->Size() > 0) { + enum_ = static_cast(allocator_->Malloc(sizeof(uint64_t) * v->Size())); + for (ConstValueIterator itr = v->Begin(); itr != v->End(); ++itr) { + typedef Hasher > EnumHasherType; + char buffer[256u + 24]; + MemoryPoolAllocator<> hasherAllocator(buffer, sizeof(buffer)); + EnumHasherType h(&hasherAllocator, 256); + itr->Accept(h); + enum_[enumCount_++] = h.GetHashCode(); + } + } + } + + if (schemaDocument) { + AssignIfExist(allOf_, *schemaDocument, p, value, GetAllOfString(), document); + AssignIfExist(anyOf_, *schemaDocument, p, value, GetAnyOfString(), document); + AssignIfExist(oneOf_, *schemaDocument, p, value, GetOneOfString(), document); + + if (const ValueType* v = GetMember(value, GetNotString())) { + schemaDocument->CreateSchema(¬_, p.Append(GetNotString(), allocator_), *v, document, id_); + notValidatorIndex_ = validatorCount_; + validatorCount_++; + } + } + + // Object + + const ValueType* properties = GetMember(value, GetPropertiesString()); + const ValueType* required = GetMember(value, GetRequiredString()); + const ValueType* dependencies = GetMember(value, GetDependenciesString()); + { + // Gather properties from properties/required/dependencies + SValue allProperties(kArrayType); + + if (properties && properties->IsObject()) + for (ConstMemberIterator itr = properties->MemberBegin(); itr != properties->MemberEnd(); ++itr) + AddUniqueElement(allProperties, itr->name); + + if (required && required->IsArray()) + for (ConstValueIterator itr = required->Begin(); itr != required->End(); ++itr) + if (itr->IsString()) + AddUniqueElement(allProperties, *itr); + + if (dependencies && dependencies->IsObject()) + for (ConstMemberIterator itr = dependencies->MemberBegin(); itr != dependencies->MemberEnd(); ++itr) { + AddUniqueElement(allProperties, itr->name); + if (itr->value.IsArray()) + for (ConstValueIterator i = itr->value.Begin(); i != itr->value.End(); ++i) + if (i->IsString()) + AddUniqueElement(allProperties, *i); + } + + if (allProperties.Size() > 0) { + propertyCount_ = allProperties.Size(); + properties_ = static_cast(allocator_->Malloc(sizeof(Property) * propertyCount_)); + for (SizeType i = 0; i < propertyCount_; i++) { + new (&properties_[i]) Property(); + properties_[i].name = allProperties[i]; + properties_[i].schema = typeless_; + } + } + } + + if (properties && properties->IsObject()) { + PointerType q = p.Append(GetPropertiesString(), allocator_); + for (ConstMemberIterator itr = properties->MemberBegin(); itr != properties->MemberEnd(); ++itr) { + SizeType index; + if (FindPropertyIndex(itr->name, &index)) + schemaDocument->CreateSchema(&properties_[index].schema, q.Append(itr->name, allocator_), itr->value, document, id_); + } + } + + if (const ValueType* v = GetMember(value, GetPatternPropertiesString())) { + PointerType q = p.Append(GetPatternPropertiesString(), allocator_); + patternProperties_ = static_cast(allocator_->Malloc(sizeof(PatternProperty) * v->MemberCount())); + patternPropertyCount_ = 0; + + for (ConstMemberIterator itr = v->MemberBegin(); itr != v->MemberEnd(); ++itr) { + new (&patternProperties_[patternPropertyCount_]) PatternProperty(); + patternProperties_[patternPropertyCount_].pattern = CreatePattern(itr->name); + schemaDocument->CreateSchema(&patternProperties_[patternPropertyCount_].schema, q.Append(itr->name, allocator_), itr->value, document, id_); + patternPropertyCount_++; + } + } + + if (required && required->IsArray()) + for (ConstValueIterator itr = required->Begin(); itr != required->End(); ++itr) + if (itr->IsString()) { + SizeType index; + if (FindPropertyIndex(*itr, &index)) { + properties_[index].required = true; + hasRequired_ = true; + } + } + + if (dependencies && dependencies->IsObject()) { + PointerType q = p.Append(GetDependenciesString(), allocator_); + hasDependencies_ = true; + for (ConstMemberIterator itr = dependencies->MemberBegin(); itr != dependencies->MemberEnd(); ++itr) { + SizeType sourceIndex; + if (FindPropertyIndex(itr->name, &sourceIndex)) { + if (itr->value.IsArray()) { + properties_[sourceIndex].dependencies = static_cast(allocator_->Malloc(sizeof(bool) * propertyCount_)); + std::memset(properties_[sourceIndex].dependencies, 0, sizeof(bool)* propertyCount_); + for (ConstValueIterator targetItr = itr->value.Begin(); targetItr != itr->value.End(); ++targetItr) { + SizeType targetIndex; + if (FindPropertyIndex(*targetItr, &targetIndex)) + properties_[sourceIndex].dependencies[targetIndex] = true; + } + } + else if (itr->value.IsObject()) { + hasSchemaDependencies_ = true; + schemaDocument->CreateSchema(&properties_[sourceIndex].dependenciesSchema, q.Append(itr->name, allocator_), itr->value, document, id_); + properties_[sourceIndex].dependenciesValidatorIndex = validatorCount_; + validatorCount_++; + } + } + } + } + + if (const ValueType* v = GetMember(value, GetAdditionalPropertiesString())) { + if (v->IsBool()) + additionalProperties_ = v->GetBool(); + else if (v->IsObject()) + schemaDocument->CreateSchema(&additionalPropertiesSchema_, p.Append(GetAdditionalPropertiesString(), allocator_), *v, document, id_); + } + + AssignIfExist(minProperties_, value, GetMinPropertiesString()); + AssignIfExist(maxProperties_, value, GetMaxPropertiesString()); + + // Array + if (const ValueType* v = GetMember(value, GetItemsString())) { + PointerType q = p.Append(GetItemsString(), allocator_); + if (v->IsObject()) // List validation + schemaDocument->CreateSchema(&itemsList_, q, *v, document, id_); + else if (v->IsArray()) { // Tuple validation + itemsTuple_ = static_cast(allocator_->Malloc(sizeof(const Schema*) * v->Size())); + SizeType index = 0; + for (ConstValueIterator itr = v->Begin(); itr != v->End(); ++itr, index++) + schemaDocument->CreateSchema(&itemsTuple_[itemsTupleCount_++], q.Append(index, allocator_), *itr, document, id_); + } + } + + AssignIfExist(minItems_, value, GetMinItemsString()); + AssignIfExist(maxItems_, value, GetMaxItemsString()); + + if (const ValueType* v = GetMember(value, GetAdditionalItemsString())) { + if (v->IsBool()) + additionalItems_ = v->GetBool(); + else if (v->IsObject()) + schemaDocument->CreateSchema(&additionalItemsSchema_, p.Append(GetAdditionalItemsString(), allocator_), *v, document, id_); + } + + AssignIfExist(uniqueItems_, value, GetUniqueItemsString()); + + // String + AssignIfExist(minLength_, value, GetMinLengthString()); + AssignIfExist(maxLength_, value, GetMaxLengthString()); + + if (const ValueType* v = GetMember(value, GetPatternString())) + pattern_ = CreatePattern(*v); + + // Number + if (const ValueType* v = GetMember(value, GetMinimumString())) + if (v->IsNumber()) + minimum_.CopyFrom(*v, *allocator_); + + if (const ValueType* v = GetMember(value, GetMaximumString())) + if (v->IsNumber()) + maximum_.CopyFrom(*v, *allocator_); + + AssignIfExist(exclusiveMinimum_, value, GetExclusiveMinimumString()); + AssignIfExist(exclusiveMaximum_, value, GetExclusiveMaximumString()); + + if (const ValueType* v = GetMember(value, GetMultipleOfString())) + if (v->IsNumber() && v->GetDouble() > 0.0) + multipleOf_.CopyFrom(*v, *allocator_); + + // Default + if (const ValueType* v = GetMember(value, GetDefaultValueString())) + if (v->IsString()) + defaultValueLength_ = v->GetStringLength(); + + } + + ~Schema() { + AllocatorType::Free(enum_); + if (properties_) { + for (SizeType i = 0; i < propertyCount_; i++) + properties_[i].~Property(); + AllocatorType::Free(properties_); + } + if (patternProperties_) { + for (SizeType i = 0; i < patternPropertyCount_; i++) + patternProperties_[i].~PatternProperty(); + AllocatorType::Free(patternProperties_); + } + AllocatorType::Free(itemsTuple_); +#if RAPIDJSON_SCHEMA_HAS_REGEX + if (pattern_) { + pattern_->~RegexType(); + AllocatorType::Free(pattern_); + } +#endif + } + + const SValue& GetURI() const { + return uri_; + } + + const UriType& GetId() const { + return id_; + } + + const PointerType& GetPointer() const { + return pointer_; + } + + bool BeginValue(Context& context) const { + if (context.inArray) { + if (uniqueItems_) + context.valueUniqueness = true; + + if (itemsList_) + context.valueSchema = itemsList_; + else if (itemsTuple_) { + if (context.arrayElementIndex < itemsTupleCount_) + context.valueSchema = itemsTuple_[context.arrayElementIndex]; + else if (additionalItemsSchema_) + context.valueSchema = additionalItemsSchema_; + else if (additionalItems_) + context.valueSchema = typeless_; + else { + context.error_handler.DisallowedItem(context.arrayElementIndex); + // Must set valueSchema for when kValidateContinueOnErrorFlag is set, else reports spurious type error + context.valueSchema = typeless_; + // Must bump arrayElementIndex for when kValidateContinueOnErrorFlag is set + context.arrayElementIndex++; + RAPIDJSON_INVALID_KEYWORD_RETURN(kValidateErrorAdditionalItems); + } + } + else + context.valueSchema = typeless_; + + context.arrayElementIndex++; + } + return true; + } + + RAPIDJSON_FORCEINLINE bool EndValue(Context& context) const { + // Only check pattern properties if we have validators + if (context.patternPropertiesValidatorCount > 0) { + bool otherValid = false; + SizeType count = context.patternPropertiesValidatorCount; + if (context.objectPatternValidatorType != Context::kPatternValidatorOnly) + otherValid = context.patternPropertiesValidators[--count]->IsValid(); + + bool patternValid = true; + for (SizeType i = 0; i < count; i++) + if (!context.patternPropertiesValidators[i]->IsValid()) { + patternValid = false; + break; + } + + if (context.objectPatternValidatorType == Context::kPatternValidatorOnly) { + if (!patternValid) { + context.error_handler.PropertyViolations(context.patternPropertiesValidators, count); + RAPIDJSON_INVALID_KEYWORD_RETURN(kValidateErrorPatternProperties); + } + } + else if (context.objectPatternValidatorType == Context::kPatternValidatorWithProperty) { + if (!patternValid || !otherValid) { + context.error_handler.PropertyViolations(context.patternPropertiesValidators, count + 1); + RAPIDJSON_INVALID_KEYWORD_RETURN(kValidateErrorPatternProperties); + } + } + else if (!patternValid && !otherValid) { // kPatternValidatorWithAdditionalProperty) + context.error_handler.PropertyViolations(context.patternPropertiesValidators, count + 1); + RAPIDJSON_INVALID_KEYWORD_RETURN(kValidateErrorPatternProperties); + } + } + + // For enums only check if we have a hasher + if (enum_ && context.hasher) { + const uint64_t h = context.factory.GetHashCode(context.hasher); + for (SizeType i = 0; i < enumCount_; i++) + if (enum_[i] == h) + goto foundEnum; + context.error_handler.DisallowedValue(kValidateErrorEnum); + RAPIDJSON_INVALID_KEYWORD_RETURN(kValidateErrorEnum); + foundEnum:; + } + + // Only check allOf etc if we have validators + if (context.validatorCount > 0) { + if (allOf_.schemas) + for (SizeType i = allOf_.begin; i < allOf_.begin + allOf_.count; i++) + if (!context.validators[i]->IsValid()) { + context.error_handler.NotAllOf(&context.validators[allOf_.begin], allOf_.count); + RAPIDJSON_INVALID_KEYWORD_RETURN(kValidateErrorAllOf); + } + + if (anyOf_.schemas) { + for (SizeType i = anyOf_.begin; i < anyOf_.begin + anyOf_.count; i++) + if (context.validators[i]->IsValid()) + goto foundAny; + context.error_handler.NoneOf(&context.validators[anyOf_.begin], anyOf_.count); + RAPIDJSON_INVALID_KEYWORD_RETURN(kValidateErrorAnyOf); + foundAny:; + } + + if (oneOf_.schemas) { + bool oneValid = false; + for (SizeType i = oneOf_.begin; i < oneOf_.begin + oneOf_.count; i++) + if (context.validators[i]->IsValid()) { + if (oneValid) { + context.error_handler.NotOneOf(&context.validators[oneOf_.begin], oneOf_.count, true); + RAPIDJSON_INVALID_KEYWORD_RETURN(kValidateErrorOneOfMatch); + } else + oneValid = true; + } + if (!oneValid) { + context.error_handler.NotOneOf(&context.validators[oneOf_.begin], oneOf_.count, false); + RAPIDJSON_INVALID_KEYWORD_RETURN(kValidateErrorOneOf); + } + } + + if (not_ && context.validators[notValidatorIndex_]->IsValid()) { + context.error_handler.Disallowed(); + RAPIDJSON_INVALID_KEYWORD_RETURN(kValidateErrorNot); + } + } + + return true; + } + + bool Null(Context& context) const { + if (!(type_ & (1 << kNullSchemaType))) { + DisallowedType(context, GetNullString()); + RAPIDJSON_INVALID_KEYWORD_RETURN(kValidateErrorType); + } + return CreateParallelValidator(context); + } + + bool Bool(Context& context, bool) const { + if (!(type_ & (1 << kBooleanSchemaType))) { + DisallowedType(context, GetBooleanString()); + RAPIDJSON_INVALID_KEYWORD_RETURN(kValidateErrorType); + } + return CreateParallelValidator(context); + } + + bool Int(Context& context, int i) const { + if (!CheckInt(context, i)) + return false; + return CreateParallelValidator(context); + } + + bool Uint(Context& context, unsigned u) const { + if (!CheckUint(context, u)) + return false; + return CreateParallelValidator(context); + } + + bool Int64(Context& context, int64_t i) const { + if (!CheckInt(context, i)) + return false; + return CreateParallelValidator(context); + } + + bool Uint64(Context& context, uint64_t u) const { + if (!CheckUint(context, u)) + return false; + return CreateParallelValidator(context); + } + + bool Double(Context& context, double d) const { + if (!(type_ & (1 << kNumberSchemaType))) { + DisallowedType(context, GetNumberString()); + RAPIDJSON_INVALID_KEYWORD_RETURN(kValidateErrorType); + } + + if (!minimum_.IsNull() && !CheckDoubleMinimum(context, d)) + return false; + + if (!maximum_.IsNull() && !CheckDoubleMaximum(context, d)) + return false; + + if (!multipleOf_.IsNull() && !CheckDoubleMultipleOf(context, d)) + return false; + + return CreateParallelValidator(context); + } + + bool String(Context& context, const Ch* str, SizeType length, bool) const { + if (!(type_ & (1 << kStringSchemaType))) { + DisallowedType(context, GetStringString()); + RAPIDJSON_INVALID_KEYWORD_RETURN(kValidateErrorType); + } + + if (minLength_ != 0 || maxLength_ != SizeType(~0)) { + SizeType count; + if (internal::CountStringCodePoint(str, length, &count)) { + if (count < minLength_) { + context.error_handler.TooShort(str, length, minLength_); + RAPIDJSON_INVALID_KEYWORD_RETURN(kValidateErrorMinLength); + } + if (count > maxLength_) { + context.error_handler.TooLong(str, length, maxLength_); + RAPIDJSON_INVALID_KEYWORD_RETURN(kValidateErrorMaxLength); + } + } + } + + if (pattern_ && !IsPatternMatch(pattern_, str, length)) { + context.error_handler.DoesNotMatch(str, length); + RAPIDJSON_INVALID_KEYWORD_RETURN(kValidateErrorPattern); + } + + return CreateParallelValidator(context); + } + + bool StartObject(Context& context) const { + if (!(type_ & (1 << kObjectSchemaType))) { + DisallowedType(context, GetObjectString()); + RAPIDJSON_INVALID_KEYWORD_RETURN(kValidateErrorType); + } + + if (hasDependencies_ || hasRequired_) { + context.propertyExist = static_cast(context.factory.MallocState(sizeof(bool) * propertyCount_)); + std::memset(context.propertyExist, 0, sizeof(bool) * propertyCount_); + } + + if (patternProperties_) { // pre-allocate schema array + SizeType count = patternPropertyCount_ + 1; // extra for valuePatternValidatorType + context.patternPropertiesSchemas = static_cast(context.factory.MallocState(sizeof(const SchemaType*) * count)); + context.patternPropertiesSchemaCount = 0; + std::memset(context.patternPropertiesSchemas, 0, sizeof(SchemaType*) * count); + } + + return CreateParallelValidator(context); + } + + bool Key(Context& context, const Ch* str, SizeType len, bool) const { + if (patternProperties_) { + context.patternPropertiesSchemaCount = 0; + for (SizeType i = 0; i < patternPropertyCount_; i++) + if (patternProperties_[i].pattern && IsPatternMatch(patternProperties_[i].pattern, str, len)) { + context.patternPropertiesSchemas[context.patternPropertiesSchemaCount++] = patternProperties_[i].schema; + context.valueSchema = typeless_; + } + } + + SizeType index = 0; + if (FindPropertyIndex(ValueType(str, len).Move(), &index)) { + if (context.patternPropertiesSchemaCount > 0) { + context.patternPropertiesSchemas[context.patternPropertiesSchemaCount++] = properties_[index].schema; + context.valueSchema = typeless_; + context.valuePatternValidatorType = Context::kPatternValidatorWithProperty; + } + else + context.valueSchema = properties_[index].schema; + + if (context.propertyExist) + context.propertyExist[index] = true; + + return true; + } + + if (additionalPropertiesSchema_) { + if (context.patternPropertiesSchemaCount > 0) { + context.patternPropertiesSchemas[context.patternPropertiesSchemaCount++] = additionalPropertiesSchema_; + context.valueSchema = typeless_; + context.valuePatternValidatorType = Context::kPatternValidatorWithAdditionalProperty; + } + else + context.valueSchema = additionalPropertiesSchema_; + return true; + } + else if (additionalProperties_) { + context.valueSchema = typeless_; + return true; + } + + if (context.patternPropertiesSchemaCount == 0) { // patternProperties are not additional properties + // Must set valueSchema for when kValidateContinueOnErrorFlag is set, else reports spurious type error + context.valueSchema = typeless_; + context.error_handler.DisallowedProperty(str, len); + RAPIDJSON_INVALID_KEYWORD_RETURN(kValidateErrorAdditionalProperties); + } + + return true; + } + + bool EndObject(Context& context, SizeType memberCount) const { + if (hasRequired_) { + context.error_handler.StartMissingProperties(); + for (SizeType index = 0; index < propertyCount_; index++) + if (properties_[index].required && !context.propertyExist[index]) + if (properties_[index].schema->defaultValueLength_ == 0 ) + context.error_handler.AddMissingProperty(properties_[index].name); + if (context.error_handler.EndMissingProperties()) + RAPIDJSON_INVALID_KEYWORD_RETURN(kValidateErrorRequired); + } + + if (memberCount < minProperties_) { + context.error_handler.TooFewProperties(memberCount, minProperties_); + RAPIDJSON_INVALID_KEYWORD_RETURN(kValidateErrorMinProperties); + } + + if (memberCount > maxProperties_) { + context.error_handler.TooManyProperties(memberCount, maxProperties_); + RAPIDJSON_INVALID_KEYWORD_RETURN(kValidateErrorMaxProperties); + } + + if (hasDependencies_) { + context.error_handler.StartDependencyErrors(); + for (SizeType sourceIndex = 0; sourceIndex < propertyCount_; sourceIndex++) { + const Property& source = properties_[sourceIndex]; + if (context.propertyExist[sourceIndex]) { + if (source.dependencies) { + context.error_handler.StartMissingDependentProperties(); + for (SizeType targetIndex = 0; targetIndex < propertyCount_; targetIndex++) + if (source.dependencies[targetIndex] && !context.propertyExist[targetIndex]) + context.error_handler.AddMissingDependentProperty(properties_[targetIndex].name); + context.error_handler.EndMissingDependentProperties(source.name); + } + else if (source.dependenciesSchema) { + ISchemaValidator* dependenciesValidator = context.validators[source.dependenciesValidatorIndex]; + if (!dependenciesValidator->IsValid()) + context.error_handler.AddDependencySchemaError(source.name, dependenciesValidator); + } + } + } + if (context.error_handler.EndDependencyErrors()) + RAPIDJSON_INVALID_KEYWORD_RETURN(kValidateErrorDependencies); + } + + return true; + } + + bool StartArray(Context& context) const { + context.arrayElementIndex = 0; + context.inArray = true; // Ensure we note that we are in an array + + if (!(type_ & (1 << kArraySchemaType))) { + DisallowedType(context, GetArrayString()); + RAPIDJSON_INVALID_KEYWORD_RETURN(kValidateErrorType); + } + + return CreateParallelValidator(context); + } + + bool EndArray(Context& context, SizeType elementCount) const { + context.inArray = false; + + if (elementCount < minItems_) { + context.error_handler.TooFewItems(elementCount, minItems_); + RAPIDJSON_INVALID_KEYWORD_RETURN(kValidateErrorMinItems); + } + + if (elementCount > maxItems_) { + context.error_handler.TooManyItems(elementCount, maxItems_); + RAPIDJSON_INVALID_KEYWORD_RETURN(kValidateErrorMaxItems); + } + + return true; + } + + static const ValueType& GetValidateErrorKeyword(ValidateErrorCode validateErrorCode) { + switch (validateErrorCode) { + case kValidateErrorMultipleOf: return GetMultipleOfString(); + case kValidateErrorMaximum: return GetMaximumString(); + case kValidateErrorExclusiveMaximum: return GetMaximumString(); // Same + case kValidateErrorMinimum: return GetMinimumString(); + case kValidateErrorExclusiveMinimum: return GetMinimumString(); // Same + + case kValidateErrorMaxLength: return GetMaxLengthString(); + case kValidateErrorMinLength: return GetMinLengthString(); + case kValidateErrorPattern: return GetPatternString(); + + case kValidateErrorMaxItems: return GetMaxItemsString(); + case kValidateErrorMinItems: return GetMinItemsString(); + case kValidateErrorUniqueItems: return GetUniqueItemsString(); + case kValidateErrorAdditionalItems: return GetAdditionalItemsString(); + + case kValidateErrorMaxProperties: return GetMaxPropertiesString(); + case kValidateErrorMinProperties: return GetMinPropertiesString(); + case kValidateErrorRequired: return GetRequiredString(); + case kValidateErrorAdditionalProperties: return GetAdditionalPropertiesString(); + case kValidateErrorPatternProperties: return GetPatternPropertiesString(); + case kValidateErrorDependencies: return GetDependenciesString(); + + case kValidateErrorEnum: return GetEnumString(); + case kValidateErrorType: return GetTypeString(); + + case kValidateErrorOneOf: return GetOneOfString(); + case kValidateErrorOneOfMatch: return GetOneOfString(); // Same + case kValidateErrorAllOf: return GetAllOfString(); + case kValidateErrorAnyOf: return GetAnyOfString(); + case kValidateErrorNot: return GetNotString(); + + default: return GetNullString(); + } + } + + + // Generate functions for string literal according to Ch +#define RAPIDJSON_STRING_(name, ...) \ + static const ValueType& Get##name##String() {\ + static const Ch s[] = { __VA_ARGS__, '\0' };\ + static const ValueType v(s, static_cast(sizeof(s) / sizeof(Ch) - 1));\ + return v;\ + } + + RAPIDJSON_STRING_(Null, 'n', 'u', 'l', 'l') + RAPIDJSON_STRING_(Boolean, 'b', 'o', 'o', 'l', 'e', 'a', 'n') + RAPIDJSON_STRING_(Object, 'o', 'b', 'j', 'e', 'c', 't') + RAPIDJSON_STRING_(Array, 'a', 'r', 'r', 'a', 'y') + RAPIDJSON_STRING_(String, 's', 't', 'r', 'i', 'n', 'g') + RAPIDJSON_STRING_(Number, 'n', 'u', 'm', 'b', 'e', 'r') + RAPIDJSON_STRING_(Integer, 'i', 'n', 't', 'e', 'g', 'e', 'r') + RAPIDJSON_STRING_(Type, 't', 'y', 'p', 'e') + RAPIDJSON_STRING_(Enum, 'e', 'n', 'u', 'm') + RAPIDJSON_STRING_(AllOf, 'a', 'l', 'l', 'O', 'f') + RAPIDJSON_STRING_(AnyOf, 'a', 'n', 'y', 'O', 'f') + RAPIDJSON_STRING_(OneOf, 'o', 'n', 'e', 'O', 'f') + RAPIDJSON_STRING_(Not, 'n', 'o', 't') + RAPIDJSON_STRING_(Properties, 'p', 'r', 'o', 'p', 'e', 'r', 't', 'i', 'e', 's') + RAPIDJSON_STRING_(Required, 'r', 'e', 'q', 'u', 'i', 'r', 'e', 'd') + RAPIDJSON_STRING_(Dependencies, 'd', 'e', 'p', 'e', 'n', 'd', 'e', 'n', 'c', 'i', 'e', 's') + RAPIDJSON_STRING_(PatternProperties, 'p', 'a', 't', 't', 'e', 'r', 'n', 'P', 'r', 'o', 'p', 'e', 'r', 't', 'i', 'e', 's') + RAPIDJSON_STRING_(AdditionalProperties, 'a', 'd', 'd', 'i', 't', 'i', 'o', 'n', 'a', 'l', 'P', 'r', 'o', 'p', 'e', 'r', 't', 'i', 'e', 's') + RAPIDJSON_STRING_(MinProperties, 'm', 'i', 'n', 'P', 'r', 'o', 'p', 'e', 'r', 't', 'i', 'e', 's') + RAPIDJSON_STRING_(MaxProperties, 'm', 'a', 'x', 'P', 'r', 'o', 'p', 'e', 'r', 't', 'i', 'e', 's') + RAPIDJSON_STRING_(Items, 'i', 't', 'e', 'm', 's') + RAPIDJSON_STRING_(MinItems, 'm', 'i', 'n', 'I', 't', 'e', 'm', 's') + RAPIDJSON_STRING_(MaxItems, 'm', 'a', 'x', 'I', 't', 'e', 'm', 's') + RAPIDJSON_STRING_(AdditionalItems, 'a', 'd', 'd', 'i', 't', 'i', 'o', 'n', 'a', 'l', 'I', 't', 'e', 'm', 's') + RAPIDJSON_STRING_(UniqueItems, 'u', 'n', 'i', 'q', 'u', 'e', 'I', 't', 'e', 'm', 's') + RAPIDJSON_STRING_(MinLength, 'm', 'i', 'n', 'L', 'e', 'n', 'g', 't', 'h') + RAPIDJSON_STRING_(MaxLength, 'm', 'a', 'x', 'L', 'e', 'n', 'g', 't', 'h') + RAPIDJSON_STRING_(Pattern, 'p', 'a', 't', 't', 'e', 'r', 'n') + RAPIDJSON_STRING_(Minimum, 'm', 'i', 'n', 'i', 'm', 'u', 'm') + RAPIDJSON_STRING_(Maximum, 'm', 'a', 'x', 'i', 'm', 'u', 'm') + RAPIDJSON_STRING_(ExclusiveMinimum, 'e', 'x', 'c', 'l', 'u', 's', 'i', 'v', 'e', 'M', 'i', 'n', 'i', 'm', 'u', 'm') + RAPIDJSON_STRING_(ExclusiveMaximum, 'e', 'x', 'c', 'l', 'u', 's', 'i', 'v', 'e', 'M', 'a', 'x', 'i', 'm', 'u', 'm') + RAPIDJSON_STRING_(MultipleOf, 'm', 'u', 'l', 't', 'i', 'p', 'l', 'e', 'O', 'f') + RAPIDJSON_STRING_(DefaultValue, 'd', 'e', 'f', 'a', 'u', 'l', 't') + RAPIDJSON_STRING_(Ref, '$', 'r', 'e', 'f') + RAPIDJSON_STRING_(Id, 'i', 'd') + + RAPIDJSON_STRING_(SchemeEnd, ':') + RAPIDJSON_STRING_(AuthStart, '/', '/') + RAPIDJSON_STRING_(QueryStart, '?') + RAPIDJSON_STRING_(FragStart, '#') + RAPIDJSON_STRING_(Slash, '/') + RAPIDJSON_STRING_(Dot, '.') + +#undef RAPIDJSON_STRING_ + +private: + enum SchemaValueType { + kNullSchemaType, + kBooleanSchemaType, + kObjectSchemaType, + kArraySchemaType, + kStringSchemaType, + kNumberSchemaType, + kIntegerSchemaType, + kTotalSchemaType + }; + +#if RAPIDJSON_SCHEMA_USE_INTERNALREGEX + typedef internal::GenericRegex RegexType; +#elif RAPIDJSON_SCHEMA_USE_STDREGEX + typedef std::basic_regex RegexType; +#else + typedef char RegexType; +#endif + + struct SchemaArray { + SchemaArray() : schemas(), count() {} + ~SchemaArray() { AllocatorType::Free(schemas); } + const SchemaType** schemas; + SizeType begin; // begin index of context.validators + SizeType count; + }; + + template + void AddUniqueElement(V1& a, const V2& v) { + for (typename V1::ConstValueIterator itr = a.Begin(); itr != a.End(); ++itr) + if (*itr == v) + return; + V1 c(v, *allocator_); + a.PushBack(c, *allocator_); + } + + static const ValueType* GetMember(const ValueType& value, const ValueType& name) { + typename ValueType::ConstMemberIterator itr = value.FindMember(name); + return itr != value.MemberEnd() ? &(itr->value) : 0; + } + + static void AssignIfExist(bool& out, const ValueType& value, const ValueType& name) { + if (const ValueType* v = GetMember(value, name)) + if (v->IsBool()) + out = v->GetBool(); + } + + static void AssignIfExist(SizeType& out, const ValueType& value, const ValueType& name) { + if (const ValueType* v = GetMember(value, name)) + if (v->IsUint64() && v->GetUint64() <= SizeType(~0)) + out = static_cast(v->GetUint64()); + } + + void AssignIfExist(SchemaArray& out, SchemaDocumentType& schemaDocument, const PointerType& p, const ValueType& value, const ValueType& name, const ValueType& document) { + if (const ValueType* v = GetMember(value, name)) { + if (v->IsArray() && v->Size() > 0) { + PointerType q = p.Append(name, allocator_); + out.count = v->Size(); + out.schemas = static_cast(allocator_->Malloc(out.count * sizeof(const Schema*))); + memset(out.schemas, 0, sizeof(Schema*)* out.count); + for (SizeType i = 0; i < out.count; i++) + schemaDocument.CreateSchema(&out.schemas[i], q.Append(i, allocator_), (*v)[i], document, id_); + out.begin = validatorCount_; + validatorCount_ += out.count; + } + } + } + +#if RAPIDJSON_SCHEMA_USE_INTERNALREGEX + template + RegexType* CreatePattern(const ValueType& value) { + if (value.IsString()) { + RegexType* r = new (allocator_->Malloc(sizeof(RegexType))) RegexType(value.GetString(), allocator_); + if (!r->IsValid()) { + r->~RegexType(); + AllocatorType::Free(r); + r = 0; + } + return r; + } + return 0; + } + + static bool IsPatternMatch(const RegexType* pattern, const Ch *str, SizeType) { + GenericRegexSearch rs(*pattern); + return rs.Search(str); + } +#elif RAPIDJSON_SCHEMA_USE_STDREGEX + template + RegexType* CreatePattern(const ValueType& value) { + if (value.IsString()) { + RegexType *r = static_cast(allocator_->Malloc(sizeof(RegexType))); + try { + return new (r) RegexType(value.GetString(), std::size_t(value.GetStringLength()), std::regex_constants::ECMAScript); + } + catch (const std::regex_error&) { + AllocatorType::Free(r); + } + } + return 0; + } + + static bool IsPatternMatch(const RegexType* pattern, const Ch *str, SizeType length) { + std::match_results r; + return std::regex_search(str, str + length, r, *pattern); + } +#else + template + RegexType* CreatePattern(const ValueType&) { return 0; } + + static bool IsPatternMatch(const RegexType*, const Ch *, SizeType) { return true; } +#endif // RAPIDJSON_SCHEMA_USE_STDREGEX + + void AddType(const ValueType& type) { + if (type == GetNullString() ) type_ |= 1 << kNullSchemaType; + else if (type == GetBooleanString()) type_ |= 1 << kBooleanSchemaType; + else if (type == GetObjectString() ) type_ |= 1 << kObjectSchemaType; + else if (type == GetArrayString() ) type_ |= 1 << kArraySchemaType; + else if (type == GetStringString() ) type_ |= 1 << kStringSchemaType; + else if (type == GetIntegerString()) type_ |= 1 << kIntegerSchemaType; + else if (type == GetNumberString() ) type_ |= (1 << kNumberSchemaType) | (1 << kIntegerSchemaType); + } + + bool CreateParallelValidator(Context& context) const { + if (enum_ || context.arrayUniqueness) + context.hasher = context.factory.CreateHasher(); + + if (validatorCount_) { + RAPIDJSON_ASSERT(context.validators == 0); + context.validators = static_cast(context.factory.MallocState(sizeof(ISchemaValidator*) * validatorCount_)); + context.validatorCount = validatorCount_; + + // Always return after first failure for these sub-validators + if (allOf_.schemas) + CreateSchemaValidators(context, allOf_, false); + + if (anyOf_.schemas) + CreateSchemaValidators(context, anyOf_, false); + + if (oneOf_.schemas) + CreateSchemaValidators(context, oneOf_, false); + + if (not_) + context.validators[notValidatorIndex_] = context.factory.CreateSchemaValidator(*not_, false); + + if (hasSchemaDependencies_) { + for (SizeType i = 0; i < propertyCount_; i++) + if (properties_[i].dependenciesSchema) + context.validators[properties_[i].dependenciesValidatorIndex] = context.factory.CreateSchemaValidator(*properties_[i].dependenciesSchema, false); + } + } + + return true; + } + + void CreateSchemaValidators(Context& context, const SchemaArray& schemas, const bool inheritContinueOnErrors) const { + for (SizeType i = 0; i < schemas.count; i++) + context.validators[schemas.begin + i] = context.factory.CreateSchemaValidator(*schemas.schemas[i], inheritContinueOnErrors); + } + + // O(n) + bool FindPropertyIndex(const ValueType& name, SizeType* outIndex) const { + SizeType len = name.GetStringLength(); + const Ch* str = name.GetString(); + for (SizeType index = 0; index < propertyCount_; index++) + if (properties_[index].name.GetStringLength() == len && + (std::memcmp(properties_[index].name.GetString(), str, sizeof(Ch) * len) == 0)) + { + *outIndex = index; + return true; + } + return false; + } + + bool CheckInt(Context& context, int64_t i) const { + if (!(type_ & ((1 << kIntegerSchemaType) | (1 << kNumberSchemaType)))) { + DisallowedType(context, GetIntegerString()); + RAPIDJSON_INVALID_KEYWORD_RETURN(kValidateErrorType); + } + + if (!minimum_.IsNull()) { + if (minimum_.IsInt64()) { + if (exclusiveMinimum_ ? i <= minimum_.GetInt64() : i < minimum_.GetInt64()) { + context.error_handler.BelowMinimum(i, minimum_, exclusiveMinimum_); + RAPIDJSON_INVALID_KEYWORD_RETURN(exclusiveMinimum_ ? kValidateErrorExclusiveMinimum : kValidateErrorMinimum); + } + } + else if (minimum_.IsUint64()) { + context.error_handler.BelowMinimum(i, minimum_, exclusiveMinimum_); + RAPIDJSON_INVALID_KEYWORD_RETURN(exclusiveMinimum_ ? kValidateErrorExclusiveMinimum : kValidateErrorMinimum); // i <= max(int64_t) < minimum.GetUint64() + } + else if (!CheckDoubleMinimum(context, static_cast(i))) + return false; + } + + if (!maximum_.IsNull()) { + if (maximum_.IsInt64()) { + if (exclusiveMaximum_ ? i >= maximum_.GetInt64() : i > maximum_.GetInt64()) { + context.error_handler.AboveMaximum(i, maximum_, exclusiveMaximum_); + RAPIDJSON_INVALID_KEYWORD_RETURN(exclusiveMaximum_ ? kValidateErrorExclusiveMaximum : kValidateErrorMaximum); + } + } + else if (maximum_.IsUint64()) { } + /* do nothing */ // i <= max(int64_t) < maximum_.GetUint64() + else if (!CheckDoubleMaximum(context, static_cast(i))) + return false; + } + + if (!multipleOf_.IsNull()) { + if (multipleOf_.IsUint64()) { + if (static_cast(i >= 0 ? i : -i) % multipleOf_.GetUint64() != 0) { + context.error_handler.NotMultipleOf(i, multipleOf_); + RAPIDJSON_INVALID_KEYWORD_RETURN(kValidateErrorMultipleOf); + } + } + else if (!CheckDoubleMultipleOf(context, static_cast(i))) + return false; + } + + return true; + } + + bool CheckUint(Context& context, uint64_t i) const { + if (!(type_ & ((1 << kIntegerSchemaType) | (1 << kNumberSchemaType)))) { + DisallowedType(context, GetIntegerString()); + RAPIDJSON_INVALID_KEYWORD_RETURN(kValidateErrorType); + } + + if (!minimum_.IsNull()) { + if (minimum_.IsUint64()) { + if (exclusiveMinimum_ ? i <= minimum_.GetUint64() : i < minimum_.GetUint64()) { + context.error_handler.BelowMinimum(i, minimum_, exclusiveMinimum_); + RAPIDJSON_INVALID_KEYWORD_RETURN(exclusiveMinimum_ ? kValidateErrorExclusiveMinimum : kValidateErrorMinimum); + } + } + else if (minimum_.IsInt64()) + /* do nothing */; // i >= 0 > minimum.Getint64() + else if (!CheckDoubleMinimum(context, static_cast(i))) + return false; + } + + if (!maximum_.IsNull()) { + if (maximum_.IsUint64()) { + if (exclusiveMaximum_ ? i >= maximum_.GetUint64() : i > maximum_.GetUint64()) { + context.error_handler.AboveMaximum(i, maximum_, exclusiveMaximum_); + RAPIDJSON_INVALID_KEYWORD_RETURN(exclusiveMaximum_ ? kValidateErrorExclusiveMaximum : kValidateErrorMaximum); + } + } + else if (maximum_.IsInt64()) { + context.error_handler.AboveMaximum(i, maximum_, exclusiveMaximum_); + RAPIDJSON_INVALID_KEYWORD_RETURN(exclusiveMaximum_ ? kValidateErrorExclusiveMaximum : kValidateErrorMaximum); // i >= 0 > maximum_ + } + else if (!CheckDoubleMaximum(context, static_cast(i))) + return false; + } + + if (!multipleOf_.IsNull()) { + if (multipleOf_.IsUint64()) { + if (i % multipleOf_.GetUint64() != 0) { + context.error_handler.NotMultipleOf(i, multipleOf_); + RAPIDJSON_INVALID_KEYWORD_RETURN(kValidateErrorMultipleOf); + } + } + else if (!CheckDoubleMultipleOf(context, static_cast(i))) + return false; + } + + return true; + } + + bool CheckDoubleMinimum(Context& context, double d) const { + if (exclusiveMinimum_ ? d <= minimum_.GetDouble() : d < minimum_.GetDouble()) { + context.error_handler.BelowMinimum(d, minimum_, exclusiveMinimum_); + RAPIDJSON_INVALID_KEYWORD_RETURN(exclusiveMinimum_ ? kValidateErrorExclusiveMinimum : kValidateErrorMinimum); + } + return true; + } + + bool CheckDoubleMaximum(Context& context, double d) const { + if (exclusiveMaximum_ ? d >= maximum_.GetDouble() : d > maximum_.GetDouble()) { + context.error_handler.AboveMaximum(d, maximum_, exclusiveMaximum_); + RAPIDJSON_INVALID_KEYWORD_RETURN(exclusiveMaximum_ ? kValidateErrorExclusiveMaximum : kValidateErrorMaximum); + } + return true; + } + + bool CheckDoubleMultipleOf(Context& context, double d) const { + double a = std::abs(d), b = std::abs(multipleOf_.GetDouble()); + double q = std::floor(a / b); + double r = a - q * b; + if (r > 0.0) { + context.error_handler.NotMultipleOf(d, multipleOf_); + RAPIDJSON_INVALID_KEYWORD_RETURN(kValidateErrorMultipleOf); + } + return true; + } + + void DisallowedType(Context& context, const ValueType& actualType) const { + ErrorHandler& eh = context.error_handler; + eh.StartDisallowedType(); + + if (type_ & (1 << kNullSchemaType)) eh.AddExpectedType(GetNullString()); + if (type_ & (1 << kBooleanSchemaType)) eh.AddExpectedType(GetBooleanString()); + if (type_ & (1 << kObjectSchemaType)) eh.AddExpectedType(GetObjectString()); + if (type_ & (1 << kArraySchemaType)) eh.AddExpectedType(GetArrayString()); + if (type_ & (1 << kStringSchemaType)) eh.AddExpectedType(GetStringString()); + + if (type_ & (1 << kNumberSchemaType)) eh.AddExpectedType(GetNumberString()); + else if (type_ & (1 << kIntegerSchemaType)) eh.AddExpectedType(GetIntegerString()); + + eh.EndDisallowedType(actualType); + } + + struct Property { + Property() : schema(), dependenciesSchema(), dependenciesValidatorIndex(), dependencies(), required(false) {} + ~Property() { AllocatorType::Free(dependencies); } + SValue name; + const SchemaType* schema; + const SchemaType* dependenciesSchema; + SizeType dependenciesValidatorIndex; + bool* dependencies; + bool required; + }; + + struct PatternProperty { + PatternProperty() : schema(), pattern() {} + ~PatternProperty() { + if (pattern) { + pattern->~RegexType(); + AllocatorType::Free(pattern); + } + } + const SchemaType* schema; + RegexType* pattern; + }; + + AllocatorType* allocator_; + SValue uri_; + UriType id_; + PointerType pointer_; + const SchemaType* typeless_; + uint64_t* enum_; + SizeType enumCount_; + SchemaArray allOf_; + SchemaArray anyOf_; + SchemaArray oneOf_; + const SchemaType* not_; + unsigned type_; // bitmask of kSchemaType + SizeType validatorCount_; + SizeType notValidatorIndex_; + + Property* properties_; + const SchemaType* additionalPropertiesSchema_; + PatternProperty* patternProperties_; + SizeType patternPropertyCount_; + SizeType propertyCount_; + SizeType minProperties_; + SizeType maxProperties_; + bool additionalProperties_; + bool hasDependencies_; + bool hasRequired_; + bool hasSchemaDependencies_; + + const SchemaType* additionalItemsSchema_; + const SchemaType* itemsList_; + const SchemaType** itemsTuple_; + SizeType itemsTupleCount_; + SizeType minItems_; + SizeType maxItems_; + bool additionalItems_; + bool uniqueItems_; + + RegexType* pattern_; + SizeType minLength_; + SizeType maxLength_; + + SValue minimum_; + SValue maximum_; + SValue multipleOf_; + bool exclusiveMinimum_; + bool exclusiveMaximum_; + + SizeType defaultValueLength_; +}; + +template +struct TokenHelper { + RAPIDJSON_FORCEINLINE static void AppendIndexToken(Stack& documentStack, SizeType index) { + *documentStack.template Push() = '/'; + char buffer[21]; + size_t length = static_cast((sizeof(SizeType) == 4 ? u32toa(index, buffer) : u64toa(index, buffer)) - buffer); + for (size_t i = 0; i < length; i++) + *documentStack.template Push() = static_cast(buffer[i]); + } +}; + +// Partial specialized version for char to prevent buffer copying. +template +struct TokenHelper { + RAPIDJSON_FORCEINLINE static void AppendIndexToken(Stack& documentStack, SizeType index) { + if (sizeof(SizeType) == 4) { + char *buffer = documentStack.template Push(1 + 10); // '/' + uint + *buffer++ = '/'; + const char* end = internal::u32toa(index, buffer); + documentStack.template Pop(static_cast(10 - (end - buffer))); + } + else { + char *buffer = documentStack.template Push(1 + 20); // '/' + uint64 + *buffer++ = '/'; + const char* end = internal::u64toa(index, buffer); + documentStack.template Pop(static_cast(20 - (end - buffer))); + } + } +}; + +} // namespace internal + +/////////////////////////////////////////////////////////////////////////////// +// IGenericRemoteSchemaDocumentProvider + +template +class IGenericRemoteSchemaDocumentProvider { +public: + typedef typename SchemaDocumentType::Ch Ch; + typedef typename SchemaDocumentType::ValueType ValueType; + typedef typename SchemaDocumentType::AllocatorType AllocatorType; + + virtual ~IGenericRemoteSchemaDocumentProvider() {} + virtual const SchemaDocumentType* GetRemoteDocument(const Ch* uri, SizeType length) = 0; + virtual const SchemaDocumentType* GetRemoteDocument(GenericUri uri) { return GetRemoteDocument(uri.GetBaseString(), uri.GetBaseStringLength()); } +}; + +/////////////////////////////////////////////////////////////////////////////// +// GenericSchemaDocument + +//! JSON schema document. +/*! + A JSON schema document is a compiled version of a JSON schema. + It is basically a tree of internal::Schema. + + \note This is an immutable class (i.e. its instance cannot be modified after construction). + \tparam ValueT Type of JSON value (e.g. \c Value ), which also determine the encoding. + \tparam Allocator Allocator type for allocating memory of this document. +*/ +template +class GenericSchemaDocument { +public: + typedef ValueT ValueType; + typedef IGenericRemoteSchemaDocumentProvider IRemoteSchemaDocumentProviderType; + typedef Allocator AllocatorType; + typedef typename ValueType::EncodingType EncodingType; + typedef typename EncodingType::Ch Ch; + typedef internal::Schema SchemaType; + typedef GenericPointer PointerType; + typedef GenericValue SValue; + typedef GenericUri UriType; + friend class internal::Schema; + template + friend class GenericSchemaValidator; + + //! Constructor. + /*! + Compile a JSON document into schema document. + + \param document A JSON document as source. + \param uri The base URI of this schema document for purposes of violation reporting. + \param uriLength Length of \c name, in code points. + \param remoteProvider An optional remote schema document provider for resolving remote reference. Can be null. + \param allocator An optional allocator instance for allocating memory. Can be null. + \param pointer An optional JSON pointer to the start of the schema document + */ + explicit GenericSchemaDocument(const ValueType& document, const Ch* uri = 0, SizeType uriLength = 0, + IRemoteSchemaDocumentProviderType* remoteProvider = 0, Allocator* allocator = 0, + const PointerType& pointer = PointerType()) : // PR #1393 + remoteProvider_(remoteProvider), + allocator_(allocator), + ownAllocator_(), + root_(), + typeless_(), + schemaMap_(allocator, kInitialSchemaMapSize), + schemaRef_(allocator, kInitialSchemaRefSize) + { + if (!allocator_) + ownAllocator_ = allocator_ = RAPIDJSON_NEW(Allocator)(); + + Ch noUri[1] = {0}; + uri_.SetString(uri ? uri : noUri, uriLength, *allocator_); + docId_ = UriType(uri_, allocator_); + + typeless_ = static_cast(allocator_->Malloc(sizeof(SchemaType))); + new (typeless_) SchemaType(this, PointerType(), ValueType(kObjectType).Move(), ValueType(kObjectType).Move(), allocator_, docId_); + + // Generate root schema, it will call CreateSchema() to create sub-schemas, + // And call HandleRefSchema() if there are $ref. + // PR #1393 use input pointer if supplied + root_ = typeless_; + if (pointer.GetTokenCount() == 0) { + CreateSchemaRecursive(&root_, pointer, document, document, docId_); + } + else if (const ValueType* v = pointer.Get(document)) { + CreateSchema(&root_, pointer, *v, document, docId_); + } + + RAPIDJSON_ASSERT(root_ != 0); + + schemaRef_.ShrinkToFit(); // Deallocate all memory for ref + } + +#if RAPIDJSON_HAS_CXX11_RVALUE_REFS + //! Move constructor in C++11 + GenericSchemaDocument(GenericSchemaDocument&& rhs) RAPIDJSON_NOEXCEPT : + remoteProvider_(rhs.remoteProvider_), + allocator_(rhs.allocator_), + ownAllocator_(rhs.ownAllocator_), + root_(rhs.root_), + typeless_(rhs.typeless_), + schemaMap_(std::move(rhs.schemaMap_)), + schemaRef_(std::move(rhs.schemaRef_)), + uri_(std::move(rhs.uri_)), + docId_(rhs.docId_) + { + rhs.remoteProvider_ = 0; + rhs.allocator_ = 0; + rhs.ownAllocator_ = 0; + rhs.typeless_ = 0; + } +#endif + + //! Destructor + ~GenericSchemaDocument() { + while (!schemaMap_.Empty()) + schemaMap_.template Pop(1)->~SchemaEntry(); + + if (typeless_) { + typeless_->~SchemaType(); + Allocator::Free(typeless_); + } + + RAPIDJSON_DELETE(ownAllocator_); + } + + const SValue& GetURI() const { return uri_; } + + //! Get the root schema. + const SchemaType& GetRoot() const { return *root_; } + +private: + //! Prohibit copying + GenericSchemaDocument(const GenericSchemaDocument&); + //! Prohibit assignment + GenericSchemaDocument& operator=(const GenericSchemaDocument&); + + typedef const PointerType* SchemaRefPtr; // PR #1393 + + struct SchemaEntry { + SchemaEntry(const PointerType& p, SchemaType* s, bool o, Allocator* allocator) : pointer(p, allocator), schema(s), owned(o) {} + ~SchemaEntry() { + if (owned) { + schema->~SchemaType(); + Allocator::Free(schema); + } + } + PointerType pointer; + SchemaType* schema; + bool owned; + }; + + // Changed by PR #1393 + void CreateSchemaRecursive(const SchemaType** schema, const PointerType& pointer, const ValueType& v, const ValueType& document, const UriType& id) { + if (v.GetType() == kObjectType) { + UriType newid = UriType(CreateSchema(schema, pointer, v, document, id), allocator_); + + for (typename ValueType::ConstMemberIterator itr = v.MemberBegin(); itr != v.MemberEnd(); ++itr) + CreateSchemaRecursive(0, pointer.Append(itr->name, allocator_), itr->value, document, newid); + } + else if (v.GetType() == kArrayType) + for (SizeType i = 0; i < v.Size(); i++) + CreateSchemaRecursive(0, pointer.Append(i, allocator_), v[i], document, id); + } + + // Changed by PR #1393 + const UriType& CreateSchema(const SchemaType** schema, const PointerType& pointer, const ValueType& v, const ValueType& document, const UriType& id) { + RAPIDJSON_ASSERT(pointer.IsValid()); + if (v.IsObject()) { + if (const SchemaType* sc = GetSchema(pointer)) { + if (schema) + *schema = sc; + AddSchemaRefs(const_cast(sc)); + } + else if (!HandleRefSchema(pointer, schema, v, document, id)) { + // The new schema constructor adds itself and its $ref(s) to schemaMap_ + SchemaType* s = new (allocator_->Malloc(sizeof(SchemaType))) SchemaType(this, pointer, v, document, allocator_, id); + if (schema) + *schema = s; + return s->GetId(); + } + } + else { + if (schema) + *schema = typeless_; + AddSchemaRefs(typeless_); + } + return id; + } + + // Changed by PR #1393 + // TODO should this return a UriType& ? + bool HandleRefSchema(const PointerType& source, const SchemaType** schema, const ValueType& v, const ValueType& document, const UriType& id) { + typename ValueType::ConstMemberIterator itr = v.FindMember(SchemaType::GetRefString()); + if (itr == v.MemberEnd()) + return false; + + // Resolve the source pointer to the $ref'ed schema (finally) + new (schemaRef_.template Push()) SchemaRefPtr(&source); + + if (itr->value.IsString()) { + SizeType len = itr->value.GetStringLength(); + if (len > 0) { + // First resolve $ref against the in-scope id + UriType scopeId = UriType(id, allocator_); + UriType ref = UriType(itr->value, allocator_).Resolve(scopeId, allocator_); + // See if the resolved $ref minus the fragment matches a resolved id in this document + // Search from the root. Returns the subschema in the document and its absolute JSON pointer. + PointerType basePointer = PointerType(); + const ValueType *base = FindId(document, ref, basePointer, docId_, false); + if (!base) { + // Remote reference - call the remote document provider + if (remoteProvider_) { + if (const GenericSchemaDocument* remoteDocument = remoteProvider_->GetRemoteDocument(ref)) { + const Ch* s = ref.GetFragString(); + len = ref.GetFragStringLength(); + if (len <= 1 || s[1] == '/') { + // JSON pointer fragment, absolute in the remote schema + const PointerType pointer(s, len, allocator_); + if (pointer.IsValid()) { + // Get the subschema + if (const SchemaType *sc = remoteDocument->GetSchema(pointer)) { + if (schema) + *schema = sc; + AddSchemaRefs(const_cast(sc)); + return true; + } + } + } else { + // Plain name fragment, not allowed + } + } + } + } + else { // Local reference + const Ch* s = ref.GetFragString(); + len = ref.GetFragStringLength(); + if (len <= 1 || s[1] == '/') { + // JSON pointer fragment, relative to the resolved URI + const PointerType relPointer(s, len, allocator_); + if (relPointer.IsValid()) { + // Get the subschema + if (const ValueType *pv = relPointer.Get(*base)) { + // Now get the absolute JSON pointer by adding relative to base + PointerType pointer(basePointer); + for (SizeType i = 0; i < relPointer.GetTokenCount(); i++) + pointer = pointer.Append(relPointer.GetTokens()[i], allocator_); + //GenericStringBuffer sb; + //pointer.StringifyUriFragment(sb); + if (pointer.IsValid() && !IsCyclicRef(pointer)) { + // Call CreateSchema recursively, but first compute the in-scope id for the $ref target as we have jumped there + // TODO: cache pointer <-> id mapping + size_t unresolvedTokenIndex; + scopeId = pointer.GetUri(document, docId_, &unresolvedTokenIndex, allocator_); + CreateSchema(schema, pointer, *pv, document, scopeId); + return true; + } + } + } + } else { + // Plain name fragment, relative to the resolved URI + // See if the fragment matches an id in this document. + // Search from the base we just established. Returns the subschema in the document and its absolute JSON pointer. + PointerType pointer = PointerType(); + if (const ValueType *pv = FindId(*base, ref, pointer, UriType(ref.GetBaseString(), ref.GetBaseStringLength(), allocator_), true, basePointer)) { + if (!IsCyclicRef(pointer)) { + //GenericStringBuffer sb; + //pointer.StringifyUriFragment(sb); + // Call CreateSchema recursively, but first compute the in-scope id for the $ref target as we have jumped there + // TODO: cache pointer <-> id mapping + size_t unresolvedTokenIndex; + scopeId = pointer.GetUri(document, docId_, &unresolvedTokenIndex, allocator_); + CreateSchema(schema, pointer, *pv, document, scopeId); + return true; + } + } + } + } + } + } + + // Invalid/Unknown $ref + if (schema) + *schema = typeless_; + AddSchemaRefs(typeless_); + return true; + } + + //! Find the first subschema with a resolved 'id' that matches the specified URI. + // If full specified use all URI else ignore fragment. + // If found, return a pointer to the subschema and its JSON pointer. + // TODO cache pointer <-> id mapping + ValueType* FindId(const ValueType& doc, const UriType& finduri, PointerType& resptr, const UriType& baseuri, bool full, const PointerType& here = PointerType()) const { + SizeType i = 0; + ValueType* resval = 0; + UriType tempuri = UriType(finduri, allocator_); + UriType localuri = UriType(baseuri, allocator_); + if (doc.GetType() == kObjectType) { + // Establish the base URI of this object + typename ValueType::ConstMemberIterator m = doc.FindMember(SchemaType::GetIdString()); + if (m != doc.MemberEnd() && m->value.GetType() == kStringType) { + localuri = UriType(m->value, allocator_).Resolve(baseuri, allocator_); + } + // See if it matches + if (localuri.Match(finduri, full)) { + resval = const_cast(&doc); + resptr = here; + return resval; + } + // No match, continue looking + for (m = doc.MemberBegin(); m != doc.MemberEnd(); ++m) { + if (m->value.GetType() == kObjectType || m->value.GetType() == kArrayType) { + resval = FindId(m->value, finduri, resptr, localuri, full, here.Append(m->name.GetString(), m->name.GetStringLength(), allocator_)); + } + if (resval) break; + } + } else if (doc.GetType() == kArrayType) { + // Continue looking + for (typename ValueType::ConstValueIterator v = doc.Begin(); v != doc.End(); ++v) { + if (v->GetType() == kObjectType || v->GetType() == kArrayType) { + resval = FindId(*v, finduri, resptr, localuri, full, here.Append(i, allocator_)); + } + if (resval) break; + i++; + } + } + return resval; + } + + // Added by PR #1393 + void AddSchemaRefs(SchemaType* schema) { + while (!schemaRef_.Empty()) { + SchemaRefPtr *ref = schemaRef_.template Pop(1); + SchemaEntry *entry = schemaMap_.template Push(); + new (entry) SchemaEntry(**ref, schema, false, allocator_); + } + } + + // Added by PR #1393 + bool IsCyclicRef(const PointerType& pointer) const { + for (const SchemaRefPtr* ref = schemaRef_.template Bottom(); ref != schemaRef_.template End(); ++ref) + if (pointer == **ref) + return true; + return false; + } + + const SchemaType* GetSchema(const PointerType& pointer) const { + for (const SchemaEntry* target = schemaMap_.template Bottom(); target != schemaMap_.template End(); ++target) + if (pointer == target->pointer) + return target->schema; + return 0; + } + + PointerType GetPointer(const SchemaType* schema) const { + for (const SchemaEntry* target = schemaMap_.template Bottom(); target != schemaMap_.template End(); ++target) + if (schema == target->schema) + return target->pointer; + return PointerType(); + } + + const SchemaType* GetTypeless() const { return typeless_; } + + static const size_t kInitialSchemaMapSize = 64; + static const size_t kInitialSchemaRefSize = 64; + + IRemoteSchemaDocumentProviderType* remoteProvider_; + Allocator *allocator_; + Allocator *ownAllocator_; + const SchemaType* root_; //!< Root schema. + SchemaType* typeless_; + internal::Stack schemaMap_; // Stores created Pointer -> Schemas + internal::Stack schemaRef_; // Stores Pointer(s) from $ref(s) until resolved + SValue uri_; // Schema document URI + UriType docId_; +}; + +//! GenericSchemaDocument using Value type. +typedef GenericSchemaDocument SchemaDocument; +//! IGenericRemoteSchemaDocumentProvider using SchemaDocument. +typedef IGenericRemoteSchemaDocumentProvider IRemoteSchemaDocumentProvider; + +/////////////////////////////////////////////////////////////////////////////// +// GenericSchemaValidator + +//! JSON Schema Validator. +/*! + A SAX style JSON schema validator. + It uses a \c GenericSchemaDocument to validate SAX events. + It delegates the incoming SAX events to an output handler. + The default output handler does nothing. + It can be reused multiple times by calling \c Reset(). + + \tparam SchemaDocumentType Type of schema document. + \tparam OutputHandler Type of output handler. Default handler does nothing. + \tparam StateAllocator Allocator for storing the internal validation states. +*/ +template < + typename SchemaDocumentType, + typename OutputHandler = BaseReaderHandler, + typename StateAllocator = CrtAllocator> +class GenericSchemaValidator : + public internal::ISchemaStateFactory, + public internal::ISchemaValidator, + public internal::IValidationErrorHandler { +public: + typedef typename SchemaDocumentType::SchemaType SchemaType; + typedef typename SchemaDocumentType::PointerType PointerType; + typedef typename SchemaType::EncodingType EncodingType; + typedef typename SchemaType::SValue SValue; + typedef typename EncodingType::Ch Ch; + typedef GenericStringRef StringRefType; + typedef GenericValue ValueType; + + //! Constructor without output handler. + /*! + \param schemaDocument The schema document to conform to. + \param allocator Optional allocator for storing internal validation states. + \param schemaStackCapacity Optional initial capacity of schema path stack. + \param documentStackCapacity Optional initial capacity of document path stack. + */ + GenericSchemaValidator( + const SchemaDocumentType& schemaDocument, + StateAllocator* allocator = 0, + size_t schemaStackCapacity = kDefaultSchemaStackCapacity, + size_t documentStackCapacity = kDefaultDocumentStackCapacity) + : + schemaDocument_(&schemaDocument), + root_(schemaDocument.GetRoot()), + stateAllocator_(allocator), + ownStateAllocator_(0), + schemaStack_(allocator, schemaStackCapacity), + documentStack_(allocator, documentStackCapacity), + outputHandler_(0), + error_(kObjectType), + currentError_(), + missingDependents_(), + valid_(true), + flags_(kValidateDefaultFlags) +#if RAPIDJSON_SCHEMA_VERBOSE + , depth_(0) +#endif + { + } + + //! Constructor with output handler. + /*! + \param schemaDocument The schema document to conform to. + \param allocator Optional allocator for storing internal validation states. + \param schemaStackCapacity Optional initial capacity of schema path stack. + \param documentStackCapacity Optional initial capacity of document path stack. + */ + GenericSchemaValidator( + const SchemaDocumentType& schemaDocument, + OutputHandler& outputHandler, + StateAllocator* allocator = 0, + size_t schemaStackCapacity = kDefaultSchemaStackCapacity, + size_t documentStackCapacity = kDefaultDocumentStackCapacity) + : + schemaDocument_(&schemaDocument), + root_(schemaDocument.GetRoot()), + stateAllocator_(allocator), + ownStateAllocator_(0), + schemaStack_(allocator, schemaStackCapacity), + documentStack_(allocator, documentStackCapacity), + outputHandler_(&outputHandler), + error_(kObjectType), + currentError_(), + missingDependents_(), + valid_(true), + flags_(kValidateDefaultFlags) +#if RAPIDJSON_SCHEMA_VERBOSE + , depth_(0) +#endif + { + } + + //! Destructor. + ~GenericSchemaValidator() { + Reset(); + RAPIDJSON_DELETE(ownStateAllocator_); + } + + //! Reset the internal states. + void Reset() { + while (!schemaStack_.Empty()) + PopSchema(); + documentStack_.Clear(); + ResetError(); + } + + //! Reset the error state. + void ResetError() { + error_.SetObject(); + currentError_.SetNull(); + missingDependents_.SetNull(); + valid_ = true; + } + + //! Implementation of ISchemaValidator + void SetValidateFlags(unsigned flags) { + flags_ = flags; + } + virtual unsigned GetValidateFlags() const { + return flags_; + } + + //! Checks whether the current state is valid. + // Implementation of ISchemaValidator + virtual bool IsValid() const { + if (!valid_) return false; + if (GetContinueOnErrors() && !error_.ObjectEmpty()) return false; + return true; + } + + //! Gets the error object. + ValueType& GetError() { return error_; } + const ValueType& GetError() const { return error_; } + + //! Gets the JSON pointer pointed to the invalid schema. + // If reporting all errors, the stack will be empty. + PointerType GetInvalidSchemaPointer() const { + return schemaStack_.Empty() ? PointerType() : CurrentSchema().GetPointer(); + } + + //! Gets the keyword of invalid schema. + // If reporting all errors, the stack will be empty, so return "errors". + const Ch* GetInvalidSchemaKeyword() const { + if (!schemaStack_.Empty()) return CurrentContext().invalidKeyword; + if (GetContinueOnErrors() && !error_.ObjectEmpty()) return (const Ch*)GetErrorsString(); + return 0; + } + + //! Gets the error code of invalid schema. + // If reporting all errors, the stack will be empty, so return kValidateErrors. + ValidateErrorCode GetInvalidSchemaCode() const { + if (!schemaStack_.Empty()) return CurrentContext().invalidCode; + if (GetContinueOnErrors() && !error_.ObjectEmpty()) return kValidateErrors; + return kValidateErrorNone; + } + + //! Gets the JSON pointer pointed to the invalid value. + // If reporting all errors, the stack will be empty. + PointerType GetInvalidDocumentPointer() const { + if (documentStack_.Empty()) { + return PointerType(); + } + else { + return PointerType(documentStack_.template Bottom(), documentStack_.GetSize() / sizeof(Ch)); + } + } + + void NotMultipleOf(int64_t actual, const SValue& expected) { + AddNumberError(kValidateErrorMultipleOf, ValueType(actual).Move(), expected); + } + void NotMultipleOf(uint64_t actual, const SValue& expected) { + AddNumberError(kValidateErrorMultipleOf, ValueType(actual).Move(), expected); + } + void NotMultipleOf(double actual, const SValue& expected) { + AddNumberError(kValidateErrorMultipleOf, ValueType(actual).Move(), expected); + } + void AboveMaximum(int64_t actual, const SValue& expected, bool exclusive) { + AddNumberError(exclusive ? kValidateErrorExclusiveMaximum : kValidateErrorMaximum, ValueType(actual).Move(), expected, + exclusive ? &SchemaType::GetExclusiveMaximumString : 0); + } + void AboveMaximum(uint64_t actual, const SValue& expected, bool exclusive) { + AddNumberError(exclusive ? kValidateErrorExclusiveMaximum : kValidateErrorMaximum, ValueType(actual).Move(), expected, + exclusive ? &SchemaType::GetExclusiveMaximumString : 0); + } + void AboveMaximum(double actual, const SValue& expected, bool exclusive) { + AddNumberError(exclusive ? kValidateErrorExclusiveMaximum : kValidateErrorMaximum, ValueType(actual).Move(), expected, + exclusive ? &SchemaType::GetExclusiveMaximumString : 0); + } + void BelowMinimum(int64_t actual, const SValue& expected, bool exclusive) { + AddNumberError(exclusive ? kValidateErrorExclusiveMinimum : kValidateErrorMinimum, ValueType(actual).Move(), expected, + exclusive ? &SchemaType::GetExclusiveMinimumString : 0); + } + void BelowMinimum(uint64_t actual, const SValue& expected, bool exclusive) { + AddNumberError(exclusive ? kValidateErrorExclusiveMinimum : kValidateErrorMinimum, ValueType(actual).Move(), expected, + exclusive ? &SchemaType::GetExclusiveMinimumString : 0); + } + void BelowMinimum(double actual, const SValue& expected, bool exclusive) { + AddNumberError(exclusive ? kValidateErrorExclusiveMinimum : kValidateErrorMinimum, ValueType(actual).Move(), expected, + exclusive ? &SchemaType::GetExclusiveMinimumString : 0); + } + + void TooLong(const Ch* str, SizeType length, SizeType expected) { + AddNumberError(kValidateErrorMaxLength, + ValueType(str, length, GetStateAllocator()).Move(), SValue(expected).Move()); + } + void TooShort(const Ch* str, SizeType length, SizeType expected) { + AddNumberError(kValidateErrorMinLength, + ValueType(str, length, GetStateAllocator()).Move(), SValue(expected).Move()); + } + void DoesNotMatch(const Ch* str, SizeType length) { + currentError_.SetObject(); + currentError_.AddMember(GetActualString(), ValueType(str, length, GetStateAllocator()).Move(), GetStateAllocator()); + AddCurrentError(kValidateErrorPattern); + } + + void DisallowedItem(SizeType index) { + currentError_.SetObject(); + currentError_.AddMember(GetDisallowedString(), ValueType(index).Move(), GetStateAllocator()); + AddCurrentError(kValidateErrorAdditionalItems, true); + } + void TooFewItems(SizeType actualCount, SizeType expectedCount) { + AddNumberError(kValidateErrorMinItems, + ValueType(actualCount).Move(), SValue(expectedCount).Move()); + } + void TooManyItems(SizeType actualCount, SizeType expectedCount) { + AddNumberError(kValidateErrorMaxItems, + ValueType(actualCount).Move(), SValue(expectedCount).Move()); + } + void DuplicateItems(SizeType index1, SizeType index2) { + ValueType duplicates(kArrayType); + duplicates.PushBack(index1, GetStateAllocator()); + duplicates.PushBack(index2, GetStateAllocator()); + currentError_.SetObject(); + currentError_.AddMember(GetDuplicatesString(), duplicates, GetStateAllocator()); + AddCurrentError(kValidateErrorUniqueItems, true); + } + + void TooManyProperties(SizeType actualCount, SizeType expectedCount) { + AddNumberError(kValidateErrorMaxProperties, + ValueType(actualCount).Move(), SValue(expectedCount).Move()); + } + void TooFewProperties(SizeType actualCount, SizeType expectedCount) { + AddNumberError(kValidateErrorMinProperties, + ValueType(actualCount).Move(), SValue(expectedCount).Move()); + } + void StartMissingProperties() { + currentError_.SetArray(); + } + void AddMissingProperty(const SValue& name) { + currentError_.PushBack(ValueType(name, GetStateAllocator()).Move(), GetStateAllocator()); + } + bool EndMissingProperties() { + if (currentError_.Empty()) + return false; + ValueType error(kObjectType); + error.AddMember(GetMissingString(), currentError_, GetStateAllocator()); + currentError_ = error; + AddCurrentError(kValidateErrorRequired); + return true; + } + void PropertyViolations(ISchemaValidator** subvalidators, SizeType count) { + for (SizeType i = 0; i < count; ++i) + MergeError(static_cast(subvalidators[i])->GetError()); + } + void DisallowedProperty(const Ch* name, SizeType length) { + currentError_.SetObject(); + currentError_.AddMember(GetDisallowedString(), ValueType(name, length, GetStateAllocator()).Move(), GetStateAllocator()); + AddCurrentError(kValidateErrorAdditionalProperties, true); + } + + void StartDependencyErrors() { + currentError_.SetObject(); + } + void StartMissingDependentProperties() { + missingDependents_.SetArray(); + } + void AddMissingDependentProperty(const SValue& targetName) { + missingDependents_.PushBack(ValueType(targetName, GetStateAllocator()).Move(), GetStateAllocator()); + } + void EndMissingDependentProperties(const SValue& sourceName) { + if (!missingDependents_.Empty()) { + // Create equivalent 'required' error + ValueType error(kObjectType); + ValidateErrorCode code = kValidateErrorRequired; + error.AddMember(GetMissingString(), missingDependents_.Move(), GetStateAllocator()); + AddErrorCode(error, code); + AddErrorInstanceLocation(error, false); + // When appending to a pointer ensure its allocator is used + PointerType schemaRef = GetInvalidSchemaPointer().Append(SchemaType::GetValidateErrorKeyword(kValidateErrorDependencies), &GetInvalidSchemaPointer().GetAllocator()); + AddErrorSchemaLocation(error, schemaRef.Append(sourceName.GetString(), sourceName.GetStringLength(), &GetInvalidSchemaPointer().GetAllocator())); + ValueType wrapper(kObjectType); + wrapper.AddMember(ValueType(SchemaType::GetValidateErrorKeyword(code), GetStateAllocator()).Move(), error, GetStateAllocator()); + currentError_.AddMember(ValueType(sourceName, GetStateAllocator()).Move(), wrapper, GetStateAllocator()); + } + } + void AddDependencySchemaError(const SValue& sourceName, ISchemaValidator* subvalidator) { + currentError_.AddMember(ValueType(sourceName, GetStateAllocator()).Move(), + static_cast(subvalidator)->GetError(), GetStateAllocator()); + } + bool EndDependencyErrors() { + if (currentError_.ObjectEmpty()) + return false; + ValueType error(kObjectType); + error.AddMember(GetErrorsString(), currentError_, GetStateAllocator()); + currentError_ = error; + AddCurrentError(kValidateErrorDependencies); + return true; + } + + void DisallowedValue(const ValidateErrorCode code = kValidateErrorEnum) { + currentError_.SetObject(); + AddCurrentError(code); + } + void StartDisallowedType() { + currentError_.SetArray(); + } + void AddExpectedType(const typename SchemaType::ValueType& expectedType) { + currentError_.PushBack(ValueType(expectedType, GetStateAllocator()).Move(), GetStateAllocator()); + } + void EndDisallowedType(const typename SchemaType::ValueType& actualType) { + ValueType error(kObjectType); + error.AddMember(GetExpectedString(), currentError_, GetStateAllocator()); + error.AddMember(GetActualString(), ValueType(actualType, GetStateAllocator()).Move(), GetStateAllocator()); + currentError_ = error; + AddCurrentError(kValidateErrorType); + } + void NotAllOf(ISchemaValidator** subvalidators, SizeType count) { + // Treat allOf like oneOf and anyOf to match https://rapidjson.org/md_doc_schema.html#allOf-anyOf-oneOf + AddErrorArray(kValidateErrorAllOf, subvalidators, count); + //for (SizeType i = 0; i < count; ++i) { + // MergeError(static_cast(subvalidators[i])->GetError()); + //} + } + void NoneOf(ISchemaValidator** subvalidators, SizeType count) { + AddErrorArray(kValidateErrorAnyOf, subvalidators, count); + } + void NotOneOf(ISchemaValidator** subvalidators, SizeType count, bool matched = false) { + AddErrorArray(matched ? kValidateErrorOneOfMatch : kValidateErrorOneOf, subvalidators, count); + } + void Disallowed() { + currentError_.SetObject(); + AddCurrentError(kValidateErrorNot); + } + +#define RAPIDJSON_STRING_(name, ...) \ + static const StringRefType& Get##name##String() {\ + static const Ch s[] = { __VA_ARGS__, '\0' };\ + static const StringRefType v(s, static_cast(sizeof(s) / sizeof(Ch) - 1)); \ + return v;\ + } + + RAPIDJSON_STRING_(InstanceRef, 'i', 'n', 's', 't', 'a', 'n', 'c', 'e', 'R', 'e', 'f') + RAPIDJSON_STRING_(SchemaRef, 's', 'c', 'h', 'e', 'm', 'a', 'R', 'e', 'f') + RAPIDJSON_STRING_(Expected, 'e', 'x', 'p', 'e', 'c', 't', 'e', 'd') + RAPIDJSON_STRING_(Actual, 'a', 'c', 't', 'u', 'a', 'l') + RAPIDJSON_STRING_(Disallowed, 'd', 'i', 's', 'a', 'l', 'l', 'o', 'w', 'e', 'd') + RAPIDJSON_STRING_(Missing, 'm', 'i', 's', 's', 'i', 'n', 'g') + RAPIDJSON_STRING_(Errors, 'e', 'r', 'r', 'o', 'r', 's') + RAPIDJSON_STRING_(ErrorCode, 'e', 'r', 'r', 'o', 'r', 'C', 'o', 'd', 'e') + RAPIDJSON_STRING_(ErrorMessage, 'e', 'r', 'r', 'o', 'r', 'M', 'e', 's', 's', 'a', 'g', 'e') + RAPIDJSON_STRING_(Duplicates, 'd', 'u', 'p', 'l', 'i', 'c', 'a', 't', 'e', 's') + +#undef RAPIDJSON_STRING_ + +#if RAPIDJSON_SCHEMA_VERBOSE +#define RAPIDJSON_SCHEMA_HANDLE_BEGIN_VERBOSE_() \ +RAPIDJSON_MULTILINEMACRO_BEGIN\ + *documentStack_.template Push() = '\0';\ + documentStack_.template Pop(1);\ + internal::PrintInvalidDocument(documentStack_.template Bottom());\ +RAPIDJSON_MULTILINEMACRO_END +#else +#define RAPIDJSON_SCHEMA_HANDLE_BEGIN_VERBOSE_() +#endif + +#define RAPIDJSON_SCHEMA_HANDLE_BEGIN_(method, arg1)\ + if (!valid_) return false; \ + if ((!BeginValue() && !GetContinueOnErrors()) || (!CurrentSchema().method arg1 && !GetContinueOnErrors())) {\ + RAPIDJSON_SCHEMA_HANDLE_BEGIN_VERBOSE_();\ + return valid_ = false;\ + } + +#define RAPIDJSON_SCHEMA_HANDLE_PARALLEL_(method, arg2)\ + for (Context* context = schemaStack_.template Bottom(); context != schemaStack_.template End(); context++) {\ + if (context->hasher)\ + static_cast(context->hasher)->method arg2;\ + if (context->validators)\ + for (SizeType i_ = 0; i_ < context->validatorCount; i_++)\ + static_cast(context->validators[i_])->method arg2;\ + if (context->patternPropertiesValidators)\ + for (SizeType i_ = 0; i_ < context->patternPropertiesValidatorCount; i_++)\ + static_cast(context->patternPropertiesValidators[i_])->method arg2;\ + } + +#define RAPIDJSON_SCHEMA_HANDLE_END_(method, arg2)\ + valid_ = (EndValue() || GetContinueOnErrors()) && (!outputHandler_ || outputHandler_->method arg2);\ + return valid_; + +#define RAPIDJSON_SCHEMA_HANDLE_VALUE_(method, arg1, arg2) \ + RAPIDJSON_SCHEMA_HANDLE_BEGIN_ (method, arg1);\ + RAPIDJSON_SCHEMA_HANDLE_PARALLEL_(method, arg2);\ + RAPIDJSON_SCHEMA_HANDLE_END_ (method, arg2) + + bool Null() { RAPIDJSON_SCHEMA_HANDLE_VALUE_(Null, (CurrentContext()), ( )); } + bool Bool(bool b) { RAPIDJSON_SCHEMA_HANDLE_VALUE_(Bool, (CurrentContext(), b), (b)); } + bool Int(int i) { RAPIDJSON_SCHEMA_HANDLE_VALUE_(Int, (CurrentContext(), i), (i)); } + bool Uint(unsigned u) { RAPIDJSON_SCHEMA_HANDLE_VALUE_(Uint, (CurrentContext(), u), (u)); } + bool Int64(int64_t i) { RAPIDJSON_SCHEMA_HANDLE_VALUE_(Int64, (CurrentContext(), i), (i)); } + bool Uint64(uint64_t u) { RAPIDJSON_SCHEMA_HANDLE_VALUE_(Uint64, (CurrentContext(), u), (u)); } + bool Double(double d) { RAPIDJSON_SCHEMA_HANDLE_VALUE_(Double, (CurrentContext(), d), (d)); } + bool RawNumber(const Ch* str, SizeType length, bool copy) + { RAPIDJSON_SCHEMA_HANDLE_VALUE_(String, (CurrentContext(), str, length, copy), (str, length, copy)); } + bool String(const Ch* str, SizeType length, bool copy) + { RAPIDJSON_SCHEMA_HANDLE_VALUE_(String, (CurrentContext(), str, length, copy), (str, length, copy)); } + + bool StartObject() { + RAPIDJSON_SCHEMA_HANDLE_BEGIN_(StartObject, (CurrentContext())); + RAPIDJSON_SCHEMA_HANDLE_PARALLEL_(StartObject, ()); + return valid_ = !outputHandler_ || outputHandler_->StartObject(); + } + + bool Key(const Ch* str, SizeType len, bool copy) { + if (!valid_) return false; + AppendToken(str, len); + if (!CurrentSchema().Key(CurrentContext(), str, len, copy) && !GetContinueOnErrors()) return valid_ = false; + RAPIDJSON_SCHEMA_HANDLE_PARALLEL_(Key, (str, len, copy)); + return valid_ = !outputHandler_ || outputHandler_->Key(str, len, copy); + } + + bool EndObject(SizeType memberCount) { + if (!valid_) return false; + RAPIDJSON_SCHEMA_HANDLE_PARALLEL_(EndObject, (memberCount)); + if (!CurrentSchema().EndObject(CurrentContext(), memberCount) && !GetContinueOnErrors()) return valid_ = false; + RAPIDJSON_SCHEMA_HANDLE_END_(EndObject, (memberCount)); + } + + bool StartArray() { + RAPIDJSON_SCHEMA_HANDLE_BEGIN_(StartArray, (CurrentContext())); + RAPIDJSON_SCHEMA_HANDLE_PARALLEL_(StartArray, ()); + return valid_ = !outputHandler_ || outputHandler_->StartArray(); + } + + bool EndArray(SizeType elementCount) { + if (!valid_) return false; + RAPIDJSON_SCHEMA_HANDLE_PARALLEL_(EndArray, (elementCount)); + if (!CurrentSchema().EndArray(CurrentContext(), elementCount) && !GetContinueOnErrors()) return valid_ = false; + RAPIDJSON_SCHEMA_HANDLE_END_(EndArray, (elementCount)); + } + +#undef RAPIDJSON_SCHEMA_HANDLE_BEGIN_VERBOSE_ +#undef RAPIDJSON_SCHEMA_HANDLE_BEGIN_ +#undef RAPIDJSON_SCHEMA_HANDLE_PARALLEL_ +#undef RAPIDJSON_SCHEMA_HANDLE_VALUE_ + + // Implementation of ISchemaStateFactory + virtual ISchemaValidator* CreateSchemaValidator(const SchemaType& root, const bool inheritContinueOnErrors) { + ISchemaValidator* sv = new (GetStateAllocator().Malloc(sizeof(GenericSchemaValidator))) GenericSchemaValidator(*schemaDocument_, root, documentStack_.template Bottom(), documentStack_.GetSize(), +#if RAPIDJSON_SCHEMA_VERBOSE + depth_ + 1, +#endif + &GetStateAllocator()); + sv->SetValidateFlags(inheritContinueOnErrors ? GetValidateFlags() : GetValidateFlags() & ~(unsigned)kValidateContinueOnErrorFlag); + return sv; + } + + virtual void DestroySchemaValidator(ISchemaValidator* validator) { + GenericSchemaValidator* v = static_cast(validator); + v->~GenericSchemaValidator(); + StateAllocator::Free(v); + } + + virtual void* CreateHasher() { + return new (GetStateAllocator().Malloc(sizeof(HasherType))) HasherType(&GetStateAllocator()); + } + + virtual uint64_t GetHashCode(void* hasher) { + return static_cast(hasher)->GetHashCode(); + } + + virtual void DestroryHasher(void* hasher) { + HasherType* h = static_cast(hasher); + h->~HasherType(); + StateAllocator::Free(h); + } + + virtual void* MallocState(size_t size) { + return GetStateAllocator().Malloc(size); + } + + virtual void FreeState(void* p) { + StateAllocator::Free(p); + } + +private: + typedef typename SchemaType::Context Context; + typedef GenericValue, StateAllocator> HashCodeArray; + typedef internal::Hasher HasherType; + + GenericSchemaValidator( + const SchemaDocumentType& schemaDocument, + const SchemaType& root, + const char* basePath, size_t basePathSize, +#if RAPIDJSON_SCHEMA_VERBOSE + unsigned depth, +#endif + StateAllocator* allocator = 0, + size_t schemaStackCapacity = kDefaultSchemaStackCapacity, + size_t documentStackCapacity = kDefaultDocumentStackCapacity) + : + schemaDocument_(&schemaDocument), + root_(root), + stateAllocator_(allocator), + ownStateAllocator_(0), + schemaStack_(allocator, schemaStackCapacity), + documentStack_(allocator, documentStackCapacity), + outputHandler_(0), + error_(kObjectType), + currentError_(), + missingDependents_(), + valid_(true), + flags_(kValidateDefaultFlags) +#if RAPIDJSON_SCHEMA_VERBOSE + , depth_(depth) +#endif + { + if (basePath && basePathSize) + memcpy(documentStack_.template Push(basePathSize), basePath, basePathSize); + } + + StateAllocator& GetStateAllocator() { + if (!stateAllocator_) + stateAllocator_ = ownStateAllocator_ = RAPIDJSON_NEW(StateAllocator)(); + return *stateAllocator_; + } + + bool GetContinueOnErrors() const { + return flags_ & kValidateContinueOnErrorFlag; + } + + bool BeginValue() { + if (schemaStack_.Empty()) + PushSchema(root_); + else { + if (CurrentContext().inArray) + internal::TokenHelper, Ch>::AppendIndexToken(documentStack_, CurrentContext().arrayElementIndex); + + if (!CurrentSchema().BeginValue(CurrentContext()) && !GetContinueOnErrors()) + return false; + + SizeType count = CurrentContext().patternPropertiesSchemaCount; + const SchemaType** sa = CurrentContext().patternPropertiesSchemas; + typename Context::PatternValidatorType patternValidatorType = CurrentContext().valuePatternValidatorType; + bool valueUniqueness = CurrentContext().valueUniqueness; + RAPIDJSON_ASSERT(CurrentContext().valueSchema); + PushSchema(*CurrentContext().valueSchema); + + if (count > 0) { + CurrentContext().objectPatternValidatorType = patternValidatorType; + ISchemaValidator**& va = CurrentContext().patternPropertiesValidators; + SizeType& validatorCount = CurrentContext().patternPropertiesValidatorCount; + va = static_cast(MallocState(sizeof(ISchemaValidator*) * count)); + for (SizeType i = 0; i < count; i++) + va[validatorCount++] = CreateSchemaValidator(*sa[i], true); // Inherit continueOnError + } + + CurrentContext().arrayUniqueness = valueUniqueness; + } + return true; + } + + bool EndValue() { + if (!CurrentSchema().EndValue(CurrentContext()) && !GetContinueOnErrors()) + return false; + +#if RAPIDJSON_SCHEMA_VERBOSE + GenericStringBuffer sb; + schemaDocument_->GetPointer(&CurrentSchema()).Stringify(sb); + + *documentStack_.template Push() = '\0'; + documentStack_.template Pop(1); + internal::PrintValidatorPointers(depth_, sb.GetString(), documentStack_.template Bottom()); +#endif + void* hasher = CurrentContext().hasher; + uint64_t h = hasher && CurrentContext().arrayUniqueness ? static_cast(hasher)->GetHashCode() : 0; + + PopSchema(); + + if (!schemaStack_.Empty()) { + Context& context = CurrentContext(); + // Only check uniqueness if there is a hasher + if (hasher && context.valueUniqueness) { + HashCodeArray* a = static_cast(context.arrayElementHashCodes); + if (!a) + CurrentContext().arrayElementHashCodes = a = new (GetStateAllocator().Malloc(sizeof(HashCodeArray))) HashCodeArray(kArrayType); + for (typename HashCodeArray::ConstValueIterator itr = a->Begin(); itr != a->End(); ++itr) + if (itr->GetUint64() == h) { + DuplicateItems(static_cast(itr - a->Begin()), a->Size()); + // Cleanup before returning if continuing + if (GetContinueOnErrors()) { + a->PushBack(h, GetStateAllocator()); + while (!documentStack_.Empty() && *documentStack_.template Pop(1) != '/'); + } + RAPIDJSON_INVALID_KEYWORD_RETURN(kValidateErrorUniqueItems); + } + a->PushBack(h, GetStateAllocator()); + } + } + + // Remove the last token of document pointer + while (!documentStack_.Empty() && *documentStack_.template Pop(1) != '/') + ; + + return true; + } + + void AppendToken(const Ch* str, SizeType len) { + documentStack_.template Reserve(1 + len * 2); // worst case all characters are escaped as two characters + *documentStack_.template PushUnsafe() = '/'; + for (SizeType i = 0; i < len; i++) { + if (str[i] == '~') { + *documentStack_.template PushUnsafe() = '~'; + *documentStack_.template PushUnsafe() = '0'; + } + else if (str[i] == '/') { + *documentStack_.template PushUnsafe() = '~'; + *documentStack_.template PushUnsafe() = '1'; + } + else + *documentStack_.template PushUnsafe() = str[i]; + } + } + + RAPIDJSON_FORCEINLINE void PushSchema(const SchemaType& schema) { new (schemaStack_.template Push()) Context(*this, *this, &schema); } + + RAPIDJSON_FORCEINLINE void PopSchema() { + Context* c = schemaStack_.template Pop(1); + if (HashCodeArray* a = static_cast(c->arrayElementHashCodes)) { + a->~HashCodeArray(); + StateAllocator::Free(a); + } + c->~Context(); + } + + void AddErrorInstanceLocation(ValueType& result, bool parent) { + GenericStringBuffer sb; + PointerType instancePointer = GetInvalidDocumentPointer(); + ((parent && instancePointer.GetTokenCount() > 0) + ? PointerType(instancePointer.GetTokens(), instancePointer.GetTokenCount() - 1) + : instancePointer).StringifyUriFragment(sb); + ValueType instanceRef(sb.GetString(), static_cast(sb.GetSize() / sizeof(Ch)), + GetStateAllocator()); + result.AddMember(GetInstanceRefString(), instanceRef, GetStateAllocator()); + } + + void AddErrorSchemaLocation(ValueType& result, PointerType schema = PointerType()) { + GenericStringBuffer sb; + SizeType len = CurrentSchema().GetURI().GetStringLength(); + if (len) memcpy(sb.Push(len), CurrentSchema().GetURI().GetString(), len * sizeof(Ch)); + if (schema.GetTokenCount()) schema.StringifyUriFragment(sb); + else GetInvalidSchemaPointer().StringifyUriFragment(sb); + ValueType schemaRef(sb.GetString(), static_cast(sb.GetSize() / sizeof(Ch)), + GetStateAllocator()); + result.AddMember(GetSchemaRefString(), schemaRef, GetStateAllocator()); + } + + void AddErrorCode(ValueType& result, const ValidateErrorCode code) { + result.AddMember(GetErrorCodeString(), code, GetStateAllocator()); + } + + void AddError(ValueType& keyword, ValueType& error) { + typename ValueType::MemberIterator member = error_.FindMember(keyword); + if (member == error_.MemberEnd()) + error_.AddMember(keyword, error, GetStateAllocator()); + else { + if (member->value.IsObject()) { + ValueType errors(kArrayType); + errors.PushBack(member->value, GetStateAllocator()); + member->value = errors; + } + member->value.PushBack(error, GetStateAllocator()); + } + } + + void AddCurrentError(const ValidateErrorCode code, bool parent = false) { + AddErrorCode(currentError_, code); + AddErrorInstanceLocation(currentError_, parent); + AddErrorSchemaLocation(currentError_); + AddError(ValueType(SchemaType::GetValidateErrorKeyword(code), GetStateAllocator(), false).Move(), currentError_); + } + + void MergeError(ValueType& other) { + for (typename ValueType::MemberIterator it = other.MemberBegin(), end = other.MemberEnd(); it != end; ++it) { + AddError(it->name, it->value); + } + } + + void AddNumberError(const ValidateErrorCode code, ValueType& actual, const SValue& expected, + const typename SchemaType::ValueType& (*exclusive)() = 0) { + currentError_.SetObject(); + currentError_.AddMember(GetActualString(), actual, GetStateAllocator()); + currentError_.AddMember(GetExpectedString(), ValueType(expected, GetStateAllocator()).Move(), GetStateAllocator()); + if (exclusive) + currentError_.AddMember(ValueType(exclusive(), GetStateAllocator()).Move(), true, GetStateAllocator()); + AddCurrentError(code); + } + + void AddErrorArray(const ValidateErrorCode code, + ISchemaValidator** subvalidators, SizeType count) { + ValueType errors(kArrayType); + for (SizeType i = 0; i < count; ++i) + errors.PushBack(static_cast(subvalidators[i])->GetError(), GetStateAllocator()); + currentError_.SetObject(); + currentError_.AddMember(GetErrorsString(), errors, GetStateAllocator()); + AddCurrentError(code); + } + + const SchemaType& CurrentSchema() const { return *schemaStack_.template Top()->schema; } + Context& CurrentContext() { return *schemaStack_.template Top(); } + const Context& CurrentContext() const { return *schemaStack_.template Top(); } + + static const size_t kDefaultSchemaStackCapacity = 1024; + static const size_t kDefaultDocumentStackCapacity = 256; + const SchemaDocumentType* schemaDocument_; + const SchemaType& root_; + StateAllocator* stateAllocator_; + StateAllocator* ownStateAllocator_; + internal::Stack schemaStack_; //!< stack to store the current path of schema (BaseSchemaType *) + internal::Stack documentStack_; //!< stack to store the current path of validating document (Ch) + OutputHandler* outputHandler_; + ValueType error_; + ValueType currentError_; + ValueType missingDependents_; + bool valid_; + unsigned flags_; +#if RAPIDJSON_SCHEMA_VERBOSE + unsigned depth_; +#endif +}; + +typedef GenericSchemaValidator SchemaValidator; + +/////////////////////////////////////////////////////////////////////////////// +// SchemaValidatingReader + +//! A helper class for parsing with validation. +/*! + This helper class is a functor, designed as a parameter of \ref GenericDocument::Populate(). + + \tparam parseFlags Combination of \ref ParseFlag. + \tparam InputStream Type of input stream, implementing Stream concept. + \tparam SourceEncoding Encoding of the input stream. + \tparam SchemaDocumentType Type of schema document. + \tparam StackAllocator Allocator type for stack. +*/ +template < + unsigned parseFlags, + typename InputStream, + typename SourceEncoding, + typename SchemaDocumentType = SchemaDocument, + typename StackAllocator = CrtAllocator> +class SchemaValidatingReader { +public: + typedef typename SchemaDocumentType::PointerType PointerType; + typedef typename InputStream::Ch Ch; + typedef GenericValue ValueType; + + //! Constructor + /*! + \param is Input stream. + \param sd Schema document. + */ + SchemaValidatingReader(InputStream& is, const SchemaDocumentType& sd) : is_(is), sd_(sd), invalidSchemaKeyword_(), invalidSchemaCode_(kValidateErrorNone), error_(kObjectType), isValid_(true) {} + + template + bool operator()(Handler& handler) { + GenericReader reader; + GenericSchemaValidator validator(sd_, handler); + parseResult_ = reader.template Parse(is_, validator); + + isValid_ = validator.IsValid(); + if (isValid_) { + invalidSchemaPointer_ = PointerType(); + invalidSchemaKeyword_ = 0; + invalidDocumentPointer_ = PointerType(); + error_.SetObject(); + } + else { + invalidSchemaPointer_ = validator.GetInvalidSchemaPointer(); + invalidSchemaKeyword_ = validator.GetInvalidSchemaKeyword(); + invalidSchemaCode_ = validator.GetInvalidSchemaCode(); + invalidDocumentPointer_ = validator.GetInvalidDocumentPointer(); + error_.CopyFrom(validator.GetError(), allocator_); + } + + return parseResult_; + } + + const ParseResult& GetParseResult() const { return parseResult_; } + bool IsValid() const { return isValid_; } + const PointerType& GetInvalidSchemaPointer() const { return invalidSchemaPointer_; } + const Ch* GetInvalidSchemaKeyword() const { return invalidSchemaKeyword_; } + const PointerType& GetInvalidDocumentPointer() const { return invalidDocumentPointer_; } + const ValueType& GetError() const { return error_; } + ValidateErrorCode GetInvalidSchemaCode() const { return invalidSchemaCode_; } + +private: + InputStream& is_; + const SchemaDocumentType& sd_; + + ParseResult parseResult_; + PointerType invalidSchemaPointer_; + const Ch* invalidSchemaKeyword_; + PointerType invalidDocumentPointer_; + ValidateErrorCode invalidSchemaCode_; + StackAllocator allocator_; + ValueType error_; + bool isValid_; +}; + +RAPIDJSON_NAMESPACE_END +RAPIDJSON_DIAG_POP + +#endif // RAPIDJSON_SCHEMA_H_ diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/stream.h b/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/stream.h new file mode 100644 index 0000000000..1fd70915c5 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/stream.h @@ -0,0 +1,223 @@ +// Tencent is pleased to support the open source community by making RapidJSON available. +// +// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. +// +// Licensed under the MIT License (the "License"); you may not use this file except +// in compliance with the License. You may obtain a copy of the License at +// +// http://opensource.org/licenses/MIT +// +// Unless required by applicable law or agreed to in writing, software distributed +// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +// CONDITIONS OF ANY KIND, either express or implied. See the License for the +// specific language governing permissions and limitations under the License. + +#include "rapidjson.h" + +#ifndef RAPIDJSON_STREAM_H_ +#define RAPIDJSON_STREAM_H_ + +#include "encodings.h" + +RAPIDJSON_NAMESPACE_BEGIN + +/////////////////////////////////////////////////////////////////////////////// +// Stream + +/*! \class rapidjson::Stream + \brief Concept for reading and writing characters. + + For read-only stream, no need to implement PutBegin(), Put(), Flush() and PutEnd(). + + For write-only stream, only need to implement Put() and Flush(). + +\code +concept Stream { + typename Ch; //!< Character type of the stream. + + //! Read the current character from stream without moving the read cursor. + Ch Peek() const; + + //! Read the current character from stream and moving the read cursor to next character. + Ch Take(); + + //! Get the current read cursor. + //! \return Number of characters read from start. + size_t Tell(); + + //! Begin writing operation at the current read pointer. + //! \return The begin writer pointer. + Ch* PutBegin(); + + //! Write a character. + void Put(Ch c); + + //! Flush the buffer. + void Flush(); + + //! End the writing operation. + //! \param begin The begin write pointer returned by PutBegin(). + //! \return Number of characters written. + size_t PutEnd(Ch* begin); +} +\endcode +*/ + +//! Provides additional information for stream. +/*! + By using traits pattern, this type provides a default configuration for stream. + For custom stream, this type can be specialized for other configuration. + See TEST(Reader, CustomStringStream) in readertest.cpp for example. +*/ +template +struct StreamTraits { + //! Whether to make local copy of stream for optimization during parsing. + /*! + By default, for safety, streams do not use local copy optimization. + Stream that can be copied fast should specialize this, like StreamTraits. + */ + enum { copyOptimization = 0 }; +}; + +//! Reserve n characters for writing to a stream. +template +inline void PutReserve(Stream& stream, size_t count) { + (void)stream; + (void)count; +} + +//! Write character to a stream, presuming buffer is reserved. +template +inline void PutUnsafe(Stream& stream, typename Stream::Ch c) { + stream.Put(c); +} + +//! Put N copies of a character to a stream. +template +inline void PutN(Stream& stream, Ch c, size_t n) { + PutReserve(stream, n); + for (size_t i = 0; i < n; i++) + PutUnsafe(stream, c); +} + +/////////////////////////////////////////////////////////////////////////////// +// GenericStreamWrapper + +//! A Stream Wrapper +/*! \tThis string stream is a wrapper for any stream by just forwarding any + \treceived message to the origin stream. + \note implements Stream concept +*/ + +#if defined(_MSC_VER) && _MSC_VER <= 1800 +RAPIDJSON_DIAG_PUSH +RAPIDJSON_DIAG_OFF(4702) // unreachable code +RAPIDJSON_DIAG_OFF(4512) // assignment operator could not be generated +#endif + +template > +class GenericStreamWrapper { +public: + typedef typename Encoding::Ch Ch; + GenericStreamWrapper(InputStream& is): is_(is) {} + + Ch Peek() const { return is_.Peek(); } + Ch Take() { return is_.Take(); } + size_t Tell() { return is_.Tell(); } + Ch* PutBegin() { return is_.PutBegin(); } + void Put(Ch ch) { is_.Put(ch); } + void Flush() { is_.Flush(); } + size_t PutEnd(Ch* ch) { return is_.PutEnd(ch); } + + // wrapper for MemoryStream + const Ch* Peek4() const { return is_.Peek4(); } + + // wrapper for AutoUTFInputStream + UTFType GetType() const { return is_.GetType(); } + bool HasBOM() const { return is_.HasBOM(); } + +protected: + InputStream& is_; +}; + +#if defined(_MSC_VER) && _MSC_VER <= 1800 +RAPIDJSON_DIAG_POP +#endif + +/////////////////////////////////////////////////////////////////////////////// +// StringStream + +//! Read-only string stream. +/*! \note implements Stream concept +*/ +template +struct GenericStringStream { + typedef typename Encoding::Ch Ch; + + GenericStringStream(const Ch *src) : src_(src), head_(src) {} + + Ch Peek() const { return *src_; } + Ch Take() { return *src_++; } + size_t Tell() const { return static_cast(src_ - head_); } + + Ch* PutBegin() { RAPIDJSON_ASSERT(false); return 0; } + void Put(Ch) { RAPIDJSON_ASSERT(false); } + void Flush() { RAPIDJSON_ASSERT(false); } + size_t PutEnd(Ch*) { RAPIDJSON_ASSERT(false); return 0; } + + const Ch* src_; //!< Current read position. + const Ch* head_; //!< Original head of the string. +}; + +template +struct StreamTraits > { + enum { copyOptimization = 1 }; +}; + +//! String stream with UTF8 encoding. +typedef GenericStringStream > StringStream; + +/////////////////////////////////////////////////////////////////////////////// +// InsituStringStream + +//! A read-write string stream. +/*! This string stream is particularly designed for in-situ parsing. + \note implements Stream concept +*/ +template +struct GenericInsituStringStream { + typedef typename Encoding::Ch Ch; + + GenericInsituStringStream(Ch *src) : src_(src), dst_(0), head_(src) {} + + // Read + Ch Peek() { return *src_; } + Ch Take() { return *src_++; } + size_t Tell() { return static_cast(src_ - head_); } + + // Write + void Put(Ch c) { RAPIDJSON_ASSERT(dst_ != 0); *dst_++ = c; } + + Ch* PutBegin() { return dst_ = src_; } + size_t PutEnd(Ch* begin) { return static_cast(dst_ - begin); } + void Flush() {} + + Ch* Push(size_t count) { Ch* begin = dst_; dst_ += count; return begin; } + void Pop(size_t count) { dst_ -= count; } + + Ch* src_; + Ch* dst_; + Ch* head_; +}; + +template +struct StreamTraits > { + enum { copyOptimization = 1 }; +}; + +//! Insitu string stream with UTF8 encoding. +typedef GenericInsituStringStream > InsituStringStream; + +RAPIDJSON_NAMESPACE_END + +#endif // RAPIDJSON_STREAM_H_ diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/stringbuffer.h b/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/stringbuffer.h new file mode 100644 index 0000000000..82ad3ca6bb --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/stringbuffer.h @@ -0,0 +1,121 @@ +// Tencent is pleased to support the open source community by making RapidJSON available. +// +// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. +// +// Licensed under the MIT License (the "License"); you may not use this file except +// in compliance with the License. You may obtain a copy of the License at +// +// http://opensource.org/licenses/MIT +// +// Unless required by applicable law or agreed to in writing, software distributed +// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +// CONDITIONS OF ANY KIND, either express or implied. See the License for the +// specific language governing permissions and limitations under the License. + +#ifndef RAPIDJSON_STRINGBUFFER_H_ +#define RAPIDJSON_STRINGBUFFER_H_ + +#include "stream.h" +#include "internal/stack.h" + +#if RAPIDJSON_HAS_CXX11_RVALUE_REFS +#include // std::move +#endif + +#include "internal/stack.h" + +#if defined(__clang__) +RAPIDJSON_DIAG_PUSH +RAPIDJSON_DIAG_OFF(c++98-compat) +#endif + +RAPIDJSON_NAMESPACE_BEGIN + +//! Represents an in-memory output stream. +/*! + \tparam Encoding Encoding of the stream. + \tparam Allocator type for allocating memory buffer. + \note implements Stream concept +*/ +template +class GenericStringBuffer { +public: + typedef typename Encoding::Ch Ch; + + GenericStringBuffer(Allocator* allocator = 0, size_t capacity = kDefaultCapacity) : stack_(allocator, capacity) {} + +#if RAPIDJSON_HAS_CXX11_RVALUE_REFS + GenericStringBuffer(GenericStringBuffer&& rhs) : stack_(std::move(rhs.stack_)) {} + GenericStringBuffer& operator=(GenericStringBuffer&& rhs) { + if (&rhs != this) + stack_ = std::move(rhs.stack_); + return *this; + } +#endif + + void Put(Ch c) { *stack_.template Push() = c; } + void PutUnsafe(Ch c) { *stack_.template PushUnsafe() = c; } + void Flush() {} + + void Clear() { stack_.Clear(); } + void ShrinkToFit() { + // Push and pop a null terminator. This is safe. + *stack_.template Push() = '\0'; + stack_.ShrinkToFit(); + stack_.template Pop(1); + } + + void Reserve(size_t count) { stack_.template Reserve(count); } + Ch* Push(size_t count) { return stack_.template Push(count); } + Ch* PushUnsafe(size_t count) { return stack_.template PushUnsafe(count); } + void Pop(size_t count) { stack_.template Pop(count); } + + const Ch* GetString() const { + // Push and pop a null terminator. This is safe. + *stack_.template Push() = '\0'; + stack_.template Pop(1); + + return stack_.template Bottom(); + } + + //! Get the size of string in bytes in the string buffer. + size_t GetSize() const { return stack_.GetSize(); } + + //! Get the length of string in Ch in the string buffer. + size_t GetLength() const { return stack_.GetSize() / sizeof(Ch); } + + static const size_t kDefaultCapacity = 256; + mutable internal::Stack stack_; + +private: + // Prohibit copy constructor & assignment operator. + GenericStringBuffer(const GenericStringBuffer&); + GenericStringBuffer& operator=(const GenericStringBuffer&); +}; + +//! String buffer with UTF8 encoding +typedef GenericStringBuffer > StringBuffer; + +template +inline void PutReserve(GenericStringBuffer& stream, size_t count) { + stream.Reserve(count); +} + +template +inline void PutUnsafe(GenericStringBuffer& stream, typename Encoding::Ch c) { + stream.PutUnsafe(c); +} + +//! Implement specialized version of PutN() with memset() for better performance. +template<> +inline void PutN(GenericStringBuffer >& stream, char c, size_t n) { + std::memset(stream.stack_.Push(n), c, n * sizeof(c)); +} + +RAPIDJSON_NAMESPACE_END + +#if defined(__clang__) +RAPIDJSON_DIAG_POP +#endif + +#endif // RAPIDJSON_STRINGBUFFER_H_ diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/uri.h b/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/uri.h new file mode 100644 index 0000000000..f93e508a4f --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/uri.h @@ -0,0 +1,481 @@ +// Tencent is pleased to support the open source community by making RapidJSON available. +// +// (C) Copyright IBM Corporation 2021 +// +// Licensed under the MIT License (the "License"); you may not use this file except +// in compliance with the License. You may obtain a copy of the License at +// +// http://opensource.org/licenses/MIT +// +// Unless required by applicable law or agreed to in writing, software distributed +// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +// CONDITIONS OF ANY KIND, either express or implied. See the License for the +// specific language governing permissions and limitations under the License. + +#ifndef RAPIDJSON_URI_H_ +#define RAPIDJSON_URI_H_ + +#include "internal/strfunc.h" + +#if defined(__clang__) +RAPIDJSON_DIAG_PUSH +RAPIDJSON_DIAG_OFF(c++98-compat) +#elif defined(_MSC_VER) +RAPIDJSON_DIAG_OFF(4512) // assignment operator could not be generated +#endif + +RAPIDJSON_NAMESPACE_BEGIN + +/////////////////////////////////////////////////////////////////////////////// +// GenericUri + +template +class GenericUri { +public: + typedef typename ValueType::Ch Ch; +#if RAPIDJSON_HAS_STDSTRING + typedef std::basic_string String; +#endif + + //! Constructors + GenericUri(Allocator* allocator = 0) : uri_(), base_(), scheme_(), auth_(), path_(), query_(), frag_(), allocator_(allocator), ownAllocator_() { + } + + GenericUri(const Ch* uri, SizeType len, Allocator* allocator = 0) : uri_(), base_(), scheme_(), auth_(), path_(), query_(), frag_(), allocator_(allocator), ownAllocator_() { + Parse(uri, len); + } + + GenericUri(const Ch* uri, Allocator* allocator = 0) : uri_(), base_(), scheme_(), auth_(), path_(), query_(), frag_(), allocator_(allocator), ownAllocator_() { + Parse(uri, internal::StrLen(uri)); + } + + // Use with specializations of GenericValue + template GenericUri(const T& uri, Allocator* allocator = 0) : uri_(), base_(), scheme_(), auth_(), path_(), query_(), frag_(), allocator_(allocator), ownAllocator_() { + const Ch* u = uri.template Get(); // TypeHelper from document.h + Parse(u, internal::StrLen(u)); + } + +#if RAPIDJSON_HAS_STDSTRING + GenericUri(const String& uri, Allocator* allocator = 0) : uri_(), base_(), scheme_(), auth_(), path_(), query_(), frag_(), allocator_(allocator), ownAllocator_() { + Parse(uri.c_str(), internal::StrLen(uri.c_str())); + } +#endif + + //! Copy constructor + GenericUri(const GenericUri& rhs) : uri_(), base_(), scheme_(), auth_(), path_(), query_(), frag_(), allocator_(), ownAllocator_() { + *this = rhs; + } + + //! Copy constructor + GenericUri(const GenericUri& rhs, Allocator* allocator) : uri_(), base_(), scheme_(), auth_(), path_(), query_(), frag_(), allocator_(allocator), ownAllocator_() { + *this = rhs; + } + + //! Destructor. + ~GenericUri() { + Free(); + RAPIDJSON_DELETE(ownAllocator_); + } + + //! Assignment operator + GenericUri& operator=(const GenericUri& rhs) { + if (this != &rhs) { + // Do not delete ownAllocator + Free(); + Allocate(rhs.GetStringLength()); + auth_ = CopyPart(scheme_, rhs.scheme_, rhs.GetSchemeStringLength()); + path_ = CopyPart(auth_, rhs.auth_, rhs.GetAuthStringLength()); + query_ = CopyPart(path_, rhs.path_, rhs.GetPathStringLength()); + frag_ = CopyPart(query_, rhs.query_, rhs.GetQueryStringLength()); + base_ = CopyPart(frag_, rhs.frag_, rhs.GetFragStringLength()); + uri_ = CopyPart(base_, rhs.base_, rhs.GetBaseStringLength()); + CopyPart(uri_, rhs.uri_, rhs.GetStringLength()); + } + return *this; + } + + //! Getters + // Use with specializations of GenericValue + template void Get(T& uri, Allocator& allocator) { + uri.template Set(this->GetString(), allocator); // TypeHelper from document.h + } + + const Ch* GetString() const { return uri_; } + SizeType GetStringLength() const { return uri_ == 0 ? 0 : internal::StrLen(uri_); } + const Ch* GetBaseString() const { return base_; } + SizeType GetBaseStringLength() const { return base_ == 0 ? 0 : internal::StrLen(base_); } + const Ch* GetSchemeString() const { return scheme_; } + SizeType GetSchemeStringLength() const { return scheme_ == 0 ? 0 : internal::StrLen(scheme_); } + const Ch* GetAuthString() const { return auth_; } + SizeType GetAuthStringLength() const { return auth_ == 0 ? 0 : internal::StrLen(auth_); } + const Ch* GetPathString() const { return path_; } + SizeType GetPathStringLength() const { return path_ == 0 ? 0 : internal::StrLen(path_); } + const Ch* GetQueryString() const { return query_; } + SizeType GetQueryStringLength() const { return query_ == 0 ? 0 : internal::StrLen(query_); } + const Ch* GetFragString() const { return frag_; } + SizeType GetFragStringLength() const { return frag_ == 0 ? 0 : internal::StrLen(frag_); } + +#if RAPIDJSON_HAS_STDSTRING + static String Get(const GenericUri& uri) { return String(uri.GetString(), uri.GetStringLength()); } + static String GetBase(const GenericUri& uri) { return String(uri.GetBaseString(), uri.GetBaseStringLength()); } + static String GetScheme(const GenericUri& uri) { return String(uri.GetSchemeString(), uri.GetSchemeStringLength()); } + static String GetAuth(const GenericUri& uri) { return String(uri.GetAuthString(), uri.GetAuthStringLength()); } + static String GetPath(const GenericUri& uri) { return String(uri.GetPathString(), uri.GetPathStringLength()); } + static String GetQuery(const GenericUri& uri) { return String(uri.GetQueryString(), uri.GetQueryStringLength()); } + static String GetFrag(const GenericUri& uri) { return String(uri.GetFragString(), uri.GetFragStringLength()); } +#endif + + //! Equality operators + bool operator==(const GenericUri& rhs) const { + return Match(rhs, true); + } + + bool operator!=(const GenericUri& rhs) const { + return !Match(rhs, true); + } + + bool Match(const GenericUri& uri, bool full = true) const { + Ch* s1; + Ch* s2; + if (full) { + s1 = uri_; + s2 = uri.uri_; + } else { + s1 = base_; + s2 = uri.base_; + } + if (s1 == s2) return true; + if (s1 == 0 || s2 == 0) return false; + return internal::StrCmp(s1, s2) == 0; + } + + //! Resolve this URI against another (base) URI in accordance with URI resolution rules. + // See https://tools.ietf.org/html/rfc3986 + // Use for resolving an id or $ref with an in-scope id. + // Returns a new GenericUri for the resolved URI. + GenericUri Resolve(const GenericUri& baseuri, Allocator* allocator = 0) { + GenericUri resuri; + resuri.allocator_ = allocator; + // Ensure enough space for combining paths + resuri.Allocate(GetStringLength() + baseuri.GetStringLength() + 1); // + 1 for joining slash + + if (!(GetSchemeStringLength() == 0)) { + // Use all of this URI + resuri.auth_ = CopyPart(resuri.scheme_, scheme_, GetSchemeStringLength()); + resuri.path_ = CopyPart(resuri.auth_, auth_, GetAuthStringLength()); + resuri.query_ = CopyPart(resuri.path_, path_, GetPathStringLength()); + resuri.frag_ = CopyPart(resuri.query_, query_, GetQueryStringLength()); + resuri.RemoveDotSegments(); + } else { + // Use the base scheme + resuri.auth_ = CopyPart(resuri.scheme_, baseuri.scheme_, baseuri.GetSchemeStringLength()); + if (!(GetAuthStringLength() == 0)) { + // Use this auth, path, query + resuri.path_ = CopyPart(resuri.auth_, auth_, GetAuthStringLength()); + resuri.query_ = CopyPart(resuri.path_, path_, GetPathStringLength()); + resuri.frag_ = CopyPart(resuri.query_, query_, GetQueryStringLength()); + resuri.RemoveDotSegments(); + } else { + // Use the base auth + resuri.path_ = CopyPart(resuri.auth_, baseuri.auth_, baseuri.GetAuthStringLength()); + if (GetPathStringLength() == 0) { + // Use the base path + resuri.query_ = CopyPart(resuri.path_, baseuri.path_, baseuri.GetPathStringLength()); + if (GetQueryStringLength() == 0) { + // Use the base query + resuri.frag_ = CopyPart(resuri.query_, baseuri.query_, baseuri.GetQueryStringLength()); + } else { + // Use this query + resuri.frag_ = CopyPart(resuri.query_, query_, GetQueryStringLength()); + } + } else { + if (path_[0] == '/') { + // Absolute path - use all of this path + resuri.query_ = CopyPart(resuri.path_, path_, GetPathStringLength()); + resuri.RemoveDotSegments(); + } else { + // Relative path - append this path to base path after base path's last slash + size_t pos = 0; + if (!(baseuri.GetAuthStringLength() == 0) && baseuri.GetPathStringLength() == 0) { + resuri.path_[pos] = '/'; + pos++; + } + size_t lastslashpos = baseuri.GetPathStringLength(); + while (lastslashpos > 0) { + if (baseuri.path_[lastslashpos - 1] == '/') break; + lastslashpos--; + } + std::memcpy(&resuri.path_[pos], baseuri.path_, lastslashpos * sizeof(Ch)); + pos += lastslashpos; + resuri.query_ = CopyPart(&resuri.path_[pos], path_, GetPathStringLength()); + resuri.RemoveDotSegments(); + } + // Use this query + resuri.frag_ = CopyPart(resuri.query_, query_, GetQueryStringLength()); + } + } + } + // Always use this frag + resuri.base_ = CopyPart(resuri.frag_, frag_, GetFragStringLength()); + + // Re-constitute base_ and uri_ + resuri.SetBase(); + resuri.uri_ = resuri.base_ + resuri.GetBaseStringLength() + 1; + resuri.SetUri(); + return resuri; + } + + //! Get the allocator of this GenericUri. + Allocator& GetAllocator() { return *allocator_; } + +private: + // Allocate memory for a URI + // Returns total amount allocated + std::size_t Allocate(std::size_t len) { + // Create own allocator if user did not supply. + if (!allocator_) + ownAllocator_ = allocator_ = RAPIDJSON_NEW(Allocator)(); + + // Allocate one block containing each part of the URI (5) plus base plus full URI, all null terminated. + // Order: scheme, auth, path, query, frag, base, uri + // Note need to set, increment, assign in 3 stages to avoid compiler warning bug. + size_t total = (3 * len + 7) * sizeof(Ch); + scheme_ = static_cast(allocator_->Malloc(total)); + *scheme_ = '\0'; + auth_ = scheme_; + auth_++; + *auth_ = '\0'; + path_ = auth_; + path_++; + *path_ = '\0'; + query_ = path_; + query_++; + *query_ = '\0'; + frag_ = query_; + frag_++; + *frag_ = '\0'; + base_ = frag_; + base_++; + *base_ = '\0'; + uri_ = base_; + uri_++; + *uri_ = '\0'; + return total; + } + + // Free memory for a URI + void Free() { + if (scheme_) { + Allocator::Free(scheme_); + scheme_ = 0; + } + } + + // Parse a URI into constituent scheme, authority, path, query, & fragment parts + // Supports URIs that match regex ^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))? as per + // https://tools.ietf.org/html/rfc3986 + void Parse(const Ch* uri, std::size_t len) { + std::size_t start = 0, pos1 = 0, pos2 = 0; + Allocate(len); + + // Look for scheme ([^:/?#]+):)? + if (start < len) { + while (pos1 < len) { + if (uri[pos1] == ':') break; + pos1++; + } + if (pos1 != len) { + while (pos2 < len) { + if (uri[pos2] == '/') break; + if (uri[pos2] == '?') break; + if (uri[pos2] == '#') break; + pos2++; + } + if (pos1 < pos2) { + pos1++; + std::memcpy(scheme_, &uri[start], pos1 * sizeof(Ch)); + scheme_[pos1] = '\0'; + start = pos1; + } + } + } + // Look for auth (//([^/?#]*))? + // Note need to set, increment, assign in 3 stages to avoid compiler warning bug. + auth_ = scheme_ + GetSchemeStringLength(); + auth_++; + *auth_ = '\0'; + if (start < len - 1 && uri[start] == '/' && uri[start + 1] == '/') { + pos2 = start + 2; + while (pos2 < len) { + if (uri[pos2] == '/') break; + if (uri[pos2] == '?') break; + if (uri[pos2] == '#') break; + pos2++; + } + std::memcpy(auth_, &uri[start], (pos2 - start) * sizeof(Ch)); + auth_[pos2 - start] = '\0'; + start = pos2; + } + // Look for path ([^?#]*) + // Note need to set, increment, assign in 3 stages to avoid compiler warning bug. + path_ = auth_ + GetAuthStringLength(); + path_++; + *path_ = '\0'; + if (start < len) { + pos2 = start; + while (pos2 < len) { + if (uri[pos2] == '?') break; + if (uri[pos2] == '#') break; + pos2++; + } + if (start != pos2) { + std::memcpy(path_, &uri[start], (pos2 - start) * sizeof(Ch)); + path_[pos2 - start] = '\0'; + if (path_[0] == '/') + RemoveDotSegments(); // absolute path - normalize + start = pos2; + } + } + // Look for query (\?([^#]*))? + // Note need to set, increment, assign in 3 stages to avoid compiler warning bug. + query_ = path_ + GetPathStringLength(); + query_++; + *query_ = '\0'; + if (start < len && uri[start] == '?') { + pos2 = start + 1; + while (pos2 < len) { + if (uri[pos2] == '#') break; + pos2++; + } + if (start != pos2) { + std::memcpy(query_, &uri[start], (pos2 - start) * sizeof(Ch)); + query_[pos2 - start] = '\0'; + start = pos2; + } + } + // Look for fragment (#(.*))? + // Note need to set, increment, assign in 3 stages to avoid compiler warning bug. + frag_ = query_ + GetQueryStringLength(); + frag_++; + *frag_ = '\0'; + if (start < len && uri[start] == '#') { + std::memcpy(frag_, &uri[start], (len - start) * sizeof(Ch)); + frag_[len - start] = '\0'; + } + + // Re-constitute base_ and uri_ + base_ = frag_ + GetFragStringLength() + 1; + SetBase(); + uri_ = base_ + GetBaseStringLength() + 1; + SetUri(); + } + + // Reconstitute base + void SetBase() { + Ch* next = base_; + std::memcpy(next, scheme_, GetSchemeStringLength() * sizeof(Ch)); + next+= GetSchemeStringLength(); + std::memcpy(next, auth_, GetAuthStringLength() * sizeof(Ch)); + next+= GetAuthStringLength(); + std::memcpy(next, path_, GetPathStringLength() * sizeof(Ch)); + next+= GetPathStringLength(); + std::memcpy(next, query_, GetQueryStringLength() * sizeof(Ch)); + next+= GetQueryStringLength(); + *next = '\0'; + } + + // Reconstitute uri + void SetUri() { + Ch* next = uri_; + std::memcpy(next, base_, GetBaseStringLength() * sizeof(Ch)); + next+= GetBaseStringLength(); + std::memcpy(next, frag_, GetFragStringLength() * sizeof(Ch)); + next+= GetFragStringLength(); + *next = '\0'; + } + + // Copy a part from one GenericUri to another + // Return the pointer to the next part to be copied to + Ch* CopyPart(Ch* to, Ch* from, std::size_t len) { + RAPIDJSON_ASSERT(to != 0); + RAPIDJSON_ASSERT(from != 0); + std::memcpy(to, from, len * sizeof(Ch)); + to[len] = '\0'; + Ch* next = to + len + 1; + return next; + } + + // Remove . and .. segments from the path_ member. + // https://tools.ietf.org/html/rfc3986 + // This is done in place as we are only removing segments. + void RemoveDotSegments() { + std::size_t pathlen = GetPathStringLength(); + std::size_t pathpos = 0; // Position in path_ + std::size_t newpos = 0; // Position in new path_ + + // Loop through each segment in original path_ + while (pathpos < pathlen) { + // Get next segment, bounded by '/' or end + size_t slashpos = 0; + while ((pathpos + slashpos) < pathlen) { + if (path_[pathpos + slashpos] == '/') break; + slashpos++; + } + // Check for .. and . segments + if (slashpos == 2 && path_[pathpos] == '.' && path_[pathpos + 1] == '.') { + // Backup a .. segment in the new path_ + // We expect to find a previously added slash at the end or nothing + RAPIDJSON_ASSERT(newpos == 0 || path_[newpos - 1] == '/'); + size_t lastslashpos = newpos; + // Make sure we don't go beyond the start segment + if (lastslashpos > 1) { + // Find the next to last slash and back up to it + lastslashpos--; + while (lastslashpos > 0) { + if (path_[lastslashpos - 1] == '/') break; + lastslashpos--; + } + // Set the new path_ position + newpos = lastslashpos; + } + } else if (slashpos == 1 && path_[pathpos] == '.') { + // Discard . segment, leaves new path_ unchanged + } else { + // Move any other kind of segment to the new path_ + RAPIDJSON_ASSERT(newpos <= pathpos); + std::memmove(&path_[newpos], &path_[pathpos], slashpos * sizeof(Ch)); + newpos += slashpos; + // Add slash if not at end + if ((pathpos + slashpos) < pathlen) { + path_[newpos] = '/'; + newpos++; + } + } + // Move to next segment + pathpos += slashpos + 1; + } + path_[newpos] = '\0'; + } + + Ch* uri_; // Everything + Ch* base_; // Everything except fragment + Ch* scheme_; // Includes the : + Ch* auth_; // Includes the // + Ch* path_; // Absolute if starts with / + Ch* query_; // Includes the ? + Ch* frag_; // Includes the # + + Allocator* allocator_; //!< The current allocator. It is either user-supplied or equal to ownAllocator_. + Allocator* ownAllocator_; //!< Allocator owned by this Uri. +}; + +//! GenericUri for Value (UTF-8, default allocator). +typedef GenericUri Uri; + +RAPIDJSON_NAMESPACE_END + +#if defined(__clang__) +RAPIDJSON_DIAG_POP +#endif + +#endif // RAPIDJSON_URI_H_ diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/writer.h b/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/writer.h new file mode 100644 index 0000000000..8b389219ab --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/writer.h @@ -0,0 +1,710 @@ +// Tencent is pleased to support the open source community by making RapidJSON available. +// +// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. +// +// Licensed under the MIT License (the "License"); you may not use this file except +// in compliance with the License. You may obtain a copy of the License at +// +// http://opensource.org/licenses/MIT +// +// Unless required by applicable law or agreed to in writing, software distributed +// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +// CONDITIONS OF ANY KIND, either express or implied. See the License for the +// specific language governing permissions and limitations under the License. + +#ifndef RAPIDJSON_WRITER_H_ +#define RAPIDJSON_WRITER_H_ + +#include "stream.h" +#include "internal/clzll.h" +#include "internal/meta.h" +#include "internal/stack.h" +#include "internal/strfunc.h" +#include "internal/dtoa.h" +#include "internal/itoa.h" +#include "stringbuffer.h" +#include // placement new + +#if defined(RAPIDJSON_SIMD) && defined(_MSC_VER) +#include +#pragma intrinsic(_BitScanForward) +#endif +#ifdef RAPIDJSON_SSE42 +#include +#elif defined(RAPIDJSON_SSE2) +#include +#elif defined(RAPIDJSON_NEON) +#include +#endif + +#ifdef __clang__ +RAPIDJSON_DIAG_PUSH +RAPIDJSON_DIAG_OFF(padded) +RAPIDJSON_DIAG_OFF(unreachable-code) +RAPIDJSON_DIAG_OFF(c++98-compat) +#elif defined(_MSC_VER) +RAPIDJSON_DIAG_PUSH +RAPIDJSON_DIAG_OFF(4127) // conditional expression is constant +#endif + +RAPIDJSON_NAMESPACE_BEGIN + +/////////////////////////////////////////////////////////////////////////////// +// WriteFlag + +/*! \def RAPIDJSON_WRITE_DEFAULT_FLAGS + \ingroup RAPIDJSON_CONFIG + \brief User-defined kWriteDefaultFlags definition. + + User can define this as any \c WriteFlag combinations. +*/ +#ifndef RAPIDJSON_WRITE_DEFAULT_FLAGS +#define RAPIDJSON_WRITE_DEFAULT_FLAGS kWriteNoFlags +#endif + +//! Combination of writeFlags +enum WriteFlag { + kWriteNoFlags = 0, //!< No flags are set. + kWriteValidateEncodingFlag = 1, //!< Validate encoding of JSON strings. + kWriteNanAndInfFlag = 2, //!< Allow writing of Infinity, -Infinity and NaN. + kWriteDefaultFlags = RAPIDJSON_WRITE_DEFAULT_FLAGS //!< Default write flags. Can be customized by defining RAPIDJSON_WRITE_DEFAULT_FLAGS +}; + +//! JSON writer +/*! Writer implements the concept Handler. + It generates JSON text by events to an output os. + + User may programmatically calls the functions of a writer to generate JSON text. + + On the other side, a writer can also be passed to objects that generates events, + + for example Reader::Parse() and Document::Accept(). + + \tparam OutputStream Type of output stream. + \tparam SourceEncoding Encoding of source string. + \tparam TargetEncoding Encoding of output stream. + \tparam StackAllocator Type of allocator for allocating memory of stack. + \note implements Handler concept +*/ +template, typename TargetEncoding = UTF8<>, typename StackAllocator = CrtAllocator, unsigned writeFlags = kWriteDefaultFlags> +class Writer { +public: + typedef typename SourceEncoding::Ch Ch; + + static const int kDefaultMaxDecimalPlaces = 324; + + //! Constructor + /*! \param os Output stream. + \param stackAllocator User supplied allocator. If it is null, it will create a private one. + \param levelDepth Initial capacity of stack. + */ + explicit + Writer(OutputStream& os, StackAllocator* stackAllocator = 0, size_t levelDepth = kDefaultLevelDepth) : + os_(&os), level_stack_(stackAllocator, levelDepth * sizeof(Level)), maxDecimalPlaces_(kDefaultMaxDecimalPlaces), hasRoot_(false) {} + + explicit + Writer(StackAllocator* allocator = 0, size_t levelDepth = kDefaultLevelDepth) : + os_(0), level_stack_(allocator, levelDepth * sizeof(Level)), maxDecimalPlaces_(kDefaultMaxDecimalPlaces), hasRoot_(false) {} + +#if RAPIDJSON_HAS_CXX11_RVALUE_REFS + Writer(Writer&& rhs) : + os_(rhs.os_), level_stack_(std::move(rhs.level_stack_)), maxDecimalPlaces_(rhs.maxDecimalPlaces_), hasRoot_(rhs.hasRoot_) { + rhs.os_ = 0; + } +#endif + + //! Reset the writer with a new stream. + /*! + This function reset the writer with a new stream and default settings, + in order to make a Writer object reusable for output multiple JSONs. + + \param os New output stream. + \code + Writer writer(os1); + writer.StartObject(); + // ... + writer.EndObject(); + + writer.Reset(os2); + writer.StartObject(); + // ... + writer.EndObject(); + \endcode + */ + void Reset(OutputStream& os) { + os_ = &os; + hasRoot_ = false; + level_stack_.Clear(); + } + + //! Checks whether the output is a complete JSON. + /*! + A complete JSON has a complete root object or array. + */ + bool IsComplete() const { + return hasRoot_ && level_stack_.Empty(); + } + + int GetMaxDecimalPlaces() const { + return maxDecimalPlaces_; + } + + //! Sets the maximum number of decimal places for double output. + /*! + This setting truncates the output with specified number of decimal places. + + For example, + + \code + writer.SetMaxDecimalPlaces(3); + writer.StartArray(); + writer.Double(0.12345); // "0.123" + writer.Double(0.0001); // "0.0" + writer.Double(1.234567890123456e30); // "1.234567890123456e30" (do not truncate significand for positive exponent) + writer.Double(1.23e-4); // "0.0" (do truncate significand for negative exponent) + writer.EndArray(); + \endcode + + The default setting does not truncate any decimal places. You can restore to this setting by calling + \code + writer.SetMaxDecimalPlaces(Writer::kDefaultMaxDecimalPlaces); + \endcode + */ + void SetMaxDecimalPlaces(int maxDecimalPlaces) { + maxDecimalPlaces_ = maxDecimalPlaces; + } + + /*!@name Implementation of Handler + \see Handler + */ + //@{ + + bool Null() { Prefix(kNullType); return EndValue(WriteNull()); } + bool Bool(bool b) { Prefix(b ? kTrueType : kFalseType); return EndValue(WriteBool(b)); } + bool Int(int i) { Prefix(kNumberType); return EndValue(WriteInt(i)); } + bool Uint(unsigned u) { Prefix(kNumberType); return EndValue(WriteUint(u)); } + bool Int64(int64_t i64) { Prefix(kNumberType); return EndValue(WriteInt64(i64)); } + bool Uint64(uint64_t u64) { Prefix(kNumberType); return EndValue(WriteUint64(u64)); } + + //! Writes the given \c double value to the stream + /*! + \param d The value to be written. + \return Whether it is succeed. + */ + bool Double(double d) { Prefix(kNumberType); return EndValue(WriteDouble(d)); } + + bool RawNumber(const Ch* str, SizeType length, bool copy = false) { + RAPIDJSON_ASSERT(str != 0); + (void)copy; + Prefix(kNumberType); + return EndValue(WriteString(str, length)); + } + + bool String(const Ch* str, SizeType length, bool copy = false) { + RAPIDJSON_ASSERT(str != 0); + (void)copy; + Prefix(kStringType); + return EndValue(WriteString(str, length)); + } + +#if RAPIDJSON_HAS_STDSTRING + bool String(const std::basic_string& str) { + return String(str.data(), SizeType(str.size())); + } +#endif + + bool StartObject() { + Prefix(kObjectType); + new (level_stack_.template Push()) Level(false); + return WriteStartObject(); + } + + bool Key(const Ch* str, SizeType length, bool copy = false) { return String(str, length, copy); } + +#if RAPIDJSON_HAS_STDSTRING + bool Key(const std::basic_string& str) + { + return Key(str.data(), SizeType(str.size())); + } +#endif + + bool EndObject(SizeType memberCount = 0) { + (void)memberCount; + RAPIDJSON_ASSERT(level_stack_.GetSize() >= sizeof(Level)); // not inside an Object + RAPIDJSON_ASSERT(!level_stack_.template Top()->inArray); // currently inside an Array, not Object + RAPIDJSON_ASSERT(0 == level_stack_.template Top()->valueCount % 2); // Object has a Key without a Value + level_stack_.template Pop(1); + return EndValue(WriteEndObject()); + } + + bool StartArray() { + Prefix(kArrayType); + new (level_stack_.template Push()) Level(true); + return WriteStartArray(); + } + + bool EndArray(SizeType elementCount = 0) { + (void)elementCount; + RAPIDJSON_ASSERT(level_stack_.GetSize() >= sizeof(Level)); + RAPIDJSON_ASSERT(level_stack_.template Top()->inArray); + level_stack_.template Pop(1); + return EndValue(WriteEndArray()); + } + //@} + + /*! @name Convenience extensions */ + //@{ + + //! Simpler but slower overload. + bool String(const Ch* const& str) { return String(str, internal::StrLen(str)); } + bool Key(const Ch* const& str) { return Key(str, internal::StrLen(str)); } + + //@} + + //! Write a raw JSON value. + /*! + For user to write a stringified JSON as a value. + + \param json A well-formed JSON value. It should not contain null character within [0, length - 1] range. + \param length Length of the json. + \param type Type of the root of json. + */ + bool RawValue(const Ch* json, size_t length, Type type) { + RAPIDJSON_ASSERT(json != 0); + Prefix(type); + return EndValue(WriteRawValue(json, length)); + } + + //! Flush the output stream. + /*! + Allows the user to flush the output stream immediately. + */ + void Flush() { + os_->Flush(); + } + + static const size_t kDefaultLevelDepth = 32; + +protected: + //! Information for each nested level + struct Level { + Level(bool inArray_) : valueCount(0), inArray(inArray_) {} + size_t valueCount; //!< number of values in this level + bool inArray; //!< true if in array, otherwise in object + }; + + bool WriteNull() { + PutReserve(*os_, 4); + PutUnsafe(*os_, 'n'); PutUnsafe(*os_, 'u'); PutUnsafe(*os_, 'l'); PutUnsafe(*os_, 'l'); return true; + } + + bool WriteBool(bool b) { + if (b) { + PutReserve(*os_, 4); + PutUnsafe(*os_, 't'); PutUnsafe(*os_, 'r'); PutUnsafe(*os_, 'u'); PutUnsafe(*os_, 'e'); + } + else { + PutReserve(*os_, 5); + PutUnsafe(*os_, 'f'); PutUnsafe(*os_, 'a'); PutUnsafe(*os_, 'l'); PutUnsafe(*os_, 's'); PutUnsafe(*os_, 'e'); + } + return true; + } + + bool WriteInt(int i) { + char buffer[11]; + const char* end = internal::i32toa(i, buffer); + PutReserve(*os_, static_cast(end - buffer)); + for (const char* p = buffer; p != end; ++p) + PutUnsafe(*os_, static_cast(*p)); + return true; + } + + bool WriteUint(unsigned u) { + char buffer[10]; + const char* end = internal::u32toa(u, buffer); + PutReserve(*os_, static_cast(end - buffer)); + for (const char* p = buffer; p != end; ++p) + PutUnsafe(*os_, static_cast(*p)); + return true; + } + + bool WriteInt64(int64_t i64) { + char buffer[21]; + const char* end = internal::i64toa(i64, buffer); + PutReserve(*os_, static_cast(end - buffer)); + for (const char* p = buffer; p != end; ++p) + PutUnsafe(*os_, static_cast(*p)); + return true; + } + + bool WriteUint64(uint64_t u64) { + char buffer[20]; + char* end = internal::u64toa(u64, buffer); + PutReserve(*os_, static_cast(end - buffer)); + for (char* p = buffer; p != end; ++p) + PutUnsafe(*os_, static_cast(*p)); + return true; + } + + bool WriteDouble(double d) { + if (internal::Double(d).IsNanOrInf()) { + if (!(writeFlags & kWriteNanAndInfFlag)) + return false; + if (internal::Double(d).IsNan()) { + PutReserve(*os_, 3); + PutUnsafe(*os_, 'N'); PutUnsafe(*os_, 'a'); PutUnsafe(*os_, 'N'); + return true; + } + if (internal::Double(d).Sign()) { + PutReserve(*os_, 9); + PutUnsafe(*os_, '-'); + } + else + PutReserve(*os_, 8); + PutUnsafe(*os_, 'I'); PutUnsafe(*os_, 'n'); PutUnsafe(*os_, 'f'); + PutUnsafe(*os_, 'i'); PutUnsafe(*os_, 'n'); PutUnsafe(*os_, 'i'); PutUnsafe(*os_, 't'); PutUnsafe(*os_, 'y'); + return true; + } + + char buffer[25]; + char* end = internal::dtoa(d, buffer, maxDecimalPlaces_); + PutReserve(*os_, static_cast(end - buffer)); + for (char* p = buffer; p != end; ++p) + PutUnsafe(*os_, static_cast(*p)); + return true; + } + + bool WriteString(const Ch* str, SizeType length) { + static const typename OutputStream::Ch hexDigits[16] = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' }; + static const char escape[256] = { +#define Z16 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + //0 1 2 3 4 5 6 7 8 9 A B C D E F + 'u', 'u', 'u', 'u', 'u', 'u', 'u', 'u', 'b', 't', 'n', 'u', 'f', 'r', 'u', 'u', // 00 + 'u', 'u', 'u', 'u', 'u', 'u', 'u', 'u', 'u', 'u', 'u', 'u', 'u', 'u', 'u', 'u', // 10 + 0, 0, '"', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 20 + Z16, Z16, // 30~4F + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,'\\', 0, 0, 0, // 50 + Z16, Z16, Z16, Z16, Z16, Z16, Z16, Z16, Z16, Z16 // 60~FF +#undef Z16 + }; + + if (TargetEncoding::supportUnicode) + PutReserve(*os_, 2 + length * 6); // "\uxxxx..." + else + PutReserve(*os_, 2 + length * 12); // "\uxxxx\uyyyy..." + + PutUnsafe(*os_, '\"'); + GenericStringStream is(str); + while (ScanWriteUnescapedString(is, length)) { + const Ch c = is.Peek(); + if (!TargetEncoding::supportUnicode && static_cast(c) >= 0x80) { + // Unicode escaping + unsigned codepoint; + if (RAPIDJSON_UNLIKELY(!SourceEncoding::Decode(is, &codepoint))) + return false; + PutUnsafe(*os_, '\\'); + PutUnsafe(*os_, 'u'); + if (codepoint <= 0xD7FF || (codepoint >= 0xE000 && codepoint <= 0xFFFF)) { + PutUnsafe(*os_, hexDigits[(codepoint >> 12) & 15]); + PutUnsafe(*os_, hexDigits[(codepoint >> 8) & 15]); + PutUnsafe(*os_, hexDigits[(codepoint >> 4) & 15]); + PutUnsafe(*os_, hexDigits[(codepoint ) & 15]); + } + else { + RAPIDJSON_ASSERT(codepoint >= 0x010000 && codepoint <= 0x10FFFF); + // Surrogate pair + unsigned s = codepoint - 0x010000; + unsigned lead = (s >> 10) + 0xD800; + unsigned trail = (s & 0x3FF) + 0xDC00; + PutUnsafe(*os_, hexDigits[(lead >> 12) & 15]); + PutUnsafe(*os_, hexDigits[(lead >> 8) & 15]); + PutUnsafe(*os_, hexDigits[(lead >> 4) & 15]); + PutUnsafe(*os_, hexDigits[(lead ) & 15]); + PutUnsafe(*os_, '\\'); + PutUnsafe(*os_, 'u'); + PutUnsafe(*os_, hexDigits[(trail >> 12) & 15]); + PutUnsafe(*os_, hexDigits[(trail >> 8) & 15]); + PutUnsafe(*os_, hexDigits[(trail >> 4) & 15]); + PutUnsafe(*os_, hexDigits[(trail ) & 15]); + } + } + else if ((sizeof(Ch) == 1 || static_cast(c) < 256) && RAPIDJSON_UNLIKELY(escape[static_cast(c)])) { + is.Take(); + PutUnsafe(*os_, '\\'); + PutUnsafe(*os_, static_cast(escape[static_cast(c)])); + if (escape[static_cast(c)] == 'u') { + PutUnsafe(*os_, '0'); + PutUnsafe(*os_, '0'); + PutUnsafe(*os_, hexDigits[static_cast(c) >> 4]); + PutUnsafe(*os_, hexDigits[static_cast(c) & 0xF]); + } + } + else if (RAPIDJSON_UNLIKELY(!(writeFlags & kWriteValidateEncodingFlag ? + Transcoder::Validate(is, *os_) : + Transcoder::TranscodeUnsafe(is, *os_)))) + return false; + } + PutUnsafe(*os_, '\"'); + return true; + } + + bool ScanWriteUnescapedString(GenericStringStream& is, size_t length) { + return RAPIDJSON_LIKELY(is.Tell() < length); + } + + bool WriteStartObject() { os_->Put('{'); return true; } + bool WriteEndObject() { os_->Put('}'); return true; } + bool WriteStartArray() { os_->Put('['); return true; } + bool WriteEndArray() { os_->Put(']'); return true; } + + bool WriteRawValue(const Ch* json, size_t length) { + PutReserve(*os_, length); + GenericStringStream is(json); + while (RAPIDJSON_LIKELY(is.Tell() < length)) { + RAPIDJSON_ASSERT(is.Peek() != '\0'); + if (RAPIDJSON_UNLIKELY(!(writeFlags & kWriteValidateEncodingFlag ? + Transcoder::Validate(is, *os_) : + Transcoder::TranscodeUnsafe(is, *os_)))) + return false; + } + return true; + } + + void Prefix(Type type) { + (void)type; + if (RAPIDJSON_LIKELY(level_stack_.GetSize() != 0)) { // this value is not at root + Level* level = level_stack_.template Top(); + if (level->valueCount > 0) { + if (level->inArray) + os_->Put(','); // add comma if it is not the first element in array + else // in object + os_->Put((level->valueCount % 2 == 0) ? ',' : ':'); + } + if (!level->inArray && level->valueCount % 2 == 0) + RAPIDJSON_ASSERT(type == kStringType); // if it's in object, then even number should be a name + level->valueCount++; + } + else { + RAPIDJSON_ASSERT(!hasRoot_); // Should only has one and only one root. + hasRoot_ = true; + } + } + + // Flush the value if it is the top level one. + bool EndValue(bool ret) { + if (RAPIDJSON_UNLIKELY(level_stack_.Empty())) // end of json text + Flush(); + return ret; + } + + OutputStream* os_; + internal::Stack level_stack_; + int maxDecimalPlaces_; + bool hasRoot_; + +private: + // Prohibit copy constructor & assignment operator. + Writer(const Writer&); + Writer& operator=(const Writer&); +}; + +// Full specialization for StringStream to prevent memory copying + +template<> +inline bool Writer::WriteInt(int i) { + char *buffer = os_->Push(11); + const char* end = internal::i32toa(i, buffer); + os_->Pop(static_cast(11 - (end - buffer))); + return true; +} + +template<> +inline bool Writer::WriteUint(unsigned u) { + char *buffer = os_->Push(10); + const char* end = internal::u32toa(u, buffer); + os_->Pop(static_cast(10 - (end - buffer))); + return true; +} + +template<> +inline bool Writer::WriteInt64(int64_t i64) { + char *buffer = os_->Push(21); + const char* end = internal::i64toa(i64, buffer); + os_->Pop(static_cast(21 - (end - buffer))); + return true; +} + +template<> +inline bool Writer::WriteUint64(uint64_t u) { + char *buffer = os_->Push(20); + const char* end = internal::u64toa(u, buffer); + os_->Pop(static_cast(20 - (end - buffer))); + return true; +} + +template<> +inline bool Writer::WriteDouble(double d) { + if (internal::Double(d).IsNanOrInf()) { + // Note: This code path can only be reached if (RAPIDJSON_WRITE_DEFAULT_FLAGS & kWriteNanAndInfFlag). + if (!(kWriteDefaultFlags & kWriteNanAndInfFlag)) + return false; + if (internal::Double(d).IsNan()) { + PutReserve(*os_, 3); + PutUnsafe(*os_, 'N'); PutUnsafe(*os_, 'a'); PutUnsafe(*os_, 'N'); + return true; + } + if (internal::Double(d).Sign()) { + PutReserve(*os_, 9); + PutUnsafe(*os_, '-'); + } + else + PutReserve(*os_, 8); + PutUnsafe(*os_, 'I'); PutUnsafe(*os_, 'n'); PutUnsafe(*os_, 'f'); + PutUnsafe(*os_, 'i'); PutUnsafe(*os_, 'n'); PutUnsafe(*os_, 'i'); PutUnsafe(*os_, 't'); PutUnsafe(*os_, 'y'); + return true; + } + + char *buffer = os_->Push(25); + char* end = internal::dtoa(d, buffer, maxDecimalPlaces_); + os_->Pop(static_cast(25 - (end - buffer))); + return true; +} + +#if defined(RAPIDJSON_SSE2) || defined(RAPIDJSON_SSE42) +template<> +inline bool Writer::ScanWriteUnescapedString(StringStream& is, size_t length) { + if (length < 16) + return RAPIDJSON_LIKELY(is.Tell() < length); + + if (!RAPIDJSON_LIKELY(is.Tell() < length)) + return false; + + const char* p = is.src_; + const char* end = is.head_ + length; + const char* nextAligned = reinterpret_cast((reinterpret_cast(p) + 15) & static_cast(~15)); + const char* endAligned = reinterpret_cast(reinterpret_cast(end) & static_cast(~15)); + if (nextAligned > end) + return true; + + while (p != nextAligned) + if (*p < 0x20 || *p == '\"' || *p == '\\') { + is.src_ = p; + return RAPIDJSON_LIKELY(is.Tell() < length); + } + else + os_->PutUnsafe(*p++); + + // The rest of string using SIMD + static const char dquote[16] = { '\"', '\"', '\"', '\"', '\"', '\"', '\"', '\"', '\"', '\"', '\"', '\"', '\"', '\"', '\"', '\"' }; + static const char bslash[16] = { '\\', '\\', '\\', '\\', '\\', '\\', '\\', '\\', '\\', '\\', '\\', '\\', '\\', '\\', '\\', '\\' }; + static const char space[16] = { 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F }; + const __m128i dq = _mm_loadu_si128(reinterpret_cast(&dquote[0])); + const __m128i bs = _mm_loadu_si128(reinterpret_cast(&bslash[0])); + const __m128i sp = _mm_loadu_si128(reinterpret_cast(&space[0])); + + for (; p != endAligned; p += 16) { + const __m128i s = _mm_load_si128(reinterpret_cast(p)); + const __m128i t1 = _mm_cmpeq_epi8(s, dq); + const __m128i t2 = _mm_cmpeq_epi8(s, bs); + const __m128i t3 = _mm_cmpeq_epi8(_mm_max_epu8(s, sp), sp); // s < 0x20 <=> max(s, 0x1F) == 0x1F + const __m128i x = _mm_or_si128(_mm_or_si128(t1, t2), t3); + unsigned short r = static_cast(_mm_movemask_epi8(x)); + if (RAPIDJSON_UNLIKELY(r != 0)) { // some of characters is escaped + SizeType len; +#ifdef _MSC_VER // Find the index of first escaped + unsigned long offset; + _BitScanForward(&offset, r); + len = offset; +#else + len = static_cast(__builtin_ffs(r) - 1); +#endif + char* q = reinterpret_cast(os_->PushUnsafe(len)); + for (size_t i = 0; i < len; i++) + q[i] = p[i]; + + p += len; + break; + } + _mm_storeu_si128(reinterpret_cast<__m128i *>(os_->PushUnsafe(16)), s); + } + + is.src_ = p; + return RAPIDJSON_LIKELY(is.Tell() < length); +} +#elif defined(RAPIDJSON_NEON) +template<> +inline bool Writer::ScanWriteUnescapedString(StringStream& is, size_t length) { + if (length < 16) + return RAPIDJSON_LIKELY(is.Tell() < length); + + if (!RAPIDJSON_LIKELY(is.Tell() < length)) + return false; + + const char* p = is.src_; + const char* end = is.head_ + length; + const char* nextAligned = reinterpret_cast((reinterpret_cast(p) + 15) & static_cast(~15)); + const char* endAligned = reinterpret_cast(reinterpret_cast(end) & static_cast(~15)); + if (nextAligned > end) + return true; + + while (p != nextAligned) + if (*p < 0x20 || *p == '\"' || *p == '\\') { + is.src_ = p; + return RAPIDJSON_LIKELY(is.Tell() < length); + } + else + os_->PutUnsafe(*p++); + + // The rest of string using SIMD + const uint8x16_t s0 = vmovq_n_u8('"'); + const uint8x16_t s1 = vmovq_n_u8('\\'); + const uint8x16_t s2 = vmovq_n_u8('\b'); + const uint8x16_t s3 = vmovq_n_u8(32); + + for (; p != endAligned; p += 16) { + const uint8x16_t s = vld1q_u8(reinterpret_cast(p)); + uint8x16_t x = vceqq_u8(s, s0); + x = vorrq_u8(x, vceqq_u8(s, s1)); + x = vorrq_u8(x, vceqq_u8(s, s2)); + x = vorrq_u8(x, vcltq_u8(s, s3)); + + x = vrev64q_u8(x); // Rev in 64 + uint64_t low = vgetq_lane_u64(vreinterpretq_u64_u8(x), 0); // extract + uint64_t high = vgetq_lane_u64(vreinterpretq_u64_u8(x), 1); // extract + + SizeType len = 0; + bool escaped = false; + if (low == 0) { + if (high != 0) { + uint32_t lz = internal::clzll(high); + len = 8 + (lz >> 3); + escaped = true; + } + } else { + uint32_t lz = internal::clzll(low); + len = lz >> 3; + escaped = true; + } + if (RAPIDJSON_UNLIKELY(escaped)) { // some of characters is escaped + char* q = reinterpret_cast(os_->PushUnsafe(len)); + for (size_t i = 0; i < len; i++) + q[i] = p[i]; + + p += len; + break; + } + vst1q_u8(reinterpret_cast(os_->PushUnsafe(16)), s); + } + + is.src_ = p; + return RAPIDJSON_LIKELY(is.Tell() < length); +} +#endif // RAPIDJSON_NEON + +RAPIDJSON_NAMESPACE_END + +#if defined(_MSC_VER) || defined(__clang__) +RAPIDJSON_DIAG_POP +#endif + +#endif // RAPIDJSON_RAPIDJSON_H_ diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/include_dirs.js b/graphics/asymptote/LspCpp/third_party/rapidjson/include_dirs.js new file mode 100644 index 0000000000..b373e85f5a --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/include_dirs.js @@ -0,0 +1,2 @@ +var path = require('path'); +console.log(path.join(path.relative('.', __dirname), 'include')); diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/library.json b/graphics/asymptote/LspCpp/third_party/rapidjson/library.json new file mode 100644 index 0000000000..2210fcd617 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/library.json @@ -0,0 +1,15 @@ +{ + "name": "RapidJSON", + "version": "1.1.0", + "keywords": "json, sax, dom, parser, generator", + "description": "A fast JSON parser/generator for C++ with both SAX/DOM style API", + "export": { + "include": "include" + }, + "examples": "example/*/*.cpp", + "repository": + { + "type": "git", + "url": "https://github.com/Tencent/rapidjson" + } +} diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/license.txt b/graphics/asymptote/LspCpp/third_party/rapidjson/license.txt new file mode 100644 index 0000000000..7ccc161c84 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/license.txt @@ -0,0 +1,57 @@ +Tencent is pleased to support the open source community by making RapidJSON available. + +Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights reserved. + +If you have downloaded a copy of the RapidJSON binary from Tencent, please note that the RapidJSON binary is licensed under the MIT License. +If you have downloaded a copy of the RapidJSON source code from Tencent, please note that RapidJSON source code is licensed under the MIT License, except for the third-party components listed below which are subject to different license terms. Your integration of RapidJSON into your own projects may require compliance with the MIT License, as well as the other licenses applicable to the third-party components included within RapidJSON. To avoid the problematic JSON license in your own projects, it's sufficient to exclude the bin/jsonchecker/ directory, as it's the only code under the JSON license. +A copy of the MIT License is included in this file. + +Other dependencies and licenses: + +Open Source Software Licensed Under the BSD License: +-------------------------------------------------------------------- + +The msinttypes r29 +Copyright (c) 2006-2013 Alexander Chemeris +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. +* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. +* Neither the name of copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Open Source Software Licensed Under the JSON License: +-------------------------------------------------------------------- + +json.org +Copyright (c) 2002 JSON.org +All Rights Reserved. + +JSON_checker +Copyright (c) 2002 JSON.org +All Rights Reserved. + + +Terms of the JSON License: +--------------------------------------------------- + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +The Software shall be used for Good, not Evil. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +Terms of the MIT License: +-------------------------------------------------------------------- + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/package.json b/graphics/asymptote/LspCpp/third_party/rapidjson/package.json new file mode 100644 index 0000000000..129581a633 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/package.json @@ -0,0 +1,24 @@ +{ + "name": "rapidjson", + "version": "1.0.4", + "description": "![](doc/logo/rapidjson.png)", + "main": "include_dirs.js", + "directories": { + "doc": "doc", + "example": "example", + "test": "test" + }, + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/Tencent/rapidjson.git" + }, + "author": "", + "license": "ISC", + "bugs": { + "url": "https://github.com/Tencent/rapidjson/issues" + }, + "homepage": "https://github.com/Tencent/rapidjson#readme" +} diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/rapidjson.autopkg b/graphics/asymptote/LspCpp/third_party/rapidjson/rapidjson.autopkg new file mode 100644 index 0000000000..fe72030a9a --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/rapidjson.autopkg @@ -0,0 +1,77 @@ +nuget { + //Usage: Write-NuGetPackage rapidjson.autopkg -defines:MYVERSION=1.1.0 + //Be sure you are running Powershell 3.0 and have the CoApp powershell extensions installed properly. + nuspec { + id = rapidjson; + version : ${MYVERSION}; + title: "rapidjson"; + authors: {"https://github.com/Tencent/rapidjson/releases/tag/v1.1.0"}; + owners: {"@lsantos (github)"}; + licenseUrl: "https://github.com/Tencent/rapidjson/blob/master/license.txt"; + projectUrl: "https://github.com/Tencent/rapidjson/"; + iconUrl: "https://cdn1.iconfinder.com/data/icons/fatcow/32x32/json.png"; + requireLicenseAcceptance:false; + summary: @"A fast JSON parser/generator for C++ with both SAX/DOM style API"; + + // if you need to span several lines you can prefix a string with an @ symbol (exactly like c# does). + description: @"Rapidjson is an attempt to create the fastest JSON parser and generator. + + - Small but complete. Supports both SAX and DOM style API. SAX parser only a few hundred lines of code. + - Fast. In the order of magnitude of strlen(). Optionally supports SSE2/SSE4.2 for acceleration. + - Self-contained. Minimal dependency on standard libraries. No BOOST, not even STL. + - Compact. Each JSON value is 16 or 20 bytes for 32 or 64-bit machines respectively (excluding text string storage). With the custom memory allocator, parser allocates memory compactly during parsing. + - Full RFC4627 compliance. Supports UTF-8, UTF-16 and UTF-32. + - Support both in-situ parsing (directly decode strings into the source JSON text) and non-destructive parsing (decode strings into new buffers). + - Parse number to int/unsigned/int64_t/uint64_t/double depending on input + - Support custom memory allocation. Also, the default memory pool allocator can also be supplied with a user buffer (such as a buffer allocated on user's heap or - programme stack) to minimize allocation. + + As the name implies, rapidjson is inspired by rapidxml."; + + releaseNotes: @" +Added + Add Value::XXXMember(...) overloads for std::string (#335) + +Fixed + Include rapidjson.h for all internal/error headers. + Parsing some numbers incorrectly in full-precision mode (kFullPrecisionParseFlag) (#342) + Fix alignment of 64bit platforms (#328) + Fix MemoryPoolAllocator::Clear() to clear user-buffer (0691502) + +Changed + CMakeLists for include as a thirdparty in projects (#334, #337) + Change Document::ParseStream() to use stack allocator for Reader (ffbe386)"; + + copyright: "Copyright 2015"; + tags: { native, coapp, JSON, nativepackage }; + language: en-US; + }; + + dependencies { + packages : { + //TODO: Add dependencies here in [pkg.name]/[version] form per newline + //zlib/[1.2.8], + }; + } + + // the files that go into the content folders + files { + #defines { + SDK_ROOT = .\; + } + + // grab all the files in the include folder + // the folder that contains all the .h files will + // automatically get added to the Includes path. + nestedinclude += { + #destination = ${d_include}rapidjson; + "${SDK_ROOT}include\rapidjson\**\*.h" + }; + }; + + targets { + // We're trying to be standard about these sorts of thing. (Will help with config.h later :D) + //Defines += HAS_EQCORE; + // Fix creating the package with Raggles' fork of CoApp + Includes += "$(MSBuildThisFileDirectory)../..${d_include}"; + }; +} \ No newline at end of file diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/readme.md b/graphics/asymptote/LspCpp/third_party/rapidjson/readme.md new file mode 100644 index 0000000000..ac683b0514 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/readme.md @@ -0,0 +1,210 @@ +![RapidJSON logo](doc/logo/rapidjson.png) + +![Release version](https://img.shields.io/badge/release-v1.1.0-blue.svg) + +## A fast JSON parser/generator for C++ with both SAX/DOM style API + +Tencent is pleased to support the open source community by making RapidJSON available. + +Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. + +* [RapidJSON GitHub](https://github.com/Tencent/rapidjson/) +* RapidJSON Documentation + * [English](http://rapidjson.org/) + * [简体中文](http://rapidjson.org/zh-cn/) + * [GitBook](https://www.gitbook.com/book/miloyip/rapidjson/) with downloadable PDF/EPUB/MOBI, without API reference. + +## Build status + +| [Linux][lin-link] | [Windows][win-link] | [Coveralls][cov-link] | +| :---------------: | :-----------------: | :-------------------: | +| ![lin-badge] | ![win-badge] | ![cov-badge] | + +[lin-badge]: https://travis-ci.org/Tencent/rapidjson.svg?branch=master "Travis build status" +[lin-link]: https://travis-ci.org/Tencent/rapidjson "Travis build status" +[win-badge]: https://ci.appveyor.com/api/projects/status/l6qulgqahcayidrf/branch/master?svg=true "AppVeyor build status" +[win-link]: https://ci.appveyor.com/project/miloyip/rapidjson-0fdqj/branch/master "AppVeyor build status" +[cov-badge]: https://coveralls.io/repos/Tencent/rapidjson/badge.svg?branch=master "Coveralls coverage" +[cov-link]: https://coveralls.io/r/Tencent/rapidjson?branch=master "Coveralls coverage" + +## Introduction + +RapidJSON is a JSON parser and generator for C++. It was inspired by [RapidXml](http://rapidxml.sourceforge.net/). + +* RapidJSON is **small** but **complete**. It supports both SAX and DOM style API. The SAX parser is only a half thousand lines of code. + +* RapidJSON is **fast**. Its performance can be comparable to `strlen()`. It also optionally supports SSE2/SSE4.2 for acceleration. + +* RapidJSON is **self-contained** and **header-only**. It does not depend on external libraries such as BOOST. It even does not depend on STL. + +* RapidJSON is **memory-friendly**. Each JSON value occupies exactly 16 bytes for most 32/64-bit machines (excluding text string). By default it uses a fast memory allocator, and the parser allocates memory compactly during parsing. + +* RapidJSON is **Unicode-friendly**. It supports UTF-8, UTF-16, UTF-32 (LE & BE), and their detection, validation and transcoding internally. For example, you can read a UTF-8 file and let RapidJSON transcode the JSON strings into UTF-16 in the DOM. It also supports surrogates and "\u0000" (null character). + +More features can be read [here](doc/features.md). + +JSON(JavaScript Object Notation) is a light-weight data exchange format. RapidJSON should be in full compliance with RFC7159/ECMA-404, with optional support of relaxed syntax. More information about JSON can be obtained at +* [Introducing JSON](http://json.org/) +* [RFC7159: The JavaScript Object Notation (JSON) Data Interchange Format](https://tools.ietf.org/html/rfc7159) +* [Standard ECMA-404: The JSON Data Interchange Format](https://www.ecma-international.org/publications/standards/Ecma-404.htm) + +## Highlights in v1.1 (2016-8-25) + +* Added [JSON Pointer](doc/pointer.md) +* Added [JSON Schema](doc/schema.md) +* Added [relaxed JSON syntax](doc/dom.md) (comment, trailing comma, NaN/Infinity) +* Iterating array/object with [C++11 Range-based for loop](doc/tutorial.md) +* Reduce memory overhead of each `Value` from 24 bytes to 16 bytes in x86-64 architecture. + +For other changes please refer to [change log](CHANGELOG.md). + +## Compatibility + +RapidJSON is cross-platform. Some platform/compiler combinations which have been tested are shown as follows. +* Visual C++ 2008/2010/2013 on Windows (32/64-bit) +* GNU C++ 3.8.x on Cygwin +* Clang 3.4 on Mac OS X (32/64-bit) and iOS +* Clang 3.4 on Android NDK + +Users can build and run the unit tests on their platform/compiler. + +## Installation + +RapidJSON is a header-only C++ library. Just copy the `include/rapidjson` folder to system or project's include path. + +Alternatively, if you are using the [vcpkg](https://github.com/Microsoft/vcpkg/) dependency manager you can download and install rapidjson with CMake integration in a single command: +* vcpkg install rapidjson + +RapidJSON uses following software as its dependencies: +* [CMake](https://cmake.org/) as a general build tool +* (optional) [Doxygen](http://www.doxygen.org) to build documentation +* (optional) [googletest](https://github.com/google/googletest) for unit and performance testing + +To generate user documentation and run tests please proceed with the steps below: + +1. Execute `git submodule update --init` to get the files of thirdparty submodules (google test). +2. Create directory called `build` in rapidjson source directory. +3. Change to `build` directory and run `cmake ..` command to configure your build. Windows users can do the same with cmake-gui application. +4. On Windows, build the solution found in the build directory. On Linux, run `make` from the build directory. + +On successful build you will find compiled test and example binaries in `bin` +directory. The generated documentation will be available in `doc/html` +directory of the build tree. To run tests after finished build please run `make +test` or `ctest` from your build tree. You can get detailed output using `ctest +-V` command. + +It is possible to install library system-wide by running `make install` command +from the build tree with administrative privileges. This will install all files +according to system preferences. Once RapidJSON is installed, it is possible +to use it from other CMake projects by adding `find_package(RapidJSON)` line to +your CMakeLists.txt. + +## Usage at a glance + +This simple example parses a JSON string into a document (DOM), make a simple modification of the DOM, and finally stringify the DOM to a JSON string. + +~~~~~~~~~~cpp +// rapidjson/example/simpledom/simpledom.cpp` +#include "rapidjson/document.h" +#include "rapidjson/writer.h" +#include "rapidjson/stringbuffer.h" +#include + +using namespace rapidjson; + +int main() { + // 1. Parse a JSON string into DOM. + const char* json = "{\"project\":\"rapidjson\",\"stars\":10}"; + Document d; + d.Parse(json); + + // 2. Modify it by DOM. + Value& s = d["stars"]; + s.SetInt(s.GetInt() + 1); + + // 3. Stringify the DOM + StringBuffer buffer; + Writer writer(buffer); + d.Accept(writer); + + // Output {"project":"rapidjson","stars":11} + std::cout << buffer.GetString() << std::endl; + return 0; +} +~~~~~~~~~~ + +Note that this example did not handle potential errors. + +The following diagram shows the process. + +![simpledom](doc/diagram/simpledom.png) + +More [examples](https://github.com/Tencent/rapidjson/tree/master/example) are available: + +* DOM API + * [tutorial](https://github.com/Tencent/rapidjson/blob/master/example/tutorial/tutorial.cpp): Basic usage of DOM API. + +* SAX API + * [simplereader](https://github.com/Tencent/rapidjson/blob/master/example/simplereader/simplereader.cpp): Dumps all SAX events while parsing a JSON by `Reader`. + * [condense](https://github.com/Tencent/rapidjson/blob/master/example/condense/condense.cpp): A command line tool to rewrite a JSON, with all whitespaces removed. + * [pretty](https://github.com/Tencent/rapidjson/blob/master/example/pretty/pretty.cpp): A command line tool to rewrite a JSON with indents and newlines by `PrettyWriter`. + * [capitalize](https://github.com/Tencent/rapidjson/blob/master/example/capitalize/capitalize.cpp): A command line tool to capitalize strings in JSON. + * [messagereader](https://github.com/Tencent/rapidjson/blob/master/example/messagereader/messagereader.cpp): Parse a JSON message with SAX API. + * [serialize](https://github.com/Tencent/rapidjson/blob/master/example/serialize/serialize.cpp): Serialize a C++ object into JSON with SAX API. + * [jsonx](https://github.com/Tencent/rapidjson/blob/master/example/jsonx/jsonx.cpp): Implements a `JsonxWriter` which stringify SAX events into [JSONx](https://www-01.ibm.com/support/knowledgecenter/SS9H2Y_7.1.0/com.ibm.dp.doc/json_jsonx.html) (a kind of XML) format. The example is a command line tool which converts input JSON into JSONx format. + +* Schema + * [schemavalidator](https://github.com/Tencent/rapidjson/blob/master/example/schemavalidator/schemavalidator.cpp) : A command line tool to validate a JSON with a JSON schema. + +* Advanced + * [prettyauto](https://github.com/Tencent/rapidjson/blob/master/example/prettyauto/prettyauto.cpp): A modified version of [pretty](https://github.com/Tencent/rapidjson/blob/master/example/pretty/pretty.cpp) to automatically handle JSON with any UTF encodings. + * [parsebyparts](https://github.com/Tencent/rapidjson/blob/master/example/parsebyparts/parsebyparts.cpp): Implements an `AsyncDocumentParser` which can parse JSON in parts, using C++11 thread. + * [filterkey](https://github.com/Tencent/rapidjson/blob/master/example/filterkey/filterkey.cpp): A command line tool to remove all values with user-specified key. + * [filterkeydom](https://github.com/Tencent/rapidjson/blob/master/example/filterkeydom/filterkeydom.cpp): Same tool as above, but it demonstrates how to use a generator to populate a `Document`. + +## Contributing + +RapidJSON welcomes contributions. When contributing, please follow the code below. + +### Issues + +Feel free to submit issues and enhancement requests. + +Please help us by providing **minimal reproducible examples**, because source code is easier to let other people understand what happens. +For crash problems on certain platforms, please bring stack dump content with the detail of the OS, compiler, etc. + +Please try breakpoint debugging first, tell us what you found, see if we can start exploring based on more information been prepared. + +### Workflow + +In general, we follow the "fork-and-pull" Git workflow. + + 1. **Fork** the repo on GitHub + 2. **Clone** the project to your own machine + 3. **Checkout** a new branch on your fork, start developing on the branch + 4. **Test** the change before commit, Make sure the changes pass all the tests, including `unittest` and `preftest`, please add test case for each new feature or bug-fix if needed. + 5. **Commit** changes to your own branch + 6. **Push** your work back up to your fork + 7. Submit a **Pull request** so that we can review your changes + +NOTE: Be sure to merge the latest from "upstream" before making a pull request! + +### Copyright and Licensing + +You can copy and paste the license summary from below. + +``` +Tencent is pleased to support the open source community by making RapidJSON available. + +Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. + +Licensed under the MIT License (the "License"); you may not use this file except +in compliance with the License. You may obtain a copy of the License at + +http://opensource.org/licenses/MIT + +Unless required by applicable law or agreed to in writing, software distributed +under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +CONDITIONS OF ANY KIND, either express or implied. See the License for the +specific language governing permissions and limitations under the License. +``` diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/readme.zh-cn.md b/graphics/asymptote/LspCpp/third_party/rapidjson/readme.zh-cn.md new file mode 100644 index 0000000000..216802e1b3 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/readme.zh-cn.md @@ -0,0 +1,152 @@ +![RapidJSON logo](doc/logo/rapidjson.png) + +![Release version](https://img.shields.io/badge/release-v1.1.0-blue.svg) + +## 高效的 C++ JSON 解析/生成器,提供 SAX 及 DOM 风格 API + +Tencent is pleased to support the open source community by making RapidJSON available. + +Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. + +* [RapidJSON GitHub](https://github.com/Tencent/rapidjson/) +* RapidJSON 文档 + * [English](http://rapidjson.org/) + * [简体中文](http://rapidjson.org/zh-cn/) + * [GitBook](https://www.gitbook.com/book/miloyip/rapidjson/details/zh-cn) 可下载 PDF/EPUB/MOBI,但不含 API 参考手册。 + +## Build 状态 + +| [Linux][lin-link] | [Windows][win-link] | [Coveralls][cov-link] | +| :---------------: | :-----------------: | :-------------------: | +| ![lin-badge] | ![win-badge] | ![cov-badge] | + +[lin-badge]: https://travis-ci.org/Tencent/rapidjson.svg?branch=master "Travis build status" +[lin-link]: https://travis-ci.org/Tencent/rapidjson "Travis build status" +[win-badge]: https://ci.appveyor.com/api/projects/status/l6qulgqahcayidrf/branch/master?svg=true "AppVeyor build status" +[win-link]: https://ci.appveyor.com/project/miloyip/rapidjson-0fdqj/branch/master "AppVeyor build status" +[cov-badge]: https://coveralls.io/repos/Tencent/rapidjson/badge.svg?branch=master "Coveralls coverage" +[cov-link]: https://coveralls.io/r/Tencent/rapidjson?branch=master "Coveralls coverage" + +## 简介 + +RapidJSON 是一个 C++ 的 JSON 解析器及生成器。它的灵感来自 [RapidXml](http://rapidxml.sourceforge.net/)。 + +* RapidJSON 小而全。它同时支持 SAX 和 DOM 风格的 API。SAX 解析器只有约 500 行代码。 + +* RapidJSON 快。它的性能可与 `strlen()` 相比。可支持 SSE2/SSE4.2 加速。 + +* RapidJSON 独立。它不依赖于 BOOST 等外部库。它甚至不依赖于 STL。 + +* RapidJSON 对内存友好。在大部分 32/64 位机器上,每个 JSON 值只占 16 字节(除字符串外)。它预设使用一个快速的内存分配器,令分析器可以紧凑地分配内存。 + +* RapidJSON 对 Unicode 友好。它支持 UTF-8、UTF-16、UTF-32 (大端序/小端序),并内部支持这些编码的检测、校验及转码。例如,RapidJSON 可以在分析一个 UTF-8 文件至 DOM 时,把当中的 JSON 字符串转码至 UTF-16。它也支持代理对(surrogate pair)及 `"\u0000"`(空字符)。 + +在 [这里](doc/features.zh-cn.md) 可读取更多特点。 + +JSON(JavaScript Object Notation)是一个轻量的数据交换格式。RapidJSON 应该完全遵从 RFC7159/ECMA-404,并支持可选的放宽语法。 关于 JSON 的更多信息可参考: +* [Introducing JSON](http://json.org/) +* [RFC7159: The JavaScript Object Notation (JSON) Data Interchange Format](https://tools.ietf.org/html/rfc7159) +* [Standard ECMA-404: The JSON Data Interchange Format](https://www.ecma-international.org/publications/standards/Ecma-404.htm) + +## v1.1 中的亮点 (2016-8-25) + +* 加入 [JSON Pointer](doc/pointer.zh-cn.md) 功能,可更简单地访问及更改 DOM。 +* 加入 [JSON Schema](doc/schema.zh-cn.md) 功能,可在解析或生成 JSON 时进行校验。 +* 加入 [放宽的 JSON 语法](doc/dom.zh-cn.md) (注释、尾随逗号、NaN/Infinity) +* 使用 [C++11 范围 for 循环](doc/tutorial.zh-cn.md) 去遍历 array 和 object。 +* 在 x86-64 架构下,缩减每个 `Value` 的内存开销从 24 字节至 16 字节。 + +其他改动请参考 [change log](CHANGELOG.md). + +## 兼容性 + +RapidJSON 是跨平台的。以下是一些曾测试的平台/编译器组合: +* Visual C++ 2008/2010/2013 在 Windows (32/64-bit) +* GNU C++ 3.8.x 在 Cygwin +* Clang 3.4 在 Mac OS X (32/64-bit) 及 iOS +* Clang 3.4 在 Android NDK + +用户也可以在他们的平台上生成及执行单元测试。 + +## 安装 + +RapidJSON 是只有头文件的 C++ 库。只需把 `include/rapidjson` 目录复制至系统或项目的 include 目录中。 + +RapidJSON 依赖于以下软件: +* [CMake](https://cmake.org/) 作为通用生成工具 +* (optional) [Doxygen](http://www.doxygen.org) 用于生成文档 +* (optional) [googletest](https://github.com/google/googletest) 用于单元及性能测试 + +生成测试及例子的步骤: + +1. 执行 `git submodule update --init` 去获取 thirdparty submodules (google test)。 +2. 在 rapidjson 目录下,建立一个 `build` 目录。 +3. 在 `build` 目录下执行 `cmake ..` 命令以设置生成。Windows 用户可使用 cmake-gui 应用程序。 +4. 在 Windows 下,编译生成在 build 目录中的 solution。在 Linux 下,于 build 目录运行 `make`。 + +成功生成后,你会在 `bin` 的目录下找到编译后的测试及例子可执行文件。而生成的文档将位于 build 下的 `doc/html` 目录。要执行测试,请在 build 下执行 `make test` 或 `ctest`。使用 `ctest -V` 命令可获取详细的输出。 + +我们也可以把程序库安装至全系统中,只要在具管理权限下从 build 目录执行 `make install` 命令。这样会按系统的偏好设置安装所有文件。当安装 RapidJSON 后,其他的 CMake 项目需要使用它时,可以通过在 `CMakeLists.txt` 加入一句 `find_package(RapidJSON)`。 + +## 用法一览 + +此简单例子解析一个 JSON 字符串至一个 document (DOM),对 DOM 作出简单修改,最终把 DOM 转换(stringify)至 JSON 字符串。 + +~~~~~~~~~~cpp +// rapidjson/example/simpledom/simpledom.cpp` +#include "rapidjson/document.h" +#include "rapidjson/writer.h" +#include "rapidjson/stringbuffer.h" +#include + +using namespace rapidjson; + +int main() { + // 1. 把 JSON 解析至 DOM。 + const char* json = "{\"project\":\"rapidjson\",\"stars\":10}"; + Document d; + d.Parse(json); + + // 2. 利用 DOM 作出修改。 + Value& s = d["stars"]; + s.SetInt(s.GetInt() + 1); + + // 3. 把 DOM 转换(stringify)成 JSON。 + StringBuffer buffer; + Writer writer(buffer); + d.Accept(writer); + + // Output {"project":"rapidjson","stars":11} + std::cout << buffer.GetString() << std::endl; + return 0; +} +~~~~~~~~~~ + +注意此例子并没有处理潜在错误。 + +下图展示执行过程。 + +![simpledom](doc/diagram/simpledom.png) + +还有许多 [例子](https://github.com/Tencent/rapidjson/tree/master/example) 可供参考: + +* DOM API + * [tutorial](https://github.com/Tencent/rapidjson/blob/master/example/tutorial/tutorial.cpp): DOM API 的基本使用方法。 + +* SAX API + * [simplereader](https://github.com/Tencent/rapidjson/blob/master/example/simplereader/simplereader.cpp): 使用 `Reader` 解析 JSON 时,打印所有 SAX 事件。 + * [condense](https://github.com/Tencent/rapidjson/blob/master/example/condense/condense.cpp): 移除 JSON 中所有空白符的命令行工具。 + * [pretty](https://github.com/Tencent/rapidjson/blob/master/example/pretty/pretty.cpp): 为 JSON 加入缩进与换行的命令行工具,当中使用了 `PrettyWriter`。 + * [capitalize](https://github.com/Tencent/rapidjson/blob/master/example/capitalize/capitalize.cpp): 把 JSON 中所有字符串改为大写的命令行工具。 + * [messagereader](https://github.com/Tencent/rapidjson/blob/master/example/messagereader/messagereader.cpp): 使用 SAX API 去解析一个 JSON 报文。 + * [serialize](https://github.com/Tencent/rapidjson/blob/master/example/serialize/serialize.cpp): 使用 SAX API 去序列化 C++ 对象,生成 JSON。 + * [jsonx](https://github.com/Tencent/rapidjson/blob/master/example/jsonx/jsonx.cpp): 实现了一个 `JsonxWriter`,它能把 SAX 事件写成 [JSONx](https://www-01.ibm.com/support/knowledgecenter/SS9H2Y_7.1.0/com.ibm.dp.doc/json_jsonx.html)(一种 XML)格式。这个例子是把 JSON 输入转换成 JSONx 格式的命令行工具。 + +* Schema API + * [schemavalidator](https://github.com/Tencent/rapidjson/blob/master/example/schemavalidator/schemavalidator.cpp): 使用 JSON Schema 去校验 JSON 的命令行工具。 + +* 进阶 + * [prettyauto](https://github.com/Tencent/rapidjson/blob/master/example/prettyauto/prettyauto.cpp): [pretty](https://github.com/Tencent/rapidjson/blob/master/example/pretty/pretty.cpp) 的修改版本,可自动处理任何 UTF 编码的 JSON。 + * [parsebyparts](https://github.com/Tencent/rapidjson/blob/master/example/parsebyparts/parsebyparts.cpp): 这例子中的 `AsyncDocumentParser` 类使用 C++ 线程来逐段解析 JSON。 + * [filterkey](https://github.com/Tencent/rapidjson/blob/master/example/filterkey/filterkey.cpp): 移取使用者指定的键值的命令行工具。 + * [filterkeydom](https://github.com/Tencent/rapidjson/blob/master/example/filterkey/filterkey.cpp): 如上的工具,但展示如何使用生成器(generator)去填充一个 `Document`。 diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/test/CMakeLists.txt b/graphics/asymptote/LspCpp/third_party/rapidjson/test/CMakeLists.txt new file mode 100644 index 0000000000..11c1b04c7d --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/test/CMakeLists.txt @@ -0,0 +1,20 @@ +find_package(GTestSrc) + +IF(GTESTSRC_FOUND) + enable_testing() + + if (WIN32 AND (NOT CYGWIN) AND (NOT MINGW)) + set(gtest_disable_pthreads ON) + set(gtest_force_shared_crt ON) + endif() + + add_subdirectory(${GTEST_SOURCE_DIR} ${CMAKE_BINARY_DIR}/googletest) + include_directories(SYSTEM ${GTEST_INCLUDE_DIR}) + + set(TEST_LIBRARIES gtest gtest_main) + + add_custom_target(tests ALL) + add_subdirectory(perftest) + add_subdirectory(unittest) + +ENDIF(GTESTSRC_FOUND) diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/test/perftest/CMakeLists.txt b/graphics/asymptote/LspCpp/third_party/rapidjson/test/perftest/CMakeLists.txt new file mode 100644 index 0000000000..035e544d91 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/test/perftest/CMakeLists.txt @@ -0,0 +1,28 @@ +set(PERFTEST_SOURCES + misctest.cpp + perftest.cpp + platformtest.cpp + rapidjsontest.cpp + schematest.cpp) + +add_executable(perftest ${PERFTEST_SOURCES}) +target_link_libraries(perftest ${TEST_LIBRARIES}) + +add_dependencies(tests perftest) + +find_program(CCACHE_FOUND ccache) +if(CCACHE_FOUND) + set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache) + set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ccache) + if (CMAKE_CXX_COMPILER_ID MATCHES "Clang") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Qunused-arguments -fcolor-diagnostics") + endif() +endif(CCACHE_FOUND) + +set_property(DIRECTORY PROPERTY COMPILE_OPTIONS ${EXTRA_CXX_FLAGS}) + +IF(NOT (CMAKE_BUILD_TYPE STREQUAL "Debug")) +add_test(NAME perftest + COMMAND ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/perftest + WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/bin) +ENDIF() diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/test/perftest/misctest.cpp b/graphics/asymptote/LspCpp/third_party/rapidjson/test/perftest/misctest.cpp new file mode 100644 index 0000000000..f43b050181 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/test/perftest/misctest.cpp @@ -0,0 +1,974 @@ +// Tencent is pleased to support the open source community by making RapidJSON available. +// +// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. +// +// Licensed under the MIT License (the "License"); you may not use this file except +// in compliance with the License. You may obtain a copy of the License at +// +// http://opensource.org/licenses/MIT +// +// Unless required by applicable law or agreed to in writing, software distributed +// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +// CONDITIONS OF ANY KIND, either express or implied. See the License for the +// specific language governing permissions and limitations under the License. + +#include "perftest.h" + +#if TEST_MISC + +#define __STDC_FORMAT_MACROS +#include "rapidjson/stringbuffer.h" + +#define protected public +#include "rapidjson/writer.h" +#undef private + +class Misc : public PerfTest { +}; + +// Copyright (c) 2008-2010 Bjoern Hoehrmann +// See http://bjoern.hoehrmann.de/utf-8/decoder/dfa/ for details. + +#define UTF8_ACCEPT 0 +#define UTF8_REJECT 12 + +static const unsigned char utf8d[] = { + // The first part of the table maps bytes to character classes that + // to reduce the size of the transition table and create bitmasks. + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2, 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, + 10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3, 11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8, + + // The second part is a transition table that maps a combination + // of a state of the automaton and a character class to a state. + 0,12,24,36,60,96,84,12,12,12,48,72, 12,12,12,12,12,12,12,12,12,12,12,12, + 12, 0,12,12,12,12,12, 0,12, 0,12,12, 12,24,12,12,12,12,12,24,12,24,12,12, + 12,12,12,12,12,12,12,24,12,12,12,12, 12,24,12,12,12,12,12,12,12,24,12,12, + 12,12,12,12,12,12,12,36,12,36,12,12, 12,36,12,12,12,12,12,36,12,36,12,12, + 12,36,12,12,12,12,12,12,12,12,12,12, +}; + +static unsigned inline decode(unsigned* state, unsigned* codep, unsigned byte) { + unsigned type = utf8d[byte]; + + *codep = (*state != UTF8_ACCEPT) ? + (byte & 0x3fu) | (*codep << 6) : + (0xff >> type) & (byte); + + *state = utf8d[256 + *state + type]; + return *state; +} + +static bool IsUTF8(unsigned char* s) { + unsigned codepoint, state = 0; + + while (*s) + decode(&state, &codepoint, *s++); + + return state == UTF8_ACCEPT; +} + +TEST_F(Misc, Hoehrmann_IsUTF8) { + for (size_t i = 0; i < kTrialCount; i++) { + EXPECT_TRUE(IsUTF8((unsigned char*)json_)); + } +} + +//////////////////////////////////////////////////////////////////////////////// +// CountDecimalDigit: Count number of decimal places + +inline unsigned CountDecimalDigit_naive(unsigned n) { + unsigned count = 1; + while (n >= 10) { + n /= 10; + count++; + } + return count; +} + +inline unsigned CountDecimalDigit_enroll4(unsigned n) { + unsigned count = 1; + while (n >= 10000) { + n /= 10000u; + count += 4; + } + if (n < 10) return count; + if (n < 100) return count + 1; + if (n < 1000) return count + 2; + return count + 3; +} + +inline unsigned CountDecimalDigit64_enroll4(uint64_t n) { + unsigned count = 1; + while (n >= 10000) { + n /= 10000u; + count += 4; + } + if (n < 10) return count; + if (n < 100) return count + 1; + if (n < 1000) return count + 2; + return count + 3; +} + +inline unsigned CountDecimalDigit_fast(unsigned n) { + static const uint32_t powers_of_10[] = { + 0, + 10, + 100, + 1000, + 10000, + 100000, + 1000000, + 10000000, + 100000000, + 1000000000 + }; + +#if defined(_M_IX86) || defined(_M_X64) + unsigned long i = 0; + _BitScanReverse(&i, n | 1); + uint32_t t = (i + 1) * 1233 >> 12; +#elif defined(__GNUC__) + uint32_t t = (32 - __builtin_clz(n | 1)) * 1233 >> 12; +#else +#error +#endif + return t - (n < powers_of_10[t]) + 1; +} + +inline unsigned CountDecimalDigit64_fast(uint64_t n) { + static const uint64_t powers_of_10[] = { + 0, + 10, + 100, + 1000, + 10000, + 100000, + 1000000, + 10000000, + 100000000, + 1000000000, + 10000000000, + 100000000000, + 1000000000000, + 10000000000000, + 100000000000000, + 1000000000000000, + 10000000000000000, + 100000000000000000, + 1000000000000000000, + 10000000000000000000U + }; + +#if defined(_M_IX86) + uint64_t m = n | 1; + unsigned long i = 0; + if (_BitScanReverse(&i, m >> 32)) + i += 32; + else + _BitScanReverse(&i, m & 0xFFFFFFFF); + uint32_t t = (i + 1) * 1233 >> 12; +#elif defined(_M_X64) + unsigned long i = 0; + _BitScanReverse64(&i, n | 1); + uint32_t t = (i + 1) * 1233 >> 12; +#elif defined(__GNUC__) + uint32_t t = (64 - __builtin_clzll(n | 1)) * 1233 >> 12; +#else +#error +#endif + + return t - (n < powers_of_10[t]) + 1; +} + +#if 0 +// Exhaustive, very slow +TEST_F(Misc, CountDecimalDigit_Verify) { + unsigned i = 0; + do { + if (i % (65536 * 256) == 0) + printf("%u\n", i); + ASSERT_EQ(CountDecimalDigit_enroll4(i), CountDecimalDigit_fast(i)); + i++; + } while (i != 0); +} + +static const unsigned kDigits10Trial = 1000000000u; +TEST_F(Misc, CountDecimalDigit_naive) { + unsigned sum = 0; + for (unsigned i = 0; i < kDigits10Trial; i++) + sum += CountDecimalDigit_naive(i); + printf("%u\n", sum); +} + +TEST_F(Misc, CountDecimalDigit_enroll4) { + unsigned sum = 0; + for (unsigned i = 0; i < kDigits10Trial; i++) + sum += CountDecimalDigit_enroll4(i); + printf("%u\n", sum); +} + +TEST_F(Misc, CountDecimalDigit_fast) { + unsigned sum = 0; + for (unsigned i = 0; i < kDigits10Trial; i++) + sum += CountDecimalDigit_fast(i); + printf("%u\n", sum); +} +#endif + +TEST_F(Misc, CountDecimalDigit64_VerifyFast) { + uint64_t i = 1, j; + do { + //printf("%" PRIu64 "\n", i); + ASSERT_EQ(CountDecimalDigit64_enroll4(i), CountDecimalDigit64_fast(i)); + j = i; + i *= 3; + } while (j < i); +} + +//////////////////////////////////////////////////////////////////////////////// +// integer-to-string conversion + +// https://gist.github.com/anonymous/7179097 +static const int randval[] ={ + 936116, 369532, 453755, -72860, 209713, 268347, 435278, -360266, -416287, -182064, + -644712, 944969, 640463, -366588, 471577, -69401, -744294, -505829, 923883, 831785, + -601136, -636767, -437054, 591718, 100758, 231907, -719038, 973540, -605220, 506659, + -871653, 462533, 764843, -919138, 404305, -630931, -288711, -751454, -173726, -718208, + 432689, -281157, 360737, 659827, 19174, -376450, 769984, -858198, 439127, 734703, + -683426, 7, 386135, 186997, -643900, -744422, -604708, -629545, 42313, -933592, + -635566, 182308, 439024, -367219, -73924, -516649, 421935, -470515, 413507, -78952, + -427917, -561158, 737176, 94538, 572322, 405217, 709266, -357278, -908099, -425447, + 601119, 750712, -862285, -177869, 900102, 384877, 157859, -641680, 503738, -702558, + 278225, 463290, 268378, -212840, 580090, 347346, -473985, -950968, -114547, -839893, + -738032, -789424, 409540, 493495, 432099, 119755, 905004, -174834, 338266, 234298, + 74641, -965136, -754593, 685273, 466924, 920560, 385062, 796402, -67229, 994864, + 376974, 299869, -647540, -128724, 469890, -163167, -547803, -743363, 486463, -621028, + 612288, 27459, -514224, 126342, -66612, 803409, -777155, -336453, -284002, 472451, + 342390, -163630, 908356, -456147, -825607, 268092, -974715, 287227, 227890, -524101, + 616370, -782456, 922098, -624001, -813690, 171605, -192962, 796151, 707183, -95696, + -23163, -721260, 508892, 430715, 791331, 482048, -996102, 863274, 275406, -8279, + -556239, -902076, 268647, -818565, 260069, -798232, -172924, -566311, -806503, -885992, + 813969, -78468, 956632, 304288, 494867, -508784, 381751, 151264, 762953, 76352, + 594902, 375424, 271700, -743062, 390176, 924237, 772574, 676610, 435752, -153847, + 3959, -971937, -294181, -538049, -344620, -170136, 19120, -703157, 868152, -657961, + -818631, 219015, -872729, -940001, -956570, 880727, -345910, 942913, -942271, -788115, + 225294, 701108, -517736, -416071, 281940, 488730, 942698, 711494, 838382, -892302, + -533028, 103052, 528823, 901515, 949577, 159364, 718227, -241814, -733661, -462928, + -495829, 165170, 513580, -629188, -509571, -459083, 198437, 77198, -644612, 811276, + -422298, -860842, -52584, 920369, 686424, -530667, -243476, 49763, 345866, -411960, + -114863, 470810, -302860, 683007, -509080, 2, -174981, -772163, -48697, 447770, + -268246, 213268, 269215, 78810, -236340, -639140, -864323, 505113, -986569, -325215, + 541859, 163070, -819998, -645161, -583336, 573414, 696417, -132375, 3, -294501, + 320435, 682591, 840008, 351740, 426951, 609354, 898154, -943254, 227321, -859793, + -727993, 44137, -497965, -782239, 14955, -746080, -243366, 9837, -233083, 606507, + -995864, -615287, -994307, 602715, 770771, -315040, 610860, 446102, -307120, 710728, + -590392, -230474, -762625, -637525, 134963, -202700, -766902, -985541, 218163, 682009, + 926051, 525156, -61195, 403211, -810098, 245539, -431733, 179998, -806533, 745943, + 447597, 131973, -187130, 826019, 286107, -937230, -577419, 20254, 681802, -340500, + 323080, 266283, -667617, 309656, 416386, 611863, 759991, -534257, 523112, -634892, + -169913, -204905, -909867, -882185, -944908, 741811, -717675, 967007, -317396, 407230, + -412805, 792905, 994873, 744793, -456797, 713493, 355232, 116900, -945199, 880539, + 342505, -580824, -262273, 982968, -349497, -735488, 311767, -455191, 570918, 389734, + -958386, 10262, -99267, 155481, 304210, 204724, 704367, -144893, -233664, -671441, + 896849, 408613, 762236, 322697, 981321, 688476, 13663, -970704, -379507, 896412, + 977084, 348869, 875948, 341348, 318710, 512081, 6163, 669044, 833295, 811883, + 708756, -802534, -536057, 608413, -389625, -694603, 541106, -110037, 720322, -540581, + 645420, 32980, 62442, 510157, -981870, -87093, -325960, -500494, -718291, -67889, + 991501, 374804, 769026, -978869, 294747, 714623, 413327, -199164, 671368, 804789, + -362507, 798196, -170790, -568895, -869379, 62020, -316693, -837793, 644994, -39341, + -417504, -243068, -957756, 99072, 622234, -739992, 225668, 8863, -505910, 82483, + -559244, 241572, 1315, -36175, -54990, 376813, -11, 162647, -688204, -486163, + -54934, -197470, 744223, -762707, 732540, 996618, 351561, -445933, -898491, 486531, + 456151, 15276, 290186, -817110, -52995, 313046, -452533, -96267, 94470, -500176, + -818026, -398071, -810548, -143325, -819741, 1338, -897676, -101577, -855445, 37309, + 285742, 953804, -777927, -926962, -811217, -936744, -952245, -802300, -490188, -964953, + -552279, 329142, -570048, -505756, 682898, -381089, -14352, 175138, 152390, -582268, + -485137, 717035, 805329, 239572, -730409, 209643, -184403, -385864, 675086, 819648, + 629058, -527109, -488666, -171981, 532788, 552441, 174666, 984921, 766514, 758787, + 716309, 338801, -978004, -412163, 876079, -734212, 789557, -160491, -522719, 56644, + -991, -286038, -53983, 663740, 809812, 919889, -717502, -137704, 220511, 184396, + -825740, -588447, 430870, 124309, 135956, 558662, -307087, -788055, -451328, 812260, + 931601, 324347, -482989, -117858, -278861, 189068, -172774, 929057, 293787, 198161, + -342386, -47173, 906555, -759955, -12779, 777604, -97869, 899320, 927486, -25284, + -848550, 259450, -485856, -17820, 88, 171400, 235492, -326783, -340793, 886886, + 112428, -246280, 5979, 648444, -114982, 991013, -56489, -9497, 419706, 632820, + -341664, 393926, -848977, -22538, 257307, 773731, -905319, 491153, 734883, -868212, + -951053, 644458, -580758, 764735, 584316, 297077, 28852, -397710, -953669, 201772, + 879050, -198237, -588468, 448102, -116837, 770007, -231812, 642906, -582166, -885828, + 9, 305082, -996577, 303559, 75008, -772956, -447960, 599825, -295552, 870739, + -386278, -950300, 485359, -457081, 629461, -850276, 550496, -451755, -620841, -11766, + -950137, 832337, 28711, -273398, -507197, 91921, -271360, -705991, -753220, -388968, + 967945, 340434, -320883, -662793, -554617, -574568, 477946, -6148, -129519, 689217, + 920020, -656315, -974523, -212525, 80921, -612532, 645096, 545655, 655713, -591631, + -307385, -816688, -618823, -113713, 526430, 673063, 735916, -809095, -850417, 639004, + 432281, -388185, 270708, 860146, -39902, -786157, -258180, -246169, -966720, -264957, + 548072, -306010, -57367, -635665, 933824, 70553, -989936, -488741, 72411, -452509, + 529831, 956277, 449019, -577850, -360986, -803418, 48833, 296073, 203430, 609591, + 715483, 470964, 658106, -718254, -96424, 790163, 334739, 181070, -373578, 5, + -435088, 329841, 330939, -256602, 394355, 912412, 231910, 927278, -661933, 788539, + -769664, -893274, -96856, 298205, 901043, -608122, -527430, 183618, -553963, -35246, + -393924, 948832, -483198, 594501, 35460, -407007, 93494, -336881, -634072, 984205, + -812161, 944664, -31062, 753872, 823933, -69566, 50445, 290147, 85134, 34706, + 551902, 405202, -991246, -84642, 154341, 316432, -695101, -651588, -5030, 137564, + -294665, 332541, 528307, -90572, -344923, 523766, -758498, -968047, 339028, 494578, + 593129, -725773, 31834, -718406, -208638, 159665, -2043, 673344, -442767, 75816, + 755442, 769257, -158730, -410272, 691688, 589550, -878398, -184121, 460679, 346312, + 294163, -544602, 653308, 254167, -276979, 52073, -892684, 887653, -41222, 983065, + -68258, -408799, -99069, -674069, -863635, -32890, 622757, -743862, 40872, -4837, + -967228, 522370, -903951, -818669, 524459, 514702, 925801, 20007, -299229, 579348, + 626021, 430089, 348139, -562692, -607728, -130606, -928451, -424793, -458647, -448892, + -312230, 143337, 109746, 880042, -339658, -785614, 938995, 540916, 118429, 661351, + -402967, 404729, -40918, -976535, 743230, 713110, 440182, -381314, -499252, 74613, + 193652, 912717, 491323, 583633, 324691, 459397, 281253, 195540, -2764, -888651, + 892449, 132663, -478373, -430002, -314551, 527826, 247165, 557966, 554778, 481531, + -946634, 431685, -769059, -348371, 174046, 184597, -354867, 584422, 227390, -850397, + -542924, -849093, -737769, 325359, 736314, 269101, 767940, 674809, 81413, -447458, + 445076, 189072, 906218, 502688, -718476, -863827, -731381, 100660, 623249, 710008, + 572060, 922203, 685740, 55096, 263394, -243695, -353910, -516788, 388471, 455165, + 844103, -643772, 363976, 268875, -899450, 104470, 104029, -238874, -274659, 732969, + -676443, 953291, -916289, -861849, -242344, 958083, -479593, -970395, 799831, 277841, + -243236, -283462, -201510, 166263, -259105, -575706, 878926, 891064, 895297, 655262, + -34807, -809833, -89281, 342585, 554920, 1, 902141, -333425, 139703, 852318, + -618438, 329498, -932596, -692836, -513372, 733656, -523411, 85779, 500478, -682697, + -502836, 138776, 156341, -420037, -557964, -556378, 710993, -50383, -877159, 916334, + 132996, 583516, -603392, -111615, -12288, -780214, 476780, 123327, 137607, 519956, + 745837, 17358, -158581, -53490 +}; +static const size_t randvalCount = sizeof(randval) / sizeof(randval[0]); +static const size_t kItoaTrialCount = 10000; + +static const char digits[201] = +"0001020304050607080910111213141516171819" +"2021222324252627282930313233343536373839" +"4041424344454647484950515253545556575859" +"6061626364656667686970717273747576777879" +"8081828384858687888990919293949596979899"; + +// Prevent code being optimized out +//#define OUTPUT_LENGTH(length) printf("", length) +#define OUTPUT_LENGTH(length) printf("%u\n", (unsigned)length) + +template +class Writer1 { +public: + Writer1() : os_() {} + Writer1(OutputStream& os) : os_(&os) {} + + void Reset(OutputStream& os) { + os_ = &os; + } + + bool WriteInt(int i) { + if (i < 0) { + os_->Put('-'); + i = -i; + } + return WriteUint((unsigned)i); + } + + bool WriteUint(unsigned u) { + char buffer[10]; + char *p = buffer; + do { + *p++ = char(u % 10) + '0'; + u /= 10; + } while (u > 0); + + do { + --p; + os_->Put(*p); + } while (p != buffer); + return true; + } + + bool WriteInt64(int64_t i64) { + if (i64 < 0) { + os_->Put('-'); + i64 = -i64; + } + WriteUint64((uint64_t)i64); + return true; + } + + bool WriteUint64(uint64_t u64) { + char buffer[20]; + char *p = buffer; + do { + *p++ = char(u64 % 10) + '0'; + u64 /= 10; + } while (u64 > 0); + + do { + --p; + os_->Put(*p); + } while (p != buffer); + return true; + } + +private: + OutputStream* os_; +}; + +template<> +bool Writer1::WriteUint(unsigned u) { + char buffer[10]; + char* p = buffer; + do { + *p++ = char(u % 10) + '0'; + u /= 10; + } while (u > 0); + + char* d = os_->Push(p - buffer); + do { + --p; + *d++ = *p; + } while (p != buffer); + return true; +} + +// Using digits LUT to reduce division/modulo +template +class Writer2 { +public: + Writer2() : os_() {} + Writer2(OutputStream& os) : os_(&os) {} + + void Reset(OutputStream& os) { + os_ = &os; + } + + bool WriteInt(int i) { + if (i < 0) { + os_->Put('-'); + i = -i; + } + return WriteUint((unsigned)i); + } + + bool WriteUint(unsigned u) { + char buffer[10]; + char* p = buffer; + while (u >= 100) { + const unsigned i = (u % 100) << 1; + u /= 100; + *p++ = digits[i + 1]; + *p++ = digits[i]; + } + if (u < 10) + *p++ = char(u) + '0'; + else { + const unsigned i = u << 1; + *p++ = digits[i + 1]; + *p++ = digits[i]; + } + + do { + --p; + os_->Put(*p); + } while (p != buffer); + return true; + } + + bool WriteInt64(int64_t i64) { + if (i64 < 0) { + os_->Put('-'); + i64 = -i64; + } + WriteUint64((uint64_t)i64); + return true; + } + + bool WriteUint64(uint64_t u64) { + char buffer[20]; + char* p = buffer; + while (u64 >= 100) { + const unsigned i = static_cast(u64 % 100) << 1; + u64 /= 100; + *p++ = digits[i + 1]; + *p++ = digits[i]; + } + if (u64 < 10) + *p++ = char(u64) + '0'; + else { + const unsigned i = static_cast(u64) << 1; + *p++ = digits[i + 1]; + *p++ = digits[i]; + } + + do { + --p; + os_->Put(*p); + } while (p != buffer); + return true; + } + +private: + OutputStream* os_; +}; + +// First pass to count digits +template +class Writer3 { +public: + Writer3() : os_() {} + Writer3(OutputStream& os) : os_(&os) {} + + void Reset(OutputStream& os) { + os_ = &os; + } + + bool WriteInt(int i) { + if (i < 0) { + os_->Put('-'); + i = -i; + } + return WriteUint((unsigned)i); + } + + bool WriteUint(unsigned u) { + char buffer[10]; + char *p = buffer; + do { + *p++ = char(u % 10) + '0'; + u /= 10; + } while (u > 0); + + do { + --p; + os_->Put(*p); + } while (p != buffer); + return true; + } + + bool WriteInt64(int64_t i64) { + if (i64 < 0) { + os_->Put('-'); + i64 = -i64; + } + WriteUint64((uint64_t)i64); + return true; + } + + bool WriteUint64(uint64_t u64) { + char buffer[20]; + char *p = buffer; + do { + *p++ = char(u64 % 10) + '0'; + u64 /= 10; + } while (u64 > 0); + + do { + --p; + os_->Put(*p); + } while (p != buffer); + return true; + } + +private: + void WriteUintReverse(char* d, unsigned u) { + do { + *--d = char(u % 10) + '0'; + u /= 10; + } while (u > 0); + } + + void WriteUint64Reverse(char* d, uint64_t u) { + do { + *--d = char(u % 10) + '0'; + u /= 10; + } while (u > 0); + } + + OutputStream* os_; +}; + +template<> +inline bool Writer3::WriteUint(unsigned u) { + unsigned digit = CountDecimalDigit_fast(u); + WriteUintReverse(os_->Push(digit) + digit, u); + return true; +} + +template<> +inline bool Writer3::WriteUint(unsigned u) { + unsigned digit = CountDecimalDigit_fast(u); + WriteUintReverse(os_->Push(digit) + digit, u); + return true; +} + +template<> +inline bool Writer3::WriteUint64(uint64_t u) { + unsigned digit = CountDecimalDigit64_fast(u); + WriteUint64Reverse(os_->Push(digit) + digit, u); + return true; +} + +template<> +inline bool Writer3::WriteUint64(uint64_t u) { + unsigned digit = CountDecimalDigit64_fast(u); + WriteUint64Reverse(os_->Push(digit) + digit, u); + return true; +} + +// Using digits LUT to reduce division/modulo, two passes +template +class Writer4 { +public: + Writer4() : os_() {} + Writer4(OutputStream& os) : os_(&os) {} + + void Reset(OutputStream& os) { + os_ = &os; + } + + bool WriteInt(int i) { + if (i < 0) { + os_->Put('-'); + i = -i; + } + return WriteUint((unsigned)i); + } + + bool WriteUint(unsigned u) { + char buffer[10]; + char* p = buffer; + while (u >= 100) { + const unsigned i = (u % 100) << 1; + u /= 100; + *p++ = digits[i + 1]; + *p++ = digits[i]; + } + if (u < 10) + *p++ = char(u) + '0'; + else { + const unsigned i = u << 1; + *p++ = digits[i + 1]; + *p++ = digits[i]; + } + + do { + --p; + os_->Put(*p); + } while (p != buffer); + return true; + } + + bool WriteInt64(int64_t i64) { + if (i64 < 0) { + os_->Put('-'); + i64 = -i64; + } + WriteUint64((uint64_t)i64); + return true; + } + + bool WriteUint64(uint64_t u64) { + char buffer[20]; + char* p = buffer; + while (u64 >= 100) { + const unsigned i = static_cast(u64 % 100) << 1; + u64 /= 100; + *p++ = digits[i + 1]; + *p++ = digits[i]; + } + if (u64 < 10) + *p++ = char(u64) + '0'; + else { + const unsigned i = static_cast(u64) << 1; + *p++ = digits[i + 1]; + *p++ = digits[i]; + } + + do { + --p; + os_->Put(*p); + } while (p != buffer); + return true; + } + +private: + void WriteUintReverse(char* d, unsigned u) { + while (u >= 100) { + const unsigned i = (u % 100) << 1; + u /= 100; + *--d = digits[i + 1]; + *--d = digits[i]; + } + if (u < 10) { + *--d = char(u) + '0'; + } + else { + const unsigned i = u << 1; + *--d = digits[i + 1]; + *--d = digits[i]; + } + } + + void WriteUint64Reverse(char* d, uint64_t u) { + while (u >= 100) { + const unsigned i = (u % 100) << 1; + u /= 100; + *--d = digits[i + 1]; + *--d = digits[i]; + } + if (u < 10) { + *--d = char(u) + '0'; + } + else { + const unsigned i = u << 1; + *--d = digits[i + 1]; + *--d = digits[i]; + } + } + + OutputStream* os_; +}; + +template<> +inline bool Writer4::WriteUint(unsigned u) { + unsigned digit = CountDecimalDigit_fast(u); + WriteUintReverse(os_->Push(digit) + digit, u); + return true; +} + +template<> +inline bool Writer4::WriteUint(unsigned u) { + unsigned digit = CountDecimalDigit_fast(u); + WriteUintReverse(os_->Push(digit) + digit, u); + return true; +} + +template<> +inline bool Writer4::WriteUint64(uint64_t u) { + unsigned digit = CountDecimalDigit64_fast(u); + WriteUint64Reverse(os_->Push(digit) + digit, u); + return true; +} + +template<> +inline bool Writer4::WriteUint64(uint64_t u) { + unsigned digit = CountDecimalDigit64_fast(u); + WriteUint64Reverse(os_->Push(digit) + digit, u); + return true; +} + +template +void itoa_Writer_StringBufferVerify() { + rapidjson::StringBuffer sb; + Writer writer(sb); + for (size_t j = 0; j < randvalCount; j++) { + char buffer[32]; + sprintf(buffer, "%d", randval[j]); + writer.WriteInt(randval[j]); + ASSERT_STREQ(buffer, sb.GetString()); + sb.Clear(); + } +} + +template +void itoa_Writer_InsituStringStreamVerify() { + Writer writer; + for (size_t j = 0; j < randvalCount; j++) { + char buffer[32]; + sprintf(buffer, "%d", randval[j]); + char buffer2[32]; + rapidjson::InsituStringStream ss(buffer2); + writer.Reset(ss); + char* begin = ss.PutBegin(); + writer.WriteInt(randval[j]); + ss.Put('\0'); + ss.PutEnd(begin); + ASSERT_STREQ(buffer, buffer2); + } +} + +template +void itoa_Writer_StringBuffer() { + size_t length = 0; + + rapidjson::StringBuffer sb; + Writer writer(sb); + + for (size_t i = 0; i < kItoaTrialCount; i++) { + for (size_t j = 0; j < randvalCount; j++) { + writer.WriteInt(randval[j]); + length += sb.GetSize(); + sb.Clear(); + } + } + OUTPUT_LENGTH(length); +} + +template +void itoa_Writer_InsituStringStream() { + size_t length = 0; + + char buffer[32]; + Writer writer; + for (size_t i = 0; i < kItoaTrialCount; i++) { + for (size_t j = 0; j < randvalCount; j++) { + rapidjson::InsituStringStream ss(buffer); + writer.Reset(ss); + char* begin = ss.PutBegin(); + writer.WriteInt(randval[j]); + length += ss.PutEnd(begin); + } + } + OUTPUT_LENGTH(length); +}; + +template +void itoa64_Writer_StringBufferVerify() { + rapidjson::StringBuffer sb; + Writer writer(sb); + for (size_t j = 0; j < randvalCount; j++) { + char buffer[32]; + int64_t x = randval[j] * randval[j]; + sprintf(buffer, "%" PRIi64, x); + writer.WriteInt64(x); + ASSERT_STREQ(buffer, sb.GetString()); + sb.Clear(); + } +} + +template +void itoa64_Writer_InsituStringStreamVerify() { + Writer writer; + for (size_t j = 0; j < randvalCount; j++) { + char buffer[32]; + int64_t x = randval[j] * randval[j]; + sprintf(buffer, "%" PRIi64, x); + char buffer2[32]; + rapidjson::InsituStringStream ss(buffer2); + writer.Reset(ss); + char* begin = ss.PutBegin(); + writer.WriteInt64(x); + ss.Put('\0'); + ss.PutEnd(begin); + ASSERT_STREQ(buffer, buffer2); + } +} + +template +void itoa64_Writer_StringBuffer() { + size_t length = 0; + + rapidjson::StringBuffer sb; + Writer writer(sb); + + for (size_t i = 0; i < kItoaTrialCount; i++) { + for (size_t j = 0; j < randvalCount; j++) { + writer.WriteInt64(randval[j] * randval[j]); + length += sb.GetSize(); + sb.Clear(); + } + } + OUTPUT_LENGTH(length); +} + +template +void itoa64_Writer_InsituStringStream() { + size_t length = 0; + + char buffer[32]; + Writer writer; + for (size_t i = 0; i < kItoaTrialCount; i++) { + for (size_t j = 0; j < randvalCount; j++) { + rapidjson::InsituStringStream ss(buffer); + writer.Reset(ss); + char* begin = ss.PutBegin(); + writer.WriteInt64(randval[j] * randval[j]); + length += ss.PutEnd(begin); + } + } + OUTPUT_LENGTH(length); +}; + +// Full specialization for InsituStringStream to prevent memory copying +// (normally we will not use InsituStringStream for writing, just for testing) + +namespace rapidjson { + +template<> +bool rapidjson::Writer::WriteInt(int i) { + char *buffer = os_->Push(11); + const char* end = internal::i32toa(i, buffer); + os_->Pop(11 - (end - buffer)); + return true; +} + +template<> +bool Writer::WriteUint(unsigned u) { + char *buffer = os_->Push(10); + const char* end = internal::u32toa(u, buffer); + os_->Pop(10 - (end - buffer)); + return true; +} + +template<> +bool Writer::WriteInt64(int64_t i64) { + char *buffer = os_->Push(21); + const char* end = internal::i64toa(i64, buffer); + os_->Pop(21 - (end - buffer)); + return true; +} + +template<> +bool Writer::WriteUint64(uint64_t u) { + char *buffer = os_->Push(20); + const char* end = internal::u64toa(u, buffer); + os_->Pop(20 - (end - buffer)); + return true; +} + +} // namespace rapidjson + +TEST_F(Misc, itoa_Writer_StringBufferVerify) { itoa_Writer_StringBufferVerify >(); } +TEST_F(Misc, itoa_Writer1_StringBufferVerify) { itoa_Writer_StringBufferVerify >(); } +TEST_F(Misc, itoa_Writer2_StringBufferVerify) { itoa_Writer_StringBufferVerify >(); } +TEST_F(Misc, itoa_Writer3_StringBufferVerify) { itoa_Writer_StringBufferVerify >(); } +TEST_F(Misc, itoa_Writer4_StringBufferVerify) { itoa_Writer_StringBufferVerify >(); } +TEST_F(Misc, itoa_Writer_InsituStringStreamVerify) { itoa_Writer_InsituStringStreamVerify >(); } +TEST_F(Misc, itoa_Writer1_InsituStringStreamVerify) { itoa_Writer_InsituStringStreamVerify >(); } +TEST_F(Misc, itoa_Writer2_InsituStringStreamVerify) { itoa_Writer_InsituStringStreamVerify >(); } +TEST_F(Misc, itoa_Writer3_InsituStringStreamVerify) { itoa_Writer_InsituStringStreamVerify >(); } +TEST_F(Misc, itoa_Writer4_InsituStringStreamVerify) { itoa_Writer_InsituStringStreamVerify >(); } +TEST_F(Misc, itoa_Writer_StringBuffer) { itoa_Writer_StringBuffer >(); } +TEST_F(Misc, itoa_Writer1_StringBuffer) { itoa_Writer_StringBuffer >(); } +TEST_F(Misc, itoa_Writer2_StringBuffer) { itoa_Writer_StringBuffer >(); } +TEST_F(Misc, itoa_Writer3_StringBuffer) { itoa_Writer_StringBuffer >(); } +TEST_F(Misc, itoa_Writer4_StringBuffer) { itoa_Writer_StringBuffer >(); } +TEST_F(Misc, itoa_Writer_InsituStringStream) { itoa_Writer_InsituStringStream >(); } +TEST_F(Misc, itoa_Writer1_InsituStringStream) { itoa_Writer_InsituStringStream >(); } +TEST_F(Misc, itoa_Writer2_InsituStringStream) { itoa_Writer_InsituStringStream >(); } +TEST_F(Misc, itoa_Writer3_InsituStringStream) { itoa_Writer_InsituStringStream >(); } +TEST_F(Misc, itoa_Writer4_InsituStringStream) { itoa_Writer_InsituStringStream >(); } + +TEST_F(Misc, itoa64_Writer_StringBufferVerify) { itoa64_Writer_StringBufferVerify >(); } +TEST_F(Misc, itoa64_Writer1_StringBufferVerify) { itoa64_Writer_StringBufferVerify >(); } +TEST_F(Misc, itoa64_Writer2_StringBufferVerify) { itoa64_Writer_StringBufferVerify >(); } +TEST_F(Misc, itoa64_Writer3_StringBufferVerify) { itoa64_Writer_StringBufferVerify >(); } +TEST_F(Misc, itoa64_Writer4_StringBufferVerify) { itoa64_Writer_StringBufferVerify >(); } +TEST_F(Misc, itoa64_Writer_InsituStringStreamVerify) { itoa64_Writer_InsituStringStreamVerify >(); } +TEST_F(Misc, itoa64_Writer1_InsituStringStreamVerify) { itoa64_Writer_InsituStringStreamVerify >(); } +TEST_F(Misc, itoa64_Writer2_InsituStringStreamVerify) { itoa64_Writer_InsituStringStreamVerify >(); } +TEST_F(Misc, itoa64_Writer3_InsituStringStreamVerify) { itoa64_Writer_InsituStringStreamVerify >(); } +TEST_F(Misc, itoa64_Writer4_InsituStringStreamVerify) { itoa64_Writer_InsituStringStreamVerify >(); } +TEST_F(Misc, itoa64_Writer_StringBuffer) { itoa64_Writer_StringBuffer >(); } +TEST_F(Misc, itoa64_Writer1_StringBuffer) { itoa64_Writer_StringBuffer >(); } +TEST_F(Misc, itoa64_Writer2_StringBuffer) { itoa64_Writer_StringBuffer >(); } +TEST_F(Misc, itoa64_Writer3_StringBuffer) { itoa64_Writer_StringBuffer >(); } +TEST_F(Misc, itoa64_Writer4_StringBuffer) { itoa64_Writer_StringBuffer >(); } +TEST_F(Misc, itoa64_Writer_InsituStringStream) { itoa64_Writer_InsituStringStream >(); } +TEST_F(Misc, itoa64_Writer1_InsituStringStream) { itoa64_Writer_InsituStringStream >(); } +TEST_F(Misc, itoa64_Writer2_InsituStringStream) { itoa64_Writer_InsituStringStream >(); } +TEST_F(Misc, itoa64_Writer3_InsituStringStream) { itoa64_Writer_InsituStringStream >(); } +TEST_F(Misc, itoa64_Writer4_InsituStringStream) { itoa64_Writer_InsituStringStream >(); } + +#endif // TEST_MISC diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/test/perftest/perftest.cpp b/graphics/asymptote/LspCpp/third_party/rapidjson/test/perftest/perftest.cpp new file mode 100644 index 0000000000..b149a4c12c --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/test/perftest/perftest.cpp @@ -0,0 +1,24 @@ +// Tencent is pleased to support the open source community by making RapidJSON available. +// +// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. +// +// Licensed under the MIT License (the "License"); you may not use this file except +// in compliance with the License. You may obtain a copy of the License at +// +// http://opensource.org/licenses/MIT +// +// Unless required by applicable law or agreed to in writing, software distributed +// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +// CONDITIONS OF ANY KIND, either express or implied. See the License for the +// specific language governing permissions and limitations under the License. + +#include "perftest.h" + +int main(int argc, char **argv) { +#if _MSC_VER + _CrtSetDbgFlag ( _CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF ); + //void *testWhetherMemoryLeakDetectionWorks = malloc(1); +#endif + ::testing::InitGoogleTest(&argc, argv); + return RUN_ALL_TESTS(); +} diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/test/perftest/perftest.h b/graphics/asymptote/LspCpp/third_party/rapidjson/test/perftest/perftest.h new file mode 100644 index 0000000000..31e3ca6337 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/test/perftest/perftest.h @@ -0,0 +1,186 @@ +// Tencent is pleased to support the open source community by making RapidJSON available. +// +// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. +// +// Licensed under the MIT License (the "License"); you may not use this file except +// in compliance with the License. You may obtain a copy of the License at +// +// http://opensource.org/licenses/MIT +// +// Unless required by applicable law or agreed to in writing, software distributed +// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +// CONDITIONS OF ANY KIND, either express or implied. See the License for the +// specific language governing permissions and limitations under the License. + +#ifndef PERFTEST_H_ +#define PERFTEST_H_ + +#define TEST_RAPIDJSON 1 +#define TEST_PLATFORM 0 +#define TEST_MISC 0 + +#define TEST_VERSION_CODE(x,y,z) \ + (((x)*100000) + ((y)*100) + (z)) + +// __SSE2__ and __SSE4_2__ are recognized by gcc, clang, and the Intel compiler. +// We use -march=native with gmake to enable -msse2 and -msse4.2, if supported. +// Likewise, __ARM_NEON is used to detect Neon. +#if defined(__SSE4_2__) +# define RAPIDJSON_SSE42 +#elif defined(__SSE2__) +# define RAPIDJSON_SSE2 +#elif defined(__ARM_NEON) +# define RAPIDJSON_NEON +#endif + +#define RAPIDJSON_HAS_STDSTRING 1 + +//////////////////////////////////////////////////////////////////////////////// +// Google Test + +#ifdef __cplusplus + +// gtest indirectly included inttypes.h, without __STDC_CONSTANT_MACROS. +#ifndef __STDC_CONSTANT_MACROS +# define __STDC_CONSTANT_MACROS 1 // required by C++ standard +#endif + +#if defined(__clang__) || defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 2)) +#if defined(__clang__) || (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) +#pragma GCC diagnostic push +#endif +#pragma GCC diagnostic ignored "-Weffc++" +#endif + +#include "gtest/gtest.h" + +#if defined(__clang__) || defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) +#pragma GCC diagnostic pop +#endif + +#ifdef _MSC_VER +#define _CRTDBG_MAP_ALLOC +#include +#pragma warning(disable : 4996) // 'function': was declared deprecated +#endif + +//! Base class for all performance tests +class PerfTest : public ::testing::Test { +public: + PerfTest() : filename_(), json_(), length_(), whitespace_(), whitespace_length_() {} + + virtual void SetUp() { + { + const char *paths[] = { + "data/sample.json", + "bin/data/sample.json", + "../bin/data/sample.json", + "../../bin/data/sample.json", + "../../../bin/data/sample.json" + }; + + FILE *fp = 0; + for (size_t i = 0; i < sizeof(paths) / sizeof(paths[0]); i++) { + fp = fopen(filename_ = paths[i], "rb"); + if (fp) + break; + } + ASSERT_TRUE(fp != 0); + + fseek(fp, 0, SEEK_END); + length_ = (size_t)ftell(fp); + fseek(fp, 0, SEEK_SET); + json_ = (char*)malloc(length_ + 1); + ASSERT_EQ(length_, fread(json_, 1, length_, fp)); + json_[length_] = '\0'; + fclose(fp); + } + + // whitespace test + { + whitespace_length_ = 1024 * 1024; + whitespace_ = (char *)malloc(whitespace_length_ + 4); + char *p = whitespace_; + for (size_t i = 0; i < whitespace_length_; i += 4) { + *p++ = ' '; + *p++ = '\n'; + *p++ = '\r'; + *p++ = '\t'; + } + *p++ = '['; + *p++ = '0'; + *p++ = ']'; + *p++ = '\0'; + } + + // types test + { + const char *typespaths[] = { + "data/types", + "bin/types", + "../bin/types", + "../../bin/types/", + "../../../bin/types" + }; + + const char* typesfilenames[] = { + "booleans.json", + "floats.json", + "guids.json", + "integers.json", + "mixed.json", + "nulls.json", + "paragraphs.json", + "alotofkeys.json" + }; + + for (size_t j = 0; j < sizeof(typesfilenames) / sizeof(typesfilenames[0]); j++) { + types_[j] = 0; + for (size_t i = 0; i < sizeof(typespaths) / sizeof(typespaths[0]); i++) { + char filename[256]; + sprintf(filename, "%s/%s", typespaths[i], typesfilenames[j]); + if (FILE* fp = fopen(filename, "rb")) { + fseek(fp, 0, SEEK_END); + typesLength_[j] = (size_t)ftell(fp); + fseek(fp, 0, SEEK_SET); + types_[j] = (char*)malloc(typesLength_[j] + 1); + ASSERT_EQ(typesLength_[j], fread(types_[j], 1, typesLength_[j], fp)); + types_[j][typesLength_[j]] = '\0'; + fclose(fp); + break; + } + } + } + } + } + + virtual void TearDown() { + free(json_); + free(whitespace_); + json_ = 0; + whitespace_ = 0; + for (size_t i = 0; i < 8; i++) { + free(types_[i]); + types_[i] = 0; + } + } + +private: + PerfTest(const PerfTest&); + PerfTest& operator=(const PerfTest&); + +protected: + const char* filename_; + char *json_; + size_t length_; + char *whitespace_; + size_t whitespace_length_; + char *types_[8]; + size_t typesLength_[8]; + + static const size_t kTrialCount = 1000; +}; + +#endif // __cplusplus + +#endif // PERFTEST_H_ diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/test/perftest/platformtest.cpp b/graphics/asymptote/LspCpp/third_party/rapidjson/test/perftest/platformtest.cpp new file mode 100644 index 0000000000..c490da7a85 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/test/perftest/platformtest.cpp @@ -0,0 +1,166 @@ +// Tencent is pleased to support the open source community by making RapidJSON available. +// +// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. +// +// Licensed under the MIT License (the "License"); you may not use this file except +// in compliance with the License. You may obtain a copy of the License at +// +// http://opensource.org/licenses/MIT +// +// Unless required by applicable law or agreed to in writing, software distributed +// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +// CONDITIONS OF ANY KIND, either express or implied. See the License for the +// specific language governing permissions and limitations under the License. + +#include "perftest.h" + +// This file is for giving the performance characteristics of the platform (compiler/OS/CPU). + +#if TEST_PLATFORM + +#include +#include + +// Windows +#ifdef _WIN32 +#include +#endif + +// UNIX +#if defined(unix) || defined(__unix__) || defined(__unix) +#include +#ifdef _POSIX_MAPPED_FILES +#include +#endif +#endif + +class Platform : public PerfTest { +public: + virtual void SetUp() { + PerfTest::SetUp(); + + // temp buffer for testing + temp_ = (char *)malloc(length_ + 1); + memcpy(temp_, json_, length_); + checkSum_ = CheckSum(); + } + + char CheckSum() { + char c = 0; + for (size_t i = 0; i < length_; ++i) + c += temp_[i]; + return c; + } + + virtual void TearDown() { + PerfTest::TearDown(); + free(temp_); + } + +protected: + char *temp_; + char checkSum_; +}; + +TEST_F(Platform, CheckSum) { + for (int i = 0; i < kTrialCount; i++) + EXPECT_EQ(checkSum_, CheckSum()); +} + +TEST_F(Platform, strlen) { + for (int i = 0; i < kTrialCount; i++) { + size_t l = strlen(json_); + EXPECT_EQ(length_, l); + } +} + +TEST_F(Platform, memcmp) { + for (int i = 0; i < kTrialCount; i++) { + EXPECT_EQ(0u, memcmp(temp_, json_, length_)); + } +} + +TEST_F(Platform, pow) { + double sum = 0; + for (int i = 0; i < kTrialCount * kTrialCount; i++) + sum += pow(10.0, i & 255); + EXPECT_GT(sum, 0.0); +} + +TEST_F(Platform, Whitespace_strlen) { + for (int i = 0; i < kTrialCount; i++) { + size_t l = strlen(whitespace_); + EXPECT_GT(l, whitespace_length_); + } +} + +TEST_F(Platform, Whitespace_strspn) { + for (int i = 0; i < kTrialCount; i++) { + size_t l = strspn(whitespace_, " \n\r\t"); + EXPECT_EQ(whitespace_length_, l); + } +} + +TEST_F(Platform, fread) { + for (int i = 0; i < kTrialCount; i++) { + FILE *fp = fopen(filename_, "rb"); + ASSERT_EQ(length_, fread(temp_, 1, length_, fp)); + EXPECT_EQ(checkSum_, CheckSum()); + fclose(fp); + } +} + +#ifdef _MSC_VER +TEST_F(Platform, read) { + for (int i = 0; i < kTrialCount; i++) { + int fd = _open(filename_, _O_BINARY | _O_RDONLY); + ASSERT_NE(-1, fd); + ASSERT_EQ(length_, _read(fd, temp_, length_)); + EXPECT_EQ(checkSum_, CheckSum()); + _close(fd); + } +} +#else +TEST_F(Platform, read) { + for (int i = 0; i < kTrialCount; i++) { + int fd = open(filename_, O_RDONLY); + ASSERT_NE(-1, fd); + ASSERT_EQ(length_, read(fd, temp_, length_)); + EXPECT_EQ(checkSum_, CheckSum()); + close(fd); + } +} +#endif + +#ifdef _WIN32 +TEST_F(Platform, MapViewOfFile) { + for (int i = 0; i < kTrialCount; i++) { + HANDLE file = CreateFile(filename_, GENERIC_READ, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); + ASSERT_NE(INVALID_HANDLE_VALUE, file); + HANDLE mapObject = CreateFileMapping(file, NULL, PAGE_READONLY, 0, length_, NULL); + ASSERT_NE(INVALID_HANDLE_VALUE, mapObject); + void *p = MapViewOfFile(mapObject, FILE_MAP_READ, 0, 0, length_); + ASSERT_TRUE(p != NULL); + EXPECT_EQ(checkSum_, CheckSum()); + ASSERT_TRUE(UnmapViewOfFile(p) == TRUE); + ASSERT_TRUE(CloseHandle(mapObject) == TRUE); + ASSERT_TRUE(CloseHandle(file) == TRUE); + } +} +#endif + +#ifdef _POSIX_MAPPED_FILES +TEST_F(Platform, mmap) { + for (int i = 0; i < kTrialCount; i++) { + int fd = open(filename_, O_RDONLY); + ASSERT_NE(-1, fd); + void *p = mmap(NULL, length_, PROT_READ, MAP_PRIVATE, fd, 0); + ASSERT_TRUE(p != NULL); + EXPECT_EQ(checkSum_, CheckSum()); + munmap(p, length_); + close(fd); + } +} +#endif + +#endif // TEST_PLATFORM diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/test/perftest/rapidjsontest.cpp b/graphics/asymptote/LspCpp/third_party/rapidjson/test/perftest/rapidjsontest.cpp new file mode 100644 index 0000000000..ce41c109ab --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/test/perftest/rapidjsontest.cpp @@ -0,0 +1,564 @@ +// Tencent is pleased to support the open source community by making RapidJSON available. +// +// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. +// +// Licensed under the MIT License (the "License"); you may not use this file except +// in compliance with the License. You may obtain a copy of the License at +// +// http://opensource.org/licenses/MIT +// +// Unless required by applicable law or agreed to in writing, software distributed +// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +// CONDITIONS OF ANY KIND, either express or implied. See the License for the +// specific language governing permissions and limitations under the License. + +#include "perftest.h" + +#if TEST_RAPIDJSON + +#include "rapidjson/rapidjson.h" +#include "rapidjson/document.h" +#include "rapidjson/prettywriter.h" +#include "rapidjson/stringbuffer.h" +#include "rapidjson/filereadstream.h" +#include "rapidjson/istreamwrapper.h" +#include "rapidjson/encodedstream.h" +#include "rapidjson/memorystream.h" + +#include +#include + +#ifdef RAPIDJSON_SSE2 +#define SIMD_SUFFIX(name) name##_SSE2 +#elif defined(RAPIDJSON_SSE42) +#define SIMD_SUFFIX(name) name##_SSE42 +#elif defined(RAPIDJSON_NEON) +#define SIMD_SUFFIX(name) name##_NEON +#else +#define SIMD_SUFFIX(name) name +#endif + +using namespace rapidjson; + +class RapidJson : public PerfTest { +public: + RapidJson() : temp_(), doc_() {} + + virtual void SetUp() { + PerfTest::SetUp(); + + // temp buffer for insitu parsing. + temp_ = (char *)malloc(length_ + 1); + + // Parse as a document + EXPECT_FALSE(doc_.Parse(json_).HasParseError()); + + for (size_t i = 0; i < 8; i++) + EXPECT_FALSE(typesDoc_[i].Parse(types_[i]).HasParseError()); + } + + virtual void TearDown() { + PerfTest::TearDown(); + free(temp_); + } + +private: + RapidJson(const RapidJson&); + RapidJson& operator=(const RapidJson&); + +protected: + char *temp_; + Document doc_; + Document typesDoc_[8]; +}; + +TEST_F(RapidJson, SIMD_SUFFIX(ReaderParseInsitu_DummyHandler)) { + for (size_t i = 0; i < kTrialCount; i++) { + memcpy(temp_, json_, length_ + 1); + InsituStringStream s(temp_); + BaseReaderHandler<> h; + Reader reader; + EXPECT_TRUE(reader.Parse(s, h)); + } +} + +TEST_F(RapidJson, SIMD_SUFFIX(ReaderParseInsitu_DummyHandler_ValidateEncoding)) { + for (size_t i = 0; i < kTrialCount; i++) { + memcpy(temp_, json_, length_ + 1); + InsituStringStream s(temp_); + BaseReaderHandler<> h; + Reader reader; + EXPECT_TRUE(reader.Parse(s, h)); + } +} + +TEST_F(RapidJson, SIMD_SUFFIX(ReaderParse_DummyHandler)) { + for (size_t i = 0; i < kTrialCount; i++) { + StringStream s(json_); + BaseReaderHandler<> h; + Reader reader; + EXPECT_TRUE(reader.Parse(s, h)); + } +} + +#define TEST_TYPED(index, Name)\ +TEST_F(RapidJson, SIMD_SUFFIX(ReaderParse_DummyHandler_##Name)) {\ + for (size_t i = 0; i < kTrialCount * 10; i++) {\ + StringStream s(types_[index]);\ + BaseReaderHandler<> h;\ + Reader reader;\ + EXPECT_TRUE(reader.Parse(s, h));\ + }\ +}\ +TEST_F(RapidJson, SIMD_SUFFIX(ReaderParseInsitu_DummyHandler_##Name)) {\ + for (size_t i = 0; i < kTrialCount * 10; i++) {\ + memcpy(temp_, types_[index], typesLength_[index] + 1);\ + InsituStringStream s(temp_);\ + BaseReaderHandler<> h;\ + Reader reader;\ + EXPECT_TRUE(reader.Parse(s, h));\ + }\ +} + +TEST_TYPED(0, Booleans) +TEST_TYPED(1, Floats) +TEST_TYPED(2, Guids) +TEST_TYPED(3, Integers) +TEST_TYPED(4, Mixed) +TEST_TYPED(5, Nulls) +TEST_TYPED(6, Paragraphs) + +#undef TEST_TYPED + +TEST_F(RapidJson, SIMD_SUFFIX(ReaderParse_DummyHandler_FullPrecision)) { + for (size_t i = 0; i < kTrialCount; i++) { + StringStream s(json_); + BaseReaderHandler<> h; + Reader reader; + EXPECT_TRUE(reader.Parse(s, h)); + } +} + +TEST_F(RapidJson, SIMD_SUFFIX(ReaderParseIterative_DummyHandler)) { + for (size_t i = 0; i < kTrialCount; i++) { + StringStream s(json_); + BaseReaderHandler<> h; + Reader reader; + EXPECT_TRUE(reader.Parse(s, h)); + } +} + +TEST_F(RapidJson, SIMD_SUFFIX(ReaderParseIterativeInsitu_DummyHandler)) { + for (size_t i = 0; i < kTrialCount; i++) { + memcpy(temp_, json_, length_ + 1); + InsituStringStream s(temp_); + BaseReaderHandler<> h; + Reader reader; + EXPECT_TRUE(reader.Parse(s, h)); + } +} + +TEST_F(RapidJson, SIMD_SUFFIX(ReaderParseIterativePull_DummyHandler)) { + for (size_t i = 0; i < kTrialCount; i++) { + StringStream s(json_); + BaseReaderHandler<> h; + Reader reader; + reader.IterativeParseInit(); + while (!reader.IterativeParseComplete()) { + if (!reader.IterativeParseNext(s, h)) + break; + } + EXPECT_FALSE(reader.HasParseError()); + } +} + +TEST_F(RapidJson, SIMD_SUFFIX(ReaderParseIterativePullInsitu_DummyHandler)) { + for (size_t i = 0; i < kTrialCount; i++) { + memcpy(temp_, json_, length_ + 1); + InsituStringStream s(temp_); + BaseReaderHandler<> h; + Reader reader; + reader.IterativeParseInit(); + while (!reader.IterativeParseComplete()) { + if (!reader.IterativeParseNext(s, h)) + break; + } + EXPECT_FALSE(reader.HasParseError()); + } +} + +TEST_F(RapidJson, SIMD_SUFFIX(ReaderParse_DummyHandler_ValidateEncoding)) { + for (size_t i = 0; i < kTrialCount; i++) { + StringStream s(json_); + BaseReaderHandler<> h; + Reader reader; + EXPECT_TRUE(reader.Parse(s, h)); + } +} + +TEST_F(RapidJson, SIMD_SUFFIX(DocumentParseInsitu_MemoryPoolAllocator)) { + for (size_t i = 0; i < kTrialCount; i++) { + memcpy(temp_, json_, length_ + 1); + Document doc; + doc.ParseInsitu(temp_); + ASSERT_TRUE(doc.IsObject()); + } +} + +TEST_F(RapidJson, SIMD_SUFFIX(DocumentParseIterativeInsitu_MemoryPoolAllocator)) { + for (size_t i = 0; i < kTrialCount; i++) { + memcpy(temp_, json_, length_ + 1); + Document doc; + doc.ParseInsitu(temp_); + ASSERT_TRUE(doc.IsObject()); + } +} + +TEST_F(RapidJson, SIMD_SUFFIX(DocumentParse_MemoryPoolAllocator)) { + for (size_t i = 0; i < kTrialCount; i++) { + Document doc; + doc.Parse(json_); + ASSERT_TRUE(doc.IsObject()); + } +} + +TEST_F(RapidJson, SIMD_SUFFIX(DocumentParseLength_MemoryPoolAllocator)) { + for (size_t i = 0; i < kTrialCount; i++) { + Document doc; + doc.Parse(json_, length_); + ASSERT_TRUE(doc.IsObject()); + } +} + +#if RAPIDJSON_HAS_STDSTRING +TEST_F(RapidJson, SIMD_SUFFIX(DocumentParseStdString_MemoryPoolAllocator)) { + const std::string s(json_, length_); + for (size_t i = 0; i < kTrialCount; i++) { + Document doc; + doc.Parse(s); + ASSERT_TRUE(doc.IsObject()); + } +} +#endif + +TEST_F(RapidJson, SIMD_SUFFIX(DocumentParseIterative_MemoryPoolAllocator)) { + for (size_t i = 0; i < kTrialCount; i++) { + Document doc; + doc.Parse(json_); + ASSERT_TRUE(doc.IsObject()); + } +} + +TEST_F(RapidJson, SIMD_SUFFIX(DocumentParse_CrtAllocator)) { + for (size_t i = 0; i < kTrialCount; i++) { + memcpy(temp_, json_, length_ + 1); + GenericDocument, CrtAllocator> doc; + doc.Parse(temp_); + ASSERT_TRUE(doc.IsObject()); + } +} + +TEST_F(RapidJson, SIMD_SUFFIX(DocumentParseEncodedInputStream_MemoryStream)) { + for (size_t i = 0; i < kTrialCount; i++) { + MemoryStream ms(json_, length_); + EncodedInputStream, MemoryStream> is(ms); + Document doc; + doc.ParseStream<0, UTF8<> >(is); + ASSERT_TRUE(doc.IsObject()); + } +} + +TEST_F(RapidJson, SIMD_SUFFIX(DocumentParseAutoUTFInputStream_MemoryStream)) { + for (size_t i = 0; i < kTrialCount; i++) { + MemoryStream ms(json_, length_); + AutoUTFInputStream is(ms); + Document doc; + doc.ParseStream<0, AutoUTF >(is); + ASSERT_TRUE(doc.IsObject()); + } +} + +template +size_t Traverse(const T& value) { + size_t count = 1; + switch(value.GetType()) { + case kObjectType: + for (typename T::ConstMemberIterator itr = value.MemberBegin(); itr != value.MemberEnd(); ++itr) { + count++; // name + count += Traverse(itr->value); + } + break; + + case kArrayType: + for (typename T::ConstValueIterator itr = value.Begin(); itr != value.End(); ++itr) + count += Traverse(*itr); + break; + + default: + // Do nothing. + break; + } + return count; +} + +TEST_F(RapidJson, DocumentTraverse) { + for (size_t i = 0; i < kTrialCount; i++) { + size_t count = Traverse(doc_); + EXPECT_EQ(4339u, count); + //if (i == 0) + // std::cout << count << std::endl; + } +} + +#ifdef __GNUC__ +RAPIDJSON_DIAG_PUSH +RAPIDJSON_DIAG_OFF(effc++) +#endif + +struct ValueCounter : public BaseReaderHandler<> { + ValueCounter() : count_(1) {} // root + + bool EndObject(SizeType memberCount) { count_ += memberCount * 2; return true; } + bool EndArray(SizeType elementCount) { count_ += elementCount; return true; } + + SizeType count_; +}; + +#ifdef __GNUC__ +RAPIDJSON_DIAG_POP +#endif + +TEST_F(RapidJson, DocumentAccept) { + for (size_t i = 0; i < kTrialCount; i++) { + ValueCounter counter; + doc_.Accept(counter); + EXPECT_EQ(4339u, counter.count_); + } +} + +TEST_F(RapidJson, DocumentFind) { + typedef Document::ValueType ValueType; + typedef ValueType::ConstMemberIterator ConstMemberIterator; + const Document &doc = typesDoc_[7]; // alotofkeys.json + if (doc.IsObject()) { + std::vector keys; + for (ConstMemberIterator it = doc.MemberBegin(); it != doc.MemberEnd(); ++it) { + keys.push_back(&it->name); + } + for (size_t i = 0; i < kTrialCount; i++) { + for (size_t j = 0; j < keys.size(); j++) { + EXPECT_TRUE(doc.FindMember(*keys[j]) != doc.MemberEnd()); + } + } + } +} + +struct NullStream { + typedef char Ch; + + NullStream() /*: length_(0)*/ {} + void Put(Ch) { /*++length_;*/ } + void Flush() {} + //size_t length_; +}; + +TEST_F(RapidJson, Writer_NullStream) { + for (size_t i = 0; i < kTrialCount; i++) { + NullStream s; + Writer writer(s); + doc_.Accept(writer); + //if (i == 0) + // std::cout << s.length_ << std::endl; + } +} + +TEST_F(RapidJson, SIMD_SUFFIX(Writer_StringBuffer)) { + for (size_t i = 0; i < kTrialCount; i++) { + StringBuffer s(0, 1024 * 1024); + Writer writer(s); + doc_.Accept(writer); + const char* str = s.GetString(); + (void)str; + //if (i == 0) + // std::cout << strlen(str) << std::endl; + } +} + +#define TEST_TYPED(index, Name)\ +TEST_F(RapidJson, SIMD_SUFFIX(Writer_StringBuffer_##Name)) {\ + for (size_t i = 0; i < kTrialCount * 10; i++) {\ + StringBuffer s(0, 1024 * 1024);\ + Writer writer(s);\ + typesDoc_[index].Accept(writer);\ + const char* str = s.GetString();\ + (void)str;\ + }\ +} + +TEST_TYPED(0, Booleans) +TEST_TYPED(1, Floats) +TEST_TYPED(2, Guids) +TEST_TYPED(3, Integers) +TEST_TYPED(4, Mixed) +TEST_TYPED(5, Nulls) +TEST_TYPED(6, Paragraphs) + +#undef TEST_TYPED + +TEST_F(RapidJson, SIMD_SUFFIX(PrettyWriter_StringBuffer)) { + for (size_t i = 0; i < kTrialCount; i++) { + StringBuffer s(0, 2048 * 1024); + PrettyWriter writer(s); + writer.SetIndent(' ', 1); + doc_.Accept(writer); + const char* str = s.GetString(); + (void)str; + //if (i == 0) + // std::cout << strlen(str) << std::endl; + } +} + +TEST_F(RapidJson, internal_Pow10) { + double sum = 0; + for (size_t i = 0; i < kTrialCount * kTrialCount; i++) + sum += internal::Pow10(int(i & 255)); + EXPECT_GT(sum, 0.0); +} + +TEST_F(RapidJson, SkipWhitespace_Basic) { + for (size_t i = 0; i < kTrialCount; i++) { + rapidjson::StringStream s(whitespace_); + while (s.Peek() == ' ' || s.Peek() == '\n' || s.Peek() == '\r' || s.Peek() == '\t') + s.Take(); + ASSERT_EQ('[', s.Peek()); + } +} + +TEST_F(RapidJson, SIMD_SUFFIX(SkipWhitespace)) { + for (size_t i = 0; i < kTrialCount; i++) { + rapidjson::StringStream s(whitespace_); + rapidjson::SkipWhitespace(s); + ASSERT_EQ('[', s.Peek()); + } +} + +TEST_F(RapidJson, SkipWhitespace_strspn) { + for (size_t i = 0; i < kTrialCount; i++) { + const char* s = whitespace_ + std::strspn(whitespace_, " \t\r\n"); + ASSERT_EQ('[', *s); + } +} + +TEST_F(RapidJson, UTF8_Validate) { + NullStream os; + + for (size_t i = 0; i < kTrialCount; i++) { + StringStream is(json_); + bool result = true; + while (is.Peek() != '\0') + result &= UTF8<>::Validate(is, os); + EXPECT_TRUE(result); + } +} + +TEST_F(RapidJson, FileReadStream) { + for (size_t i = 0; i < kTrialCount; i++) { + FILE *fp = fopen(filename_, "rb"); + char buffer[65536]; + FileReadStream s(fp, buffer, sizeof(buffer)); + while (s.Take() != '\0') + ; + fclose(fp); + } +} + +TEST_F(RapidJson, SIMD_SUFFIX(ReaderParse_DummyHandler_FileReadStream)) { + for (size_t i = 0; i < kTrialCount; i++) { + FILE *fp = fopen(filename_, "rb"); + char buffer[65536]; + FileReadStream s(fp, buffer, sizeof(buffer)); + BaseReaderHandler<> h; + Reader reader; + reader.Parse(s, h); + fclose(fp); + } +} + +TEST_F(RapidJson, IStreamWrapper) { + for (size_t i = 0; i < kTrialCount; i++) { + std::ifstream is(filename_, std::ios::in | std::ios::binary); + char buffer[65536]; + IStreamWrapper isw(is, buffer, sizeof(buffer)); + while (isw.Take() != '\0') + ; + is.close(); + } +} + +TEST_F(RapidJson, IStreamWrapper_Unbuffered) { + for (size_t i = 0; i < kTrialCount; i++) { + std::ifstream is(filename_, std::ios::in | std::ios::binary); + IStreamWrapper isw(is); + while (isw.Take() != '\0') + ; + is.close(); + } +} + +TEST_F(RapidJson, IStreamWrapper_Setbuffered) { + for (size_t i = 0; i < kTrialCount; i++) { + std::ifstream is; + char buffer[65536]; + is.rdbuf()->pubsetbuf(buffer, sizeof(buffer)); + is.open(filename_, std::ios::in | std::ios::binary); + IStreamWrapper isw(is); + while (isw.Take() != '\0') + ; + is.close(); + } +} + +TEST_F(RapidJson, SIMD_SUFFIX(ReaderParse_DummyHandler_IStreamWrapper)) { + for (size_t i = 0; i < kTrialCount; i++) { + std::ifstream is(filename_, std::ios::in | std::ios::binary); + char buffer[65536]; + IStreamWrapper isw(is, buffer, sizeof(buffer)); + BaseReaderHandler<> h; + Reader reader; + reader.Parse(isw, h); + is.close(); + } +} + +TEST_F(RapidJson, SIMD_SUFFIX(ReaderParse_DummyHandler_IStreamWrapper_Unbuffered)) { + for (size_t i = 0; i < kTrialCount; i++) { + std::ifstream is(filename_, std::ios::in | std::ios::binary); + IStreamWrapper isw(is); + BaseReaderHandler<> h; + Reader reader; + reader.Parse(isw, h); + is.close(); + } +} + +TEST_F(RapidJson, SIMD_SUFFIX(ReaderParse_DummyHandler_IStreamWrapper_Setbuffered)) { + for (size_t i = 0; i < kTrialCount; i++) { + std::ifstream is; + char buffer[65536]; + is.rdbuf()->pubsetbuf(buffer, sizeof(buffer)); + is.open(filename_, std::ios::in | std::ios::binary); + IStreamWrapper isw(is); + BaseReaderHandler<> h; + Reader reader; + reader.Parse(isw, h); + is.close(); + } +} + +TEST_F(RapidJson, StringBuffer) { + StringBuffer sb; + for (int i = 0; i < 32 * 1024 * 1024; i++) + sb.Put(i & 0x7f); +} + +#endif // TEST_RAPIDJSON diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/test/perftest/schematest.cpp b/graphics/asymptote/LspCpp/third_party/rapidjson/test/perftest/schematest.cpp new file mode 100644 index 0000000000..7d27344b5c --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/test/perftest/schematest.cpp @@ -0,0 +1,223 @@ +#include "perftest.h" + +#if TEST_RAPIDJSON + +#include "rapidjson/schema.h" +#include +#include +#include + +#define ARRAY_SIZE(a) sizeof(a) / sizeof(a[0]) + +using namespace rapidjson; + +RAPIDJSON_DIAG_PUSH +#if defined(__GNUC__) && __GNUC__ >= 7 +RAPIDJSON_DIAG_OFF(format-overflow) +#endif + +template +static char* ReadFile(const char* filename, Allocator& allocator) { + const char *paths[] = { + "", + "bin/", + "../bin/", + "../../bin/", + "../../../bin/" + }; + char buffer[1024]; + FILE *fp = 0; + for (size_t i = 0; i < sizeof(paths) / sizeof(paths[0]); i++) { + sprintf(buffer, "%s%s", paths[i], filename); + fp = fopen(buffer, "rb"); + if (fp) + break; + } + + if (!fp) + return 0; + + fseek(fp, 0, SEEK_END); + size_t length = static_cast(ftell(fp)); + fseek(fp, 0, SEEK_SET); + char* json = reinterpret_cast(allocator.Malloc(length + 1)); + size_t readLength = fread(json, 1, length, fp); + json[readLength] = '\0'; + fclose(fp); + return json; +} + +RAPIDJSON_DIAG_POP + +class Schema : public PerfTest { +public: + Schema() {} + + virtual void SetUp() { + PerfTest::SetUp(); + + const char* filenames[] = { + "additionalItems.json", + "additionalProperties.json", + "allOf.json", + "anyOf.json", + "default.json", + "definitions.json", + "dependencies.json", + "enum.json", + "items.json", + "maximum.json", + "maxItems.json", + "maxLength.json", + "maxProperties.json", + "minimum.json", + "minItems.json", + "minLength.json", + "minProperties.json", + "multipleOf.json", + "not.json", + "oneOf.json", + "pattern.json", + "patternProperties.json", + "properties.json", + "ref.json", + "refRemote.json", + "required.json", + "type.json", + "uniqueItems.json" + }; + + char jsonBuffer[65536]; + MemoryPoolAllocator<> jsonAllocator(jsonBuffer, sizeof(jsonBuffer)); + + for (size_t i = 0; i < ARRAY_SIZE(filenames); i++) { + char filename[FILENAME_MAX]; + sprintf(filename, "jsonschema/tests/draft4/%s", filenames[i]); + char* json = ReadFile(filename, jsonAllocator); + if (!json) { + printf("json test suite file %s not found", filename); + return; + } + + Document d; + d.Parse(json); + if (d.HasParseError()) { + printf("json test suite file %s has parse error", filename); + return; + } + + for (Value::ConstValueIterator schemaItr = d.Begin(); schemaItr != d.End(); ++schemaItr) { + std::string schemaDescription = (*schemaItr)["description"].GetString(); + if (IsExcludeTestSuite(schemaDescription)) + continue; + + TestSuite* ts = new TestSuite; + ts->schema = new SchemaDocument((*schemaItr)["schema"]); + + const Value& tests = (*schemaItr)["tests"]; + for (Value::ConstValueIterator testItr = tests.Begin(); testItr != tests.End(); ++testItr) { + if (IsExcludeTest(schemaDescription + ", " + (*testItr)["description"].GetString())) + continue; + + Document* d2 = new Document; + d2->CopyFrom((*testItr)["data"], d2->GetAllocator()); + ts->tests.push_back(d2); + } + testSuites.push_back(ts); + } + } + } + + virtual void TearDown() { + PerfTest::TearDown(); + for (TestSuiteList::const_iterator itr = testSuites.begin(); itr != testSuites.end(); ++itr) + delete *itr; + testSuites.clear(); + } + +private: + // Using the same exclusion in https://github.com/json-schema/JSON-Schema-Test-Suite + static bool IsExcludeTestSuite(const std::string& description) { + const char* excludeTestSuites[] = { + //lost failing these tests + "remote ref", + "remote ref, containing refs itself", + "fragment within remote ref", + "ref within remote ref", + "change resolution scope", + // these below were added to get jsck in the benchmarks) + "uniqueItems validation", + "valid definition", + "invalid definition" + }; + + for (size_t i = 0; i < ARRAY_SIZE(excludeTestSuites); i++) + if (excludeTestSuites[i] == description) + return true; + return false; + } + + // Using the same exclusion in https://github.com/json-schema/JSON-Schema-Test-Suite + static bool IsExcludeTest(const std::string& description) { + const char* excludeTests[] = { + //lots of validators fail these + "invalid definition, invalid definition schema", + "maxLength validation, two supplementary Unicode code points is long enough", + "minLength validation, one supplementary Unicode code point is not long enough", + //this is to get tv4 in the benchmarks + "heterogeneous enum validation, something else is invalid" + }; + + for (size_t i = 0; i < ARRAY_SIZE(excludeTests); i++) + if (excludeTests[i] == description) + return true; + return false; + } + + Schema(const Schema&); + Schema& operator=(const Schema&); + +protected: + typedef std::vector DocumentList; + + struct TestSuite { + TestSuite() : schema() {} + ~TestSuite() { + delete schema; + for (DocumentList::iterator itr = tests.begin(); itr != tests.end(); ++itr) + delete *itr; + } + SchemaDocument* schema; + DocumentList tests; + }; + + typedef std::vector TestSuiteList; + TestSuiteList testSuites; +}; + +TEST_F(Schema, TestSuite) { + char validatorBuffer[65536]; + MemoryPoolAllocator<> validatorAllocator(validatorBuffer, sizeof(validatorBuffer)); + + const int trialCount = 100000; + int testCount = 0; + clock_t start = clock(); + for (int i = 0; i < trialCount; i++) { + for (TestSuiteList::const_iterator itr = testSuites.begin(); itr != testSuites.end(); ++itr) { + const TestSuite& ts = **itr; + GenericSchemaValidator >, MemoryPoolAllocator<> > validator(*ts.schema, &validatorAllocator); + for (DocumentList::const_iterator testItr = ts.tests.begin(); testItr != ts.tests.end(); ++testItr) { + validator.Reset(); + (*testItr)->Accept(validator); + testCount++; + } + validatorAllocator.Clear(); + } + } + clock_t end = clock(); + double duration = double(end - start) / CLOCKS_PER_SEC; + printf("%d trials in %f s -> %f trials per sec\n", trialCount, duration, trialCount / duration); + printf("%d tests per trial\n", testCount / trialCount); +} + +#endif diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/CMakeLists.txt b/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/CMakeLists.txt new file mode 100644 index 0000000000..565ed98239 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/CMakeLists.txt @@ -0,0 +1,95 @@ +include(CheckCXXCompilerFlag) + +set(UNITTEST_SOURCES + allocatorstest.cpp + bigintegertest.cpp + clzlltest.cpp + cursorstreamwrappertest.cpp + documenttest.cpp + dtoatest.cpp + encodedstreamtest.cpp + encodingstest.cpp + fwdtest.cpp + filestreamtest.cpp + itoatest.cpp + istreamwrappertest.cpp + jsoncheckertest.cpp + namespacetest.cpp + pointertest.cpp + platformtest.cpp + prettywritertest.cpp + ostreamwrappertest.cpp + readertest.cpp + regextest.cpp + schematest.cpp + simdtest.cpp + strfunctest.cpp + stringbuffertest.cpp + strtodtest.cpp + unittest.cpp + uritest.cpp + valuetest.cpp + writertest.cpp) + +find_program(CCACHE_FOUND ccache) +if(CCACHE_FOUND) + set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache) + set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ccache) + if (CMAKE_CXX_COMPILER_ID MATCHES "Clang") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Qunused-arguments -fcolor-diagnostics") + endif() +endif(CCACHE_FOUND) + +set_property(DIRECTORY PROPERTY COMPILE_OPTIONS ${EXTRA_CXX_FLAGS}) + +if (CMAKE_CXX_COMPILER_ID MATCHES "Clang") + # If the user is running a newer version of Clang that includes the + # -Wdouble-promotion, we will ignore that warning. + if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 3.7) + CHECK_CXX_COMPILER_FLAG("-Wno-double-promotion" HAS_NO_DOUBLE_PROMOTION) + if (HAS_NO_DOUBLE_PROMOTION) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-double-promotion") + endif() + endif() +elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC") + # Force to always compile with /W4 + if(CMAKE_CXX_FLAGS MATCHES "/W[0-4]") + string(REGEX REPLACE "/W[0-4]" "/W4" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") + else() + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4") + endif() + + # Force to always compile with /WX + if(CMAKE_CXX_FLAGS MATCHES "/WX-") + string(REGEX REPLACE "/WX-" "/WX" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") + else() + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /WX") + endif() +endif() + +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DRAPIDJSON_HAS_STDSTRING=1") + +add_library(namespacetest STATIC namespacetest.cpp) + +add_executable(unittest ${UNITTEST_SOURCES}) +target_link_libraries(unittest ${TEST_LIBRARIES} namespacetest) + +add_dependencies(tests unittest) + +add_test(NAME unittest + COMMAND ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest + WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/bin) + +if(NOT MSVC) + # Not running SIMD.* unit test cases for Valgrind + add_test(NAME valgrind_unittest + COMMAND valgrind --suppressions=${CMAKE_SOURCE_DIR}/test/valgrind.supp --leak-check=full --error-exitcode=1 ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest --gtest_filter=-SIMD.* + WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/bin) + + if(CMAKE_BUILD_TYPE STREQUAL "Debug") + add_test(NAME symbol_check + COMMAND sh -c "objdump -t -C libnamespacetest.a | grep rapidjson ; test $? -ne 0" + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) + endif(CMAKE_BUILD_TYPE STREQUAL "Debug") + +endif(NOT MSVC) diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/allocatorstest.cpp b/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/allocatorstest.cpp new file mode 100644 index 0000000000..2ffc325426 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/allocatorstest.cpp @@ -0,0 +1,292 @@ +// Tencent is pleased to support the open source community by making RapidJSON available. +// +// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. +// +// Licensed under the MIT License (the "License"); you may not use this file except +// in compliance with the License. You may obtain a copy of the License at +// +// http://opensource.org/licenses/MIT +// +// Unless required by applicable law or agreed to in writing, software distributed +// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +// CONDITIONS OF ANY KIND, either express or implied. See the License for the +// specific language governing permissions and limitations under the License. + +#include "unittest.h" + +#include "rapidjson/allocators.h" + +#include +#include +#include +#include + +using namespace rapidjson; + +template +void TestAllocator(Allocator& a) { + EXPECT_TRUE(a.Malloc(0) == 0); + + uint8_t* p = static_cast(a.Malloc(100)); + EXPECT_TRUE(p != 0); + for (size_t i = 0; i < 100; i++) + p[i] = static_cast(i); + + // Expand + uint8_t* q = static_cast(a.Realloc(p, 100, 200)); + EXPECT_TRUE(q != 0); + for (size_t i = 0; i < 100; i++) + EXPECT_EQ(i, q[i]); + for (size_t i = 100; i < 200; i++) + q[i] = static_cast(i); + + // Shrink + uint8_t *r = static_cast(a.Realloc(q, 200, 150)); + EXPECT_TRUE(r != 0); + for (size_t i = 0; i < 150; i++) + EXPECT_EQ(i, r[i]); + + Allocator::Free(r); + + // Realloc to zero size + EXPECT_TRUE(a.Realloc(a.Malloc(1), 1, 0) == 0); +} + +struct TestStdAllocatorData { + TestStdAllocatorData(int &constructions, int &destructions) : + constructions_(&constructions), + destructions_(&destructions) + { + ++*constructions_; + } + TestStdAllocatorData(const TestStdAllocatorData& rhs) : + constructions_(rhs.constructions_), + destructions_(rhs.destructions_) + { + ++*constructions_; + } + TestStdAllocatorData& operator=(const TestStdAllocatorData& rhs) + { + this->~TestStdAllocatorData(); + constructions_ = rhs.constructions_; + destructions_ = rhs.destructions_; + ++*constructions_; + return *this; + } + ~TestStdAllocatorData() + { + ++*destructions_; + } +private: + TestStdAllocatorData(); + int *constructions_, + *destructions_; +}; + +template +void TestStdAllocator(const Allocator& a) { +#if RAPIDJSON_HAS_CXX17 + typedef StdAllocator BoolAllocator; +#else + typedef StdAllocator VoidAllocator; + typedef typename VoidAllocator::template rebind::other BoolAllocator; +#endif + BoolAllocator ba(a), ba2(a); + EXPECT_TRUE(ba == ba2); + EXPECT_FALSE(ba!= ba2); + ba.deallocate(ba.allocate()); + EXPECT_TRUE(ba == ba2); + EXPECT_FALSE(ba != ba2); + + unsigned long long ll = 0, *llp = ≪ + const unsigned long long cll = 0, *cllp = &cll; + StdAllocator lla(a); + EXPECT_EQ(lla.address(ll), llp); + EXPECT_EQ(lla.address(cll), cllp); + EXPECT_TRUE(lla.max_size() > 0 && lla.max_size() <= SIZE_MAX / sizeof(unsigned long long)); + + int *arr; + StdAllocator ia(a); + arr = ia.allocate(10 * sizeof(int)); + EXPECT_TRUE(arr != 0); + for (int i = 0; i < 10; ++i) { + arr[i] = 0x0f0f0f0f; + } + ia.deallocate(arr, 10); + arr = Malloc(ia, 10); + EXPECT_TRUE(arr != 0); + for (int i = 0; i < 10; ++i) { + arr[i] = 0x0f0f0f0f; + } + arr = Realloc(ia, arr, 10, 20); + EXPECT_TRUE(arr != 0); + for (int i = 0; i < 10; ++i) { + EXPECT_EQ(arr[i], 0x0f0f0f0f); + } + for (int i = 10; i < 20; i++) { + arr[i] = 0x0f0f0f0f; + } + Free(ia, arr, 20); + + int cons = 0, dest = 0; + StdAllocator da(a); + for (int i = 1; i < 10; i++) { + TestStdAllocatorData *d = da.allocate(); + EXPECT_TRUE(d != 0); + + da.destroy(new(d) TestStdAllocatorData(cons, dest)); + EXPECT_EQ(cons, i); + EXPECT_EQ(dest, i); + + da.deallocate(d); + } + + typedef StdAllocator CharAllocator; + typedef std::basic_string, CharAllocator> String; +#if RAPIDJSON_HAS_CXX11 + String s(CharAllocator{a}); +#else + CharAllocator ca(a); + String s(ca); +#endif + for (int i = 0; i < 26; i++) { + s.push_back(static_cast('A' + i)); + } + EXPECT_TRUE(s == "ABCDEFGHIJKLMNOPQRSTUVWXYZ"); + + typedef StdAllocator, Allocator> MapAllocator; + typedef std::map, MapAllocator> Map; +#if RAPIDJSON_HAS_CXX11 + Map map(std::less(), MapAllocator{a}); +#else + MapAllocator ma(a); + Map map(std::less(), ma); +#endif + for (int i = 0; i < 10; i++) { + map.insert(std::make_pair(i, (i % 2) == 0)); + } + EXPECT_TRUE(map.size() == 10); + for (int i = 0; i < 10; i++) { + typename Map::iterator it = map.find(i); + EXPECT_TRUE(it != map.end()); + EXPECT_TRUE(it->second == ((i % 2) == 0)); + } +} + +TEST(Allocator, CrtAllocator) { + CrtAllocator a; + + TestAllocator(a); + TestStdAllocator(a); + + CrtAllocator a2; + EXPECT_TRUE(a == a2); + EXPECT_FALSE(a != a2); + a2.Free(a2.Malloc(1)); + EXPECT_TRUE(a == a2); + EXPECT_FALSE(a != a2); +} + +TEST(Allocator, MemoryPoolAllocator) { + const size_t capacity = RAPIDJSON_ALLOCATOR_DEFAULT_CHUNK_CAPACITY; + MemoryPoolAllocator<> a(capacity); + + a.Clear(); // noop + EXPECT_EQ(a.Size(), 0u); + EXPECT_EQ(a.Capacity(), 0u); + EXPECT_EQ(a.Shared(), false); + { + MemoryPoolAllocator<> a2(a); + EXPECT_EQ(a2.Shared(), true); + EXPECT_EQ(a.Shared(), true); + EXPECT_TRUE(a == a2); + EXPECT_FALSE(a != a2); + a2.Free(a2.Malloc(1)); + EXPECT_TRUE(a == a2); + EXPECT_FALSE(a != a2); + } + EXPECT_EQ(a.Shared(), false); + EXPECT_EQ(a.Capacity(), capacity); + EXPECT_EQ(a.Size(), 8u); // aligned + a.Clear(); + EXPECT_EQ(a.Capacity(), 0u); + EXPECT_EQ(a.Size(), 0u); + + TestAllocator(a); + TestStdAllocator(a); + + for (size_t i = 1; i < 1000; i++) { + EXPECT_TRUE(a.Malloc(i) != 0); + EXPECT_LE(a.Size(), a.Capacity()); + } + + CrtAllocator baseAllocator; + a = MemoryPoolAllocator<>(capacity, &baseAllocator); + EXPECT_EQ(a.Capacity(), 0u); + EXPECT_EQ(a.Size(), 0u); + a.Free(a.Malloc(1)); + EXPECT_EQ(a.Capacity(), capacity); + EXPECT_EQ(a.Size(), 8u); // aligned + + { + a.Clear(); + const size_t bufSize = 1024; + char *buffer = (char *)a.Malloc(bufSize); + MemoryPoolAllocator<> aligned_a(buffer, bufSize); + EXPECT_TRUE(aligned_a.Capacity() > 0 && aligned_a.Capacity() <= bufSize); + EXPECT_EQ(aligned_a.Size(), 0u); + aligned_a.Free(aligned_a.Malloc(1)); + EXPECT_TRUE(aligned_a.Capacity() > 0 && aligned_a.Capacity() <= bufSize); + EXPECT_EQ(aligned_a.Size(), 8u); // aligned + } + + { + a.Clear(); + const size_t bufSize = 1024; + char *buffer = (char *)a.Malloc(bufSize); + RAPIDJSON_ASSERT(bufSize % sizeof(void*) == 0); + MemoryPoolAllocator<> unaligned_a(buffer + 1, bufSize - 1); + EXPECT_TRUE(unaligned_a.Capacity() > 0 && unaligned_a.Capacity() <= bufSize - sizeof(void*)); + EXPECT_EQ(unaligned_a.Size(), 0u); + unaligned_a.Free(unaligned_a.Malloc(1)); + EXPECT_TRUE(unaligned_a.Capacity() > 0 && unaligned_a.Capacity() <= bufSize - sizeof(void*)); + EXPECT_EQ(unaligned_a.Size(), 8u); // aligned + } +} + +TEST(Allocator, Alignment) { + if (sizeof(size_t) >= 8) { + EXPECT_EQ(RAPIDJSON_UINT64_C2(0x00000000, 0x00000000), RAPIDJSON_ALIGN(0)); + for (uint64_t i = 1; i < 8; i++) { + EXPECT_EQ(RAPIDJSON_UINT64_C2(0x00000000, 0x00000008), RAPIDJSON_ALIGN(i)); + EXPECT_EQ(RAPIDJSON_UINT64_C2(0x00000000, 0x00000010), RAPIDJSON_ALIGN(RAPIDJSON_UINT64_C2(0x00000000, 0x00000008) + i)); + EXPECT_EQ(RAPIDJSON_UINT64_C2(0x00000001, 0x00000000), RAPIDJSON_ALIGN(RAPIDJSON_UINT64_C2(0x00000000, 0xFFFFFFF8) + i)); + EXPECT_EQ(RAPIDJSON_UINT64_C2(0xFFFFFFFF, 0xFFFFFFF8), RAPIDJSON_ALIGN(RAPIDJSON_UINT64_C2(0xFFFFFFFF, 0xFFFFFFF0) + i)); + } + } + + EXPECT_EQ(0u, RAPIDJSON_ALIGN(0u)); + for (uint32_t i = 1; i < 8; i++) { + EXPECT_EQ(8u, RAPIDJSON_ALIGN(i)); + EXPECT_EQ(0xFFFFFFF8u, RAPIDJSON_ALIGN(0xFFFFFFF0u + i)); + } +} + +TEST(Allocator, Issue399) { + MemoryPoolAllocator<> a; + void* p = a.Malloc(100); + void* q = a.Realloc(p, 100, 200); + EXPECT_EQ(p, q); + + // exhuasive testing + for (size_t j = 1; j < 32; j++) { + a.Clear(); + a.Malloc(j); // some unaligned size + p = a.Malloc(1); + for (size_t i = 1; i < 1024; i++) { + q = a.Realloc(p, i, i + 1); + EXPECT_EQ(p, q); + p = q; + } + } +} diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/bigintegertest.cpp b/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/bigintegertest.cpp new file mode 100644 index 0000000000..fad54382ca --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/bigintegertest.cpp @@ -0,0 +1,138 @@ +// Tencent is pleased to support the open source community by making RapidJSON available. +// +// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. +// +// Licensed under the MIT License (the "License"); you may not use this file except +// in compliance with the License. You may obtain a copy of the License at +// +// http://opensource.org/licenses/MIT +// +// Unless required by applicable law or agreed to in writing, software distributed +// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +// CONDITIONS OF ANY KIND, either express or implied. See the License for the +// specific language governing permissions and limitations under the License. + +#include "unittest.h" + +#include "rapidjson/internal/biginteger.h" + +using namespace rapidjson::internal; + +#define BIGINTEGER_LITERAL(s) BigInteger(s, sizeof(s) - 1) + +static const BigInteger kZero(0); +static const BigInteger kOne(1); +static const BigInteger kUint64Max = BIGINTEGER_LITERAL("18446744073709551615"); +static const BigInteger kTwo64 = BIGINTEGER_LITERAL("18446744073709551616"); + +TEST(BigInteger, Constructor) { + EXPECT_TRUE(kZero.IsZero()); + EXPECT_TRUE(kZero == kZero); + EXPECT_TRUE(kZero == BIGINTEGER_LITERAL("0")); + EXPECT_TRUE(kZero == BIGINTEGER_LITERAL("00")); + + const BigInteger a(123); + EXPECT_TRUE(a == a); + EXPECT_TRUE(a == BIGINTEGER_LITERAL("123")); + EXPECT_TRUE(a == BIGINTEGER_LITERAL("0123")); + + EXPECT_EQ(2u, kTwo64.GetCount()); + EXPECT_EQ(0u, kTwo64.GetDigit(0)); + EXPECT_EQ(1u, kTwo64.GetDigit(1)); +} + +TEST(BigInteger, AddUint64) { + BigInteger a = kZero; + a += 0u; + EXPECT_TRUE(kZero == a); + + a += 1u; + EXPECT_TRUE(kOne == a); + + a += 1u; + EXPECT_TRUE(BigInteger(2) == a); + + EXPECT_TRUE(BigInteger(RAPIDJSON_UINT64_C2(0xFFFFFFFF, 0xFFFFFFFF)) == kUint64Max); + BigInteger b = kUint64Max; + b += 1u; + EXPECT_TRUE(kTwo64 == b); + b += RAPIDJSON_UINT64_C2(0xFFFFFFFF, 0xFFFFFFFF); + EXPECT_TRUE(BIGINTEGER_LITERAL("36893488147419103231") == b); +} + +TEST(BigInteger, MultiplyUint64) { + BigInteger a = kZero; + a *= static_cast (0); + EXPECT_TRUE(kZero == a); + a *= static_cast (123); + EXPECT_TRUE(kZero == a); + + BigInteger b = kOne; + b *= static_cast(1); + EXPECT_TRUE(kOne == b); + b *= static_cast(0); + EXPECT_TRUE(kZero == b); + + BigInteger c(123); + c *= static_cast(456u); + EXPECT_TRUE(BigInteger(123u * 456u) == c); + c *= RAPIDJSON_UINT64_C2(0xFFFFFFFF, 0xFFFFFFFF); + EXPECT_TRUE(BIGINTEGER_LITERAL("1034640981606221330982120") == c); + c *= RAPIDJSON_UINT64_C2(0xFFFFFFFF, 0xFFFFFFFF); + EXPECT_TRUE(BIGINTEGER_LITERAL("19085757395861596536664473018420572782123800") == c); +} + +TEST(BigInteger, MultiplyUint32) { + BigInteger a = kZero; + a *= static_cast (0); + EXPECT_TRUE(kZero == a); + a *= static_cast (123); + EXPECT_TRUE(kZero == a); + + BigInteger b = kOne; + b *= static_cast(1); + EXPECT_TRUE(kOne == b); + b *= static_cast(0); + EXPECT_TRUE(kZero == b); + + BigInteger c(123); + c *= static_cast(456u); + EXPECT_TRUE(BigInteger(123u * 456u) == c); + c *= 0xFFFFFFFFu; + EXPECT_TRUE(BIGINTEGER_LITERAL("240896125641960") == c); + c *= 0xFFFFFFFFu; + EXPECT_TRUE(BIGINTEGER_LITERAL("1034640981124429079698200") == c); +} + +TEST(BigInteger, LeftShift) { + BigInteger a = kZero; + a <<= 1; + EXPECT_TRUE(kZero == a); + a <<= 64; + EXPECT_TRUE(kZero == a); + + a = BigInteger(123); + a <<= 0; + EXPECT_TRUE(BigInteger(123) == a); + a <<= 1; + EXPECT_TRUE(BigInteger(246) == a); + a <<= 64; + EXPECT_TRUE(BIGINTEGER_LITERAL("4537899042132549697536") == a); + a <<= 99; + EXPECT_TRUE(BIGINTEGER_LITERAL("2876235222267216943024851750785644982682875244576768") == a); + + a = 1; + a <<= 64; // a.count_ != 1 + a <<= 256; // interShift == 0 + EXPECT_TRUE(BIGINTEGER_LITERAL("2135987035920910082395021706169552114602704522356652769947041607822219725780640550022962086936576") == a); +} + +TEST(BigInteger, Compare) { + EXPECT_EQ(0, kZero.Compare(kZero)); + EXPECT_EQ(1, kOne.Compare(kZero)); + EXPECT_EQ(-1, kZero.Compare(kOne)); + EXPECT_EQ(0, kUint64Max.Compare(kUint64Max)); + EXPECT_EQ(0, kTwo64.Compare(kTwo64)); + EXPECT_EQ(-1, kUint64Max.Compare(kTwo64)); + EXPECT_EQ(1, kTwo64.Compare(kUint64Max)); +} diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/clzlltest.cpp b/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/clzlltest.cpp new file mode 100644 index 0000000000..ad465e1f31 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/clzlltest.cpp @@ -0,0 +1,34 @@ +// Tencent is pleased to support the open source community by making RapidJSON available. +// +// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. +// +// Licensed under the MIT License (the "License"); you may not use this file except +// in compliance with the License. You may obtain a copy of the License at +// +// http://opensource.org/licenses/MIT +// +// Unless required by applicable law or agreed to in writing, software distributed +// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +// CONDITIONS OF ANY KIND, either express or implied. See the License for the +// specific language governing permissions and limitations under the License. + +#include "unittest.h" +#include "rapidjson/internal/clzll.h" + +#ifdef __GNUC__ +RAPIDJSON_DIAG_PUSH +#endif + +using namespace rapidjson::internal; + +TEST(clzll, normal) { + EXPECT_EQ(clzll(1), 63U); + EXPECT_EQ(clzll(2), 62U); + EXPECT_EQ(clzll(12), 60U); + EXPECT_EQ(clzll(0x0000000080000001UL), 32U); + EXPECT_EQ(clzll(0x8000000000000001UL), 0U); +} + +#ifdef __GNUC__ +RAPIDJSON_DIAG_POP +#endif diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/cursorstreamwrappertest.cpp b/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/cursorstreamwrappertest.cpp new file mode 100644 index 0000000000..dad3359459 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/cursorstreamwrappertest.cpp @@ -0,0 +1,115 @@ +// Tencent is pleased to support the open source community by making RapidJSON available. +// +// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. +// +// Licensed under the MIT License (the "License"); you may not use this file except +// in compliance with the License. You may obtain a copy of the License at +// +// http://opensource.org/licenses/MIT +// +// Unless required by applicable law or agreed to in writing, software distributed +// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +// CONDITIONS OF ANY KIND, either express or implied. See the License for the +// specific language governing permissions and limitations under the License. + +#include "unittest.h" +#include "rapidjson/document.h" +#include "rapidjson/cursorstreamwrapper.h" + +using namespace rapidjson; + +// static const char json[] = "{\"string\"\n\n:\"my string\",\"array\"\n:[\"1\", \"2\", \"3\"]}"; + +bool testJson(const char *json, size_t &line, size_t &col) { + StringStream ss(json); + CursorStreamWrapper csw(ss); + Document document; + document.ParseStream(csw); + bool ret = document.HasParseError(); + if (ret) { + col = csw.GetColumn(); + line = csw.GetLine(); + } + return ret; +} + +TEST(CursorStreamWrapper, MissingFirstBracket) { + const char json[] = "\"string\"\n\n:\"my string\",\"array\"\n:[\"1\", \"2\", \"3\"]}"; + size_t col, line; + bool ret = testJson(json, line, col); + EXPECT_TRUE(ret); + EXPECT_EQ(line, 3u); + EXPECT_EQ(col, 0u); +} + +TEST(CursorStreamWrapper, MissingQuotes) { + const char json[] = "{\"string\n\n:\"my string\",\"array\"\n:[\"1\", \"2\", \"3\"]}"; + size_t col, line; + bool ret = testJson(json, line, col); + EXPECT_TRUE(ret); + EXPECT_EQ(line, 1u); + EXPECT_EQ(col, 8u); +} + +TEST(CursorStreamWrapper, MissingColon) { + const char json[] = "{\"string\"\n\n\"my string\",\"array\"\n:[\"1\", \"2\", \"3\"]}"; + size_t col, line; + bool ret = testJson(json, line, col); + EXPECT_TRUE(ret); + EXPECT_EQ(line, 3u); + EXPECT_EQ(col, 0u); +} + +TEST(CursorStreamWrapper, MissingSecondQuotes) { + const char json[] = "{\"string\"\n\n:my string\",\"array\"\n:[\"1\", \"2\", \"3\"]}"; + size_t col, line; + bool ret = testJson(json, line, col); + EXPECT_TRUE(ret); + EXPECT_EQ(line, 3u); + EXPECT_EQ(col, 1u); +} + +TEST(CursorStreamWrapper, MissingComma) { + const char json[] = "{\"string\"\n\n:\"my string\"\"array\"\n:[\"1\", \"2\", \"3\"]}"; + size_t col, line; + bool ret = testJson(json, line, col); + EXPECT_TRUE(ret); + EXPECT_EQ(line, 3u); + EXPECT_EQ(col, 12u); +} + +TEST(CursorStreamWrapper, MissingArrayBracket) { + const char json[] = "{\"string\"\n\n:\"my string\",\"array\"\n:\"1\", \"2\", \"3\"]}"; + size_t col, line; + bool ret = testJson(json, line, col); + EXPECT_TRUE(ret); + EXPECT_EQ(line, 4u); + EXPECT_EQ(col, 9u); +} + +TEST(CursorStreamWrapper, MissingArrayComma) { + const char json[] = "{\"string\"\n\n:\"my string\",\"array\"\n:[\"1\" \"2\", \"3\"]}"; + size_t col, line; + bool ret = testJson(json, line, col); + EXPECT_TRUE(ret); + EXPECT_EQ(line, 4u); + EXPECT_EQ(col, 6u); +} + +TEST(CursorStreamWrapper, MissingLastArrayBracket) { + const char json8[] = "{\"string\"\n\n:\"my string\",\"array\"\n:[\"1\", \"2\", \"3\"}"; + size_t col, line; + bool ret = testJson(json8, line, col); + EXPECT_TRUE(ret); + EXPECT_EQ(line, 4u); + EXPECT_EQ(col, 15u); +} + +TEST(CursorStreamWrapper, MissingLastBracket) { + const char json9[] = "{\"string\"\n\n:\"my string\",\"array\"\n:[\"1\", \"2\", \"3\"]"; + size_t col, line; + bool ret = testJson(json9, line, col); + EXPECT_TRUE(ret); + EXPECT_EQ(line, 4u); + EXPECT_EQ(col, 16u); +} diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/documenttest.cpp b/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/documenttest.cpp new file mode 100644 index 0000000000..c3d1e484dc --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/documenttest.cpp @@ -0,0 +1,674 @@ +// Tencent is pleased to support the open source community by making RapidJSON available. +// +// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. +// +// Licensed under the MIT License (the "License"); you may not use this file except +// in compliance with the License. You may obtain a copy of the License at +// +// http://opensource.org/licenses/MIT +// +// Unless required by applicable law or agreed to in writing, software distributed +// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +// CONDITIONS OF ANY KIND, either express or implied. See the License for the +// specific language governing permissions and limitations under the License. + +#include "unittest.h" +#include "rapidjson/document.h" +#include "rapidjson/writer.h" +#include "rapidjson/filereadstream.h" +#include "rapidjson/encodedstream.h" +#include "rapidjson/stringbuffer.h" +#include +#include + +#ifdef __clang__ +RAPIDJSON_DIAG_PUSH +RAPIDJSON_DIAG_OFF(c++98-compat) +RAPIDJSON_DIAG_OFF(missing-variable-declarations) +#endif + +using namespace rapidjson; + +template +void ParseCheck(DocumentType& doc) { + typedef typename DocumentType::ValueType ValueType; + + EXPECT_FALSE(doc.HasParseError()); + if (doc.HasParseError()) + printf("Error: %d at %zu\n", static_cast(doc.GetParseError()), doc.GetErrorOffset()); + EXPECT_TRUE(static_cast(doc)); + + EXPECT_TRUE(doc.IsObject()); + + EXPECT_TRUE(doc.HasMember("hello")); + const ValueType& hello = doc["hello"]; + EXPECT_TRUE(hello.IsString()); + EXPECT_STREQ("world", hello.GetString()); + + EXPECT_TRUE(doc.HasMember("t")); + const ValueType& t = doc["t"]; + EXPECT_TRUE(t.IsTrue()); + + EXPECT_TRUE(doc.HasMember("f")); + const ValueType& f = doc["f"]; + EXPECT_TRUE(f.IsFalse()); + + EXPECT_TRUE(doc.HasMember("n")); + const ValueType& n = doc["n"]; + EXPECT_TRUE(n.IsNull()); + + EXPECT_TRUE(doc.HasMember("i")); + const ValueType& i = doc["i"]; + EXPECT_TRUE(i.IsNumber()); + EXPECT_EQ(123, i.GetInt()); + + EXPECT_TRUE(doc.HasMember("pi")); + const ValueType& pi = doc["pi"]; + EXPECT_TRUE(pi.IsNumber()); + EXPECT_DOUBLE_EQ(3.1416, pi.GetDouble()); + + EXPECT_TRUE(doc.HasMember("a")); + const ValueType& a = doc["a"]; + EXPECT_TRUE(a.IsArray()); + EXPECT_EQ(4u, a.Size()); + for (SizeType j = 0; j < 4; j++) + EXPECT_EQ(j + 1, a[j].GetUint()); +} + +template +void ParseTest() { + typedef GenericDocument, Allocator, StackAllocator> DocumentType; + DocumentType doc; + + const char* json = " { \"hello\" : \"world\", \"t\" : true , \"f\" : false, \"n\": null, \"i\":123, \"pi\": 3.1416, \"a\":[1, 2, 3, 4] } "; + + doc.Parse(json); + ParseCheck(doc); + + doc.SetNull(); + StringStream s(json); + doc.template ParseStream<0>(s); + ParseCheck(doc); + + doc.SetNull(); + char *buffer = strdup(json); + doc.ParseInsitu(buffer); + ParseCheck(doc); + free(buffer); + + // Parse(const Ch*, size_t) + size_t length = strlen(json); + buffer = reinterpret_cast(malloc(length * 2)); + memcpy(buffer, json, length); + memset(buffer + length, 'X', length); +#if RAPIDJSON_HAS_STDSTRING + std::string s2(buffer, length); // backup buffer +#endif + doc.SetNull(); + doc.Parse(buffer, length); + free(buffer); + ParseCheck(doc); + +#if RAPIDJSON_HAS_STDSTRING + // Parse(std::string) + doc.SetNull(); + doc.Parse(s2); + ParseCheck(doc); +#endif +} + +TEST(Document, Parse) { + ParseTest, CrtAllocator>(); + ParseTest, MemoryPoolAllocator<> >(); + ParseTest >(); + ParseTest(); +} + +TEST(Document, UnchangedOnParseError) { + Document doc; + doc.SetArray().PushBack(0, doc.GetAllocator()); + + ParseResult noError; + EXPECT_TRUE(noError); + + ParseResult err = doc.Parse("{]"); + EXPECT_TRUE(doc.HasParseError()); + EXPECT_NE(err, noError); + EXPECT_NE(err.Code(), noError); + EXPECT_NE(noError, doc.GetParseError()); + EXPECT_EQ(err.Code(), doc.GetParseError()); + EXPECT_EQ(err.Offset(), doc.GetErrorOffset()); + EXPECT_TRUE(doc.IsArray()); + EXPECT_EQ(doc.Size(), 1u); + + err = doc.Parse("{}"); + EXPECT_FALSE(doc.HasParseError()); + EXPECT_FALSE(err.IsError()); + EXPECT_TRUE(err); + EXPECT_EQ(err, noError); + EXPECT_EQ(err.Code(), noError); + EXPECT_EQ(err.Code(), doc.GetParseError()); + EXPECT_EQ(err.Offset(), doc.GetErrorOffset()); + EXPECT_TRUE(doc.IsObject()); + EXPECT_EQ(doc.MemberCount(), 0u); +} + +static FILE* OpenEncodedFile(const char* filename) { + const char *paths[] = { + "encodings", + "bin/encodings", + "../bin/encodings", + "../../bin/encodings", + "../../../bin/encodings" + }; + char buffer[1024]; + for (size_t i = 0; i < sizeof(paths) / sizeof(paths[0]); i++) { + sprintf(buffer, "%s/%s", paths[i], filename); + FILE *fp = fopen(buffer, "rb"); + if (fp) + return fp; + } + return 0; +} + +TEST(Document, Parse_Encoding) { + const char* json = " { \"hello\" : \"world\", \"t\" : true , \"f\" : false, \"n\": null, \"i\":123, \"pi\": 3.1416, \"a\":[1, 2, 3, 4] } "; + + typedef GenericDocument > DocumentType; + DocumentType doc; + + // Parse(const SourceEncoding::Ch*) + // doc.Parse >(json); + // EXPECT_FALSE(doc.HasParseError()); + // EXPECT_EQ(0, StrCmp(doc[L"hello"].GetString(), L"world")); + + // Parse(const SourceEncoding::Ch*, size_t) + size_t length = strlen(json); + char* buffer = reinterpret_cast(malloc(length * 2)); + memcpy(buffer, json, length); + memset(buffer + length, 'X', length); +#if RAPIDJSON_HAS_STDSTRING + std::string s2(buffer, length); // backup buffer +#endif + doc.SetNull(); + doc.Parse >(buffer, length); + free(buffer); + EXPECT_FALSE(doc.HasParseError()); + if (doc.HasParseError()) + printf("Error: %d at %zu\n", static_cast(doc.GetParseError()), doc.GetErrorOffset()); + EXPECT_EQ(0, StrCmp(doc[L"hello"].GetString(), L"world")); + +#if RAPIDJSON_HAS_STDSTRING + // Parse(std::string) + doc.SetNull(); + +#if defined(_MSC_VER) && _MSC_VER < 1800 + doc.Parse >(s2.c_str()); // VS2010 or below cannot handle templated function overloading. Use const char* instead. +#else + doc.Parse >(s2); +#endif + EXPECT_FALSE(doc.HasParseError()); + EXPECT_EQ(0, StrCmp(doc[L"hello"].GetString(), L"world")); +#endif +} + +TEST(Document, ParseStream_EncodedInputStream) { + // UTF8 -> UTF16 + FILE* fp = OpenEncodedFile("utf8.json"); + char buffer[256]; + FileReadStream bis(fp, buffer, sizeof(buffer)); + EncodedInputStream, FileReadStream> eis(bis); + + GenericDocument > d; + d.ParseStream<0, UTF8<> >(eis); + EXPECT_FALSE(d.HasParseError()); + + fclose(fp); + + wchar_t expected[] = L"I can eat glass and it doesn't hurt me."; + GenericValue >& v = d[L"en"]; + EXPECT_TRUE(v.IsString()); + EXPECT_EQ(sizeof(expected) / sizeof(wchar_t) - 1, v.GetStringLength()); + EXPECT_EQ(0, StrCmp(expected, v.GetString())); + + // UTF16 -> UTF8 in memory + StringBuffer bos; + typedef EncodedOutputStream, StringBuffer> OutputStream; + OutputStream eos(bos, false); // Not writing BOM + { + Writer, UTF8<> > writer(eos); + d.Accept(writer); + } + + // Condense the original file and compare. + fp = OpenEncodedFile("utf8.json"); + FileReadStream is(fp, buffer, sizeof(buffer)); + Reader reader; + StringBuffer bos2; + Writer writer2(bos2); + reader.Parse(is, writer2); + fclose(fp); + + EXPECT_EQ(bos.GetSize(), bos2.GetSize()); + EXPECT_EQ(0, memcmp(bos.GetString(), bos2.GetString(), bos2.GetSize())); +} + +TEST(Document, ParseStream_AutoUTFInputStream) { + // Any -> UTF8 + FILE* fp = OpenEncodedFile("utf32be.json"); + char buffer[256]; + FileReadStream bis(fp, buffer, sizeof(buffer)); + AutoUTFInputStream eis(bis); + + Document d; + d.ParseStream<0, AutoUTF >(eis); + EXPECT_FALSE(d.HasParseError()); + + fclose(fp); + + char expected[] = "I can eat glass and it doesn't hurt me."; + Value& v = d["en"]; + EXPECT_TRUE(v.IsString()); + EXPECT_EQ(sizeof(expected) - 1, v.GetStringLength()); + EXPECT_EQ(0, StrCmp(expected, v.GetString())); + + // UTF8 -> UTF8 in memory + StringBuffer bos; + Writer writer(bos); + d.Accept(writer); + + // Condense the original file and compare. + fp = OpenEncodedFile("utf8.json"); + FileReadStream is(fp, buffer, sizeof(buffer)); + Reader reader; + StringBuffer bos2; + Writer writer2(bos2); + reader.Parse(is, writer2); + fclose(fp); + + EXPECT_EQ(bos.GetSize(), bos2.GetSize()); + EXPECT_EQ(0, memcmp(bos.GetString(), bos2.GetString(), bos2.GetSize())); +} + +TEST(Document, Swap) { + Document d1; + Document::AllocatorType& a = d1.GetAllocator(); + + d1.SetArray().PushBack(1, a).PushBack(2, a); + + Value o; + o.SetObject().AddMember("a", 1, a); + + // Swap between Document and Value + d1.Swap(o); + EXPECT_TRUE(d1.IsObject()); + EXPECT_TRUE(o.IsArray()); + + d1.Swap(o); + EXPECT_TRUE(d1.IsArray()); + EXPECT_TRUE(o.IsObject()); + + o.Swap(d1); + EXPECT_TRUE(d1.IsObject()); + EXPECT_TRUE(o.IsArray()); + + // Swap between Document and Document + Document d2; + d2.SetArray().PushBack(3, a); + d1.Swap(d2); + EXPECT_TRUE(d1.IsArray()); + EXPECT_TRUE(d2.IsObject()); + EXPECT_EQ(&d2.GetAllocator(), &a); + + // reset value + Value().Swap(d1); + EXPECT_TRUE(d1.IsNull()); + + // reset document, including allocator + // so clear o before so that it doesnt contain dangling elements + o.Clear(); + Document().Swap(d2); + EXPECT_TRUE(d2.IsNull()); + EXPECT_NE(&d2.GetAllocator(), &a); + + // testing std::swap compatibility + d1.SetBool(true); + using std::swap; + swap(d1, d2); + EXPECT_TRUE(d1.IsNull()); + EXPECT_TRUE(d2.IsTrue()); + + swap(o, d2); + EXPECT_TRUE(o.IsTrue()); + EXPECT_TRUE(d2.IsArray()); +} + + +// This should be slow due to assignment in inner-loop. +struct OutputStringStream : public std::ostringstream { + typedef char Ch; + + virtual ~OutputStringStream(); + + void Put(char c) { + put(c); + } + void Flush() {} +}; + +OutputStringStream::~OutputStringStream() {} + +TEST(Document, AcceptWriter) { + Document doc; + doc.Parse(" { \"hello\" : \"world\", \"t\" : true , \"f\" : false, \"n\": null, \"i\":123, \"pi\": 3.1416, \"a\":[1, 2, 3, 4] } "); + + OutputStringStream os; + Writer writer(os); + doc.Accept(writer); + + EXPECT_EQ("{\"hello\":\"world\",\"t\":true,\"f\":false,\"n\":null,\"i\":123,\"pi\":3.1416,\"a\":[1,2,3,4]}", os.str()); +} + +TEST(Document, UserBuffer) { + typedef GenericDocument, MemoryPoolAllocator<>, MemoryPoolAllocator<> > DocumentType; + char valueBuffer[4096]; + char parseBuffer[1024]; + MemoryPoolAllocator<> valueAllocator(valueBuffer, sizeof(valueBuffer)); + MemoryPoolAllocator<> parseAllocator(parseBuffer, sizeof(parseBuffer)); + DocumentType doc(&valueAllocator, sizeof(parseBuffer) / 2, &parseAllocator); + doc.Parse(" { \"hello\" : \"world\", \"t\" : true , \"f\" : false, \"n\": null, \"i\":123, \"pi\": 3.1416, \"a\":[1, 2, 3, 4] } "); + EXPECT_FALSE(doc.HasParseError()); + EXPECT_LE(valueAllocator.Size(), sizeof(valueBuffer)); + EXPECT_LE(parseAllocator.Size(), sizeof(parseBuffer)); + + // Cover MemoryPoolAllocator::Capacity() + EXPECT_LE(valueAllocator.Size(), valueAllocator.Capacity()); + EXPECT_LE(parseAllocator.Size(), parseAllocator.Capacity()); +} + +// Issue 226: Value of string type should not point to NULL +TEST(Document, AssertAcceptInvalidNameType) { + Document doc; + doc.SetObject(); + doc.AddMember("a", 0, doc.GetAllocator()); + doc.FindMember("a")->name.SetNull(); // Change name to non-string type. + + OutputStringStream os; + Writer writer(os); + ASSERT_THROW(doc.Accept(writer), AssertException); +} + +// Issue 44: SetStringRaw doesn't work with wchar_t +TEST(Document, UTF16_Document) { + GenericDocument< UTF16<> > json; + json.Parse(L"[{\"created_at\":\"Wed Oct 30 17:13:20 +0000 2012\"}]"); + + ASSERT_TRUE(json.IsArray()); + GenericValue< UTF16<> >& v = json[0]; + ASSERT_TRUE(v.IsObject()); + + GenericValue< UTF16<> >& s = v[L"created_at"]; + ASSERT_TRUE(s.IsString()); + + EXPECT_EQ(0, memcmp(L"Wed Oct 30 17:13:20 +0000 2012", s.GetString(), (s.GetStringLength() + 1) * sizeof(wchar_t))); +} + +#if RAPIDJSON_HAS_CXX11_RVALUE_REFS + +#if 0 // Many old compiler does not support these. Turn it off temporaily. + +#include + +TEST(Document, Traits) { + static_assert(std::is_constructible::value, ""); + static_assert(std::is_default_constructible::value, ""); +#ifndef _MSC_VER + static_assert(!std::is_copy_constructible::value, ""); +#endif + static_assert(std::is_move_constructible::value, ""); + + static_assert(!std::is_nothrow_constructible::value, ""); + static_assert(!std::is_nothrow_default_constructible::value, ""); +#ifndef _MSC_VER + static_assert(!std::is_nothrow_copy_constructible::value, ""); + static_assert(std::is_nothrow_move_constructible::value, ""); +#endif + + static_assert(std::is_assignable::value, ""); +#ifndef _MSC_VER + static_assert(!std::is_copy_assignable::value, ""); +#endif + static_assert(std::is_move_assignable::value, ""); + +#ifndef _MSC_VER + static_assert(std::is_nothrow_assignable::value, ""); +#endif + static_assert(!std::is_nothrow_copy_assignable::value, ""); +#ifndef _MSC_VER + static_assert(std::is_nothrow_move_assignable::value, ""); +#endif + + static_assert( std::is_destructible::value, ""); +#ifndef _MSC_VER + static_assert(std::is_nothrow_destructible::value, ""); +#endif +} + +#endif + +template +struct DocumentMove: public ::testing::Test { +}; + +typedef ::testing::Types< CrtAllocator, MemoryPoolAllocator<> > MoveAllocatorTypes; +TYPED_TEST_CASE(DocumentMove, MoveAllocatorTypes); + +TYPED_TEST(DocumentMove, MoveConstructor) { + typedef TypeParam Allocator; + typedef GenericDocument, Allocator> D; + Allocator allocator; + + D a(&allocator); + a.Parse("[\"one\", \"two\", \"three\"]"); + EXPECT_FALSE(a.HasParseError()); + EXPECT_TRUE(a.IsArray()); + EXPECT_EQ(3u, a.Size()); + EXPECT_EQ(&a.GetAllocator(), &allocator); + + // Document b(a); // does not compile (!is_copy_constructible) + D b(std::move(a)); + EXPECT_TRUE(a.IsNull()); + EXPECT_TRUE(b.IsArray()); + EXPECT_EQ(3u, b.Size()); + EXPECT_THROW(a.GetAllocator(), AssertException); + EXPECT_EQ(&b.GetAllocator(), &allocator); + + b.Parse("{\"Foo\": \"Bar\", \"Baz\": 42}"); + EXPECT_FALSE(b.HasParseError()); + EXPECT_TRUE(b.IsObject()); + EXPECT_EQ(2u, b.MemberCount()); + + // Document c = a; // does not compile (!is_copy_constructible) + D c = std::move(b); + EXPECT_TRUE(b.IsNull()); + EXPECT_TRUE(c.IsObject()); + EXPECT_EQ(2u, c.MemberCount()); + EXPECT_THROW(b.GetAllocator(), AssertException); + EXPECT_EQ(&c.GetAllocator(), &allocator); +} + +TYPED_TEST(DocumentMove, MoveConstructorParseError) { + typedef TypeParam Allocator; + typedef GenericDocument, Allocator> D; + + ParseResult noError; + D a; + a.Parse("{ 4 = 4]"); + ParseResult error(a.GetParseError(), a.GetErrorOffset()); + EXPECT_TRUE(a.HasParseError()); + EXPECT_NE(error, noError); + EXPECT_NE(error.Code(), noError); + EXPECT_NE(error.Code(), noError.Code()); + EXPECT_NE(error.Offset(), noError.Offset()); + + D b(std::move(a)); + EXPECT_FALSE(a.HasParseError()); + EXPECT_TRUE(b.HasParseError()); + EXPECT_EQ(a.GetParseError(), noError); + EXPECT_EQ(a.GetParseError(), noError.Code()); + EXPECT_EQ(a.GetErrorOffset(), noError.Offset()); + EXPECT_EQ(b.GetParseError(), error); + EXPECT_EQ(b.GetParseError(), error.Code()); + EXPECT_EQ(b.GetErrorOffset(), error.Offset()); + + D c(std::move(b)); + EXPECT_FALSE(b.HasParseError()); + EXPECT_TRUE(c.HasParseError()); + EXPECT_EQ(b.GetParseError(), noError.Code()); + EXPECT_EQ(c.GetParseError(), error.Code()); + EXPECT_EQ(b.GetErrorOffset(), noError.Offset()); + EXPECT_EQ(c.GetErrorOffset(), error.Offset()); +} + +// This test does not properly use parsing, just for testing. +// It must call ClearStack() explicitly to prevent memory leak. +// But here we cannot as ClearStack() is private. +#if 0 +TYPED_TEST(DocumentMove, MoveConstructorStack) { + typedef TypeParam Allocator; + typedef UTF8<> Encoding; + typedef GenericDocument Document; + + Document a; + size_t defaultCapacity = a.GetStackCapacity(); + + // Trick Document into getting GetStackCapacity() to return non-zero + typedef GenericReader Reader; + Reader reader(&a.GetAllocator()); + GenericStringStream is("[\"one\", \"two\", \"three\"]"); + reader.template Parse(is, a); + size_t capacity = a.GetStackCapacity(); + EXPECT_GT(capacity, 0u); + + Document b(std::move(a)); + EXPECT_EQ(a.GetStackCapacity(), defaultCapacity); + EXPECT_EQ(b.GetStackCapacity(), capacity); + + Document c = std::move(b); + EXPECT_EQ(b.GetStackCapacity(), defaultCapacity); + EXPECT_EQ(c.GetStackCapacity(), capacity); +} +#endif + +TYPED_TEST(DocumentMove, MoveAssignment) { + typedef TypeParam Allocator; + typedef GenericDocument, Allocator> D; + Allocator allocator; + + D a(&allocator); + a.Parse("[\"one\", \"two\", \"three\"]"); + EXPECT_FALSE(a.HasParseError()); + EXPECT_TRUE(a.IsArray()); + EXPECT_EQ(3u, a.Size()); + EXPECT_EQ(&a.GetAllocator(), &allocator); + + // Document b; b = a; // does not compile (!is_copy_assignable) + D b; + b = std::move(a); + EXPECT_TRUE(a.IsNull()); + EXPECT_TRUE(b.IsArray()); + EXPECT_EQ(3u, b.Size()); + EXPECT_THROW(a.GetAllocator(), AssertException); + EXPECT_EQ(&b.GetAllocator(), &allocator); + + b.Parse("{\"Foo\": \"Bar\", \"Baz\": 42}"); + EXPECT_FALSE(b.HasParseError()); + EXPECT_TRUE(b.IsObject()); + EXPECT_EQ(2u, b.MemberCount()); + + // Document c; c = a; // does not compile (see static_assert) + D c; + c = std::move(b); + EXPECT_TRUE(b.IsNull()); + EXPECT_TRUE(c.IsObject()); + EXPECT_EQ(2u, c.MemberCount()); + EXPECT_THROW(b.GetAllocator(), AssertException); + EXPECT_EQ(&c.GetAllocator(), &allocator); +} + +TYPED_TEST(DocumentMove, MoveAssignmentParseError) { + typedef TypeParam Allocator; + typedef GenericDocument, Allocator> D; + + ParseResult noError; + D a; + a.Parse("{ 4 = 4]"); + ParseResult error(a.GetParseError(), a.GetErrorOffset()); + EXPECT_TRUE(a.HasParseError()); + EXPECT_NE(error.Code(), noError.Code()); + EXPECT_NE(error.Offset(), noError.Offset()); + + D b; + b = std::move(a); + EXPECT_FALSE(a.HasParseError()); + EXPECT_TRUE(b.HasParseError()); + EXPECT_EQ(a.GetParseError(), noError.Code()); + EXPECT_EQ(b.GetParseError(), error.Code()); + EXPECT_EQ(a.GetErrorOffset(), noError.Offset()); + EXPECT_EQ(b.GetErrorOffset(), error.Offset()); + + D c; + c = std::move(b); + EXPECT_FALSE(b.HasParseError()); + EXPECT_TRUE(c.HasParseError()); + EXPECT_EQ(b.GetParseError(), noError.Code()); + EXPECT_EQ(c.GetParseError(), error.Code()); + EXPECT_EQ(b.GetErrorOffset(), noError.Offset()); + EXPECT_EQ(c.GetErrorOffset(), error.Offset()); +} + +// This test does not properly use parsing, just for testing. +// It must call ClearStack() explicitly to prevent memory leak. +// But here we cannot as ClearStack() is private. +#if 0 +TYPED_TEST(DocumentMove, MoveAssignmentStack) { + typedef TypeParam Allocator; + typedef UTF8<> Encoding; + typedef GenericDocument D; + + D a; + size_t defaultCapacity = a.GetStackCapacity(); + + // Trick Document into getting GetStackCapacity() to return non-zero + typedef GenericReader Reader; + Reader reader(&a.GetAllocator()); + GenericStringStream is("[\"one\", \"two\", \"three\"]"); + reader.template Parse(is, a); + size_t capacity = a.GetStackCapacity(); + EXPECT_GT(capacity, 0u); + + D b; + b = std::move(a); + EXPECT_EQ(a.GetStackCapacity(), defaultCapacity); + EXPECT_EQ(b.GetStackCapacity(), capacity); + + D c; + c = std::move(b); + EXPECT_EQ(b.GetStackCapacity(), defaultCapacity); + EXPECT_EQ(c.GetStackCapacity(), capacity); +} +#endif + +#endif // RAPIDJSON_HAS_CXX11_RVALUE_REFS + +// Issue 22: Memory corruption via operator= +// Fixed by making unimplemented assignment operator private. +//TEST(Document, Assignment) { +// Document d1; +// Document d2; +// d1 = d2; +//} + +#ifdef __clang__ +RAPIDJSON_DIAG_POP +#endif diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/dtoatest.cpp b/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/dtoatest.cpp new file mode 100644 index 0000000000..3ec8982898 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/dtoatest.cpp @@ -0,0 +1,99 @@ +// Tencent is pleased to support the open source community by making RapidJSON available. +// +// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. +// +// Licensed under the MIT License (the "License"); you may not use this file except +// in compliance with the License. You may obtain a copy of the License at +// +// http://opensource.org/licenses/MIT +// +// Unless required by applicable law or agreed to in writing, software distributed +// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +// CONDITIONS OF ANY KIND, either express or implied. See the License for the +// specific language governing permissions and limitations under the License. + +#include "unittest.h" +#include "rapidjson/internal/dtoa.h" + +#ifdef __GNUC__ +RAPIDJSON_DIAG_PUSH +RAPIDJSON_DIAG_OFF(type-limits) +#endif + +using namespace rapidjson::internal; + +TEST(dtoa, normal) { + char buffer[30]; + +#define TEST_DTOA(d, a)\ + *dtoa(d, buffer) = '\0';\ + EXPECT_STREQ(a, buffer) + + TEST_DTOA(0.0, "0.0"); + TEST_DTOA(-0.0, "-0.0"); + TEST_DTOA(1.0, "1.0"); + TEST_DTOA(-1.0, "-1.0"); + TEST_DTOA(1.2345, "1.2345"); + TEST_DTOA(1.2345678, "1.2345678"); + TEST_DTOA(0.123456789012, "0.123456789012"); + TEST_DTOA(1234567.8, "1234567.8"); + TEST_DTOA(-79.39773355813419, "-79.39773355813419"); + TEST_DTOA(-36.973846435546875, "-36.973846435546875"); + TEST_DTOA(0.000001, "0.000001"); + TEST_DTOA(0.0000001, "1e-7"); + TEST_DTOA(1e30, "1e30"); + TEST_DTOA(1.234567890123456e30, "1.234567890123456e30"); + TEST_DTOA(5e-324, "5e-324"); // Min subnormal positive double + TEST_DTOA(2.225073858507201e-308, "2.225073858507201e-308"); // Max subnormal positive double + TEST_DTOA(2.2250738585072014e-308, "2.2250738585072014e-308"); // Min normal positive double + TEST_DTOA(1.7976931348623157e308, "1.7976931348623157e308"); // Max double + +#undef TEST_DTOA +} + +TEST(dtoa, maxDecimalPlaces) { + char buffer[30]; + +#define TEST_DTOA(m, d, a)\ + *dtoa(d, buffer, m) = '\0';\ + EXPECT_STREQ(a, buffer) + + TEST_DTOA(3, 0.0, "0.0"); + TEST_DTOA(1, 0.0, "0.0"); + TEST_DTOA(3, -0.0, "-0.0"); + TEST_DTOA(3, 1.0, "1.0"); + TEST_DTOA(3, -1.0, "-1.0"); + TEST_DTOA(3, 1.2345, "1.234"); + TEST_DTOA(2, 1.2345, "1.23"); + TEST_DTOA(1, 1.2345, "1.2"); + TEST_DTOA(3, 1.2345678, "1.234"); + TEST_DTOA(3, 1.0001, "1.0"); + TEST_DTOA(2, 1.0001, "1.0"); + TEST_DTOA(1, 1.0001, "1.0"); + TEST_DTOA(3, 0.123456789012, "0.123"); + TEST_DTOA(2, 0.123456789012, "0.12"); + TEST_DTOA(1, 0.123456789012, "0.1"); + TEST_DTOA(4, 0.0001, "0.0001"); + TEST_DTOA(3, 0.0001, "0.0"); + TEST_DTOA(2, 0.0001, "0.0"); + TEST_DTOA(1, 0.0001, "0.0"); + TEST_DTOA(3, 1234567.8, "1234567.8"); + TEST_DTOA(3, 1e30, "1e30"); + TEST_DTOA(3, 5e-324, "0.0"); // Min subnormal positive double + TEST_DTOA(3, 2.225073858507201e-308, "0.0"); // Max subnormal positive double + TEST_DTOA(3, 2.2250738585072014e-308, "0.0"); // Min normal positive double + TEST_DTOA(3, 1.7976931348623157e308, "1.7976931348623157e308"); // Max double + TEST_DTOA(5, -0.14000000000000001, "-0.14"); + TEST_DTOA(4, -0.14000000000000001, "-0.14"); + TEST_DTOA(3, -0.14000000000000001, "-0.14"); + TEST_DTOA(3, -0.10000000000000001, "-0.1"); + TEST_DTOA(2, -0.10000000000000001, "-0.1"); + TEST_DTOA(1, -0.10000000000000001, "-0.1"); + +#undef TEST_DTOA +} + + +#ifdef __GNUC__ +RAPIDJSON_DIAG_POP +#endif diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/encodedstreamtest.cpp b/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/encodedstreamtest.cpp new file mode 100644 index 0000000000..d9b87e94cd --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/encodedstreamtest.cpp @@ -0,0 +1,313 @@ +// Tencent is pleased to support the open source community by making RapidJSON available. +// +// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. +// +// Licensed under the MIT License (the "License"); you may not use this file except +// in compliance with the License. You may obtain a copy of the License at +// +// http://opensource.org/licenses/MIT +// +// Unless required by applicable law or agreed to in writing, software distributed +// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +// CONDITIONS OF ANY KIND, either express or implied. See the License for the +// specific language governing permissions and limitations under the License. + +#include "unittest.h" +#include "rapidjson/filereadstream.h" +#include "rapidjson/filewritestream.h" +#include "rapidjson/encodedstream.h" +#include "rapidjson/stringbuffer.h" +#include "rapidjson/memorystream.h" +#include "rapidjson/memorybuffer.h" + +using namespace rapidjson; + +class EncodedStreamTest : public ::testing::Test { +public: + EncodedStreamTest() : json_(), length_() {} + virtual ~EncodedStreamTest(); + + virtual void SetUp() { + json_ = ReadFile("utf8.json", true, &length_); + } + + virtual void TearDown() { + free(json_); + json_ = 0; + } + +private: + EncodedStreamTest(const EncodedStreamTest&); + EncodedStreamTest& operator=(const EncodedStreamTest&); + +protected: + static FILE* Open(const char* filename) { + const char *paths[] = { + "encodings", + "bin/encodings", + "../bin/encodings", + "../../bin/encodings", + "../../../bin/encodings" + }; + char buffer[1024]; + for (size_t i = 0; i < sizeof(paths) / sizeof(paths[0]); i++) { + sprintf(buffer, "%s/%s", paths[i], filename); + FILE *fp = fopen(buffer, "rb"); + if (fp) + return fp; + } + return 0; + } + + static char *ReadFile(const char* filename, bool appendPath, size_t* outLength) { + FILE *fp = appendPath ? Open(filename) : fopen(filename, "rb"); + + if (!fp) { + *outLength = 0; + return 0; + } + + fseek(fp, 0, SEEK_END); + *outLength = static_cast(ftell(fp)); + fseek(fp, 0, SEEK_SET); + char* buffer = static_cast(malloc(*outLength + 1)); + size_t readLength = fread(buffer, 1, *outLength, fp); + buffer[readLength] = '\0'; + fclose(fp); + return buffer; + } + + template + void TestEncodedInputStream(const char* filename) { + // Test FileReadStream + { + char buffer[16]; + FILE *fp = Open(filename); + ASSERT_TRUE(fp != 0); + FileReadStream fs(fp, buffer, sizeof(buffer)); + EncodedInputStream eis(fs); + StringStream s(json_); + + while (eis.Peek() != '\0') { + unsigned expected, actual; + EXPECT_TRUE(UTF8<>::Decode(s, &expected)); + EXPECT_TRUE(MemoryEncoding::Decode(eis, &actual)); + EXPECT_EQ(expected, actual); + } + EXPECT_EQ('\0', s.Peek()); + fclose(fp); + } + + // Test MemoryStream + { + size_t size; + char* data = ReadFile(filename, true, &size); + MemoryStream ms(data, size); + EncodedInputStream eis(ms); + StringStream s(json_); + + while (eis.Peek() != '\0') { + unsigned expected, actual; + EXPECT_TRUE(UTF8<>::Decode(s, &expected)); + EXPECT_TRUE(MemoryEncoding::Decode(eis, &actual)); + EXPECT_EQ(expected, actual); + } + EXPECT_EQ('\0', s.Peek()); + free(data); + EXPECT_EQ(size, eis.Tell()); + } + } + + void TestAutoUTFInputStream(const char *filename, bool expectHasBOM) { + // Test FileReadStream + { + char buffer[16]; + FILE *fp = Open(filename); + ASSERT_TRUE(fp != 0); + FileReadStream fs(fp, buffer, sizeof(buffer)); + AutoUTFInputStream eis(fs); + EXPECT_EQ(expectHasBOM, eis.HasBOM()); + StringStream s(json_); + while (eis.Peek() != '\0') { + unsigned expected, actual; + EXPECT_TRUE(UTF8<>::Decode(s, &expected)); + EXPECT_TRUE(AutoUTF::Decode(eis, &actual)); + EXPECT_EQ(expected, actual); + } + EXPECT_EQ('\0', s.Peek()); + fclose(fp); + } + + // Test MemoryStream + { + size_t size; + char* data = ReadFile(filename, true, &size); + MemoryStream ms(data, size); + AutoUTFInputStream eis(ms); + EXPECT_EQ(expectHasBOM, eis.HasBOM()); + StringStream s(json_); + + while (eis.Peek() != '\0') { + unsigned expected, actual; + EXPECT_TRUE(UTF8<>::Decode(s, &expected)); + EXPECT_TRUE(AutoUTF::Decode(eis, &actual)); + EXPECT_EQ(expected, actual); + } + EXPECT_EQ('\0', s.Peek()); + free(data); + EXPECT_EQ(size, eis.Tell()); + } + } + + template + void TestEncodedOutputStream(const char* expectedFilename, bool putBOM) { + // Test FileWriteStream + { + char filename[L_tmpnam]; + FILE* fp = TempFile(filename); + char buffer[16]; + FileWriteStream os(fp, buffer, sizeof(buffer)); + EncodedOutputStream eos(os, putBOM); + StringStream s(json_); + while (s.Peek() != '\0') { + bool success = Transcoder, MemoryEncoding>::Transcode(s, eos); + EXPECT_TRUE(success); + } + eos.Flush(); + fclose(fp); + EXPECT_TRUE(CompareFile(filename, expectedFilename)); + remove(filename); + } + + // Test MemoryBuffer + { + MemoryBuffer mb; + EncodedOutputStream eos(mb, putBOM); + StringStream s(json_); + while (s.Peek() != '\0') { + bool success = Transcoder, MemoryEncoding>::Transcode(s, eos); + EXPECT_TRUE(success); + } + eos.Flush(); + EXPECT_TRUE(CompareBufferFile(mb.GetBuffer(), mb.GetSize(), expectedFilename)); + } + } + + void TestAutoUTFOutputStream(UTFType type, bool putBOM, const char *expectedFilename) { + // Test FileWriteStream + { + char filename[L_tmpnam]; + FILE* fp = TempFile(filename); + + char buffer[16]; + FileWriteStream os(fp, buffer, sizeof(buffer)); + AutoUTFOutputStream eos(os, type, putBOM); + StringStream s(json_); + while (s.Peek() != '\0') { + bool success = Transcoder, AutoUTF >::Transcode(s, eos); + EXPECT_TRUE(success); + } + eos.Flush(); + fclose(fp); + EXPECT_TRUE(CompareFile(filename, expectedFilename)); + remove(filename); + } + + // Test MemoryBuffer + { + MemoryBuffer mb; + AutoUTFOutputStream eos(mb, type, putBOM); + StringStream s(json_); + while (s.Peek() != '\0') { + bool success = Transcoder, AutoUTF >::Transcode(s, eos); + EXPECT_TRUE(success); + } + eos.Flush(); + EXPECT_TRUE(CompareBufferFile(mb.GetBuffer(), mb.GetSize(), expectedFilename)); + } + } + + bool CompareFile(const char* filename, const char* expectedFilename) { + size_t actualLength, expectedLength; + char* actualBuffer = ReadFile(filename, false, &actualLength); + char* expectedBuffer = ReadFile(expectedFilename, true, &expectedLength); + bool ret = (expectedLength == actualLength) && memcmp(expectedBuffer, actualBuffer, actualLength) == 0; + free(actualBuffer); + free(expectedBuffer); + return ret; + } + + bool CompareBufferFile(const char* actualBuffer, size_t actualLength, const char* expectedFilename) { + size_t expectedLength; + char* expectedBuffer = ReadFile(expectedFilename, true, &expectedLength); + bool ret = (expectedLength == actualLength) && memcmp(expectedBuffer, actualBuffer, actualLength) == 0; + free(expectedBuffer); + return ret; + } + + char *json_; + size_t length_; +}; + +EncodedStreamTest::~EncodedStreamTest() {} + +TEST_F(EncodedStreamTest, EncodedInputStream) { + TestEncodedInputStream, UTF8<> >("utf8.json"); + TestEncodedInputStream, UTF8<> >("utf8bom.json"); + TestEncodedInputStream, UTF16<> >("utf16le.json"); + TestEncodedInputStream, UTF16<> >("utf16lebom.json"); + TestEncodedInputStream, UTF16<> >("utf16be.json"); + TestEncodedInputStream, UTF16<> >("utf16bebom.json"); + TestEncodedInputStream, UTF32<> >("utf32le.json"); + TestEncodedInputStream, UTF32<> >("utf32lebom.json"); + TestEncodedInputStream, UTF32<> >("utf32be.json"); + TestEncodedInputStream, UTF32<> >("utf32bebom.json"); +} + +TEST_F(EncodedStreamTest, AutoUTFInputStream) { + TestAutoUTFInputStream("utf8.json", false); + TestAutoUTFInputStream("utf8bom.json", true); + TestAutoUTFInputStream("utf16le.json", false); + TestAutoUTFInputStream("utf16lebom.json",true); + TestAutoUTFInputStream("utf16be.json", false); + TestAutoUTFInputStream("utf16bebom.json",true); + TestAutoUTFInputStream("utf32le.json", false); + TestAutoUTFInputStream("utf32lebom.json",true); + TestAutoUTFInputStream("utf32be.json", false); + TestAutoUTFInputStream("utf32bebom.json", true); + + { + // Auto detection fail, use user defined UTF type + const char json[] = "{ }"; + MemoryStream ms(json, sizeof(json)); + AutoUTFInputStream eis(ms, kUTF8); + EXPECT_FALSE(eis.HasBOM()); + EXPECT_EQ(kUTF8, eis.GetType()); + } +} + +TEST_F(EncodedStreamTest, EncodedOutputStream) { + TestEncodedOutputStream, UTF8<> >("utf8.json", false); + TestEncodedOutputStream, UTF8<> >("utf8bom.json", true); + TestEncodedOutputStream, UTF16<> >("utf16le.json", false); + TestEncodedOutputStream, UTF16<> >("utf16lebom.json",true); + TestEncodedOutputStream, UTF16<> >("utf16be.json", false); + TestEncodedOutputStream, UTF16<> >("utf16bebom.json",true); + TestEncodedOutputStream, UTF32<> >("utf32le.json", false); + TestEncodedOutputStream, UTF32<> >("utf32lebom.json",true); + TestEncodedOutputStream, UTF32<> >("utf32be.json", false); + TestEncodedOutputStream, UTF32<> >("utf32bebom.json",true); +} + +TEST_F(EncodedStreamTest, AutoUTFOutputStream) { + TestAutoUTFOutputStream(kUTF8, false, "utf8.json"); + TestAutoUTFOutputStream(kUTF8, true, "utf8bom.json"); + TestAutoUTFOutputStream(kUTF16LE, false, "utf16le.json"); + TestAutoUTFOutputStream(kUTF16LE, true, "utf16lebom.json"); + TestAutoUTFOutputStream(kUTF16BE, false, "utf16be.json"); + TestAutoUTFOutputStream(kUTF16BE, true, "utf16bebom.json"); + TestAutoUTFOutputStream(kUTF32LE, false, "utf32le.json"); + TestAutoUTFOutputStream(kUTF32LE, true, "utf32lebom.json"); + TestAutoUTFOutputStream(kUTF32BE, false, "utf32be.json"); + TestAutoUTFOutputStream(kUTF32BE, true, "utf32bebom.json"); +} diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/encodingstest.cpp b/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/encodingstest.cpp new file mode 100644 index 0000000000..455881e7e8 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/encodingstest.cpp @@ -0,0 +1,451 @@ +// Tencent is pleased to support the open source community by making RapidJSON available. +// +// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. +// +// Licensed under the MIT License (the "License"); you may not use this file except +// in compliance with the License. You may obtain a copy of the License at +// +// http://opensource.org/licenses/MIT +// +// Unless required by applicable law or agreed to in writing, software distributed +// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +// CONDITIONS OF ANY KIND, either express or implied. See the License for the +// specific language governing permissions and limitations under the License. + +#include "unittest.h" +#include "rapidjson/filereadstream.h" +#include "rapidjson/filewritestream.h" +#include "rapidjson/encodedstream.h" +#include "rapidjson/stringbuffer.h" + +using namespace rapidjson; + +// Verification of encoders/decoders with Hoehrmann's UTF8 decoder + +// http://www.unicode.org/Public/UNIDATA/Blocks.txt +static const unsigned kCodepointRanges[] = { + 0x0000, 0x007F, // Basic Latin + 0x0080, 0x00FF, // Latin-1 Supplement + 0x0100, 0x017F, // Latin Extended-A + 0x0180, 0x024F, // Latin Extended-B + 0x0250, 0x02AF, // IPA Extensions + 0x02B0, 0x02FF, // Spacing Modifier Letters + 0x0300, 0x036F, // Combining Diacritical Marks + 0x0370, 0x03FF, // Greek and Coptic + 0x0400, 0x04FF, // Cyrillic + 0x0500, 0x052F, // Cyrillic Supplement + 0x0530, 0x058F, // Armenian + 0x0590, 0x05FF, // Hebrew + 0x0600, 0x06FF, // Arabic + 0x0700, 0x074F, // Syriac + 0x0750, 0x077F, // Arabic Supplement + 0x0780, 0x07BF, // Thaana + 0x07C0, 0x07FF, // NKo + 0x0800, 0x083F, // Samaritan + 0x0840, 0x085F, // Mandaic + 0x0900, 0x097F, // Devanagari + 0x0980, 0x09FF, // Bengali + 0x0A00, 0x0A7F, // Gurmukhi + 0x0A80, 0x0AFF, // Gujarati + 0x0B00, 0x0B7F, // Oriya + 0x0B80, 0x0BFF, // Tamil + 0x0C00, 0x0C7F, // Telugu + 0x0C80, 0x0CFF, // Kannada + 0x0D00, 0x0D7F, // Malayalam + 0x0D80, 0x0DFF, // Sinhala + 0x0E00, 0x0E7F, // Thai + 0x0E80, 0x0EFF, // Lao + 0x0F00, 0x0FFF, // Tibetan + 0x1000, 0x109F, // Myanmar + 0x10A0, 0x10FF, // Georgian + 0x1100, 0x11FF, // Hangul Jamo + 0x1200, 0x137F, // Ethiopic + 0x1380, 0x139F, // Ethiopic Supplement + 0x13A0, 0x13FF, // Cherokee + 0x1400, 0x167F, // Unified Canadian Aboriginal Syllabics + 0x1680, 0x169F, // Ogham + 0x16A0, 0x16FF, // Runic + 0x1700, 0x171F, // Tagalog + 0x1720, 0x173F, // Hanunoo + 0x1740, 0x175F, // Buhid + 0x1760, 0x177F, // Tagbanwa + 0x1780, 0x17FF, // Khmer + 0x1800, 0x18AF, // Mongolian + 0x18B0, 0x18FF, // Unified Canadian Aboriginal Syllabics Extended + 0x1900, 0x194F, // Limbu + 0x1950, 0x197F, // Tai Le + 0x1980, 0x19DF, // New Tai Lue + 0x19E0, 0x19FF, // Khmer Symbols + 0x1A00, 0x1A1F, // Buginese + 0x1A20, 0x1AAF, // Tai Tham + 0x1B00, 0x1B7F, // Balinese + 0x1B80, 0x1BBF, // Sundanese + 0x1BC0, 0x1BFF, // Batak + 0x1C00, 0x1C4F, // Lepcha + 0x1C50, 0x1C7F, // Ol Chiki + 0x1CD0, 0x1CFF, // Vedic Extensions + 0x1D00, 0x1D7F, // Phonetic Extensions + 0x1D80, 0x1DBF, // Phonetic Extensions Supplement + 0x1DC0, 0x1DFF, // Combining Diacritical Marks Supplement + 0x1E00, 0x1EFF, // Latin Extended Additional + 0x1F00, 0x1FFF, // Greek Extended + 0x2000, 0x206F, // General Punctuation + 0x2070, 0x209F, // Superscripts and Subscripts + 0x20A0, 0x20CF, // Currency Symbols + 0x20D0, 0x20FF, // Combining Diacritical Marks for Symbols + 0x2100, 0x214F, // Letterlike Symbols + 0x2150, 0x218F, // Number Forms + 0x2190, 0x21FF, // Arrows + 0x2200, 0x22FF, // Mathematical Operators + 0x2300, 0x23FF, // Miscellaneous Technical + 0x2400, 0x243F, // Control Pictures + 0x2440, 0x245F, // Optical Character Recognition + 0x2460, 0x24FF, // Enclosed Alphanumerics + 0x2500, 0x257F, // Box Drawing + 0x2580, 0x259F, // Block Elements + 0x25A0, 0x25FF, // Geometric Shapes + 0x2600, 0x26FF, // Miscellaneous Symbols + 0x2700, 0x27BF, // Dingbats + 0x27C0, 0x27EF, // Miscellaneous Mathematical Symbols-A + 0x27F0, 0x27FF, // Supplemental Arrows-A + 0x2800, 0x28FF, // Braille Patterns + 0x2900, 0x297F, // Supplemental Arrows-B + 0x2980, 0x29FF, // Miscellaneous Mathematical Symbols-B + 0x2A00, 0x2AFF, // Supplemental Mathematical Operators + 0x2B00, 0x2BFF, // Miscellaneous Symbols and Arrows + 0x2C00, 0x2C5F, // Glagolitic + 0x2C60, 0x2C7F, // Latin Extended-C + 0x2C80, 0x2CFF, // Coptic + 0x2D00, 0x2D2F, // Georgian Supplement + 0x2D30, 0x2D7F, // Tifinagh + 0x2D80, 0x2DDF, // Ethiopic Extended + 0x2DE0, 0x2DFF, // Cyrillic Extended-A + 0x2E00, 0x2E7F, // Supplemental Punctuation + 0x2E80, 0x2EFF, // CJK Radicals Supplement + 0x2F00, 0x2FDF, // Kangxi Radicals + 0x2FF0, 0x2FFF, // Ideographic Description Characters + 0x3000, 0x303F, // CJK Symbols and Punctuation + 0x3040, 0x309F, // Hiragana + 0x30A0, 0x30FF, // Katakana + 0x3100, 0x312F, // Bopomofo + 0x3130, 0x318F, // Hangul Compatibility Jamo + 0x3190, 0x319F, // Kanbun + 0x31A0, 0x31BF, // Bopomofo Extended + 0x31C0, 0x31EF, // CJK Strokes + 0x31F0, 0x31FF, // Katakana Phonetic Extensions + 0x3200, 0x32FF, // Enclosed CJK Letters and Months + 0x3300, 0x33FF, // CJK Compatibility + 0x3400, 0x4DBF, // CJK Unified Ideographs Extension A + 0x4DC0, 0x4DFF, // Yijing Hexagram Symbols + 0x4E00, 0x9FFF, // CJK Unified Ideographs + 0xA000, 0xA48F, // Yi Syllables + 0xA490, 0xA4CF, // Yi Radicals + 0xA4D0, 0xA4FF, // Lisu + 0xA500, 0xA63F, // Vai + 0xA640, 0xA69F, // Cyrillic Extended-B + 0xA6A0, 0xA6FF, // Bamum + 0xA700, 0xA71F, // Modifier Tone Letters + 0xA720, 0xA7FF, // Latin Extended-D + 0xA800, 0xA82F, // Syloti Nagri + 0xA830, 0xA83F, // Common Indic Number Forms + 0xA840, 0xA87F, // Phags-pa + 0xA880, 0xA8DF, // Saurashtra + 0xA8E0, 0xA8FF, // Devanagari Extended + 0xA900, 0xA92F, // Kayah Li + 0xA930, 0xA95F, // Rejang + 0xA960, 0xA97F, // Hangul Jamo Extended-A + 0xA980, 0xA9DF, // Javanese + 0xAA00, 0xAA5F, // Cham + 0xAA60, 0xAA7F, // Myanmar Extended-A + 0xAA80, 0xAADF, // Tai Viet + 0xAB00, 0xAB2F, // Ethiopic Extended-A + 0xABC0, 0xABFF, // Meetei Mayek + 0xAC00, 0xD7AF, // Hangul Syllables + 0xD7B0, 0xD7FF, // Hangul Jamo Extended-B + //0xD800, 0xDB7F, // High Surrogates + //0xDB80, 0xDBFF, // High Private Use Surrogates + //0xDC00, 0xDFFF, // Low Surrogates + 0xE000, 0xF8FF, // Private Use Area + 0xF900, 0xFAFF, // CJK Compatibility Ideographs + 0xFB00, 0xFB4F, // Alphabetic Presentation Forms + 0xFB50, 0xFDFF, // Arabic Presentation Forms-A + 0xFE00, 0xFE0F, // Variation Selectors + 0xFE10, 0xFE1F, // Vertical Forms + 0xFE20, 0xFE2F, // Combining Half Marks + 0xFE30, 0xFE4F, // CJK Compatibility Forms + 0xFE50, 0xFE6F, // Small Form Variants + 0xFE70, 0xFEFF, // Arabic Presentation Forms-B + 0xFF00, 0xFFEF, // Halfwidth and Fullwidth Forms + 0xFFF0, 0xFFFF, // Specials + 0x10000, 0x1007F, // Linear B Syllabary + 0x10080, 0x100FF, // Linear B Ideograms + 0x10100, 0x1013F, // Aegean Numbers + 0x10140, 0x1018F, // Ancient Greek Numbers + 0x10190, 0x101CF, // Ancient Symbols + 0x101D0, 0x101FF, // Phaistos Disc + 0x10280, 0x1029F, // Lycian + 0x102A0, 0x102DF, // Carian + 0x10300, 0x1032F, // Old Italic + 0x10330, 0x1034F, // Gothic + 0x10380, 0x1039F, // Ugaritic + 0x103A0, 0x103DF, // Old Persian + 0x10400, 0x1044F, // Deseret + 0x10450, 0x1047F, // Shavian + 0x10480, 0x104AF, // Osmanya + 0x10800, 0x1083F, // Cypriot Syllabary + 0x10840, 0x1085F, // Imperial Aramaic + 0x10900, 0x1091F, // Phoenician + 0x10920, 0x1093F, // Lydian + 0x10A00, 0x10A5F, // Kharoshthi + 0x10A60, 0x10A7F, // Old South Arabian + 0x10B00, 0x10B3F, // Avestan + 0x10B40, 0x10B5F, // Inscriptional Parthian + 0x10B60, 0x10B7F, // Inscriptional Pahlavi + 0x10C00, 0x10C4F, // Old Turkic + 0x10E60, 0x10E7F, // Rumi Numeral Symbols + 0x11000, 0x1107F, // Brahmi + 0x11080, 0x110CF, // Kaithi + 0x12000, 0x123FF, // Cuneiform + 0x12400, 0x1247F, // Cuneiform Numbers and Punctuation + 0x13000, 0x1342F, // Egyptian Hieroglyphs + 0x16800, 0x16A3F, // Bamum Supplement + 0x1B000, 0x1B0FF, // Kana Supplement + 0x1D000, 0x1D0FF, // Byzantine Musical Symbols + 0x1D100, 0x1D1FF, // Musical Symbols + 0x1D200, 0x1D24F, // Ancient Greek Musical Notation + 0x1D300, 0x1D35F, // Tai Xuan Jing Symbols + 0x1D360, 0x1D37F, // Counting Rod Numerals + 0x1D400, 0x1D7FF, // Mathematical Alphanumeric Symbols + 0x1F000, 0x1F02F, // Mahjong Tiles + 0x1F030, 0x1F09F, // Domino Tiles + 0x1F0A0, 0x1F0FF, // Playing Cards + 0x1F100, 0x1F1FF, // Enclosed Alphanumeric Supplement + 0x1F200, 0x1F2FF, // Enclosed Ideographic Supplement + 0x1F300, 0x1F5FF, // Miscellaneous Symbols And Pictographs + 0x1F600, 0x1F64F, // Emoticons + 0x1F680, 0x1F6FF, // Transport And Map Symbols + 0x1F700, 0x1F77F, // Alchemical Symbols + 0x20000, 0x2A6DF, // CJK Unified Ideographs Extension B + 0x2A700, 0x2B73F, // CJK Unified Ideographs Extension C + 0x2B740, 0x2B81F, // CJK Unified Ideographs Extension D + 0x2F800, 0x2FA1F, // CJK Compatibility Ideographs Supplement + 0xE0000, 0xE007F, // Tags + 0xE0100, 0xE01EF, // Variation Selectors Supplement + 0xF0000, 0xFFFFF, // Supplementary Private Use Area-A + 0x100000, 0x10FFFF, // Supplementary Private Use Area-B + 0xFFFFFFFF +}; + +// Copyright (c) 2008-2010 Bjoern Hoehrmann +// See http://bjoern.hoehrmann.de/utf-8/decoder/dfa/ for details. + +#define UTF8_ACCEPT 0u + +static const unsigned char utf8d[] = { + // The first part of the table maps bytes to character classes that + // to reduce the size of the transition table and create bitmasks. + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2, 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, + 10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3, 11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8, + + // The second part is a transition table that maps a combination + // of a state of the automaton and a character class to a state. + 0,12,24,36,60,96,84,12,12,12,48,72, 12,12,12,12,12,12,12,12,12,12,12,12, + 12, 0,12,12,12,12,12, 0,12, 0,12,12, 12,24,12,12,12,12,12,24,12,24,12,12, + 12,12,12,12,12,12,12,24,12,12,12,12, 12,24,12,12,12,12,12,12,12,24,12,12, + 12,12,12,12,12,12,12,36,12,36,12,12, 12,36,12,12,12,12,12,36,12,36,12,12, + 12,36,12,12,12,12,12,12,12,12,12,12, +}; + +static unsigned inline decode(unsigned* state, unsigned* codep, unsigned byte) { + unsigned type = utf8d[byte]; + + *codep = (*state != UTF8_ACCEPT) ? + (byte & 0x3fu) | (*codep << 6) : + (0xffu >> type) & (byte); + + *state = utf8d[256 + *state + type]; + return *state; +} + +//static bool IsUTF8(unsigned char* s) { +// unsigned codepoint, state = 0; +// +// while (*s) +// decode(&state, &codepoint, *s++); +// +// return state == UTF8_ACCEPT; +//} + +TEST(EncodingsTest, UTF8) { + StringBuffer os, os2; + for (const unsigned* range = kCodepointRanges; *range != 0xFFFFFFFF; range += 2) { + for (unsigned codepoint = range[0]; codepoint <= range[1]; ++codepoint) { + os.Clear(); + UTF8<>::Encode(os, codepoint); + const char* encodedStr = os.GetString(); + + // Decode with Hoehrmann + { + unsigned decodedCodepoint = 0; + unsigned state = 0; + + unsigned decodedCount = 0; + for (const char* s = encodedStr; *s; ++s) + if (!decode(&state, &decodedCodepoint, static_cast(*s))) { + EXPECT_EQ(codepoint, decodedCodepoint); + decodedCount++; + } + + if (*encodedStr) { // This decoder cannot handle U+0000 + EXPECT_EQ(1u, decodedCount); // Should only contain one code point + } + + EXPECT_EQ(UTF8_ACCEPT, state); + if (UTF8_ACCEPT != state) + std::cout << std::hex << codepoint << " " << decodedCodepoint << std::endl; + } + + // Decode + { + StringStream is(encodedStr); + unsigned decodedCodepoint; + bool result = UTF8<>::Decode(is, &decodedCodepoint); + EXPECT_TRUE(result); + EXPECT_EQ(codepoint, decodedCodepoint); + if (!result || codepoint != decodedCodepoint) + std::cout << std::hex << codepoint << " " << decodedCodepoint << std::endl; + } + + // Validate + { + StringStream is(encodedStr); + os2.Clear(); + bool result = UTF8<>::Validate(is, os2); + EXPECT_TRUE(result); + EXPECT_EQ(0, StrCmp(encodedStr, os2.GetString())); + } + } + } +} + +TEST(EncodingsTest, UTF16) { + GenericStringBuffer > os, os2; + GenericStringBuffer > utf8os; + for (const unsigned* range = kCodepointRanges; *range != 0xFFFFFFFF; range += 2) { + for (unsigned codepoint = range[0]; codepoint <= range[1]; ++codepoint) { + os.Clear(); + UTF16<>::Encode(os, codepoint); + const UTF16<>::Ch* encodedStr = os.GetString(); + + // Encode with Hoehrmann's code + if (codepoint != 0) // cannot handle U+0000 + { + // encode with UTF8<> first + utf8os.Clear(); + UTF8<>::Encode(utf8os, codepoint); + + // transcode from UTF8 to UTF16 with Hoehrmann's code + unsigned decodedCodepoint = 0; + unsigned state = 0; + UTF16<>::Ch buffer[3], *p = &buffer[0]; + for (const char* s = utf8os.GetString(); *s; ++s) { + if (!decode(&state, &decodedCodepoint, static_cast(*s))) + break; + } + + if (codepoint <= 0xFFFF) + *p++ = static_cast::Ch>(decodedCodepoint); + else { + // Encode code points above U+FFFF as surrogate pair. + *p++ = static_cast::Ch>(0xD7C0 + (decodedCodepoint >> 10)); + *p++ = static_cast::Ch>(0xDC00 + (decodedCodepoint & 0x3FF)); + } + *p++ = '\0'; + + EXPECT_EQ(0, StrCmp(buffer, encodedStr)); + } + + // Decode + { + GenericStringStream > is(encodedStr); + unsigned decodedCodepoint; + bool result = UTF16<>::Decode(is, &decodedCodepoint); + EXPECT_TRUE(result); + EXPECT_EQ(codepoint, decodedCodepoint); + if (!result || codepoint != decodedCodepoint) + std::cout << std::hex << codepoint << " " << decodedCodepoint << std::endl; + } + + // Validate + { + GenericStringStream > is(encodedStr); + os2.Clear(); + bool result = UTF16<>::Validate(is, os2); + EXPECT_TRUE(result); + EXPECT_EQ(0, StrCmp(encodedStr, os2.GetString())); + } + } + } +} + +TEST(EncodingsTest, UTF32) { + GenericStringBuffer > os, os2; + for (const unsigned* range = kCodepointRanges; *range != 0xFFFFFFFF; range += 2) { + for (unsigned codepoint = range[0]; codepoint <= range[1]; ++codepoint) { + os.Clear(); + UTF32<>::Encode(os, codepoint); + const UTF32<>::Ch* encodedStr = os.GetString(); + + // Decode + { + GenericStringStream > is(encodedStr); + unsigned decodedCodepoint; + bool result = UTF32<>::Decode(is, &decodedCodepoint); + EXPECT_TRUE(result); + EXPECT_EQ(codepoint, decodedCodepoint); + if (!result || codepoint != decodedCodepoint) + std::cout << std::hex << codepoint << " " << decodedCodepoint << std::endl; + } + + // Validate + { + GenericStringStream > is(encodedStr); + os2.Clear(); + bool result = UTF32<>::Validate(is, os2); + EXPECT_TRUE(result); + EXPECT_EQ(0, StrCmp(encodedStr, os2.GetString())); + } + } + } +} + +TEST(EncodingsTest, ASCII) { + StringBuffer os, os2; + for (unsigned codepoint = 0; codepoint < 128; codepoint++) { + os.Clear(); + ASCII<>::Encode(os, codepoint); + const ASCII<>::Ch* encodedStr = os.GetString(); + { + StringStream is(encodedStr); + unsigned decodedCodepoint; + bool result = ASCII<>::Decode(is, &decodedCodepoint); + if (!result || codepoint != decodedCodepoint) + std::cout << std::hex << codepoint << " " << decodedCodepoint << std::endl; + } + + // Validate + { + StringStream is(encodedStr); + os2.Clear(); + bool result = ASCII<>::Validate(is, os2); + EXPECT_TRUE(result); + EXPECT_EQ(0, StrCmp(encodedStr, os2.GetString())); + } + } +} diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/filestreamtest.cpp b/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/filestreamtest.cpp new file mode 100644 index 0000000000..de0b4d1a4a --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/filestreamtest.cpp @@ -0,0 +1,155 @@ +// Tencent is pleased to support the open source community by making RapidJSON available. +// +// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. +// +// Licensed under the MIT License (the "License"); you may not use this file except +// in compliance with the License. You may obtain a copy of the License at +// +// http://opensource.org/licenses/MIT +// +// Unless required by applicable law or agreed to in writing, software distributed +// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +// CONDITIONS OF ANY KIND, either express or implied. See the License for the +// specific language governing permissions and limitations under the License. + +#include "unittest.h" +#include "rapidjson/filereadstream.h" +#include "rapidjson/filewritestream.h" +#include "rapidjson/encodedstream.h" + +using namespace rapidjson; + +class FileStreamTest : public ::testing::Test { +public: + FileStreamTest() : filename_(), json_(), length_(), abcde_() {} + virtual ~FileStreamTest(); + + virtual void SetUp() { + const char *paths[] = { + "data/sample.json", + "bin/data/sample.json", + "../bin/data/sample.json", + "../../bin/data/sample.json", + "../../../bin/data/sample.json" + }; + FILE* fp = 0; + for (size_t i = 0; i < sizeof(paths) / sizeof(paths[0]); i++) { + fp = fopen(paths[i], "rb"); + if (fp) { + filename_ = paths[i]; + break; + } + } + ASSERT_TRUE(fp != 0); + + fseek(fp, 0, SEEK_END); + length_ = static_cast(ftell(fp)); + fseek(fp, 0, SEEK_SET); + json_ = static_cast(malloc(length_ + 1)); + size_t readLength = fread(json_, 1, length_, fp); + json_[readLength] = '\0'; + fclose(fp); + + const char *abcde_paths[] = { + "data/abcde.txt", + "bin/data/abcde.txt", + "../bin/data/abcde.txt", + "../../bin/data/abcde.txt", + "../../../bin/data/abcde.txt" + }; + fp = 0; + for (size_t i = 0; i < sizeof(abcde_paths) / sizeof(abcde_paths[0]); i++) { + fp = fopen(abcde_paths[i], "rb"); + if (fp) { + abcde_ = abcde_paths[i]; + break; + } + } + ASSERT_TRUE(fp != 0); + fclose(fp); + } + + virtual void TearDown() { + free(json_); + json_ = 0; + } + +private: + FileStreamTest(const FileStreamTest&); + FileStreamTest& operator=(const FileStreamTest&); + +protected: + const char* filename_; + char *json_; + size_t length_; + const char* abcde_; +}; + +FileStreamTest::~FileStreamTest() {} + +TEST_F(FileStreamTest, FileReadStream) { + FILE *fp = fopen(filename_, "rb"); + ASSERT_TRUE(fp != 0); + char buffer[65536]; + FileReadStream s(fp, buffer, sizeof(buffer)); + + for (size_t i = 0; i < length_; i++) { + EXPECT_EQ(json_[i], s.Peek()); + EXPECT_EQ(json_[i], s.Peek()); // 2nd time should be the same + EXPECT_EQ(json_[i], s.Take()); + } + + EXPECT_EQ(length_, s.Tell()); + EXPECT_EQ('\0', s.Peek()); + + fclose(fp); +} + +TEST_F(FileStreamTest, FileReadStream_Peek4) { + FILE *fp = fopen(abcde_, "rb"); + ASSERT_TRUE(fp != 0); + char buffer[4]; + FileReadStream s(fp, buffer, sizeof(buffer)); + + const char* c = s.Peek4(); + for (int i = 0; i < 4; i++) + EXPECT_EQ('a' + i, c[i]); + EXPECT_EQ(0u, s.Tell()); + + for (int i = 0; i < 5; i++) { + EXPECT_EQ(static_cast(i), s.Tell()); + EXPECT_EQ('a' + i, s.Peek()); + EXPECT_EQ('a' + i, s.Peek()); + EXPECT_EQ('a' + i, s.Take()); + } + EXPECT_EQ(5u, s.Tell()); + EXPECT_EQ(0, s.Peek()); + EXPECT_EQ(0, s.Take()); + + fclose(fp); +} + +TEST_F(FileStreamTest, FileWriteStream) { + char filename[L_tmpnam]; + FILE* fp = TempFile(filename); + + char buffer[65536]; + FileWriteStream os(fp, buffer, sizeof(buffer)); + for (size_t i = 0; i < length_; i++) + os.Put(json_[i]); + os.Flush(); + fclose(fp); + + // Read it back to verify + fp = fopen(filename, "rb"); + FileReadStream is(fp, buffer, sizeof(buffer)); + + for (size_t i = 0; i < length_; i++) + EXPECT_EQ(json_[i], is.Take()); + + EXPECT_EQ(length_, is.Tell()); + fclose(fp); + + //std::cout << filename << std::endl; + remove(filename); +} diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/fwdtest.cpp b/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/fwdtest.cpp new file mode 100644 index 0000000000..e9c707805a --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/fwdtest.cpp @@ -0,0 +1,230 @@ +// Tencent is pleased to support the open source community by making RapidJSON available. +// +// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. +// +// Licensed under the MIT License (the "License"); you may not use this file except +// in compliance with the License. You may obtain a copy of the License at +// +// http://opensource.org/licenses/MIT +// +// Unless required by applicable law or agreed to in writing, software distributed +// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +// CONDITIONS OF ANY KIND, either express or implied. See the License for the +// specific language governing permissions and limitations under the License. + +#include "unittest.h" + +// Using forward declared types here. + +#include "rapidjson/fwd.h" + +#ifdef __GNUC__ +RAPIDJSON_DIAG_PUSH +RAPIDJSON_DIAG_OFF(effc++) +#endif + +using namespace rapidjson; + +struct Foo { + Foo(); + ~Foo(); + + // encodings.h + UTF8* utf8; + UTF16* utf16; + UTF16BE* utf16be; + UTF16LE* utf16le; + UTF32* utf32; + UTF32BE* utf32be; + UTF32LE* utf32le; + ASCII* ascii; + AutoUTF* autoutf; + Transcoder, UTF8 >* transcoder; + + // allocators.h + CrtAllocator* crtallocator; + MemoryPoolAllocator* memorypoolallocator; + + // stream.h + StringStream* stringstream; + InsituStringStream* insitustringstream; + + // stringbuffer.h + StringBuffer* stringbuffer; + + // // filereadstream.h + // FileReadStream* filereadstream; + + // // filewritestream.h + // FileWriteStream* filewritestream; + + // memorybuffer.h + MemoryBuffer* memorybuffer; + + // memorystream.h + MemoryStream* memorystream; + + // reader.h + BaseReaderHandler, void>* basereaderhandler; + Reader* reader; + + // writer.h + Writer, UTF8, CrtAllocator, 0>* writer; + + // prettywriter.h + PrettyWriter, UTF8, CrtAllocator, 0>* prettywriter; + + // document.h + Value* value; + Document* document; + + // pointer.h + Pointer* pointer; + + // schema.h + SchemaDocument* schemadocument; + SchemaValidator* schemavalidator; + + // char buffer[16]; +}; + +// Using type definitions here. + +#include "rapidjson/stringbuffer.h" +#include "rapidjson/filereadstream.h" +#include "rapidjson/filewritestream.h" +#include "rapidjson/memorybuffer.h" +#include "rapidjson/memorystream.h" +#include "rapidjson/document.h" // -> reader.h +#include "rapidjson/writer.h" +#include "rapidjson/prettywriter.h" +#include "rapidjson/schema.h" // -> pointer.h + +typedef Transcoder, UTF8<> > TranscoderUtf8ToUtf8; +typedef BaseReaderHandler, void> BaseReaderHandlerUtf8Void; + +Foo::Foo() : + // encodings.h + utf8(RAPIDJSON_NEW(UTF8<>)), + utf16(RAPIDJSON_NEW(UTF16<>)), + utf16be(RAPIDJSON_NEW(UTF16BE<>)), + utf16le(RAPIDJSON_NEW(UTF16LE<>)), + utf32(RAPIDJSON_NEW(UTF32<>)), + utf32be(RAPIDJSON_NEW(UTF32BE<>)), + utf32le(RAPIDJSON_NEW(UTF32LE<>)), + ascii(RAPIDJSON_NEW(ASCII<>)), + autoutf(RAPIDJSON_NEW(AutoUTF)), + transcoder(RAPIDJSON_NEW(TranscoderUtf8ToUtf8)), + + // allocators.h + crtallocator(RAPIDJSON_NEW(CrtAllocator)), + memorypoolallocator(RAPIDJSON_NEW(MemoryPoolAllocator<>)), + + // stream.h + stringstream(RAPIDJSON_NEW(StringStream)(NULL)), + insitustringstream(RAPIDJSON_NEW(InsituStringStream)(NULL)), + + // stringbuffer.h + stringbuffer(RAPIDJSON_NEW(StringBuffer)), + + // // filereadstream.h + // filereadstream(RAPIDJSON_NEW(FileReadStream)(stdout, buffer, sizeof(buffer))), + + // // filewritestream.h + // filewritestream(RAPIDJSON_NEW(FileWriteStream)(stdout, buffer, sizeof(buffer))), + + // memorybuffer.h + memorybuffer(RAPIDJSON_NEW(MemoryBuffer)), + + // memorystream.h + memorystream(RAPIDJSON_NEW(MemoryStream)(NULL, 0)), + + // reader.h + basereaderhandler(RAPIDJSON_NEW(BaseReaderHandlerUtf8Void)), + reader(RAPIDJSON_NEW(Reader)), + + // writer.h + writer(RAPIDJSON_NEW(Writer)), + + // prettywriter.h + prettywriter(RAPIDJSON_NEW(PrettyWriter)), + + // document.h + value(RAPIDJSON_NEW(Value)), + document(RAPIDJSON_NEW(Document)), + + // pointer.h + pointer(RAPIDJSON_NEW(Pointer)), + + // schema.h + schemadocument(RAPIDJSON_NEW(SchemaDocument)(*document)), + schemavalidator(RAPIDJSON_NEW(SchemaValidator)(*schemadocument)) +{ + +} + +Foo::~Foo() { + // encodings.h + RAPIDJSON_DELETE(utf8); + RAPIDJSON_DELETE(utf16); + RAPIDJSON_DELETE(utf16be); + RAPIDJSON_DELETE(utf16le); + RAPIDJSON_DELETE(utf32); + RAPIDJSON_DELETE(utf32be); + RAPIDJSON_DELETE(utf32le); + RAPIDJSON_DELETE(ascii); + RAPIDJSON_DELETE(autoutf); + RAPIDJSON_DELETE(transcoder); + + // allocators.h + RAPIDJSON_DELETE(crtallocator); + RAPIDJSON_DELETE(memorypoolallocator); + + // stream.h + RAPIDJSON_DELETE(stringstream); + RAPIDJSON_DELETE(insitustringstream); + + // stringbuffer.h + RAPIDJSON_DELETE(stringbuffer); + + // // filereadstream.h + // RAPIDJSON_DELETE(filereadstream); + + // // filewritestream.h + // RAPIDJSON_DELETE(filewritestream); + + // memorybuffer.h + RAPIDJSON_DELETE(memorybuffer); + + // memorystream.h + RAPIDJSON_DELETE(memorystream); + + // reader.h + RAPIDJSON_DELETE(basereaderhandler); + RAPIDJSON_DELETE(reader); + + // writer.h + RAPIDJSON_DELETE(writer); + + // prettywriter.h + RAPIDJSON_DELETE(prettywriter); + + // document.h + RAPIDJSON_DELETE(value); + RAPIDJSON_DELETE(document); + + // pointer.h + RAPIDJSON_DELETE(pointer); + + // schema.h + RAPIDJSON_DELETE(schemadocument); + RAPIDJSON_DELETE(schemavalidator); +} + +TEST(Fwd, Fwd) { + Foo f; +} + +#ifdef __GNUC__ +RAPIDJSON_DIAG_POP +#endif diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/istreamwrappertest.cpp b/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/istreamwrappertest.cpp new file mode 100644 index 0000000000..f0cdb2d38c --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/istreamwrappertest.cpp @@ -0,0 +1,181 @@ +// Tencent is pleased to support the open source community by making RapidJSON available. +// +// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. +// +// Licensed under the MIT License (the "License"); you may not use this file except +// in compliance with the License. You may obtain a copy of the License at +// +// http://opensource.org/licenses/MIT +// +// Unless required by applicable law or agreed to in writing, software distributed +// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +// CONDITIONS OF ANY KIND, either express or implied. See the License for the +// specific language governing permissions and limitations under the License. + +#include "unittest.h" + +#include "rapidjson/istreamwrapper.h" +#include "rapidjson/encodedstream.h" +#include "rapidjson/document.h" +#include +#include + +#if defined(_MSC_VER) && !defined(__clang__) +RAPIDJSON_DIAG_PUSH +RAPIDJSON_DIAG_OFF(4702) // unreachable code +#endif + +using namespace rapidjson; +using namespace std; + +template +static void TestStringStream() { + typedef typename StringStreamType::char_type Ch; + + { + StringStreamType iss; + BasicIStreamWrapper is(iss); + EXPECT_EQ(0u, is.Tell()); + if (sizeof(Ch) == 1) { + EXPECT_EQ(0, is.Peek4()); + EXPECT_EQ(0u, is.Tell()); + } + EXPECT_EQ(0, is.Peek()); + EXPECT_EQ(0, is.Take()); + EXPECT_EQ(0u, is.Tell()); + } + + { + Ch s[] = { 'A', 'B', 'C', '\0' }; + StringStreamType iss(s); + BasicIStreamWrapper is(iss); + EXPECT_EQ(0u, is.Tell()); + if (sizeof(Ch) == 1) { + EXPECT_EQ(0, is.Peek4()); // less than 4 bytes + } + for (int i = 0; i < 3; i++) { + EXPECT_EQ(static_cast(i), is.Tell()); + EXPECT_EQ('A' + i, is.Peek()); + EXPECT_EQ('A' + i, is.Peek()); + EXPECT_EQ('A' + i, is.Take()); + } + EXPECT_EQ(3u, is.Tell()); + EXPECT_EQ(0, is.Peek()); + EXPECT_EQ(0, is.Take()); + } + + { + Ch s[] = { 'A', 'B', 'C', 'D', 'E', '\0' }; + StringStreamType iss(s); + BasicIStreamWrapper is(iss); + if (sizeof(Ch) == 1) { + const Ch* c = is.Peek4(); + for (int i = 0; i < 4; i++) + EXPECT_EQ('A' + i, c[i]); + EXPECT_EQ(0u, is.Tell()); + } + for (int i = 0; i < 5; i++) { + EXPECT_EQ(static_cast(i), is.Tell()); + EXPECT_EQ('A' + i, is.Peek()); + EXPECT_EQ('A' + i, is.Peek()); + EXPECT_EQ('A' + i, is.Take()); + } + EXPECT_EQ(5u, is.Tell()); + EXPECT_EQ(0, is.Peek()); + EXPECT_EQ(0, is.Take()); + } +} + +TEST(IStreamWrapper, istringstream) { + TestStringStream(); +} + +TEST(IStreamWrapper, stringstream) { + TestStringStream(); +} + +TEST(IStreamWrapper, wistringstream) { + TestStringStream(); +} + +TEST(IStreamWrapper, wstringstream) { + TestStringStream(); +} + +template +static bool Open(FileStreamType& fs, const char* filename) { + const char *paths[] = { + "encodings", + "bin/encodings", + "../bin/encodings", + "../../bin/encodings", + "../../../bin/encodings" + }; + char buffer[1024]; + for (size_t i = 0; i < sizeof(paths) / sizeof(paths[0]); i++) { + sprintf(buffer, "%s/%s", paths[i], filename); + fs.open(buffer, ios_base::in | ios_base::binary); + if (fs.is_open()) + return true; + } + return false; +} + +TEST(IStreamWrapper, ifstream) { + ifstream ifs; + ASSERT_TRUE(Open(ifs, "utf8bom.json")); + IStreamWrapper isw(ifs); + EncodedInputStream, IStreamWrapper> eis(isw); + Document d; + EXPECT_TRUE(!d.ParseStream(eis).HasParseError()); + EXPECT_TRUE(d.IsObject()); + EXPECT_EQ(5u, d.MemberCount()); +} + +TEST(IStreamWrapper, fstream) { + fstream fs; + ASSERT_TRUE(Open(fs, "utf8bom.json")); + IStreamWrapper isw(fs); + EncodedInputStream, IStreamWrapper> eis(isw); + Document d; + EXPECT_TRUE(!d.ParseStream(eis).HasParseError()); + EXPECT_TRUE(d.IsObject()); + EXPECT_EQ(5u, d.MemberCount()); +} + +// wifstream/wfstream only works on C++11 with codecvt_utf16 +// But many C++11 library still not have it. +#if 0 +#include + +TEST(IStreamWrapper, wifstream) { + wifstream ifs; + ASSERT_TRUE(Open(ifs, "utf16bebom.json")); + ifs.imbue(std::locale(ifs.getloc(), + new std::codecvt_utf16)); + WIStreamWrapper isw(ifs); + GenericDocument > d; + d.ParseStream, WIStreamWrapper>(isw); + EXPECT_TRUE(!d.HasParseError()); + EXPECT_TRUE(d.IsObject()); + EXPECT_EQ(5, d.MemberCount()); +} + +TEST(IStreamWrapper, wfstream) { + wfstream fs; + ASSERT_TRUE(Open(fs, "utf16bebom.json")); + fs.imbue(std::locale(fs.getloc(), + new std::codecvt_utf16)); + WIStreamWrapper isw(fs); + GenericDocument > d; + d.ParseStream, WIStreamWrapper>(isw); + EXPECT_TRUE(!d.HasParseError()); + EXPECT_TRUE(d.IsObject()); + EXPECT_EQ(5, d.MemberCount()); +} + +#endif + +#if defined(_MSC_VER) && !defined(__clang__) +RAPIDJSON_DIAG_POP +#endif diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/itoatest.cpp b/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/itoatest.cpp new file mode 100644 index 0000000000..4c834de373 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/itoatest.cpp @@ -0,0 +1,160 @@ +// Tencent is pleased to support the open source community by making RapidJSON available. +// +// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. +// +// Licensed under the MIT License (the "License"); you may not use this file except +// in compliance with the License. You may obtain a copy of the License at +// +// http://opensource.org/licenses/MIT +// +// Unless required by applicable law or agreed to in writing, software distributed +// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +// CONDITIONS OF ANY KIND, either express or implied. See the License for the +// specific language governing permissions and limitations under the License. + +#include "unittest.h" +#include "rapidjson/internal/itoa.h" + +#ifdef __GNUC__ +RAPIDJSON_DIAG_PUSH +RAPIDJSON_DIAG_OFF(type-limits) +#endif + +using namespace rapidjson::internal; + +template +struct Traits { +}; + +template <> +struct Traits { + enum { kBufferSize = 11 }; + enum { kMaxDigit = 10 }; + static uint32_t Negate(uint32_t x) { return x; } +}; + +template <> +struct Traits { + enum { kBufferSize = 12 }; + enum { kMaxDigit = 10 }; + static int32_t Negate(int32_t x) { return -x; } +}; + +template <> +struct Traits { + enum { kBufferSize = 21 }; + enum { kMaxDigit = 20 }; + static uint64_t Negate(uint64_t x) { return x; } +}; + +template <> +struct Traits { + enum { kBufferSize = 22 }; + enum { kMaxDigit = 20 }; + static int64_t Negate(int64_t x) { return -x; } +}; + +template +static void VerifyValue(T value, void(*f)(T, char*), char* (*g)(T, char*)) { + char buffer1[Traits::kBufferSize]; + char buffer2[Traits::kBufferSize]; + + f(value, buffer1); + *g(value, buffer2) = '\0'; + + + EXPECT_STREQ(buffer1, buffer2); +} + +template +static void Verify(void(*f)(T, char*), char* (*g)(T, char*)) { + // Boundary cases + VerifyValue(0, f, g); + VerifyValue((std::numeric_limits::min)(), f, g); + VerifyValue((std::numeric_limits::max)(), f, g); + + // 2^n - 1, 2^n, 10^n - 1, 10^n until overflow + for (int power = 2; power <= 10; power += 8) { + T i = 1, last; + do { + VerifyValue(i - 1, f, g); + VerifyValue(i, f, g); + if ((std::numeric_limits::min)() < 0) { + VerifyValue(Traits::Negate(i), f, g); + VerifyValue(Traits::Negate(i + 1), f, g); + } + last = i; + if (i > static_cast((std::numeric_limits::max)() / static_cast(power))) + break; + i *= static_cast(power); + } while (last < i); + } +} + +static void u32toa_naive(uint32_t value, char* buffer) { + char temp[10]; + char *p = temp; + do { + *p++ = static_cast(char(value % 10) + '0'); + value /= 10; + } while (value > 0); + + do { + *buffer++ = *--p; + } while (p != temp); + + *buffer = '\0'; +} + +static void i32toa_naive(int32_t value, char* buffer) { + uint32_t u = static_cast(value); + if (value < 0) { + *buffer++ = '-'; + u = ~u + 1; + } + u32toa_naive(u, buffer); +} + +static void u64toa_naive(uint64_t value, char* buffer) { + char temp[20]; + char *p = temp; + do { + *p++ = static_cast(char(value % 10) + '0'); + value /= 10; + } while (value > 0); + + do { + *buffer++ = *--p; + } while (p != temp); + + *buffer = '\0'; +} + +static void i64toa_naive(int64_t value, char* buffer) { + uint64_t u = static_cast(value); + if (value < 0) { + *buffer++ = '-'; + u = ~u + 1; + } + u64toa_naive(u, buffer); +} + +TEST(itoa, u32toa) { + Verify(u32toa_naive, u32toa); +} + +TEST(itoa, i32toa) { + Verify(i32toa_naive, i32toa); +} + +TEST(itoa, u64toa) { + Verify(u64toa_naive, u64toa); +} + +TEST(itoa, i64toa) { + Verify(i64toa_naive, i64toa); +} + +#ifdef __GNUC__ +RAPIDJSON_DIAG_POP +#endif diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/jsoncheckertest.cpp b/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/jsoncheckertest.cpp new file mode 100644 index 0000000000..19e1f1c47a --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/jsoncheckertest.cpp @@ -0,0 +1,143 @@ +// Tencent is pleased to support the open source community by making RapidJSON available. +// +// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. +// +// Licensed under the MIT License (the "License"); you may not use this file except +// in compliance with the License. You may obtain a copy of the License at +// +// http://opensource.org/licenses/MIT +// +// Unless required by applicable law or agreed to in writing, software distributed +// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +// CONDITIONS OF ANY KIND, either express or implied. See the License for the +// specific language governing permissions and limitations under the License. + +#include "unittest.h" + +#include "rapidjson/document.h" + +using namespace rapidjson; + +static char* ReadFile(const char* filename, size_t& length) { + const char *paths[] = { + "jsonchecker", + "bin/jsonchecker", + "../bin/jsonchecker", + "../../bin/jsonchecker", + "../../../bin/jsonchecker" + }; + char buffer[1024]; + FILE *fp = 0; + for (size_t i = 0; i < sizeof(paths) / sizeof(paths[0]); i++) { + sprintf(buffer, "%s/%s", paths[i], filename); + fp = fopen(buffer, "rb"); + if (fp) + break; + } + + if (!fp) + return 0; + + fseek(fp, 0, SEEK_END); + length = static_cast(ftell(fp)); + fseek(fp, 0, SEEK_SET); + char* json = static_cast(malloc(length + 1)); + size_t readLength = fread(json, 1, length, fp); + json[readLength] = '\0'; + fclose(fp); + return json; +} + +struct NoOpHandler { + bool Null() { return true; } + bool Bool(bool) { return true; } + bool Int(int) { return true; } + bool Uint(unsigned) { return true; } + bool Int64(int64_t) { return true; } + bool Uint64(uint64_t) { return true; } + bool Double(double) { return true; } + bool RawNumber(const char*, SizeType, bool) { return true; } + bool String(const char*, SizeType, bool) { return true; } + bool StartObject() { return true; } + bool Key(const char*, SizeType, bool) { return true; } + bool EndObject(SizeType) { return true; } + bool StartArray() { return true; } + bool EndArray(SizeType) { return true; } +}; + + +TEST(JsonChecker, Reader) { + char filename[256]; + + // jsonchecker/failXX.json + for (int i = 1; i <= 33; i++) { + if (i == 1) // fail1.json is valid in rapidjson, which has no limitation on type of root element (RFC 7159). + continue; + if (i == 18) // fail18.json is valid in rapidjson, which has no limitation on depth of nesting. + continue; + + sprintf(filename, "fail%d.json", i); + size_t length; + char* json = ReadFile(filename, length); + if (!json) { + printf("jsonchecker file %s not found", filename); + ADD_FAILURE(); + continue; + } + + // Test stack-based parsing. + GenericDocument, CrtAllocator> document; // Use Crt allocator to check exception-safety (no memory leak) + document.Parse(json); + EXPECT_TRUE(document.HasParseError()) << filename; + + // Test iterative parsing. + document.Parse(json); + EXPECT_TRUE(document.HasParseError()) << filename; + + // Test iterative pull-parsing. + Reader reader; + StringStream ss(json); + NoOpHandler h; + reader.IterativeParseInit(); + while (!reader.IterativeParseComplete()) { + if (!reader.IterativeParseNext(ss, h)) + break; + } + EXPECT_TRUE(reader.HasParseError()) << filename; + + free(json); + } + + // passX.json + for (int i = 1; i <= 3; i++) { + sprintf(filename, "pass%d.json", i); + size_t length; + char* json = ReadFile(filename, length); + if (!json) { + printf("jsonchecker file %s not found", filename); + continue; + } + + // Test stack-based parsing. + GenericDocument, CrtAllocator> document; // Use Crt allocator to check exception-safety (no memory leak) + document.Parse(json); + EXPECT_FALSE(document.HasParseError()) << filename; + + // Test iterative parsing. + document.Parse(json); + EXPECT_FALSE(document.HasParseError()) << filename; + + // Test iterative pull-parsing. + Reader reader; + StringStream ss(json); + NoOpHandler h; + reader.IterativeParseInit(); + while (!reader.IterativeParseComplete()) { + if (!reader.IterativeParseNext(ss, h)) + break; + } + EXPECT_FALSE(reader.HasParseError()) << filename; + + free(json); + } +} diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/namespacetest.cpp b/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/namespacetest.cpp new file mode 100644 index 0000000000..e33e6d5f54 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/namespacetest.cpp @@ -0,0 +1,70 @@ +// Tencent is pleased to support the open source community by making RapidJSON available. +// +// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. +// +// Licensed under the MIT License (the "License"); you may not use this file except +// in compliance with the License. You may obtain a copy of the License at +// +// http://opensource.org/licenses/MIT +// +// Unless required by applicable law or agreed to in writing, software distributed +// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +// CONDITIONS OF ANY KIND, either express or implied. See the License for the +// specific language governing permissions and limitations under the License. + +#include "unittest.h" + +// test another instantiation of RapidJSON in a different namespace + +#define RAPIDJSON_NAMESPACE my::rapid::json +#define RAPIDJSON_NAMESPACE_BEGIN namespace my { namespace rapid { namespace json { +#define RAPIDJSON_NAMESPACE_END } } } + +// include lots of RapidJSON files + +#include "rapidjson/document.h" +#include "rapidjson/writer.h" +#include "rapidjson/filereadstream.h" +#include "rapidjson/filewritestream.h" +#include "rapidjson/encodedstream.h" +#include "rapidjson/stringbuffer.h" + +static const char json[] = "{\"hello\":\"world\",\"t\":true,\"f\":false,\"n\":null,\"i\":123,\"pi\":3.1416,\"a\":[1,2,3,4]}"; + +TEST(NamespaceTest,Using) { + using namespace RAPIDJSON_NAMESPACE; + typedef GenericDocument, CrtAllocator> DocumentType; + DocumentType doc; + + doc.Parse(json); + EXPECT_TRUE(!doc.HasParseError()); +} + +TEST(NamespaceTest,Direct) { + typedef RAPIDJSON_NAMESPACE::Document Document; + typedef RAPIDJSON_NAMESPACE::Reader Reader; + typedef RAPIDJSON_NAMESPACE::StringStream StringStream; + typedef RAPIDJSON_NAMESPACE::StringBuffer StringBuffer; + typedef RAPIDJSON_NAMESPACE::Writer WriterType; + + StringStream s(json); + StringBuffer buffer; + WriterType writer(buffer); + buffer.ShrinkToFit(); + Reader reader; + reader.Parse(s, writer); + + EXPECT_STREQ(json, buffer.GetString()); + EXPECT_EQ(sizeof(json)-1, buffer.GetSize()); + EXPECT_TRUE(writer.IsComplete()); + + Document doc; + doc.Parse(buffer.GetString()); + EXPECT_TRUE(!doc.HasParseError()); + + buffer.Clear(); + writer.Reset(buffer); + doc.Accept(writer); + EXPECT_STREQ(json, buffer.GetString()); + EXPECT_TRUE(writer.IsComplete()); +} diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/ostreamwrappertest.cpp b/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/ostreamwrappertest.cpp new file mode 100644 index 0000000000..c9bc5f4bfb --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/ostreamwrappertest.cpp @@ -0,0 +1,92 @@ +// Tencent is pleased to support the open source community by making RapidJSON available. +// +// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. +// +// Licensed under the MIT License (the "License"); you may not use this file except +// in compliance with the License. You may obtain a copy of the License at +// +// http://opensource.org/licenses/MIT +// +// Unless required by applicable law or agreed to in writing, software distributed +// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +// CONDITIONS OF ANY KIND, either express or implied. See the License for the +// specific language governing permissions and limitations under the License. + +#include "unittest.h" + +#include "rapidjson/ostreamwrapper.h" +#include "rapidjson/encodedstream.h" +#include "rapidjson/document.h" +#include +#include + +using namespace rapidjson; +using namespace std; + +template +static void TestStringStream() { + typedef typename StringStreamType::char_type Ch; + + Ch s[] = { 'A', 'B', 'C', '\0' }; + StringStreamType oss(s); + BasicOStreamWrapper os(oss); + for (size_t i = 0; i < 3; i++) + os.Put(s[i]); + os.Flush(); + for (size_t i = 0; i < 3; i++) + EXPECT_EQ(s[i], oss.str()[i]); +} + +TEST(OStreamWrapper, ostringstream) { + TestStringStream(); +} + +TEST(OStreamWrapper, stringstream) { + TestStringStream(); +} + +TEST(OStreamWrapper, wostringstream) { + TestStringStream(); +} + +TEST(OStreamWrapper, wstringstream) { + TestStringStream(); +} + +TEST(OStreamWrapper, cout) { + OStreamWrapper os(cout); + const char* s = "Hello World!\n"; + while (*s) + os.Put(*s++); + os.Flush(); +} + +template +static void TestFileStream() { + char filename[L_tmpnam]; + FILE* fp = TempFile(filename); + fclose(fp); + + const char* s = "Hello World!\n"; + { + FileStreamType ofs(filename, ios::out | ios::binary); + BasicOStreamWrapper osw(ofs); + for (const char* p = s; *p; p++) + osw.Put(*p); + osw.Flush(); + } + + fp = fopen(filename, "r"); + ASSERT_TRUE( fp != NULL ); + for (const char* p = s; *p; p++) + EXPECT_EQ(*p, static_cast(fgetc(fp))); + fclose(fp); +} + +TEST(OStreamWrapper, ofstream) { + TestFileStream(); +} + +TEST(OStreamWrapper, fstream) { + TestFileStream(); +} diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/platformtest.cpp b/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/platformtest.cpp new file mode 100644 index 0000000000..05eba3f5bd --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/platformtest.cpp @@ -0,0 +1,40 @@ +// Tencent is pleased to support the open source community by making RapidJSON available. +// +// Copyright (C) 2021 THL A29 Limited, a Tencent company, and Milo Yip. +// +// Licensed under the MIT License (the "License"); you may not use this file except +// in compliance with the License. You may obtain a copy of the License at +// +// http://opensource.org/licenses/MIT +// +// Unless required by applicable law or agreed to in writing, software distributed +// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +// CONDITIONS OF ANY KIND, either express or implied. See the License for the +// specific language governing permissions and limitations under the License. + +#include "unittest.h" + +// see https://github.com/Tencent/rapidjson/issues/1448 +// including windows.h on purpose to provoke a compile time problem as GetObject is a +// macro that gets defined when windows.h is included +#ifdef _WIN32 +#include +#endif + +#include "rapidjson/document.h" +#undef GetObject + +using namespace rapidjson; + +TEST(Platform, GetObject) { + Document doc; + doc.Parse(" { \"object\" : { \"pi\": 3.1416} } "); + EXPECT_TRUE(doc.IsObject()); + EXPECT_TRUE(doc.HasMember("object")); + const Document::ValueType& o = doc["object"]; + EXPECT_TRUE(o.IsObject()); + Value::ConstObject sub = o.GetObject(); + EXPECT_TRUE(sub.HasMember("pi")); + Value::ConstObject sub2 = o.GetObj(); + EXPECT_TRUE(sub2.HasMember("pi")); +} diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/pointertest.cpp b/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/pointertest.cpp new file mode 100644 index 0000000000..342086dd10 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/pointertest.cpp @@ -0,0 +1,1730 @@ +// Tencent is pleased to support the open source community by making RapidJSON available. +// +// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. +// +// Licensed under the MIT License (the "License"); you may not use this file except +// in compliance with the License. You may obtain a copy of the License at +// +// http://opensource.org/licenses/MIT +// +// Unless required by applicable law or agreed to in writing, software distributed +// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +// CONDITIONS OF ANY KIND, either express or implied. See the License for the +// specific language governing permissions and limitations under the License. + +#include "unittest.h" +#include "rapidjson/pointer.h" +#include "rapidjson/stringbuffer.h" +#include "rapidjson/ostreamwrapper.h" +#include +#include +#include + +using namespace rapidjson; + +static const char kJson[] = "{\n" +" \"foo\":[\"bar\", \"baz\"],\n" +" \"\" : 0,\n" +" \"a/b\" : 1,\n" +" \"c%d\" : 2,\n" +" \"e^f\" : 3,\n" +" \"g|h\" : 4,\n" +" \"i\\\\j\" : 5,\n" +" \"k\\\"l\" : 6,\n" +" \" \" : 7,\n" +" \"m~n\" : 8\n" +"}"; + +TEST(Pointer, DefaultConstructor) { + Pointer p; + EXPECT_TRUE(p.IsValid()); + EXPECT_EQ(0u, p.GetTokenCount()); +} + +TEST(Pointer, Parse) { + { + Pointer p(""); + EXPECT_TRUE(p.IsValid()); + EXPECT_EQ(0u, p.GetTokenCount()); + } + + { + Pointer p("/"); + EXPECT_TRUE(p.IsValid()); + EXPECT_EQ(1u, p.GetTokenCount()); + EXPECT_EQ(0u, p.GetTokens()[0].length); + EXPECT_STREQ("", p.GetTokens()[0].name); + EXPECT_EQ(kPointerInvalidIndex, p.GetTokens()[0].index); + } + + { + Pointer p("/foo"); + EXPECT_TRUE(p.IsValid()); + EXPECT_EQ(1u, p.GetTokenCount()); + EXPECT_EQ(3u, p.GetTokens()[0].length); + EXPECT_STREQ("foo", p.GetTokens()[0].name); + EXPECT_EQ(kPointerInvalidIndex, p.GetTokens()[0].index); + } + + #if RAPIDJSON_HAS_STDSTRING + { + Pointer p(std::string("/foo")); + EXPECT_TRUE(p.IsValid()); + EXPECT_EQ(1u, p.GetTokenCount()); + EXPECT_EQ(3u, p.GetTokens()[0].length); + EXPECT_STREQ("foo", p.GetTokens()[0].name); + EXPECT_EQ(kPointerInvalidIndex, p.GetTokens()[0].index); + } + #endif + + { + Pointer p("/foo/0"); + EXPECT_TRUE(p.IsValid()); + EXPECT_EQ(2u, p.GetTokenCount()); + EXPECT_EQ(3u, p.GetTokens()[0].length); + EXPECT_STREQ("foo", p.GetTokens()[0].name); + EXPECT_EQ(kPointerInvalidIndex, p.GetTokens()[0].index); + EXPECT_EQ(1u, p.GetTokens()[1].length); + EXPECT_STREQ("0", p.GetTokens()[1].name); + EXPECT_EQ(0u, p.GetTokens()[1].index); + } + + { + // Unescape ~1 + Pointer p("/a~1b"); + EXPECT_TRUE(p.IsValid()); + EXPECT_EQ(1u, p.GetTokenCount()); + EXPECT_EQ(3u, p.GetTokens()[0].length); + EXPECT_STREQ("a/b", p.GetTokens()[0].name); + } + + { + // Unescape ~0 + Pointer p("/m~0n"); + EXPECT_TRUE(p.IsValid()); + EXPECT_EQ(1u, p.GetTokenCount()); + EXPECT_EQ(3u, p.GetTokens()[0].length); + EXPECT_STREQ("m~n", p.GetTokens()[0].name); + } + + { + // empty name + Pointer p("/"); + EXPECT_TRUE(p.IsValid()); + EXPECT_EQ(1u, p.GetTokenCount()); + EXPECT_EQ(0u, p.GetTokens()[0].length); + EXPECT_STREQ("", p.GetTokens()[0].name); + } + + { + // empty and non-empty name + Pointer p("//a"); + EXPECT_TRUE(p.IsValid()); + EXPECT_EQ(2u, p.GetTokenCount()); + EXPECT_EQ(0u, p.GetTokens()[0].length); + EXPECT_STREQ("", p.GetTokens()[0].name); + EXPECT_EQ(1u, p.GetTokens()[1].length); + EXPECT_STREQ("a", p.GetTokens()[1].name); + } + + { + // Null characters + Pointer p("/\0\0", 3); + EXPECT_TRUE(p.IsValid()); + EXPECT_EQ(1u, p.GetTokenCount()); + EXPECT_EQ(2u, p.GetTokens()[0].length); + EXPECT_EQ('\0', p.GetTokens()[0].name[0]); + EXPECT_EQ('\0', p.GetTokens()[0].name[1]); + EXPECT_EQ('\0', p.GetTokens()[0].name[2]); + } + + { + // Valid index + Pointer p("/123"); + EXPECT_TRUE(p.IsValid()); + EXPECT_EQ(1u, p.GetTokenCount()); + EXPECT_STREQ("123", p.GetTokens()[0].name); + EXPECT_EQ(123u, p.GetTokens()[0].index); + } + + { + // Invalid index (with leading zero) + Pointer p("/01"); + EXPECT_TRUE(p.IsValid()); + EXPECT_EQ(1u, p.GetTokenCount()); + EXPECT_STREQ("01", p.GetTokens()[0].name); + EXPECT_EQ(kPointerInvalidIndex, p.GetTokens()[0].index); + } + + if (sizeof(SizeType) == 4) { + // Invalid index (overflow) + Pointer p("/4294967296"); + EXPECT_TRUE(p.IsValid()); + EXPECT_EQ(1u, p.GetTokenCount()); + EXPECT_STREQ("4294967296", p.GetTokens()[0].name); + EXPECT_EQ(kPointerInvalidIndex, p.GetTokens()[0].index); + } + + { + // kPointerParseErrorTokenMustBeginWithSolidus + Pointer p(" "); + EXPECT_FALSE(p.IsValid()); + EXPECT_EQ(kPointerParseErrorTokenMustBeginWithSolidus, p.GetParseErrorCode()); + EXPECT_EQ(0u, p.GetParseErrorOffset()); + } + + { + // kPointerParseErrorInvalidEscape + Pointer p("/~"); + EXPECT_FALSE(p.IsValid()); + EXPECT_EQ(kPointerParseErrorInvalidEscape, p.GetParseErrorCode()); + EXPECT_EQ(2u, p.GetParseErrorOffset()); + } + + { + // kPointerParseErrorInvalidEscape + Pointer p("/~2"); + EXPECT_FALSE(p.IsValid()); + EXPECT_EQ(kPointerParseErrorInvalidEscape, p.GetParseErrorCode()); + EXPECT_EQ(2u, p.GetParseErrorOffset()); + } +} + +TEST(Pointer, Parse_URIFragment) { + { + Pointer p("#"); + EXPECT_TRUE(p.IsValid()); + EXPECT_EQ(0u, p.GetTokenCount()); + } + + { + Pointer p("#/foo"); + EXPECT_TRUE(p.IsValid()); + EXPECT_EQ(1u, p.GetTokenCount()); + EXPECT_EQ(3u, p.GetTokens()[0].length); + EXPECT_STREQ("foo", p.GetTokens()[0].name); + } + + { + Pointer p("#/foo/0"); + EXPECT_TRUE(p.IsValid()); + EXPECT_EQ(2u, p.GetTokenCount()); + EXPECT_EQ(3u, p.GetTokens()[0].length); + EXPECT_STREQ("foo", p.GetTokens()[0].name); + EXPECT_EQ(1u, p.GetTokens()[1].length); + EXPECT_STREQ("0", p.GetTokens()[1].name); + EXPECT_EQ(0u, p.GetTokens()[1].index); + } + + { + // Unescape ~1 + Pointer p("#/a~1b"); + EXPECT_TRUE(p.IsValid()); + EXPECT_EQ(1u, p.GetTokenCount()); + EXPECT_EQ(3u, p.GetTokens()[0].length); + EXPECT_STREQ("a/b", p.GetTokens()[0].name); + } + + { + // Unescape ~0 + Pointer p("#/m~0n"); + EXPECT_TRUE(p.IsValid()); + EXPECT_EQ(1u, p.GetTokenCount()); + EXPECT_EQ(3u, p.GetTokens()[0].length); + EXPECT_STREQ("m~n", p.GetTokens()[0].name); + } + + { + // empty name + Pointer p("#/"); + EXPECT_TRUE(p.IsValid()); + EXPECT_EQ(1u, p.GetTokenCount()); + EXPECT_EQ(0u, p.GetTokens()[0].length); + EXPECT_STREQ("", p.GetTokens()[0].name); + } + + { + // empty and non-empty name + Pointer p("#//a"); + EXPECT_TRUE(p.IsValid()); + EXPECT_EQ(2u, p.GetTokenCount()); + EXPECT_EQ(0u, p.GetTokens()[0].length); + EXPECT_STREQ("", p.GetTokens()[0].name); + EXPECT_EQ(1u, p.GetTokens()[1].length); + EXPECT_STREQ("a", p.GetTokens()[1].name); + } + + { + // Null characters + Pointer p("#/%00%00"); + EXPECT_TRUE(p.IsValid()); + EXPECT_EQ(1u, p.GetTokenCount()); + EXPECT_EQ(2u, p.GetTokens()[0].length); + EXPECT_EQ('\0', p.GetTokens()[0].name[0]); + EXPECT_EQ('\0', p.GetTokens()[0].name[1]); + EXPECT_EQ('\0', p.GetTokens()[0].name[2]); + } + + { + // Percentage Escapes + EXPECT_STREQ("c%d", Pointer("#/c%25d").GetTokens()[0].name); + EXPECT_STREQ("e^f", Pointer("#/e%5Ef").GetTokens()[0].name); + EXPECT_STREQ("g|h", Pointer("#/g%7Ch").GetTokens()[0].name); + EXPECT_STREQ("i\\j", Pointer("#/i%5Cj").GetTokens()[0].name); + EXPECT_STREQ("k\"l", Pointer("#/k%22l").GetTokens()[0].name); + EXPECT_STREQ(" ", Pointer("#/%20").GetTokens()[0].name); + } + + { + // Valid index + Pointer p("#/123"); + EXPECT_TRUE(p.IsValid()); + EXPECT_EQ(1u, p.GetTokenCount()); + EXPECT_STREQ("123", p.GetTokens()[0].name); + EXPECT_EQ(123u, p.GetTokens()[0].index); + } + + { + // Invalid index (with leading zero) + Pointer p("#/01"); + EXPECT_TRUE(p.IsValid()); + EXPECT_EQ(1u, p.GetTokenCount()); + EXPECT_STREQ("01", p.GetTokens()[0].name); + EXPECT_EQ(kPointerInvalidIndex, p.GetTokens()[0].index); + } + + if (sizeof(SizeType) == 4) { + // Invalid index (overflow) + Pointer p("#/4294967296"); + EXPECT_TRUE(p.IsValid()); + EXPECT_EQ(1u, p.GetTokenCount()); + EXPECT_STREQ("4294967296", p.GetTokens()[0].name); + EXPECT_EQ(kPointerInvalidIndex, p.GetTokens()[0].index); + } + + { + // Decode UTF-8 perecent encoding to UTF-8 + Pointer p("#/%C2%A2"); + EXPECT_TRUE(p.IsValid()); + EXPECT_EQ(1u, p.GetTokenCount()); + EXPECT_STREQ("\xC2\xA2", p.GetTokens()[0].name); + } + + { + // Decode UTF-8 perecent encoding to UTF-16 + GenericPointer > > p(L"#/%C2%A2"); + EXPECT_TRUE(p.IsValid()); + EXPECT_EQ(1u, p.GetTokenCount()); + EXPECT_EQ(static_cast::Ch>(0x00A2), p.GetTokens()[0].name[0]); + EXPECT_EQ(1u, p.GetTokens()[0].length); + } + + { + // Decode UTF-8 perecent encoding to UTF-16 + GenericPointer > > p(L"#/%E2%82%AC"); + EXPECT_TRUE(p.IsValid()); + EXPECT_EQ(1u, p.GetTokenCount()); + EXPECT_EQ(static_cast::Ch>(0x20AC), p.GetTokens()[0].name[0]); + EXPECT_EQ(1u, p.GetTokens()[0].length); + } + + { + // kPointerParseErrorTokenMustBeginWithSolidus + Pointer p("# "); + EXPECT_FALSE(p.IsValid()); + EXPECT_EQ(kPointerParseErrorTokenMustBeginWithSolidus, p.GetParseErrorCode()); + EXPECT_EQ(1u, p.GetParseErrorOffset()); + } + + { + // kPointerParseErrorInvalidEscape + Pointer p("#/~"); + EXPECT_FALSE(p.IsValid()); + EXPECT_EQ(kPointerParseErrorInvalidEscape, p.GetParseErrorCode()); + EXPECT_EQ(3u, p.GetParseErrorOffset()); + } + + { + // kPointerParseErrorInvalidEscape + Pointer p("#/~2"); + EXPECT_FALSE(p.IsValid()); + EXPECT_EQ(kPointerParseErrorInvalidEscape, p.GetParseErrorCode()); + EXPECT_EQ(3u, p.GetParseErrorOffset()); + } + + { + // kPointerParseErrorInvalidPercentEncoding + Pointer p("#/%"); + EXPECT_FALSE(p.IsValid()); + EXPECT_EQ(kPointerParseErrorInvalidPercentEncoding, p.GetParseErrorCode()); + EXPECT_EQ(2u, p.GetParseErrorOffset()); + } + + { + // kPointerParseErrorInvalidPercentEncoding (invalid hex) + Pointer p("#/%g0"); + EXPECT_FALSE(p.IsValid()); + EXPECT_EQ(kPointerParseErrorInvalidPercentEncoding, p.GetParseErrorCode()); + EXPECT_EQ(2u, p.GetParseErrorOffset()); + } + + { + // kPointerParseErrorInvalidPercentEncoding (invalid hex) + Pointer p("#/%0g"); + EXPECT_FALSE(p.IsValid()); + EXPECT_EQ(kPointerParseErrorInvalidPercentEncoding, p.GetParseErrorCode()); + EXPECT_EQ(2u, p.GetParseErrorOffset()); + } + + { + // kPointerParseErrorInvalidPercentEncoding (incomplete UTF-8 sequence) + Pointer p("#/%C2"); + EXPECT_FALSE(p.IsValid()); + EXPECT_EQ(kPointerParseErrorInvalidPercentEncoding, p.GetParseErrorCode()); + EXPECT_EQ(2u, p.GetParseErrorOffset()); + } + + { + // kPointerParseErrorCharacterMustPercentEncode + Pointer p("#/ "); + EXPECT_FALSE(p.IsValid()); + EXPECT_EQ(kPointerParseErrorCharacterMustPercentEncode, p.GetParseErrorCode()); + EXPECT_EQ(2u, p.GetParseErrorOffset()); + } + + { + // kPointerParseErrorCharacterMustPercentEncode + Pointer p("#/\n"); + EXPECT_FALSE(p.IsValid()); + EXPECT_EQ(kPointerParseErrorCharacterMustPercentEncode, p.GetParseErrorCode()); + EXPECT_EQ(2u, p.GetParseErrorOffset()); + } +} + +TEST(Pointer, Stringify) { + // Test by roundtrip + const char* sources[] = { + "", + "/foo", + "/foo/0", + "/", + "/a~1b", + "/c%d", + "/e^f", + "/g|h", + "/i\\j", + "/k\"l", + "/ ", + "/m~0n", + "/\xC2\xA2", + "/\xE2\x82\xAC", + "/\xF0\x9D\x84\x9E" + }; + + for (size_t i = 0; i < sizeof(sources) / sizeof(sources[0]); i++) { + Pointer p(sources[i]); + StringBuffer s; + EXPECT_TRUE(p.Stringify(s)); + EXPECT_STREQ(sources[i], s.GetString()); + + // Stringify to URI fragment + StringBuffer s2; + EXPECT_TRUE(p.StringifyUriFragment(s2)); + Pointer p2(s2.GetString(), s2.GetSize()); + EXPECT_TRUE(p2.IsValid()); + EXPECT_TRUE(p == p2); + } + + { + // Strigify to URI fragment with an invalid UTF-8 sequence + Pointer p("/\xC2"); + StringBuffer s; + EXPECT_FALSE(p.StringifyUriFragment(s)); + } +} + +// Construct a Pointer with static tokens, no dynamic allocation involved. +#define NAME(s) { s, static_cast(sizeof(s) / sizeof(s[0]) - 1), kPointerInvalidIndex } +#define INDEX(i) { #i, static_cast(sizeof(#i) - 1), i } + +static const Pointer::Token kTokens[] = { NAME("foo"), INDEX(0) }; // equivalent to "/foo/0" + +#undef NAME +#undef INDEX + +TEST(Pointer, ConstructorWithToken) { + Pointer p(kTokens, sizeof(kTokens) / sizeof(kTokens[0])); + EXPECT_TRUE(p.IsValid()); + EXPECT_EQ(2u, p.GetTokenCount()); + EXPECT_EQ(3u, p.GetTokens()[0].length); + EXPECT_STREQ("foo", p.GetTokens()[0].name); + EXPECT_EQ(1u, p.GetTokens()[1].length); + EXPECT_STREQ("0", p.GetTokens()[1].name); + EXPECT_EQ(0u, p.GetTokens()[1].index); +} + +TEST(Pointer, CopyConstructor) { + { + CrtAllocator allocator; + Pointer p("/foo/0", &allocator); + Pointer q(p); + EXPECT_TRUE(q.IsValid()); + EXPECT_EQ(2u, q.GetTokenCount()); + EXPECT_EQ(3u, q.GetTokens()[0].length); + EXPECT_STREQ("foo", q.GetTokens()[0].name); + EXPECT_EQ(1u, q.GetTokens()[1].length); + EXPECT_STREQ("0", q.GetTokens()[1].name); + EXPECT_EQ(0u, q.GetTokens()[1].index); + + // Copied pointer needs to have its own allocator + EXPECT_NE(&p.GetAllocator(), &q.GetAllocator()); + } + + // Static tokens + { + Pointer p(kTokens, sizeof(kTokens) / sizeof(kTokens[0])); + Pointer q(p); + EXPECT_TRUE(q.IsValid()); + EXPECT_EQ(2u, q.GetTokenCount()); + EXPECT_EQ(3u, q.GetTokens()[0].length); + EXPECT_STREQ("foo", q.GetTokens()[0].name); + EXPECT_EQ(1u, q.GetTokens()[1].length); + EXPECT_STREQ("0", q.GetTokens()[1].name); + EXPECT_EQ(0u, q.GetTokens()[1].index); + } +} + +TEST(Pointer, Assignment) { + { + CrtAllocator allocator; + Pointer p("/foo/0", &allocator); + Pointer q; + q = p; + EXPECT_TRUE(q.IsValid()); + EXPECT_EQ(2u, q.GetTokenCount()); + EXPECT_EQ(3u, q.GetTokens()[0].length); + EXPECT_STREQ("foo", q.GetTokens()[0].name); + EXPECT_EQ(1u, q.GetTokens()[1].length); + EXPECT_STREQ("0", q.GetTokens()[1].name); + EXPECT_EQ(0u, q.GetTokens()[1].index); + EXPECT_NE(&p.GetAllocator(), &q.GetAllocator()); + q = static_cast(q); + EXPECT_TRUE(q.IsValid()); + EXPECT_EQ(2u, q.GetTokenCount()); + EXPECT_EQ(3u, q.GetTokens()[0].length); + EXPECT_STREQ("foo", q.GetTokens()[0].name); + EXPECT_EQ(1u, q.GetTokens()[1].length); + EXPECT_STREQ("0", q.GetTokens()[1].name); + EXPECT_EQ(0u, q.GetTokens()[1].index); + EXPECT_NE(&p.GetAllocator(), &q.GetAllocator()); + } + + // Static tokens + { + Pointer p(kTokens, sizeof(kTokens) / sizeof(kTokens[0])); + Pointer q; + q = p; + EXPECT_TRUE(q.IsValid()); + EXPECT_EQ(2u, q.GetTokenCount()); + EXPECT_EQ(3u, q.GetTokens()[0].length); + EXPECT_STREQ("foo", q.GetTokens()[0].name); + EXPECT_EQ(1u, q.GetTokens()[1].length); + EXPECT_STREQ("0", q.GetTokens()[1].name); + EXPECT_EQ(0u, q.GetTokens()[1].index); + } +} + +TEST(Pointer, Swap) { + Pointer p("/foo/0"); + Pointer q(&p.GetAllocator()); + + q.Swap(p); + EXPECT_EQ(&q.GetAllocator(), &p.GetAllocator()); + EXPECT_TRUE(p.IsValid()); + EXPECT_TRUE(q.IsValid()); + EXPECT_EQ(0u, p.GetTokenCount()); + EXPECT_EQ(2u, q.GetTokenCount()); + EXPECT_EQ(3u, q.GetTokens()[0].length); + EXPECT_STREQ("foo", q.GetTokens()[0].name); + EXPECT_EQ(1u, q.GetTokens()[1].length); + EXPECT_STREQ("0", q.GetTokens()[1].name); + EXPECT_EQ(0u, q.GetTokens()[1].index); + + // std::swap compatibility + std::swap(p, q); + EXPECT_EQ(&p.GetAllocator(), &q.GetAllocator()); + EXPECT_TRUE(q.IsValid()); + EXPECT_TRUE(p.IsValid()); + EXPECT_EQ(0u, q.GetTokenCount()); + EXPECT_EQ(2u, p.GetTokenCount()); + EXPECT_EQ(3u, p.GetTokens()[0].length); + EXPECT_STREQ("foo", p.GetTokens()[0].name); + EXPECT_EQ(1u, p.GetTokens()[1].length); + EXPECT_STREQ("0", p.GetTokens()[1].name); + EXPECT_EQ(0u, p.GetTokens()[1].index); +} + +TEST(Pointer, Append) { + { + Pointer p; + Pointer q = p.Append("foo"); + EXPECT_TRUE(Pointer("/foo") == q); + q = q.Append(1234); + EXPECT_TRUE(Pointer("/foo/1234") == q); + q = q.Append(""); + EXPECT_TRUE(Pointer("/foo/1234/") == q); + } + + { + Pointer p; + Pointer q = p.Append(Value("foo").Move()); + EXPECT_TRUE(Pointer("/foo") == q); + q = q.Append(Value(1234).Move()); + EXPECT_TRUE(Pointer("/foo/1234") == q); + q = q.Append(Value(kStringType).Move()); + EXPECT_TRUE(Pointer("/foo/1234/") == q); + } + +#if RAPIDJSON_HAS_STDSTRING + { + Pointer p; + Pointer q = p.Append(std::string("foo")); + EXPECT_TRUE(Pointer("/foo") == q); + } +#endif +} + +TEST(Pointer, Equality) { + EXPECT_TRUE(Pointer("/foo/0") == Pointer("/foo/0")); + EXPECT_FALSE(Pointer("/foo/0") == Pointer("/foo/1")); + EXPECT_FALSE(Pointer("/foo/0") == Pointer("/foo/0/1")); + EXPECT_FALSE(Pointer("/foo/0") == Pointer("a")); + EXPECT_FALSE(Pointer("a") == Pointer("a")); // Invalid always not equal +} + +TEST(Pointer, Inequality) { + EXPECT_FALSE(Pointer("/foo/0") != Pointer("/foo/0")); + EXPECT_TRUE(Pointer("/foo/0") != Pointer("/foo/1")); + EXPECT_TRUE(Pointer("/foo/0") != Pointer("/foo/0/1")); + EXPECT_TRUE(Pointer("/foo/0") != Pointer("a")); + EXPECT_TRUE(Pointer("a") != Pointer("a")); // Invalid always not equal +} + +TEST(Pointer, Create) { + Document d; + { + Value* v = &Pointer("").Create(d, d.GetAllocator()); + EXPECT_EQ(&d, v); + } + { + Value* v = &Pointer("/foo").Create(d, d.GetAllocator()); + EXPECT_EQ(&d["foo"], v); + } + { + Value* v = &Pointer("/foo/0").Create(d, d.GetAllocator()); + EXPECT_EQ(&d["foo"][0], v); + } + { + Value* v = &Pointer("/foo/-").Create(d, d.GetAllocator()); + EXPECT_EQ(&d["foo"][1], v); + } + + { + Value* v = &Pointer("/foo/-/-").Create(d, d.GetAllocator()); + // "foo/-" is a newly created null value x. + // "foo/-/-" finds that x is not an array, it converts x to empty object + // and treats - as "-" member name + EXPECT_EQ(&d["foo"][2]["-"], v); + } + + { + // Document with no allocator + Value* v = &Pointer("/foo/-").Create(d); + EXPECT_EQ(&d["foo"][3], v); + } + + { + // Value (not document) must give allocator + Value* v = &Pointer("/-").Create(d["foo"], d.GetAllocator()); + EXPECT_EQ(&d["foo"][4], v); + } +} + +static const char kJsonIds[] = "{\n" + " \"id\": \"/root/\"," + " \"foo\":[\"bar\", \"baz\", {\"id\": \"inarray\", \"child\": 1}],\n" + " \"int\" : 2,\n" + " \"str\" : \"val\",\n" + " \"obj\": {\"id\": \"inobj\", \"child\": 3},\n" + " \"jbo\": {\"id\": true, \"child\": 4}\n" + "}"; + + +TEST(Pointer, GetUri) { + CrtAllocator allocator; + Document d; + d.Parse(kJsonIds); + Pointer::UriType doc("http://doc"); + Pointer::UriType root("http://doc/root/"); + Pointer::UriType empty = Pointer::UriType(); + + EXPECT_TRUE(Pointer("").GetUri(d, doc) == doc); + EXPECT_TRUE(Pointer("/foo").GetUri(d, doc) == root); + EXPECT_TRUE(Pointer("/foo/0").GetUri(d, doc) == root); + EXPECT_TRUE(Pointer("/foo/2").GetUri(d, doc) == root); + EXPECT_TRUE(Pointer("/foo/2/child").GetUri(d, doc) == Pointer::UriType("http://doc/root/inarray")); + EXPECT_TRUE(Pointer("/int").GetUri(d, doc) == root); + EXPECT_TRUE(Pointer("/str").GetUri(d, doc) == root); + EXPECT_TRUE(Pointer("/obj").GetUri(d, doc) == root); + EXPECT_TRUE(Pointer("/obj/child").GetUri(d, doc) == Pointer::UriType("http://doc/root/inobj")); + EXPECT_TRUE(Pointer("/jbo").GetUri(d, doc) == root); + EXPECT_TRUE(Pointer("/jbo/child").GetUri(d, doc) == root); // id not string + + size_t unresolvedTokenIndex; + EXPECT_TRUE(Pointer("/abc").GetUri(d, doc, &unresolvedTokenIndex, &allocator) == empty); // Out of boundary + EXPECT_EQ(0u, unresolvedTokenIndex); + EXPECT_TRUE(Pointer("/foo/3").GetUri(d, doc, &unresolvedTokenIndex, &allocator) == empty); // Out of boundary + EXPECT_EQ(1u, unresolvedTokenIndex); + EXPECT_TRUE(Pointer("/foo/a").GetUri(d, doc, &unresolvedTokenIndex, &allocator) == empty); // "/foo" is an array, cannot query by "a" + EXPECT_EQ(1u, unresolvedTokenIndex); + EXPECT_TRUE(Pointer("/foo/0/0").GetUri(d, doc, &unresolvedTokenIndex, &allocator) == empty); // "/foo/0" is an string, cannot further query + EXPECT_EQ(2u, unresolvedTokenIndex); + EXPECT_TRUE(Pointer("/foo/0/a").GetUri(d, doc, &unresolvedTokenIndex, &allocator) == empty); // "/foo/0" is an string, cannot further query + EXPECT_EQ(2u, unresolvedTokenIndex); + + Pointer::Token tokens[] = { { "foo ...", 3, kPointerInvalidIndex } }; + EXPECT_TRUE(Pointer(tokens, 1).GetUri(d, doc) == root); +} + +TEST(Pointer, Get) { + Document d; + d.Parse(kJson); + + EXPECT_EQ(&d, Pointer("").Get(d)); + EXPECT_EQ(&d["foo"], Pointer("/foo").Get(d)); + EXPECT_EQ(&d["foo"][0], Pointer("/foo/0").Get(d)); + EXPECT_EQ(&d[""], Pointer("/").Get(d)); + EXPECT_EQ(&d["a/b"], Pointer("/a~1b").Get(d)); + EXPECT_EQ(&d["c%d"], Pointer("/c%d").Get(d)); + EXPECT_EQ(&d["e^f"], Pointer("/e^f").Get(d)); + EXPECT_EQ(&d["g|h"], Pointer("/g|h").Get(d)); + EXPECT_EQ(&d["i\\j"], Pointer("/i\\j").Get(d)); + EXPECT_EQ(&d["k\"l"], Pointer("/k\"l").Get(d)); + EXPECT_EQ(&d[" "], Pointer("/ ").Get(d)); + EXPECT_EQ(&d["m~n"], Pointer("/m~0n").Get(d)); + + EXPECT_TRUE(Pointer("/abc").Get(d) == 0); // Out of boundary + size_t unresolvedTokenIndex; + EXPECT_TRUE(Pointer("/foo/2").Get(d, &unresolvedTokenIndex) == 0); // Out of boundary + EXPECT_EQ(1u, unresolvedTokenIndex); + EXPECT_TRUE(Pointer("/foo/a").Get(d, &unresolvedTokenIndex) == 0); // "/foo" is an array, cannot query by "a" + EXPECT_EQ(1u, unresolvedTokenIndex); + EXPECT_TRUE(Pointer("/foo/0/0").Get(d, &unresolvedTokenIndex) == 0); // "/foo/0" is an string, cannot further query + EXPECT_EQ(2u, unresolvedTokenIndex); + EXPECT_TRUE(Pointer("/foo/0/a").Get(d, &unresolvedTokenIndex) == 0); // "/foo/0" is an string, cannot further query + EXPECT_EQ(2u, unresolvedTokenIndex); + + Pointer::Token tokens[] = { { "foo ...", 3, kPointerInvalidIndex } }; + EXPECT_EQ(&d["foo"], Pointer(tokens, 1).Get(d)); +} + +TEST(Pointer, GetWithDefault) { + Document d; + d.Parse(kJson); + + // Value version + Document::AllocatorType& a = d.GetAllocator(); + const Value v("qux"); + EXPECT_TRUE(Value("bar") == Pointer("/foo/0").GetWithDefault(d, v, a)); + EXPECT_TRUE(Value("baz") == Pointer("/foo/1").GetWithDefault(d, v, a)); + EXPECT_TRUE(Value("qux") == Pointer("/foo/2").GetWithDefault(d, v, a)); + EXPECT_TRUE(Value("last") == Pointer("/foo/-").GetWithDefault(d, Value("last").Move(), a)); + EXPECT_STREQ("last", d["foo"][3].GetString()); + + EXPECT_TRUE(Pointer("/foo/null").GetWithDefault(d, Value().Move(), a).IsNull()); + EXPECT_TRUE(Pointer("/foo/null").GetWithDefault(d, "x", a).IsNull()); + + // Generic version + EXPECT_EQ(-1, Pointer("/foo/int").GetWithDefault(d, -1, a).GetInt()); + EXPECT_EQ(-1, Pointer("/foo/int").GetWithDefault(d, -2, a).GetInt()); + EXPECT_EQ(0x87654321, Pointer("/foo/uint").GetWithDefault(d, 0x87654321, a).GetUint()); + EXPECT_EQ(0x87654321, Pointer("/foo/uint").GetWithDefault(d, 0x12345678, a).GetUint()); + + const int64_t i64 = static_cast(RAPIDJSON_UINT64_C2(0x80000000, 0)); + EXPECT_EQ(i64, Pointer("/foo/int64").GetWithDefault(d, i64, a).GetInt64()); + EXPECT_EQ(i64, Pointer("/foo/int64").GetWithDefault(d, i64 + 1, a).GetInt64()); + + const uint64_t u64 = RAPIDJSON_UINT64_C2(0xFFFFFFFFF, 0xFFFFFFFFF); + EXPECT_EQ(u64, Pointer("/foo/uint64").GetWithDefault(d, u64, a).GetUint64()); + EXPECT_EQ(u64, Pointer("/foo/uint64").GetWithDefault(d, u64 - 1, a).GetUint64()); + + EXPECT_TRUE(Pointer("/foo/true").GetWithDefault(d, true, a).IsTrue()); + EXPECT_TRUE(Pointer("/foo/true").GetWithDefault(d, false, a).IsTrue()); + + EXPECT_TRUE(Pointer("/foo/false").GetWithDefault(d, false, a).IsFalse()); + EXPECT_TRUE(Pointer("/foo/false").GetWithDefault(d, true, a).IsFalse()); + + // StringRef version + EXPECT_STREQ("Hello", Pointer("/foo/hello").GetWithDefault(d, "Hello", a).GetString()); + + // Copy string version + { + char buffer[256]; + strcpy(buffer, "World"); + EXPECT_STREQ("World", Pointer("/foo/world").GetWithDefault(d, buffer, a).GetString()); + memset(buffer, 0, sizeof(buffer)); + } + EXPECT_STREQ("World", GetValueByPointer(d, "/foo/world")->GetString()); + +#if RAPIDJSON_HAS_STDSTRING + EXPECT_STREQ("C++", Pointer("/foo/C++").GetWithDefault(d, std::string("C++"), a).GetString()); +#endif +} + +TEST(Pointer, GetWithDefault_NoAllocator) { + Document d; + d.Parse(kJson); + + // Value version + const Value v("qux"); + EXPECT_TRUE(Value("bar") == Pointer("/foo/0").GetWithDefault(d, v)); + EXPECT_TRUE(Value("baz") == Pointer("/foo/1").GetWithDefault(d, v)); + EXPECT_TRUE(Value("qux") == Pointer("/foo/2").GetWithDefault(d, v)); + EXPECT_TRUE(Value("last") == Pointer("/foo/-").GetWithDefault(d, Value("last").Move())); + EXPECT_STREQ("last", d["foo"][3].GetString()); + + EXPECT_TRUE(Pointer("/foo/null").GetWithDefault(d, Value().Move()).IsNull()); + EXPECT_TRUE(Pointer("/foo/null").GetWithDefault(d, "x").IsNull()); + + // Generic version + EXPECT_EQ(-1, Pointer("/foo/int").GetWithDefault(d, -1).GetInt()); + EXPECT_EQ(-1, Pointer("/foo/int").GetWithDefault(d, -2).GetInt()); + EXPECT_EQ(0x87654321, Pointer("/foo/uint").GetWithDefault(d, 0x87654321).GetUint()); + EXPECT_EQ(0x87654321, Pointer("/foo/uint").GetWithDefault(d, 0x12345678).GetUint()); + + const int64_t i64 = static_cast(RAPIDJSON_UINT64_C2(0x80000000, 0)); + EXPECT_EQ(i64, Pointer("/foo/int64").GetWithDefault(d, i64).GetInt64()); + EXPECT_EQ(i64, Pointer("/foo/int64").GetWithDefault(d, i64 + 1).GetInt64()); + + const uint64_t u64 = RAPIDJSON_UINT64_C2(0xFFFFFFFFF, 0xFFFFFFFFF); + EXPECT_EQ(u64, Pointer("/foo/uint64").GetWithDefault(d, u64).GetUint64()); + EXPECT_EQ(u64, Pointer("/foo/uint64").GetWithDefault(d, u64 - 1).GetUint64()); + + EXPECT_TRUE(Pointer("/foo/true").GetWithDefault(d, true).IsTrue()); + EXPECT_TRUE(Pointer("/foo/true").GetWithDefault(d, false).IsTrue()); + + EXPECT_TRUE(Pointer("/foo/false").GetWithDefault(d, false).IsFalse()); + EXPECT_TRUE(Pointer("/foo/false").GetWithDefault(d, true).IsFalse()); + + // StringRef version + EXPECT_STREQ("Hello", Pointer("/foo/hello").GetWithDefault(d, "Hello").GetString()); + + // Copy string version + { + char buffer[256]; + strcpy(buffer, "World"); + EXPECT_STREQ("World", Pointer("/foo/world").GetWithDefault(d, buffer).GetString()); + memset(buffer, 0, sizeof(buffer)); + } + EXPECT_STREQ("World", GetValueByPointer(d, "/foo/world")->GetString()); + +#if RAPIDJSON_HAS_STDSTRING + EXPECT_STREQ("C++", Pointer("/foo/C++").GetWithDefault(d, std::string("C++")).GetString()); +#endif +} + +TEST(Pointer, Set) { + Document d; + d.Parse(kJson); + Document::AllocatorType& a = d.GetAllocator(); + + // Value version + Pointer("/foo/0").Set(d, Value(123).Move(), a); + EXPECT_EQ(123, d["foo"][0].GetInt()); + + Pointer("/foo/-").Set(d, Value(456).Move(), a); + EXPECT_EQ(456, d["foo"][2].GetInt()); + + Pointer("/foo/null").Set(d, Value().Move(), a); + EXPECT_TRUE(GetValueByPointer(d, "/foo/null")->IsNull()); + + // Const Value version + const Value foo(d["foo"], a); + Pointer("/clone").Set(d, foo, a); + EXPECT_EQ(foo, *GetValueByPointer(d, "/clone")); + + // Generic version + Pointer("/foo/int").Set(d, -1, a); + EXPECT_EQ(-1, GetValueByPointer(d, "/foo/int")->GetInt()); + + Pointer("/foo/uint").Set(d, 0x87654321, a); + EXPECT_EQ(0x87654321, GetValueByPointer(d, "/foo/uint")->GetUint()); + + const int64_t i64 = static_cast(RAPIDJSON_UINT64_C2(0x80000000, 0)); + Pointer("/foo/int64").Set(d, i64, a); + EXPECT_EQ(i64, GetValueByPointer(d, "/foo/int64")->GetInt64()); + + const uint64_t u64 = RAPIDJSON_UINT64_C2(0xFFFFFFFFF, 0xFFFFFFFFF); + Pointer("/foo/uint64").Set(d, u64, a); + EXPECT_EQ(u64, GetValueByPointer(d, "/foo/uint64")->GetUint64()); + + Pointer("/foo/true").Set(d, true, a); + EXPECT_TRUE(GetValueByPointer(d, "/foo/true")->IsTrue()); + + Pointer("/foo/false").Set(d, false, a); + EXPECT_TRUE(GetValueByPointer(d, "/foo/false")->IsFalse()); + + // StringRef version + Pointer("/foo/hello").Set(d, "Hello", a); + EXPECT_STREQ("Hello", GetValueByPointer(d, "/foo/hello")->GetString()); + + // Copy string version + { + char buffer[256]; + strcpy(buffer, "World"); + Pointer("/foo/world").Set(d, buffer, a); + memset(buffer, 0, sizeof(buffer)); + } + EXPECT_STREQ("World", GetValueByPointer(d, "/foo/world")->GetString()); + +#if RAPIDJSON_HAS_STDSTRING + Pointer("/foo/c++").Set(d, std::string("C++"), a); + EXPECT_STREQ("C++", GetValueByPointer(d, "/foo/c++")->GetString()); +#endif +} + +TEST(Pointer, Set_NoAllocator) { + Document d; + d.Parse(kJson); + + // Value version + Pointer("/foo/0").Set(d, Value(123).Move()); + EXPECT_EQ(123, d["foo"][0].GetInt()); + + Pointer("/foo/-").Set(d, Value(456).Move()); + EXPECT_EQ(456, d["foo"][2].GetInt()); + + Pointer("/foo/null").Set(d, Value().Move()); + EXPECT_TRUE(GetValueByPointer(d, "/foo/null")->IsNull()); + + // Const Value version + const Value foo(d["foo"], d.GetAllocator()); + Pointer("/clone").Set(d, foo); + EXPECT_EQ(foo, *GetValueByPointer(d, "/clone")); + + // Generic version + Pointer("/foo/int").Set(d, -1); + EXPECT_EQ(-1, GetValueByPointer(d, "/foo/int")->GetInt()); + + Pointer("/foo/uint").Set(d, 0x87654321); + EXPECT_EQ(0x87654321, GetValueByPointer(d, "/foo/uint")->GetUint()); + + const int64_t i64 = static_cast(RAPIDJSON_UINT64_C2(0x80000000, 0)); + Pointer("/foo/int64").Set(d, i64); + EXPECT_EQ(i64, GetValueByPointer(d, "/foo/int64")->GetInt64()); + + const uint64_t u64 = RAPIDJSON_UINT64_C2(0xFFFFFFFFF, 0xFFFFFFFFF); + Pointer("/foo/uint64").Set(d, u64); + EXPECT_EQ(u64, GetValueByPointer(d, "/foo/uint64")->GetUint64()); + + Pointer("/foo/true").Set(d, true); + EXPECT_TRUE(GetValueByPointer(d, "/foo/true")->IsTrue()); + + Pointer("/foo/false").Set(d, false); + EXPECT_TRUE(GetValueByPointer(d, "/foo/false")->IsFalse()); + + // StringRef version + Pointer("/foo/hello").Set(d, "Hello"); + EXPECT_STREQ("Hello", GetValueByPointer(d, "/foo/hello")->GetString()); + + // Copy string version + { + char buffer[256]; + strcpy(buffer, "World"); + Pointer("/foo/world").Set(d, buffer); + memset(buffer, 0, sizeof(buffer)); + } + EXPECT_STREQ("World", GetValueByPointer(d, "/foo/world")->GetString()); + +#if RAPIDJSON_HAS_STDSTRING + Pointer("/foo/c++").Set(d, std::string("C++")); + EXPECT_STREQ("C++", GetValueByPointer(d, "/foo/c++")->GetString()); +#endif +} + +TEST(Pointer, Swap_Value) { + Document d; + d.Parse(kJson); + Document::AllocatorType& a = d.GetAllocator(); + Pointer("/foo/0").Swap(d, *Pointer("/foo/1").Get(d), a); + EXPECT_STREQ("baz", d["foo"][0].GetString()); + EXPECT_STREQ("bar", d["foo"][1].GetString()); +} + +TEST(Pointer, Swap_Value_NoAllocator) { + Document d; + d.Parse(kJson); + Pointer("/foo/0").Swap(d, *Pointer("/foo/1").Get(d)); + EXPECT_STREQ("baz", d["foo"][0].GetString()); + EXPECT_STREQ("bar", d["foo"][1].GetString()); +} + +TEST(Pointer, Erase) { + Document d; + d.Parse(kJson); + + EXPECT_FALSE(Pointer("").Erase(d)); + EXPECT_FALSE(Pointer("/nonexist").Erase(d)); + EXPECT_FALSE(Pointer("/nonexist/nonexist").Erase(d)); + EXPECT_FALSE(Pointer("/foo/nonexist").Erase(d)); + EXPECT_FALSE(Pointer("/foo/nonexist/nonexist").Erase(d)); + EXPECT_FALSE(Pointer("/foo/0/nonexist").Erase(d)); + EXPECT_FALSE(Pointer("/foo/0/nonexist/nonexist").Erase(d)); + EXPECT_FALSE(Pointer("/foo/2/nonexist").Erase(d)); + EXPECT_TRUE(Pointer("/foo/0").Erase(d)); + EXPECT_EQ(1u, d["foo"].Size()); + EXPECT_STREQ("baz", d["foo"][0].GetString()); + EXPECT_TRUE(Pointer("/foo/0").Erase(d)); + EXPECT_TRUE(d["foo"].Empty()); + EXPECT_TRUE(Pointer("/foo").Erase(d)); + EXPECT_TRUE(Pointer("/foo").Get(d) == 0); + + Pointer("/a/0/b/0").Create(d); + + EXPECT_TRUE(Pointer("/a/0/b/0").Get(d) != 0); + EXPECT_TRUE(Pointer("/a/0/b/0").Erase(d)); + EXPECT_TRUE(Pointer("/a/0/b/0").Get(d) == 0); + + EXPECT_TRUE(Pointer("/a/0/b").Get(d) != 0); + EXPECT_TRUE(Pointer("/a/0/b").Erase(d)); + EXPECT_TRUE(Pointer("/a/0/b").Get(d) == 0); + + EXPECT_TRUE(Pointer("/a/0").Get(d) != 0); + EXPECT_TRUE(Pointer("/a/0").Erase(d)); + EXPECT_TRUE(Pointer("/a/0").Get(d) == 0); + + EXPECT_TRUE(Pointer("/a").Get(d) != 0); + EXPECT_TRUE(Pointer("/a").Erase(d)); + EXPECT_TRUE(Pointer("/a").Get(d) == 0); +} + +TEST(Pointer, CreateValueByPointer) { + Document d; + Document::AllocatorType& a = d.GetAllocator(); + + { + Value& v = CreateValueByPointer(d, Pointer("/foo/0"), a); + EXPECT_EQ(&d["foo"][0], &v); + } + { + Value& v = CreateValueByPointer(d, "/foo/1", a); + EXPECT_EQ(&d["foo"][1], &v); + } +} + +TEST(Pointer, CreateValueByPointer_NoAllocator) { + Document d; + + { + Value& v = CreateValueByPointer(d, Pointer("/foo/0")); + EXPECT_EQ(&d["foo"][0], &v); + } + { + Value& v = CreateValueByPointer(d, "/foo/1"); + EXPECT_EQ(&d["foo"][1], &v); + } +} + +TEST(Pointer, GetValueByPointer) { + Document d; + d.Parse(kJson); + + EXPECT_EQ(&d["foo"][0], GetValueByPointer(d, Pointer("/foo/0"))); + EXPECT_EQ(&d["foo"][0], GetValueByPointer(d, "/foo/0")); + + size_t unresolvedTokenIndex; + EXPECT_TRUE(GetValueByPointer(d, "/foo/2", &unresolvedTokenIndex) == 0); // Out of boundary + EXPECT_EQ(1u, unresolvedTokenIndex); + EXPECT_TRUE(GetValueByPointer(d, "/foo/a", &unresolvedTokenIndex) == 0); // "/foo" is an array, cannot query by "a" + EXPECT_EQ(1u, unresolvedTokenIndex); + EXPECT_TRUE(GetValueByPointer(d, "/foo/0/0", &unresolvedTokenIndex) == 0); // "/foo/0" is an string, cannot further query + EXPECT_EQ(2u, unresolvedTokenIndex); + EXPECT_TRUE(GetValueByPointer(d, "/foo/0/a", &unresolvedTokenIndex) == 0); // "/foo/0" is an string, cannot further query + EXPECT_EQ(2u, unresolvedTokenIndex); + + // const version + const Value& v = d; + EXPECT_EQ(&d["foo"][0], GetValueByPointer(v, Pointer("/foo/0"))); + EXPECT_EQ(&d["foo"][0], GetValueByPointer(v, "/foo/0")); + + EXPECT_TRUE(GetValueByPointer(v, "/foo/2", &unresolvedTokenIndex) == 0); // Out of boundary + EXPECT_EQ(1u, unresolvedTokenIndex); + EXPECT_TRUE(GetValueByPointer(v, "/foo/a", &unresolvedTokenIndex) == 0); // "/foo" is an array, cannot query by "a" + EXPECT_EQ(1u, unresolvedTokenIndex); + EXPECT_TRUE(GetValueByPointer(v, "/foo/0/0", &unresolvedTokenIndex) == 0); // "/foo/0" is an string, cannot further query + EXPECT_EQ(2u, unresolvedTokenIndex); + EXPECT_TRUE(GetValueByPointer(v, "/foo/0/a", &unresolvedTokenIndex) == 0); // "/foo/0" is an string, cannot further query + EXPECT_EQ(2u, unresolvedTokenIndex); + +} + +TEST(Pointer, GetValueByPointerWithDefault_Pointer) { + Document d; + d.Parse(kJson); + + Document::AllocatorType& a = d.GetAllocator(); + const Value v("qux"); + EXPECT_TRUE(Value("bar") == GetValueByPointerWithDefault(d, Pointer("/foo/0"), v, a)); + EXPECT_TRUE(Value("bar") == GetValueByPointerWithDefault(d, Pointer("/foo/0"), v, a)); + EXPECT_TRUE(Value("baz") == GetValueByPointerWithDefault(d, Pointer("/foo/1"), v, a)); + EXPECT_TRUE(Value("qux") == GetValueByPointerWithDefault(d, Pointer("/foo/2"), v, a)); + EXPECT_TRUE(Value("last") == GetValueByPointerWithDefault(d, Pointer("/foo/-"), Value("last").Move(), a)); + EXPECT_STREQ("last", d["foo"][3].GetString()); + + EXPECT_TRUE(GetValueByPointerWithDefault(d, Pointer("/foo/null"), Value().Move(), a).IsNull()); + EXPECT_TRUE(GetValueByPointerWithDefault(d, Pointer("/foo/null"), "x", a).IsNull()); + + // Generic version + EXPECT_EQ(-1, GetValueByPointerWithDefault(d, Pointer("/foo/int"), -1, a).GetInt()); + EXPECT_EQ(-1, GetValueByPointerWithDefault(d, Pointer("/foo/int"), -2, a).GetInt()); + EXPECT_EQ(0x87654321, GetValueByPointerWithDefault(d, Pointer("/foo/uint"), 0x87654321, a).GetUint()); + EXPECT_EQ(0x87654321, GetValueByPointerWithDefault(d, Pointer("/foo/uint"), 0x12345678, a).GetUint()); + + const int64_t i64 = static_cast(RAPIDJSON_UINT64_C2(0x80000000, 0)); + EXPECT_EQ(i64, GetValueByPointerWithDefault(d, Pointer("/foo/int64"), i64, a).GetInt64()); + EXPECT_EQ(i64, GetValueByPointerWithDefault(d, Pointer("/foo/int64"), i64 + 1, a).GetInt64()); + + const uint64_t u64 = RAPIDJSON_UINT64_C2(0xFFFFFFFFF, 0xFFFFFFFFF); + EXPECT_EQ(u64, GetValueByPointerWithDefault(d, Pointer("/foo/uint64"), u64, a).GetUint64()); + EXPECT_EQ(u64, GetValueByPointerWithDefault(d, Pointer("/foo/uint64"), u64 - 1, a).GetUint64()); + + EXPECT_TRUE(GetValueByPointerWithDefault(d, Pointer("/foo/true"), true, a).IsTrue()); + EXPECT_TRUE(GetValueByPointerWithDefault(d, Pointer("/foo/true"), false, a).IsTrue()); + + EXPECT_TRUE(GetValueByPointerWithDefault(d, Pointer("/foo/false"), false, a).IsFalse()); + EXPECT_TRUE(GetValueByPointerWithDefault(d, Pointer("/foo/false"), true, a).IsFalse()); + + // StringRef version + EXPECT_STREQ("Hello", GetValueByPointerWithDefault(d, Pointer("/foo/hello"), "Hello", a).GetString()); + + // Copy string version + { + char buffer[256]; + strcpy(buffer, "World"); + EXPECT_STREQ("World", GetValueByPointerWithDefault(d, Pointer("/foo/world"), buffer, a).GetString()); + memset(buffer, 0, sizeof(buffer)); + } + EXPECT_STREQ("World", GetValueByPointer(d, Pointer("/foo/world"))->GetString()); + +#if RAPIDJSON_HAS_STDSTRING + EXPECT_STREQ("C++", GetValueByPointerWithDefault(d, Pointer("/foo/C++"), std::string("C++"), a).GetString()); +#endif +} + +TEST(Pointer, GetValueByPointerWithDefault_String) { + Document d; + d.Parse(kJson); + + Document::AllocatorType& a = d.GetAllocator(); + const Value v("qux"); + EXPECT_TRUE(Value("bar") == GetValueByPointerWithDefault(d, "/foo/0", v, a)); + EXPECT_TRUE(Value("bar") == GetValueByPointerWithDefault(d, "/foo/0", v, a)); + EXPECT_TRUE(Value("baz") == GetValueByPointerWithDefault(d, "/foo/1", v, a)); + EXPECT_TRUE(Value("qux") == GetValueByPointerWithDefault(d, "/foo/2", v, a)); + EXPECT_TRUE(Value("last") == GetValueByPointerWithDefault(d, "/foo/-", Value("last").Move(), a)); + EXPECT_STREQ("last", d["foo"][3].GetString()); + + EXPECT_TRUE(GetValueByPointerWithDefault(d, "/foo/null", Value().Move(), a).IsNull()); + EXPECT_TRUE(GetValueByPointerWithDefault(d, "/foo/null", "x", a).IsNull()); + + // Generic version + EXPECT_EQ(-1, GetValueByPointerWithDefault(d, "/foo/int", -1, a).GetInt()); + EXPECT_EQ(-1, GetValueByPointerWithDefault(d, "/foo/int", -2, a).GetInt()); + EXPECT_EQ(0x87654321, GetValueByPointerWithDefault(d, "/foo/uint", 0x87654321, a).GetUint()); + EXPECT_EQ(0x87654321, GetValueByPointerWithDefault(d, "/foo/uint", 0x12345678, a).GetUint()); + + const int64_t i64 = static_cast(RAPIDJSON_UINT64_C2(0x80000000, 0)); + EXPECT_EQ(i64, GetValueByPointerWithDefault(d, "/foo/int64", i64, a).GetInt64()); + EXPECT_EQ(i64, GetValueByPointerWithDefault(d, "/foo/int64", i64 + 1, a).GetInt64()); + + const uint64_t u64 = RAPIDJSON_UINT64_C2(0xFFFFFFFFF, 0xFFFFFFFFF); + EXPECT_EQ(u64, GetValueByPointerWithDefault(d, "/foo/uint64", u64, a).GetUint64()); + EXPECT_EQ(u64, GetValueByPointerWithDefault(d, "/foo/uint64", u64 - 1, a).GetUint64()); + + EXPECT_TRUE(GetValueByPointerWithDefault(d, "/foo/true", true, a).IsTrue()); + EXPECT_TRUE(GetValueByPointerWithDefault(d, "/foo/true", false, a).IsTrue()); + + EXPECT_TRUE(GetValueByPointerWithDefault(d, "/foo/false", false, a).IsFalse()); + EXPECT_TRUE(GetValueByPointerWithDefault(d, "/foo/false", true, a).IsFalse()); + + // StringRef version + EXPECT_STREQ("Hello", GetValueByPointerWithDefault(d, "/foo/hello", "Hello", a).GetString()); + + // Copy string version + { + char buffer[256]; + strcpy(buffer, "World"); + EXPECT_STREQ("World", GetValueByPointerWithDefault(d, "/foo/world", buffer, a).GetString()); + memset(buffer, 0, sizeof(buffer)); + } + EXPECT_STREQ("World", GetValueByPointer(d, "/foo/world")->GetString()); + +#if RAPIDJSON_HAS_STDSTRING + EXPECT_STREQ("C++", GetValueByPointerWithDefault(d, "/foo/C++", std::string("C++"), a).GetString()); +#endif +} + +TEST(Pointer, GetValueByPointerWithDefault_Pointer_NoAllocator) { + Document d; + d.Parse(kJson); + + const Value v("qux"); + EXPECT_TRUE(Value("bar") == GetValueByPointerWithDefault(d, Pointer("/foo/0"), v)); + EXPECT_TRUE(Value("bar") == GetValueByPointerWithDefault(d, Pointer("/foo/0"), v)); + EXPECT_TRUE(Value("baz") == GetValueByPointerWithDefault(d, Pointer("/foo/1"), v)); + EXPECT_TRUE(Value("qux") == GetValueByPointerWithDefault(d, Pointer("/foo/2"), v)); + EXPECT_TRUE(Value("last") == GetValueByPointerWithDefault(d, Pointer("/foo/-"), Value("last").Move())); + EXPECT_STREQ("last", d["foo"][3].GetString()); + + EXPECT_TRUE(GetValueByPointerWithDefault(d, Pointer("/foo/null"), Value().Move()).IsNull()); + EXPECT_TRUE(GetValueByPointerWithDefault(d, Pointer("/foo/null"), "x").IsNull()); + + // Generic version + EXPECT_EQ(-1, GetValueByPointerWithDefault(d, Pointer("/foo/int"), -1).GetInt()); + EXPECT_EQ(-1, GetValueByPointerWithDefault(d, Pointer("/foo/int"), -2).GetInt()); + EXPECT_EQ(0x87654321, GetValueByPointerWithDefault(d, Pointer("/foo/uint"), 0x87654321).GetUint()); + EXPECT_EQ(0x87654321, GetValueByPointerWithDefault(d, Pointer("/foo/uint"), 0x12345678).GetUint()); + + const int64_t i64 = static_cast(RAPIDJSON_UINT64_C2(0x80000000, 0)); + EXPECT_EQ(i64, GetValueByPointerWithDefault(d, Pointer("/foo/int64"), i64).GetInt64()); + EXPECT_EQ(i64, GetValueByPointerWithDefault(d, Pointer("/foo/int64"), i64 + 1).GetInt64()); + + const uint64_t u64 = RAPIDJSON_UINT64_C2(0xFFFFFFFFF, 0xFFFFFFFFF); + EXPECT_EQ(u64, GetValueByPointerWithDefault(d, Pointer("/foo/uint64"), u64).GetUint64()); + EXPECT_EQ(u64, GetValueByPointerWithDefault(d, Pointer("/foo/uint64"), u64 - 1).GetUint64()); + + EXPECT_TRUE(GetValueByPointerWithDefault(d, Pointer("/foo/true"), true).IsTrue()); + EXPECT_TRUE(GetValueByPointerWithDefault(d, Pointer("/foo/true"), false).IsTrue()); + + EXPECT_TRUE(GetValueByPointerWithDefault(d, Pointer("/foo/false"), false).IsFalse()); + EXPECT_TRUE(GetValueByPointerWithDefault(d, Pointer("/foo/false"), true).IsFalse()); + + // StringRef version + EXPECT_STREQ("Hello", GetValueByPointerWithDefault(d, Pointer("/foo/hello"), "Hello").GetString()); + + // Copy string version + { + char buffer[256]; + strcpy(buffer, "World"); + EXPECT_STREQ("World", GetValueByPointerWithDefault(d, Pointer("/foo/world"), buffer).GetString()); + memset(buffer, 0, sizeof(buffer)); + } + EXPECT_STREQ("World", GetValueByPointer(d, Pointer("/foo/world"))->GetString()); + +#if RAPIDJSON_HAS_STDSTRING + EXPECT_STREQ("C++", GetValueByPointerWithDefault(d, Pointer("/foo/C++"), std::string("C++")).GetString()); +#endif +} + +TEST(Pointer, GetValueByPointerWithDefault_String_NoAllocator) { + Document d; + d.Parse(kJson); + + const Value v("qux"); + EXPECT_TRUE(Value("bar") == GetValueByPointerWithDefault(d, "/foo/0", v)); + EXPECT_TRUE(Value("bar") == GetValueByPointerWithDefault(d, "/foo/0", v)); + EXPECT_TRUE(Value("baz") == GetValueByPointerWithDefault(d, "/foo/1", v)); + EXPECT_TRUE(Value("qux") == GetValueByPointerWithDefault(d, "/foo/2", v)); + EXPECT_TRUE(Value("last") == GetValueByPointerWithDefault(d, "/foo/-", Value("last").Move())); + EXPECT_STREQ("last", d["foo"][3].GetString()); + + EXPECT_TRUE(GetValueByPointerWithDefault(d, "/foo/null", Value().Move()).IsNull()); + EXPECT_TRUE(GetValueByPointerWithDefault(d, "/foo/null", "x").IsNull()); + + // Generic version + EXPECT_EQ(-1, GetValueByPointerWithDefault(d, "/foo/int", -1).GetInt()); + EXPECT_EQ(-1, GetValueByPointerWithDefault(d, "/foo/int", -2).GetInt()); + EXPECT_EQ(0x87654321, GetValueByPointerWithDefault(d, "/foo/uint", 0x87654321).GetUint()); + EXPECT_EQ(0x87654321, GetValueByPointerWithDefault(d, "/foo/uint", 0x12345678).GetUint()); + + const int64_t i64 = static_cast(RAPIDJSON_UINT64_C2(0x80000000, 0)); + EXPECT_EQ(i64, GetValueByPointerWithDefault(d, "/foo/int64", i64).GetInt64()); + EXPECT_EQ(i64, GetValueByPointerWithDefault(d, "/foo/int64", i64 + 1).GetInt64()); + + const uint64_t u64 = RAPIDJSON_UINT64_C2(0xFFFFFFFFF, 0xFFFFFFFFF); + EXPECT_EQ(u64, GetValueByPointerWithDefault(d, "/foo/uint64", u64).GetUint64()); + EXPECT_EQ(u64, GetValueByPointerWithDefault(d, "/foo/uint64", u64 - 1).GetUint64()); + + EXPECT_TRUE(GetValueByPointerWithDefault(d, "/foo/true", true).IsTrue()); + EXPECT_TRUE(GetValueByPointerWithDefault(d, "/foo/true", false).IsTrue()); + + EXPECT_TRUE(GetValueByPointerWithDefault(d, "/foo/false", false).IsFalse()); + EXPECT_TRUE(GetValueByPointerWithDefault(d, "/foo/false", true).IsFalse()); + + // StringRef version + EXPECT_STREQ("Hello", GetValueByPointerWithDefault(d, "/foo/hello", "Hello").GetString()); + + // Copy string version + { + char buffer[256]; + strcpy(buffer, "World"); + EXPECT_STREQ("World", GetValueByPointerWithDefault(d, "/foo/world", buffer).GetString()); + memset(buffer, 0, sizeof(buffer)); + } + EXPECT_STREQ("World", GetValueByPointer(d, "/foo/world")->GetString()); + +#if RAPIDJSON_HAS_STDSTRING + EXPECT_STREQ("C++", GetValueByPointerWithDefault(d, Pointer("/foo/C++"), std::string("C++")).GetString()); +#endif +} + +TEST(Pointer, SetValueByPointer_Pointer) { + Document d; + d.Parse(kJson); + Document::AllocatorType& a = d.GetAllocator(); + + // Value version + SetValueByPointer(d, Pointer("/foo/0"), Value(123).Move(), a); + EXPECT_EQ(123, d["foo"][0].GetInt()); + + SetValueByPointer(d, Pointer("/foo/null"), Value().Move(), a); + EXPECT_TRUE(GetValueByPointer(d, "/foo/null")->IsNull()); + + // Const Value version + const Value foo(d["foo"], d.GetAllocator()); + SetValueByPointer(d, Pointer("/clone"), foo, a); + EXPECT_EQ(foo, *GetValueByPointer(d, "/clone")); + + // Generic version + SetValueByPointer(d, Pointer("/foo/int"), -1, a); + EXPECT_EQ(-1, GetValueByPointer(d, "/foo/int")->GetInt()); + + SetValueByPointer(d, Pointer("/foo/uint"), 0x87654321, a); + EXPECT_EQ(0x87654321, GetValueByPointer(d, "/foo/uint")->GetUint()); + + const int64_t i64 = static_cast(RAPIDJSON_UINT64_C2(0x80000000, 0)); + SetValueByPointer(d, Pointer("/foo/int64"), i64, a); + EXPECT_EQ(i64, GetValueByPointer(d, "/foo/int64")->GetInt64()); + + const uint64_t u64 = RAPIDJSON_UINT64_C2(0xFFFFFFFFF, 0xFFFFFFFFF); + SetValueByPointer(d, Pointer("/foo/uint64"), u64, a); + EXPECT_EQ(u64, GetValueByPointer(d, "/foo/uint64")->GetUint64()); + + SetValueByPointer(d, Pointer("/foo/true"), true, a); + EXPECT_TRUE(GetValueByPointer(d, "/foo/true")->IsTrue()); + + SetValueByPointer(d, Pointer("/foo/false"), false, a); + EXPECT_TRUE(GetValueByPointer(d, "/foo/false")->IsFalse()); + + // StringRef version + SetValueByPointer(d, Pointer("/foo/hello"), "Hello", a); + EXPECT_STREQ("Hello", GetValueByPointer(d, "/foo/hello")->GetString()); + + // Copy string version + { + char buffer[256]; + strcpy(buffer, "World"); + SetValueByPointer(d, Pointer("/foo/world"), buffer, a); + memset(buffer, 0, sizeof(buffer)); + } + EXPECT_STREQ("World", GetValueByPointer(d, "/foo/world")->GetString()); + +#if RAPIDJSON_HAS_STDSTRING + SetValueByPointer(d, Pointer("/foo/c++"), std::string("C++"), a); + EXPECT_STREQ("C++", GetValueByPointer(d, "/foo/c++")->GetString()); +#endif +} + +TEST(Pointer, SetValueByPointer_String) { + Document d; + d.Parse(kJson); + Document::AllocatorType& a = d.GetAllocator(); + + // Value version + SetValueByPointer(d, "/foo/0", Value(123).Move(), a); + EXPECT_EQ(123, d["foo"][0].GetInt()); + + SetValueByPointer(d, "/foo/null", Value().Move(), a); + EXPECT_TRUE(GetValueByPointer(d, "/foo/null")->IsNull()); + + // Const Value version + const Value foo(d["foo"], d.GetAllocator()); + SetValueByPointer(d, "/clone", foo, a); + EXPECT_EQ(foo, *GetValueByPointer(d, "/clone")); + + // Generic version + SetValueByPointer(d, "/foo/int", -1, a); + EXPECT_EQ(-1, GetValueByPointer(d, "/foo/int")->GetInt()); + + SetValueByPointer(d, "/foo/uint", 0x87654321, a); + EXPECT_EQ(0x87654321, GetValueByPointer(d, "/foo/uint")->GetUint()); + + const int64_t i64 = static_cast(RAPIDJSON_UINT64_C2(0x80000000, 0)); + SetValueByPointer(d, "/foo/int64", i64, a); + EXPECT_EQ(i64, GetValueByPointer(d, "/foo/int64")->GetInt64()); + + const uint64_t u64 = RAPIDJSON_UINT64_C2(0xFFFFFFFFF, 0xFFFFFFFFF); + SetValueByPointer(d, "/foo/uint64", u64, a); + EXPECT_EQ(u64, GetValueByPointer(d, "/foo/uint64")->GetUint64()); + + SetValueByPointer(d, "/foo/true", true, a); + EXPECT_TRUE(GetValueByPointer(d, "/foo/true")->IsTrue()); + + SetValueByPointer(d, "/foo/false", false, a); + EXPECT_TRUE(GetValueByPointer(d, "/foo/false")->IsFalse()); + + // StringRef version + SetValueByPointer(d, "/foo/hello", "Hello", a); + EXPECT_STREQ("Hello", GetValueByPointer(d, "/foo/hello")->GetString()); + + // Copy string version + { + char buffer[256]; + strcpy(buffer, "World"); + SetValueByPointer(d, "/foo/world", buffer, a); + memset(buffer, 0, sizeof(buffer)); + } + EXPECT_STREQ("World", GetValueByPointer(d, "/foo/world")->GetString()); + +#if RAPIDJSON_HAS_STDSTRING + SetValueByPointer(d, "/foo/c++", std::string("C++"), a); + EXPECT_STREQ("C++", GetValueByPointer(d, "/foo/c++")->GetString()); +#endif +} + +TEST(Pointer, SetValueByPointer_Pointer_NoAllocator) { + Document d; + d.Parse(kJson); + + // Value version + SetValueByPointer(d, Pointer("/foo/0"), Value(123).Move()); + EXPECT_EQ(123, d["foo"][0].GetInt()); + + SetValueByPointer(d, Pointer("/foo/null"), Value().Move()); + EXPECT_TRUE(GetValueByPointer(d, "/foo/null")->IsNull()); + + // Const Value version + const Value foo(d["foo"], d.GetAllocator()); + SetValueByPointer(d, Pointer("/clone"), foo); + EXPECT_EQ(foo, *GetValueByPointer(d, "/clone")); + + // Generic version + SetValueByPointer(d, Pointer("/foo/int"), -1); + EXPECT_EQ(-1, GetValueByPointer(d, "/foo/int")->GetInt()); + + SetValueByPointer(d, Pointer("/foo/uint"), 0x87654321); + EXPECT_EQ(0x87654321, GetValueByPointer(d, "/foo/uint")->GetUint()); + + const int64_t i64 = static_cast(RAPIDJSON_UINT64_C2(0x80000000, 0)); + SetValueByPointer(d, Pointer("/foo/int64"), i64); + EXPECT_EQ(i64, GetValueByPointer(d, "/foo/int64")->GetInt64()); + + const uint64_t u64 = RAPIDJSON_UINT64_C2(0xFFFFFFFFF, 0xFFFFFFFFF); + SetValueByPointer(d, Pointer("/foo/uint64"), u64); + EXPECT_EQ(u64, GetValueByPointer(d, "/foo/uint64")->GetUint64()); + + SetValueByPointer(d, Pointer("/foo/true"), true); + EXPECT_TRUE(GetValueByPointer(d, "/foo/true")->IsTrue()); + + SetValueByPointer(d, Pointer("/foo/false"), false); + EXPECT_TRUE(GetValueByPointer(d, "/foo/false")->IsFalse()); + + // StringRef version + SetValueByPointer(d, Pointer("/foo/hello"), "Hello"); + EXPECT_STREQ("Hello", GetValueByPointer(d, "/foo/hello")->GetString()); + + // Copy string version + { + char buffer[256]; + strcpy(buffer, "World"); + SetValueByPointer(d, Pointer("/foo/world"), buffer); + memset(buffer, 0, sizeof(buffer)); + } + EXPECT_STREQ("World", GetValueByPointer(d, "/foo/world")->GetString()); + +#if RAPIDJSON_HAS_STDSTRING + SetValueByPointer(d, Pointer("/foo/c++"), std::string("C++")); + EXPECT_STREQ("C++", GetValueByPointer(d, "/foo/c++")->GetString()); +#endif +} + +TEST(Pointer, SetValueByPointer_String_NoAllocator) { + Document d; + d.Parse(kJson); + + // Value version + SetValueByPointer(d, "/foo/0", Value(123).Move()); + EXPECT_EQ(123, d["foo"][0].GetInt()); + + SetValueByPointer(d, "/foo/null", Value().Move()); + EXPECT_TRUE(GetValueByPointer(d, "/foo/null")->IsNull()); + + // Const Value version + const Value foo(d["foo"], d.GetAllocator()); + SetValueByPointer(d, "/clone", foo); + EXPECT_EQ(foo, *GetValueByPointer(d, "/clone")); + + // Generic version + SetValueByPointer(d, "/foo/int", -1); + EXPECT_EQ(-1, GetValueByPointer(d, "/foo/int")->GetInt()); + + SetValueByPointer(d, "/foo/uint", 0x87654321); + EXPECT_EQ(0x87654321, GetValueByPointer(d, "/foo/uint")->GetUint()); + + const int64_t i64 = static_cast(RAPIDJSON_UINT64_C2(0x80000000, 0)); + SetValueByPointer(d, "/foo/int64", i64); + EXPECT_EQ(i64, GetValueByPointer(d, "/foo/int64")->GetInt64()); + + const uint64_t u64 = RAPIDJSON_UINT64_C2(0xFFFFFFFFF, 0xFFFFFFFFF); + SetValueByPointer(d, "/foo/uint64", u64); + EXPECT_EQ(u64, GetValueByPointer(d, "/foo/uint64")->GetUint64()); + + SetValueByPointer(d, "/foo/true", true); + EXPECT_TRUE(GetValueByPointer(d, "/foo/true")->IsTrue()); + + SetValueByPointer(d, "/foo/false", false); + EXPECT_TRUE(GetValueByPointer(d, "/foo/false")->IsFalse()); + + // StringRef version + SetValueByPointer(d, "/foo/hello", "Hello"); + EXPECT_STREQ("Hello", GetValueByPointer(d, "/foo/hello")->GetString()); + + // Copy string version + { + char buffer[256]; + strcpy(buffer, "World"); + SetValueByPointer(d, "/foo/world", buffer); + memset(buffer, 0, sizeof(buffer)); + } + EXPECT_STREQ("World", GetValueByPointer(d, "/foo/world")->GetString()); + +#if RAPIDJSON_HAS_STDSTRING + SetValueByPointer(d, "/foo/c++", std::string("C++")); + EXPECT_STREQ("C++", GetValueByPointer(d, "/foo/c++")->GetString()); +#endif +} + +TEST(Pointer, SwapValueByPointer) { + Document d; + d.Parse(kJson); + Document::AllocatorType& a = d.GetAllocator(); + SwapValueByPointer(d, Pointer("/foo/0"), *GetValueByPointer(d, "/foo/1"), a); + EXPECT_STREQ("baz", d["foo"][0].GetString()); + EXPECT_STREQ("bar", d["foo"][1].GetString()); + + SwapValueByPointer(d, "/foo/0", *GetValueByPointer(d, "/foo/1"), a); + EXPECT_STREQ("bar", d["foo"][0].GetString()); + EXPECT_STREQ("baz", d["foo"][1].GetString()); +} + +TEST(Pointer, SwapValueByPointer_NoAllocator) { + Document d; + d.Parse(kJson); + SwapValueByPointer(d, Pointer("/foo/0"), *GetValueByPointer(d, "/foo/1")); + EXPECT_STREQ("baz", d["foo"][0].GetString()); + EXPECT_STREQ("bar", d["foo"][1].GetString()); + + SwapValueByPointer(d, "/foo/0", *GetValueByPointer(d, "/foo/1")); + EXPECT_STREQ("bar", d["foo"][0].GetString()); + EXPECT_STREQ("baz", d["foo"][1].GetString()); +} + +TEST(Pointer, EraseValueByPointer_Pointer) { + Document d; + d.Parse(kJson); + + EXPECT_FALSE(EraseValueByPointer(d, Pointer(""))); + EXPECT_FALSE(Pointer("/foo/nonexist").Erase(d)); + EXPECT_TRUE(EraseValueByPointer(d, Pointer("/foo/0"))); + EXPECT_EQ(1u, d["foo"].Size()); + EXPECT_STREQ("baz", d["foo"][0].GetString()); + EXPECT_TRUE(EraseValueByPointer(d, Pointer("/foo/0"))); + EXPECT_TRUE(d["foo"].Empty()); + EXPECT_TRUE(EraseValueByPointer(d, Pointer("/foo"))); + EXPECT_TRUE(Pointer("/foo").Get(d) == 0); +} + +TEST(Pointer, EraseValueByPointer_String) { + Document d; + d.Parse(kJson); + + EXPECT_FALSE(EraseValueByPointer(d, "")); + EXPECT_FALSE(Pointer("/foo/nonexist").Erase(d)); + EXPECT_TRUE(EraseValueByPointer(d, "/foo/0")); + EXPECT_EQ(1u, d["foo"].Size()); + EXPECT_STREQ("baz", d["foo"][0].GetString()); + EXPECT_TRUE(EraseValueByPointer(d, "/foo/0")); + EXPECT_TRUE(d["foo"].Empty()); + EXPECT_TRUE(EraseValueByPointer(d, "/foo")); + EXPECT_TRUE(Pointer("/foo").Get(d) == 0); +} + +TEST(Pointer, Ambiguity) { + { + Document d; + d.Parse("{\"0\" : [123]}"); + EXPECT_EQ(123, Pointer("/0/0").Get(d)->GetInt()); + Pointer("/0/a").Set(d, 456); // Change array [123] to object {456} + EXPECT_EQ(456, Pointer("/0/a").Get(d)->GetInt()); + } + + { + Document d; + EXPECT_FALSE(d.Parse("[{\"0\": 123}]").HasParseError()); + EXPECT_EQ(123, Pointer("/0/0").Get(d)->GetInt()); + Pointer("/0/1").Set(d, 456); // 1 is treated as "1" to index object + EXPECT_EQ(123, Pointer("/0/0").Get(d)->GetInt()); + EXPECT_EQ(456, Pointer("/0/1").Get(d)->GetInt()); + } +} + +TEST(Pointer, ResolveOnObject) { + Document d; + EXPECT_FALSE(d.Parse("{\"a\": 123}").HasParseError()); + + { + Value::ConstObject o = static_cast(d).GetObject(); + EXPECT_EQ(123, Pointer("/a").Get(o)->GetInt()); + } + + { + Value::Object o = d.GetObject(); + Pointer("/a").Set(o, 456, d.GetAllocator()); + EXPECT_EQ(456, Pointer("/a").Get(o)->GetInt()); + } +} + +TEST(Pointer, ResolveOnArray) { + Document d; + EXPECT_FALSE(d.Parse("[1, 2, 3]").HasParseError()); + + { + Value::ConstArray a = static_cast(d).GetArray(); + EXPECT_EQ(2, Pointer("/1").Get(a)->GetInt()); + } + + { + Value::Array a = d.GetArray(); + Pointer("/1").Set(a, 123, d.GetAllocator()); + EXPECT_EQ(123, Pointer("/1").Get(a)->GetInt()); + } +} + +TEST(Pointer, LessThan) { + static const struct { + const char *str; + bool valid; + } pointers[] = { + { "/a/b", true }, + { "/a", true }, + { "/d/1", true }, + { "/d/2/z", true }, + { "/d/2/3", true }, + { "/d/2", true }, + { "/a/c", true }, + { "/e/f~g", false }, + { "/d/2/zz", true }, + { "/d/1", true }, + { "/d/2/z", true }, + { "/e/f~~g", false }, + { "/e/f~0g", true }, + { "/e/f~1g", true }, + { "/e/f.g", true }, + { "", true } + }; + static const char *ordered_pointers[] = { + "", + "/a", + "/a/b", + "/a/c", + "/d/1", + "/d/1", + "/d/2", + "/e/f.g", + "/e/f~1g", + "/e/f~0g", + "/d/2/3", + "/d/2/z", + "/d/2/z", + "/d/2/zz", + NULL, // was invalid "/e/f~g" + NULL // was invalid "/e/f~~g" + }; + typedef MemoryPoolAllocator<> AllocatorType; + typedef GenericPointer PointerType; + typedef std::multimap PointerMap; + PointerMap map; + PointerMap::iterator it; + AllocatorType allocator; + size_t i; + + EXPECT_EQ(sizeof(pointers) / sizeof(pointers[0]), + sizeof(ordered_pointers) / sizeof(ordered_pointers[0])); + + for (i = 0; i < sizeof(pointers) / sizeof(pointers[0]); ++i) { + it = map.insert(PointerMap::value_type(PointerType(pointers[i].str, &allocator), i)); + if (!it->first.IsValid()) { + EXPECT_EQ(++it, map.end()); + } + } + + for (i = 0, it = map.begin(); it != map.end(); ++it, ++i) { + EXPECT_TRUE(it->second < sizeof(pointers) / sizeof(pointers[0])); + EXPECT_EQ(it->first.IsValid(), pointers[it->second].valid); + EXPECT_TRUE(i < sizeof(ordered_pointers) / sizeof(ordered_pointers[0])); + EXPECT_EQ(it->first.IsValid(), !!ordered_pointers[i]); + if (it->first.IsValid()) { + std::stringstream ss; + OStreamWrapper os(ss); + EXPECT_TRUE(it->first.Stringify(os)); + EXPECT_EQ(ss.str(), pointers[it->second].str); + EXPECT_EQ(ss.str(), ordered_pointers[i]); + } + } +} + +// https://github.com/Tencent/rapidjson/issues/483 +namespace myjson { + +class MyAllocator +{ +public: + static const bool kNeedFree = true; + void * Malloc(size_t _size) { return malloc(_size); } + void * Realloc(void *_org_p, size_t _org_size, size_t _new_size) { (void)_org_size; return realloc(_org_p, _new_size); } + static void Free(void *_p) { return free(_p); } +}; + +typedef rapidjson::GenericDocument< + rapidjson::UTF8<>, + rapidjson::MemoryPoolAllocator< MyAllocator >, + MyAllocator + > Document; + +typedef rapidjson::GenericPointer< + ::myjson::Document::ValueType, + MyAllocator + > Pointer; + +typedef ::myjson::Document::ValueType Value; + +} + +TEST(Pointer, Issue483) { + std::string mystr, path; + myjson::Document document; + myjson::Value value(rapidjson::kStringType); + value.SetString(mystr.c_str(), static_cast(mystr.length()), document.GetAllocator()); + myjson::Pointer(path.c_str()).Set(document, value, document.GetAllocator()); +} + +TEST(Pointer, Issue1899) { + typedef GenericPointer > PointerType; + PointerType p; + PointerType q = p.Append("foo"); + EXPECT_TRUE(PointerType("/foo") == q); + q = q.Append(1234); + EXPECT_TRUE(PointerType("/foo/1234") == q); + q = q.Append(""); + EXPECT_TRUE(PointerType("/foo/1234/") == q); +} \ No newline at end of file diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/prettywritertest.cpp b/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/prettywritertest.cpp new file mode 100644 index 0000000000..0b7feef3b2 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/prettywritertest.cpp @@ -0,0 +1,373 @@ +// Tencent is pleased to support the open source community by making RapidJSON available. +// +// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. +// +// Licensed under the MIT License (the "License"); you may not use this file except +// in compliance with the License. You may obtain a copy of the License at +// +// http://opensource.org/licenses/MIT +// +// Unless required by applicable law or agreed to in writing, software distributed +// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +// CONDITIONS OF ANY KIND, either express or implied. See the License for the +// specific language governing permissions and limitations under the License. + +#include "unittest.h" +#include "rapidjson/reader.h" +#include "rapidjson/prettywriter.h" +#include "rapidjson/stringbuffer.h" +#include "rapidjson/filewritestream.h" + +#ifdef __clang__ +RAPIDJSON_DIAG_PUSH +RAPIDJSON_DIAG_OFF(c++98-compat) +#endif + +using namespace rapidjson; + +static const char kJson[] = "{\"hello\":\"world\",\"t\":true,\"f\":false,\"n\":null,\"i\":123,\"pi\":3.1416,\"a\":[1,2,3,-1],\"u64\":1234567890123456789,\"i64\":-1234567890123456789}"; +static const char kPrettyJson[] = +"{\n" +" \"hello\": \"world\",\n" +" \"t\": true,\n" +" \"f\": false,\n" +" \"n\": null,\n" +" \"i\": 123,\n" +" \"pi\": 3.1416,\n" +" \"a\": [\n" +" 1,\n" +" 2,\n" +" 3,\n" +" -1\n" +" ],\n" +" \"u64\": 1234567890123456789,\n" +" \"i64\": -1234567890123456789\n" +"}"; + +static const char kPrettyJson_FormatOptions_SLA[] = +"{\n" +" \"hello\": \"world\",\n" +" \"t\": true,\n" +" \"f\": false,\n" +" \"n\": null,\n" +" \"i\": 123,\n" +" \"pi\": 3.1416,\n" +" \"a\": [1, 2, 3, -1],\n" +" \"u64\": 1234567890123456789,\n" +" \"i64\": -1234567890123456789\n" +"}"; + +TEST(PrettyWriter, Basic) { + StringBuffer buffer; + PrettyWriter writer(buffer); + Reader reader; + StringStream s(kJson); + reader.Parse(s, writer); + EXPECT_STREQ(kPrettyJson, buffer.GetString()); +} + +TEST(PrettyWriter, FormatOptions) { + StringBuffer buffer; + PrettyWriter writer(buffer); + writer.SetFormatOptions(kFormatSingleLineArray); + Reader reader; + StringStream s(kJson); + reader.Parse(s, writer); + EXPECT_STREQ(kPrettyJson_FormatOptions_SLA, buffer.GetString()); +} + +TEST(PrettyWriter, SetIndent) { + StringBuffer buffer; + PrettyWriter writer(buffer); + writer.SetIndent('\t', 1); + Reader reader; + StringStream s(kJson); + reader.Parse(s, writer); + EXPECT_STREQ( + "{\n" + "\t\"hello\": \"world\",\n" + "\t\"t\": true,\n" + "\t\"f\": false,\n" + "\t\"n\": null,\n" + "\t\"i\": 123,\n" + "\t\"pi\": 3.1416,\n" + "\t\"a\": [\n" + "\t\t1,\n" + "\t\t2,\n" + "\t\t3,\n" + "\t\t-1\n" + "\t],\n" + "\t\"u64\": 1234567890123456789,\n" + "\t\"i64\": -1234567890123456789\n" + "}", + buffer.GetString()); +} + +TEST(PrettyWriter, String) { + StringBuffer buffer; + PrettyWriter writer(buffer); + EXPECT_TRUE(writer.StartArray()); + EXPECT_TRUE(writer.String("Hello\n")); + EXPECT_TRUE(writer.EndArray()); + EXPECT_STREQ("[\n \"Hello\\n\"\n]", buffer.GetString()); +} + +#if RAPIDJSON_HAS_STDSTRING +TEST(PrettyWriter, String_STDSTRING) { + StringBuffer buffer; + PrettyWriter writer(buffer); + EXPECT_TRUE(writer.StartArray()); + EXPECT_TRUE(writer.String(std::string("Hello\n"))); + EXPECT_TRUE(writer.EndArray()); + EXPECT_STREQ("[\n \"Hello\\n\"\n]", buffer.GetString()); +} +#endif + +#include + +class OStreamWrapper { +public: + typedef char Ch; + + OStreamWrapper(std::ostream& os) : os_(os) {} + + Ch Peek() const { assert(false); return '\0'; } + Ch Take() { assert(false); return '\0'; } + size_t Tell() const { return 0; } + + Ch* PutBegin() { assert(false); return 0; } + void Put(Ch c) { os_.put(c); } + void Flush() { os_.flush(); } + size_t PutEnd(Ch*) { assert(false); return 0; } + +private: + OStreamWrapper(const OStreamWrapper&); + OStreamWrapper& operator=(const OStreamWrapper&); + + std::ostream& os_; +}; + +// For covering PutN() generic version +TEST(PrettyWriter, OStreamWrapper) { + StringStream s(kJson); + + std::stringstream ss; + OStreamWrapper os(ss); + + PrettyWriter writer(os); + + Reader reader; + reader.Parse(s, writer); + + std::string actual = ss.str(); + EXPECT_STREQ(kPrettyJson, actual.c_str()); +} + +// For covering FileWriteStream::PutN() +TEST(PrettyWriter, FileWriteStream) { + char filename[L_tmpnam]; + FILE* fp = TempFile(filename); + ASSERT_TRUE(fp!=NULL); + char buffer[16]; + FileWriteStream os(fp, buffer, sizeof(buffer)); + PrettyWriter writer(os); + Reader reader; + StringStream s(kJson); + reader.Parse(s, writer); + fclose(fp); + + fp = fopen(filename, "rb"); + fseek(fp, 0, SEEK_END); + size_t size = static_cast(ftell(fp)); + fseek(fp, 0, SEEK_SET); + char* json = static_cast(malloc(size + 1)); + size_t readLength = fread(json, 1, size, fp); + json[readLength] = '\0'; + fclose(fp); + remove(filename); + EXPECT_STREQ(kPrettyJson, json); + free(json); +} + +TEST(PrettyWriter, RawValue) { + StringBuffer buffer; + PrettyWriter writer(buffer); + writer.StartObject(); + writer.Key("a"); + writer.Int(1); + writer.Key("raw"); + const char json[] = "[\"Hello\\nWorld\", 123.456]"; + writer.RawValue(json, strlen(json), kArrayType); + writer.EndObject(); + EXPECT_TRUE(writer.IsComplete()); + EXPECT_STREQ( + "{\n" + " \"a\": 1,\n" + " \"raw\": [\"Hello\\nWorld\", 123.456]\n" // no indentation within raw value + "}", + buffer.GetString()); +} + +TEST(PrettyWriter, InvalidEventSequence) { + // {] + { + StringBuffer buffer; + PrettyWriter writer(buffer); + writer.StartObject(); + EXPECT_THROW(writer.EndArray(), AssertException); + EXPECT_FALSE(writer.IsComplete()); + } + + // [} + { + StringBuffer buffer; + PrettyWriter writer(buffer); + writer.StartArray(); + EXPECT_THROW(writer.EndObject(), AssertException); + EXPECT_FALSE(writer.IsComplete()); + } + + // { 1: + { + StringBuffer buffer; + PrettyWriter writer(buffer); + writer.StartObject(); + EXPECT_THROW(writer.Int(1), AssertException); + EXPECT_FALSE(writer.IsComplete()); + } + + // { 'a' } + { + StringBuffer buffer; + PrettyWriter writer(buffer); + writer.StartObject(); + writer.Key("a"); + EXPECT_THROW(writer.EndObject(), AssertException); + EXPECT_FALSE(writer.IsComplete()); + } + + // { 'a':'b','c' } + { + StringBuffer buffer; + PrettyWriter writer(buffer); + writer.StartObject(); + writer.Key("a"); + writer.String("b"); + writer.Key("c"); + EXPECT_THROW(writer.EndObject(), AssertException); + EXPECT_FALSE(writer.IsComplete()); + } +} + +TEST(PrettyWriter, NaN) { + double nan = std::numeric_limits::quiet_NaN(); + + EXPECT_TRUE(internal::Double(nan).IsNan()); + StringBuffer buffer; + { + PrettyWriter writer(buffer); + EXPECT_FALSE(writer.Double(nan)); + } + { + PrettyWriter, UTF8<>, CrtAllocator, kWriteNanAndInfFlag> writer(buffer); + EXPECT_TRUE(writer.Double(nan)); + EXPECT_STREQ("NaN", buffer.GetString()); + } + GenericStringBuffer > buffer2; + PrettyWriter > > writer2(buffer2); + EXPECT_FALSE(writer2.Double(nan)); +} + +TEST(PrettyWriter, Inf) { + double inf = std::numeric_limits::infinity(); + + EXPECT_TRUE(internal::Double(inf).IsInf()); + StringBuffer buffer; + { + PrettyWriter writer(buffer); + EXPECT_FALSE(writer.Double(inf)); + } + { + PrettyWriter writer(buffer); + EXPECT_FALSE(writer.Double(-inf)); + } + { + PrettyWriter, UTF8<>, CrtAllocator, kWriteNanAndInfFlag> writer(buffer); + EXPECT_TRUE(writer.Double(inf)); + } + { + PrettyWriter, UTF8<>, CrtAllocator, kWriteNanAndInfFlag> writer(buffer); + EXPECT_TRUE(writer.Double(-inf)); + } + EXPECT_STREQ("Infinity-Infinity", buffer.GetString()); +} + +TEST(PrettyWriter, Issue_889) { + char buf[100] = "Hello"; + + StringBuffer buffer; + PrettyWriter writer(buffer); + writer.StartArray(); + writer.String(buf); + writer.EndArray(); + + EXPECT_STREQ("[\n \"Hello\"\n]", buffer.GetString()); + EXPECT_TRUE(writer.IsComplete()); \ +} + + +#if RAPIDJSON_HAS_CXX11_RVALUE_REFS + +static PrettyWriter WriterGen(StringBuffer &target) { + PrettyWriter writer(target); + writer.StartObject(); + writer.Key("a"); + writer.Int(1); + return writer; +} + +TEST(PrettyWriter, MoveCtor) { + StringBuffer buffer; + PrettyWriter writer(WriterGen(buffer)); + writer.EndObject(); + EXPECT_TRUE(writer.IsComplete()); + EXPECT_STREQ( + "{\n" + " \"a\": 1\n" + "}", + buffer.GetString()); +} +#endif + +TEST(PrettyWriter, Issue_1336) { +#define T(meth, val, expected) \ + { \ + StringBuffer buffer; \ + PrettyWriter writer(buffer); \ + writer.meth(val); \ + \ + EXPECT_STREQ(expected, buffer.GetString()); \ + EXPECT_TRUE(writer.IsComplete()); \ + } + + T(Bool, false, "false"); + T(Bool, true, "true"); + T(Int, 0, "0"); + T(Uint, 0, "0"); + T(Int64, 0, "0"); + T(Uint64, 0, "0"); + T(Double, 0, "0.0"); + T(String, "Hello", "\"Hello\""); +#undef T + + StringBuffer buffer; + PrettyWriter writer(buffer); + writer.Null(); + + EXPECT_STREQ("null", buffer.GetString()); + EXPECT_TRUE(writer.IsComplete()); +} + +#ifdef __clang__ +RAPIDJSON_DIAG_POP +#endif diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/readertest.cpp b/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/readertest.cpp new file mode 100644 index 0000000000..f828dbbe25 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/readertest.cpp @@ -0,0 +1,2370 @@ +// Tencent is pleased to support the open source community by making RapidJSON available. +// +// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. +// +// Licensed under the MIT License (the "License"); you may not use this file except +// in compliance with the License. You may obtain a copy of the License at +// +// http://opensource.org/licenses/MIT +// +// Unless required by applicable law or agreed to in writing, software distributed +// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +// CONDITIONS OF ANY KIND, either express or implied. See the License for the +// specific language governing permissions and limitations under the License. + +#include "unittest.h" + +#include "rapidjson/reader.h" +#include "rapidjson/internal/dtoa.h" +#include "rapidjson/internal/itoa.h" +#include "rapidjson/memorystream.h" + +#include + +using namespace rapidjson; + +RAPIDJSON_DIAG_PUSH +#ifdef __GNUC__ +RAPIDJSON_DIAG_OFF(effc++) +RAPIDJSON_DIAG_OFF(float-equal) +RAPIDJSON_DIAG_OFF(missing-noreturn) +#if __GNUC__ >= 7 +RAPIDJSON_DIAG_OFF(dangling-else) +#endif +#endif // __GNUC__ + +#ifdef __clang__ +RAPIDJSON_DIAG_OFF(variadic-macros) +RAPIDJSON_DIAG_OFF(c++98-compat-pedantic) +#endif + +template +struct ParseBoolHandler : BaseReaderHandler, ParseBoolHandler > { + ParseBoolHandler() : step_(0) {} + bool Default() { ADD_FAILURE(); return false; } + // gcc 4.8.x generates warning in EXPECT_EQ(bool, bool) on this gtest version. + // Workaround with EXPECT_TRUE(). + bool Bool(bool b) { /*EXPECT_EQ(expect, b); */EXPECT_TRUE(expect == b); ++step_; return true; } + + unsigned step_; +}; + +TEST(Reader, ParseTrue) { + StringStream s("true"); + ParseBoolHandler h; + Reader reader; + reader.Parse(s, h); + EXPECT_EQ(1u, h.step_); +} + +TEST(Reader, ParseFalse) { + StringStream s("false"); + ParseBoolHandler h; + Reader reader; + reader.Parse(s, h); + EXPECT_EQ(1u, h.step_); +} + +struct ParseIntHandler : BaseReaderHandler, ParseIntHandler> { + ParseIntHandler() : step_(0), actual_() {} + bool Default() { ADD_FAILURE(); return false; } + bool Int(int i) { actual_ = i; step_++; return true; } + + unsigned step_; + int actual_; +}; + +struct ParseUintHandler : BaseReaderHandler, ParseUintHandler> { + ParseUintHandler() : step_(0), actual_() {} + bool Default() { ADD_FAILURE(); return false; } + bool Uint(unsigned i) { actual_ = i; step_++; return true; } + + unsigned step_; + unsigned actual_; +}; + +struct ParseInt64Handler : BaseReaderHandler, ParseInt64Handler> { + ParseInt64Handler() : step_(0), actual_() {} + bool Default() { ADD_FAILURE(); return false; } + bool Int64(int64_t i) { actual_ = i; step_++; return true; } + + unsigned step_; + int64_t actual_; +}; + +struct ParseUint64Handler : BaseReaderHandler, ParseUint64Handler> { + ParseUint64Handler() : step_(0), actual_() {} + bool Default() { ADD_FAILURE(); return false; } + bool Uint64(uint64_t i) { actual_ = i; step_++; return true; } + + unsigned step_; + uint64_t actual_; +}; + +struct ParseDoubleHandler : BaseReaderHandler, ParseDoubleHandler> { + ParseDoubleHandler() : step_(0), actual_() {} + bool Default() { ADD_FAILURE(); return false; } + bool Double(double d) { actual_ = d; step_++; return true; } + + unsigned step_; + double actual_; +}; + +TEST(Reader, ParseNumber_Integer) { +#define TEST_INTEGER(Handler, str, x) \ + { \ + StringStream s(str); \ + Handler h; \ + Reader reader; \ + reader.Parse(s, h); \ + EXPECT_EQ(1u, h.step_); \ + EXPECT_EQ(x, h.actual_); \ + } + + TEST_INTEGER(ParseUintHandler, "0", 0u); + TEST_INTEGER(ParseUintHandler, "123", 123u); + TEST_INTEGER(ParseUintHandler, "2147483648", 2147483648u); // 2^31 - 1 (cannot be stored in int) + TEST_INTEGER(ParseUintHandler, "4294967295", 4294967295u); + + TEST_INTEGER(ParseIntHandler, "-123", -123); + TEST_INTEGER(ParseIntHandler, "-2147483648", static_cast(0x80000000)); // -2^31 (min of int) + + TEST_INTEGER(ParseUint64Handler, "4294967296", RAPIDJSON_UINT64_C2(1, 0)); // 2^32 (max of unsigned + 1, force to use uint64_t) + TEST_INTEGER(ParseUint64Handler, "18446744073709551615", RAPIDJSON_UINT64_C2(0xFFFFFFFF, 0xFFFFFFFF)); // 2^64 - 1 (max of uint64_t) + + TEST_INTEGER(ParseInt64Handler, "-2147483649", static_cast(RAPIDJSON_UINT64_C2(0xFFFFFFFF, 0x7FFFFFFF))); // -2^31 -1 (min of int - 1, force to use int64_t) + TEST_INTEGER(ParseInt64Handler, "-9223372036854775808", static_cast(RAPIDJSON_UINT64_C2(0x80000000, 0x00000000))); // -2^63 (min of int64_t) + + // Random test for uint32_t/int32_t + { + union { + uint32_t u; + int32_t i; + }u; + Random r; + + for (unsigned i = 0; i < 100000; i++) { + u.u = r(); + + char buffer[32]; + *internal::u32toa(u.u, buffer) = '\0'; + TEST_INTEGER(ParseUintHandler, buffer, u.u); + + if (u.i < 0) { + *internal::i32toa(u.i, buffer) = '\0'; + TEST_INTEGER(ParseIntHandler, buffer, u.i); + } + } + } + + // Random test for uint64_t/int64_t + { + union { + uint64_t u; + int64_t i; + }u; + Random r; + + for (unsigned i = 0; i < 100000; i++) { + u.u = uint64_t(r()) << 32; + u.u |= r(); + + char buffer[32]; + if (u.u > uint64_t(4294967295u)) { + *internal::u64toa(u.u, buffer) = '\0'; + TEST_INTEGER(ParseUint64Handler, buffer, u.u); + } + + if (u.i < -int64_t(2147483648u)) { + *internal::i64toa(u.i, buffer) = '\0'; + TEST_INTEGER(ParseInt64Handler, buffer, u.i); + } + } + } +#undef TEST_INTEGER +} + +template +static void TestParseDouble() { +#define TEST_DOUBLE(fullPrecision, str, x) \ + { \ + StringStream s(str); \ + ParseDoubleHandler h; \ + Reader reader; \ + ASSERT_EQ(kParseErrorNone, reader.Parse(s, h).Code()); \ + EXPECT_EQ(1u, h.step_); \ + internal::Double e(x), a(h.actual_); \ + if (fullPrecision) { \ + EXPECT_EQ(e.Uint64Value(), a.Uint64Value()); \ + if (e.Uint64Value() != a.Uint64Value()) \ + printf(" String: %s\n Actual: %.17g\nExpected: %.17g\n", str, h.actual_, x); \ + } \ + else { \ + EXPECT_EQ(e.Sign(), a.Sign()); /* for 0.0 != -0.0 */ \ + EXPECT_DOUBLE_EQ(x, h.actual_); \ + } \ + } + + TEST_DOUBLE(fullPrecision, "0.0", 0.0); + TEST_DOUBLE(fullPrecision, "-0.0", -0.0); // For checking issue #289 + TEST_DOUBLE(fullPrecision, "0e100", 0.0); // For checking issue #1249 + TEST_DOUBLE(fullPrecision, "1.0", 1.0); + TEST_DOUBLE(fullPrecision, "-1.0", -1.0); + TEST_DOUBLE(fullPrecision, "1.5", 1.5); + TEST_DOUBLE(fullPrecision, "-1.5", -1.5); + TEST_DOUBLE(fullPrecision, "3.1416", 3.1416); + TEST_DOUBLE(fullPrecision, "1E10", 1E10); + TEST_DOUBLE(fullPrecision, "1e10", 1e10); + TEST_DOUBLE(fullPrecision, "1E+10", 1E+10); + TEST_DOUBLE(fullPrecision, "1E-10", 1E-10); + TEST_DOUBLE(fullPrecision, "-1E10", -1E10); + TEST_DOUBLE(fullPrecision, "-1e10", -1e10); + TEST_DOUBLE(fullPrecision, "-1E+10", -1E+10); + TEST_DOUBLE(fullPrecision, "-1E-10", -1E-10); + TEST_DOUBLE(fullPrecision, "1.234E+10", 1.234E+10); + TEST_DOUBLE(fullPrecision, "1.234E-10", 1.234E-10); + TEST_DOUBLE(fullPrecision, "1.79769e+308", 1.79769e+308); + TEST_DOUBLE(fullPrecision, "2.22507e-308", 2.22507e-308); + TEST_DOUBLE(fullPrecision, "-1.79769e+308", -1.79769e+308); + TEST_DOUBLE(fullPrecision, "-2.22507e-308", -2.22507e-308); + TEST_DOUBLE(fullPrecision, "4.9406564584124654e-324", 4.9406564584124654e-324); // minimum denormal + TEST_DOUBLE(fullPrecision, "2.2250738585072009e-308", 2.2250738585072009e-308); // Max subnormal double + TEST_DOUBLE(fullPrecision, "2.2250738585072014e-308", 2.2250738585072014e-308); // Min normal positive double + TEST_DOUBLE(fullPrecision, "1.7976931348623157e+308", 1.7976931348623157e+308); // Max double + TEST_DOUBLE(fullPrecision, "1e-10000", 0.0); // must underflow + TEST_DOUBLE(fullPrecision, "18446744073709551616", 18446744073709551616.0); // 2^64 (max of uint64_t + 1, force to use double) + TEST_DOUBLE(fullPrecision, "-9223372036854775809", -9223372036854775809.0); // -2^63 - 1(min of int64_t + 1, force to use double) + TEST_DOUBLE(fullPrecision, "0.9868011474609375", 0.9868011474609375); // https://github.com/Tencent/rapidjson/issues/120 + TEST_DOUBLE(fullPrecision, "123e34", 123e34); // Fast Path Cases In Disguise + TEST_DOUBLE(fullPrecision, "45913141877270640000.0", 45913141877270640000.0); + TEST_DOUBLE(fullPrecision, "2.2250738585072011e-308", 2.2250738585072011e-308); // http://www.exploringbinary.com/php-hangs-on-numeric-value-2-2250738585072011e-308/ + TEST_DOUBLE(fullPrecision, "1e-00011111111111", 0.0); // Issue #313 + TEST_DOUBLE(fullPrecision, "-1e-00011111111111", -0.0); + TEST_DOUBLE(fullPrecision, "1e-214748363", 0.0); // Maximum supported negative exponent + TEST_DOUBLE(fullPrecision, "1e-214748364", 0.0); + TEST_DOUBLE(fullPrecision, "1e-21474836311", 0.0); + TEST_DOUBLE(fullPrecision, "1.00000000001e-2147483638", 0.0); + TEST_DOUBLE(fullPrecision, "0.017976931348623157e+310", 1.7976931348623157e+308); // Max double in another form + TEST_DOUBLE(fullPrecision, "128.74836467836484838364836483643636483648e-336", 0.0); // Issue #1251 + + // Since + // abs((2^-1022 - 2^-1074) - 2.2250738585072012e-308) = 3.109754131239141401123495768877590405345064751974375599... x 10^-324 + // abs((2^-1022) - 2.2250738585072012e-308) = 1.830902327173324040642192159804623318305533274168872044... x 10 ^ -324 + // So 2.2250738585072012e-308 should round to 2^-1022 = 2.2250738585072014e-308 + TEST_DOUBLE(fullPrecision, "2.2250738585072012e-308", 2.2250738585072014e-308); // http://www.exploringbinary.com/java-hangs-when-converting-2-2250738585072012e-308/ + + // More closer to normal/subnormal boundary + // boundary = 2^-1022 - 2^-1075 = 2.225073858507201136057409796709131975934819546351645648... x 10^-308 + TEST_DOUBLE(fullPrecision, "2.22507385850720113605740979670913197593481954635164564e-308", 2.2250738585072009e-308); + TEST_DOUBLE(fullPrecision, "2.22507385850720113605740979670913197593481954635164565e-308", 2.2250738585072014e-308); + + // 1.0 is in (1.0 - 2^-54, 1.0 + 2^-53) + // 1.0 - 2^-54 = 0.999999999999999944488848768742172978818416595458984375 + TEST_DOUBLE(fullPrecision, "0.999999999999999944488848768742172978818416595458984375", 1.0); // round to even + TEST_DOUBLE(fullPrecision, "0.999999999999999944488848768742172978818416595458984374", 0.99999999999999989); // previous double + TEST_DOUBLE(fullPrecision, "0.999999999999999944488848768742172978818416595458984376", 1.0); // next double + // 1.0 + 2^-53 = 1.00000000000000011102230246251565404236316680908203125 + TEST_DOUBLE(fullPrecision, "1.00000000000000011102230246251565404236316680908203125", 1.0); // round to even + TEST_DOUBLE(fullPrecision, "1.00000000000000011102230246251565404236316680908203124", 1.0); // previous double + TEST_DOUBLE(fullPrecision, "1.00000000000000011102230246251565404236316680908203126", 1.00000000000000022); // next double + + // Numbers from https://github.com/floitsch/double-conversion/blob/master/test/cctest/test-strtod.cc + + TEST_DOUBLE(fullPrecision, "72057594037927928.0", 72057594037927928.0); + TEST_DOUBLE(fullPrecision, "72057594037927936.0", 72057594037927936.0); + TEST_DOUBLE(fullPrecision, "72057594037927932.0", 72057594037927936.0); + TEST_DOUBLE(fullPrecision, "7205759403792793199999e-5", 72057594037927928.0); + TEST_DOUBLE(fullPrecision, "7205759403792793200001e-5", 72057594037927936.0); + + TEST_DOUBLE(fullPrecision, "9223372036854774784.0", 9223372036854774784.0); + TEST_DOUBLE(fullPrecision, "9223372036854775808.0", 9223372036854775808.0); + TEST_DOUBLE(fullPrecision, "9223372036854775296.0", 9223372036854775808.0); + TEST_DOUBLE(fullPrecision, "922337203685477529599999e-5", 9223372036854774784.0); + TEST_DOUBLE(fullPrecision, "922337203685477529600001e-5", 9223372036854775808.0); + + TEST_DOUBLE(fullPrecision, "10141204801825834086073718800384", 10141204801825834086073718800384.0); + TEST_DOUBLE(fullPrecision, "10141204801825835211973625643008", 10141204801825835211973625643008.0); + TEST_DOUBLE(fullPrecision, "10141204801825834649023672221696", 10141204801825835211973625643008.0); + TEST_DOUBLE(fullPrecision, "1014120480182583464902367222169599999e-5", 10141204801825834086073718800384.0); + TEST_DOUBLE(fullPrecision, "1014120480182583464902367222169600001e-5", 10141204801825835211973625643008.0); + + TEST_DOUBLE(fullPrecision, "5708990770823838890407843763683279797179383808", 5708990770823838890407843763683279797179383808.0); + TEST_DOUBLE(fullPrecision, "5708990770823839524233143877797980545530986496", 5708990770823839524233143877797980545530986496.0); + TEST_DOUBLE(fullPrecision, "5708990770823839207320493820740630171355185152", 5708990770823839524233143877797980545530986496.0); + TEST_DOUBLE(fullPrecision, "5708990770823839207320493820740630171355185151999e-3", 5708990770823838890407843763683279797179383808.0); + TEST_DOUBLE(fullPrecision, "5708990770823839207320493820740630171355185152001e-3", 5708990770823839524233143877797980545530986496.0); + + { + char n1e308[310]; // '1' followed by 308 '0' + n1e308[0] = '1'; + for (int i = 1; i < 309; i++) + n1e308[i] = '0'; + n1e308[309] = '\0'; + TEST_DOUBLE(fullPrecision, n1e308, 1E308); + } + + // Cover trimming + TEST_DOUBLE(fullPrecision, +"2.22507385850720113605740979670913197593481954635164564802342610972482222202107694551652952390813508" +"7914149158913039621106870086438694594645527657207407820621743379988141063267329253552286881372149012" +"9811224514518898490572223072852551331557550159143974763979834118019993239625482890171070818506906306" +"6665599493827577257201576306269066333264756530000924588831643303777979186961204949739037782970490505" +"1080609940730262937128958950003583799967207254304360284078895771796150945516748243471030702609144621" +"5722898802581825451803257070188608721131280795122334262883686223215037756666225039825343359745688844" +"2390026549819838548794829220689472168983109969836584681402285424333066033985088644580400103493397042" +"7567186443383770486037861622771738545623065874679014086723327636718751234567890123456789012345678901" +"e-308", + 2.2250738585072014e-308); + + { + static const unsigned count = 100; // Tested with 1000000 locally + Random r; + Reader reader; // Reusing reader to prevent heap allocation + + // Exhaustively test different exponents with random significant + for (uint64_t exp = 0; exp < 2047; exp++) { + ; + for (unsigned i = 0; i < count; i++) { + // Need to call r() in two statements for cross-platform coherent sequence. + uint64_t u = (exp << 52) | uint64_t(r() & 0x000FFFFF) << 32; + u |= uint64_t(r()); + internal::Double d = internal::Double(u); + + char buffer[32]; + *internal::dtoa(d.Value(), buffer) = '\0'; + + StringStream s(buffer); + ParseDoubleHandler h; + ASSERT_EQ(kParseErrorNone, reader.Parse(s, h).Code()); + EXPECT_EQ(1u, h.step_); + internal::Double a(h.actual_); + if (fullPrecision) { + EXPECT_EQ(d.Uint64Value(), a.Uint64Value()); + if (d.Uint64Value() != a.Uint64Value()) + printf(" String: %s\n Actual: %.17g\nExpected: %.17g\n", buffer, h.actual_, d.Value()); + } + else { + EXPECT_EQ(d.Sign(), a.Sign()); // for 0.0 != -0.0 + EXPECT_DOUBLE_EQ(d.Value(), h.actual_); + } + } + } + } + + // Issue #340 + TEST_DOUBLE(fullPrecision, "7.450580596923828e-9", 7.450580596923828e-9); + { + internal::Double d(1.0); + for (int i = 0; i < 324; i++) { + char buffer[32]; + *internal::dtoa(d.Value(), buffer) = '\0'; + + StringStream s(buffer); + ParseDoubleHandler h; + Reader reader; + ASSERT_EQ(kParseErrorNone, reader.Parse(s, h).Code()); + EXPECT_EQ(1u, h.step_); + internal::Double a(h.actual_); + if (fullPrecision) { + EXPECT_EQ(d.Uint64Value(), a.Uint64Value()); + if (d.Uint64Value() != a.Uint64Value()) + printf(" String: %s\n Actual: %.17g\nExpected: %.17g\n", buffer, h.actual_, d.Value()); + } + else { + EXPECT_EQ(d.Sign(), a.Sign()); // for 0.0 != -0.0 + EXPECT_DOUBLE_EQ(d.Value(), h.actual_); + } + + + d = d.Value() * 0.5; + } + } + + // Issue 1249 + TEST_DOUBLE(fullPrecision, "0e100", 0.0); + + // Issue 1251 + TEST_DOUBLE(fullPrecision, "128.74836467836484838364836483643636483648e-336", 0.0); + + // Issue 1256 + TEST_DOUBLE(fullPrecision, + "6223372036854775296.1701512723685473547372536854755293372036854685477" + "529752233737201701512337200972013723685473123372036872036854236854737" + "247372368372367752975258547752975254729752547372368737201701512354737" + "83723677529752585477247372368372368547354737253685475529752", + 6223372036854775808.0); + +#if 0 + // Test (length + exponent) overflow + TEST_DOUBLE(fullPrecision, "0e+2147483647", 0.0); + TEST_DOUBLE(fullPrecision, "0e-2147483648", 0.0); + TEST_DOUBLE(fullPrecision, "1e-2147483648", 0.0); + TEST_DOUBLE(fullPrecision, "0e+9223372036854775807", 0.0); + TEST_DOUBLE(fullPrecision, "0e-9223372036854775808", 0.0); +#endif + + if (fullPrecision) + { + TEST_DOUBLE(fullPrecision, "1e-325", 0.0); + TEST_DOUBLE(fullPrecision, "1e-324", 0.0); + TEST_DOUBLE(fullPrecision, "2e-324", 0.0); + TEST_DOUBLE(fullPrecision, "2.4703282292062327e-324", 0.0); + TEST_DOUBLE(fullPrecision, "2.4703282292062328e-324", 5e-324); + TEST_DOUBLE(fullPrecision, "2.48e-324",5e-324); + TEST_DOUBLE(fullPrecision, "2.5e-324", 5e-324); + + // Slightly above max-normal + TEST_DOUBLE(fullPrecision, "1.7976931348623158e+308", 1.7976931348623158e+308); + + TEST_DOUBLE(fullPrecision, + "17976931348623157081452742373170435679807056752584499659891747680315726" + "07800285387605895586327668781715404589535143824642343213268894641827684" + "67546703537516986049910576551282076245490090389328944075868508455133942" + "30458323690322294816580855933212334827479782620414472316873817718091929" + "9881250404026184124858368", + (std::numeric_limits::max)()); + + TEST_DOUBLE(fullPrecision, + "243546080556034731077856379609316893158278902575447060151047" + "212703405344938119816206067372775299130836050315842578309818" + "316450894337978612745889730079163798234256495613858256849283" + "467066859489192118352020514036083287319232435355752493038825" + "828481044358810649108367633313557305310641892225870327827273" + "41408256.000000", + 2.4354608055603473e+307); + // 9007199254740991 * 2^971 (max normal) + TEST_DOUBLE(fullPrecision, + "1.797693134862315708145274237317043567980705675258449965989174768031572607800285" + "38760589558632766878171540458953514382464234321326889464182768467546703537516986" + "04991057655128207624549009038932894407586850845513394230458323690322294816580855" + "9332123348274797826204144723168738177180919299881250404026184124858368e+308", + 1.797693134862315708e+308 // 0x1.fffffffffffffp1023 + ); +#if 0 + // TODO: + // Should work at least in full-precision mode... + TEST_DOUBLE(fullPrecision, + "0.00000000000000000000000000000000000000000000000000000000000" + "0000000000000000000000000000000000000000000000000000000000000" + "0000000000000000000000000000000000000000000000000000000000000" + "0000000000000000000000000000000000000000000000000000000000000" + "0000000000000000000000000000000000000000000000000000000000000" + "0000000000000000000024703282292062327208828439643411068618252" + "9901307162382212792841250337753635104375932649918180817996189" + "8982823477228588654633283551779698981993873980053909390631503" + "5659515570226392290858392449105184435931802849936536152500319" + "3704576782492193656236698636584807570015857692699037063119282" + "7955855133292783433840935197801553124659726357957462276646527" + "2827220056374006485499977096599470454020828166226237857393450" + "7363390079677619305775067401763246736009689513405355374585166" + "6113422376667860416215968046191446729184030053005753084904876" + "5391711386591646239524912623653881879636239373280423891018672" + "3484976682350898633885879256283027559956575244555072551893136" + "9083625477918694866799496832404970582102851318545139621383772" + "2826145437693412532098591327667236328125", + 0.0); +#endif + // 9007199254740991 * 2^-1074 = (2^53 - 1) * 2^-1074 + TEST_DOUBLE(fullPrecision, + "4.450147717014402272114819593418263951869639092703291296046852219449644444042153" + "89103305904781627017582829831782607924221374017287738918929105531441481564124348" + "67599762821265346585071045737627442980259622449029037796981144446145705102663115" + "10031828794952795966823603998647925096578034214163701381261333311989876551545144" + "03152612538132666529513060001849177663286607555958373922409899478075565940981010" + "21612198814605258742579179000071675999344145086087205681577915435923018910334964" + "86942061405218289243144579760516365090360651414037721744226256159024466852576737" + "24464300755133324500796506867194913776884780053099639677097589658441378944337966" + "21993967316936280457084866613206797017728916080020698679408551343728867675409720" + "757232455434770912461317493580281734466552734375e-308", + 4.450147717014402272e-308 // 0x1.fffffffffffffp-1022 + ); + // 9007199254740990 * 2^-1074 + TEST_DOUBLE(fullPrecision, + "4.450147717014401778049173752171719775300846224481918930987049605124880018456471" + "39035755177760751831052846195619008686241717547743167145836439860405887584484471" + "19639655002484083577939142623582164522087943959208000909794783876158397872163051" + "22622675229968408654350206725478309956546318828765627255022767720818849892988457" + "26333908582101604036318532842699932130356061901518261174396928478121372742040102" + "17446565569357687263889031732270082446958029584739170416643195242132750803227473" + "16608838720742955671061336566907126801014814608027120593609275183716632624844904" + "31985250929886016737037234388448352929102742708402644340627409931664203093081360" + "70794835812045179006047003875039546061891526346421705014598610179523165038319441" + "51446491086954182492263498716056346893310546875e-308", + 4.450147717014401778e-308 // 0x1.ffffffffffffep-1022 + ); + // half way between the two numbers above. + // round to nearest even. + TEST_DOUBLE(fullPrecision, + "4.450147717014402025081996672794991863585242658592605113516950912287262231249312" + "64069530541271189424317838013700808305231545782515453032382772695923684574304409" + "93619708911874715081505094180604803751173783204118519353387964161152051487413083" + "16327252012460602310586905362063117526562176521464664318142050516404363222266800" + "64743260560117135282915796422274554896821334728738317548403413978098469341510556" + "19529382191981473003234105366170879223151087335413188049110555339027884856781219" + "01775450062980622457102958163711745945687733011032421168917765671370549738710820" + "78224775842509670618916870627821633352993761380751142008862499795052791018709663" + "46394401564490729731565935244123171539810221213221201847003580761626016356864581" + "1358486831521563686919762403704226016998291015625e-308", + 4.450147717014401778e-308 // 0x1.ffffffffffffep-1022 + ); + TEST_DOUBLE(fullPrecision, + "4.450147717014402025081996672794991863585242658592605113516950912287262231249312" + "64069530541271189424317838013700808305231545782515453032382772695923684574304409" + "93619708911874715081505094180604803751173783204118519353387964161152051487413083" + "16327252012460602310586905362063117526562176521464664318142050516404363222266800" + "64743260560117135282915796422274554896821334728738317548403413978098469341510556" + "19529382191981473003234105366170879223151087335413188049110555339027884856781219" + "01775450062980622457102958163711745945687733011032421168917765671370549738710820" + "78224775842509670618916870627821633352993761380751142008862499795052791018709663" + "46394401564490729731565935244123171539810221213221201847003580761626016356864581" + "13584868315215636869197624037042260169982910156250000000000000000000000000000000" + "00000000000000000000000000000000000000000000000000000000000000000000000000000000" + "00000000000000000000000000000000000000000000000000000000000000000000000000000000e-308", + 4.450147717014401778e-308 // 0x1.ffffffffffffep-1022 + ); +#if 0 + // ... round up + // TODO: + // Should work at least in full-precision mode... + TEST_DOUBLE(fullPrecision, + "4.450147717014402025081996672794991863585242658592605113516950912287262231249312" + "64069530541271189424317838013700808305231545782515453032382772695923684574304409" + "93619708911874715081505094180604803751173783204118519353387964161152051487413083" + "16327252012460602310586905362063117526562176521464664318142050516404363222266800" + "64743260560117135282915796422274554896821334728738317548403413978098469341510556" + "19529382191981473003234105366170879223151087335413188049110555339027884856781219" + "01775450062980622457102958163711745945687733011032421168917765671370549738710820" + "78224775842509670618916870627821633352993761380751142008862499795052791018709663" + "46394401564490729731565935244123171539810221213221201847003580761626016356864581" + "13584868315215636869197624037042260169982910156250000000000000000000000000000000" + "00000000000000000000000000000000000000000000000000000000000000000000000000000000" + "00000000000000000000000000000000000000000000000000000000000000000000000000000001e-308", + 4.450147717014402272e-308 // 0x1.fffffffffffffp-1022 + ); +#endif + // ... round down + TEST_DOUBLE(fullPrecision, + "4.450147717014402025081996672794991863585242658592605113516950912287262231249312" + "64069530541271189424317838013700808305231545782515453032382772695923684574304409" + "93619708911874715081505094180604803751173783204118519353387964161152051487413083" + "16327252012460602310586905362063117526562176521464664318142050516404363222266800" + "64743260560117135282915796422274554896821334728738317548403413978098469341510556" + "19529382191981473003234105366170879223151087335413188049110555339027884856781219" + "01775450062980622457102958163711745945687733011032421168917765671370549738710820" + "78224775842509670618916870627821633352993761380751142008862499795052791018709663" + "46394401564490729731565935244123171539810221213221201847003580761626016356864581" + "13584868315215636869197624037042260169982910156249999999999999999999999999999999" + "99999999999999999999999999999999999999999999999999999999999999999999999999999999" + "99999999999999999999999999999999999999999999999999999999999999999999999999999999e-308", + 4.450147717014401778e-308 // 0x1.ffffffffffffep-1022 + ); + // Slightly below half way between max-normal and infinity. + // Should round down. + TEST_DOUBLE(fullPrecision, + "1.797693134862315807937289714053034150799341327100378269361737789804449682927647" + "50946649017977587207096330286416692887910946555547851940402630657488671505820681" + "90890200070838367627385484581771153176447573027006985557136695962284291481986083" + "49364752927190741684443655107043427115596995080930428801779041744977919999999999" + "99999999999999999999999999999999999999999999999999999999999999999999999999999999" + "99999999999999999999999999999999999999999999999999999999999999999999999999999999" + "99999999999999999999999999999999999999999999999999999999999999999999999999999999" + "99999999999999999999999999999999999999999999999999999999999999999999999999999999" + "99999999999999999999999999999999999999999999999999999999999999999999999999999999" + "99999999999999999999999999999999999999999999999999999999999999999999999999999999" + "99999999999999999999999999999999999999999999999999999999999999999999999999999999" + "99999999999999999999999999999999999999999999999999999999999999999999999999999999" + "99999999999999999999999999999999999999999999999999999999999999999999999999999999" + "99999999999999999999999999999999999999999999999999999999999999999999999999999999" + "99999999999999999999999999999999999999999999999999999999999999999999999999999999" + "99999999999999999999999999999999999999999999999999999999999999999999999999999999e+308", + 1.797693134862315708e+308 // 0x1.fffffffffffffp1023 + ); + } + +#undef TEST_DOUBLE +} + +TEST(Reader, ParseNumber_NormalPrecisionDouble) { + TestParseDouble(); +} + +TEST(Reader, ParseNumber_FullPrecisionDouble) { + TestParseDouble(); +} + +TEST(Reader, ParseNumber_NormalPrecisionError) { + static unsigned count = 1000000; + Random r; + + double ulpSum = 0.0; + double ulpMax = 0.0; + for (unsigned i = 0; i < count; i++) { + internal::Double e, a; + do { + // Need to call r() in two statements for cross-platform coherent sequence. + uint64_t u = uint64_t(r()) << 32; + u |= uint64_t(r()); + e = u; + } while (e.IsNan() || e.IsInf() || !e.IsNormal()); + + char buffer[32]; + *internal::dtoa(e.Value(), buffer) = '\0'; + + StringStream s(buffer); + ParseDoubleHandler h; + Reader reader; + ASSERT_EQ(kParseErrorNone, reader.Parse(s, h).Code()); + EXPECT_EQ(1u, h.step_); + + a = h.actual_; + uint64_t bias1 = e.ToBias(); + uint64_t bias2 = a.ToBias(); + double ulp = static_cast(bias1 >= bias2 ? bias1 - bias2 : bias2 - bias1); + ulpMax = (std::max)(ulpMax, ulp); + ulpSum += ulp; + } + printf("ULP Average = %g, Max = %g \n", ulpSum / count, ulpMax); +} + +template +static void TestParseNumberError() { +#define TEST_NUMBER_ERROR(errorCode, str, errorOffset, streamPos) \ + { \ + char buffer[2048]; \ + ASSERT_LT(std::strlen(str), 2048u); \ + sprintf(buffer, "%s", str); \ + InsituStringStream s(buffer); \ + BaseReaderHandler<> h; \ + Reader reader; \ + EXPECT_FALSE(reader.Parse(s, h)); \ + EXPECT_EQ(errorCode, reader.GetParseErrorCode());\ + EXPECT_EQ(errorOffset, reader.GetErrorOffset());\ + EXPECT_EQ(streamPos, s.Tell());\ + } + + // Number too big to be stored in double. + { + char n1e309[311]; // '1' followed by 309 '0' + n1e309[0] = '1'; + for (int i = 1; i < 310; i++) + n1e309[i] = '0'; + n1e309[310] = '\0'; + TEST_NUMBER_ERROR(kParseErrorNumberTooBig, n1e309, 0u, 310u); + } + TEST_NUMBER_ERROR(kParseErrorNumberTooBig, "1e309", 0u, 5u); + + // Miss fraction part in number. + TEST_NUMBER_ERROR(kParseErrorNumberMissFraction, "1.", 2u, 2u); + TEST_NUMBER_ERROR(kParseErrorNumberMissFraction, "1.a", 2u, 2u); + + // Miss exponent in number. + TEST_NUMBER_ERROR(kParseErrorNumberMissExponent, "1e", 2u, 2u); + TEST_NUMBER_ERROR(kParseErrorNumberMissExponent, "1e_", 2u, 2u); + + // Issue 849 + TEST_NUMBER_ERROR(kParseErrorNumberTooBig, "1.8e308", 0u, 7u); + TEST_NUMBER_ERROR(kParseErrorNumberTooBig, "5e308", 0u, 5u); + TEST_NUMBER_ERROR(kParseErrorNumberTooBig, "1e309", 0u, 5u); + TEST_NUMBER_ERROR(kParseErrorNumberTooBig, "1.0e310", 0u, 7u); + TEST_NUMBER_ERROR(kParseErrorNumberTooBig, "1.00e310", 0u, 8u); + TEST_NUMBER_ERROR(kParseErrorNumberTooBig, "-1.8e308", 0u, 8u); + TEST_NUMBER_ERROR(kParseErrorNumberTooBig, "-1e309", 0u, 6u); + + // Issue 1253 + TEST_NUMBER_ERROR(kParseErrorNumberTooBig, "2e308", 0u, 5u); + + // Issue 1259 + TEST_NUMBER_ERROR(kParseErrorNumberTooBig, + "88474320368547737236837236775298547354737253685475547552933720368546854775297525" + "29337203685468547770151233720097201372368547312337203687203685423685123372036872" + "03685473724737236837236775297525854775297525472975254737236873720170151235473783" + "7236737247372368772473723683723456789012E66", 0u, 283u); + +#if 0 + // Test (length + exponent) overflow + TEST_NUMBER_ERROR(kParseErrorNumberTooBig, "1e+2147483647", 0u, 13u); + TEST_NUMBER_ERROR(kParseErrorNumberTooBig, "1e+9223372036854775807", 0u, 22u); + TEST_NUMBER_ERROR(kParseErrorNumberTooBig, "1e+10000", 0u, 8u); + TEST_NUMBER_ERROR(kParseErrorNumberTooBig, "1e+50000", 0u, 8u); +#endif + + // 9007199254740992 * 2^971 ("infinity") + TEST_NUMBER_ERROR(kParseErrorNumberTooBig, + "1.797693134862315907729305190789024733617976978942306572734300811577326758055009" + "63132708477322407536021120113879871393357658789768814416622492847430639474124377" + "76789342486548527630221960124609411945308295208500576883815068234246288147391311" + "0540827237163350510684586298239947245938479716304835356329624224137216e+308", 0u, 315u); + + // TODO: + // These tests (currently) fail in normal-precision mode + if (fullPrecision) + { + // Half way between max-normal and infinity + // Should round to infinity in nearest-even mode. + TEST_NUMBER_ERROR(kParseErrorNumberTooBig, + "1.797693134862315807937289714053034150799341327100378269361737789804449682927647" + "50946649017977587207096330286416692887910946555547851940402630657488671505820681" + "90890200070838367627385484581771153176447573027006985557136695962284291481986083" + "49364752927190741684443655107043427115596995080930428801779041744977920000000000" + "00000000000000000000000000000000000000000000000000000000000000000000000000000000" + "00000000000000000000000000000000000000000000000000000000000000000000000000000000" + "00000000000000000000000000000000000000000000000000000000000000000000000000000000" + "00000000000000000000000000000000000000000000000000000000000000000000000000000000" + "00000000000000000000000000000000000000000000000000000000000000000000000000000000" + "00000000000000000000000000000000000000000000000000000000000000000000000000000000" + "00000000000000000000000000000000000000000000000000000000000000000000000000000000" + "00000000000000000000000000000000000000000000000000000000000000000000000000000000" + "00000000000000000000000000000000000000000000000000000000000000000000000000000000" + "00000000000000000000000000000000000000000000000000000000000000000000000000000000e+308", 0u, 1125u); + // ...round up + TEST_NUMBER_ERROR(kParseErrorNumberTooBig, + "1.797693134862315807937289714053034150799341327100378269361737789804449682927647" + "50946649017977587207096330286416692887910946555547851940402630657488671505820681" + "90890200070838367627385484581771153176447573027006985557136695962284291481986083" + "49364752927190741684443655107043427115596995080930428801779041744977920000000000" + "00000000000000000000000000000000000000000000000000000000000000000000000000000000" + "00000000000000000000000000000000000000000000000000000000000000000000000000000000" + "00000000000000000000000000000000000000000000000000000000000000000000000000000000" + "00000000000000000000000000000000000000000000000000000000000000000000000000000000" + "00000000000000000000000000000000000000000000000000000000000000000000000000000000" + "00000000000000000000000000000000000000000000000000000000000000000000000000000000" + "00000000000000000000000000000000000000000000000000000000000000000000000000000000" + "00000000000000000000000000000000000000000000000000000000000000000000000000000000" + "00000000000000000000000000000000000000000000000000000000000000000000000000000000" + "00000000000000000000000000000000000000000000000000000000000000000000000000000000" + "00000000000000000000000000000000000000000000000000000000000000000000000000000001e+308", 0u, 1205u); + } + + TEST_NUMBER_ERROR(kParseErrorNumberTooBig, + "10000000000000000000000000000000000000000000000000000000000000000000000000000000" + "00000000000000000000000000000000000000000000000000000000000000000000000000000000" + "00000000000000000000000000000000000000000000000000000000000000000000000000000000" + "0000000000000000000000000000000000000000000000000000000000000000000001", 0u, 310u); + +#undef TEST_NUMBER_ERROR +} + +TEST(Reader, ParseNumberError_NormalPrecisionDouble) { + TestParseNumberError(); +} + +TEST(Reader, ParseNumberError_FullPrecisionDouble) { + TestParseNumberError(); +} + +template +struct ParseStringHandler : BaseReaderHandler > { + ParseStringHandler() : str_(0), length_(0), copy_() {} + ~ParseStringHandler() { EXPECT_TRUE(str_ != 0); if (copy_) free(const_cast(str_)); } + + ParseStringHandler(const ParseStringHandler&); + ParseStringHandler& operator=(const ParseStringHandler&); + + bool Default() { ADD_FAILURE(); return false; } + bool String(const typename Encoding::Ch* str, size_t length, bool copy) { + EXPECT_EQ(0, str_); + if (copy) { + str_ = static_cast(malloc((length + 1) * sizeof(typename Encoding::Ch))); + memcpy(const_cast(str_), str, (length + 1) * sizeof(typename Encoding::Ch)); + } + else + str_ = str; + length_ = length; + copy_ = copy; + return true; + } + + const typename Encoding::Ch* str_; + size_t length_; + bool copy_; +}; + +TEST(Reader, ParseString) { +#define TEST_STRING(Encoding, e, x) \ + { \ + Encoding::Ch* buffer = StrDup(x); \ + GenericInsituStringStream is(buffer); \ + ParseStringHandler h; \ + GenericReader reader; \ + reader.Parse(is, h); \ + EXPECT_EQ(0, StrCmp(e, h.str_)); \ + EXPECT_EQ(StrLen(e), h.length_); \ + free(buffer); \ + GenericStringStream s(x); \ + ParseStringHandler h2; \ + GenericReader reader2; \ + reader2.Parse(s, h2); \ + EXPECT_EQ(0, StrCmp(e, h2.str_)); \ + EXPECT_EQ(StrLen(e), h2.length_); \ + } + + // String constant L"\xXX" can only specify character code in bytes, which is not endianness-neutral. + // And old compiler does not support u"" and U"" string literal. So here specify string literal by array of Ch. + // In addition, GCC 4.8 generates -Wnarrowing warnings when character code >= 128 are assigned to signed integer types. + // Therefore, utype is added for declaring unsigned array, and then cast it to Encoding::Ch. +#define ARRAY(...) { __VA_ARGS__ } +#define TEST_STRINGARRAY(Encoding, utype, array, x) \ + { \ + static const utype ue[] = array; \ + static const Encoding::Ch* e = reinterpret_cast(&ue[0]); \ + TEST_STRING(Encoding, e, x); \ + } + +#define TEST_STRINGARRAY2(Encoding, utype, earray, xarray) \ + { \ + static const utype ue[] = earray; \ + static const utype xe[] = xarray; \ + static const Encoding::Ch* e = reinterpret_cast(&ue[0]); \ + static const Encoding::Ch* x = reinterpret_cast(&xe[0]); \ + TEST_STRING(Encoding, e, x); \ + } + + TEST_STRING(UTF8<>, "", "\"\""); + TEST_STRING(UTF8<>, "Hello", "\"Hello\""); + TEST_STRING(UTF8<>, "Hello\nWorld", "\"Hello\\nWorld\""); + TEST_STRING(UTF8<>, "\"\\/\b\f\n\r\t", "\"\\\"\\\\/\\b\\f\\n\\r\\t\""); + TEST_STRING(UTF8<>, "\x24", "\"\\u0024\""); // Dollar sign U+0024 + TEST_STRING(UTF8<>, "\xC2\xA2", "\"\\u00A2\""); // Cents sign U+00A2 + TEST_STRING(UTF8<>, "\xE2\x82\xAC", "\"\\u20AC\""); // Euro sign U+20AC + TEST_STRING(UTF8<>, "\xF0\x9D\x84\x9E", "\"\\uD834\\uDD1E\""); // G clef sign U+1D11E + + // UTF16 + TEST_STRING(UTF16<>, L"", L"\"\""); + TEST_STRING(UTF16<>, L"Hello", L"\"Hello\""); + TEST_STRING(UTF16<>, L"Hello\nWorld", L"\"Hello\\nWorld\""); + TEST_STRING(UTF16<>, L"\"\\/\b\f\n\r\t", L"\"\\\"\\\\/\\b\\f\\n\\r\\t\""); + TEST_STRINGARRAY(UTF16<>, wchar_t, ARRAY(0x0024, 0x0000), L"\"\\u0024\""); + TEST_STRINGARRAY(UTF16<>, wchar_t, ARRAY(0x00A2, 0x0000), L"\"\\u00A2\""); // Cents sign U+00A2 + TEST_STRINGARRAY(UTF16<>, wchar_t, ARRAY(0x20AC, 0x0000), L"\"\\u20AC\""); // Euro sign U+20AC + TEST_STRINGARRAY(UTF16<>, wchar_t, ARRAY(0xD834, 0xDD1E, 0x0000), L"\"\\uD834\\uDD1E\""); // G clef sign U+1D11E + + // UTF32 + TEST_STRINGARRAY2(UTF32<>, unsigned, ARRAY('\0'), ARRAY('\"', '\"', '\0')); + TEST_STRINGARRAY2(UTF32<>, unsigned, ARRAY('H', 'e', 'l', 'l', 'o', '\0'), ARRAY('\"', 'H', 'e', 'l', 'l', 'o', '\"', '\0')); + TEST_STRINGARRAY2(UTF32<>, unsigned, ARRAY('H', 'e', 'l', 'l', 'o', '\n', 'W', 'o', 'r', 'l', 'd', '\0'), ARRAY('\"', 'H', 'e', 'l', 'l', 'o', '\\', 'n', 'W', 'o', 'r', 'l', 'd', '\"', '\0')); + TEST_STRINGARRAY2(UTF32<>, unsigned, ARRAY('\"', '\\', '/', '\b', '\f', '\n', '\r', '\t', '\0'), ARRAY('\"', '\\', '\"', '\\', '\\', '/', '\\', 'b', '\\', 'f', '\\', 'n', '\\', 'r', '\\', 't', '\"', '\0')); + TEST_STRINGARRAY2(UTF32<>, unsigned, ARRAY(0x00024, 0x0000), ARRAY('\"', '\\', 'u', '0', '0', '2', '4', '\"', '\0')); + TEST_STRINGARRAY2(UTF32<>, unsigned, ARRAY(0x000A2, 0x0000), ARRAY('\"', '\\', 'u', '0', '0', 'A', '2', '\"', '\0')); // Cents sign U+00A2 + TEST_STRINGARRAY2(UTF32<>, unsigned, ARRAY(0x020AC, 0x0000), ARRAY('\"', '\\', 'u', '2', '0', 'A', 'C', '\"', '\0')); // Euro sign U+20AC + TEST_STRINGARRAY2(UTF32<>, unsigned, ARRAY(0x1D11E, 0x0000), ARRAY('\"', '\\', 'u', 'D', '8', '3', '4', '\\', 'u', 'D', 'D', '1', 'E', '\"', '\0')); // G clef sign U+1D11E + +#undef TEST_STRINGARRAY +#undef ARRAY +#undef TEST_STRING + + // Support of null character in string + { + StringStream s("\"Hello\\u0000World\""); + const char e[] = "Hello\0World"; + ParseStringHandler > h; + Reader reader; + reader.Parse(s, h); + EXPECT_EQ(0, memcmp(e, h.str_, h.length_ + 1)); + EXPECT_EQ(11u, h.length_); + } +} + +TEST(Reader, ParseString_Transcoding) { + const char* x = "\"Hello\""; + const wchar_t* e = L"Hello"; + GenericStringStream > is(x); + GenericReader, UTF16<> > reader; + ParseStringHandler > h; + reader.Parse(is, h); + EXPECT_EQ(0, StrCmp::Ch>(e, h.str_)); + EXPECT_EQ(StrLen(e), h.length_); +} + +TEST(Reader, ParseString_TranscodingWithValidation) { + const char* x = "\"Hello\""; + const wchar_t* e = L"Hello"; + GenericStringStream > is(x); + GenericReader, UTF16<> > reader; + ParseStringHandler > h; + reader.Parse(is, h); + EXPECT_EQ(0, StrCmp::Ch>(e, h.str_)); + EXPECT_EQ(StrLen(e), h.length_); +} + +TEST(Reader, ParseString_NonDestructive) { + StringStream s("\"Hello\\nWorld\""); + ParseStringHandler > h; + Reader reader; + reader.Parse(s, h); + EXPECT_EQ(0, StrCmp("Hello\nWorld", h.str_)); + EXPECT_EQ(11u, h.length_); +} + +template +ParseErrorCode TestString(const typename Encoding::Ch* str) { + GenericStringStream s(str); + BaseReaderHandler h; + GenericReader reader; + reader.template Parse(s, h); + return reader.GetParseErrorCode(); +} + +TEST(Reader, ParseString_Error) { +#define TEST_STRING_ERROR(errorCode, str, errorOffset, streamPos)\ +{\ + GenericStringStream > s(str);\ + BaseReaderHandler > h;\ + GenericReader , UTF8<> > reader;\ + reader.Parse(s, h);\ + EXPECT_EQ(errorCode, reader.GetParseErrorCode());\ + EXPECT_EQ(errorOffset, reader.GetErrorOffset());\ + EXPECT_EQ(streamPos, s.Tell());\ +} + +#define ARRAY(...) { __VA_ARGS__ } +#define TEST_STRINGENCODING_ERROR(Encoding, TargetEncoding, utype, array) \ + { \ + static const utype ue[] = array; \ + static const Encoding::Ch* e = reinterpret_cast(&ue[0]); \ + EXPECT_EQ(kParseErrorStringInvalidEncoding, TestString(e));\ + /* decode error */\ + GenericStringStream s(e);\ + BaseReaderHandler h;\ + GenericReader reader;\ + reader.Parse(s, h);\ + EXPECT_EQ(kParseErrorStringInvalidEncoding, reader.GetParseErrorCode());\ + } + + // Invalid escape character in string. + TEST_STRING_ERROR(kParseErrorStringEscapeInvalid, "[\"\\a\"]", 2u, 3u); + + // Incorrect hex digit after \\u escape in string. + TEST_STRING_ERROR(kParseErrorStringUnicodeEscapeInvalidHex, "[\"\\uABCG\"]", 2u, 7u); + + // Quotation in \\u escape in string (Issue #288) + TEST_STRING_ERROR(kParseErrorStringUnicodeEscapeInvalidHex, "[\"\\uaaa\"]", 2u, 7u); + TEST_STRING_ERROR(kParseErrorStringUnicodeEscapeInvalidHex, "[\"\\uD800\\uFFF\"]", 2u, 13u); + + // The surrogate pair in string is invalid. + TEST_STRING_ERROR(kParseErrorStringUnicodeSurrogateInvalid, "[\"\\uD800X\"]", 2u, 8u); + TEST_STRING_ERROR(kParseErrorStringUnicodeSurrogateInvalid, "[\"\\uD800\\uFFFF\"]", 2u, 14u); + + // Single low surrogate pair in string is invalid. + TEST_STRING_ERROR(kParseErrorStringUnicodeSurrogateInvalid, "[\"\\udc4d\"]", 2u, 8u); + + // Missing a closing quotation mark in string. + TEST_STRING_ERROR(kParseErrorStringMissQuotationMark, "[\"Test]", 7u, 7u); + + // http://www.cl.cam.ac.uk/~mgk25/ucs/examples/UTF-8-test.txt + + // 3 Malformed sequences + + // 3.1 Unexpected continuation bytes + { + char e[] = { '[', '\"', 0, '\"', ']', '\0' }; + for (unsigned char c = 0x80u; c <= 0xBFu; c++) { + e[2] = static_cast(c); + ParseErrorCode error = TestString >(e); + EXPECT_EQ(kParseErrorStringInvalidEncoding, error); + if (error != kParseErrorStringInvalidEncoding) + std::cout << static_cast(c) << std::endl; + } + } + + // 3.2 Lonely start characters, 3.5 Impossible bytes + { + char e[] = { '[', '\"', 0, ' ', '\"', ']', '\0' }; + for (unsigned c = 0xC0u; c <= 0xFFu; c++) { + e[2] = static_cast(c); + unsigned streamPos; + if (c <= 0xC1u) + streamPos = 3; // 0xC0 - 0xC1 + else if (c <= 0xDFu) + streamPos = 4; // 0xC2 - 0xDF + else if (c <= 0xEFu) + streamPos = 5; // 0xE0 - 0xEF + else if (c <= 0xF4u) + streamPos = 6; // 0xF0 - 0xF4 + else + streamPos = 3; // 0xF5 - 0xFF + TEST_STRING_ERROR(kParseErrorStringInvalidEncoding, e, 2u, streamPos); + } + } + + // 4 Overlong sequences + + // 4.1 Examples of an overlong ASCII character + TEST_STRINGENCODING_ERROR(UTF8<>, UTF16<>, unsigned char, ARRAY('[', '\"', 0xC0u, 0xAFu, '\"', ']', '\0')); + TEST_STRINGENCODING_ERROR(UTF8<>, UTF16<>, unsigned char, ARRAY('[', '\"', 0xE0u, 0x80u, 0xAFu, '\"', ']', '\0')); + TEST_STRINGENCODING_ERROR(UTF8<>, UTF16<>, unsigned char, ARRAY('[', '\"', 0xF0u, 0x80u, 0x80u, 0xAFu, '\"', ']', '\0')); + + // 4.2 Maximum overlong sequences + TEST_STRINGENCODING_ERROR(UTF8<>, UTF16<>, unsigned char, ARRAY('[', '\"', 0xC1u, 0xBFu, '\"', ']', '\0')); + TEST_STRINGENCODING_ERROR(UTF8<>, UTF16<>, unsigned char, ARRAY('[', '\"', 0xE0u, 0x9Fu, 0xBFu, '\"', ']', '\0')); + TEST_STRINGENCODING_ERROR(UTF8<>, UTF16<>, unsigned char, ARRAY('[', '\"', 0xF0u, 0x8Fu, 0xBFu, 0xBFu, '\"', ']', '\0')); + + // 4.3 Overlong representation of the NUL character + TEST_STRINGENCODING_ERROR(UTF8<>, UTF16<>, unsigned char, ARRAY('[', '\"', 0xC0u, 0x80u, '\"', ']', '\0')); + TEST_STRINGENCODING_ERROR(UTF8<>, UTF16<>, unsigned char, ARRAY('[', '\"', 0xE0u, 0x80u, 0x80u, '\"', ']', '\0')); + TEST_STRINGENCODING_ERROR(UTF8<>, UTF16<>, unsigned char, ARRAY('[', '\"', 0xF0u, 0x80u, 0x80u, 0x80u, '\"', ']', '\0')); + + // 5 Illegal code positions + + // 5.1 Single UTF-16 surrogates + TEST_STRINGENCODING_ERROR(UTF8<>, UTF16<>, unsigned char, ARRAY('[', '\"', 0xEDu, 0xA0u, 0x80u, '\"', ']', '\0')); + TEST_STRINGENCODING_ERROR(UTF8<>, UTF16<>, unsigned char, ARRAY('[', '\"', 0xEDu, 0xADu, 0xBFu, '\"', ']', '\0')); + TEST_STRINGENCODING_ERROR(UTF8<>, UTF16<>, unsigned char, ARRAY('[', '\"', 0xEDu, 0xAEu, 0x80u, '\"', ']', '\0')); + TEST_STRINGENCODING_ERROR(UTF8<>, UTF16<>, unsigned char, ARRAY('[', '\"', 0xEDu, 0xAFu, 0xBFu, '\"', ']', '\0')); + TEST_STRINGENCODING_ERROR(UTF8<>, UTF16<>, unsigned char, ARRAY('[', '\"', 0xEDu, 0xB0u, 0x80u, '\"', ']', '\0')); + TEST_STRINGENCODING_ERROR(UTF8<>, UTF16<>, unsigned char, ARRAY('[', '\"', 0xEDu, 0xBEu, 0x80u, '\"', ']', '\0')); + TEST_STRINGENCODING_ERROR(UTF8<>, UTF16<>, unsigned char, ARRAY('[', '\"', 0xEDu, 0xBFu, 0xBFu, '\"', ']', '\0')); + + // Malform UTF-16 sequences + TEST_STRINGENCODING_ERROR(UTF16<>, UTF8<>, wchar_t, ARRAY('[', '\"', 0xDC00, 0xDC00, '\"', ']', '\0')); + TEST_STRINGENCODING_ERROR(UTF16<>, UTF8<>, wchar_t, ARRAY('[', '\"', 0xD800, 0xD800, '\"', ']', '\0')); + + // Malform UTF-32 sequence + TEST_STRINGENCODING_ERROR(UTF32<>, UTF8<>, unsigned, ARRAY('[', '\"', 0x110000, '\"', ']', '\0')); + + // Malform ASCII sequence + TEST_STRINGENCODING_ERROR(ASCII<>, UTF8<>, char, ARRAY('[', '\"', char(0x80u), '\"', ']', '\0')); + TEST_STRINGENCODING_ERROR(ASCII<>, UTF8<>, char, ARRAY('[', '\"', char(0x01u), '\"', ']', '\0')); + TEST_STRINGENCODING_ERROR(ASCII<>, UTF8<>, char, ARRAY('[', '\"', char(0x1Cu), '\"', ']', '\0')); + +#undef ARRAY +#undef TEST_STRINGARRAY_ERROR +} + +template +struct ParseArrayHandler : BaseReaderHandler, ParseArrayHandler > { + ParseArrayHandler() : step_(0) {} + + bool Default() { ADD_FAILURE(); return false; } + bool Uint(unsigned i) { EXPECT_EQ(step_, i); step_++; return true; } + bool StartArray() { EXPECT_EQ(0u, step_); step_++; return true; } + bool EndArray(SizeType) { step_++; return true; } + + unsigned step_; +}; + +TEST(Reader, ParseEmptyArray) { + char *json = StrDup("[ ] "); + InsituStringStream s(json); + ParseArrayHandler<0> h; + Reader reader; + reader.Parse(s, h); + EXPECT_EQ(2u, h.step_); + free(json); +} + +TEST(Reader, ParseArray) { + char *json = StrDup("[1, 2, 3, 4]"); + InsituStringStream s(json); + ParseArrayHandler<4> h; + Reader reader; + reader.Parse(s, h); + EXPECT_EQ(6u, h.step_); + free(json); +} + +TEST(Reader, ParseArray_Error) { +#define TEST_ARRAY_ERROR(errorCode, str, errorOffset) \ + { \ + unsigned streamPos = errorOffset; \ + char buffer[1001]; \ + strncpy(buffer, str, 1000); \ + InsituStringStream s(buffer); \ + BaseReaderHandler<> h; \ + GenericReader, UTF8<>, CrtAllocator> reader; \ + EXPECT_FALSE(reader.Parse(s, h)); \ + EXPECT_EQ(errorCode, reader.GetParseErrorCode());\ + EXPECT_EQ(errorOffset, reader.GetErrorOffset());\ + EXPECT_EQ(streamPos, s.Tell());\ + } + + // Missing a comma or ']' after an array element. + TEST_ARRAY_ERROR(kParseErrorArrayMissCommaOrSquareBracket, "[1", 2u); + TEST_ARRAY_ERROR(kParseErrorArrayMissCommaOrSquareBracket, "[1}", 2u); + TEST_ARRAY_ERROR(kParseErrorArrayMissCommaOrSquareBracket, "[1 2]", 3u); + + // Array cannot have a trailing comma (without kParseTrailingCommasFlag); + // a value must follow a comma + TEST_ARRAY_ERROR(kParseErrorValueInvalid, "[1,]", 3u); + +#undef TEST_ARRAY_ERROR +} + +struct ParseObjectHandler : BaseReaderHandler, ParseObjectHandler> { + ParseObjectHandler() : step_(0) {} + + bool Default() { ADD_FAILURE(); return false; } + bool Null() { EXPECT_EQ(8u, step_); step_++; return true; } + bool Bool(bool b) { + switch(step_) { + case 4: EXPECT_TRUE(b); step_++; return true; + case 6: EXPECT_FALSE(b); step_++; return true; + default: ADD_FAILURE(); return false; + } + } + bool Int(int i) { + switch(step_) { + case 10: EXPECT_EQ(123, i); step_++; return true; + case 15: EXPECT_EQ(1, i); step_++; return true; + case 16: EXPECT_EQ(2, i); step_++; return true; + case 17: EXPECT_EQ(3, i); step_++; return true; + default: ADD_FAILURE(); return false; + } + } + bool Uint(unsigned i) { return Int(static_cast(i)); } + bool Double(double d) { EXPECT_EQ(12u, step_); EXPECT_DOUBLE_EQ(3.1416, d); step_++; return true; } + bool String(const char* str, size_t, bool) { + switch(step_) { + case 1: EXPECT_STREQ("hello", str); step_++; return true; + case 2: EXPECT_STREQ("world", str); step_++; return true; + case 3: EXPECT_STREQ("t", str); step_++; return true; + case 5: EXPECT_STREQ("f", str); step_++; return true; + case 7: EXPECT_STREQ("n", str); step_++; return true; + case 9: EXPECT_STREQ("i", str); step_++; return true; + case 11: EXPECT_STREQ("pi", str); step_++; return true; + case 13: EXPECT_STREQ("a", str); step_++; return true; + default: ADD_FAILURE(); return false; + } + } + bool StartObject() { EXPECT_EQ(0u, step_); step_++; return true; } + bool EndObject(SizeType memberCount) { EXPECT_EQ(19u, step_); EXPECT_EQ(7u, memberCount); step_++; return true; } + bool StartArray() { EXPECT_EQ(14u, step_); step_++; return true; } + bool EndArray(SizeType elementCount) { EXPECT_EQ(18u, step_); EXPECT_EQ(3u, elementCount); step_++; return true; } + + unsigned step_; +}; + +TEST(Reader, ParseObject) { + const char* json = "{ \"hello\" : \"world\", \"t\" : true , \"f\" : false, \"n\": null, \"i\":123, \"pi\": 3.1416, \"a\":[1, 2, 3] } "; + + // Insitu + { + char* json2 = StrDup(json); + InsituStringStream s(json2); + ParseObjectHandler h; + Reader reader; + reader.Parse(s, h); + EXPECT_EQ(20u, h.step_); + free(json2); + } + + // Normal + { + StringStream s(json); + ParseObjectHandler h; + Reader reader; + reader.Parse(s, h); + EXPECT_EQ(20u, h.step_); + } +} + +struct ParseEmptyObjectHandler : BaseReaderHandler, ParseEmptyObjectHandler> { + ParseEmptyObjectHandler() : step_(0) {} + + bool Default() { ADD_FAILURE(); return false; } + bool StartObject() { EXPECT_EQ(0u, step_); step_++; return true; } + bool EndObject(SizeType) { EXPECT_EQ(1u, step_); step_++; return true; } + + unsigned step_; +}; + +TEST(Reader, Parse_EmptyObject) { + StringStream s("{ } "); + ParseEmptyObjectHandler h; + Reader reader; + reader.Parse(s, h); + EXPECT_EQ(2u, h.step_); +} + +struct ParseMultipleRootHandler : BaseReaderHandler, ParseMultipleRootHandler> { + ParseMultipleRootHandler() : step_(0) {} + + bool Default() { ADD_FAILURE(); return false; } + bool StartObject() { EXPECT_EQ(0u, step_); step_++; return true; } + bool EndObject(SizeType) { EXPECT_EQ(1u, step_); step_++; return true; } + bool StartArray() { EXPECT_EQ(2u, step_); step_++; return true; } + bool EndArray(SizeType) { EXPECT_EQ(3u, step_); step_++; return true; } + + unsigned step_; +}; + +template +void TestMultipleRoot() { + StringStream s("{}[] a"); + ParseMultipleRootHandler h; + Reader reader; + EXPECT_TRUE(reader.Parse(s, h)); + EXPECT_EQ(2u, h.step_); + EXPECT_TRUE(reader.Parse(s, h)); + EXPECT_EQ(4u, h.step_); + EXPECT_EQ(' ', s.Take()); + EXPECT_EQ('a', s.Take()); +} + +TEST(Reader, Parse_MultipleRoot) { + TestMultipleRoot(); +} + +TEST(Reader, ParseIterative_MultipleRoot) { + TestMultipleRoot(); +} + +template +void TestInsituMultipleRoot() { + char* buffer = strdup("{}[] a"); + InsituStringStream s(buffer); + ParseMultipleRootHandler h; + Reader reader; + EXPECT_TRUE(reader.Parse(s, h)); + EXPECT_EQ(2u, h.step_); + EXPECT_TRUE(reader.Parse(s, h)); + EXPECT_EQ(4u, h.step_); + EXPECT_EQ(' ', s.Take()); + EXPECT_EQ('a', s.Take()); + free(buffer); +} + +TEST(Reader, ParseInsitu_MultipleRoot) { + TestInsituMultipleRoot(); +} + +TEST(Reader, ParseInsituIterative_MultipleRoot) { + TestInsituMultipleRoot(); +} + +#define TEST_ERROR(errorCode, str, errorOffset) \ + { \ + unsigned streamPos = errorOffset; \ + char buffer[1001]; \ + strncpy(buffer, str, 1000); \ + InsituStringStream s(buffer); \ + BaseReaderHandler<> h; \ + Reader reader; \ + EXPECT_FALSE(reader.Parse(s, h)); \ + EXPECT_EQ(errorCode, reader.GetParseErrorCode());\ + EXPECT_EQ(errorOffset, reader.GetErrorOffset());\ + EXPECT_EQ(streamPos, s.Tell());\ + } + +TEST(Reader, ParseDocument_Error) { + // The document is empty. + TEST_ERROR(kParseErrorDocumentEmpty, "", 0u); + TEST_ERROR(kParseErrorDocumentEmpty, " ", 1u); + TEST_ERROR(kParseErrorDocumentEmpty, " \n", 2u); + + // The document root must not follow by other values. + TEST_ERROR(kParseErrorDocumentRootNotSingular, "[] 0", 3u); + TEST_ERROR(kParseErrorDocumentRootNotSingular, "{} 0", 3u); + TEST_ERROR(kParseErrorDocumentRootNotSingular, "null []", 5u); + TEST_ERROR(kParseErrorDocumentRootNotSingular, "0 {}", 2u); +} + +TEST(Reader, ParseValue_Error) { + // Invalid value. + TEST_ERROR(kParseErrorValueInvalid, "nulL", 3u); + TEST_ERROR(kParseErrorValueInvalid, "truE", 3u); + TEST_ERROR(kParseErrorValueInvalid, "falsE", 4u); + TEST_ERROR(kParseErrorValueInvalid, "a]", 0u); + TEST_ERROR(kParseErrorValueInvalid, ".1", 0u); +} + +TEST(Reader, ParseObject_Error) { + // Missing a name for object member. + TEST_ERROR(kParseErrorObjectMissName, "{1}", 1u); + TEST_ERROR(kParseErrorObjectMissName, "{:1}", 1u); + TEST_ERROR(kParseErrorObjectMissName, "{null:1}", 1u); + TEST_ERROR(kParseErrorObjectMissName, "{true:1}", 1u); + TEST_ERROR(kParseErrorObjectMissName, "{false:1}", 1u); + TEST_ERROR(kParseErrorObjectMissName, "{1:1}", 1u); + TEST_ERROR(kParseErrorObjectMissName, "{[]:1}", 1u); + TEST_ERROR(kParseErrorObjectMissName, "{{}:1}", 1u); + TEST_ERROR(kParseErrorObjectMissName, "{xyz:1}", 1u); + + // Missing a colon after a name of object member. + TEST_ERROR(kParseErrorObjectMissColon, "{\"a\" 1}", 5u); + TEST_ERROR(kParseErrorObjectMissColon, "{\"a\",1}", 4u); + + // Must be a comma or '}' after an object member + TEST_ERROR(kParseErrorObjectMissCommaOrCurlyBracket, "{\"a\":1]", 6u); + + // Object cannot have a trailing comma (without kParseTrailingCommasFlag); + // an object member name must follow a comma + TEST_ERROR(kParseErrorObjectMissName, "{\"a\":1,}", 7u); + + // This tests that MemoryStream is checking the length in Peek(). + { + MemoryStream ms("{\"a\"", 1); + BaseReaderHandler<> h; + Reader reader; + EXPECT_FALSE(reader.Parse(ms, h)); + EXPECT_EQ(kParseErrorObjectMissName, reader.GetParseErrorCode()); + } +} + +#undef TEST_ERROR + +TEST(Reader, SkipWhitespace) { + StringStream ss(" A \t\tB\n \n\nC\r\r \rD \t\n\r E"); + const char* expected = "ABCDE"; + for (size_t i = 0; i < 5; i++) { + SkipWhitespace(ss); + EXPECT_EQ(expected[i], ss.Take()); + } +} + +// Test implementing a stream without copy stream optimization. +// Clone from GenericStringStream except that copy constructor is disabled. +template +class CustomStringStream { +public: + typedef typename Encoding::Ch Ch; + + CustomStringStream(const Ch *src) : src_(src), head_(src) {} + + Ch Peek() const { return *src_; } + Ch Take() { return *src_++; } + size_t Tell() const { return static_cast(src_ - head_); } + + Ch* PutBegin() { RAPIDJSON_ASSERT(false); return 0; } + void Put(Ch) { RAPIDJSON_ASSERT(false); } + void Flush() { RAPIDJSON_ASSERT(false); } + size_t PutEnd(Ch*) { RAPIDJSON_ASSERT(false); return 0; } + +private: + // Prohibit copy constructor & assignment operator. + CustomStringStream(const CustomStringStream&); + CustomStringStream& operator=(const CustomStringStream&); + + const Ch* src_; //!< Current read position. + const Ch* head_; //!< Original head of the string. +}; + +// If the following code is compiled, it should generate compilation error as predicted. +// Because CustomStringStream<> is not copyable via making copy constructor private. +#if 0 +namespace rapidjson { + +template +struct StreamTraits > { + enum { copyOptimization = 1 }; +}; + +} // namespace rapidjson +#endif + +TEST(Reader, CustomStringStream) { + const char* json = "{ \"hello\" : \"world\", \"t\" : true , \"f\" : false, \"n\": null, \"i\":123, \"pi\": 3.1416, \"a\":[1, 2, 3] } "; + CustomStringStream > s(json); + ParseObjectHandler h; + Reader reader; + reader.Parse(s, h); + EXPECT_EQ(20u, h.step_); +} + +#include + +class IStreamWrapper { +public: + typedef char Ch; + + IStreamWrapper(std::istream& is) : is_(is) {} + + Ch Peek() const { + int c = is_.peek(); + return c == std::char_traits::eof() ? '\0' : static_cast(c); + } + + Ch Take() { + int c = is_.get(); + return c == std::char_traits::eof() ? '\0' : static_cast(c); + } + + size_t Tell() const { return static_cast(is_.tellg()); } + + Ch* PutBegin() { assert(false); return 0; } + void Put(Ch) { assert(false); } + void Flush() { assert(false); } + size_t PutEnd(Ch*) { assert(false); return 0; } + +private: + IStreamWrapper(const IStreamWrapper&); + IStreamWrapper& operator=(const IStreamWrapper&); + + std::istream& is_; +}; + +class WIStreamWrapper { +public: + typedef wchar_t Ch; + + WIStreamWrapper(std::wistream& is) : is_(is) {} + + Ch Peek() const { + unsigned c = is_.peek(); + return c == std::char_traits::eof() ? Ch('\0') : static_cast(c); + } + + Ch Take() { + unsigned c = is_.get(); + return c == std::char_traits::eof() ? Ch('\0') : static_cast(c); + } + + size_t Tell() const { return static_cast(is_.tellg()); } + + Ch* PutBegin() { assert(false); return 0; } + void Put(Ch) { assert(false); } + void Flush() { assert(false); } + size_t PutEnd(Ch*) { assert(false); return 0; } + +private: + WIStreamWrapper(const WIStreamWrapper&); + WIStreamWrapper& operator=(const WIStreamWrapper&); + + std::wistream& is_; +}; + +TEST(Reader, Parse_IStreamWrapper_StringStream) { + const char* json = "[1,2,3,4]"; + + std::stringstream ss(json); + IStreamWrapper is(ss); + + Reader reader; + ParseArrayHandler<4> h; + reader.Parse(is, h); + EXPECT_FALSE(reader.HasParseError()); +} + +// Test iterative parsing. + +#define TESTERRORHANDLING(text, errorCode, offset)\ +{\ + unsigned streamPos = offset; \ + StringStream json(text); \ + BaseReaderHandler<> handler; \ + Reader reader; \ + reader.Parse(json, handler); \ + EXPECT_TRUE(reader.HasParseError()); \ + EXPECT_EQ(errorCode, reader.GetParseErrorCode()); \ + EXPECT_EQ(offset, reader.GetErrorOffset()); \ + EXPECT_EQ(streamPos, json.Tell()); \ +} + +TEST(Reader, IterativeParsing_ErrorHandling) { + TESTERRORHANDLING("{\"a\": a}", kParseErrorValueInvalid, 6u); + + TESTERRORHANDLING("", kParseErrorDocumentEmpty, 0u); + TESTERRORHANDLING("{}{}", kParseErrorDocumentRootNotSingular, 2u); + + TESTERRORHANDLING("{1}", kParseErrorObjectMissName, 1u); + TESTERRORHANDLING("{\"a\", 1}", kParseErrorObjectMissColon, 4u); + TESTERRORHANDLING("{\"a\"}", kParseErrorObjectMissColon, 4u); + TESTERRORHANDLING("{\"a\": 1", kParseErrorObjectMissCommaOrCurlyBracket, 7u); + TESTERRORHANDLING("[1 2 3]", kParseErrorArrayMissCommaOrSquareBracket, 3u); + TESTERRORHANDLING("{\"a: 1", kParseErrorStringMissQuotationMark, 6u); + TESTERRORHANDLING("{\"a\":}", kParseErrorValueInvalid, 5u); + TESTERRORHANDLING("{\"a\":]", kParseErrorValueInvalid, 5u); + TESTERRORHANDLING("[1,2,}", kParseErrorValueInvalid, 5u); + TESTERRORHANDLING("[}]", kParseErrorValueInvalid, 1u); + TESTERRORHANDLING("[,]", kParseErrorValueInvalid, 1u); + TESTERRORHANDLING("[1,,]", kParseErrorValueInvalid, 3u); + + // Trailing commas are not allowed without kParseTrailingCommasFlag + TESTERRORHANDLING("{\"a\": 1,}", kParseErrorObjectMissName, 8u); + TESTERRORHANDLING("[1,2,3,]", kParseErrorValueInvalid, 7u); + + // Any JSON value can be a valid root element in RFC7159. + TESTERRORHANDLING("\"ab", kParseErrorStringMissQuotationMark, 3u); + TESTERRORHANDLING("truE", kParseErrorValueInvalid, 3u); + TESTERRORHANDLING("False", kParseErrorValueInvalid, 0u); + TESTERRORHANDLING("true, false", kParseErrorDocumentRootNotSingular, 4u); + TESTERRORHANDLING("false, false", kParseErrorDocumentRootNotSingular, 5u); + TESTERRORHANDLING("nulL", kParseErrorValueInvalid, 3u); + TESTERRORHANDLING("null , null", kParseErrorDocumentRootNotSingular, 5u); + TESTERRORHANDLING("1a", kParseErrorDocumentRootNotSingular, 1u); +} + +template > +struct IterativeParsingReaderHandler { + typedef typename Encoding::Ch Ch; + + const static uint32_t LOG_NULL = 0x10000000; + const static uint32_t LOG_BOOL = 0x20000000; + const static uint32_t LOG_INT = 0x30000000; + const static uint32_t LOG_UINT = 0x40000000; + const static uint32_t LOG_INT64 = 0x50000000; + const static uint32_t LOG_UINT64 = 0x60000000; + const static uint32_t LOG_DOUBLE = 0x70000000; + const static uint32_t LOG_STRING = 0x80000000; + const static uint32_t LOG_STARTOBJECT = 0x90000000; + const static uint32_t LOG_KEY = 0xA0000000; + const static uint32_t LOG_ENDOBJECT = 0xB0000000; + const static uint32_t LOG_STARTARRAY = 0xC0000000; + const static uint32_t LOG_ENDARRAY = 0xD0000000; + + const static size_t LogCapacity = 256; + uint32_t Logs[LogCapacity]; + size_t LogCount; + + IterativeParsingReaderHandler() : LogCount(0) { + } + + bool Null() { RAPIDJSON_ASSERT(LogCount < LogCapacity); Logs[LogCount++] = LOG_NULL; return true; } + + bool Bool(bool) { RAPIDJSON_ASSERT(LogCount < LogCapacity); Logs[LogCount++] = LOG_BOOL; return true; } + + bool Int(int) { RAPIDJSON_ASSERT(LogCount < LogCapacity); Logs[LogCount++] = LOG_INT; return true; } + + bool Uint(unsigned) { RAPIDJSON_ASSERT(LogCount < LogCapacity); Logs[LogCount++] = LOG_INT; return true; } + + bool Int64(int64_t) { RAPIDJSON_ASSERT(LogCount < LogCapacity); Logs[LogCount++] = LOG_INT64; return true; } + + bool Uint64(uint64_t) { RAPIDJSON_ASSERT(LogCount < LogCapacity); Logs[LogCount++] = LOG_UINT64; return true; } + + bool Double(double) { RAPIDJSON_ASSERT(LogCount < LogCapacity); Logs[LogCount++] = LOG_DOUBLE; return true; } + + bool RawNumber(const Ch*, SizeType, bool) { RAPIDJSON_ASSERT(LogCount < LogCapacity); Logs[LogCount++] = LOG_STRING; return true; } + + bool String(const Ch*, SizeType, bool) { RAPIDJSON_ASSERT(LogCount < LogCapacity); Logs[LogCount++] = LOG_STRING; return true; } + + bool StartObject() { RAPIDJSON_ASSERT(LogCount < LogCapacity); Logs[LogCount++] = LOG_STARTOBJECT; return true; } + + bool Key (const Ch*, SizeType, bool) { RAPIDJSON_ASSERT(LogCount < LogCapacity); Logs[LogCount++] = LOG_KEY; return true; } + + bool EndObject(SizeType c) { + RAPIDJSON_ASSERT(LogCount < LogCapacity); + RAPIDJSON_ASSERT((static_cast(c) & 0xF0000000) == 0); + Logs[LogCount++] = LOG_ENDOBJECT | static_cast(c); + return true; + } + + bool StartArray() { RAPIDJSON_ASSERT(LogCount < LogCapacity); Logs[LogCount++] = LOG_STARTARRAY; return true; } + + bool EndArray(SizeType c) { + RAPIDJSON_ASSERT(LogCount < LogCapacity); + RAPIDJSON_ASSERT((static_cast(c) & 0xF0000000) == 0); + Logs[LogCount++] = LOG_ENDARRAY | static_cast(c); + return true; + } +}; + +TEST(Reader, IterativeParsing_General) { + { + StringStream is("[1, {\"k\": [1, 2]}, null, false, true, \"string\", 1.2]"); + Reader reader; + IterativeParsingReaderHandler<> handler; + + ParseResult r = reader.Parse(is, handler); + + EXPECT_FALSE(r.IsError()); + EXPECT_FALSE(reader.HasParseError()); + + uint32_t e[] = { + handler.LOG_STARTARRAY, + handler.LOG_INT, + handler.LOG_STARTOBJECT, + handler.LOG_KEY, + handler.LOG_STARTARRAY, + handler.LOG_INT, + handler.LOG_INT, + handler.LOG_ENDARRAY | 2, + handler.LOG_ENDOBJECT | 1, + handler.LOG_NULL, + handler.LOG_BOOL, + handler.LOG_BOOL, + handler.LOG_STRING, + handler.LOG_DOUBLE, + handler.LOG_ENDARRAY | 7 + }; + + EXPECT_EQ(sizeof(e) / sizeof(int), handler.LogCount); + + for (size_t i = 0; i < handler.LogCount; ++i) { + EXPECT_EQ(e[i], handler.Logs[i]) << "i = " << i; + } + } +} + +TEST(Reader, IterativeParsing_Count) { + { + StringStream is("[{}, {\"k\": 1}, [1], []]"); + Reader reader; + IterativeParsingReaderHandler<> handler; + + ParseResult r = reader.Parse(is, handler); + + EXPECT_FALSE(r.IsError()); + EXPECT_FALSE(reader.HasParseError()); + + uint32_t e[] = { + handler.LOG_STARTARRAY, + handler.LOG_STARTOBJECT, + handler.LOG_ENDOBJECT | 0, + handler.LOG_STARTOBJECT, + handler.LOG_KEY, + handler.LOG_INT, + handler.LOG_ENDOBJECT | 1, + handler.LOG_STARTARRAY, + handler.LOG_INT, + handler.LOG_ENDARRAY | 1, + handler.LOG_STARTARRAY, + handler.LOG_ENDARRAY | 0, + handler.LOG_ENDARRAY | 4 + }; + + EXPECT_EQ(sizeof(e) / sizeof(int), handler.LogCount); + + for (size_t i = 0; i < handler.LogCount; ++i) { + EXPECT_EQ(e[i], handler.Logs[i]) << "i = " << i; + } + } +} + +TEST(Reader, IterativePullParsing_General) { + { + IterativeParsingReaderHandler<> handler; + uint32_t e[] = { + handler.LOG_STARTARRAY, + handler.LOG_INT, + handler.LOG_STARTOBJECT, + handler.LOG_KEY, + handler.LOG_STARTARRAY, + handler.LOG_INT, + handler.LOG_INT, + handler.LOG_ENDARRAY | 2, + handler.LOG_ENDOBJECT | 1, + handler.LOG_NULL, + handler.LOG_BOOL, + handler.LOG_BOOL, + handler.LOG_STRING, + handler.LOG_DOUBLE, + handler.LOG_ENDARRAY | 7 + }; + + StringStream is("[1, {\"k\": [1, 2]}, null, false, true, \"string\", 1.2]"); + Reader reader; + + reader.IterativeParseInit(); + while (!reader.IterativeParseComplete()) { + size_t oldLogCount = handler.LogCount; + EXPECT_TRUE(oldLogCount < sizeof(e) / sizeof(int)) << "overrun"; + + EXPECT_TRUE(reader.IterativeParseNext(is, handler)) << "parse fail"; + EXPECT_EQ(handler.LogCount, oldLogCount + 1) << "handler should be invoked exactly once each time"; + EXPECT_EQ(e[oldLogCount], handler.Logs[oldLogCount]) << "wrong event returned"; + } + + EXPECT_FALSE(reader.HasParseError()); + EXPECT_EQ(sizeof(e) / sizeof(int), handler.LogCount) << "handler invoked wrong number of times"; + + // The handler should not be invoked when the JSON has been fully read, but it should not fail + size_t oldLogCount = handler.LogCount; + EXPECT_TRUE(reader.IterativeParseNext(is, handler)) << "parse-next past complete is allowed"; + EXPECT_EQ(handler.LogCount, oldLogCount) << "parse-next past complete should not invoke handler"; + EXPECT_FALSE(reader.HasParseError()) << "parse-next past complete should not generate parse error"; + } +} + +// Test iterative parsing on kParseErrorTermination. +struct HandlerTerminateAtStartObject : public IterativeParsingReaderHandler<> { + bool StartObject() { return false; } +}; + +struct HandlerTerminateAtStartArray : public IterativeParsingReaderHandler<> { + bool StartArray() { return false; } +}; + +struct HandlerTerminateAtEndObject : public IterativeParsingReaderHandler<> { + bool EndObject(SizeType) { return false; } +}; + +struct HandlerTerminateAtEndArray : public IterativeParsingReaderHandler<> { + bool EndArray(SizeType) { return false; } +}; + +TEST(Reader, IterativeParsing_ShortCircuit) { + { + HandlerTerminateAtStartObject handler; + Reader reader; + StringStream is("[1, {}]"); + + ParseResult r = reader.Parse(is, handler); + + EXPECT_TRUE(reader.HasParseError()); + EXPECT_EQ(kParseErrorTermination, r.Code()); + EXPECT_EQ(4u, r.Offset()); + } + + { + HandlerTerminateAtStartArray handler; + Reader reader; + StringStream is("{\"a\": []}"); + + ParseResult r = reader.Parse(is, handler); + + EXPECT_TRUE(reader.HasParseError()); + EXPECT_EQ(kParseErrorTermination, r.Code()); + EXPECT_EQ(6u, r.Offset()); + } + + { + HandlerTerminateAtEndObject handler; + Reader reader; + StringStream is("[1, {}]"); + + ParseResult r = reader.Parse(is, handler); + + EXPECT_TRUE(reader.HasParseError()); + EXPECT_EQ(kParseErrorTermination, r.Code()); + EXPECT_EQ(5u, r.Offset()); + } + + { + HandlerTerminateAtEndArray handler; + Reader reader; + StringStream is("{\"a\": []}"); + + ParseResult r = reader.Parse(is, handler); + + EXPECT_TRUE(reader.HasParseError()); + EXPECT_EQ(kParseErrorTermination, r.Code()); + EXPECT_EQ(7u, r.Offset()); + } +} + +// For covering BaseReaderHandler default functions +TEST(Reader, BaseReaderHandler_Default) { + BaseReaderHandler<> h; + Reader reader; + StringStream is("[null, true, -1, 1, -1234567890123456789, 1234567890123456789, 3.14, \"s\", { \"a\" : 1 }]"); + EXPECT_TRUE(reader.Parse(is, h)); +} + +template +struct TerminateHandler { + bool Null() { return e != 0; } + bool Bool(bool) { return e != 1; } + bool Int(int) { return e != 2; } + bool Uint(unsigned) { return e != 3; } + bool Int64(int64_t) { return e != 4; } + bool Uint64(uint64_t) { return e != 5; } + bool Double(double) { return e != 6; } + bool RawNumber(const char*, SizeType, bool) { return e != 7; } + bool String(const char*, SizeType, bool) { return e != 8; } + bool StartObject() { return e != 9; } + bool Key(const char*, SizeType, bool) { return e != 10; } + bool EndObject(SizeType) { return e != 11; } + bool StartArray() { return e != 12; } + bool EndArray(SizeType) { return e != 13; } +}; + +#define TEST_TERMINATION(e, json)\ +{\ + Reader reader;\ + TerminateHandler h;\ + StringStream is(json);\ + EXPECT_FALSE(reader.Parse(is, h));\ + EXPECT_EQ(kParseErrorTermination, reader.GetParseErrorCode());\ +} + +TEST(Reader, ParseTerminationByHandler) { + TEST_TERMINATION(0, "[null"); + TEST_TERMINATION(1, "[true"); + TEST_TERMINATION(1, "[false"); + TEST_TERMINATION(2, "[-1"); + TEST_TERMINATION(3, "[1"); + TEST_TERMINATION(4, "[-1234567890123456789"); + TEST_TERMINATION(5, "[1234567890123456789"); + TEST_TERMINATION(6, "[0.5]"); + // RawNumber() is never called + TEST_TERMINATION(8, "[\"a\""); + TEST_TERMINATION(9, "[{"); + TEST_TERMINATION(10, "[{\"a\""); + TEST_TERMINATION(11, "[{}"); + TEST_TERMINATION(11, "[{\"a\":1}"); // non-empty object + TEST_TERMINATION(12, "{\"a\":["); + TEST_TERMINATION(13, "{\"a\":[]"); + TEST_TERMINATION(13, "{\"a\":[1]"); // non-empty array +} + +TEST(Reader, ParseComments) { + const char* json = + "// Here is a one-line comment.\n" + "{// And here's another one\n" + " /*And here's an in-line one.*/\"hello\" : \"world\"," + " \"t\" :/* And one with '*' symbol*/true ," + "/* A multiline comment\n" + " goes here*/" + " \"f\" : false, \"n\": null, \"i\":123, \"pi\": 3.1416, \"a\":[1, 2, 3]" + "}/*And the last one to be sure */"; + + StringStream s(json); + ParseObjectHandler h; + Reader reader; + EXPECT_TRUE(reader.Parse(s, h)); + EXPECT_EQ(20u, h.step_); +} + +TEST(Reader, ParseEmptyInlineComment) { + const char* json = "{/**/\"hello\" : \"world\", \"t\" : true, \"f\" : false, \"n\": null, \"i\":123, \"pi\": 3.1416, \"a\":[1, 2, 3] }"; + + StringStream s(json); + ParseObjectHandler h; + Reader reader; + EXPECT_TRUE(reader.Parse(s, h)); + EXPECT_EQ(20u, h.step_); +} + +TEST(Reader, ParseEmptyOnelineComment) { + const char* json = "{//\n\"hello\" : \"world\", \"t\" : true, \"f\" : false, \"n\": null, \"i\":123, \"pi\": 3.1416, \"a\":[1, 2, 3] }"; + + StringStream s(json); + ParseObjectHandler h; + Reader reader; + EXPECT_TRUE(reader.Parse(s, h)); + EXPECT_EQ(20u, h.step_); +} + +TEST(Reader, ParseMultipleCommentsInARow) { + const char* json = + "{/* first comment *//* second */\n" + "/* third */ /*fourth*/// last one\n" + "\"hello\" : \"world\", \"t\" : true, \"f\" : false, \"n\": null, \"i\":123, \"pi\": 3.1416, \"a\":[1, 2, 3] }"; + + StringStream s(json); + ParseObjectHandler h; + Reader reader; + EXPECT_TRUE(reader.Parse(s, h)); + EXPECT_EQ(20u, h.step_); +} + +TEST(Reader, InlineCommentsAreDisabledByDefault) { + { + const char* json = "{/* Inline comment. */\"hello\" : \"world\", \"t\" : true, \"f\" : false, \"n\": null, \"i\":123, \"pi\": 3.1416, \"a\":[1, 2, 3] }"; + + StringStream s(json); + ParseObjectHandler h; + Reader reader; + EXPECT_FALSE(reader.Parse(s, h)); + } + + { + const char* json = + "{\"hello\" : /* Multiline comment starts here\n" + " continues here\n" + " and ends here */\"world\", \"t\" :true , \"f\" : false, \"n\": null, \"i\":123, \"pi\": 3.1416, \"a\":[1, 2, 3] }"; + + StringStream s(json); + ParseObjectHandler h; + Reader reader; + EXPECT_FALSE(reader.Parse(s, h)); + } +} + +TEST(Reader, OnelineCommentsAreDisabledByDefault) { + const char* json = "{// One-line comment\n\"hello\" : \"world\", \"t\" : true , \"f\" : false, \"n\": null, \"i\":123, \"pi\": 3.1416, \"a\":[1, 2, 3] }"; + + StringStream s(json); + ParseObjectHandler h; + Reader reader; + EXPECT_FALSE(reader.Parse(s, h)); +} + +TEST(Reader, EofAfterOneLineComment) { + const char* json = "{\"hello\" : \"world\" // EOF is here -->\0 \n}"; + + StringStream s(json); + ParseObjectHandler h; + Reader reader; + EXPECT_FALSE(reader.Parse(s, h)); + EXPECT_EQ(kParseErrorObjectMissCommaOrCurlyBracket, reader.GetParseErrorCode()); +} + +TEST(Reader, IncompleteMultilineComment) { + const char* json = "{\"hello\" : \"world\" /* EOF is here -->\0 */}"; + + StringStream s(json); + ParseObjectHandler h; + Reader reader; + EXPECT_FALSE(reader.Parse(s, h)); + EXPECT_EQ(kParseErrorUnspecificSyntaxError, reader.GetParseErrorCode()); +} + +TEST(Reader, IncompleteMultilineComment2) { + const char* json = "{\"hello\" : \"world\" /* *\0 */}"; + + StringStream s(json); + ParseObjectHandler h; + Reader reader; + EXPECT_FALSE(reader.Parse(s, h)); + EXPECT_EQ(kParseErrorUnspecificSyntaxError, reader.GetParseErrorCode()); +} + +TEST(Reader, UnrecognizedComment) { + const char* json = "{\"hello\" : \"world\" /! }"; + + StringStream s(json); + ParseObjectHandler h; + Reader reader; + EXPECT_FALSE(reader.Parse(s, h)); + EXPECT_EQ(kParseErrorUnspecificSyntaxError, reader.GetParseErrorCode()); +} + +struct NumbersAsStringsHandler { + bool Null() { return true; } + bool Bool(bool) { return true; } + bool Int(int) { return true; } + bool Uint(unsigned) { return true; } + bool Int64(int64_t) { return true; } + bool Uint64(uint64_t) { return true; } + bool Double(double) { return true; } + // 'str' is not null-terminated + bool RawNumber(const char* str, SizeType length, bool) { + EXPECT_TRUE(str != 0); + EXPECT_TRUE(expected_len_ == length); + EXPECT_TRUE(strncmp(str, expected_, length) == 0); + return true; + } + bool String(const char*, SizeType, bool) { return true; } + bool StartObject() { return true; } + bool Key(const char*, SizeType, bool) { return true; } + bool EndObject(SizeType) { return true; } + bool StartArray() { return true; } + bool EndArray(SizeType) { return true; } + + NumbersAsStringsHandler(const char* expected) + : expected_(expected) + , expected_len_(strlen(expected)) {} + + const char* expected_; + size_t expected_len_; +}; + +TEST(Reader, NumbersAsStrings) { + { + const char* json = "{ \"pi\": 3.1416 } "; + StringStream s(json); + NumbersAsStringsHandler h("3.1416"); + Reader reader; + EXPECT_TRUE(reader.Parse(s, h)); + } + { + char* json = StrDup("{ \"pi\": 3.1416 } "); + InsituStringStream s(json); + NumbersAsStringsHandler h("3.1416"); + Reader reader; + EXPECT_TRUE(reader.Parse(s, h)); + free(json); + } + { + const char* json = "{ \"gigabyte\": 1.0e9 } "; + StringStream s(json); + NumbersAsStringsHandler h("1.0e9"); + Reader reader; + EXPECT_TRUE(reader.Parse(s, h)); + } + { + char* json = StrDup("{ \"gigabyte\": 1.0e9 } "); + InsituStringStream s(json); + NumbersAsStringsHandler h("1.0e9"); + Reader reader; + EXPECT_TRUE(reader.Parse(s, h)); + free(json); + } + { + const char* json = "{ \"pi\": 314.159e-2 } "; + StringStream s(json); + NumbersAsStringsHandler h("314.159e-2"); + Reader reader; + EXPECT_TRUE(reader.Parse(s, h)); + } + { + char* json = StrDup("{ \"gigabyte\": 314.159e-2 } "); + InsituStringStream s(json); + NumbersAsStringsHandler h("314.159e-2"); + Reader reader; + EXPECT_TRUE(reader.Parse(s, h)); + free(json); + } + { + const char* json = "{ \"negative\": -1.54321 } "; + StringStream s(json); + NumbersAsStringsHandler h("-1.54321"); + Reader reader; + EXPECT_TRUE(reader.Parse(s, h)); + } + { + char* json = StrDup("{ \"negative\": -1.54321 } "); + InsituStringStream s(json); + NumbersAsStringsHandler h("-1.54321"); + Reader reader; + EXPECT_TRUE(reader.Parse(s, h)); + free(json); + } + { + const char* json = "{ \"pi\": 314.159e-2 } "; + std::stringstream ss(json); + IStreamWrapper s(ss); + NumbersAsStringsHandler h("314.159e-2"); + Reader reader; + EXPECT_TRUE(reader.Parse(s, h)); + } + { + char n1e319[321]; // '1' followed by 319 '0' + n1e319[0] = '1'; + for (int i = 1; i < 320; i++) + n1e319[i] = '0'; + n1e319[320] = '\0'; + StringStream s(n1e319); + NumbersAsStringsHandler h(n1e319); + Reader reader; + EXPECT_TRUE(reader.Parse(s, h)); + } +} + +struct NumbersAsStringsHandlerWChar_t { + bool Null() { return true; } + bool Bool(bool) { return true; } + bool Int(int) { return true; } + bool Uint(unsigned) { return true; } + bool Int64(int64_t) { return true; } + bool Uint64(uint64_t) { return true; } + bool Double(double) { return true; } + // 'str' is not null-terminated + bool RawNumber(const wchar_t* str, SizeType length, bool) { + EXPECT_TRUE(str != 0); + EXPECT_TRUE(expected_len_ == length); + EXPECT_TRUE(wcsncmp(str, expected_, length) == 0); + return true; + } + bool String(const wchar_t*, SizeType, bool) { return true; } + bool StartObject() { return true; } + bool Key(const wchar_t*, SizeType, bool) { return true; } + bool EndObject(SizeType) { return true; } + bool StartArray() { return true; } + bool EndArray(SizeType) { return true; } + + NumbersAsStringsHandlerWChar_t(const wchar_t* expected) + : expected_(expected) + , expected_len_(wcslen(expected)) {} + + const wchar_t* expected_; + size_t expected_len_; +}; + +TEST(Reader, NumbersAsStringsWChar_t) { + { + const wchar_t* json = L"{ \"pi\": 3.1416 } "; + GenericStringStream > s(json); + NumbersAsStringsHandlerWChar_t h(L"3.1416"); + GenericReader, UTF16<> > reader; + EXPECT_TRUE(reader.Parse(s, h)); + } + { + wchar_t* json = StrDup(L"{ \"pi\": 3.1416 } "); + GenericInsituStringStream > s(json); + NumbersAsStringsHandlerWChar_t h(L"3.1416"); + GenericReader, UTF16<> > reader; + EXPECT_TRUE(reader.Parse(s, h)); + free(json); + } + { + const wchar_t* json = L"{ \"gigabyte\": 1.0e9 } "; + GenericStringStream > s(json); + NumbersAsStringsHandlerWChar_t h(L"1.0e9"); + GenericReader, UTF16<> > reader; + EXPECT_TRUE(reader.Parse(s, h)); + } + { + wchar_t* json = StrDup(L"{ \"gigabyte\": 1.0e9 } "); + GenericInsituStringStream > s(json); + NumbersAsStringsHandlerWChar_t h(L"1.0e9"); + GenericReader, UTF16<> > reader; + EXPECT_TRUE(reader.Parse(s, h)); + free(json); + } + { + const wchar_t* json = L"{ \"pi\": 314.159e-2 } "; + GenericStringStream > s(json); + NumbersAsStringsHandlerWChar_t h(L"314.159e-2"); + GenericReader, UTF16<> > reader; + EXPECT_TRUE(reader.Parse(s, h)); + } + { + wchar_t* json = StrDup(L"{ \"gigabyte\": 314.159e-2 } "); + GenericInsituStringStream > s(json); + NumbersAsStringsHandlerWChar_t h(L"314.159e-2"); + GenericReader, UTF16<> > reader; + EXPECT_TRUE(reader.Parse(s, h)); + free(json); + } + { + const wchar_t* json = L"{ \"negative\": -1.54321 } "; + GenericStringStream > s(json); + NumbersAsStringsHandlerWChar_t h(L"-1.54321"); + GenericReader, UTF16<> > reader; + EXPECT_TRUE(reader.Parse(s, h)); + } + { + wchar_t* json = StrDup(L"{ \"negative\": -1.54321 } "); + GenericInsituStringStream > s(json); + NumbersAsStringsHandlerWChar_t h(L"-1.54321"); + GenericReader, UTF16<> > reader; + EXPECT_TRUE(reader.Parse(s, h)); + free(json); + } + { + const wchar_t* json = L"{ \"pi\": 314.159e-2 } "; + std::wstringstream ss(json); + WIStreamWrapper s(ss); + NumbersAsStringsHandlerWChar_t h(L"314.159e-2"); + GenericReader, UTF16<> > reader; + EXPECT_TRUE(reader.Parse(s, h)); + } + { + wchar_t n1e319[321]; // '1' followed by 319 '0' + n1e319[0] = L'1'; + for(int i = 1; i < 320; i++) + n1e319[i] = L'0'; + n1e319[320] = L'\0'; + GenericStringStream > s(n1e319); + NumbersAsStringsHandlerWChar_t h(n1e319); + GenericReader, UTF16<> > reader; + EXPECT_TRUE(reader.Parse(s, h)); + } +} + +template +void TestTrailingCommas() { + { + StringStream s("[1,2,3,]"); + ParseArrayHandler<3> h; + Reader reader; + EXPECT_TRUE(reader.Parse(s, h)); + EXPECT_EQ(5u, h.step_); + } + { + const char* json = "{ \"hello\" : \"world\", \"t\" : true , \"f\" : false," + "\"n\": null, \"i\":123, \"pi\": 3.1416, \"a\":[1, 2, 3],}"; + StringStream s(json); + ParseObjectHandler h; + Reader reader; + EXPECT_TRUE(reader.Parse(s, h)); + EXPECT_EQ(20u, h.step_); + } + { + // whitespace around trailing commas + const char* json = "{ \"hello\" : \"world\", \"t\" : true , \"f\" : false," + "\"n\": null, \"i\":123, \"pi\": 3.1416, \"a\":[1, 2, 3\n,\n]\n,\n} "; + StringStream s(json); + ParseObjectHandler h; + Reader reader; + EXPECT_TRUE(reader.Parse(s, h)); + EXPECT_EQ(20u, h.step_); + } + { + // comments around trailing commas + const char* json = "{ \"hello\" : \"world\", \"t\" : true , \"f\" : false, \"n\": null," + "\"i\":123, \"pi\": 3.1416, \"a\":[1, 2, 3/*test*/,/*test*/]/*test*/,/*test*/}"; + StringStream s(json); + ParseObjectHandler h; + Reader reader; + EXPECT_TRUE(reader.Parse(s, h)); + EXPECT_EQ(20u, h.step_); + } +} + +TEST(Reader, TrailingCommas) { + TestTrailingCommas(); +} + +TEST(Reader, TrailingCommasIterative) { + TestTrailingCommas(); +} + +template +void TestMultipleTrailingCommaErrors() { + // only a single trailing comma is allowed. + { + StringStream s("[1,2,3,,]"); + ParseArrayHandler<3> h; + Reader reader; + ParseResult r = reader.Parse(s, h); + EXPECT_TRUE(reader.HasParseError()); + EXPECT_EQ(kParseErrorValueInvalid, r.Code()); + EXPECT_EQ(7u, r.Offset()); + } + { + const char* json = "{ \"hello\" : \"world\", \"t\" : true , \"f\" : false," + "\"n\": null, \"i\":123, \"pi\": 3.1416, \"a\":[1, 2, 3,],,}"; + StringStream s(json); + ParseObjectHandler h; + Reader reader; + ParseResult r = reader.Parse(s, h); + EXPECT_TRUE(reader.HasParseError()); + EXPECT_EQ(kParseErrorObjectMissName, r.Code()); + EXPECT_EQ(95u, r.Offset()); + } +} + +TEST(Reader, MultipleTrailingCommaErrors) { + TestMultipleTrailingCommaErrors(); +} + +TEST(Reader, MultipleTrailingCommaErrorsIterative) { + TestMultipleTrailingCommaErrors(); +} + +template +void TestEmptyExceptForCommaErrors() { + // not allowed even with trailing commas enabled; the + // trailing comma must follow a value. + { + StringStream s("[,]"); + ParseArrayHandler<3> h; + Reader reader; + ParseResult r = reader.Parse(s, h); + EXPECT_TRUE(reader.HasParseError()); + EXPECT_EQ(kParseErrorValueInvalid, r.Code()); + EXPECT_EQ(1u, r.Offset()); + } + { + StringStream s("{,}"); + ParseObjectHandler h; + Reader reader; + ParseResult r = reader.Parse(s, h); + EXPECT_TRUE(reader.HasParseError()); + EXPECT_EQ(kParseErrorObjectMissName, r.Code()); + EXPECT_EQ(1u, r.Offset()); + } +} + +TEST(Reader, EmptyExceptForCommaErrors) { + TestEmptyExceptForCommaErrors(); +} + +TEST(Reader, EmptyExceptForCommaErrorsIterative) { + TestEmptyExceptForCommaErrors(); +} + +template +void TestTrailingCommaHandlerTermination() { + { + HandlerTerminateAtEndArray h; + Reader reader; + StringStream s("[1,2,3,]"); + ParseResult r = reader.Parse(s, h); + EXPECT_TRUE(reader.HasParseError()); + EXPECT_EQ(kParseErrorTermination, r.Code()); + EXPECT_EQ(7u, r.Offset()); + } + { + HandlerTerminateAtEndObject h; + Reader reader; + StringStream s("{\"t\": true, \"f\": false,}"); + ParseResult r = reader.Parse(s, h); + EXPECT_TRUE(reader.HasParseError()); + EXPECT_EQ(kParseErrorTermination, r.Code()); + EXPECT_EQ(23u, r.Offset()); + } +} + +TEST(Reader, TrailingCommaHandlerTermination) { + TestTrailingCommaHandlerTermination(); +} + +TEST(Reader, TrailingCommaHandlerTerminationIterative) { + TestTrailingCommaHandlerTermination(); +} + +TEST(Reader, ParseNanAndInfinity) { +#define TEST_NAN_INF(str, x) \ + { \ + { \ + StringStream s(str); \ + ParseDoubleHandler h; \ + Reader reader; \ + ASSERT_EQ(kParseErrorNone, reader.Parse(s, h).Code()); \ + EXPECT_EQ(1u, h.step_); \ + internal::Double e(x), a(h.actual_); \ + EXPECT_EQ(e.IsNan(), a.IsNan()); \ + EXPECT_EQ(e.IsInf(), a.IsInf()); \ + if (!e.IsNan()) \ + EXPECT_EQ(e.Sign(), a.Sign()); \ + } \ + { \ + const char* json = "{ \"naninfdouble\": " str " } "; \ + StringStream s(json); \ + NumbersAsStringsHandler h(str); \ + Reader reader; \ + EXPECT_TRUE(reader.Parse(s, h)); \ + } \ + { \ + char* json = StrDup("{ \"naninfdouble\": " str " } "); \ + InsituStringStream s(json); \ + NumbersAsStringsHandler h(str); \ + Reader reader; \ + EXPECT_TRUE(reader.Parse(s, h)); \ + free(json); \ + } \ + } +#define TEST_NAN_INF_ERROR(errorCode, str, errorOffset) \ + { \ + unsigned streamPos = errorOffset; \ + char buffer[1001]; \ + strncpy(buffer, str, 1000); \ + InsituStringStream s(buffer); \ + BaseReaderHandler<> h; \ + Reader reader; \ + EXPECT_FALSE(reader.Parse(s, h)); \ + EXPECT_EQ(errorCode, reader.GetParseErrorCode());\ + EXPECT_EQ(errorOffset, reader.GetErrorOffset());\ + EXPECT_EQ(streamPos, s.Tell());\ + } + + double nan = std::numeric_limits::quiet_NaN(); + double inf = std::numeric_limits::infinity(); + + TEST_NAN_INF("NaN", nan); + TEST_NAN_INF("-NaN", nan); + TEST_NAN_INF("Inf", inf); + TEST_NAN_INF("Infinity", inf); + TEST_NAN_INF("-Inf", -inf); + TEST_NAN_INF("-Infinity", -inf); + TEST_NAN_INF_ERROR(kParseErrorValueInvalid, "NInf", 1u); + TEST_NAN_INF_ERROR(kParseErrorValueInvalid, "NaInf", 2u); + TEST_NAN_INF_ERROR(kParseErrorValueInvalid, "INan", 1u); + TEST_NAN_INF_ERROR(kParseErrorValueInvalid, "InNan", 2u); + TEST_NAN_INF_ERROR(kParseErrorValueInvalid, "nan", 1u); + TEST_NAN_INF_ERROR(kParseErrorValueInvalid, "-nan", 1u); + TEST_NAN_INF_ERROR(kParseErrorValueInvalid, "NAN", 1u); + TEST_NAN_INF_ERROR(kParseErrorValueInvalid, "-Infinty", 6u); + +#undef TEST_NAN_INF_ERROR +#undef TEST_NAN_INF +} + +TEST(Reader, EscapedApostrophe) { + const char json[] = " { \"foo\": \"bar\\'buzz\" } "; + + BaseReaderHandler<> h; + + { + StringStream s(json); + Reader reader; + ParseResult r = reader.Parse(s, h); + EXPECT_TRUE(reader.HasParseError()); + EXPECT_EQ(kParseErrorStringEscapeInvalid, r.Code()); + EXPECT_EQ(14u, r.Offset()); + } + + { + StringStream s(json); + Reader reader; + ParseResult r = reader.Parse(s, h); + EXPECT_FALSE(reader.HasParseError()); + EXPECT_EQ(kParseErrorNone, r.Code()); + EXPECT_EQ(0u, r.Offset()); + } +} + +RAPIDJSON_DIAG_POP diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/regextest.cpp b/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/regextest.cpp new file mode 100644 index 0000000000..a288622bc7 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/regextest.cpp @@ -0,0 +1,639 @@ +// Tencent is pleased to support the open source community by making RapidJSON available. +// +// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. +// +// Licensed under the MIT License (the "License"); you may not use this file except +// in compliance with the License. You may obtain a copy of the License at +// +// http://opensource.org/licenses/MIT +// +// Unless required by applicable law or agreed to in writing, software distributed +// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +// CONDITIONS OF ANY KIND, either express or implied. See the License for the +// specific language governing permissions and limitations under the License. + +#include "unittest.h" +#include "rapidjson/internal/regex.h" + +using namespace rapidjson::internal; + +TEST(Regex, Single) { + Regex re("a"); + ASSERT_TRUE(re.IsValid()); + RegexSearch rs(re); + EXPECT_TRUE(rs.Match("a")); + EXPECT_FALSE(rs.Match("")); + EXPECT_FALSE(rs.Match("b")); +} + +TEST(Regex, Concatenation) { + Regex re("abc"); + ASSERT_TRUE(re.IsValid()); + RegexSearch rs(re); + EXPECT_TRUE(rs.Match("abc")); + EXPECT_FALSE(rs.Match("")); + EXPECT_FALSE(rs.Match("a")); + EXPECT_FALSE(rs.Match("b")); + EXPECT_FALSE(rs.Match("ab")); + EXPECT_FALSE(rs.Match("abcd")); +} + +TEST(Regex, Alternation1) { + Regex re("abab|abbb"); + ASSERT_TRUE(re.IsValid()); + RegexSearch rs(re); + EXPECT_TRUE(rs.Match("abab")); + EXPECT_TRUE(rs.Match("abbb")); + EXPECT_FALSE(rs.Match("")); + EXPECT_FALSE(rs.Match("ab")); + EXPECT_FALSE(rs.Match("ababa")); + EXPECT_FALSE(rs.Match("abb")); + EXPECT_FALSE(rs.Match("abbbb")); +} + +TEST(Regex, Alternation2) { + Regex re("a|b|c"); + ASSERT_TRUE(re.IsValid()); + RegexSearch rs(re); + EXPECT_TRUE(rs.Match("a")); + EXPECT_TRUE(rs.Match("b")); + EXPECT_TRUE(rs.Match("c")); + EXPECT_FALSE(rs.Match("")); + EXPECT_FALSE(rs.Match("aa")); + EXPECT_FALSE(rs.Match("ab")); +} + +TEST(Regex, Parenthesis1) { + Regex re("(ab)c"); + ASSERT_TRUE(re.IsValid()); + RegexSearch rs(re); + EXPECT_TRUE(rs.Match("abc")); + EXPECT_FALSE(rs.Match("")); + EXPECT_FALSE(rs.Match("a")); + EXPECT_FALSE(rs.Match("b")); + EXPECT_FALSE(rs.Match("ab")); + EXPECT_FALSE(rs.Match("abcd")); +} + +TEST(Regex, Parenthesis2) { + Regex re("a(bc)"); + ASSERT_TRUE(re.IsValid()); + RegexSearch rs(re); + EXPECT_TRUE(rs.Match("abc")); + EXPECT_FALSE(rs.Match("")); + EXPECT_FALSE(rs.Match("a")); + EXPECT_FALSE(rs.Match("b")); + EXPECT_FALSE(rs.Match("ab")); + EXPECT_FALSE(rs.Match("abcd")); +} + +TEST(Regex, Parenthesis3) { + Regex re("(a|b)(c|d)"); + ASSERT_TRUE(re.IsValid()); + RegexSearch rs(re); + EXPECT_TRUE(rs.Match("ac")); + EXPECT_TRUE(rs.Match("ad")); + EXPECT_TRUE(rs.Match("bc")); + EXPECT_TRUE(rs.Match("bd")); + EXPECT_FALSE(rs.Match("")); + EXPECT_FALSE(rs.Match("ab")); + EXPECT_FALSE(rs.Match("cd")); +} + +TEST(Regex, ZeroOrOne1) { + Regex re("a?"); + ASSERT_TRUE(re.IsValid()); + RegexSearch rs(re); + EXPECT_TRUE(rs.Match("")); + EXPECT_TRUE(rs.Match("a")); + EXPECT_FALSE(rs.Match("aa")); +} + +TEST(Regex, ZeroOrOne2) { + Regex re("a?b"); + ASSERT_TRUE(re.IsValid()); + RegexSearch rs(re); + EXPECT_TRUE(rs.Match("b")); + EXPECT_TRUE(rs.Match("ab")); + EXPECT_FALSE(rs.Match("a")); + EXPECT_FALSE(rs.Match("aa")); + EXPECT_FALSE(rs.Match("bb")); + EXPECT_FALSE(rs.Match("ba")); +} + +TEST(Regex, ZeroOrOne3) { + Regex re("ab?"); + ASSERT_TRUE(re.IsValid()); + RegexSearch rs(re); + EXPECT_TRUE(rs.Match("a")); + EXPECT_TRUE(rs.Match("ab")); + EXPECT_FALSE(rs.Match("b")); + EXPECT_FALSE(rs.Match("aa")); + EXPECT_FALSE(rs.Match("bb")); + EXPECT_FALSE(rs.Match("ba")); +} + +TEST(Regex, ZeroOrOne4) { + Regex re("a?b?"); + ASSERT_TRUE(re.IsValid()); + RegexSearch rs(re); + EXPECT_TRUE(rs.Match("")); + EXPECT_TRUE(rs.Match("a")); + EXPECT_TRUE(rs.Match("b")); + EXPECT_TRUE(rs.Match("ab")); + EXPECT_FALSE(rs.Match("aa")); + EXPECT_FALSE(rs.Match("bb")); + EXPECT_FALSE(rs.Match("ba")); + EXPECT_FALSE(rs.Match("abc")); +} + +TEST(Regex, ZeroOrOne5) { + Regex re("a(ab)?b"); + ASSERT_TRUE(re.IsValid()); + RegexSearch rs(re); + EXPECT_TRUE(rs.Match("ab")); + EXPECT_TRUE(rs.Match("aabb")); + EXPECT_FALSE(rs.Match("aab")); + EXPECT_FALSE(rs.Match("abb")); +} + +TEST(Regex, ZeroOrMore1) { + Regex re("a*"); + ASSERT_TRUE(re.IsValid()); + RegexSearch rs(re); + EXPECT_TRUE(rs.Match("")); + EXPECT_TRUE(rs.Match("a")); + EXPECT_TRUE(rs.Match("aa")); + EXPECT_FALSE(rs.Match("b")); + EXPECT_FALSE(rs.Match("ab")); +} + +TEST(Regex, ZeroOrMore2) { + Regex re("a*b"); + ASSERT_TRUE(re.IsValid()); + RegexSearch rs(re); + EXPECT_TRUE(rs.Match("b")); + EXPECT_TRUE(rs.Match("ab")); + EXPECT_TRUE(rs.Match("aab")); + EXPECT_FALSE(rs.Match("")); + EXPECT_FALSE(rs.Match("bb")); +} + +TEST(Regex, ZeroOrMore3) { + Regex re("a*b*"); + ASSERT_TRUE(re.IsValid()); + RegexSearch rs(re); + EXPECT_TRUE(rs.Match("")); + EXPECT_TRUE(rs.Match("a")); + EXPECT_TRUE(rs.Match("aa")); + EXPECT_TRUE(rs.Match("b")); + EXPECT_TRUE(rs.Match("bb")); + EXPECT_TRUE(rs.Match("ab")); + EXPECT_TRUE(rs.Match("aabb")); + EXPECT_FALSE(rs.Match("ba")); +} + +TEST(Regex, ZeroOrMore4) { + Regex re("a(ab)*b"); + ASSERT_TRUE(re.IsValid()); + RegexSearch rs(re); + EXPECT_TRUE(rs.Match("ab")); + EXPECT_TRUE(rs.Match("aabb")); + EXPECT_TRUE(rs.Match("aababb")); + EXPECT_FALSE(rs.Match("")); + EXPECT_FALSE(rs.Match("aa")); +} + +TEST(Regex, OneOrMore1) { + Regex re("a+"); + ASSERT_TRUE(re.IsValid()); + RegexSearch rs(re); + EXPECT_TRUE(rs.Match("a")); + EXPECT_TRUE(rs.Match("aa")); + EXPECT_FALSE(rs.Match("")); + EXPECT_FALSE(rs.Match("b")); + EXPECT_FALSE(rs.Match("ab")); +} + +TEST(Regex, OneOrMore2) { + Regex re("a+b"); + ASSERT_TRUE(re.IsValid()); + RegexSearch rs(re); + EXPECT_TRUE(rs.Match("ab")); + EXPECT_TRUE(rs.Match("aab")); + EXPECT_FALSE(rs.Match("")); + EXPECT_FALSE(rs.Match("b")); +} + +TEST(Regex, OneOrMore3) { + Regex re("a+b+"); + ASSERT_TRUE(re.IsValid()); + RegexSearch rs(re); + EXPECT_TRUE(rs.Match("ab")); + EXPECT_TRUE(rs.Match("aab")); + EXPECT_TRUE(rs.Match("abb")); + EXPECT_TRUE(rs.Match("aabb")); + EXPECT_FALSE(rs.Match("")); + EXPECT_FALSE(rs.Match("b")); + EXPECT_FALSE(rs.Match("ba")); +} + +TEST(Regex, OneOrMore4) { + Regex re("a(ab)+b"); + ASSERT_TRUE(re.IsValid()); + RegexSearch rs(re); + EXPECT_TRUE(rs.Match("aabb")); + EXPECT_TRUE(rs.Match("aababb")); + EXPECT_FALSE(rs.Match("")); + EXPECT_FALSE(rs.Match("ab")); +} + +TEST(Regex, QuantifierExact1) { + Regex re("ab{3}c"); + ASSERT_TRUE(re.IsValid()); + RegexSearch rs(re); + EXPECT_TRUE(rs.Match("abbbc")); + EXPECT_FALSE(rs.Match("ac")); + EXPECT_FALSE(rs.Match("abc")); + EXPECT_FALSE(rs.Match("abbc")); + EXPECT_FALSE(rs.Match("abbbbc")); +} + +TEST(Regex, QuantifierExact2) { + Regex re("a(bc){3}d"); + ASSERT_TRUE(re.IsValid()); + RegexSearch rs(re); + EXPECT_TRUE(rs.Match("abcbcbcd")); + EXPECT_FALSE(rs.Match("ad")); + EXPECT_FALSE(rs.Match("abcd")); + EXPECT_FALSE(rs.Match("abcbcd")); + EXPECT_FALSE(rs.Match("abcbcbcbcd")); +} + +TEST(Regex, QuantifierExact3) { + Regex re("a(b|c){3}d"); + ASSERT_TRUE(re.IsValid()); + RegexSearch rs(re); + EXPECT_TRUE(rs.Match("abbbd")); + EXPECT_TRUE(rs.Match("acccd")); + EXPECT_TRUE(rs.Match("abcbd")); + EXPECT_FALSE(rs.Match("ad")); + EXPECT_FALSE(rs.Match("abbd")); + EXPECT_FALSE(rs.Match("accccd")); + EXPECT_FALSE(rs.Match("abbbbd")); +} + +TEST(Regex, QuantifierMin1) { + Regex re("ab{3,}c"); + ASSERT_TRUE(re.IsValid()); + RegexSearch rs(re); + EXPECT_TRUE(rs.Match("abbbc")); + EXPECT_TRUE(rs.Match("abbbbc")); + EXPECT_TRUE(rs.Match("abbbbbc")); + EXPECT_FALSE(rs.Match("ac")); + EXPECT_FALSE(rs.Match("abc")); + EXPECT_FALSE(rs.Match("abbc")); +} + +TEST(Regex, QuantifierMin2) { + Regex re("a(bc){3,}d"); + ASSERT_TRUE(re.IsValid()); + RegexSearch rs(re); + EXPECT_TRUE(rs.Match("abcbcbcd")); + EXPECT_TRUE(rs.Match("abcbcbcbcd")); + EXPECT_FALSE(rs.Match("ad")); + EXPECT_FALSE(rs.Match("abcd")); + EXPECT_FALSE(rs.Match("abcbcd")); +} + +TEST(Regex, QuantifierMin3) { + Regex re("a(b|c){3,}d"); + ASSERT_TRUE(re.IsValid()); + RegexSearch rs(re); + EXPECT_TRUE(rs.Match("abbbd")); + EXPECT_TRUE(rs.Match("acccd")); + EXPECT_TRUE(rs.Match("abcbd")); + EXPECT_TRUE(rs.Match("accccd")); + EXPECT_TRUE(rs.Match("abbbbd")); + EXPECT_FALSE(rs.Match("ad")); + EXPECT_FALSE(rs.Match("abbd")); +} + +TEST(Regex, QuantifierMinMax1) { + Regex re("ab{3,5}c"); + ASSERT_TRUE(re.IsValid()); + RegexSearch rs(re); + EXPECT_TRUE(rs.Match("abbbc")); + EXPECT_TRUE(rs.Match("abbbbc")); + EXPECT_TRUE(rs.Match("abbbbbc")); + EXPECT_FALSE(rs.Match("ac")); + EXPECT_FALSE(rs.Match("abc")); + EXPECT_FALSE(rs.Match("abbc")); + EXPECT_FALSE(rs.Match("abbbbbbc")); +} + +TEST(Regex, QuantifierMinMax2) { + Regex re("a(bc){3,5}d"); + ASSERT_TRUE(re.IsValid()); + RegexSearch rs(re); + EXPECT_TRUE(rs.Match("abcbcbcd")); + EXPECT_TRUE(rs.Match("abcbcbcbcd")); + EXPECT_TRUE(rs.Match("abcbcbcbcbcd")); + EXPECT_FALSE(rs.Match("ad")); + EXPECT_FALSE(rs.Match("abcd")); + EXPECT_FALSE(rs.Match("abcbcd")); + EXPECT_FALSE(rs.Match("abcbcbcbcbcbcd")); +} + +TEST(Regex, QuantifierMinMax3) { + Regex re("a(b|c){3,5}d"); + ASSERT_TRUE(re.IsValid()); + RegexSearch rs(re); + EXPECT_TRUE(rs.Match("abbbd")); + EXPECT_TRUE(rs.Match("acccd")); + EXPECT_TRUE(rs.Match("abcbd")); + EXPECT_TRUE(rs.Match("accccd")); + EXPECT_TRUE(rs.Match("abbbbd")); + EXPECT_TRUE(rs.Match("acccccd")); + EXPECT_TRUE(rs.Match("abbbbbd")); + EXPECT_FALSE(rs.Match("ad")); + EXPECT_FALSE(rs.Match("abbd")); + EXPECT_FALSE(rs.Match("accccccd")); + EXPECT_FALSE(rs.Match("abbbbbbd")); +} + +// Issue538 +TEST(Regex, QuantifierMinMax4) { + Regex re("a(b|c){0,3}d"); + ASSERT_TRUE(re.IsValid()); + RegexSearch rs(re); + EXPECT_TRUE(rs.Match("ad")); + EXPECT_TRUE(rs.Match("abd")); + EXPECT_TRUE(rs.Match("acd")); + EXPECT_TRUE(rs.Match("abbd")); + EXPECT_TRUE(rs.Match("accd")); + EXPECT_TRUE(rs.Match("abcd")); + EXPECT_TRUE(rs.Match("abbbd")); + EXPECT_TRUE(rs.Match("acccd")); + EXPECT_FALSE(rs.Match("abbbbd")); + EXPECT_FALSE(rs.Match("add")); + EXPECT_FALSE(rs.Match("accccd")); + EXPECT_FALSE(rs.Match("abcbcd")); +} + +// Issue538 +TEST(Regex, QuantifierMinMax5) { + Regex re("a(b|c){0,}d"); + ASSERT_TRUE(re.IsValid()); + RegexSearch rs(re); + EXPECT_TRUE(rs.Match("ad")); + EXPECT_TRUE(rs.Match("abd")); + EXPECT_TRUE(rs.Match("acd")); + EXPECT_TRUE(rs.Match("abbd")); + EXPECT_TRUE(rs.Match("accd")); + EXPECT_TRUE(rs.Match("abcd")); + EXPECT_TRUE(rs.Match("abbbd")); + EXPECT_TRUE(rs.Match("acccd")); + EXPECT_TRUE(rs.Match("abbbbd")); + EXPECT_TRUE(rs.Match("accccd")); + EXPECT_TRUE(rs.Match("abcbcd")); + EXPECT_FALSE(rs.Match("add")); + EXPECT_FALSE(rs.Match("aad")); +} + +#define EURO "\xE2\x82\xAC" // "\xE2\x82\xAC" is UTF-8 rsquence of Euro sign U+20AC + +TEST(Regex, Unicode) { + Regex re("a" EURO "+b"); + ASSERT_TRUE(re.IsValid()); + RegexSearch rs(re); + EXPECT_TRUE(rs.Match("a" EURO "b")); + EXPECT_TRUE(rs.Match("a" EURO EURO "b")); + EXPECT_FALSE(rs.Match("a?b")); + EXPECT_FALSE(rs.Match("a" EURO "\xAC" "b")); // unaware of UTF-8 will match +} + +TEST(Regex, AnyCharacter) { + Regex re("."); + ASSERT_TRUE(re.IsValid()); + RegexSearch rs(re); + EXPECT_TRUE(rs.Match("a")); + EXPECT_TRUE(rs.Match("b")); + EXPECT_TRUE(rs.Match(EURO)); + EXPECT_FALSE(rs.Match("")); + EXPECT_FALSE(rs.Match("aa")); +} + +TEST(Regex, CharacterRange1) { + Regex re("[abc]"); + ASSERT_TRUE(re.IsValid()); + RegexSearch rs(re); + EXPECT_TRUE(rs.Match("a")); + EXPECT_TRUE(rs.Match("b")); + EXPECT_TRUE(rs.Match("c")); + EXPECT_FALSE(rs.Match("")); + EXPECT_FALSE(rs.Match("`")); + EXPECT_FALSE(rs.Match("d")); + EXPECT_FALSE(rs.Match("aa")); +} + +TEST(Regex, CharacterRange2) { + Regex re("[^abc]"); + ASSERT_TRUE(re.IsValid()); + RegexSearch rs(re); + EXPECT_TRUE(rs.Match("`")); + EXPECT_TRUE(rs.Match("d")); + EXPECT_FALSE(rs.Match("a")); + EXPECT_FALSE(rs.Match("b")); + EXPECT_FALSE(rs.Match("c")); + EXPECT_FALSE(rs.Match("")); + EXPECT_FALSE(rs.Match("aa")); +} + +TEST(Regex, CharacterRange3) { + Regex re("[a-c]"); + ASSERT_TRUE(re.IsValid()); + RegexSearch rs(re); + EXPECT_TRUE(rs.Match("a")); + EXPECT_TRUE(rs.Match("b")); + EXPECT_TRUE(rs.Match("c")); + EXPECT_FALSE(rs.Match("")); + EXPECT_FALSE(rs.Match("`")); + EXPECT_FALSE(rs.Match("d")); + EXPECT_FALSE(rs.Match("aa")); +} + +TEST(Regex, CharacterRange4) { + Regex re("[^a-c]"); + ASSERT_TRUE(re.IsValid()); + RegexSearch rs(re); + EXPECT_TRUE(rs.Match("`")); + EXPECT_TRUE(rs.Match("d")); + EXPECT_FALSE(rs.Match("a")); + EXPECT_FALSE(rs.Match("b")); + EXPECT_FALSE(rs.Match("c")); + EXPECT_FALSE(rs.Match("")); + EXPECT_FALSE(rs.Match("aa")); +} + +TEST(Regex, CharacterRange5) { + Regex re("[-]"); + ASSERT_TRUE(re.IsValid()); + RegexSearch rs(re); + EXPECT_TRUE(rs.Match("-")); + EXPECT_FALSE(rs.Match("")); + EXPECT_FALSE(rs.Match("a")); +} + +TEST(Regex, CharacterRange6) { + Regex re("[a-]"); + ASSERT_TRUE(re.IsValid()); + RegexSearch rs(re); + EXPECT_TRUE(rs.Match("a")); + EXPECT_TRUE(rs.Match("-")); + EXPECT_FALSE(rs.Match("")); + EXPECT_FALSE(rs.Match("`")); + EXPECT_FALSE(rs.Match("b")); +} + +TEST(Regex, CharacterRange7) { + Regex re("[-a]"); + ASSERT_TRUE(re.IsValid()); + RegexSearch rs(re); + EXPECT_TRUE(rs.Match("a")); + EXPECT_TRUE(rs.Match("-")); + EXPECT_FALSE(rs.Match("")); + EXPECT_FALSE(rs.Match("`")); + EXPECT_FALSE(rs.Match("b")); +} + +TEST(Regex, CharacterRange8) { + Regex re("[a-zA-Z0-9]*"); + ASSERT_TRUE(re.IsValid()); + RegexSearch rs(re); + EXPECT_TRUE(rs.Match("Milo")); + EXPECT_TRUE(rs.Match("MT19937")); + EXPECT_TRUE(rs.Match("43")); + EXPECT_FALSE(rs.Match("a_b")); + EXPECT_FALSE(rs.Match("!")); +} + +TEST(Regex, Search) { + Regex re("abc"); + ASSERT_TRUE(re.IsValid()); + RegexSearch rs(re); + EXPECT_TRUE(rs.Search("abc")); + EXPECT_TRUE(rs.Search("_abc")); + EXPECT_TRUE(rs.Search("abc_")); + EXPECT_TRUE(rs.Search("_abc_")); + EXPECT_TRUE(rs.Search("__abc__")); + EXPECT_TRUE(rs.Search("abcabc")); + EXPECT_FALSE(rs.Search("a")); + EXPECT_FALSE(rs.Search("ab")); + EXPECT_FALSE(rs.Search("bc")); + EXPECT_FALSE(rs.Search("cba")); +} + +TEST(Regex, Search_BeginAnchor) { + Regex re("^abc"); + ASSERT_TRUE(re.IsValid()); + RegexSearch rs(re); + EXPECT_TRUE(rs.Search("abc")); + EXPECT_TRUE(rs.Search("abc_")); + EXPECT_TRUE(rs.Search("abcabc")); + EXPECT_FALSE(rs.Search("_abc")); + EXPECT_FALSE(rs.Search("_abc_")); + EXPECT_FALSE(rs.Search("a")); + EXPECT_FALSE(rs.Search("ab")); + EXPECT_FALSE(rs.Search("bc")); + EXPECT_FALSE(rs.Search("cba")); +} + +TEST(Regex, Search_EndAnchor) { + Regex re("abc$"); + ASSERT_TRUE(re.IsValid()); + RegexSearch rs(re); + EXPECT_TRUE(rs.Search("abc")); + EXPECT_TRUE(rs.Search("_abc")); + EXPECT_TRUE(rs.Search("abcabc")); + EXPECT_FALSE(rs.Search("abc_")); + EXPECT_FALSE(rs.Search("_abc_")); + EXPECT_FALSE(rs.Search("a")); + EXPECT_FALSE(rs.Search("ab")); + EXPECT_FALSE(rs.Search("bc")); + EXPECT_FALSE(rs.Search("cba")); +} + +TEST(Regex, Search_BothAnchor) { + Regex re("^abc$"); + ASSERT_TRUE(re.IsValid()); + RegexSearch rs(re); + EXPECT_TRUE(rs.Search("abc")); + EXPECT_FALSE(rs.Search("")); + EXPECT_FALSE(rs.Search("a")); + EXPECT_FALSE(rs.Search("b")); + EXPECT_FALSE(rs.Search("ab")); + EXPECT_FALSE(rs.Search("abcd")); +} + +TEST(Regex, Escape) { + const char* s = "\\^\\$\\|\\(\\)\\?\\*\\+\\.\\[\\]\\{\\}\\\\\\f\\n\\r\\t\\v[\\b][\\[][\\]]"; + Regex re(s); + ASSERT_TRUE(re.IsValid()); + RegexSearch rs(re); + EXPECT_TRUE(rs.Match("^$|()?*+.[]{}\\\x0C\n\r\t\x0B\b[]")); + EXPECT_FALSE(rs.Match(s)); // Not escaping +} + +TEST(Regex, Invalid) { +#define TEST_INVALID(s) \ + {\ + Regex re(s);\ + EXPECT_FALSE(re.IsValid());\ + } + + TEST_INVALID(""); + TEST_INVALID("a|"); + TEST_INVALID("()"); + TEST_INVALID("("); + TEST_INVALID(")"); + TEST_INVALID("(a))"); + TEST_INVALID("(a|)"); + TEST_INVALID("(a||b)"); + TEST_INVALID("(|b)"); + TEST_INVALID("?"); + TEST_INVALID("*"); + TEST_INVALID("+"); + TEST_INVALID("{"); + TEST_INVALID("{}"); + TEST_INVALID("a{a}"); + TEST_INVALID("a{0}"); + TEST_INVALID("a{-1}"); + TEST_INVALID("a{}"); + // TEST_INVALID("a{0,}"); // Support now + TEST_INVALID("a{,0}"); + TEST_INVALID("a{1,0}"); + TEST_INVALID("a{-1,0}"); + TEST_INVALID("a{-1,1}"); + TEST_INVALID("a{4294967296}"); // overflow of unsigned + TEST_INVALID("a{1a}"); + TEST_INVALID("["); + TEST_INVALID("[]"); + TEST_INVALID("[^]"); + TEST_INVALID("[\\a]"); + TEST_INVALID("\\a"); + +#undef TEST_INVALID +} + +TEST(Regex, Issue538) { + Regex re("^[0-9]+(\\\\.[0-9]+){0,2}"); + EXPECT_TRUE(re.IsValid()); +} + +TEST(Regex, Issue583) { + Regex re("[0-9]{99999}"); + ASSERT_TRUE(re.IsValid()); +} + +#undef EURO diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/schematest.cpp b/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/schematest.cpp new file mode 100644 index 0000000000..1b25e2f44e --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/schematest.cpp @@ -0,0 +1,2952 @@ +// Tencent is pleased to support the open source community by making RapidJSON available. +// +// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. +// +// Licensed under the MIT License (the "License"); you may not use this file except +// in compliance with the License. You may obtain a copy of the License at +// +// http://opensource.org/licenses/MIT +// +// Unless required by applicable law or agreed to in writing, software distributed +// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +// CONDITIONS OF ANY KIND, either express or implied. See the License for the +// specific language governing permissions and limitations under the License. + +#define RAPIDJSON_SCHEMA_VERBOSE 0 +#define RAPIDJSON_HAS_STDSTRING 1 + +#include "unittest.h" +#include "rapidjson/schema.h" +#include "rapidjson/stringbuffer.h" +#include "rapidjson/writer.h" +#include "rapidjson/error/error.h" +#include "rapidjson/error/en.h" + +#ifdef __clang__ +RAPIDJSON_DIAG_PUSH +RAPIDJSON_DIAG_OFF(variadic-macros) +#elif defined(_MSC_VER) +RAPIDJSON_DIAG_PUSH +RAPIDJSON_DIAG_OFF(4822) // local class member function does not have a body +#endif + +using namespace rapidjson; + +#define TEST_HASHER(json1, json2, expected) \ +{\ + Document d1, d2;\ + d1.Parse(json1);\ + ASSERT_FALSE(d1.HasParseError());\ + d2.Parse(json2);\ + ASSERT_FALSE(d2.HasParseError());\ + internal::Hasher h1, h2;\ + d1.Accept(h1);\ + d2.Accept(h2);\ + ASSERT_TRUE(h1.IsValid());\ + ASSERT_TRUE(h2.IsValid());\ + /*printf("%s: 0x%016llx\n%s: 0x%016llx\n\n", json1, h1.GetHashCode(), json2, h2.GetHashCode());*/\ + EXPECT_TRUE(expected == (h1.GetHashCode() == h2.GetHashCode()));\ +} + +TEST(SchemaValidator, Hasher) { + TEST_HASHER("null", "null", true); + + TEST_HASHER("true", "true", true); + TEST_HASHER("false", "false", true); + TEST_HASHER("true", "false", false); + TEST_HASHER("false", "true", false); + TEST_HASHER("true", "null", false); + TEST_HASHER("false", "null", false); + + TEST_HASHER("1", "1", true); + TEST_HASHER("2147483648", "2147483648", true); // 2^31 can only be fit in unsigned + TEST_HASHER("-2147483649", "-2147483649", true); // -2^31 - 1 can only be fit in int64_t + TEST_HASHER("2147483648", "2147483648", true); // 2^31 can only be fit in unsigned + TEST_HASHER("4294967296", "4294967296", true); // 2^32 can only be fit in int64_t + TEST_HASHER("9223372036854775808", "9223372036854775808", true); // 2^63 can only be fit in uint64_t + TEST_HASHER("1.5", "1.5", true); + TEST_HASHER("1", "1.0", true); + TEST_HASHER("1", "-1", false); + TEST_HASHER("0.0", "-0.0", false); + TEST_HASHER("1", "true", false); + TEST_HASHER("0", "false", false); + TEST_HASHER("0", "null", false); + + TEST_HASHER("\"\"", "\"\"", true); + TEST_HASHER("\"\"", "\"\\u0000\"", false); + TEST_HASHER("\"Hello\"", "\"Hello\"", true); + TEST_HASHER("\"Hello\"", "\"World\"", false); + TEST_HASHER("\"Hello\"", "null", false); + TEST_HASHER("\"Hello\\u0000\"", "\"Hello\"", false); + TEST_HASHER("\"\"", "null", false); + TEST_HASHER("\"\"", "true", false); + TEST_HASHER("\"\"", "false", false); + + TEST_HASHER("[]", "[ ]", true); + TEST_HASHER("[1, true, false]", "[1, true, false]", true); + TEST_HASHER("[1, true, false]", "[1, true]", false); + TEST_HASHER("[1, 2]", "[2, 1]", false); + TEST_HASHER("[[1], 2]", "[[1, 2]]", false); + TEST_HASHER("[1, 2]", "[1, [2]]", false); + TEST_HASHER("[]", "null", false); + TEST_HASHER("[]", "true", false); + TEST_HASHER("[]", "false", false); + TEST_HASHER("[]", "0", false); + TEST_HASHER("[]", "0.0", false); + TEST_HASHER("[]", "\"\"", false); + + TEST_HASHER("{}", "{ }", true); + TEST_HASHER("{\"a\":1}", "{\"a\":1}", true); + TEST_HASHER("{\"a\":1}", "{\"b\":1}", false); + TEST_HASHER("{\"a\":1}", "{\"a\":2}", false); + TEST_HASHER("{\"a\":1, \"b\":2}", "{\"b\":2, \"a\":1}", true); // Member order insensitive + TEST_HASHER("{}", "null", false); + TEST_HASHER("{}", "false", false); + TEST_HASHER("{}", "true", false); + TEST_HASHER("{}", "0", false); + TEST_HASHER("{}", "0.0", false); + TEST_HASHER("{}", "\"\"", false); +} + +// Test cases following http://spacetelescope.github.io/understanding-json-schema + +#define VALIDATE(schema, json, expected) \ +{\ + SchemaValidator validator(schema);\ + Document d;\ + /*printf("\n%s\n", json);*/\ + d.Parse(json);\ + EXPECT_FALSE(d.HasParseError());\ + EXPECT_TRUE(expected == d.Accept(validator));\ + EXPECT_TRUE(expected == validator.IsValid());\ + ValidateErrorCode code = validator.GetInvalidSchemaCode();\ + if (expected) {\ + EXPECT_TRUE(code == kValidateErrorNone);\ + EXPECT_TRUE(validator.GetInvalidSchemaKeyword() == 0);\ + }\ + if ((expected) && !validator.IsValid()) {\ + StringBuffer sb;\ + validator.GetInvalidSchemaPointer().StringifyUriFragment(sb);\ + printf("Invalid schema: %s\n", sb.GetString());\ + printf("Invalid keyword: %s\n", validator.GetInvalidSchemaKeyword());\ + printf("Invalid code: %d\n", code);\ + printf("Invalid message: %s\n", GetValidateError_En(code));\ + sb.Clear();\ + validator.GetInvalidDocumentPointer().StringifyUriFragment(sb);\ + printf("Invalid document: %s\n", sb.GetString());\ + sb.Clear();\ + Writer w(sb);\ + validator.GetError().Accept(w);\ + printf("Validation error: %s\n", sb.GetString());\ + }\ +} + +#define INVALIDATE(schema, json, invalidSchemaPointer, invalidSchemaKeyword, invalidDocumentPointer, error) \ +{\ + INVALIDATE_(schema, json, invalidSchemaPointer, invalidSchemaKeyword, invalidDocumentPointer, error, kValidateDefaultFlags, SchemaValidator, Pointer) \ +} + +#define INVALIDATE_(schema, json, invalidSchemaPointer, invalidSchemaKeyword, invalidDocumentPointer, error, \ + flags, SchemaValidatorType, PointerType) \ +{\ + SchemaValidatorType validator(schema);\ + validator.SetValidateFlags(flags);\ + Document d;\ + /*printf("\n%s\n", json);*/\ + d.Parse(json);\ + EXPECT_FALSE(d.HasParseError());\ + d.Accept(validator);\ + EXPECT_FALSE(validator.IsValid());\ + ValidateErrorCode code = validator.GetInvalidSchemaCode();\ + ASSERT_TRUE(code != kValidateErrorNone);\ + ASSERT_TRUE(strcmp(GetValidateError_En(code), "Unknown error.") != 0);\ + if (validator.GetInvalidSchemaPointer() != PointerType(invalidSchemaPointer)) {\ + StringBuffer sb;\ + validator.GetInvalidSchemaPointer().Stringify(sb);\ + printf("GetInvalidSchemaPointer() Expected: %s Actual: %s\n", invalidSchemaPointer, sb.GetString());\ + ADD_FAILURE();\ + }\ + ASSERT_TRUE(validator.GetInvalidSchemaKeyword() != 0);\ + if (strcmp(validator.GetInvalidSchemaKeyword(), invalidSchemaKeyword) != 0) {\ + printf("GetInvalidSchemaKeyword() Expected: %s Actual %s\n", invalidSchemaKeyword, validator.GetInvalidSchemaKeyword());\ + ADD_FAILURE();\ + }\ + if (validator.GetInvalidDocumentPointer() != PointerType(invalidDocumentPointer)) {\ + StringBuffer sb;\ + validator.GetInvalidDocumentPointer().Stringify(sb);\ + printf("GetInvalidDocumentPointer() Expected: %s Actual: %s\n", invalidDocumentPointer, sb.GetString());\ + ADD_FAILURE();\ + }\ + Document e;\ + e.Parse(error);\ + if (validator.GetError() != e) {\ + StringBuffer sb;\ + Writer w(sb);\ + validator.GetError().Accept(w);\ + printf("GetError() Expected: %s Actual: %s\n", error, sb.GetString());\ + ADD_FAILURE();\ + }\ +} + +TEST(SchemaValidator, Typeless) { + Document sd; + sd.Parse("{}"); + SchemaDocument s(sd); + + VALIDATE(s, "42", true); + VALIDATE(s, "\"I'm a string\"", true); + VALIDATE(s, "{ \"an\": [ \"arbitrarily\", \"nested\" ], \"data\": \"structure\" }", true); +} + +TEST(SchemaValidator, MultiType) { + Document sd; + sd.Parse("{ \"type\": [\"number\", \"string\"] }"); + SchemaDocument s(sd); + + VALIDATE(s, "42", true); + VALIDATE(s, "\"Life, the universe, and everything\"", true); + INVALIDATE(s, "[\"Life\", \"the universe\", \"and everything\"]", "", "type", "", + "{ \"type\": {" + " \"errorCode\": 20," + " \"instanceRef\": \"#\", \"schemaRef\": \"#\"," + " \"expected\": [\"string\", \"number\"], \"actual\": \"array\"" + "}}"); +} + +TEST(SchemaValidator, Enum_Typed) { + Document sd; + sd.Parse("{ \"type\": \"string\", \"enum\" : [\"red\", \"amber\", \"green\"] }"); + SchemaDocument s(sd); + + VALIDATE(s, "\"red\"", true); + INVALIDATE(s, "\"blue\"", "", "enum", "", + "{ \"enum\": { \"errorCode\": 19, \"instanceRef\": \"#\", \"schemaRef\": \"#\" }}"); +} + +TEST(SchemaValidator, Enum_Typless) { + Document sd; + sd.Parse("{ \"enum\": [\"red\", \"amber\", \"green\", null, 42] }"); + SchemaDocument s(sd); + + VALIDATE(s, "\"red\"", true); + VALIDATE(s, "null", true); + VALIDATE(s, "42", true); + INVALIDATE(s, "0", "", "enum", "", + "{ \"enum\": { \"errorCode\": 19, \"instanceRef\": \"#\", \"schemaRef\": \"#\" }}"); +} + +TEST(SchemaValidator, Enum_InvalidType) { + Document sd; + sd.Parse("{ \"type\": \"string\", \"enum\": [\"red\", \"amber\", \"green\", null] }"); + SchemaDocument s(sd); + + VALIDATE(s, "\"red\"", true); + INVALIDATE(s, "null", "", "type", "", + "{ \"type\": {" + " \"errorCode\": 20," + " \"instanceRef\": \"#\", \"schemaRef\": \"#\"," + " \"expected\": [\"string\"], \"actual\": \"null\"" + "}}"); +} + +TEST(SchemaValidator, AllOf) { + { + Document sd; + sd.Parse("{\"allOf\": [{ \"type\": \"string\" }, { \"type\": \"string\", \"maxLength\": 5 }]}"); + SchemaDocument s(sd); + + VALIDATE(s, "\"ok\"", true); + INVALIDATE(s, "\"too long\"", "", "allOf", "", + "{ \"allOf\": {" + " \"errors\": [" + " {}," + " {\"maxLength\": {\"errorCode\": 6, \"instanceRef\": \"#\", \"schemaRef\": \"#/allOf/1\", \"expected\": 5, \"actual\": \"too long\"}}" + " ]," + " \"errorCode\": 23, \"instanceRef\": \"#\", \"schemaRef\": \"#\"" + "}}"); + } + { + Document sd; + sd.Parse("{\"allOf\": [{ \"type\": \"string\" }, { \"type\": \"number\" } ] }"); + SchemaDocument s(sd); + + VALIDATE(s, "\"No way\"", false); + INVALIDATE(s, "-1", "", "allOf", "", + "{ \"allOf\": {" + " \"errors\": [" + " {\"type\": { \"instanceRef\": \"#\", \"schemaRef\": \"#/allOf/0\", \"errorCode\": 20, \"expected\": [\"string\"], \"actual\": \"integer\"}}," + " {}" + " ]," + " \"errorCode\": 23, \"instanceRef\": \"#\", \"schemaRef\": \"#\"" + "}}"); + } +} + +TEST(SchemaValidator, AnyOf) { + Document sd; + sd.Parse("{\"anyOf\": [{ \"type\": \"string\" }, { \"type\": \"number\" } ] }"); + SchemaDocument s(sd); + + VALIDATE(s, "\"Yes\"", true); + VALIDATE(s, "42", true); + INVALIDATE(s, "{ \"Not a\": \"string or number\" }", "", "anyOf", "", + "{ \"anyOf\": {" + " \"errorCode\": 24," + " \"instanceRef\": \"#\", \"schemaRef\": \"#\", " + " \"errors\": [" + " { \"type\": {" + " \"errorCode\": 20," + " \"instanceRef\": \"#\", \"schemaRef\": \"#/anyOf/0\"," + " \"expected\": [\"string\"], \"actual\": \"object\"" + " }}," + " { \"type\": {" + " \"errorCode\": 20," + " \"instanceRef\": \"#\", \"schemaRef\": \"#/anyOf/1\"," + " \"expected\": [\"number\"], \"actual\": \"object\"" + " }}" + " ]" + "}}"); +} + +TEST(SchemaValidator, OneOf) { + Document sd; + sd.Parse("{\"oneOf\": [{ \"type\": \"number\", \"multipleOf\": 5 }, { \"type\": \"number\", \"multipleOf\": 3 } ] }"); + SchemaDocument s(sd); + + VALIDATE(s, "10", true); + VALIDATE(s, "9", true); + INVALIDATE(s, "2", "", "oneOf", "", + "{ \"oneOf\": {" + " \"errorCode\": 21," + " \"instanceRef\": \"#\", \"schemaRef\": \"#\"," + " \"errors\": [" + " { \"multipleOf\": {" + " \"errorCode\": 1," + " \"instanceRef\": \"#\", \"schemaRef\": \"#/oneOf/0\"," + " \"expected\": 5, \"actual\": 2" + " }}," + " { \"multipleOf\": {" + " \"errorCode\": 1," + " \"instanceRef\": \"#\", \"schemaRef\": \"#/oneOf/1\"," + " \"expected\": 3, \"actual\": 2" + " }}" + " ]" + "}}"); + INVALIDATE(s, "15", "", "oneOf", "", + "{ \"oneOf\": { \"errorCode\": 22, \"instanceRef\": \"#\", \"schemaRef\": \"#\", \"errors\": [{}, {}]}}"); +} + +TEST(SchemaValidator, Not) { + Document sd; + sd.Parse("{\"not\":{ \"type\": \"string\"}}"); + SchemaDocument s(sd); + + VALIDATE(s, "42", true); + VALIDATE(s, "{ \"key\": \"value\" }", true); + INVALIDATE(s, "\"I am a string\"", "", "not", "", + "{ \"not\": { \"errorCode\": 25, \"instanceRef\": \"#\", \"schemaRef\": \"#\" }}"); +} + +TEST(SchemaValidator, Ref) { + Document sd; + sd.Parse( + "{" + " \"$schema\": \"http://json-schema.org/draft-04/schema#\"," + "" + " \"definitions\": {" + " \"address\": {" + " \"type\": \"object\"," + " \"properties\": {" + " \"street_address\": { \"type\": \"string\" }," + " \"city\": { \"type\": \"string\" }," + " \"state\": { \"type\": \"string\" }" + " }," + " \"required\": [\"street_address\", \"city\", \"state\"]" + " }" + " }," + " \"type\": \"object\"," + " \"properties\": {" + " \"billing_address\": { \"$ref\": \"#/definitions/address\" }," + " \"shipping_address\": { \"$ref\": \"#/definitions/address\" }" + " }" + "}"); + SchemaDocument s(sd); + + VALIDATE(s, "{\"shipping_address\": {\"street_address\": \"1600 Pennsylvania Avenue NW\", \"city\": \"Washington\", \"state\": \"DC\"}, \"billing_address\": {\"street_address\": \"1st Street SE\", \"city\": \"Washington\", \"state\": \"DC\"} }", true); +} + +TEST(SchemaValidator, Ref_AllOf) { + Document sd; + sd.Parse( + "{" + " \"$schema\": \"http://json-schema.org/draft-04/schema#\"," + "" + " \"definitions\": {" + " \"address\": {" + " \"type\": \"object\"," + " \"properties\": {" + " \"street_address\": { \"type\": \"string\" }," + " \"city\": { \"type\": \"string\" }," + " \"state\": { \"type\": \"string\" }" + " }," + " \"required\": [\"street_address\", \"city\", \"state\"]" + " }" + " }," + " \"type\": \"object\"," + " \"properties\": {" + " \"billing_address\": { \"$ref\": \"#/definitions/address\" }," + " \"shipping_address\": {" + " \"allOf\": [" + " { \"$ref\": \"#/definitions/address\" }," + " { \"properties\":" + " { \"type\": { \"enum\": [ \"residential\", \"business\" ] } }," + " \"required\": [\"type\"]" + " }" + " ]" + " }" + " }" + "}"); + SchemaDocument s(sd); + + INVALIDATE(s, "{\"shipping_address\": {\"street_address\": \"1600 Pennsylvania Avenue NW\", \"city\": \"Washington\", \"state\": \"DC\"} }", "/properties/shipping_address", "allOf", "/shipping_address", + "{ \"allOf\": {" + " \"errors\": [" + " {}," + " {\"required\": {\"errorCode\": 15, \"instanceRef\": \"#/shipping_address\", \"schemaRef\": \"#/properties/shipping_address/allOf/1\", \"missing\": [\"type\"]}}" + " ]," + " \"errorCode\":23,\"instanceRef\":\"#/shipping_address\",\"schemaRef\":\"#/properties/shipping_address\"" + "}}"); + VALIDATE(s, "{\"shipping_address\": {\"street_address\": \"1600 Pennsylvania Avenue NW\", \"city\": \"Washington\", \"state\": \"DC\", \"type\": \"business\"} }", true); +} + +TEST(SchemaValidator, String) { + Document sd; + sd.Parse("{\"type\":\"string\"}"); + SchemaDocument s(sd); + + VALIDATE(s, "\"I'm a string\"", true); + INVALIDATE(s, "42", "", "type", "", + "{ \"type\": {" + " \"errorCode\": 20," + " \"instanceRef\": \"#\", \"schemaRef\": \"#\"," + " \"expected\": [\"string\"], \"actual\": \"integer\"" + "}}"); + INVALIDATE(s, "2147483648", "", "type", "", + "{ \"type\": {" + " \"errorCode\": 20," + " \"instanceRef\": \"#\", \"schemaRef\": \"#\"," + " \"expected\": [\"string\"], \"actual\": \"integer\"" + "}}"); // 2^31 can only be fit in unsigned + INVALIDATE(s, "-2147483649", "", "type", "", + "{ \"type\": {" + " \"errorCode\": 20," + " \"instanceRef\": \"#\", \"schemaRef\": \"#\"," + " \"expected\": [\"string\"], \"actual\": \"integer\"" + "}}"); // -2^31 - 1 can only be fit in int64_t + INVALIDATE(s, "4294967296", "", "type", "", + "{ \"type\": {" + " \"errorCode\": 20," + " \"instanceRef\": \"#\", \"schemaRef\": \"#\"," + " \"expected\": [\"string\"], \"actual\": \"integer\"" + "}}"); // 2^32 can only be fit in int64_t + INVALIDATE(s, "3.1415926", "", "type", "", + "{ \"type\": {" + " \"errorCode\": 20," + " \"instanceRef\": \"#\", \"schemaRef\": \"#\"," + " \"expected\": [\"string\"], \"actual\": \"number\"" + "}}"); +} + +TEST(SchemaValidator, String_LengthRange) { + Document sd; + sd.Parse("{\"type\":\"string\",\"minLength\":2,\"maxLength\":3}"); + SchemaDocument s(sd); + + INVALIDATE(s, "\"A\"", "", "minLength", "", + "{ \"minLength\": {" + " \"errorCode\": 7," + " \"instanceRef\": \"#\", \"schemaRef\": \"#\"," + " \"expected\": 2, \"actual\": \"A\"" + "}}"); + VALIDATE(s, "\"AB\"", true); + VALIDATE(s, "\"ABC\"", true); + INVALIDATE(s, "\"ABCD\"", "", "maxLength", "", + "{ \"maxLength\": {" + " \"errorCode\": 6," + " \"instanceRef\": \"#\", \"schemaRef\": \"#\"," + " \"expected\": 3, \"actual\": \"ABCD\"" + "}}"); +} + +#if RAPIDJSON_SCHEMA_HAS_REGEX +TEST(SchemaValidator, String_Pattern) { + Document sd; + sd.Parse("{\"type\":\"string\",\"pattern\":\"^(\\\\([0-9]{3}\\\\))?[0-9]{3}-[0-9]{4}$\"}"); + SchemaDocument s(sd); + + VALIDATE(s, "\"555-1212\"", true); + VALIDATE(s, "\"(888)555-1212\"", true); + INVALIDATE(s, "\"(888)555-1212 ext. 532\"", "", "pattern", "", + "{ \"pattern\": {" + " \"errorCode\": 8," + " \"instanceRef\": \"#\", \"schemaRef\": \"#\"," + " \"actual\": \"(888)555-1212 ext. 532\"" + "}}"); + INVALIDATE(s, "\"(800)FLOWERS\"", "", "pattern", "", + "{ \"pattern\": {" + " \"errorCode\": 8," + " \"instanceRef\": \"#\", \"schemaRef\": \"#\"," + " \"actual\": \"(800)FLOWERS\"" + "}}"); +} + +TEST(SchemaValidator, String_Pattern_Invalid) { + Document sd; + sd.Parse("{\"type\":\"string\",\"pattern\":\"a{0}\"}"); // TODO: report regex is invalid somehow + SchemaDocument s(sd); + + VALIDATE(s, "\"\"", true); + VALIDATE(s, "\"a\"", true); + VALIDATE(s, "\"aa\"", true); +} +#endif + +TEST(SchemaValidator, Integer) { + Document sd; + sd.Parse("{\"type\":\"integer\"}"); + SchemaDocument s(sd); + + VALIDATE(s, "42", true); + VALIDATE(s, "-1", true); + VALIDATE(s, "2147483648", true); // 2^31 can only be fit in unsigned + VALIDATE(s, "-2147483649", true); // -2^31 - 1 can only be fit in int64_t + VALIDATE(s, "2147483648", true); // 2^31 can only be fit in unsigned + VALIDATE(s, "4294967296", true); // 2^32 can only be fit in int64_t + INVALIDATE(s, "3.1415926", "", "type", "", + "{ \"type\": {" + " \"errorCode\": 20," + " \"instanceRef\": \"#\", \"schemaRef\": \"#\"," + " \"expected\": [\"integer\"], \"actual\": \"number\"" + "}}"); + INVALIDATE(s, "\"42\"", "", "type", "", + "{ \"type\": {" + " \"errorCode\": 20," + " \"instanceRef\": \"#\", \"schemaRef\": \"#\"," + " \"expected\": [\"integer\"], \"actual\": \"string\"" + "}}"); +} + +TEST(SchemaValidator, Integer_Range) { + Document sd; + sd.Parse("{\"type\":\"integer\",\"minimum\":0,\"maximum\":100,\"exclusiveMaximum\":true}"); + SchemaDocument s(sd); + + INVALIDATE(s, "-1", "", "minimum", "", + "{ \"minimum\": {" + " \"errorCode\": 4," + " \"instanceRef\": \"#\", \"schemaRef\": \"#\"," + " \"expected\": 0, \"actual\": -1" + "}}"); + VALIDATE(s, "0", true); + VALIDATE(s, "10", true); + VALIDATE(s, "99", true); + INVALIDATE(s, "100", "", "maximum", "", + "{ \"maximum\": {" + " \"errorCode\": 3," + " \"instanceRef\": \"#\", \"schemaRef\": \"#\"," + " \"expected\": 100, \"exclusiveMaximum\": true, \"actual\": 100" + "}}"); + INVALIDATE(s, "101", "", "maximum", "", + "{ \"maximum\": {" + " \"errorCode\": 3," + " \"instanceRef\": \"#\", \"schemaRef\": \"#\"," + " \"expected\": 100, \"exclusiveMaximum\": true, \"actual\": 101" + "}}"); +} + +TEST(SchemaValidator, Integer_Range64Boundary) { + Document sd; + sd.Parse("{\"type\":\"integer\",\"minimum\":-9223372036854775807,\"maximum\":9223372036854775806}"); + SchemaDocument s(sd); + + INVALIDATE(s, "-9223372036854775808", "", "minimum", "", + "{ \"minimum\": {" + " \"errorCode\": 4," + " \"instanceRef\": \"#\", \"schemaRef\": \"#\"," + " \"expected\": -9223372036854775807, \"actual\": -9223372036854775808" + "}}"); + VALIDATE(s, "-9223372036854775807", true); + VALIDATE(s, "-2147483648", true); // int min + VALIDATE(s, "0", true); + VALIDATE(s, "2147483647", true); // int max + VALIDATE(s, "2147483648", true); // unsigned first + VALIDATE(s, "4294967295", true); // unsigned max + VALIDATE(s, "9223372036854775806", true); + INVALIDATE(s, "9223372036854775807", "", "maximum", "", + "{ \"maximum\": {" + " \"errorCode\": 2," + " \"instanceRef\": \"#\", \"schemaRef\": \"#\"," + " \"expected\": 9223372036854775806, \"actual\": 9223372036854775807" + "}}"); + INVALIDATE(s, "18446744073709551615", "", "maximum", "", + "{ \"maximum\": {" + " \"errorCode\": 2," + " \"instanceRef\": \"#\", \"schemaRef\": \"#\"," + " \"expected\": 9223372036854775806, \"actual\": 18446744073709551615" + "}}"); // uint64_t max +} + +TEST(SchemaValidator, Integer_RangeU64Boundary) { + Document sd; + sd.Parse("{\"type\":\"integer\",\"minimum\":9223372036854775808,\"maximum\":18446744073709551614}"); + SchemaDocument s(sd); + + INVALIDATE(s, "-9223372036854775808", "", "minimum", "", + "{ \"minimum\": {" + " \"errorCode\": 4," + " \"instanceRef\": \"#\", \"schemaRef\": \"#\"," + " \"expected\": 9223372036854775808, \"actual\": -9223372036854775808" + "}}"); + INVALIDATE(s, "9223372036854775807", "", "minimum", "", + "{ \"minimum\": {" + " \"errorCode\": 4," + " \"instanceRef\": \"#\", \"schemaRef\": \"#\"," + " \"expected\": 9223372036854775808, \"actual\": 9223372036854775807" + "}}"); + INVALIDATE(s, "-2147483648", "", "minimum", "", + "{ \"minimum\": {" + " \"errorCode\": 4," + " \"instanceRef\": \"#\", \"schemaRef\": \"#\"," + " \"expected\": 9223372036854775808, \"actual\": -2147483648" + "}}"); // int min + INVALIDATE(s, "0", "", "minimum", "", + "{ \"minimum\": {" + " \"errorCode\": 4," + " \"instanceRef\": \"#\", \"schemaRef\": \"#\"," + " \"expected\": 9223372036854775808, \"actual\": 0" + "}}"); + INVALIDATE(s, "2147483647", "", "minimum", "", + "{ \"minimum\": {" + " \"errorCode\": 4," + " \"instanceRef\": \"#\", \"schemaRef\": \"#\"," + " \"expected\": 9223372036854775808, \"actual\": 2147483647" + "}}"); // int max + INVALIDATE(s, "2147483648", "", "minimum", "", + "{ \"minimum\": {" + " \"errorCode\": 4," + " \"instanceRef\": \"#\", \"schemaRef\": \"#\"," + " \"expected\": 9223372036854775808, \"actual\": 2147483648" + "}}"); // unsigned first + INVALIDATE(s, "4294967295", "", "minimum", "", + "{ \"minimum\": {" + " \"errorCode\": 4," + " \"instanceRef\": \"#\", \"schemaRef\": \"#\"," + " \"expected\": 9223372036854775808, \"actual\": 4294967295" + "}}"); // unsigned max + VALIDATE(s, "9223372036854775808", true); + VALIDATE(s, "18446744073709551614", true); + INVALIDATE(s, "18446744073709551615", "", "maximum", "", + "{ \"maximum\": {" + " \"errorCode\": 2," + " \"instanceRef\": \"#\", \"schemaRef\": \"#\"," + " \"expected\": 18446744073709551614, \"actual\": 18446744073709551615" + "}}"); +} + +TEST(SchemaValidator, Integer_Range64BoundaryExclusive) { + Document sd; + sd.Parse("{\"type\":\"integer\",\"minimum\":-9223372036854775808,\"maximum\":18446744073709551615,\"exclusiveMinimum\":true,\"exclusiveMaximum\":true}"); + SchemaDocument s(sd); + + INVALIDATE(s, "-9223372036854775808", "", "minimum", "", + "{ \"minimum\": {" + " \"errorCode\": 5," + " \"instanceRef\": \"#\", \"schemaRef\": \"#\"," + " \"expected\": -9223372036854775808, \"exclusiveMinimum\": true, " + " \"actual\": -9223372036854775808" + "}}"); + VALIDATE(s, "-9223372036854775807", true); + VALIDATE(s, "18446744073709551614", true); + INVALIDATE(s, "18446744073709551615", "", "maximum", "", + "{ \"maximum\": {" + " \"errorCode\": 3," + " \"instanceRef\": \"#\", \"schemaRef\": \"#\"," + " \"expected\": 18446744073709551615, \"exclusiveMaximum\": true, " + " \"actual\": 18446744073709551615" + "}}"); +} + +TEST(SchemaValidator, Integer_MultipleOf) { + Document sd; + sd.Parse("{\"type\":\"integer\",\"multipleOf\":10}"); + SchemaDocument s(sd); + + VALIDATE(s, "0", true); + VALIDATE(s, "10", true); + VALIDATE(s, "-10", true); + VALIDATE(s, "20", true); + INVALIDATE(s, "23", "", "multipleOf", "", + "{ \"multipleOf\": {" + " \"errorCode\": 1," + " \"instanceRef\": \"#\", \"schemaRef\": \"#\"," + " \"expected\": 10, \"actual\": 23" + "}}"); + INVALIDATE(s, "-23", "", "multipleOf", "", + "{ \"multipleOf\": {" + " \"errorCode\": 1," + " \"instanceRef\": \"#\", \"schemaRef\": \"#\"," + " \"expected\": 10, \"actual\": -23" + "}}"); +} + +TEST(SchemaValidator, Integer_MultipleOf64Boundary) { + Document sd; + sd.Parse("{\"type\":\"integer\",\"multipleOf\":18446744073709551615}"); + SchemaDocument s(sd); + + VALIDATE(s, "0", true); + VALIDATE(s, "18446744073709551615", true); + INVALIDATE(s, "18446744073709551614", "", "multipleOf", "", + "{ \"multipleOf\": {" + " \"errorCode\": 1," + " \"instanceRef\": \"#\", \"schemaRef\": \"#\"," + " \"expected\": 18446744073709551615, \"actual\": 18446744073709551614" + "}}"); +} + +TEST(SchemaValidator, Number_Range) { + Document sd; + sd.Parse("{\"type\":\"number\",\"minimum\":0,\"maximum\":100,\"exclusiveMaximum\":true}"); + SchemaDocument s(sd); + + INVALIDATE(s, "-1", "", "minimum", "", + "{ \"minimum\": {" + " \"errorCode\": 4," + " \"instanceRef\": \"#\", \"schemaRef\": \"#\"," + " \"expected\": 0, \"actual\": -1" + "}}"); + VALIDATE(s, "0", true); + VALIDATE(s, "0.1", true); + VALIDATE(s, "10", true); + VALIDATE(s, "99", true); + VALIDATE(s, "99.9", true); + INVALIDATE(s, "100", "", "maximum", "", + "{ \"maximum\": {" + " \"errorCode\": 3," + " \"instanceRef\": \"#\", \"schemaRef\": \"#\"," + " \"expected\": 100, \"exclusiveMaximum\": true, \"actual\": 100" + "}}"); + INVALIDATE(s, "100.0", "", "maximum", "", + "{ \"maximum\": {" + " \"errorCode\": 3," + " \"instanceRef\": \"#\", \"schemaRef\": \"#\"," + " \"expected\": 100, \"exclusiveMaximum\": true, \"actual\": 100.0" + "}}"); + INVALIDATE(s, "101.5", "", "maximum", "", + "{ \"maximum\": {" + " \"errorCode\": 3," + " \"instanceRef\": \"#\", \"schemaRef\": \"#\"," + " \"expected\": 100, \"exclusiveMaximum\": true, \"actual\": 101.5" + "}}"); +} + +TEST(SchemaValidator, Number_RangeInt) { + Document sd; + sd.Parse("{\"type\":\"number\",\"minimum\":-100,\"maximum\":-1,\"exclusiveMaximum\":true}"); + SchemaDocument s(sd); + + INVALIDATE(s, "-101", "", "minimum", "", + "{ \"minimum\": {" + " \"errorCode\": 4," + " \"instanceRef\": \"#\", \"schemaRef\": \"#\"," + " \"expected\": -100, \"actual\": -101" + "}}"); + INVALIDATE(s, "-100.1", "", "minimum", "", + "{ \"minimum\": {" + " \"errorCode\": 4," + " \"instanceRef\": \"#\", \"schemaRef\": \"#\"," + " \"expected\": -100, \"actual\": -100.1" + "}}"); + VALIDATE(s, "-100", true); + VALIDATE(s, "-2", true); + INVALIDATE(s, "-1", "", "maximum", "", + "{ \"maximum\": {" + " \"errorCode\": 3," + " \"instanceRef\": \"#\", \"schemaRef\": \"#\"," + " \"expected\": -1, \"exclusiveMaximum\": true, \"actual\": -1" + "}}"); + INVALIDATE(s, "-0.9", "", "maximum", "", + "{ \"maximum\": {" + " \"errorCode\": 3," + " \"instanceRef\": \"#\", \"schemaRef\": \"#\"," + " \"expected\": -1, \"exclusiveMaximum\": true, \"actual\": -0.9" + "}}"); + INVALIDATE(s, "0", "", "maximum", "", + "{ \"maximum\": {" + " \"errorCode\": 3," + " \"instanceRef\": \"#\", \"schemaRef\": \"#\"," + " \"expected\": -1, \"exclusiveMaximum\": true, \"actual\": 0" + "}}"); + INVALIDATE(s, "2147483647", "", "maximum", "", + "{ \"maximum\": {" + " \"errorCode\": 3," + " \"instanceRef\": \"#\", \"schemaRef\": \"#\"," + " \"expected\": -1, \"exclusiveMaximum\": true, \"actual\": 2147483647" + "}}"); // int max + INVALIDATE(s, "2147483648", "", "maximum", "", + "{ \"maximum\": {" + " \"errorCode\": 3," + " \"instanceRef\": \"#\", \"schemaRef\": \"#\"," + " \"expected\": -1, \"exclusiveMaximum\": true, \"actual\": 2147483648" + "}}"); // unsigned first + INVALIDATE(s, "4294967295", "", "maximum", "", + "{ \"maximum\": {" + " \"errorCode\": 3," + " \"instanceRef\": \"#\", \"schemaRef\": \"#\"," + " \"expected\": -1, \"exclusiveMaximum\": true, \"actual\": 4294967295" + "}}"); // unsigned max + INVALIDATE(s, "9223372036854775808", "", "maximum", "", + "{ \"maximum\": {" + " \"errorCode\": 3," + " \"instanceRef\": \"#\", \"schemaRef\": \"#\"," + " \"expected\": -1, \"exclusiveMaximum\": true, \"actual\": 9223372036854775808" + "}}"); + INVALIDATE(s, "18446744073709551614", "", "maximum", "", + "{ \"maximum\": {" + " \"errorCode\": 3," + " \"instanceRef\": \"#\", \"schemaRef\": \"#\"," + " \"expected\": -1, \"exclusiveMaximum\": true, \"actual\": 18446744073709551614" + "}}"); + INVALIDATE(s, "18446744073709551615", "", "maximum", "", + "{ \"maximum\": {" + " \"errorCode\": 3," + " \"instanceRef\": \"#\", \"schemaRef\": \"#\"," + " \"expected\": -1, \"exclusiveMaximum\": true, \"actual\": 18446744073709551615" + "}}"); +} + +TEST(SchemaValidator, Number_RangeDouble) { + Document sd; + sd.Parse("{\"type\":\"number\",\"minimum\":0.1,\"maximum\":100.1,\"exclusiveMaximum\":true}"); + SchemaDocument s(sd); + + INVALIDATE(s, "-9223372036854775808", "", "minimum", "", + "{ \"minimum\": {" + " \"errorCode\": 4," + " \"instanceRef\": \"#\", \"schemaRef\": \"#\"," + " \"expected\": 0.1, \"actual\": -9223372036854775808" + "}}"); + INVALIDATE(s, "-2147483648", "", "minimum", "", + "{ \"minimum\": {" + " \"errorCode\": 4," + " \"instanceRef\": \"#\", \"schemaRef\": \"#\"," + " \"expected\": 0.1, \"actual\": -2147483648" + "}}"); // int min + INVALIDATE(s, "-1", "", "minimum", "", + "{ \"minimum\": {" + " \"errorCode\": 4," + " \"instanceRef\": \"#\", \"schemaRef\": \"#\"," + " \"expected\": 0.1, \"actual\": -1" + "}}"); + VALIDATE(s, "0.1", true); + VALIDATE(s, "10", true); + VALIDATE(s, "99", true); + VALIDATE(s, "100", true); + INVALIDATE(s, "101", "", "maximum", "", + "{ \"maximum\": {" + " \"errorCode\": 3," + " \"instanceRef\": \"#\", \"schemaRef\": \"#\"," + " \"expected\": 100.1, \"exclusiveMaximum\": true, \"actual\": 101" + "}}"); + INVALIDATE(s, "101.5", "", "maximum", "", + "{ \"maximum\": {" + " \"errorCode\": 3," + " \"instanceRef\": \"#\", \"schemaRef\": \"#\"," + " \"expected\": 100.1, \"exclusiveMaximum\": true, \"actual\": 101.5" + "}}"); + INVALIDATE(s, "18446744073709551614", "", "maximum", "", + "{ \"maximum\": {" + " \"errorCode\": 3," + " \"instanceRef\": \"#\", \"schemaRef\": \"#\"," + " \"expected\": 100.1, \"exclusiveMaximum\": true, \"actual\": 18446744073709551614" + "}}"); + INVALIDATE(s, "18446744073709551615", "", "maximum", "", + "{ \"maximum\": {" + " \"errorCode\": 3," + " \"instanceRef\": \"#\", \"schemaRef\": \"#\"," + " \"expected\": 100.1, \"exclusiveMaximum\": true, \"actual\": 18446744073709551615" + "}}"); + INVALIDATE(s, "2147483647", "", "maximum", "", + "{ \"maximum\": {" + " \"errorCode\": 3," + " \"instanceRef\": \"#\", \"schemaRef\": \"#\"," + " \"expected\": 100.1, \"exclusiveMaximum\": true, \"actual\": 2147483647" + "}}"); // int max + INVALIDATE(s, "2147483648", "", "maximum", "", + "{ \"maximum\": {" + " \"errorCode\": 3," + " \"instanceRef\": \"#\", \"schemaRef\": \"#\"," + " \"expected\": 100.1, \"exclusiveMaximum\": true, \"actual\": 2147483648" + "}}"); // unsigned first + INVALIDATE(s, "4294967295", "", "maximum", "", + "{ \"maximum\": {" + " \"errorCode\": 3," + " \"instanceRef\": \"#\", \"schemaRef\": \"#\"," + " \"expected\": 100.1, \"exclusiveMaximum\": true, \"actual\": 4294967295" + "}}"); // unsigned max + INVALIDATE(s, "9223372036854775808", "", "maximum", "", + "{ \"maximum\": {" + " \"errorCode\": 3," + " \"instanceRef\": \"#\", \"schemaRef\": \"#\"," + " \"expected\": 100.1, \"exclusiveMaximum\": true, \"actual\": 9223372036854775808" + "}}"); + INVALIDATE(s, "18446744073709551614", "", "maximum", "", + "{ \"maximum\": {" + " \"errorCode\": 3," + " \"instanceRef\": \"#\", \"schemaRef\": \"#\"," + " \"expected\": 100.1, \"exclusiveMaximum\": true, \"actual\": 18446744073709551614" + "}}"); + INVALIDATE(s, "18446744073709551615", "", "maximum", "", + "{ \"maximum\": {" + " \"errorCode\": 3," + " \"instanceRef\": \"#\", \"schemaRef\": \"#\"," + " \"expected\": 100.1, \"exclusiveMaximum\": true, \"actual\": 18446744073709551615" + "}}"); +} + +TEST(SchemaValidator, Number_RangeDoubleU64Boundary) { + Document sd; + sd.Parse("{\"type\":\"number\",\"minimum\":9223372036854775808.0,\"maximum\":18446744073709550000.0}"); + SchemaDocument s(sd); + + INVALIDATE(s, "-9223372036854775808", "", "minimum", "", + "{ \"minimum\": {" + " \"errorCode\": 4," + " \"instanceRef\": \"#\", \"schemaRef\": \"#\"," + " \"expected\": 9223372036854775808.0, \"actual\": -9223372036854775808" + "}}"); + INVALIDATE(s, "-2147483648", "", "minimum", "", + "{ \"minimum\": {" + " \"errorCode\": 4," + " \"instanceRef\": \"#\", \"schemaRef\": \"#\"," + " \"expected\": 9223372036854775808.0, \"actual\": -2147483648" + "}}"); // int min + INVALIDATE(s, "0", "", "minimum", "", + "{ \"minimum\": {" + " \"errorCode\": 4," + " \"instanceRef\": \"#\", \"schemaRef\": \"#\"," + " \"expected\": 9223372036854775808.0, \"actual\": 0" + "}}"); + INVALIDATE(s, "2147483647", "", "minimum", "", + "{ \"minimum\": {" + " \"errorCode\": 4," + " \"instanceRef\": \"#\", \"schemaRef\": \"#\"," + " \"expected\": 9223372036854775808.0, \"actual\": 2147483647" + "}}"); // int max + INVALIDATE(s, "2147483648", "", "minimum", "", + "{ \"minimum\": {" + " \"errorCode\": 4," + " \"instanceRef\": \"#\", \"schemaRef\": \"#\"," + " \"expected\": 9223372036854775808.0, \"actual\": 2147483648" + "}}"); // unsigned first + INVALIDATE(s, "4294967295", "", "minimum", "", + "{ \"minimum\": {" + " \"errorCode\": 4," + " \"instanceRef\": \"#\", \"schemaRef\": \"#\"," + " \"expected\": 9223372036854775808.0, \"actual\": 4294967295" + "}}"); // unsigned max + VALIDATE(s, "9223372036854775808", true); + VALIDATE(s, "18446744073709540000", true); + INVALIDATE(s, "18446744073709551615", "", "maximum", "", + "{ \"maximum\": {" + " \"errorCode\": 2," + " \"instanceRef\": \"#\", \"schemaRef\": \"#\"," + " \"expected\": 18446744073709550000.0, \"actual\": 18446744073709551615" + "}}"); +} + +TEST(SchemaValidator, Number_MultipleOf) { + Document sd; + sd.Parse("{\"type\":\"number\",\"multipleOf\":10.0}"); + SchemaDocument s(sd); + + VALIDATE(s, "0", true); + VALIDATE(s, "10", true); + VALIDATE(s, "-10", true); + VALIDATE(s, "20", true); + INVALIDATE(s, "23", "", "multipleOf", "", + "{ \"multipleOf\": {" + " \"errorCode\": 1," + " \"instanceRef\": \"#\", \"schemaRef\": \"#\"," + " \"expected\": 10.0, \"actual\": 23" + "}}"); + INVALIDATE(s, "-2147483648", "", "multipleOf", "", + "{ \"multipleOf\": {" + " \"errorCode\": 1," + " \"instanceRef\": \"#\", \"schemaRef\": \"#\"," + " \"expected\": 10.0, \"actual\": -2147483648" + "}}"); // int min + VALIDATE(s, "-2147483640", true); + INVALIDATE(s, "2147483647", "", "multipleOf", "", + "{ \"multipleOf\": {" + " \"errorCode\": 1," + " \"instanceRef\": \"#\", \"schemaRef\": \"#\"," + " \"expected\": 10.0, \"actual\": 2147483647" + "}}"); // int max + INVALIDATE(s, "2147483648", "", "multipleOf", "", + "{ \"multipleOf\": {" + " \"errorCode\": 1," + " \"instanceRef\": \"#\", \"schemaRef\": \"#\"," + " \"expected\": 10.0, \"actual\": 2147483648" + "}}"); // unsigned first + VALIDATE(s, "2147483650", true); + INVALIDATE(s, "4294967295", "", "multipleOf", "", + "{ \"multipleOf\": {" + " \"errorCode\": 1," + " \"instanceRef\": \"#\", \"schemaRef\": \"#\"," + " \"expected\": 10.0, \"actual\": 4294967295" + "}}"); // unsigned max + VALIDATE(s, "4294967300", true); +} + +TEST(SchemaValidator, Number_MultipleOfOne) { + Document sd; + sd.Parse("{\"type\":\"number\",\"multipleOf\":1}"); + SchemaDocument s(sd); + + VALIDATE(s, "42", true); + VALIDATE(s, "42.0", true); + INVALIDATE(s, "3.1415926", "", "multipleOf", "", + "{ \"multipleOf\": {" + " \"errorCode\": 1," + " \"instanceRef\": \"#\", \"schemaRef\": \"#\"," + " \"expected\": 1, \"actual\": 3.1415926" + "}}"); +} + +TEST(SchemaValidator, Object) { + Document sd; + sd.Parse("{\"type\":\"object\"}"); + SchemaDocument s(sd); + + VALIDATE(s, "{\"key\":\"value\",\"another_key\":\"another_value\"}", true); + VALIDATE(s, "{\"Sun\":1.9891e30,\"Jupiter\":1.8986e27,\"Saturn\":5.6846e26,\"Neptune\":10.243e25,\"Uranus\":8.6810e25,\"Earth\":5.9736e24,\"Venus\":4.8685e24,\"Mars\":6.4185e23,\"Mercury\":3.3022e23,\"Moon\":7.349e22,\"Pluto\":1.25e22}", true); + INVALIDATE(s, "[\"An\", \"array\", \"not\", \"an\", \"object\"]", "", "type", "", + "{ \"type\": {" + " \"errorCode\": 20," + " \"instanceRef\": \"#\", \"schemaRef\": \"#\"," + " \"expected\": [\"object\"], \"actual\": \"array\"" + "}}"); + INVALIDATE(s, "\"Not an object\"", "", "type", "", + "{ \"type\": {" + " \"errorCode\": 20," + " \"instanceRef\": \"#\", \"schemaRef\": \"#\"," + " \"expected\": [\"object\"], \"actual\": \"string\"" + "}}"); +} + +TEST(SchemaValidator, Object_Properties) { + Document sd; + sd.Parse( + "{" + " \"type\": \"object\"," + " \"properties\" : {" + " \"number\": { \"type\": \"number\" }," + " \"street_name\" : { \"type\": \"string\" }," + " \"street_type\" : { \"type\": \"string\", \"enum\" : [\"Street\", \"Avenue\", \"Boulevard\"] }" + " }" + "}"); + + SchemaDocument s(sd); + + VALIDATE(s, "{ \"number\": 1600, \"street_name\": \"Pennsylvania\", \"street_type\": \"Avenue\" }", true); + INVALIDATE(s, "{ \"number\": \"1600\", \"street_name\": \"Pennsylvania\", \"street_type\": \"Avenue\" }", "/properties/number", "type", "/number", + "{ \"type\": {" + " \"errorCode\": 20," + " \"instanceRef\": \"#/number\", \"schemaRef\": \"#/properties/number\"," + " \"expected\": [\"number\"], \"actual\": \"string\"" + "}}"); + INVALIDATE(s, "{ \"number\": \"One\", \"street_name\": \"Microsoft\", \"street_type\": \"Way\" }", + "/properties/number", "type", "/number", + "{ \"type\": {" + " \"errorCode\": 20," + " \"instanceRef\": \"#/number\", \"schemaRef\": \"#/properties/number\"," + " \"expected\": [\"number\"], \"actual\": \"string\"" + "}}"); // fail fast + VALIDATE(s, "{ \"number\": 1600, \"street_name\": \"Pennsylvania\" }", true); + VALIDATE(s, "{}", true); + VALIDATE(s, "{ \"number\": 1600, \"street_name\": \"Pennsylvania\", \"street_type\": \"Avenue\", \"direction\": \"NW\" }", true); +} + +TEST(SchemaValidator, Object_AdditionalPropertiesBoolean) { + Document sd; + sd.Parse( + "{" + " \"type\": \"object\"," + " \"properties\" : {" + " \"number\": { \"type\": \"number\" }," + " \"street_name\" : { \"type\": \"string\" }," + " \"street_type\" : { \"type\": \"string\"," + " \"enum\" : [\"Street\", \"Avenue\", \"Boulevard\"]" + " }" + " }," + " \"additionalProperties\": false" + "}"); + + SchemaDocument s(sd); + + VALIDATE(s, "{ \"number\": 1600, \"street_name\": \"Pennsylvania\", \"street_type\": \"Avenue\" }", true); + INVALIDATE(s, "{ \"number\": 1600, \"street_name\": \"Pennsylvania\", \"street_type\": \"Avenue\", \"direction\": \"NW\" }", "", "additionalProperties", "/direction", + "{ \"additionalProperties\": {" + " \"errorCode\": 16," + " \"instanceRef\": \"#\", \"schemaRef\": \"#\"," + " \"disallowed\": \"direction\"" + "}}"); +} + +TEST(SchemaValidator, Object_AdditionalPropertiesObject) { + Document sd; + sd.Parse( + "{" + " \"type\": \"object\"," + " \"properties\" : {" + " \"number\": { \"type\": \"number\" }," + " \"street_name\" : { \"type\": \"string\" }," + " \"street_type\" : { \"type\": \"string\"," + " \"enum\" : [\"Street\", \"Avenue\", \"Boulevard\"]" + " }" + " }," + " \"additionalProperties\": { \"type\": \"string\" }" + "}"); + SchemaDocument s(sd); + + VALIDATE(s, "{ \"number\": 1600, \"street_name\": \"Pennsylvania\", \"street_type\": \"Avenue\" }", true); + VALIDATE(s, "{ \"number\": 1600, \"street_name\": \"Pennsylvania\", \"street_type\": \"Avenue\", \"direction\": \"NW\" }", true); + INVALIDATE(s, "{ \"number\": 1600, \"street_name\": \"Pennsylvania\", \"street_type\": \"Avenue\", \"office_number\": 201 }", "/additionalProperties", "type", "/office_number", + "{ \"type\": {" + " \"errorCode\": 20," + " \"instanceRef\": \"#/office_number\", \"schemaRef\": \"#/additionalProperties\"," + " \"expected\": [\"string\"], \"actual\": \"integer\"" + "}}"); +} + +TEST(SchemaValidator, Object_Required) { + Document sd; + sd.Parse( + "{" + " \"type\": \"object\"," + " \"properties\" : {" + " \"name\": { \"type\": \"string\" }," + " \"email\" : { \"type\": \"string\" }," + " \"address\" : { \"type\": \"string\" }," + " \"telephone\" : { \"type\": \"string\" }" + " }," + " \"required\":[\"name\", \"email\"]" + "}"); + SchemaDocument s(sd); + + VALIDATE(s, "{ \"name\": \"William Shakespeare\", \"email\" : \"bill@stratford-upon-avon.co.uk\" }", true); + VALIDATE(s, "{ \"name\": \"William Shakespeare\", \"email\" : \"bill@stratford-upon-avon.co.uk\", \"address\" : \"Henley Street, Stratford-upon-Avon, Warwickshire, England\", \"authorship\" : \"in question\"}", true); + INVALIDATE(s, "{ \"name\": \"William Shakespeare\", \"address\" : \"Henley Street, Stratford-upon-Avon, Warwickshire, England\" }", "", "required", "", + "{ \"required\": {" + " \"errorCode\": 15," + " \"instanceRef\": \"#\", \"schemaRef\": \"#\"," + " \"missing\": [\"email\"]" + "}}"); + INVALIDATE(s, "{}", "", "required", "", + "{ \"required\": {" + " \"errorCode\": 15," + " \"instanceRef\": \"#\", \"schemaRef\": \"#\"," + " \"missing\": [\"name\", \"email\"]" + "}}"); +} + +TEST(SchemaValidator, Object_Required_PassWithDefault) { + Document sd; + sd.Parse( + "{" + " \"type\": \"object\"," + " \"properties\" : {" + " \"name\": { \"type\": \"string\", \"default\": \"William Shakespeare\" }," + " \"email\" : { \"type\": \"string\", \"default\": \"\" }," + " \"address\" : { \"type\": \"string\" }," + " \"telephone\" : { \"type\": \"string\" }" + " }," + " \"required\":[\"name\", \"email\"]" + "}"); + SchemaDocument s(sd); + + VALIDATE(s, "{ \"email\" : \"bill@stratford-upon-avon.co.uk\", \"address\" : \"Henley Street, Stratford-upon-Avon, Warwickshire, England\", \"authorship\" : \"in question\"}", true); + INVALIDATE(s, "{ \"name\": \"William Shakespeare\", \"address\" : \"Henley Street, Stratford-upon-Avon, Warwickshire, England\" }", "", "required", "", + "{ \"required\": {" + " \"errorCode\": 15," + " \"instanceRef\": \"#\", \"schemaRef\": \"#\"," + " \"missing\": [\"email\"]" + "}}"); + INVALIDATE(s, "{}", "", "required", "", + "{ \"required\": {" + " \"errorCode\": 15," + " \"instanceRef\": \"#\", \"schemaRef\": \"#\"," + " \"missing\": [\"email\"]" + "}}"); +} + +TEST(SchemaValidator, Object_PropertiesRange) { + Document sd; + sd.Parse("{\"type\":\"object\", \"minProperties\":2, \"maxProperties\":3}"); + SchemaDocument s(sd); + + INVALIDATE(s, "{}", "", "minProperties", "", + "{ \"minProperties\": {" + " \"errorCode\": 14," + " \"instanceRef\": \"#\", \"schemaRef\": \"#\"," + " \"expected\": 2, \"actual\": 0" + "}}"); + INVALIDATE(s, "{\"a\":0}", "", "minProperties", "", + "{ \"minProperties\": {" + " \"errorCode\": 14," + " \"instanceRef\": \"#\", \"schemaRef\": \"#\"," + " \"expected\": 2, \"actual\": 1" + "}}"); + VALIDATE(s, "{\"a\":0,\"b\":1}", true); + VALIDATE(s, "{\"a\":0,\"b\":1,\"c\":2}", true); + INVALIDATE(s, "{\"a\":0,\"b\":1,\"c\":2,\"d\":3}", "", "maxProperties", "", + "{ \"maxProperties\": {" + " \"errorCode\": 13," + " \"instanceRef\": \"#\", \"schemaRef\": \"#\", " + " \"expected\": 3, \"actual\": 4" + "}}"); +} + +TEST(SchemaValidator, Object_PropertyDependencies) { + Document sd; + sd.Parse( + "{" + " \"type\": \"object\"," + " \"properties\": {" + " \"name\": { \"type\": \"string\" }," + " \"credit_card\": { \"type\": \"number\" }," + " \"cvv_code\": { \"type\": \"number\" }," + " \"billing_address\": { \"type\": \"string\" }" + " }," + " \"required\": [\"name\"]," + " \"dependencies\": {" + " \"credit_card\": [\"cvv_code\", \"billing_address\"]" + " }" + "}"); + SchemaDocument s(sd); + + VALIDATE(s, "{ \"name\": \"John Doe\", \"credit_card\": 5555555555555555, \"cvv_code\": 777, " + "\"billing_address\": \"555 Debtor's Lane\" }", true); + INVALIDATE(s, "{ \"name\": \"John Doe\", \"credit_card\": 5555555555555555 }", "", "dependencies", "", + "{ \"dependencies\": {" + " \"errorCode\": 18," + " \"instanceRef\": \"#\", \"schemaRef\": \"#\"," + " \"errors\": {" + " \"credit_card\": {" + " \"required\": {" + " \"errorCode\": 15," + " \"instanceRef\": \"#\", \"schemaRef\": \"#/dependencies/credit_card\"," + " \"missing\": [\"cvv_code\", \"billing_address\"]" + " } } }" + "}}"); + VALIDATE(s, "{ \"name\": \"John Doe\"}", true); + VALIDATE(s, "{ \"name\": \"John Doe\", \"cvv_code\": 777, \"billing_address\": \"555 Debtor's Lane\" }", true); +} + +TEST(SchemaValidator, Object_SchemaDependencies) { + Document sd; + sd.Parse( + "{" + " \"type\": \"object\"," + " \"properties\" : {" + " \"name\": { \"type\": \"string\" }," + " \"credit_card\" : { \"type\": \"number\" }" + " }," + " \"required\" : [\"name\"]," + " \"dependencies\" : {" + " \"credit_card\": {" + " \"properties\": {" + " \"billing_address\": { \"type\": \"string\" }" + " }," + " \"required\" : [\"billing_address\"]" + " }" + " }" + "}"); + SchemaDocument s(sd); + + VALIDATE(s, "{\"name\": \"John Doe\", \"credit_card\" : 5555555555555555,\"billing_address\" : \"555 Debtor's Lane\"}", true); + INVALIDATE(s, "{\"name\": \"John Doe\", \"credit_card\" : 5555555555555555 }", "", "dependencies", "", + "{ \"dependencies\": {" + " \"errorCode\": 18," + " \"instanceRef\": \"#\", \"schemaRef\": \"#\"," + " \"errors\": {" + " \"credit_card\": {" + " \"required\": {" + " \"errorCode\": 15," + " \"instanceRef\": \"#\", \"schemaRef\": \"#/dependencies/credit_card\"," + " \"missing\": [\"billing_address\"]" + " } } }" + "}}"); + VALIDATE(s, "{\"name\": \"John Doe\", \"billing_address\" : \"555 Debtor's Lane\"}", true); +} + +#if RAPIDJSON_SCHEMA_HAS_REGEX +TEST(SchemaValidator, Object_PatternProperties) { + Document sd; + sd.Parse( + "{" + " \"type\": \"object\"," + " \"patternProperties\": {" + " \"^S_\": { \"type\": \"string\" }," + " \"^I_\": { \"type\": \"integer\" }" + " }" + "}"); + SchemaDocument s(sd); + + VALIDATE(s, "{ \"S_25\": \"This is a string\" }", true); + VALIDATE(s, "{ \"I_0\": 42 }", true); + INVALIDATE(s, "{ \"S_0\": 42 }", "", "patternProperties", "/S_0", + "{ \"type\": {" + " \"errorCode\": 20," + " \"instanceRef\": \"#/S_0\", \"schemaRef\": \"#/patternProperties/%5ES_\"," + " \"expected\": [\"string\"], \"actual\": \"integer\"" + "}}"); + INVALIDATE(s, "{ \"I_42\": \"This is a string\" }", "", "patternProperties", "/I_42", + "{ \"type\": {" + " \"errorCode\": 20," + " \"instanceRef\": \"#/I_42\", \"schemaRef\": \"#/patternProperties/%5EI_\"," + " \"expected\": [\"integer\"], \"actual\": \"string\"" + "}}"); + VALIDATE(s, "{ \"keyword\": \"value\" }", true); +} + +TEST(SchemaValidator, Object_PatternProperties_ErrorConflict) { + Document sd; + sd.Parse( + "{" + " \"type\": \"object\"," + " \"patternProperties\": {" + " \"^I_\": { \"multipleOf\": 5 }," + " \"30$\": { \"multipleOf\": 6 }" + " }" + "}"); + SchemaDocument s(sd); + + VALIDATE(s, "{ \"I_30\": 30 }", true); + INVALIDATE(s, "{ \"I_30\": 7 }", "", "patternProperties", "/I_30", + "{ \"multipleOf\": [" + " {" + " \"errorCode\": 1," + " \"instanceRef\": \"#/I_30\", \"schemaRef\": \"#/patternProperties/%5EI_\"," + " \"expected\": 5, \"actual\": 7" + " }, {" + " \"errorCode\": 1," + " \"instanceRef\": \"#/I_30\", \"schemaRef\": \"#/patternProperties/30%24\"," + " \"expected\": 6, \"actual\": 7" + " }" + "]}"); +} + +TEST(SchemaValidator, Object_Properties_PatternProperties) { + Document sd; + sd.Parse( + "{" + " \"type\": \"object\"," + " \"properties\": {" + " \"I_42\": { \"type\": \"integer\", \"minimum\": 73 }" + " }," + " \"patternProperties\": {" + " \"^I_\": { \"type\": \"integer\", \"multipleOf\": 6 }" + " }" + "}"); + SchemaDocument s(sd); + + VALIDATE(s, "{ \"I_6\": 6 }", true); + VALIDATE(s, "{ \"I_42\": 78 }", true); + INVALIDATE(s, "{ \"I_42\": 42 }", "", "patternProperties", "/I_42", + "{ \"minimum\": {" + " \"errorCode\": 4," + " \"instanceRef\": \"#/I_42\", \"schemaRef\": \"#/properties/I_42\"," + " \"expected\": 73, \"actual\": 42" + "}}"); + INVALIDATE(s, "{ \"I_42\": 7 }", "", "patternProperties", "/I_42", + "{ \"minimum\": {" + " \"errorCode\": 4," + " \"instanceRef\": \"#/I_42\", \"schemaRef\": \"#/properties/I_42\"," + " \"expected\": 73, \"actual\": 7" + " }," + " \"multipleOf\": {" + " \"errorCode\": 1," + " \"instanceRef\": \"#/I_42\", \"schemaRef\": \"#/patternProperties/%5EI_\"," + " \"expected\": 6, \"actual\": 7" + " }" + "}"); +} + +TEST(SchemaValidator, Object_PatternProperties_AdditionalPropertiesObject) { + Document sd; + sd.Parse( + "{" + " \"type\": \"object\"," + " \"properties\": {" + " \"builtin\": { \"type\": \"number\" }" + " }," + " \"patternProperties\": {" + " \"^S_\": { \"type\": \"string\" }," + " \"^I_\": { \"type\": \"integer\" }" + " }," + " \"additionalProperties\": { \"type\": \"string\" }" + "}"); + SchemaDocument s(sd); + + VALIDATE(s, "{ \"builtin\": 42 }", true); + VALIDATE(s, "{ \"keyword\": \"value\" }", true); + INVALIDATE(s, "{ \"keyword\": 42 }", "/additionalProperties", "type", "/keyword", + "{ \"type\": {" + " \"errorCode\": 20," + " \"instanceRef\": \"#/keyword\", \"schemaRef\": \"#/additionalProperties\"," + " \"expected\": [\"string\"], \"actual\": \"integer\"" + "}}"); +} + +// Replaces test Issue285 and tests failure as well as success +TEST(SchemaValidator, Object_PatternProperties_AdditionalPropertiesBoolean) { + Document sd; + sd.Parse( + "{" + " \"type\": \"object\"," + " \"patternProperties\": {" + " \"^S_\": { \"type\": \"string\" }," + " \"^I_\": { \"type\": \"integer\" }" + " }," + " \"additionalProperties\": false" + "}"); + SchemaDocument s(sd); + + VALIDATE(s, "{ \"S_25\": \"This is a string\" }", true); + VALIDATE(s, "{ \"I_0\": 42 }", true); + INVALIDATE(s, "{ \"keyword\": \"value\" }", "", "additionalProperties", "/keyword", + "{ \"additionalProperties\": {" + " \"errorCode\": 16," + " \"instanceRef\": \"#\", \"schemaRef\": \"#\"," + " \"disallowed\": \"keyword\"" + "}}"); +} +#endif + +TEST(SchemaValidator, Array) { + Document sd; + sd.Parse("{\"type\":\"array\"}"); + SchemaDocument s(sd); + + VALIDATE(s, "[1, 2, 3, 4, 5]", true); + VALIDATE(s, "[3, \"different\", { \"types\" : \"of values\" }]", true); + INVALIDATE(s, "{\"Not\": \"an array\"}", "", "type", "", + "{ \"type\": {" + " \"errorCode\": 20," + " \"instanceRef\": \"#\", \"schemaRef\": \"#\"," + " \"expected\": [\"array\"], \"actual\": \"object\"" + "}}"); +} + +TEST(SchemaValidator, Array_ItemsList) { + Document sd; + sd.Parse( + "{" + " \"type\": \"array\"," + " \"items\" : {" + " \"type\": \"number\"" + " }" + "}"); + SchemaDocument s(sd); + + VALIDATE(s, "[1, 2, 3, 4, 5]", true); + INVALIDATE(s, "[1, 2, \"3\", 4, 5]", "/items", "type", "/2", + "{ \"type\": {" + " \"errorCode\": 20," + " \"instanceRef\": \"#/2\", \"schemaRef\": \"#/items\"," + " \"expected\": [\"number\"], \"actual\": \"string\"" + "}}"); + VALIDATE(s, "[]", true); +} + +TEST(SchemaValidator, Array_ItemsTuple) { + Document sd; + sd.Parse( + "{" + " \"type\": \"array\"," + " \"items\": [" + " {" + " \"type\": \"number\"" + " }," + " {" + " \"type\": \"string\"" + " }," + " {" + " \"type\": \"string\"," + " \"enum\": [\"Street\", \"Avenue\", \"Boulevard\"]" + " }," + " {" + " \"type\": \"string\"," + " \"enum\": [\"NW\", \"NE\", \"SW\", \"SE\"]" + " }" + " ]" + "}"); + SchemaDocument s(sd); + + VALIDATE(s, "[1600, \"Pennsylvania\", \"Avenue\", \"NW\"]", true); + INVALIDATE(s, "[24, \"Sussex\", \"Drive\"]", "/items/2", "enum", "/2", + "{ \"enum\": { \"errorCode\": 19, \"instanceRef\": \"#/2\", \"schemaRef\": \"#/items/2\" }}"); + INVALIDATE(s, "[\"Palais de l'Elysee\"]", "/items/0", "type", "/0", + "{ \"type\": {" + " \"errorCode\": 20," + " \"instanceRef\": \"#/0\", \"schemaRef\": \"#/items/0\"," + " \"expected\": [\"number\"], \"actual\": \"string\"" + "}}"); + INVALIDATE(s, "[\"Twenty-four\", \"Sussex\", \"Drive\"]", "/items/0", "type", "/0", + "{ \"type\": {" + " \"errorCode\": 20," + " \"instanceRef\": \"#/0\", \"schemaRef\": \"#/items/0\"," + " \"expected\": [\"number\"], \"actual\": \"string\"" + "}}"); // fail fast + VALIDATE(s, "[10, \"Downing\", \"Street\"]", true); + VALIDATE(s, "[1600, \"Pennsylvania\", \"Avenue\", \"NW\", \"Washington\"]", true); +} + +TEST(SchemaValidator, Array_AdditionalItems) { + Document sd; + sd.Parse( + "{" + " \"type\": \"array\"," + " \"items\": [" + " {" + " \"type\": \"number\"" + " }," + " {" + " \"type\": \"string\"" + " }," + " {" + " \"type\": \"string\"," + " \"enum\": [\"Street\", \"Avenue\", \"Boulevard\"]" + " }," + " {" + " \"type\": \"string\"," + " \"enum\": [\"NW\", \"NE\", \"SW\", \"SE\"]" + " }" + " ]," + " \"additionalItems\": false" + "}"); + SchemaDocument s(sd); + + VALIDATE(s, "[1600, \"Pennsylvania\", \"Avenue\", \"NW\"]", true); + VALIDATE(s, "[1600, \"Pennsylvania\", \"Avenue\"]", true); + INVALIDATE(s, "[1600, \"Pennsylvania\", \"Avenue\", \"NW\", \"Washington\"]", "", "additionalItems", "/4", + "{ \"additionalItems\": {" + " \"errorCode\": 12," + " \"instanceRef\": \"#\", \"schemaRef\": \"#\"," + " \"disallowed\": 4" + "}}"); +} + +TEST(SchemaValidator, Array_ItemsRange) { + Document sd; + sd.Parse("{\"type\": \"array\",\"minItems\": 2,\"maxItems\" : 3}"); + SchemaDocument s(sd); + + INVALIDATE(s, "[]", "", "minItems", "", + "{ \"minItems\": {" + " \"errorCode\": 10," + " \"instanceRef\": \"#\", \"schemaRef\": \"#\"," + " \"expected\": 2, \"actual\": 0" + "}}"); + INVALIDATE(s, "[1]", "", "minItems", "", + "{ \"minItems\": {" + " \"errorCode\": 10," + " \"instanceRef\": \"#\", \"schemaRef\": \"#\"," + " \"expected\": 2, \"actual\": 1" + "}}"); + VALIDATE(s, "[1, 2]", true); + VALIDATE(s, "[1, 2, 3]", true); + INVALIDATE(s, "[1, 2, 3, 4]", "", "maxItems", "", + "{ \"maxItems\": {" + " \"errorCode\": 9," + " \"instanceRef\": \"#\", \"schemaRef\": \"#\"," + " \"expected\": 3, \"actual\": 4" + "}}"); +} + +TEST(SchemaValidator, Array_UniqueItems) { + Document sd; + sd.Parse("{\"type\": \"array\", \"uniqueItems\": true}"); + SchemaDocument s(sd); + + VALIDATE(s, "[1, 2, 3, 4, 5]", true); + INVALIDATE(s, "[1, 2, 3, 3, 4]", "", "uniqueItems", "/3", + "{ \"uniqueItems\": {" + " \"errorCode\": 11," + " \"instanceRef\": \"#\", \"schemaRef\": \"#\"," + " \"duplicates\": [2, 3]" + "}}"); + INVALIDATE(s, "[1, 2, 3, 3, 3]", "", "uniqueItems", "/3", + "{ \"uniqueItems\": {" + " \"errorCode\": 11," + " \"instanceRef\": \"#\", \"schemaRef\": \"#\"," + " \"duplicates\": [2, 3]" + "}}"); // fail fast + VALIDATE(s, "[]", true); +} + +TEST(SchemaValidator, Boolean) { + Document sd; + sd.Parse("{\"type\":\"boolean\"}"); + SchemaDocument s(sd); + + VALIDATE(s, "true", true); + VALIDATE(s, "false", true); + INVALIDATE(s, "\"true\"", "", "type", "", + "{ \"type\": {" + " \"errorCode\": 20," + " \"instanceRef\": \"#\", \"schemaRef\": \"#\"," + " \"expected\": [\"boolean\"], \"actual\": \"string\"" + "}}"); + INVALIDATE(s, "0", "", "type", "", + "{ \"type\": {" + " \"errorCode\": 20," + " \"instanceRef\": \"#\", \"schemaRef\": \"#\"," + " \"expected\": [\"boolean\"], \"actual\": \"integer\"" + "}}"); +} + +TEST(SchemaValidator, Null) { + Document sd; + sd.Parse("{\"type\":\"null\"}"); + SchemaDocument s(sd); + + VALIDATE(s, "null", true); + INVALIDATE(s, "false", "", "type", "", + "{ \"type\": {" + " \"errorCode\": 20," + " \"instanceRef\": \"#\", \"schemaRef\": \"#\"," + " \"expected\": [\"null\"], \"actual\": \"boolean\"" + "}}"); + INVALIDATE(s, "0", "", "type", "", + "{ \"type\": {" + " \"errorCode\": 20," + " \"instanceRef\": \"#\", \"schemaRef\": \"#\"," + " \"expected\": [\"null\"], \"actual\": \"integer\"" + "}}"); + INVALIDATE(s, "\"\"", "", "type", "", + "{ \"type\": {" + " \"errorCode\": 20," + " \"instanceRef\": \"#\", \"schemaRef\": \"#\"," + " \"expected\": [\"null\"], \"actual\": \"string\"" + "}}"); +} + +// Additional tests + +TEST(SchemaValidator, ObjectInArray) { + Document sd; + sd.Parse("{\"type\":\"array\", \"items\": { \"type\":\"string\" }}"); + SchemaDocument s(sd); + + VALIDATE(s, "[\"a\"]", true); + INVALIDATE(s, "[1]", "/items", "type", "/0", + "{ \"type\": {" + " \"errorCode\": 20," + " \"instanceRef\": \"#/0\", \"schemaRef\": \"#/items\"," + " \"expected\": [\"string\"], \"actual\": \"integer\"" + "}}"); + INVALIDATE(s, "[{}]", "/items", "type", "/0", + "{ \"type\": {" + " \"errorCode\": 20," + " \"instanceRef\": \"#/0\", \"schemaRef\": \"#/items\"," + " \"expected\": [\"string\"], \"actual\": \"object\"" + "}}"); +} + +TEST(SchemaValidator, MultiTypeInObject) { + Document sd; + sd.Parse( + "{" + " \"type\":\"object\"," + " \"properties\": {" + " \"tel\" : {" + " \"type\":[\"integer\", \"string\"]" + " }" + " }" + "}"); + SchemaDocument s(sd); + + VALIDATE(s, "{ \"tel\": 999 }", true); + VALIDATE(s, "{ \"tel\": \"123-456\" }", true); + INVALIDATE(s, "{ \"tel\": true }", "/properties/tel", "type", "/tel", + "{ \"type\": {" + " \"errorCode\": 20," + " \"instanceRef\": \"#/tel\", \"schemaRef\": \"#/properties/tel\"," + " \"expected\": [\"string\", \"integer\"], \"actual\": \"boolean\"" + "}}"); +} + +TEST(SchemaValidator, MultiTypeWithObject) { + Document sd; + sd.Parse( + "{" + " \"type\": [\"object\",\"string\"]," + " \"properties\": {" + " \"tel\" : {" + " \"type\": \"integer\"" + " }" + " }" + "}"); + SchemaDocument s(sd); + + VALIDATE(s, "\"Hello\"", true); + VALIDATE(s, "{ \"tel\": 999 }", true); + INVALIDATE(s, "{ \"tel\": \"fail\" }", "/properties/tel", "type", "/tel", + "{ \"type\": {" + " \"errorCode\": 20," + " \"instanceRef\": \"#/tel\", \"schemaRef\": \"#/properties/tel\"," + " \"expected\": [\"integer\"], \"actual\": \"string\"" + "}}"); +} + +TEST(SchemaValidator, AllOf_Nested) { + Document sd; + sd.Parse( + "{" + " \"allOf\": [" + " { \"type\": \"string\", \"minLength\": 2 }," + " { \"type\": \"string\", \"maxLength\": 5 }," + " { \"allOf\": [ { \"enum\" : [\"ok\", \"okay\", \"OK\", \"o\"] }, { \"enum\" : [\"ok\", \"OK\", \"o\"]} ] }" + " ]" + "}"); + SchemaDocument s(sd); + + VALIDATE(s, "\"ok\"", true); + VALIDATE(s, "\"OK\"", true); + INVALIDATE(s, "\"okay\"", "", "allOf", "", + "{ \"allOf\": {" + " \"errors\": [" + " {},{}," + " { \"allOf\": {" + " \"errors\": [" + " {}," + " { \"enum\": {\"errorCode\": 19, \"instanceRef\": \"#\", \"schemaRef\": \"#/allOf/2/allOf/1\" }}" + " ]," + " \"errorCode\": 23, \"instanceRef\": \"#\", \"schemaRef\": \"#/allOf/2\"" + " }}]," + " \"errorCode\": 23, \"instanceRef\": \"#\", \"schemaRef\": \"#\"" + "}}"); + INVALIDATE(s, "\"o\"", "", "allOf", "", + "{ \"allOf\": {" + " \"errors\": [" + " { \"minLength\": {\"actual\": \"o\", \"expected\": 2, \"errorCode\": 7, \"instanceRef\": \"#\", \"schemaRef\": \"#/allOf/0\" }}," + " {},{}" + " ]," + " \"errorCode\": 23, \"instanceRef\": \"#\", \"schemaRef\": \"#\"" + "}}"); + INVALIDATE(s, "\"n\"", "", "allOf", "", + "{ \"allOf\": {" + " \"errors\": [" + " { \"minLength\": {\"actual\": \"n\", \"expected\": 2, \"errorCode\": 7, \"instanceRef\": \"#\", \"schemaRef\": \"#/allOf/0\" }}," + " {}," + " { \"allOf\": {" + " \"errors\": [" + " { \"enum\": {\"errorCode\": 19 ,\"instanceRef\": \"#\", \"schemaRef\": \"#/allOf/2/allOf/0\"}}," + " { \"enum\": {\"errorCode\": 19, \"instanceRef\": \"#\", \"schemaRef\": \"#/allOf/2/allOf/1\"}}" + " ]," + " \"errorCode\": 23, \"instanceRef\": \"#\", \"schemaRef\": \"#/allOf/2\"" + " }}" + " ]," + " \"errorCode\":23,\"instanceRef\":\"#\",\"schemaRef\":\"#\"" + "}}"); + INVALIDATE(s, "\"too long\"", "", "allOf", "", + "{ \"allOf\": {" + " \"errors\": [" + " {}," + " { \"maxLength\": {\"actual\": \"too long\", \"expected\": 5, \"errorCode\": 6, \"instanceRef\": \"#\", \"schemaRef\": \"#/allOf/1\" }}," + " { \"allOf\": {" + " \"errors\": [" + " { \"enum\": {\"errorCode\": 19 ,\"instanceRef\": \"#\", \"schemaRef\": \"#/allOf/2/allOf/0\"}}," + " { \"enum\": {\"errorCode\": 19, \"instanceRef\": \"#\", \"schemaRef\": \"#/allOf/2/allOf/1\"}}" + " ]," + " \"errorCode\": 23, \"instanceRef\": \"#\", \"schemaRef\": \"#/allOf/2\"" + " }}" + " ]," + " \"errorCode\":23,\"instanceRef\":\"#\",\"schemaRef\":\"#\"" + "}}"); + INVALIDATE(s, "123", "", "allOf", "", + "{ \"allOf\": {" + " \"errors\": [" + " {\"type\": {\"expected\": [\"string\"], \"actual\": \"integer\", \"errorCode\": 20, \"instanceRef\": \"#\", \"schemaRef\": \"#/allOf/0\"}}," + " {\"type\": {\"expected\": [\"string\"], \"actual\": \"integer\", \"errorCode\": 20, \"instanceRef\": \"#\", \"schemaRef\": \"#/allOf/1\"}}," + " { \"allOf\": {" + " \"errors\": [" + " { \"enum\": {\"errorCode\": 19 ,\"instanceRef\": \"#\", \"schemaRef\": \"#/allOf/2/allOf/0\"}}," + " { \"enum\": {\"errorCode\": 19, \"instanceRef\": \"#\", \"schemaRef\": \"#/allOf/2/allOf/1\"}}" + " ]," + " \"errorCode\": 23, \"instanceRef\": \"#\", \"schemaRef\": \"#/allOf/2\"" + " }}" + " ]," + " \"errorCode\":23,\"instanceRef\":\"#\",\"schemaRef\":\"#\"" + "}}"); +} + +TEST(SchemaValidator, EscapedPointer) { + Document sd; + sd.Parse( + "{" + " \"type\": \"object\"," + " \"properties\": {" + " \"~/\": { \"type\": \"number\" }" + " }" + "}"); + SchemaDocument s(sd); + INVALIDATE(s, "{\"~/\":true}", "/properties/~0~1", "type", "/~0~1", + "{ \"type\": {" + " \"errorCode\": 20," + " \"instanceRef\": \"#/~0~1\", \"schemaRef\": \"#/properties/~0~1\"," + " \"expected\": [\"number\"], \"actual\": \"boolean\"" + "}}"); +} + +TEST(SchemaValidator, SchemaPointer) { + Document sd; + sd.Parse( + "{" + " \"swagger\": \"2.0\"," + " \"paths\": {" + " \"/some/path\": {" + " \"post\": {" + " \"parameters\": [" + " {" + " \"in\": \"body\"," + " \"name\": \"body\"," + " \"schema\": {" + " \"properties\": {" + " \"a\": {" + " \"$ref\": \"#/definitions/Prop_a\"" + " }," + " \"b\": {" + " \"type\": \"integer\"" + " }" + " }," + " \"type\": \"object\"" + " }" + " }" + " ]," + " \"responses\": {" + " \"200\": {" + " \"schema\": {" + " \"$ref\": \"#/definitions/Resp_200\"" + " }" + " }" + " }" + " }" + " }" + " }," + " \"definitions\": {" + " \"Prop_a\": {" + " \"properties\": {" + " \"c\": {" + " \"enum\": [" + " \"C1\"," + " \"C2\"," + " \"C3\"" + " ]," + " \"type\": \"string\"" + " }," + " \"d\": {" + " \"$ref\": \"#/definitions/Prop_d\"" + " }," + " \"s\": {" + " \"type\": \"string\"" + " }" + " }," + " \"required\": [\"c\"]," + " \"type\": \"object\"" + " }," + " \"Prop_d\": {" + " \"properties\": {" + " \"a\": {" + " \"$ref\": \"#/definitions/Prop_a\"" + " }," + " \"c\": {" + " \"$ref\": \"#/definitions/Prop_a/properties/c\"" + " }" + " }," + " \"type\": \"object\"" + " }," + " \"Resp_200\": {" + " \"properties\": {" + " \"e\": {" + " \"type\": \"string\"" + " }," + " \"f\": {" + " \"type\": \"boolean\"" + " }," + " \"cyclic_source\": {" + " \"$ref\": \"#/definitions/Resp_200/properties/cyclic_target\"" + " }," + " \"cyclic_target\": {" + " \"$ref\": \"#/definitions/Resp_200/properties/cyclic_source\"" + " }" + " }," + " \"type\": \"object\"" + " }" + " }" + "}"); + SchemaDocument s1(sd, NULL, 0, NULL, NULL, Pointer("#/paths/~1some~1path/post/parameters/0/schema")); + VALIDATE(s1, + "{" + " \"a\": {" + " \"c\": \"C1\"," + " \"d\": {" + " \"a\": {" + " \"c\": \"C2\"" + " }," + " \"c\": \"C3\"" + " }" + " }," + " \"b\": 123" + "}", + true); + INVALIDATE(s1, + "{" + " \"a\": {" + " \"c\": \"C1\"," + " \"d\": {" + " \"a\": {" + " \"c\": \"C2\"" + " }," + " \"c\": \"C3\"" + " }" + " }," + " \"b\": \"should be an int\"" + "}", + "#/paths/~1some~1path/post/parameters/0/schema/properties/b", "type", "#/b", + "{ \"type\": {" + " \"errorCode\": 20," + " \"instanceRef\":\"#/b\"," + " \"schemaRef\":\"#/paths/~1some~1path/post/parameters/0/schema/properties/b\"," + " \"expected\": [\"integer\"], \"actual\":\"string\"" + "}}"); + INVALIDATE(s1, + "{" + " \"a\": {" + " \"c\": \"C1\"," + " \"d\": {" + " \"a\": {" + " \"c\": \"should be within enum\"" + " }," + " \"c\": \"C3\"" + " }" + " }," + " \"b\": 123" + "}", + "#/definitions/Prop_a/properties/c", "enum", "#/a/d/a/c", + "{ \"enum\": {" + " \"errorCode\": 19," + " \"instanceRef\":\"#/a/d/a/c\"," + " \"schemaRef\":\"#/definitions/Prop_a/properties/c\"" + "}}"); + INVALIDATE(s1, + "{" + " \"a\": {" + " \"c\": \"C1\"," + " \"d\": {" + " \"a\": {" + " \"s\": \"required 'c' is missing\"" + " }" + " }" + " }," + " \"b\": 123" + "}", + "#/definitions/Prop_a", "required", "#/a/d/a", + "{ \"required\": {" + " \"errorCode\": 15," + " \"missing\":[\"c\"]," + " \"instanceRef\":\"#/a/d/a\"," + " \"schemaRef\":\"#/definitions/Prop_a\"" + "}}"); + SchemaDocument s2(sd, NULL, 0, NULL, NULL, Pointer("#/paths/~1some~1path/post/responses/200/schema")); + VALIDATE(s2, + "{ \"e\": \"some string\", \"f\": false }", + true); + INVALIDATE(s2, + "{ \"e\": true, \"f\": false }", + "#/definitions/Resp_200/properties/e", "type", "#/e", + "{ \"type\": {" + " \"errorCode\": 20," + " \"instanceRef\":\"#/e\"," + " \"schemaRef\":\"#/definitions/Resp_200/properties/e\"," + " \"expected\": [\"string\"], \"actual\":\"boolean\"" + "}}"); + INVALIDATE(s2, + "{ \"e\": \"some string\", \"f\": 123 }", + "#/definitions/Resp_200/properties/f", "type", "#/f", + "{ \"type\": {" + " \"errorCode\": 20," + " \"instanceRef\":\"#/f\"," + " \"schemaRef\":\"#/definitions/Resp_200/properties/f\"," + " \"expected\": [\"boolean\"], \"actual\":\"integer\"" + "}}"); +} + +template +static char* ReadFile(const char* filename, Allocator& allocator) { + const char *paths[] = { + "", + "bin/", + "../bin/", + "../../bin/", + "../../../bin/" + }; + char buffer[1024]; + FILE *fp = 0; + for (size_t i = 0; i < sizeof(paths) / sizeof(paths[0]); i++) { + sprintf(buffer, "%s%s", paths[i], filename); + fp = fopen(buffer, "rb"); + if (fp) + break; + } + + if (!fp) + return 0; + + fseek(fp, 0, SEEK_END); + size_t length = static_cast(ftell(fp)); + fseek(fp, 0, SEEK_SET); + char* json = reinterpret_cast(allocator.Malloc(length + 1)); + size_t readLength = fread(json, 1, length, fp); + json[readLength] = '\0'; + fclose(fp); + return json; +} + +TEST(SchemaValidator, ValidateMetaSchema) { + CrtAllocator allocator; + char* json = ReadFile("draft-04/schema", allocator); + Document d; + d.Parse(json); + ASSERT_FALSE(d.HasParseError()); + SchemaDocument sd(d); + SchemaValidator validator(sd); + d.Accept(validator); + if (!validator.IsValid()) { + StringBuffer sb; + validator.GetInvalidSchemaPointer().StringifyUriFragment(sb); + printf("Invalid schema: %s\n", sb.GetString()); + printf("Invalid keyword: %s\n", validator.GetInvalidSchemaKeyword()); + printf("Invalid code: %d\n", validator.GetInvalidSchemaCode()); + printf("Invalid message: %s\n", GetValidateError_En(validator.GetInvalidSchemaCode())); + sb.Clear(); + validator.GetInvalidDocumentPointer().StringifyUriFragment(sb); + printf("Invalid document: %s\n", sb.GetString()); + sb.Clear(); + Writer w(sb); + validator.GetError().Accept(w); + printf("Validation error: %s\n", sb.GetString()); + ADD_FAILURE(); + } + CrtAllocator::Free(json); +} + +TEST(SchemaValidator, ValidateMetaSchema_UTF16) { + typedef GenericDocument > D; + typedef GenericSchemaDocument SD; + typedef GenericSchemaValidator SV; + + CrtAllocator allocator; + char* json = ReadFile("draft-04/schema", allocator); + + D d; + StringStream ss(json); + d.ParseStream<0, UTF8<> >(ss); + ASSERT_FALSE(d.HasParseError()); + SD sd(d); + SV validator(sd); + d.Accept(validator); + if (!validator.IsValid()) { + GenericStringBuffer > sb; + validator.GetInvalidSchemaPointer().StringifyUriFragment(sb); + wprintf(L"Invalid schema: %ls\n", sb.GetString()); + wprintf(L"Invalid keyword: %ls\n", validator.GetInvalidSchemaKeyword()); + sb.Clear(); + validator.GetInvalidDocumentPointer().StringifyUriFragment(sb); + wprintf(L"Invalid document: %ls\n", sb.GetString()); + sb.Clear(); + Writer >, UTF16<> > w(sb); + validator.GetError().Accept(w); + printf("Validation error: %ls\n", sb.GetString()); + ADD_FAILURE(); + } + CrtAllocator::Free(json); +} + +template +class RemoteSchemaDocumentProvider : public IGenericRemoteSchemaDocumentProvider { +public: + RemoteSchemaDocumentProvider() : + documentAllocator_(documentBuffer_, sizeof(documentBuffer_)), + schemaAllocator_(schemaBuffer_, sizeof(schemaBuffer_)) + { + const char* filenames[kCount] = { + "jsonschema/remotes/integer.json", + "jsonschema/remotes/subSchemas.json", + "jsonschema/remotes/folder/folderInteger.json", + "draft-04/schema", + "unittestschema/address.json" + }; + const char* uris[kCount] = { + "http://localhost:1234/integer.json", + "http://localhost:1234/subSchemas.json", + "http://localhost:1234/folder/folderInteger.json", + "http://json-schema.org/draft-04/schema", + "http://localhost:1234/address.json" + }; + + for (size_t i = 0; i < kCount; i++) { + sd_[i] = 0; + + char jsonBuffer[8192]; + MemoryPoolAllocator<> jsonAllocator(jsonBuffer, sizeof(jsonBuffer)); + char* json = ReadFile(filenames[i], jsonAllocator); + if (!json) { + printf("json remote file %s not found", filenames[i]); + ADD_FAILURE(); + } + else { + char stackBuffer[4096]; + MemoryPoolAllocator<> stackAllocator(stackBuffer, sizeof(stackBuffer)); + DocumentType d(&documentAllocator_, 1024, &stackAllocator); + d.Parse(json); + sd_[i] = new SchemaDocumentType(d, uris[i], static_cast(strlen(uris[i])), 0, &schemaAllocator_); + MemoryPoolAllocator<>::Free(json); + } + }; + } + + ~RemoteSchemaDocumentProvider() { + for (size_t i = 0; i < kCount; i++) + delete sd_[i]; + } + + virtual const SchemaDocumentType* GetRemoteDocument(const char* uri, SizeType length) { + for (size_t i = 0; i < kCount; i++) + if (typename SchemaDocumentType::SValue(uri, length) == sd_[i]->GetURI()) + return sd_[i]; + return 0; + } + +private: + typedef GenericDocument, MemoryPoolAllocator<> > DocumentType; + + RemoteSchemaDocumentProvider(const RemoteSchemaDocumentProvider&); + RemoteSchemaDocumentProvider& operator=(const RemoteSchemaDocumentProvider&); + + static const size_t kCount = 5; + SchemaDocumentType* sd_[kCount]; + typename DocumentType::AllocatorType documentAllocator_; + typename SchemaDocumentType::AllocatorType schemaAllocator_; + char documentBuffer_[16384]; + char schemaBuffer_[128u * 1024]; +}; + +TEST(SchemaValidator, TestSuite) { + const char* filenames[] = { + "additionalItems.json", + "additionalProperties.json", + "allOf.json", + "anyOf.json", + "default.json", + "definitions.json", + "dependencies.json", + "enum.json", + "items.json", + "maximum.json", + "maxItems.json", + "maxLength.json", + "maxProperties.json", + "minimum.json", + "minItems.json", + "minLength.json", + "minProperties.json", + "multipleOf.json", + "not.json", + "oneOf.json", + "pattern.json", + "patternProperties.json", + "properties.json", + "ref.json", + "refRemote.json", + "required.json", + "type.json", + "uniqueItems.json" + }; + + const char* onlyRunDescription = 0; + //const char* onlyRunDescription = "a string is a string"; + + unsigned testCount = 0; + unsigned passCount = 0; + + typedef GenericSchemaDocument > SchemaDocumentType; + RemoteSchemaDocumentProvider provider; + + char jsonBuffer[65536]; + char documentBuffer[65536]; + char documentStackBuffer[65536]; + char schemaBuffer[65536]; + char validatorBuffer[65536]; + MemoryPoolAllocator<> jsonAllocator(jsonBuffer, sizeof(jsonBuffer)); + MemoryPoolAllocator<> documentAllocator(documentBuffer, sizeof(documentBuffer)); + MemoryPoolAllocator<> documentStackAllocator(documentStackBuffer, sizeof(documentStackBuffer)); + MemoryPoolAllocator<> schemaAllocator(schemaBuffer, sizeof(schemaBuffer)); + MemoryPoolAllocator<> validatorAllocator(validatorBuffer, sizeof(validatorBuffer)); + + for (size_t i = 0; i < sizeof(filenames) / sizeof(filenames[0]); i++) { + char filename[FILENAME_MAX]; + sprintf(filename, "jsonschema/tests/draft4/%s", filenames[i]); + char* json = ReadFile(filename, jsonAllocator); + if (!json) { + printf("json test suite file %s not found", filename); + ADD_FAILURE(); + } + else { + //printf("\njson test suite file %s parsed ok\n", filename); + GenericDocument, MemoryPoolAllocator<>, MemoryPoolAllocator<> > d(&documentAllocator, 1024, &documentStackAllocator); + d.Parse(json); + if (d.HasParseError()) { + printf("json test suite file %s has parse error", filename); + ADD_FAILURE(); + } + else { + for (Value::ConstValueIterator schemaItr = d.Begin(); schemaItr != d.End(); ++schemaItr) { + { + const char* description1 = (*schemaItr)["description"].GetString(); + //printf("\ncompiling schema for json test %s \n", description1); + SchemaDocumentType schema((*schemaItr)["schema"], filenames[i], static_cast(strlen(filenames[i])), &provider, &schemaAllocator); + GenericSchemaValidator >, MemoryPoolAllocator<> > validator(schema, &validatorAllocator); + const Value& tests = (*schemaItr)["tests"]; + for (Value::ConstValueIterator testItr = tests.Begin(); testItr != tests.End(); ++testItr) { + const char* description2 = (*testItr)["description"].GetString(); + //printf("running json test %s \n", description2); + if (!onlyRunDescription || strcmp(description2, onlyRunDescription) == 0) { + const Value& data = (*testItr)["data"]; + bool expected = (*testItr)["valid"].GetBool(); + testCount++; + validator.Reset(); + data.Accept(validator); + bool actual = validator.IsValid(); + if (expected != actual) + printf("Fail: %30s \"%s\" \"%s\"\n", filename, description1, description2); + else { + //printf("Passed: %30s \"%s\" \"%s\"\n", filename, description1, description2); + passCount++; + } + } + } + //printf("%zu %zu %zu\n", documentAllocator.Size(), schemaAllocator.Size(), validatorAllocator.Size()); + } + schemaAllocator.Clear(); + validatorAllocator.Clear(); + } + } + } + documentAllocator.Clear(); + MemoryPoolAllocator<>::Free(json); + jsonAllocator.Clear(); + } + printf("%d / %d passed (%2d%%)\n", passCount, testCount, passCount * 100 / testCount); + if (passCount != testCount) + ADD_FAILURE(); +} + +TEST(SchemaValidatingReader, Simple) { + Document sd; + sd.Parse("{ \"type\": \"string\", \"enum\" : [\"red\", \"amber\", \"green\"] }"); + SchemaDocument s(sd); + + Document d; + StringStream ss("\"red\""); + SchemaValidatingReader > reader(ss, s); + d.Populate(reader); + EXPECT_TRUE(reader.GetParseResult()); + EXPECT_TRUE(reader.IsValid()); + EXPECT_TRUE(d.IsString()); + EXPECT_STREQ("red", d.GetString()); +} + +TEST(SchemaValidatingReader, Invalid) { + Document sd; + sd.Parse("{\"type\":\"string\",\"minLength\":2,\"maxLength\":3}"); + SchemaDocument s(sd); + + Document d; + StringStream ss("\"ABCD\""); + SchemaValidatingReader > reader(ss, s); + d.Populate(reader); + EXPECT_FALSE(reader.GetParseResult()); + EXPECT_FALSE(reader.IsValid()); + EXPECT_EQ(kParseErrorTermination, reader.GetParseResult().Code()); + EXPECT_STREQ("maxLength", reader.GetInvalidSchemaKeyword()); + EXPECT_TRUE(reader.GetInvalidSchemaCode() == kValidateErrorMaxLength); + EXPECT_TRUE(reader.GetInvalidSchemaPointer() == SchemaDocument::PointerType("")); + EXPECT_TRUE(reader.GetInvalidDocumentPointer() == SchemaDocument::PointerType("")); + EXPECT_TRUE(d.IsNull()); + Document e; + e.Parse( + "{ \"maxLength\": {" + " \"errorCode\": 6," + " \"instanceRef\": \"#\", \"schemaRef\": \"#\"," + " \"expected\": 3, \"actual\": \"ABCD\"" + "}}"); + if (e != reader.GetError()) { + ADD_FAILURE(); + } +} + +TEST(SchemaValidatingWriter, Simple) { + Document sd; + sd.Parse("{\"type\":\"string\",\"minLength\":2,\"maxLength\":3}"); + SchemaDocument s(sd); + + Document d; + StringBuffer sb; + Writer writer(sb); + GenericSchemaValidator > validator(s, writer); + + d.Parse("\"red\""); + EXPECT_TRUE(d.Accept(validator)); + EXPECT_TRUE(validator.IsValid()); + EXPECT_STREQ("\"red\"", sb.GetString()); + + sb.Clear(); + validator.Reset(); + d.Parse("\"ABCD\""); + EXPECT_FALSE(d.Accept(validator)); + EXPECT_FALSE(validator.IsValid()); + EXPECT_TRUE(validator.GetInvalidSchemaPointer() == SchemaDocument::PointerType("")); + EXPECT_TRUE(validator.GetInvalidDocumentPointer() == SchemaDocument::PointerType("")); + EXPECT_TRUE(validator.GetInvalidSchemaCode() == kValidateErrorMaxLength); + Document e; + e.Parse( + "{ \"maxLength\": {" +" \"errorCode\": 6," + " \"instanceRef\": \"#\", \"schemaRef\": \"#\"," + " \"expected\": 3, \"actual\": \"ABCD\"" + "}}"); + EXPECT_EQ(e, validator.GetError()); +} + +TEST(Schema, Issue848) { + rapidjson::Document d; + rapidjson::SchemaDocument s(d); + rapidjson::GenericSchemaValidator v(s); +} + +#if RAPIDJSON_HAS_CXX11_RVALUE_REFS + +static SchemaDocument ReturnSchemaDocument() { + Document sd; + sd.Parse("{ \"type\": [\"number\", \"string\"] }"); + SchemaDocument s(sd); + return s; +} + +TEST(Schema, Issue552) { + SchemaDocument s = ReturnSchemaDocument(); + VALIDATE(s, "42", true); + VALIDATE(s, "\"Life, the universe, and everything\"", true); + INVALIDATE(s, "[\"Life\", \"the universe\", \"and everything\"]", "", "type", "", + "{ \"type\": {" + " \"errorCode\": 20," + " \"instanceRef\": \"#\", \"schemaRef\": \"#\"," + " \"expected\": [\"string\", \"number\"], \"actual\": \"array\"" + "}}"); +} + +#endif // RAPIDJSON_HAS_CXX11_RVALUE_REFS + +TEST(SchemaValidator, Issue608) { + Document sd; + sd.Parse("{\"required\": [\"a\", \"b\"] }"); + SchemaDocument s(sd); + + VALIDATE(s, "{\"a\" : null, \"b\": null}", true); + INVALIDATE(s, "{\"a\" : null, \"a\" : null}", "", "required", "", + "{ \"required\": {" + " \"errorCode\": 15," + " \"instanceRef\": \"#\", \"schemaRef\": \"#\"," + " \"missing\": [\"b\"]" + "}}"); +} + +// Fail to resolve $ref in allOf causes crash in SchemaValidator::StartObject() +TEST(SchemaValidator, Issue728_AllOfRef) { + Document sd; + sd.Parse("{\"allOf\": [{\"$ref\": \"#/abc\"}]}"); + SchemaDocument s(sd); + VALIDATE(s, "{\"key1\": \"abc\", \"key2\": \"def\"}", true); +} + +TEST(SchemaValidator, Issue1017_allOfHandler) { + Document sd; + sd.Parse("{\"allOf\": [{\"type\": \"object\",\"properties\": {\"cyanArray2\": {\"type\": \"array\",\"items\": { \"type\": \"string\" }}}},{\"type\": \"object\",\"properties\": {\"blackArray\": {\"type\": \"array\",\"items\": { \"type\": \"string\" }}},\"required\": [ \"blackArray\" ]}]}"); + SchemaDocument s(sd); + StringBuffer sb; + Writer writer(sb); + GenericSchemaValidator > validator(s, writer); + EXPECT_TRUE(validator.StartObject()); + EXPECT_TRUE(validator.Key("cyanArray2", 10, false)); + EXPECT_TRUE(validator.StartArray()); + EXPECT_TRUE(validator.EndArray(0)); + EXPECT_TRUE(validator.Key("blackArray", 10, false)); + EXPECT_TRUE(validator.StartArray()); + EXPECT_TRUE(validator.EndArray(0)); + EXPECT_TRUE(validator.EndObject(0)); + EXPECT_TRUE(validator.IsValid()); + EXPECT_STREQ("{\"cyanArray2\":[],\"blackArray\":[]}", sb.GetString()); +} + +TEST(SchemaValidator, Ref_remote) { + typedef GenericSchemaDocument > SchemaDocumentType; + RemoteSchemaDocumentProvider provider; + Document sd; + sd.Parse("{\"$ref\": \"http://localhost:1234/subSchemas.json#/integer\"}"); + SchemaDocumentType s(sd, 0, 0, &provider); + typedef GenericSchemaValidator >, MemoryPoolAllocator<> > SchemaValidatorType; + typedef GenericPointer > PointerType; + INVALIDATE_(s, "null", "/integer", "type", "", + "{ \"type\": {" + " \"errorCode\": 20," + " \"instanceRef\": \"#\"," + " \"schemaRef\": \"http://localhost:1234/subSchemas.json#/integer\"," + " \"expected\": [\"integer\"], \"actual\": \"null\"" + "}}", + kValidateDefaultFlags, SchemaValidatorType, PointerType); +} + +// Merge with id where $ref is full URI +TEST(SchemaValidator, Ref_remote_change_resolution_scope_uri) { + typedef GenericSchemaDocument > SchemaDocumentType; + RemoteSchemaDocumentProvider provider; + Document sd; + sd.Parse("{\"id\": \"http://ignore/blah#/ref\", \"type\": \"object\", \"properties\": {\"myInt\": {\"$ref\": \"http://localhost:1234/subSchemas.json#/integer\"}}}"); + SchemaDocumentType s(sd, 0, 0, &provider); + typedef GenericSchemaValidator >, MemoryPoolAllocator<> > SchemaValidatorType; + typedef GenericPointer > PointerType; + INVALIDATE_(s, "{\"myInt\": null}", "/integer", "type", "/myInt", + "{ \"type\": {" + " \"errorCode\": 20," + " \"instanceRef\": \"#/myInt\"," + " \"schemaRef\": \"http://localhost:1234/subSchemas.json#/integer\"," + " \"expected\": [\"integer\"], \"actual\": \"null\"" + "}}", + kValidateDefaultFlags, SchemaValidatorType, PointerType); +} + +// Merge with id where $ref is a relative path +TEST(SchemaValidator, Ref_remote_change_resolution_scope_relative_path) { + typedef GenericSchemaDocument > SchemaDocumentType; + RemoteSchemaDocumentProvider provider; + Document sd; + sd.Parse("{\"id\": \"http://localhost:1234/\", \"type\": \"object\", \"properties\": {\"myInt\": {\"$ref\": \"subSchemas.json#/integer\"}}}"); + SchemaDocumentType s(sd, 0, 0, &provider); + typedef GenericSchemaValidator >, MemoryPoolAllocator<> > SchemaValidatorType; + typedef GenericPointer > PointerType; + INVALIDATE_(s, "{\"myInt\": null}", "/integer", "type", "/myInt", + "{ \"type\": {" + " \"errorCode\": 20," + " \"instanceRef\": \"#/myInt\"," + " \"schemaRef\": \"http://localhost:1234/subSchemas.json#/integer\"," + " \"expected\": [\"integer\"], \"actual\": \"null\"" + "}}", + kValidateDefaultFlags, SchemaValidatorType, PointerType); +} + +// Merge with id where $ref is an absolute path +TEST(SchemaValidator, Ref_remote_change_resolution_scope_absolute_path) { + typedef GenericSchemaDocument > SchemaDocumentType; + RemoteSchemaDocumentProvider provider; + Document sd; + sd.Parse("{\"id\": \"http://localhost:1234/xxxx\", \"type\": \"object\", \"properties\": {\"myInt\": {\"$ref\": \"/subSchemas.json#/integer\"}}}"); + SchemaDocumentType s(sd, 0, 0, &provider); + typedef GenericSchemaValidator >, MemoryPoolAllocator<> > SchemaValidatorType; + typedef GenericPointer > PointerType; + INVALIDATE_(s, "{\"myInt\": null}", "/integer", "type", "/myInt", + "{ \"type\": {" + " \"errorCode\": 20," + " \"instanceRef\": \"#/myInt\"," + " \"schemaRef\": \"http://localhost:1234/subSchemas.json#/integer\"," + " \"expected\": [\"integer\"], \"actual\": \"null\"" + "}}", + kValidateDefaultFlags, SchemaValidatorType, PointerType); +} + +// Merge with id where $ref is an absolute path, and the document has a base URI +TEST(SchemaValidator, Ref_remote_change_resolution_scope_absolute_path_document) { + typedef GenericSchemaDocument > SchemaDocumentType; + RemoteSchemaDocumentProvider provider; + Document sd; + sd.Parse("{\"type\": \"object\", \"properties\": {\"myInt\": {\"$ref\": \"/subSchemas.json#/integer\"}}}"); + SchemaDocumentType s(sd, "http://localhost:1234/xxxx", 26, &provider); + typedef GenericSchemaValidator >, MemoryPoolAllocator<> > SchemaValidatorType; + typedef GenericPointer > PointerType; + INVALIDATE_(s, "{\"myInt\": null}", "/integer", "type", "/myInt", + "{ \"type\": {" + " \"errorCode\": 20," + " \"instanceRef\": \"#/myInt\"," + " \"schemaRef\": \"http://localhost:1234/subSchemas.json#/integer\"," + " \"expected\": [\"integer\"], \"actual\": \"null\"" + "}}", + kValidateDefaultFlags, SchemaValidatorType, PointerType); +} + +// $ref is a non-JSON pointer fragment and there a matching id +TEST(SchemaValidator, Ref_internal_id_1) { + typedef GenericSchemaDocument > SchemaDocumentType; + Document sd; + sd.Parse("{\"type\": \"object\", \"properties\": {\"myInt1\": {\"$ref\": \"#myId\"}, \"myStr\": {\"type\": \"string\", \"id\": \"#myStrId\"}, \"myInt2\": {\"type\": \"integer\", \"id\": \"#myId\"}}}"); + SchemaDocumentType s(sd); + typedef GenericSchemaValidator >, MemoryPoolAllocator<> > SchemaValidatorType; + typedef GenericPointer > PointerType; + INVALIDATE_(s, "{\"myInt1\": null}", "/properties/myInt2", "type", "/myInt1", + "{ \"type\": {" + " \"errorCode\": 20," + " \"instanceRef\": \"#/myInt1\"," + " \"schemaRef\": \"#/properties/myInt2\"," + " \"expected\": [\"integer\"], \"actual\": \"null\"" + "}}", + kValidateDefaultFlags, SchemaValidatorType, PointerType); +} + +// $ref is a non-JSON pointer fragment and there are two matching ids so we take the first +TEST(SchemaValidator, Ref_internal_id_2) { + typedef GenericSchemaDocument > SchemaDocumentType; + Document sd; + sd.Parse("{\"type\": \"object\", \"properties\": {\"myInt1\": {\"$ref\": \"#myId\"}, \"myInt2\": {\"type\": \"integer\", \"id\": \"#myId\"}, \"myStr\": {\"type\": \"string\", \"id\": \"#myId\"}}}"); + SchemaDocumentType s(sd); + typedef GenericSchemaValidator >, MemoryPoolAllocator<> > SchemaValidatorType; + typedef GenericPointer > PointerType; + INVALIDATE_(s, "{\"myInt1\": null}", "/properties/myInt2", "type", "/myInt1", + "{ \"type\": {" + " \"errorCode\": 20," + " \"instanceRef\": \"#/myInt1\"," + " \"schemaRef\": \"#/properties/myInt2\"," + " \"expected\": [\"integer\"], \"actual\": \"null\"" + "}}", + kValidateDefaultFlags, SchemaValidatorType, PointerType); +} + +// $ref is a non-JSON pointer fragment and there is a matching id within array +TEST(SchemaValidator, Ref_internal_id_in_array) { + typedef GenericSchemaDocument > SchemaDocumentType; + Document sd; + sd.Parse("{\"type\": \"object\", \"properties\": {\"myInt1\": {\"$ref\": \"#myId\"}, \"myInt2\": {\"anyOf\": [{\"type\": \"string\", \"id\": \"#myStrId\"}, {\"type\": \"integer\", \"id\": \"#myId\"}]}}}"); + SchemaDocumentType s(sd); + typedef GenericSchemaValidator >, MemoryPoolAllocator<> > SchemaValidatorType; + typedef GenericPointer > PointerType; + INVALIDATE_(s, "{\"myInt1\": null}", "/properties/myInt2/anyOf/1", "type", "/myInt1", + "{ \"type\": {" + " \"errorCode\": 20," + " \"instanceRef\": \"#/myInt1\"," + " \"schemaRef\": \"#/properties/myInt2/anyOf/1\"," + " \"expected\": [\"integer\"], \"actual\": \"null\"" + "}}", + kValidateDefaultFlags, SchemaValidatorType, PointerType); +} + +// $ref is a non-JSON pointer fragment and there is a matching id, and the schema is embedded in the document +TEST(SchemaValidator, Ref_internal_id_and_schema_pointer) { + typedef GenericSchemaDocument > SchemaDocumentType; + Document sd; + sd.Parse("{ \"schema\": {\"type\": \"object\", \"properties\": {\"myInt1\": {\"$ref\": \"#myId\"}, \"myInt2\": {\"anyOf\": [{\"type\": \"integer\", \"id\": \"#myId\"}]}}}}"); + typedef GenericPointer > PointerType; + SchemaDocumentType s(sd, 0, 0, 0, 0, PointerType("/schema")); + typedef GenericSchemaValidator >, MemoryPoolAllocator<> > SchemaValidatorType; + INVALIDATE_(s, "{\"myInt1\": null}", "/schema/properties/myInt2/anyOf/0", "type", "/myInt1", + "{ \"type\": {" + " \"errorCode\": 20," + " \"instanceRef\": \"#/myInt1\"," + " \"schemaRef\": \"#/schema/properties/myInt2/anyOf/0\"," + " \"expected\": [\"integer\"], \"actual\": \"null\"" + "}}", + kValidateDefaultFlags, SchemaValidatorType, PointerType); +} + +// Test that $refs are correctly resolved when intermediate multiple ids are present +// Includes $ref to a part of the document with a different in-scope id, which also contains $ref.. +TEST(SchemaValidator, Ref_internal_multiple_ids) { + typedef GenericSchemaDocument > SchemaDocumentType; + //RemoteSchemaDocumentProvider provider; + CrtAllocator allocator; + char* schema = ReadFile("unittestschema/idandref.json", allocator); + Document sd; + sd.Parse(schema); + ASSERT_FALSE(sd.HasParseError()); + SchemaDocumentType s(sd, "http://xyz", 10/*, &provider*/); + typedef GenericSchemaValidator >, MemoryPoolAllocator<> > SchemaValidatorType; + typedef GenericPointer > PointerType; + INVALIDATE_(s, "{\"PA1\": \"s\", \"PA2\": \"t\", \"PA3\": \"r\", \"PX1\": 1, \"PX2Y\": 2, \"PX3Z\": 3, \"PX4\": 4, \"PX5\": 5, \"PX6\": 6, \"PX7W\": 7, \"PX8N\": { \"NX\": 8}}", "#", "errors", "#", + "{ \"type\": [" + " {\"errorCode\": 20, \"instanceRef\": \"#/PA1\", \"schemaRef\": \"http://xyz#/definitions/A\", \"expected\": [\"integer\"], \"actual\": \"string\"}," + " {\"errorCode\": 20, \"instanceRef\": \"#/PA2\", \"schemaRef\": \"http://xyz#/definitions/A\", \"expected\": [\"integer\"], \"actual\": \"string\"}," + " {\"errorCode\": 20, \"instanceRef\": \"#/PA3\", \"schemaRef\": \"http://xyz#/definitions/A\", \"expected\": [\"integer\"], \"actual\": \"string\"}," + " {\"errorCode\": 20, \"instanceRef\": \"#/PX1\", \"schemaRef\": \"http://xyz#/definitions/B/definitions/X\", \"expected\": [\"boolean\"], \"actual\": \"integer\"}," + " {\"errorCode\": 20, \"instanceRef\": \"#/PX2Y\", \"schemaRef\": \"http://xyz#/definitions/B/definitions/X\", \"expected\": [\"boolean\"], \"actual\": \"integer\"}," + " {\"errorCode\": 20, \"instanceRef\": \"#/PX3Z\", \"schemaRef\": \"http://xyz#/definitions/B/definitions/X\", \"expected\": [\"boolean\"], \"actual\": \"integer\"}," + " {\"errorCode\": 20, \"instanceRef\": \"#/PX4\", \"schemaRef\": \"http://xyz#/definitions/B/definitions/X\", \"expected\": [\"boolean\"], \"actual\": \"integer\"}," + " {\"errorCode\": 20, \"instanceRef\": \"#/PX5\", \"schemaRef\": \"http://xyz#/definitions/B/definitions/X\", \"expected\": [\"boolean\"], \"actual\": \"integer\"}," + " {\"errorCode\": 20, \"instanceRef\": \"#/PX6\", \"schemaRef\": \"http://xyz#/definitions/B/definitions/X\", \"expected\": [\"boolean\"], \"actual\": \"integer\"}," + " {\"errorCode\": 20, \"instanceRef\": \"#/PX7W\", \"schemaRef\": \"http://xyz#/definitions/B/definitions/X\", \"expected\": [\"boolean\"], \"actual\": \"integer\"}," + " {\"errorCode\": 20, \"instanceRef\": \"#/PX8N/NX\", \"schemaRef\": \"http://xyz#/definitions/B/definitions/X\", \"expected\": [\"boolean\"], \"actual\": \"integer\"}" + "]}", + kValidateDefaultFlags | kValidateContinueOnErrorFlag, SchemaValidatorType, PointerType); + CrtAllocator::Free(schema); +} + +TEST(SchemaValidator, Ref_remote_issue1210) { + class SchemaDocumentProvider : public IRemoteSchemaDocumentProvider { + SchemaDocument** collection; + + // Dummy private copy constructor & assignment operator. + // Function bodies added so that they compile in MSVC 2019. + SchemaDocumentProvider(const SchemaDocumentProvider&) : collection(NULL) { + } + SchemaDocumentProvider& operator=(const SchemaDocumentProvider&) { + return *this; + } + + public: + SchemaDocumentProvider(SchemaDocument** collection) : collection(collection) { } + virtual const SchemaDocument* GetRemoteDocument(const char* uri, SizeType length) { + int i = 0; + while (collection[i] && SchemaDocument::SValue(uri, length) != collection[i]->GetURI()) ++i; + return collection[i]; + } + }; + SchemaDocument* collection[] = { 0, 0, 0 }; + SchemaDocumentProvider provider(collection); + + Document x, y, z; + x.Parse("{\"properties\":{\"country\":{\"$ref\":\"y.json#/definitions/country_remote\"}},\"type\":\"object\"}"); + y.Parse("{\"definitions\":{\"country_remote\":{\"$ref\":\"z.json#/definitions/country_list\"}}}"); + z.Parse("{\"definitions\":{\"country_list\":{\"enum\":[\"US\"]}}}"); + + SchemaDocument sz(z, "z.json", 6, &provider); + collection[0] = &sz; + SchemaDocument sy(y, "y.json", 6, &provider); + collection[1] = &sy; + SchemaDocument sx(x, "x.json", 6, &provider); + + VALIDATE(sx, "{\"country\":\"UK\"}", false); + VALIDATE(sx, "{\"country\":\"US\"}", true); +} + +// Test that when kValidateContinueOnErrorFlag is set, all errors are reported. +TEST(SchemaValidator, ContinueOnErrors) { + CrtAllocator allocator; + char* schema = ReadFile("unittestschema/address.json", allocator); + Document sd; + sd.Parse(schema); + ASSERT_FALSE(sd.HasParseError()); + SchemaDocument s(sd); + VALIDATE(s, "{\"version\": 1.0, \"address\": {\"number\": 24, \"street1\": \"The Woodlands\", \"street3\": \"Ham\", \"city\": \"Romsey\", \"area\": \"Kent\", \"country\": \"UK\", \"postcode\": \"SO51 0GP\"}, \"phones\": [\"0111-222333\", \"0777-666888\"], \"names\": [\"Fred\", \"Bloggs\"]}", true); + INVALIDATE_(s, "{\"version\": 1.01, \"address\": {\"number\": 0, \"street2\": false, \"street3\": \"Ham\", \"city\": \"RomseyTownFC\", \"area\": \"BC\", \"country\": \"USA\", \"postcode\": \"999ABC\"}, \"phones\": [], \"planet\": \"Earth\", \"extra\": {\"S_xxx\": 123}}", "#", "errors", "#", + "{ \"multipleOf\": {" + " \"errorCode\": 1, \"instanceRef\": \"#/version\", \"schemaRef\": \"#/definitions/decimal_type\", \"expected\": 1.0, \"actual\": 1.01" + " }," + " \"minimum\": {" + " \"errorCode\": 5, \"instanceRef\": \"#/address/number\", \"schemaRef\": \"#/definitions/positiveInt_type\", \"expected\": 0, \"actual\": 0, \"exclusiveMinimum\": true" + " }," + " \"type\": [" + " {\"expected\": [\"null\", \"string\"], \"actual\": \"boolean\", \"errorCode\": 20, \"instanceRef\": \"#/address/street2\", \"schemaRef\": \"#/definitions/address_type/properties/street2\"}," + " {\"expected\": [\"string\"], \"actual\": \"integer\", \"errorCode\": 20, \"instanceRef\": \"#/extra/S_xxx\", \"schemaRef\": \"#/properties/extra/patternProperties/%5ES_\"}" + " ]," + " \"maxLength\": {" + " \"actual\": \"RomseyTownFC\", \"expected\": 10, \"errorCode\": 6, \"instanceRef\": \"#/address/city\", \"schemaRef\": \"#/definitions/address_type/properties/city\"" + " }," + " \"anyOf\": {" + " \"errors\":[" + " {\"pattern\": {\"actual\": \"999ABC\", \"errorCode\": 8, \"instanceRef\": \"#/address/postcode\", \"schemaRef\": \"#/definitions/address_type/properties/postcode/anyOf/0\"}}," + " {\"pattern\": {\"actual\": \"999ABC\", \"errorCode\": 8, \"instanceRef\": \"#/address/postcode\", \"schemaRef\": \"#/definitions/address_type/properties/postcode/anyOf/1\"}}" + " ]," + " \"errorCode\": 24, \"instanceRef\": \"#/address/postcode\", \"schemaRef\": \"#/definitions/address_type/properties/postcode\"" + " }," + " \"allOf\": {" + " \"errors\":[" + " {\"enum\":{\"errorCode\":19,\"instanceRef\":\"#/address/country\",\"schemaRef\":\"#/definitions/country_type\"}}" + " ]," + " \"errorCode\":23,\"instanceRef\":\"#/address/country\",\"schemaRef\":\"#/definitions/address_type/properties/country\"" + " }," + " \"minItems\": {" + " \"actual\": 0, \"expected\": 1, \"errorCode\": 10, \"instanceRef\": \"#/phones\", \"schemaRef\": \"#/properties/phones\"" + " }," + " \"additionalProperties\": {" + " \"disallowed\": \"planet\", \"errorCode\": 16, \"instanceRef\": \"#\", \"schemaRef\": \"#\"" + " }," + " \"required\": {" + " \"missing\": [\"street1\"], \"errorCode\": 15, \"instanceRef\": \"#/address\", \"schemaRef\": \"#/definitions/address_type\"" + " }" + "}", + kValidateDefaultFlags | kValidateContinueOnErrorFlag, SchemaValidator, Pointer); + INVALIDATE_(s, "{\"address\": {\"number\": 200, \"street1\": {}, \"street3\": null, \"city\": \"Rom\", \"area\": \"Dorset\", \"postcode\": \"SO51 0GP\"}, \"phones\": [\"0111-222333\", \"0777-666888\", \"0777-666888\"], \"names\": [\"Fred\", \"S\", \"M\", \"Bloggs\"]}", "#", "errors", "#", + "{ \"maximum\": {" + " \"errorCode\": 3, \"instanceRef\": \"#/address/number\", \"schemaRef\": \"#/definitions/positiveInt_type\", \"expected\": 100, \"actual\": 200, \"exclusiveMaximum\": true" + " }," + " \"type\": {" + " \"expected\": [\"string\"], \"actual\": \"object\", \"errorCode\": 20, \"instanceRef\": \"#/address/street1\", \"schemaRef\": \"#/definitions/address_type/properties/street1\"" + " }," + " \"not\": {" + " \"errorCode\": 25, \"instanceRef\": \"#/address/street3\", \"schemaRef\": \"#/definitions/address_type/properties/street3\"" + " }," + " \"minLength\": {" + " \"actual\": \"Rom\", \"expected\": 4, \"errorCode\": 7, \"instanceRef\": \"#/address/city\", \"schemaRef\": \"#/definitions/address_type/properties/city\"" + " }," + " \"maxItems\": {" + " \"actual\": 3, \"expected\": 2, \"errorCode\": 9, \"instanceRef\": \"#/phones\", \"schemaRef\": \"#/properties/phones\"" + " }," + " \"uniqueItems\": {" + " \"duplicates\": [1, 2], \"errorCode\": 11, \"instanceRef\": \"#/phones\", \"schemaRef\": \"#/properties/phones\"" + " }," + " \"minProperties\": {\"actual\": 6, \"expected\": 7, \"errorCode\": 14, \"instanceRef\": \"#/address\", \"schemaRef\": \"#/definitions/address_type\"" + " }," + " \"additionalItems\": [" + " {\"disallowed\": 2, \"errorCode\": 12, \"instanceRef\": \"#/names\", \"schemaRef\": \"#/properties/names\"}," + " {\"disallowed\": 3, \"errorCode\": 12, \"instanceRef\": \"#/names\", \"schemaRef\": \"#/properties/names\"}" + " ]," + " \"dependencies\": {" + " \"errors\": {" + " \"address\": {\"required\": {\"missing\": [\"version\"], \"errorCode\": 15, \"instanceRef\": \"#\", \"schemaRef\": \"#/dependencies/address\"}}," + " \"names\": {\"required\": {\"missing\": [\"version\"], \"errorCode\": 15, \"instanceRef\": \"#\", \"schemaRef\": \"#/dependencies/names\"}}" + " }," + " \"errorCode\": 18, \"instanceRef\": \"#\", \"schemaRef\": \"#\"" + " }," + " \"oneOf\": {" + " \"errors\": [" + " {\"enum\": {\"errorCode\": 19, \"instanceRef\": \"#/address/area\", \"schemaRef\": \"#/definitions/county_type\"}}," + " {\"enum\": {\"errorCode\": 19, \"instanceRef\": \"#/address/area\", \"schemaRef\": \"#/definitions/province_type\"}}" + " ]," + " \"errorCode\": 21, \"instanceRef\": \"#/address/area\", \"schemaRef\": \"#/definitions/address_type/properties/area\"" + " }" + "}", + kValidateDefaultFlags | kValidateContinueOnErrorFlag, SchemaValidator, Pointer); + + CrtAllocator::Free(schema); +} + +// Test that when kValidateContinueOnErrorFlag is set, it is not propagated to oneOf sub-validator so we only get the first error. +TEST(SchemaValidator, ContinueOnErrors_OneOf) { + typedef GenericSchemaDocument > SchemaDocumentType; + RemoteSchemaDocumentProvider provider; + CrtAllocator allocator; + char* schema = ReadFile("unittestschema/oneOf_address.json", allocator); + Document sd; + sd.Parse(schema); + ASSERT_FALSE(sd.HasParseError()); + SchemaDocumentType s(sd, 0, 0, &provider); + typedef GenericSchemaValidator >, MemoryPoolAllocator<> > SchemaValidatorType; + typedef GenericPointer > PointerType; + INVALIDATE_(s, "{\"version\": 1.01, \"address\": {\"number\": 0, \"street2\": false, \"street3\": \"Ham\", \"city\": \"RomseyTownFC\", \"area\": \"BC\", \"country\": \"USA\", \"postcode\": \"999ABC\"}, \"phones\": [], \"planet\": \"Earth\", \"extra\": {\"S_xxx\": 123}}", "#", "errors", "#", + "{ \"oneOf\": {" + " \"errors\": [{" + " \"multipleOf\": {" + " \"errorCode\": 1, \"instanceRef\": \"#/version\", \"schemaRef\": \"http://localhost:1234/address.json#/definitions/decimal_type\", \"expected\": 1.0, \"actual\": 1.01" + " }" + " }]," + " \"errorCode\": 21, \"instanceRef\": \"#\", \"schemaRef\": \"#\"" + " }" + "}", + kValidateDefaultFlags | kValidateContinueOnErrorFlag, SchemaValidatorType, PointerType); + CrtAllocator::Free(schema); +} + +// Test that when kValidateContinueOnErrorFlag is set, it is not propagated to allOf sub-validator so we only get the first error. +TEST(SchemaValidator, ContinueOnErrors_AllOf) { + typedef GenericSchemaDocument > SchemaDocumentType; + RemoteSchemaDocumentProvider provider; + CrtAllocator allocator; + char* schema = ReadFile("unittestschema/allOf_address.json", allocator); + Document sd; + sd.Parse(schema); + ASSERT_FALSE(sd.HasParseError()); + SchemaDocumentType s(sd, 0, 0, &provider); + typedef GenericSchemaValidator >, MemoryPoolAllocator<> > SchemaValidatorType; + typedef GenericPointer > PointerType; + INVALIDATE_(s, "{\"version\": 1.01, \"address\": {\"number\": 0, \"street2\": false, \"street3\": \"Ham\", \"city\": \"RomseyTownFC\", \"area\": \"BC\", \"country\": \"USA\", \"postcode\": \"999ABC\"}, \"phones\": [], \"planet\": \"Earth\", \"extra\": {\"S_xxx\": 123}}", "#", "errors", "#", + "{ \"allOf\": {" + " \"errors\": [{" + " \"multipleOf\": {" + " \"errorCode\": 1, \"instanceRef\": \"#/version\", \"schemaRef\": \"http://localhost:1234/address.json#/definitions/decimal_type\", \"expected\": 1.0, \"actual\": 1.01" + " }" + " }]," + " \"errorCode\": 23, \"instanceRef\": \"#\", \"schemaRef\": \"#\"" + " }" + "}", + kValidateDefaultFlags | kValidateContinueOnErrorFlag, SchemaValidatorType, PointerType); + CrtAllocator::Free(schema); +} + +// Test that when kValidateContinueOnErrorFlag is set, it is not propagated to anyOf sub-validator so we only get the first error. +TEST(SchemaValidator, ContinueOnErrors_AnyOf) { + typedef GenericSchemaDocument > SchemaDocumentType; + RemoteSchemaDocumentProvider provider; + CrtAllocator allocator; + char* schema = ReadFile("unittestschema/anyOf_address.json", allocator); + Document sd; + sd.Parse(schema); + ASSERT_FALSE(sd.HasParseError()); + SchemaDocumentType s(sd, 0, 0, &provider); + typedef GenericSchemaValidator >, MemoryPoolAllocator<> > SchemaValidatorType; + typedef GenericPointer > PointerType; + INVALIDATE_(s, "{\"version\": 1.01, \"address\": {\"number\": 0, \"street2\": false, \"street3\": \"Ham\", \"city\": \"RomseyTownFC\", \"area\": \"BC\", \"country\": \"USA\", \"postcode\": \"999ABC\"}, \"phones\": [], \"planet\": \"Earth\", \"extra\": {\"S_xxx\": 123}}", "#", "errors", "#", + "{ \"anyOf\": {" + " \"errors\": [{" + " \"multipleOf\": {" + " \"errorCode\": 1, \"instanceRef\": \"#/version\", \"schemaRef\": \"http://localhost:1234/address.json#/definitions/decimal_type\", \"expected\": 1.0, \"actual\": 1.01" + " }" + " }]," + " \"errorCode\": 24, \"instanceRef\": \"#\", \"schemaRef\": \"#\"" + " }" + "}", + kValidateDefaultFlags | kValidateContinueOnErrorFlag, SchemaValidatorType, PointerType); + + CrtAllocator::Free(schema); +} + +// Test that when kValidateContinueOnErrorFlag is set, arrays with uniqueItems:true are correctly processed when an item is invalid. +// This tests that we don't blow up if a hasher does not get created. +TEST(SchemaValidator, ContinueOnErrors_UniqueItems) { + CrtAllocator allocator; + char* schema = ReadFile("unittestschema/address.json", allocator); + Document sd; + sd.Parse(schema); + ASSERT_FALSE(sd.HasParseError()); + SchemaDocument s(sd); + VALIDATE(s, "{\"phones\":[\"12-34\",\"56-78\"]}", true); + INVALIDATE_(s, "{\"phones\":[\"12-34\",\"12-34\"]}", "#", "errors", "#", + "{\"uniqueItems\": {\"duplicates\": [0,1], \"errorCode\": 11, \"instanceRef\": \"#/phones\", \"schemaRef\": \"#/properties/phones\"}}", + kValidateDefaultFlags | kValidateContinueOnErrorFlag, SchemaValidator, Pointer); + INVALIDATE_(s, "{\"phones\":[\"ab-34\",\"cd-78\"]}", "#", "errors", "#", + "{\"pattern\": [" + " {\"actual\": \"ab-34\", \"errorCode\": 8, \"instanceRef\": \"#/phones/0\", \"schemaRef\": \"#/definitions/phone_type\"}," + " {\"actual\": \"cd-78\", \"errorCode\": 8, \"instanceRef\": \"#/phones/1\", \"schemaRef\": \"#/definitions/phone_type\"}" + "]}", + kValidateDefaultFlags | kValidateContinueOnErrorFlag, SchemaValidator, Pointer); + CrtAllocator::Free(schema); +} + +// Test that when kValidateContinueOnErrorFlag is set, an enum field is correctly processed when it has an invalid value. +// This tests that we don't blow up if a hasher does not get created. +TEST(SchemaValidator, ContinueOnErrors_Enum) { + CrtAllocator allocator; + char* schema = ReadFile("unittestschema/address.json", allocator); + Document sd; + sd.Parse(schema); + ASSERT_FALSE(sd.HasParseError()); + SchemaDocument s(sd); + VALIDATE(s, "{\"gender\":\"M\"}", true); + INVALIDATE_(s, "{\"gender\":\"X\"}", "#", "errors", "#", + "{\"enum\": {\"errorCode\": 19, \"instanceRef\": \"#/gender\", \"schemaRef\": \"#/properties/gender\"}}", + kValidateDefaultFlags | kValidateContinueOnErrorFlag, SchemaValidator, Pointer); + INVALIDATE_(s, "{\"gender\":1}", "#", "errors", "#", + "{\"type\": {\"expected\":[\"string\"], \"actual\": \"integer\", \"errorCode\": 20, \"instanceRef\": \"#/gender\", \"schemaRef\": \"#/properties/gender\"}}", + kValidateDefaultFlags | kValidateContinueOnErrorFlag, SchemaValidator, Pointer); + CrtAllocator::Free(schema); +} + +// Test that when kValidateContinueOnErrorFlag is set, an array appearing for an object property is handled +// This tests that we don't blow up when there is a type mismatch. +TEST(SchemaValidator, ContinueOnErrors_RogueArray) { + CrtAllocator allocator; + char* schema = ReadFile("unittestschema/address.json", allocator); + Document sd; + sd.Parse(schema); + ASSERT_FALSE(sd.HasParseError()); + SchemaDocument s(sd); + INVALIDATE_(s, "{\"address\":[{\"number\": 0}]}", "#", "errors", "#", + "{\"type\": {\"expected\":[\"object\"], \"actual\": \"array\", \"errorCode\": 20, \"instanceRef\": \"#/address\", \"schemaRef\": \"#/definitions/address_type\"}," + " \"dependencies\": {" + " \"errors\": {" + " \"address\": {\"required\": {\"missing\": [\"version\"], \"errorCode\": 15, \"instanceRef\": \"#\", \"schemaRef\": \"#/dependencies/address\"}}" + " },\"errorCode\": 18, \"instanceRef\": \"#\", \"schemaRef\": \"#\"}}", + kValidateDefaultFlags | kValidateContinueOnErrorFlag, SchemaValidator, Pointer); + CrtAllocator::Free(schema); +} + +// Test that when kValidateContinueOnErrorFlag is set, an object appearing for an array property is handled +// This tests that we don't blow up when there is a type mismatch. +TEST(SchemaValidator, ContinueOnErrors_RogueObject) { + CrtAllocator allocator; + char* schema = ReadFile("unittestschema/address.json", allocator); + Document sd; + sd.Parse(schema); + ASSERT_FALSE(sd.HasParseError()); + SchemaDocument s(sd); + INVALIDATE_(s, "{\"phones\":{\"number\": 0}}", "#", "errors", "#", + "{\"type\": {\"expected\":[\"array\"], \"actual\": \"object\", \"errorCode\": 20, \"instanceRef\": \"#/phones\", \"schemaRef\": \"#/properties/phones\"}}", + kValidateDefaultFlags | kValidateContinueOnErrorFlag, SchemaValidator, Pointer); + CrtAllocator::Free(schema); +} + +// Test that when kValidateContinueOnErrorFlag is set, a string appearing for an array or object property is handled +// This tests that we don't blow up when there is a type mismatch. +TEST(SchemaValidator, ContinueOnErrors_RogueString) { + CrtAllocator allocator; + char* schema = ReadFile("unittestschema/address.json", allocator); + Document sd; + sd.Parse(schema); + ASSERT_FALSE(sd.HasParseError()); + SchemaDocument s(sd); + INVALIDATE_(s, "{\"address\":\"number\"}", "#", "errors", "#", + "{\"type\": {\"expected\":[\"object\"], \"actual\": \"string\", \"errorCode\": 20, \"instanceRef\": \"#/address\", \"schemaRef\": \"#/definitions/address_type\"}," + " \"dependencies\": {" + " \"errors\": {" + " \"address\": {\"required\": {\"missing\": [\"version\"], \"errorCode\": 15, \"instanceRef\": \"#\", \"schemaRef\": \"#/dependencies/address\"}}" + " },\"errorCode\": 18, \"instanceRef\": \"#\", \"schemaRef\": \"#\"}}", + kValidateDefaultFlags | kValidateContinueOnErrorFlag, SchemaValidator, Pointer); + INVALIDATE_(s, "{\"phones\":\"number\"}", "#", "errors", "#", + "{\"type\": {\"expected\":[\"array\"], \"actual\": \"string\", \"errorCode\": 20, \"instanceRef\": \"#/phones\", \"schemaRef\": \"#/properties/phones\"}}", + kValidateDefaultFlags | kValidateContinueOnErrorFlag, SchemaValidator, Pointer); + CrtAllocator::Free(schema); +} + +// Test that when kValidateContinueOnErrorFlag is set, an incorrect simple type with a sub-schema is handled correctly. +// This tests that we don't blow up when there is a type mismatch but there is a sub-schema present +TEST(SchemaValidator, ContinueOnErrors_Issue2) { + Document sd; + sd.Parse("{\"type\":\"string\", \"anyOf\":[{\"maxLength\":2}]}"); + ASSERT_FALSE(sd.HasParseError()); + SchemaDocument s(sd); + VALIDATE(s, "\"AB\"", true); + INVALIDATE_(s, "\"ABC\"", "#", "errors", "#", + "{ \"anyOf\": {" + " \"errors\": [{" + " \"maxLength\": {" + " \"errorCode\": 6, \"instanceRef\": \"#\", \"schemaRef\": \"#/anyOf/0\", \"expected\": 2, \"actual\": \"ABC\"" + " }" + " }]," + " \"errorCode\": 24, \"instanceRef\": \"#\", \"schemaRef\": \"#\"" + " }" + "}", + kValidateDefaultFlags | kValidateContinueOnErrorFlag, SchemaValidator, Pointer); + // Invalid type + INVALIDATE_(s, "333", "#", "errors", "#", + "{ \"type\": {" + " \"errorCode\": 20, \"instanceRef\": \"#\", \"schemaRef\": \"#\", \"expected\": [\"string\"], \"actual\": \"integer\"" + " }" + "}", + kValidateDefaultFlags | kValidateContinueOnErrorFlag, SchemaValidator, Pointer); +} + +TEST(SchemaValidator, Schema_UnknownError) { + ASSERT_TRUE(SchemaValidator::SchemaType::GetValidateErrorKeyword(kValidateErrors).GetString() == std::string("null")); +} + +#if defined(_MSC_VER) || defined(__clang__) +RAPIDJSON_DIAG_POP +#endif diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/simdtest.cpp b/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/simdtest.cpp new file mode 100644 index 0000000000..649505fab2 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/simdtest.cpp @@ -0,0 +1,219 @@ +// Tencent is pleased to support the open source community by making RapidJSON available. +// +// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. +// +// Licensed under the MIT License (the "License"); you may not use this file except +// in compliance with the License. You may obtain a copy of the License at +// +// http://opensource.org/licenses/MIT +// +// Unless required by applicable law or agreed to in writing, software distributed +// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +// CONDITIONS OF ANY KIND, either express or implied. See the License for the +// specific language governing permissions and limitations under the License. + +// Since Travis CI installs old Valgrind 3.7.0, which fails with some SSE4.2 +// The unit tests prefix with SIMD should be skipped by Valgrind test + +// __SSE2__ and __SSE4_2__ are recognized by gcc, clang, and the Intel compiler. +// We use -march=native with gmake to enable -msse2 and -msse4.2, if supported. +#if defined(__SSE4_2__) +# define RAPIDJSON_SSE42 +#elif defined(__SSE2__) +# define RAPIDJSON_SSE2 +#elif defined(__ARM_NEON) +# define RAPIDJSON_NEON +#endif + +#define RAPIDJSON_NAMESPACE rapidjson_simd + +#include "unittest.h" + +#include "rapidjson/reader.h" +#include "rapidjson/writer.h" + +#ifdef __GNUC__ +RAPIDJSON_DIAG_PUSH +RAPIDJSON_DIAG_OFF(effc++) +#endif + +using namespace rapidjson_simd; + +#ifdef RAPIDJSON_SSE2 +#define SIMD_SUFFIX(name) name##_SSE2 +#elif defined(RAPIDJSON_SSE42) +#define SIMD_SUFFIX(name) name##_SSE42 +#elif defined(RAPIDJSON_NEON) +#define SIMD_SUFFIX(name) name##_NEON +#else +#define SIMD_SUFFIX(name) name +#endif + +template +void TestSkipWhitespace() { + for (size_t step = 1; step < 32; step++) { + char buffer[1025]; + for (size_t i = 0; i < 1024; i++) + buffer[i] = " \t\r\n"[i % 4]; + for (size_t i = 0; i < 1024; i += step) + buffer[i] = 'X'; + buffer[1024] = '\0'; + + StreamType s(buffer); + size_t i = 0; + for (;;) { + SkipWhitespace(s); + if (s.Peek() == '\0') + break; + EXPECT_EQ(i, s.Tell()); + EXPECT_EQ('X', s.Take()); + i += step; + } + } +} + +TEST(SIMD, SIMD_SUFFIX(SkipWhitespace)) { + TestSkipWhitespace(); + TestSkipWhitespace(); +} + +TEST(SIMD, SIMD_SUFFIX(SkipWhitespace_EncodedMemoryStream)) { + for (size_t step = 1; step < 32; step++) { + char buffer[1024]; + for (size_t i = 0; i < 1024; i++) + buffer[i] = " \t\r\n"[i % 4]; + for (size_t i = 0; i < 1024; i += step) + buffer[i] = 'X'; + + MemoryStream ms(buffer, 1024); + EncodedInputStream, MemoryStream> s(ms); + size_t i = 0; + for (;;) { + SkipWhitespace(s); + if (s.Peek() == '\0') + break; + //EXPECT_EQ(i, s.Tell()); + EXPECT_EQ('X', s.Take()); + i += step; + } + } +} + +struct ScanCopyUnescapedStringHandler : BaseReaderHandler, ScanCopyUnescapedStringHandler> { + bool String(const char* str, size_t length, bool) { + memcpy(buffer, str, length + 1); + return true; + } + char buffer[1024 + 5 + 32]; +}; + +template +void TestScanCopyUnescapedString() { + char buffer[1024u + 5 + 32]; + char backup[1024u + 5 + 32]; + + // Test "ABCDABCD...\\" + for (size_t offset = 0; offset < 32; offset++) { + for (size_t step = 0; step < 1024; step++) { + char* json = buffer + offset; + char *p = json; + *p++ = '\"'; + for (size_t i = 0; i < step; i++) + *p++ = "ABCD"[i % 4]; + *p++ = '\\'; + *p++ = '\\'; + *p++ = '\"'; + *p++ = '\0'; + strcpy(backup, json); // insitu parsing will overwrite buffer, so need to backup first + + StreamType s(json); + Reader reader; + ScanCopyUnescapedStringHandler h; + reader.Parse(s, h); + EXPECT_TRUE(memcmp(h.buffer, backup + 1, step) == 0); + EXPECT_EQ('\\', h.buffer[step]); // escaped + EXPECT_EQ('\0', h.buffer[step + 1]); + } + } + + // Test "\\ABCDABCD..." + for (size_t offset = 0; offset < 32; offset++) { + for (size_t step = 0; step < 1024; step++) { + char* json = buffer + offset; + char *p = json; + *p++ = '\"'; + *p++ = '\\'; + *p++ = '\\'; + for (size_t i = 0; i < step; i++) + *p++ = "ABCD"[i % 4]; + *p++ = '\"'; + *p++ = '\0'; + strcpy(backup, json); // insitu parsing will overwrite buffer, so need to backup first + + StreamType s(json); + Reader reader; + ScanCopyUnescapedStringHandler h; + reader.Parse(s, h); + EXPECT_TRUE(memcmp(h.buffer + 1, backup + 3, step) == 0); + EXPECT_EQ('\\', h.buffer[0]); // escaped + EXPECT_EQ('\0', h.buffer[step + 1]); + } + } +} + +TEST(SIMD, SIMD_SUFFIX(ScanCopyUnescapedString)) { + TestScanCopyUnescapedString(); + TestScanCopyUnescapedString(); +} + +TEST(SIMD, SIMD_SUFFIX(ScanWriteUnescapedString)) { + char buffer[2048 + 1 + 32]; + for (size_t offset = 0; offset < 32; offset++) { + for (size_t step = 0; step < 1024; step++) { + char* s = buffer + offset; + char* p = s; + for (size_t i = 0; i < step; i++) + *p++ = "ABCD"[i % 4]; + char escape = "\0\n\\\""[step % 4]; + *p++ = escape; + for (size_t i = 0; i < step; i++) + *p++ = "ABCD"[i % 4]; + + StringBuffer sb; + Writer writer(sb); + writer.String(s, SizeType(step * 2 + 1)); + const char* q = sb.GetString(); + EXPECT_EQ('\"', *q++); + for (size_t i = 0; i < step; i++) + EXPECT_EQ("ABCD"[i % 4], *q++); + if (escape == '\0') { + EXPECT_EQ('\\', *q++); + EXPECT_EQ('u', *q++); + EXPECT_EQ('0', *q++); + EXPECT_EQ('0', *q++); + EXPECT_EQ('0', *q++); + EXPECT_EQ('0', *q++); + } + else if (escape == '\n') { + EXPECT_EQ('\\', *q++); + EXPECT_EQ('n', *q++); + } + else if (escape == '\\') { + EXPECT_EQ('\\', *q++); + EXPECT_EQ('\\', *q++); + } + else if (escape == '\"') { + EXPECT_EQ('\\', *q++); + EXPECT_EQ('\"', *q++); + } + for (size_t i = 0; i < step; i++) + EXPECT_EQ("ABCD"[i % 4], *q++); + EXPECT_EQ('\"', *q++); + EXPECT_EQ('\0', *q++); + } + } +} + +#ifdef __GNUC__ +RAPIDJSON_DIAG_POP +#endif diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/strfunctest.cpp b/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/strfunctest.cpp new file mode 100644 index 0000000000..411269396a --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/strfunctest.cpp @@ -0,0 +1,30 @@ +// Tencent is pleased to support the open source community by making RapidJSON available. +// +// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. +// +// Licensed under the MIT License (the "License"); you may not use this file except +// in compliance with the License. You may obtain a copy of the License at +// +// http://opensource.org/licenses/MIT +// +// Unless required by applicable law or agreed to in writing, software distributed +// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +// CONDITIONS OF ANY KIND, either express or implied. See the License for the +// specific language governing permissions and limitations under the License. + +#include "unittest.h" +#include "rapidjson/internal/strfunc.h" + +using namespace rapidjson; +using namespace rapidjson::internal; + +TEST(StrFunc, CountStringCodePoint) { + SizeType count; + EXPECT_TRUE(CountStringCodePoint >("", 0, &count)); + EXPECT_EQ(0u, count); + EXPECT_TRUE(CountStringCodePoint >("Hello", 5, &count)); + EXPECT_EQ(5u, count); + EXPECT_TRUE(CountStringCodePoint >("\xC2\xA2\xE2\x82\xAC\xF0\x9D\x84\x9E", 9, &count)); // cents euro G-clef + EXPECT_EQ(3u, count); + EXPECT_FALSE(CountStringCodePoint >("\xC2\xA2\xE2\x82\xAC\xF0\x9D\x84\x9E\x80", 10, &count)); +} diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/stringbuffertest.cpp b/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/stringbuffertest.cpp new file mode 100644 index 0000000000..eaa29e715e --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/stringbuffertest.cpp @@ -0,0 +1,192 @@ +// Tencent is pleased to support the open source community by making RapidJSON available. +// +// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. +// +// Licensed under the MIT License (the "License"); you may not use this file except +// in compliance with the License. You may obtain a copy of the License at +// +// http://opensource.org/licenses/MIT +// +// Unless required by applicable law or agreed to in writing, software distributed +// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +// CONDITIONS OF ANY KIND, either express or implied. See the License for the +// specific language governing permissions and limitations under the License. + +#include "unittest.h" +#include "rapidjson/stringbuffer.h" +#include "rapidjson/writer.h" + +#ifdef __clang__ +RAPIDJSON_DIAG_PUSH +RAPIDJSON_DIAG_OFF(c++98-compat) +#endif + +using namespace rapidjson; + +TEST(StringBuffer, InitialSize) { + StringBuffer buffer; + EXPECT_EQ(0u, buffer.GetSize()); + EXPECT_EQ(0u, buffer.GetLength()); + EXPECT_STREQ("", buffer.GetString()); +} + +TEST(StringBuffer, Put) { + StringBuffer buffer; + buffer.Put('A'); + + EXPECT_EQ(1u, buffer.GetSize()); + EXPECT_EQ(1u, buffer.GetLength()); + EXPECT_STREQ("A", buffer.GetString()); +} + +TEST(StringBuffer, PutN_Issue672) { + GenericStringBuffer, MemoryPoolAllocator<> > buffer; + EXPECT_EQ(0u, buffer.GetSize()); + EXPECT_EQ(0u, buffer.GetLength()); + rapidjson::PutN(buffer, ' ', 1); + EXPECT_EQ(1u, buffer.GetSize()); + EXPECT_EQ(1u, buffer.GetLength()); +} + +TEST(StringBuffer, Clear) { + StringBuffer buffer; + buffer.Put('A'); + buffer.Put('B'); + buffer.Put('C'); + buffer.Clear(); + + EXPECT_EQ(0u, buffer.GetSize()); + EXPECT_EQ(0u, buffer.GetLength()); + EXPECT_STREQ("", buffer.GetString()); +} + +TEST(StringBuffer, Push) { + StringBuffer buffer; + buffer.Push(5); + + EXPECT_EQ(5u, buffer.GetSize()); + EXPECT_EQ(5u, buffer.GetLength()); + + // Causes sudden expansion to make the stack's capacity equal to size + buffer.Push(65536u); + EXPECT_EQ(5u + 65536u, buffer.GetSize()); +} + +TEST(StringBuffer, Pop) { + StringBuffer buffer; + buffer.Put('A'); + buffer.Put('B'); + buffer.Put('C'); + buffer.Put('D'); + buffer.Put('E'); + buffer.Pop(3); + + EXPECT_EQ(2u, buffer.GetSize()); + EXPECT_EQ(2u, buffer.GetLength()); + EXPECT_STREQ("AB", buffer.GetString()); +} + +TEST(StringBuffer, GetLength_Issue744) { + GenericStringBuffer > buffer; + buffer.Put('A'); + buffer.Put('B'); + buffer.Put('C'); + EXPECT_EQ(3u * sizeof(wchar_t), buffer.GetSize()); + EXPECT_EQ(3u, buffer.GetLength()); +} + +#if RAPIDJSON_HAS_CXX11_RVALUE_REFS + +#if 0 // Many old compiler does not support these. Turn it off temporaily. + +#include + +TEST(StringBuffer, Traits) { + static_assert( std::is_constructible::value, ""); + static_assert( std::is_default_constructible::value, ""); +#ifndef _MSC_VER + static_assert(!std::is_copy_constructible::value, ""); +#endif + static_assert( std::is_move_constructible::value, ""); + + static_assert(!std::is_nothrow_constructible::value, ""); + static_assert(!std::is_nothrow_default_constructible::value, ""); + +#if !defined(_MSC_VER) || _MSC_VER >= 1800 + static_assert(!std::is_nothrow_copy_constructible::value, ""); + static_assert(!std::is_nothrow_move_constructible::value, ""); +#endif + + static_assert( std::is_assignable::value, ""); +#ifndef _MSC_VER + static_assert(!std::is_copy_assignable::value, ""); +#endif + static_assert( std::is_move_assignable::value, ""); + +#if !defined(_MSC_VER) || _MSC_VER >= 1800 + static_assert(!std::is_nothrow_assignable::value, ""); +#endif + + static_assert(!std::is_nothrow_copy_assignable::value, ""); + static_assert(!std::is_nothrow_move_assignable::value, ""); + + static_assert( std::is_destructible::value, ""); +#ifndef _MSC_VER + static_assert(std::is_nothrow_destructible::value, ""); +#endif +} + +#endif + +TEST(StringBuffer, MoveConstructor) { + StringBuffer x; + x.Put('A'); + x.Put('B'); + x.Put('C'); + x.Put('D'); + + EXPECT_EQ(4u, x.GetSize()); + EXPECT_EQ(4u, x.GetLength()); + EXPECT_STREQ("ABCD", x.GetString()); + + // StringBuffer y(x); // does not compile (!is_copy_constructible) + StringBuffer y(std::move(x)); + EXPECT_EQ(0u, x.GetSize()); + EXPECT_EQ(0u, x.GetLength()); + EXPECT_EQ(4u, y.GetSize()); + EXPECT_EQ(4u, y.GetLength()); + EXPECT_STREQ("ABCD", y.GetString()); + + // StringBuffer z = y; // does not compile (!is_copy_assignable) + StringBuffer z = std::move(y); + EXPECT_EQ(0u, y.GetSize()); + EXPECT_EQ(0u, y.GetLength()); + EXPECT_EQ(4u, z.GetSize()); + EXPECT_EQ(4u, z.GetLength()); + EXPECT_STREQ("ABCD", z.GetString()); +} + +TEST(StringBuffer, MoveAssignment) { + StringBuffer x; + x.Put('A'); + x.Put('B'); + x.Put('C'); + x.Put('D'); + + EXPECT_EQ(4u, x.GetSize()); + EXPECT_EQ(4u, x.GetLength()); + EXPECT_STREQ("ABCD", x.GetString()); + + StringBuffer y; + // y = x; // does not compile (!is_copy_assignable) + y = std::move(x); + EXPECT_EQ(0u, x.GetSize()); + EXPECT_EQ(4u, y.GetLength()); + EXPECT_STREQ("ABCD", y.GetString()); +} + +#endif // RAPIDJSON_HAS_CXX11_RVALUE_REFS + +#ifdef __clang__ +RAPIDJSON_DIAG_POP +#endif diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/strtodtest.cpp b/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/strtodtest.cpp new file mode 100644 index 0000000000..66167a4a35 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/strtodtest.cpp @@ -0,0 +1,132 @@ +// Tencent is pleased to support the open source community by making RapidJSON available. +// +// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. +// +// Licensed under the MIT License (the "License"); you may not use this file except +// in compliance with the License. You may obtain a copy of the License at +// +// http://opensource.org/licenses/MIT +// +// Unless required by applicable law or agreed to in writing, software distributed +// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +// CONDITIONS OF ANY KIND, either express or implied. See the License for the +// specific language governing permissions and limitations under the License. + +#include "unittest.h" + +#include "rapidjson/internal/strtod.h" + +#ifdef __clang__ +RAPIDJSON_DIAG_PUSH +RAPIDJSON_DIAG_OFF(unreachable-code) +#endif + +#define BIGINTEGER_LITERAL(s) BigInteger(s, sizeof(s) - 1) + +using namespace rapidjson::internal; + +TEST(Strtod, CheckApproximationCase) { + static const int kSignificandSize = 52; + static const int kExponentBias = 0x3FF; + static const uint64_t kExponentMask = RAPIDJSON_UINT64_C2(0x7FF00000, 0x00000000); + static const uint64_t kSignificandMask = RAPIDJSON_UINT64_C2(0x000FFFFF, 0xFFFFFFFF); + static const uint64_t kHiddenBit = RAPIDJSON_UINT64_C2(0x00100000, 0x00000000); + + // http://www.exploringbinary.com/using-integers-to-check-a-floating-point-approximation/ + // Let b = 0x1.465a72e467d88p-149 + // = 5741268244528520 x 2^-201 + union { + double d; + uint64_t u; + }u; + u.u = 0x465a72e467d88 | ((static_cast(-149 + kExponentBias)) << kSignificandSize); + const double b = u.d; + const uint64_t bInt = (u.u & kSignificandMask) | kHiddenBit; + const int bExp = static_cast(((u.u & kExponentMask) >> kSignificandSize) - kExponentBias - kSignificandSize); + EXPECT_DOUBLE_EQ(1.7864e-45, b); + EXPECT_EQ(RAPIDJSON_UINT64_C2(0x001465a7, 0x2e467d88), bInt); + EXPECT_EQ(-201, bExp); + + // Let d = 17864 x 10-49 + const char dInt[] = "17864"; + const int dExp = -49; + + // Let h = 2^(bExp-1) + const int hExp = bExp - 1; + EXPECT_EQ(-202, hExp); + + int dS_Exp2 = 0; + int dS_Exp5 = 0; + int bS_Exp2 = 0; + int bS_Exp5 = 0; + int hS_Exp2 = 0; + int hS_Exp5 = 0; + + // Adjust for decimal exponent + if (dExp >= 0) { + dS_Exp2 += dExp; + dS_Exp5 += dExp; + } + else { + bS_Exp2 -= dExp; + bS_Exp5 -= dExp; + hS_Exp2 -= dExp; + hS_Exp5 -= dExp; + } + + // Adjust for binary exponent + if (bExp >= 0) + bS_Exp2 += bExp; + else { + dS_Exp2 -= bExp; + hS_Exp2 -= bExp; + } + + // Adjust for half ulp exponent + if (hExp >= 0) + hS_Exp2 += hExp; + else { + dS_Exp2 -= hExp; + bS_Exp2 -= hExp; + } + + // Remove common power of two factor from all three scaled values + int common_Exp2 = (std::min)(dS_Exp2, (std::min)(bS_Exp2, hS_Exp2)); + dS_Exp2 -= common_Exp2; + bS_Exp2 -= common_Exp2; + hS_Exp2 -= common_Exp2; + + EXPECT_EQ(153, dS_Exp2); + EXPECT_EQ(0, dS_Exp5); + EXPECT_EQ(1, bS_Exp2); + EXPECT_EQ(49, bS_Exp5); + EXPECT_EQ(0, hS_Exp2); + EXPECT_EQ(49, hS_Exp5); + + BigInteger dS = BIGINTEGER_LITERAL(dInt); + dS.MultiplyPow5(static_cast(dS_Exp5)) <<= static_cast(dS_Exp2); + + BigInteger bS(bInt); + bS.MultiplyPow5(static_cast(bS_Exp5)) <<= static_cast(bS_Exp2); + + BigInteger hS(1); + hS.MultiplyPow5(static_cast(hS_Exp5)) <<= static_cast(hS_Exp2); + + EXPECT_TRUE(BIGINTEGER_LITERAL("203970822259994138521801764465966248930731085529088") == dS); + EXPECT_TRUE(BIGINTEGER_LITERAL("203970822259994122305215569213032722473144531250000") == bS); + EXPECT_TRUE(BIGINTEGER_LITERAL("17763568394002504646778106689453125") == hS); + + EXPECT_EQ(1, dS.Compare(bS)); + + BigInteger delta(0); + EXPECT_FALSE(dS.Difference(bS, &delta)); + EXPECT_TRUE(BIGINTEGER_LITERAL("16216586195252933526457586554279088") == delta); + EXPECT_TRUE(bS.Difference(dS, &delta)); + EXPECT_TRUE(BIGINTEGER_LITERAL("16216586195252933526457586554279088") == delta); + + EXPECT_EQ(-1, delta.Compare(hS)); +} + +#ifdef __clang__ +RAPIDJSON_DIAG_POP +#endif diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/unittest.cpp b/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/unittest.cpp new file mode 100644 index 0000000000..879976a782 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/unittest.cpp @@ -0,0 +1,51 @@ +// Tencent is pleased to support the open source community by making RapidJSON available. +// +// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. +// +// Licensed under the MIT License (the "License"); you may not use this file except +// in compliance with the License. You may obtain a copy of the License at +// +// http://opensource.org/licenses/MIT +// +// Unless required by applicable law or agreed to in writing, software distributed +// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +// CONDITIONS OF ANY KIND, either express or implied. See the License for the +// specific language governing permissions and limitations under the License. + +#include "unittest.h" +#include "rapidjson/rapidjson.h" + +#ifdef __clang__ +#pragma GCC diagnostic push +#if __has_warning("-Wdeprecated") +#pragma GCC diagnostic ignored "-Wdeprecated" +#endif +#endif + +AssertException::~AssertException() throw() {} + +#ifdef __clang__ +#pragma GCC diagnostic pop +#endif + +int main(int argc, char **argv) { + ::testing::InitGoogleTest(&argc, argv); + + std::cout << "RapidJSON v" << RAPIDJSON_VERSION_STRING << std::endl; + +#ifdef _MSC_VER + _CrtMemState memoryState = { 0 }; + (void)memoryState; + _CrtMemCheckpoint(&memoryState); + //_CrtSetBreakAlloc(X); + //void *testWhetherMemoryLeakDetectionWorks = malloc(1); +#endif + + int ret = RUN_ALL_TESTS(); + +#ifdef _MSC_VER + // Current gtest constantly leak 2 blocks at exit + _CrtMemDumpAllObjectsSince(&memoryState); +#endif + return ret; +} diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/unittest.h b/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/unittest.h new file mode 100644 index 0000000000..0e64d3970b --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/unittest.h @@ -0,0 +1,143 @@ +// Tencent is pleased to support the open source community by making RapidJSON available. +// +// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. +// +// Licensed under the MIT License (the "License"); you may not use this file except +// in compliance with the License. You may obtain a copy of the License at +// +// http://opensource.org/licenses/MIT +// +// Unless required by applicable law or agreed to in writing, software distributed +// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +// CONDITIONS OF ANY KIND, either express or implied. See the License for the +// specific language governing permissions and limitations under the License. + +#ifndef UNITTEST_H_ +#define UNITTEST_H_ + +// gtest indirectly included inttypes.h, without __STDC_CONSTANT_MACROS. +#ifndef __STDC_CONSTANT_MACROS +#ifdef __clang__ +#pragma GCC diagnostic push +#if __has_warning("-Wreserved-id-macro") +#pragma GCC diagnostic ignored "-Wreserved-id-macro" +#endif +#endif + +# define __STDC_CONSTANT_MACROS 1 // required by C++ standard + +#ifdef __clang__ +#pragma GCC diagnostic pop +#endif +#endif + +#ifdef _MSC_VER +#define _CRTDBG_MAP_ALLOC +#include +#pragma warning(disable : 4996) // 'function': was declared deprecated +#endif + +#if defined(__clang__) || defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 2)) +#if defined(__clang__) || (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) +#pragma GCC diagnostic push +#endif +#pragma GCC diagnostic ignored "-Weffc++" +#endif + +#include "gtest/gtest.h" +#include + +#if defined(__clang__) || defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) +#pragma GCC diagnostic pop +#endif + +#ifdef __clang__ +// All TEST() macro generated this warning, disable globally +#pragma GCC diagnostic ignored "-Wglobal-constructors" +#endif + +template +inline unsigned StrLen(const Ch* s) { + const Ch* p = s; + while (*p) p++; + return unsigned(p - s); +} + +template +inline int StrCmp(const Ch* s1, const Ch* s2) { + while(*s1 && (*s1 == *s2)) { s1++; s2++; } + return static_cast(*s1) < static_cast(*s2) ? -1 : static_cast(*s1) > static_cast(*s2); +} + +template +inline Ch* StrDup(const Ch* str) { + size_t bufferSize = sizeof(Ch) * (StrLen(str) + 1); + Ch* buffer = static_cast(malloc(bufferSize)); + memcpy(buffer, str, bufferSize); + return buffer; +} + +inline FILE* TempFile(char *filename) { +#if defined(__WIN32__) || defined(_MSC_VER) + filename = tmpnam(filename); + + // For Visual Studio, tmpnam() adds a backslash in front. Remove it. + if (filename[0] == '\\') + for (int i = 0; filename[i] != '\0'; i++) + filename[i] = filename[i + 1]; + + return fopen(filename, "wb"); +#else + strcpy(filename, "/tmp/fileXXXXXX"); + int fd = mkstemp(filename); + return fdopen(fd, "w"); +#endif +} + +// Use exception for catching assert +#ifdef _MSC_VER +#pragma warning(disable : 4127) +#endif + +#ifdef __clang__ +#pragma GCC diagnostic push +#if __has_warning("-Wdeprecated") +#pragma GCC diagnostic ignored "-Wdeprecated" +#endif +#endif + +class AssertException : public std::logic_error { +public: + AssertException(const char* w) : std::logic_error(w) {} + AssertException(const AssertException& rhs) : std::logic_error(rhs) {} + virtual ~AssertException() throw(); +}; + +#ifdef __clang__ +#pragma GCC diagnostic pop +#endif + +// Not using noexcept for testing RAPIDJSON_ASSERT() +#define RAPIDJSON_HAS_CXX11_NOEXCEPT 0 + +#ifndef RAPIDJSON_ASSERT +#define RAPIDJSON_ASSERT(x) (!(x) ? throw AssertException(RAPIDJSON_STRINGIFY(x)) : (void)0u) +#ifndef RAPIDJSON_ASSERT_THROWS +#define RAPIDJSON_ASSERT_THROWS +#endif +#endif + +class Random { +public: + Random(unsigned seed = 0) : mSeed(seed) {} + + unsigned operator()() { + mSeed = 214013 * mSeed + 2531011; + return mSeed; + } + +private: + unsigned mSeed; +}; + +#endif // UNITTEST_H_ diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/uritest.cpp b/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/uritest.cpp new file mode 100644 index 0000000000..5506aa1e8c --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/uritest.cpp @@ -0,0 +1,718 @@ +// Tencent is pleased to support the open source community by making RapidJSON available. +// +// (C) Copyright IBM Corporation 2021 +// +// Licensed under the MIT License (the "License"); you may not use this file except +// in compliance with the License. You may obtain a copy of the License at +// +// http://opensource.org/licenses/MIT +// +// Unless required by applicable law or agreed to in writing, software distributed +// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +// CONDITIONS OF ANY KIND, either express or implied. See the License for the +// specific language governing permissions and limitations under the License. + +#define RAPIDJSON_SCHEMA_VERBOSE 0 +#define RAPIDJSON_HAS_STDSTRING 1 + +#include "unittest.h" +#include "rapidjson/document.h" +#include "rapidjson/uri.h" + +#ifdef __clang__ +RAPIDJSON_DIAG_PUSH +RAPIDJSON_DIAG_OFF(variadic-macros) +#elif defined(_MSC_VER) +RAPIDJSON_DIAG_PUSH +RAPIDJSON_DIAG_OFF(4822) // local class member function does not have a body +#endif + +using namespace rapidjson; + +TEST(Uri, DefaultConstructor) { + typedef GenericUri UriType; + UriType u; + EXPECT_TRUE(u.GetSchemeString() == 0); + EXPECT_TRUE(u.GetAuthString() == 0); + EXPECT_TRUE(u.GetPathString() == 0); + EXPECT_TRUE(u.GetBaseString() == 0); + EXPECT_TRUE(u.GetQueryString() == 0); + EXPECT_TRUE(u.GetFragString() == 0); + EXPECT_TRUE(u.GetString() == 0); + EXPECT_TRUE(u.GetSchemeStringLength() == 0); + EXPECT_TRUE(u.GetAuthStringLength() == 0); + EXPECT_TRUE(u.GetPathStringLength() == 0); + EXPECT_TRUE(u.GetBaseStringLength() == 0); + EXPECT_TRUE(u.GetQueryStringLength() == 0); + EXPECT_TRUE(u.GetFragStringLength() == 0); + EXPECT_TRUE(u.GetStringLength() == 0); +} + + +TEST(Uri, Parse) { + typedef GenericUri > UriType; + MemoryPoolAllocator allocator; + Value v; + Value w; + + v.SetString("http://auth/path/xxx?query#frag", allocator); + UriType u = UriType(v, &allocator); + EXPECT_TRUE(StrCmp(u.GetSchemeString(), "http:") == 0); + EXPECT_TRUE(StrCmp(u.GetAuthString(), "//auth") == 0); + EXPECT_TRUE(StrCmp(u.GetPathString(), "/path/xxx") == 0); + EXPECT_TRUE(StrCmp(u.GetBaseString(), "http://auth/path/xxx?query") == 0); + EXPECT_TRUE(StrCmp(u.GetQueryString(), "?query") == 0); + EXPECT_TRUE(StrCmp(u.GetFragString(), "#frag") == 0); + u.Get(w, allocator); + EXPECT_TRUE(*w.GetString() == *v.GetString()); + +#if RAPIDJSON_HAS_STDSTRING + typedef std::basic_string String; + String str = "http://auth/path/xxx?query#frag"; + const UriType uri = UriType(str); + EXPECT_TRUE(UriType::GetScheme(uri) == "http:"); + EXPECT_TRUE(UriType::GetAuth(uri) == "//auth"); + EXPECT_TRUE(UriType::GetPath(uri) == "/path/xxx"); + EXPECT_TRUE(UriType::GetBase(uri) == "http://auth/path/xxx?query"); + EXPECT_TRUE(UriType::GetQuery(uri) == "?query"); + EXPECT_TRUE(UriType::GetFrag(uri) == "#frag"); + EXPECT_TRUE(UriType::Get(uri) == str); +#endif + + v.SetString("urn:uuid:ee564b8a-7a87-4125-8c96-e9f123d6766f", allocator); + u = UriType(v); + EXPECT_TRUE(StrCmp(u.GetSchemeString(), "urn:") == 0); + EXPECT_TRUE(u.GetAuthStringLength() == 0); + EXPECT_TRUE(StrCmp(u.GetPathString(), "uuid:ee564b8a-7a87-4125-8c96-e9f123d6766f") == 0); + EXPECT_TRUE(StrCmp(u.GetBaseString(), "urn:uuid:ee564b8a-7a87-4125-8c96-e9f123d6766f") == 0); + EXPECT_TRUE(u.GetQueryStringLength() == 0); + EXPECT_TRUE(u.GetFragStringLength() == 0); + u.Get(w, allocator); + EXPECT_TRUE(*w.GetString() == *v.GetString()); + + v.SetString("", allocator); + u = UriType(v); + EXPECT_TRUE(u.GetSchemeStringLength() == 0); + EXPECT_TRUE(u.GetAuthStringLength() == 0); + EXPECT_TRUE(u.GetPathStringLength() == 0); + EXPECT_TRUE(u.GetBaseStringLength() == 0); + EXPECT_TRUE(u.GetQueryStringLength() == 0); + EXPECT_TRUE(u.GetFragStringLength() == 0); + + v.SetString("http://auth/", allocator); + u = UriType(v); + EXPECT_TRUE(StrCmp(u.GetSchemeString(), "http:") == 0); + EXPECT_TRUE(StrCmp(u.GetAuthString(), "//auth") == 0); + EXPECT_TRUE(StrCmp(u.GetPathString(), "/") == 0); + EXPECT_TRUE(StrCmp(u.GetBaseString(), "http://auth/") == 0); + EXPECT_TRUE(u.GetQueryStringLength() == 0); + EXPECT_TRUE(u.GetFragStringLength() == 0); + + u = UriType("/path/sub"); + EXPECT_TRUE(u.GetSchemeStringLength() == 0); + EXPECT_TRUE(u.GetAuthStringLength() == 0); + EXPECT_TRUE(StrCmp(u.GetPathString(), "/path/sub") == 0); + EXPECT_TRUE(StrCmp(u.GetBaseString(), "/path/sub") == 0); + EXPECT_TRUE(u.GetQueryStringLength() == 0); + EXPECT_TRUE(u.GetFragStringLength() == 0); + + // absolute path gets normalized + u = UriType("/path/../sub/"); + EXPECT_TRUE(u.GetSchemeStringLength() == 0); + EXPECT_TRUE(u.GetAuthStringLength() == 0); + EXPECT_TRUE(StrCmp(u.GetPathString(), "/sub/") == 0); + EXPECT_TRUE(StrCmp(u.GetBaseString(), "/sub/") == 0); + EXPECT_TRUE(u.GetQueryStringLength() == 0); + EXPECT_TRUE(u.GetFragStringLength() == 0); + + // relative path does not + u = UriType("path/../sub"); + EXPECT_TRUE(u.GetSchemeStringLength() == 0); + EXPECT_TRUE(u.GetAuthStringLength() == 0); + EXPECT_TRUE(StrCmp(u.GetPathString(), "path/../sub") == 0); + EXPECT_TRUE(StrCmp(u.GetBaseString(), "path/../sub") == 0); + EXPECT_TRUE(u.GetQueryStringLength() == 0); + EXPECT_TRUE(u.GetFragStringLength() == 0); + + u = UriType("http://auth#frag/stuff"); + EXPECT_TRUE(StrCmp(u.GetSchemeString(), "http:") == 0); + EXPECT_TRUE(StrCmp(u.GetAuthString(), "//auth") == 0); + EXPECT_TRUE(u.GetPathStringLength() == 0); + EXPECT_TRUE(StrCmp(u.GetBaseString(), "http://auth") == 0); + EXPECT_TRUE(u.GetQueryStringLength() == 0); + EXPECT_TRUE(StrCmp(u.GetFragString(), "#frag/stuff") == 0); + EXPECT_TRUE(StrCmp(u.GetString(), "http://auth#frag/stuff") == 0); + + const Value::Ch c[] = { '#', 'f', 'r', 'a', 'g', '/', 's', 't', 'u', 'f', 'f', '\0'}; + SizeType len = internal::StrLen(c); + u = UriType(c, len); + EXPECT_TRUE(StrCmp(u.GetString(), "#frag/stuff") == 0); + EXPECT_TRUE(u.GetStringLength() == len); + EXPECT_TRUE(StrCmp(u.GetBaseString(), "") == 0); + EXPECT_TRUE(u.GetBaseStringLength() == 0); + EXPECT_TRUE(StrCmp(u.GetFragString(), "#frag/stuff") == 0); + EXPECT_TRUE(u.GetFragStringLength() == len); + + u = UriType(c); + EXPECT_TRUE(StrCmp(u.GetString(), "#frag/stuff") == 0); + EXPECT_TRUE(u.GetStringLength() == len); + EXPECT_TRUE(StrCmp(u.GetBaseString(), "") == 0); + EXPECT_TRUE(u.GetBaseStringLength() == 0); + EXPECT_TRUE(StrCmp(u.GetFragString(), "#frag/stuff") == 0); + EXPECT_TRUE(u.GetFragStringLength() == len); + + // Incomplete auth treated as path + str = "http:/"; + const UriType u2 = UriType(str); + EXPECT_TRUE(StrCmp(u2.GetSchemeString(), "http:") == 0); + EXPECT_TRUE(u2.GetAuthStringLength() == 0); + EXPECT_TRUE(StrCmp(u2.GetPathString(), "/") == 0); + EXPECT_TRUE(StrCmp(u2.GetBaseString(), "http:/") == 0); +} + +TEST(Uri, Parse_UTF16) { + typedef GenericValue > Value16; + typedef GenericUri > UriType; + MemoryPoolAllocator allocator; + Value16 v; + Value16 w; + + v.SetString(L"http://auth/path/xxx?query#frag", allocator); + UriType u = UriType(v, &allocator); + EXPECT_TRUE(StrCmp(u.GetSchemeString(), L"http:") == 0); + EXPECT_TRUE(StrCmp(u.GetAuthString(), L"//auth") == 0); + EXPECT_TRUE(StrCmp(u.GetPathString(), L"/path/xxx") == 0); + EXPECT_TRUE(StrCmp(u.GetBaseString(), L"http://auth/path/xxx?query") == 0); + EXPECT_TRUE(StrCmp(u.GetQueryString(), L"?query") == 0); + EXPECT_TRUE(StrCmp(u.GetFragString(), L"#frag") == 0); + u.Get(w, allocator); + EXPECT_TRUE(*w.GetString() == *v.GetString()); + +#if RAPIDJSON_HAS_STDSTRING + typedef std::basic_string String; + String str = L"http://auth/path/xxx?query#frag"; + const UriType uri = UriType(str); + EXPECT_TRUE(UriType::GetScheme(uri) == L"http:"); + EXPECT_TRUE(UriType::GetAuth(uri) == L"//auth"); + EXPECT_TRUE(UriType::GetPath(uri) == L"/path/xxx"); + EXPECT_TRUE(UriType::GetBase(uri) == L"http://auth/path/xxx?query"); + EXPECT_TRUE(UriType::GetQuery(uri) == L"?query"); + EXPECT_TRUE(UriType::GetFrag(uri) == L"#frag"); + EXPECT_TRUE(UriType::Get(uri) == str); +#endif + + v.SetString(L"urn:uuid:ee564b8a-7a87-4125-8c96-e9f123d6766f", allocator); + u = UriType(v); + EXPECT_TRUE(StrCmp(u.GetSchemeString(), L"urn:") == 0); + EXPECT_TRUE(u.GetAuthStringLength() == 0); + EXPECT_TRUE(StrCmp(u.GetPathString(), L"uuid:ee564b8a-7a87-4125-8c96-e9f123d6766f") == 0); + EXPECT_TRUE(StrCmp(u.GetBaseString(), L"urn:uuid:ee564b8a-7a87-4125-8c96-e9f123d6766f") == 0); + EXPECT_TRUE(u.GetQueryStringLength() == 0); + EXPECT_TRUE(u.GetFragStringLength() == 0); + u.Get(w, allocator); + EXPECT_TRUE(*w.GetString() == *v.GetString()); + + v.SetString(L"", allocator); + u = UriType(v); + EXPECT_TRUE(u.GetSchemeStringLength() == 0); + EXPECT_TRUE(u.GetAuthStringLength() == 0); + EXPECT_TRUE(u.GetPathStringLength() == 0); + EXPECT_TRUE(u.GetBaseStringLength() == 0); + EXPECT_TRUE(u.GetQueryStringLength() == 0); + EXPECT_TRUE(u.GetFragStringLength() == 0); + + v.SetString(L"http://auth/", allocator); + u = UriType(v); + EXPECT_TRUE(StrCmp(u.GetSchemeString(), L"http:") == 0); + EXPECT_TRUE(StrCmp(u.GetAuthString(), L"//auth") == 0); + EXPECT_TRUE(StrCmp(u.GetPathString(), L"/") == 0); + EXPECT_TRUE(StrCmp(u.GetBaseString(), L"http://auth/") == 0); + EXPECT_TRUE(u.GetQueryStringLength() == 0); + EXPECT_TRUE(u.GetFragStringLength() == 0); + + u = UriType(L"/path/sub"); + EXPECT_TRUE(u.GetSchemeStringLength() == 0); + EXPECT_TRUE(u.GetAuthStringLength() == 0); + EXPECT_TRUE(StrCmp(u.GetPathString(), L"/path/sub") == 0); + EXPECT_TRUE(StrCmp(u.GetBaseString(), L"/path/sub") == 0); + EXPECT_TRUE(u.GetQueryStringLength() == 0); + EXPECT_TRUE(u.GetFragStringLength() == 0); + + // absolute path gets normalized + u = UriType(L"/path/../sub/"); + EXPECT_TRUE(u.GetSchemeStringLength() == 0); + EXPECT_TRUE(u.GetAuthStringLength() == 0); + EXPECT_TRUE(StrCmp(u.GetPathString(), L"/sub/") == 0); + EXPECT_TRUE(StrCmp(u.GetBaseString(), L"/sub/") == 0); + EXPECT_TRUE(u.GetQueryStringLength() == 0); + EXPECT_TRUE(u.GetFragStringLength() == 0); + + // relative path does not + u = UriType(L"path/../sub"); + EXPECT_TRUE(u.GetSchemeStringLength() == 0); + EXPECT_TRUE(u.GetAuthStringLength() == 0); + EXPECT_TRUE(StrCmp(u.GetPathString(), L"path/../sub") == 0); + EXPECT_TRUE(StrCmp(u.GetBaseString(), L"path/../sub") == 0); + EXPECT_TRUE(u.GetQueryStringLength() == 0); + EXPECT_TRUE(u.GetFragStringLength() == 0); + + u = UriType(L"http://auth#frag/stuff"); + EXPECT_TRUE(StrCmp(u.GetSchemeString(), L"http:") == 0); + EXPECT_TRUE(StrCmp(u.GetAuthString(), L"//auth") == 0); + EXPECT_TRUE(u.GetPathStringLength() == 0); + EXPECT_TRUE(StrCmp(u.GetBaseString(), L"http://auth") == 0); + EXPECT_TRUE(u.GetQueryStringLength() == 0); + EXPECT_TRUE(StrCmp(u.GetFragString(), L"#frag/stuff") == 0); + EXPECT_TRUE(StrCmp(u.GetString(), L"http://auth#frag/stuff") == 0); + + const Value16::Ch c[] = { '#', 'f', 'r', 'a', 'g', '/', 's', 't', 'u', 'f', 'f', '\0'}; + SizeType len = internal::StrLen(c); + u = UriType(c, len); + EXPECT_TRUE(StrCmp(u.GetString(), L"#frag/stuff") == 0); + EXPECT_TRUE(u.GetStringLength() == len); + EXPECT_TRUE(StrCmp(u.GetBaseString(), L"") == 0); + EXPECT_TRUE(u.GetBaseStringLength() == 0); + EXPECT_TRUE(StrCmp(u.GetFragString(), L"#frag/stuff") == 0); + EXPECT_TRUE(u.GetFragStringLength() == len); + + u = UriType(c); + EXPECT_TRUE(StrCmp(u.GetString(), L"#frag/stuff") == 0); + EXPECT_TRUE(u.GetStringLength() == len); + EXPECT_TRUE(StrCmp(u.GetBaseString(), L"") == 0); + EXPECT_TRUE(u.GetBaseStringLength() == 0); + EXPECT_TRUE(StrCmp(u.GetFragString(), L"#frag/stuff") == 0); + EXPECT_TRUE(u.GetFragStringLength() == len); + + // Incomplete auth treated as path + u = UriType(L"http:/"); + EXPECT_TRUE(StrCmp(u.GetSchemeString(), L"http:") == 0); + EXPECT_TRUE(u.GetAuthStringLength() == 0); + EXPECT_TRUE(StrCmp(u.GetPathString(), L"/") == 0); + EXPECT_TRUE(StrCmp(u.GetBaseString(), L"http:/") == 0); +} + +TEST(Uri, CopyConstructor) { + typedef GenericUri UriType; + CrtAllocator allocator; + + UriType u("http://auth/path/xxx?query#frag", &allocator); + UriType u2(u); + EXPECT_TRUE(u == u2); + EXPECT_NE(&u.GetAllocator(), &u2.GetAllocator()); +} + +TEST(Uri, Assignment) { + typedef GenericUri UriType; + CrtAllocator allocator; + + UriType u("http://auth/path/xxx?query#frag", &allocator); + UriType u2; + u2 = u; + EXPECT_TRUE(u == u2); + EXPECT_NE(&u.GetAllocator(), &u2.GetAllocator()); +} + +TEST(Uri, Resolve) { + typedef GenericUri UriType; + CrtAllocator allocator; + + // ref is full uri + UriType base = UriType("http://auth/path/#frag"); + UriType ref = UriType("http://newauth/newpath#newfrag"); + UriType res = ref.Resolve(base); + EXPECT_TRUE(StrCmp(res.GetString(), "http://newauth/newpath#newfrag") == 0); + + base = UriType("/path/#frag", &allocator); + ref = UriType("http://newauth/newpath#newfrag", &allocator); + res = ref.Resolve(base, &allocator); + EXPECT_TRUE(StrCmp(res.GetString(), "http://newauth/newpath#newfrag") == 0); + + // ref is alternate uri + base = UriType("http://auth/path/#frag"); + ref = UriType("urn:uuid:ee564b8a-7a87-4125-8c96-e9f123d6766f"); + res = ref.Resolve(base); + EXPECT_TRUE(StrCmp(res.GetString(), "urn:uuid:ee564b8a-7a87-4125-8c96-e9f123d6766f") == 0); + + // ref is absolute path + base = UriType("http://auth/path/#"); + ref = UriType("/newpath#newfrag"); + res = ref.Resolve(base); + EXPECT_TRUE(StrCmp(res.GetString(), "http://auth/newpath#newfrag") == 0); + + // ref is relative path + base = UriType("http://auth/path/file.json#frag"); + ref = UriType("newfile.json#"); + res = ref.Resolve(base); + EXPECT_TRUE(StrCmp(res.GetString(), "http://auth/path/newfile.json#") == 0); + + base = UriType("http://auth/path/file.json#frag/stuff"); + ref = UriType("newfile.json#newfrag/newstuff"); + res = ref.Resolve(base); + EXPECT_TRUE(StrCmp(res.GetString(), "http://auth/path/newfile.json#newfrag/newstuff") == 0); + + base = UriType("file.json", &allocator); + ref = UriType("newfile.json", &base.GetAllocator()); + res = ref.Resolve(base, &ref.GetAllocator()); + EXPECT_TRUE(StrCmp(res.GetString(), "newfile.json") == 0); + + base = UriType("file.json", &allocator); + ref = UriType("./newfile.json", &allocator); + res = ref.Resolve(base, &allocator); + EXPECT_TRUE(StrCmp(res.GetString(), "newfile.json") == 0); + + base = UriType("file.json"); + ref = UriType("parent/../newfile.json"); + res = ref.Resolve(base); + EXPECT_TRUE(StrCmp(res.GetString(), "newfile.json") == 0); + + base = UriType("file.json"); + ref = UriType("parent/./newfile.json"); + res = ref.Resolve(base); + EXPECT_TRUE(StrCmp(res.GetString(), "parent/newfile.json") == 0); + + base = UriType("file.json"); + ref = UriType("../../parent/.././newfile.json"); + res = ref.Resolve(base); + EXPECT_TRUE(StrCmp(res.GetString(), "newfile.json") == 0); + + // This adds a joining slash so resolved length is base length + ref length + 1 + base = UriType("http://auth"); + ref = UriType("newfile.json"); + res = ref.Resolve(base); + EXPECT_TRUE(StrCmp(res.GetString(), "http://auth/newfile.json") == 0); + + // ref is fragment + base = UriType("#frag/stuff"); + ref = UriType("#newfrag/newstuff"); + res = ref.Resolve(base); + EXPECT_TRUE(StrCmp(res.GetString(), "#newfrag/newstuff") == 0); + + // test ref fragment always wins + base = UriType("/path#frag"); + ref = UriType(""); + res = ref.Resolve(base); + EXPECT_TRUE(StrCmp(res.GetString(), "/path") == 0); + + // Examples from RFC3896 + base = UriType("http://a/b/c/d;p?q"); + ref = UriType("g:h"); + res = ref.Resolve(base); + EXPECT_TRUE(StrCmp(res.GetString(), "g:h") == 0); + ref = UriType("g"); + res = ref.Resolve(base); + EXPECT_TRUE(StrCmp(res.GetString(), "http://a/b/c/g") == 0); + ref = UriType("./g"); + res = ref.Resolve(base); + EXPECT_TRUE(StrCmp(res.GetString(), "http://a/b/c/g") == 0); + ref = UriType("g/"); + res = ref.Resolve(base); + EXPECT_TRUE(StrCmp(res.GetString(), "http://a/b/c/g/") == 0); + ref = UriType("/g"); + res = ref.Resolve(base); + EXPECT_TRUE(StrCmp(res.GetString(), "http://a/g") == 0); + ref = UriType("//g"); + res = ref.Resolve(base); + EXPECT_TRUE(StrCmp(res.GetString(), "http://g") == 0); + ref = UriType("?y"); + res = ref.Resolve(base); + EXPECT_TRUE(StrCmp(res.GetString(), "http://a/b/c/d;p?y") == 0); + ref = UriType("g?y"); + res = ref.Resolve(base); + EXPECT_TRUE(StrCmp(res.GetString(), "http://a/b/c/g?y") == 0); + ref = UriType("#s"); + res = ref.Resolve(base); + EXPECT_TRUE(StrCmp(res.GetString(), "http://a/b/c/d;p?q#s") == 0); + ref = UriType("g#s"); + res = ref.Resolve(base); + EXPECT_TRUE(StrCmp(res.GetString(), "http://a/b/c/g#s") == 0); + ref = UriType("g?y#s"); + res = ref.Resolve(base); + EXPECT_TRUE(StrCmp(res.GetString(), "http://a/b/c/g?y#s") == 0); + ref = UriType(";x"); + res = ref.Resolve(base); + EXPECT_TRUE(StrCmp(res.GetString(), "http://a/b/c/;x") == 0); + ref = UriType("g;x"); + res = ref.Resolve(base); + EXPECT_TRUE(StrCmp(res.GetString(), "http://a/b/c/g;x") == 0); + ref = UriType("g;x?y#s"); + res = ref.Resolve(base); + EXPECT_TRUE(StrCmp(res.GetString(), "http://a/b/c/g;x?y#s") == 0); + ref = UriType(""); + res = ref.Resolve(base); + EXPECT_TRUE(StrCmp(res.GetString(), "http://a/b/c/d;p?q") == 0); + ref = UriType("."); + res = ref.Resolve(base); + EXPECT_TRUE(StrCmp(res.GetString(), "http://a/b/c/") == 0); + ref = UriType("./"); + res = ref.Resolve(base); + EXPECT_TRUE(StrCmp(res.GetString(), "http://a/b/c/") == 0); + ref = UriType(".."); + res = ref.Resolve(base); + EXPECT_TRUE(StrCmp(res.GetString(), "http://a/b/") == 0); + ref = UriType("../"); + res = ref.Resolve(base); + EXPECT_TRUE(StrCmp(res.GetString(), "http://a/b/") == 0); + ref = UriType("../g"); + res = ref.Resolve(base); + EXPECT_TRUE(StrCmp(res.GetString(), "http://a/b/g") == 0); + ref = UriType("../.."); + res = ref.Resolve(base); + EXPECT_TRUE(StrCmp(res.GetString(), "http://a/") == 0); + ref = UriType("../../"); + res = ref.Resolve(base); + EXPECT_TRUE(StrCmp(res.GetString(), "http://a/") == 0); + ref = UriType("../../g"); + res = ref.Resolve(base); + EXPECT_TRUE(StrCmp(res.GetString(), "http://a/g") == 0); + ref = UriType("../../../g"); + res = ref.Resolve(base); + EXPECT_TRUE(StrCmp(res.GetString(), "http://a/g") == 0); + ref = UriType("../../../../g"); + res = ref.Resolve(base); + EXPECT_TRUE(StrCmp(res.GetString(), "http://a/g") == 0); + ref = UriType("/./g"); + res = ref.Resolve(base); + EXPECT_TRUE(StrCmp(res.GetString(), "http://a/g") == 0); + ref = UriType("/../g"); + res = ref.Resolve(base); + EXPECT_TRUE(StrCmp(res.GetString(), "http://a/g") == 0); + ref = UriType("g."); + res = ref.Resolve(base); + EXPECT_TRUE(StrCmp(res.GetString(), "http://a/b/c/g.") == 0); + ref = UriType(".g"); + res = ref.Resolve(base); + EXPECT_TRUE(StrCmp(res.GetString(), "http://a/b/c/.g") == 0); + ref = UriType("g.."); + res = ref.Resolve(base); + EXPECT_TRUE(StrCmp(res.GetString(), "http://a/b/c/g..") == 0); + ref = UriType("..g"); + res = ref.Resolve(base); + EXPECT_TRUE(StrCmp(res.GetString(), "http://a/b/c/..g") == 0); + ref = UriType("g#s/../x"); + res = ref.Resolve(base); + EXPECT_TRUE(StrCmp(res.GetString(), "http://a/b/c/g#s/../x") == 0); +} + +TEST(Uri, Resolve_UTF16) { + typedef GenericValue > Value16; + typedef GenericUri UriType; + CrtAllocator allocator; + + // ref is full uri + UriType base = UriType(L"http://auth/path/#frag"); + UriType ref = UriType(L"http://newauth/newpath#newfrag"); + UriType res = ref.Resolve(base); + EXPECT_TRUE(StrCmp(res.GetString(), L"http://newauth/newpath#newfrag") == 0); + + base = UriType(L"/path/#frag"); + ref = UriType(L"http://newauth/newpath#newfrag"); + res = ref.Resolve(base); + EXPECT_TRUE(StrCmp(res.GetString(), L"http://newauth/newpath#newfrag") == 0); + + // ref is alternate uri + base = UriType(L"http://auth/path/#frag"); + ref = UriType(L"urn:uuid:ee564b8a-7a87-4125-8c96-e9f123d6766f"); + res = ref.Resolve(base); + EXPECT_TRUE(StrCmp(res.GetString(), L"urn:uuid:ee564b8a-7a87-4125-8c96-e9f123d6766f") == 0); + + // ref is absolute path + base = UriType(L"http://auth/path/#"); + ref = UriType(L"/newpath#newfrag"); + res = ref.Resolve(base); + EXPECT_TRUE(StrCmp(res.GetString(), L"http://auth/newpath#newfrag") == 0); + + // ref is relative path + base = UriType(L"http://auth/path/file.json#frag"); + ref = UriType(L"newfile.json#"); + res = ref.Resolve(base); + EXPECT_TRUE(StrCmp(res.GetString(), L"http://auth/path/newfile.json#") == 0); + + base = UriType(L"http://auth/path/file.json#frag/stuff"); + ref = UriType(L"newfile.json#newfrag/newstuff"); + res = ref.Resolve(base); + EXPECT_TRUE(StrCmp(res.GetString(), L"http://auth/path/newfile.json#newfrag/newstuff") == 0); + + base = UriType(L"file.json", &allocator); + ref = UriType(L"newfile.json", &base.GetAllocator()); + res = ref.Resolve(base, &ref.GetAllocator()); + EXPECT_TRUE(StrCmp(res.GetString(), L"newfile.json") == 0); + + base = UriType(L"file.json", &allocator); + ref = UriType(L"./newfile.json", &allocator); + res = ref.Resolve(base, &allocator); + EXPECT_TRUE(StrCmp(res.GetString(), L"newfile.json") == 0); + + base = UriType(L"file.json"); + ref = UriType(L"parent/../newfile.json"); + res = ref.Resolve(base); + EXPECT_TRUE(StrCmp(res.GetString(), L"newfile.json") == 0); + + base = UriType(L"file.json"); + ref = UriType(L"parent/./newfile.json"); + res = ref.Resolve(base); + EXPECT_TRUE(StrCmp(res.GetString(), L"parent/newfile.json") == 0); + + base = UriType(L"file.json"); + ref = UriType(L"../../parent/.././newfile.json"); + res = ref.Resolve(base); + EXPECT_TRUE(StrCmp(res.GetString(), L"newfile.json") == 0); + + // This adds a joining slash so resolved length is base length + ref length + 1 + base = UriType(L"http://auth"); + ref = UriType(L"newfile.json"); + res = ref.Resolve(base); + EXPECT_TRUE(StrCmp(res.GetString(), L"http://auth/newfile.json") == 0); + + // ref is fragment + base = UriType(L"#frag/stuff"); + ref = UriType(L"#newfrag/newstuff"); + res = ref.Resolve(base); + EXPECT_TRUE(StrCmp(res.GetString(), L"#newfrag/newstuff") == 0); + + // test ref fragment always wins + base = UriType(L"/path#frag"); + ref = UriType(L""); + res = ref.Resolve(base); + EXPECT_TRUE(StrCmp(res.GetString(), L"/path") == 0); + + // Examples from RFC3896 + base = UriType(L"http://a/b/c/d;p?q"); + ref = UriType(L"g:h"); + res = ref.Resolve(base); + EXPECT_TRUE(StrCmp(res.GetString(), L"g:h") == 0); + ref = UriType(L"g"); + res = ref.Resolve(base); + EXPECT_TRUE(StrCmp(res.GetString(), L"http://a/b/c/g") == 0); + ref = UriType(L"./g"); + res = ref.Resolve(base); + EXPECT_TRUE(StrCmp(res.GetString(), L"http://a/b/c/g") == 0); + ref = UriType(L"g/"); + res = ref.Resolve(base); + EXPECT_TRUE(StrCmp(res.GetString(), L"http://a/b/c/g/") == 0); + ref = UriType(L"/g"); + res = ref.Resolve(base); + EXPECT_TRUE(StrCmp(res.GetString(), L"http://a/g") == 0); + ref = UriType(L"//g"); + res = ref.Resolve(base); + EXPECT_TRUE(StrCmp(res.GetString(), L"http://g") == 0); + ref = UriType(L"?y"); + res = ref.Resolve(base); + EXPECT_TRUE(StrCmp(res.GetString(), L"http://a/b/c/d;p?y") == 0); + ref = UriType(L"g?y"); + res = ref.Resolve(base); + EXPECT_TRUE(StrCmp(res.GetString(), L"http://a/b/c/g?y") == 0); + ref = UriType(L"#s"); + res = ref.Resolve(base); + EXPECT_TRUE(StrCmp(res.GetString(), L"http://a/b/c/d;p?q#s") == 0); + ref = UriType(L"g#s"); + res = ref.Resolve(base); + EXPECT_TRUE(StrCmp(res.GetString(), L"http://a/b/c/g#s") == 0); + ref = UriType(L"g?y#s"); + res = ref.Resolve(base); + EXPECT_TRUE(StrCmp(res.GetString(), L"http://a/b/c/g?y#s") == 0); + ref = UriType(L";x"); + res = ref.Resolve(base); + EXPECT_TRUE(StrCmp(res.GetString(), L"http://a/b/c/;x") == 0); + ref = UriType(L"g;x"); + res = ref.Resolve(base); + EXPECT_TRUE(StrCmp(res.GetString(), L"http://a/b/c/g;x") == 0); + ref = UriType(L"g;x?y#s"); + res = ref.Resolve(base); + EXPECT_TRUE(StrCmp(res.GetString(), L"http://a/b/c/g;x?y#s") == 0); + ref = UriType(L""); + res = ref.Resolve(base); + EXPECT_TRUE(StrCmp(res.GetString(), L"http://a/b/c/d;p?q") == 0); + ref = UriType(L"."); + res = ref.Resolve(base); + EXPECT_TRUE(StrCmp(res.GetString(), L"http://a/b/c/") == 0); + ref = UriType(L"./"); + res = ref.Resolve(base); + EXPECT_TRUE(StrCmp(res.GetString(), L"http://a/b/c/") == 0); + ref = UriType(L".."); + res = ref.Resolve(base); + EXPECT_TRUE(StrCmp(res.GetString(), L"http://a/b/") == 0); + ref = UriType(L"../"); + res = ref.Resolve(base); + EXPECT_TRUE(StrCmp(res.GetString(), L"http://a/b/") == 0); + ref = UriType(L"../g"); + res = ref.Resolve(base); + EXPECT_TRUE(StrCmp(res.GetString(), L"http://a/b/g") == 0); + ref = UriType(L"../.."); + res = ref.Resolve(base); + EXPECT_TRUE(StrCmp(res.GetString(), L"http://a/") == 0); + ref = UriType(L"../../"); + res = ref.Resolve(base); + EXPECT_TRUE(StrCmp(res.GetString(), L"http://a/") == 0); + ref = UriType(L"../../g"); + res = ref.Resolve(base); + EXPECT_TRUE(StrCmp(res.GetString(), L"http://a/g") == 0); + ref = UriType(L"../../../g"); + res = ref.Resolve(base); + EXPECT_TRUE(StrCmp(res.GetString(), L"http://a/g") == 0); + ref = UriType(L"../../../../g"); + res = ref.Resolve(base); + EXPECT_TRUE(StrCmp(res.GetString(), L"http://a/g") == 0); + ref = UriType(L"/./g"); + res = ref.Resolve(base); + EXPECT_TRUE(StrCmp(res.GetString(), L"http://a/g") == 0); + ref = UriType(L"/../g"); + res = ref.Resolve(base); + EXPECT_TRUE(StrCmp(res.GetString(), L"http://a/g") == 0); + ref = UriType(L"g."); + res = ref.Resolve(base); + EXPECT_TRUE(StrCmp(res.GetString(), L"http://a/b/c/g.") == 0); + ref = UriType(L".g"); + res = ref.Resolve(base); + EXPECT_TRUE(StrCmp(res.GetString(), L"http://a/b/c/.g") == 0); + ref = UriType(L"g.."); + res = ref.Resolve(base); + EXPECT_TRUE(StrCmp(res.GetString(), L"http://a/b/c/g..") == 0); + ref = UriType(L"..g"); + res = ref.Resolve(base); + EXPECT_TRUE(StrCmp(res.GetString(), L"http://a/b/c/..g") == 0); + ref = UriType(L"g#s/../x"); + res = ref.Resolve(base); + EXPECT_TRUE(StrCmp(res.GetString(), L"http://a/b/c/g#s/../x") == 0); +} + +TEST(Uri, Equals) { + typedef GenericUri UriType; + + UriType a = UriType("http://a/a#a"); + UriType b = UriType("http://a/a#b"); + UriType c = a; + + EXPECT_TRUE(a == a); + EXPECT_TRUE(a == c); + EXPECT_TRUE(a != b); +} + +TEST(Uri, Match) { + typedef GenericUri UriType; + + UriType a = UriType("http://a/a#a"); + UriType b = UriType("http://a/a#b"); + UriType c = a; + UriType d; + + EXPECT_TRUE(a.Match(a)); + EXPECT_TRUE(a.Match(c)); + EXPECT_FALSE(a.Match(b)); + EXPECT_FALSE(a.Match(b, true)); + EXPECT_TRUE(a.Match(b, false)); // Base Uri same + EXPECT_FALSE(a.Match(d)); + EXPECT_FALSE(d.Match(a)); +} + +TEST(Uri, Issue1899) { + typedef GenericUri > UriType; + + UriType base = UriType("http://auth/path/#frag"); + UriType ref = UriType("http://newauth/newpath#newfrag"); + UriType res = ref.Resolve(base); + EXPECT_TRUE(StrCmp(res.GetString(), "http://newauth/newpath#newfrag") == 0); +} + +#if defined(_MSC_VER) || defined(__clang__) +RAPIDJSON_DIAG_POP +#endif diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/valuetest.cpp b/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/valuetest.cpp new file mode 100644 index 0000000000..0a6b325f4b --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/valuetest.cpp @@ -0,0 +1,1861 @@ +// Tencent is pleased to support the open source community by making RapidJSON available. +// +// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. +// +// Licensed under the MIT License (the "License"); you may not use this file except +// in compliance with the License. You may obtain a copy of the License at +// +// http://opensource.org/licenses/MIT +// +// Unless required by applicable law or agreed to in writing, software distributed +// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +// CONDITIONS OF ANY KIND, either express or implied. See the License for the +// specific language governing permissions and limitations under the License. + +#include "unittest.h" +#include "rapidjson/document.h" +#include + +#ifdef __clang__ +RAPIDJSON_DIAG_PUSH +RAPIDJSON_DIAG_OFF(c++98-compat) +#endif + +using namespace rapidjson; + +TEST(Value, Size) { + if (sizeof(SizeType) == 4) { +#if RAPIDJSON_48BITPOINTER_OPTIMIZATION + EXPECT_EQ(16u, sizeof(Value)); +#elif RAPIDJSON_64BIT + EXPECT_EQ(24u, sizeof(Value)); +#else + EXPECT_EQ(16u, sizeof(Value)); +#endif + } +} + +TEST(Value, DefaultConstructor) { + Value x; + EXPECT_EQ(kNullType, x.GetType()); + EXPECT_TRUE(x.IsNull()); + + //std::cout << "sizeof(Value): " << sizeof(x) << std::endl; +} + +// Should not pass compilation +//TEST(Value, copy_constructor) { +// Value x(1234); +// Value y = x; +//} + +#if RAPIDJSON_HAS_CXX11_RVALUE_REFS + +#if 0 // Many old compiler does not support these. Turn it off temporaily. + +#include + +TEST(Value, Traits) { + typedef GenericValue, CrtAllocator> Value; + static_assert(std::is_constructible::value, ""); + static_assert(std::is_default_constructible::value, ""); +#ifndef _MSC_VER + static_assert(!std::is_copy_constructible::value, ""); +#endif + static_assert(std::is_move_constructible::value, ""); + +#ifndef _MSC_VER + static_assert(std::is_nothrow_constructible::value, ""); + static_assert(std::is_nothrow_default_constructible::value, ""); + static_assert(!std::is_nothrow_copy_constructible::value, ""); + static_assert(std::is_nothrow_move_constructible::value, ""); +#endif + + static_assert(std::is_assignable::value, ""); +#ifndef _MSC_VER + static_assert(!std::is_copy_assignable::value, ""); +#endif + static_assert(std::is_move_assignable::value, ""); + +#ifndef _MSC_VER + static_assert(std::is_nothrow_assignable::value, ""); +#endif + static_assert(!std::is_nothrow_copy_assignable::value, ""); +#ifndef _MSC_VER + static_assert(std::is_nothrow_move_assignable::value, ""); +#endif + + static_assert(std::is_destructible::value, ""); +#ifndef _MSC_VER + static_assert(std::is_nothrow_destructible::value, ""); +#endif +} + +#endif + +TEST(Value, MoveConstructor) { + typedef GenericValue, CrtAllocator> V; + V::AllocatorType allocator; + + V x((V(kArrayType))); + x.Reserve(4u, allocator); + x.PushBack(1, allocator).PushBack(2, allocator).PushBack(3, allocator).PushBack(4, allocator); + EXPECT_TRUE(x.IsArray()); + EXPECT_EQ(4u, x.Size()); + + // Value y(x); // does not compile (!is_copy_constructible) + V y(std::move(x)); + EXPECT_TRUE(x.IsNull()); + EXPECT_TRUE(y.IsArray()); + EXPECT_EQ(4u, y.Size()); + + // Value z = y; // does not compile (!is_copy_assignable) + V z = std::move(y); + EXPECT_TRUE(y.IsNull()); + EXPECT_TRUE(z.IsArray()); + EXPECT_EQ(4u, z.Size()); +} + +#endif // RAPIDJSON_HAS_CXX11_RVALUE_REFS + +TEST(Value, AssignmentOperator) { + Value x(1234); + Value y; + y = x; + EXPECT_TRUE(x.IsNull()); // move semantic + EXPECT_EQ(1234, y.GetInt()); + + y = 5678; + EXPECT_TRUE(y.IsInt()); + EXPECT_EQ(5678, y.GetInt()); + + x = "Hello"; + EXPECT_TRUE(x.IsString()); + EXPECT_STREQ(x.GetString(),"Hello"); + + y = StringRef(x.GetString(),x.GetStringLength()); + EXPECT_TRUE(y.IsString()); + EXPECT_EQ(y.GetString(),x.GetString()); + EXPECT_EQ(y.GetStringLength(),x.GetStringLength()); + + static char mstr[] = "mutable"; + // y = mstr; // should not compile + y = StringRef(mstr); + EXPECT_TRUE(y.IsString()); + EXPECT_EQ(y.GetString(),mstr); + +#if RAPIDJSON_HAS_CXX11_RVALUE_REFS + // C++11 move assignment + x = Value("World"); + EXPECT_TRUE(x.IsString()); + EXPECT_STREQ("World", x.GetString()); + + x = std::move(y); + EXPECT_TRUE(y.IsNull()); + EXPECT_TRUE(x.IsString()); + EXPECT_EQ(x.GetString(), mstr); + + y = std::move(Value().SetInt(1234)); + EXPECT_TRUE(y.IsInt()); + EXPECT_EQ(1234, y); +#endif // RAPIDJSON_HAS_CXX11_RVALUE_REFS +} + +template +void TestEqual(const A& a, const B& b) { + EXPECT_TRUE (a == b); + EXPECT_FALSE(a != b); + EXPECT_TRUE (b == a); + EXPECT_FALSE(b != a); +} + +template +void TestUnequal(const A& a, const B& b) { + EXPECT_FALSE(a == b); + EXPECT_TRUE (a != b); + EXPECT_FALSE(b == a); + EXPECT_TRUE (b != a); +} + +TEST(Value, EqualtoOperator) { + Value::AllocatorType allocator; + Value x(kObjectType); + x.AddMember("hello", "world", allocator) + .AddMember("t", Value(true).Move(), allocator) + .AddMember("f", Value(false).Move(), allocator) + .AddMember("n", Value(kNullType).Move(), allocator) + .AddMember("i", 123, allocator) + .AddMember("pi", 3.14, allocator) + .AddMember("a", Value(kArrayType).Move().PushBack(1, allocator).PushBack(2, allocator).PushBack(3, allocator), allocator); + + // Test templated operator==() and operator!=() + TestEqual(x["hello"], "world"); + const char* cc = "world"; + TestEqual(x["hello"], cc); + char* c = strdup("world"); + TestEqual(x["hello"], c); + free(c); + + TestEqual(x["t"], true); + TestEqual(x["f"], false); + TestEqual(x["i"], 123); + TestEqual(x["pi"], 3.14); + + // Test operator==() (including different allocators) + CrtAllocator crtAllocator; + GenericValue, CrtAllocator> y; + GenericDocument, CrtAllocator> z(&crtAllocator); + y.CopyFrom(x, crtAllocator); + z.CopyFrom(y, z.GetAllocator()); + TestEqual(x, y); + TestEqual(y, z); + TestEqual(z, x); + + // Swapping member order should be fine. + EXPECT_TRUE(y.RemoveMember("t")); + TestUnequal(x, y); + TestUnequal(z, y); + EXPECT_TRUE(z.RemoveMember("t")); + TestUnequal(x, z); + TestEqual(y, z); + y.AddMember("t", false, crtAllocator); + z.AddMember("t", false, z.GetAllocator()); + TestUnequal(x, y); + TestUnequal(z, x); + y["t"] = true; + z["t"] = true; + TestEqual(x, y); + TestEqual(y, z); + TestEqual(z, x); + + // Swapping element order is not OK + x["a"][0].Swap(x["a"][1]); + TestUnequal(x, y); + x["a"][0].Swap(x["a"][1]); + TestEqual(x, y); + + // Array of different size + x["a"].PushBack(4, allocator); + TestUnequal(x, y); + x["a"].PopBack(); + TestEqual(x, y); + + // Issue #129: compare Uint64 + x.SetUint64(RAPIDJSON_UINT64_C2(0xFFFFFFFF, 0xFFFFFFF0)); + y.SetUint64(RAPIDJSON_UINT64_C2(0xFFFFFFFF, 0xFFFFFFFF)); + TestUnequal(x, y); +} + +template +void TestCopyFrom() { + typename Value::AllocatorType a; + Value v1(1234); + Value v2(v1, a); // deep copy constructor + EXPECT_TRUE(v1.GetType() == v2.GetType()); + EXPECT_EQ(v1.GetInt(), v2.GetInt()); + + v1.SetString("foo"); + v2.CopyFrom(v1, a); + EXPECT_TRUE(v1.GetType() == v2.GetType()); + EXPECT_STREQ(v1.GetString(), v2.GetString()); + EXPECT_EQ(v1.GetString(), v2.GetString()); // string NOT copied + + v1.SetString("bar", a); // copy string + v2.CopyFrom(v1, a); + EXPECT_TRUE(v1.GetType() == v2.GetType()); + EXPECT_STREQ(v1.GetString(), v2.GetString()); + EXPECT_NE(v1.GetString(), v2.GetString()); // string copied + + + v1.SetArray().PushBack(1234, a); + v2.CopyFrom(v1, a); + EXPECT_TRUE(v2.IsArray()); + EXPECT_EQ(v1.Size(), v2.Size()); + + v1.PushBack(Value().SetString("foo", a), a); // push string copy + EXPECT_TRUE(v1.Size() != v2.Size()); + v2.CopyFrom(v1, a); + EXPECT_TRUE(v1.Size() == v2.Size()); + EXPECT_STREQ(v1[1].GetString(), v2[1].GetString()); + EXPECT_NE(v1[1].GetString(), v2[1].GetString()); // string got copied +} + +TEST(Value, CopyFrom) { + TestCopyFrom(); + TestCopyFrom, CrtAllocator> >(); +} + +TEST(Value, Swap) { + Value v1(1234); + Value v2(kObjectType); + + EXPECT_EQ(&v1, &v1.Swap(v2)); + EXPECT_TRUE(v1.IsObject()); + EXPECT_TRUE(v2.IsInt()); + EXPECT_EQ(1234, v2.GetInt()); + + // testing std::swap compatibility + using std::swap; + swap(v1, v2); + EXPECT_TRUE(v1.IsInt()); + EXPECT_TRUE(v2.IsObject()); +} + +TEST(Value, Null) { + // Default constructor + Value x; + EXPECT_EQ(kNullType, x.GetType()); + EXPECT_TRUE(x.IsNull()); + + EXPECT_FALSE(x.IsTrue()); + EXPECT_FALSE(x.IsFalse()); + EXPECT_FALSE(x.IsNumber()); + EXPECT_FALSE(x.IsString()); + EXPECT_FALSE(x.IsObject()); + EXPECT_FALSE(x.IsArray()); + + // Constructor with type + Value y(kNullType); + EXPECT_TRUE(y.IsNull()); + + // SetNull(); + Value z(true); + z.SetNull(); + EXPECT_TRUE(z.IsNull()); +} + +TEST(Value, True) { + // Constructor with bool + Value x(true); + EXPECT_EQ(kTrueType, x.GetType()); + EXPECT_TRUE(x.GetBool()); + EXPECT_TRUE(x.IsBool()); + EXPECT_TRUE(x.IsTrue()); + + EXPECT_FALSE(x.IsNull()); + EXPECT_FALSE(x.IsFalse()); + EXPECT_FALSE(x.IsNumber()); + EXPECT_FALSE(x.IsString()); + EXPECT_FALSE(x.IsObject()); + EXPECT_FALSE(x.IsArray()); + + // Constructor with type + Value y(kTrueType); + EXPECT_TRUE(y.IsTrue()); + + // SetBool() + Value z; + z.SetBool(true); + EXPECT_TRUE(z.IsTrue()); + + // Templated functions + EXPECT_TRUE(z.Is()); + EXPECT_TRUE(z.Get()); + EXPECT_FALSE(z.Set(false).Get()); + EXPECT_TRUE(z.Set(true).Get()); +} + +TEST(Value, False) { + // Constructor with bool + Value x(false); + EXPECT_EQ(kFalseType, x.GetType()); + EXPECT_TRUE(x.IsBool()); + EXPECT_TRUE(x.IsFalse()); + + EXPECT_FALSE(x.IsNull()); + EXPECT_FALSE(x.IsTrue()); + EXPECT_FALSE(x.GetBool()); + //EXPECT_FALSE((bool)x); + EXPECT_FALSE(x.IsNumber()); + EXPECT_FALSE(x.IsString()); + EXPECT_FALSE(x.IsObject()); + EXPECT_FALSE(x.IsArray()); + + // Constructor with type + Value y(kFalseType); + EXPECT_TRUE(y.IsFalse()); + + // SetBool() + Value z; + z.SetBool(false); + EXPECT_TRUE(z.IsFalse()); +} + +TEST(Value, Int) { + // Constructor with int + Value x(1234); + EXPECT_EQ(kNumberType, x.GetType()); + EXPECT_EQ(1234, x.GetInt()); + EXPECT_EQ(1234u, x.GetUint()); + EXPECT_EQ(1234, x.GetInt64()); + EXPECT_EQ(1234u, x.GetUint64()); + EXPECT_NEAR(1234.0, x.GetDouble(), 0.0); + //EXPECT_EQ(1234, (int)x); + //EXPECT_EQ(1234, (unsigned)x); + //EXPECT_EQ(1234, (int64_t)x); + //EXPECT_EQ(1234, (uint64_t)x); + //EXPECT_EQ(1234, (double)x); + EXPECT_TRUE(x.IsNumber()); + EXPECT_TRUE(x.IsInt()); + EXPECT_TRUE(x.IsUint()); + EXPECT_TRUE(x.IsInt64()); + EXPECT_TRUE(x.IsUint64()); + + EXPECT_FALSE(x.IsDouble()); + EXPECT_FALSE(x.IsFloat()); + EXPECT_FALSE(x.IsNull()); + EXPECT_FALSE(x.IsBool()); + EXPECT_FALSE(x.IsFalse()); + EXPECT_FALSE(x.IsTrue()); + EXPECT_FALSE(x.IsString()); + EXPECT_FALSE(x.IsObject()); + EXPECT_FALSE(x.IsArray()); + + Value nx(-1234); + EXPECT_EQ(-1234, nx.GetInt()); + EXPECT_EQ(-1234, nx.GetInt64()); + EXPECT_TRUE(nx.IsInt()); + EXPECT_TRUE(nx.IsInt64()); + EXPECT_FALSE(nx.IsUint()); + EXPECT_FALSE(nx.IsUint64()); + + // Constructor with type + Value y(kNumberType); + EXPECT_TRUE(y.IsNumber()); + EXPECT_TRUE(y.IsInt()); + EXPECT_EQ(0, y.GetInt()); + + // SetInt() + Value z; + z.SetInt(1234); + EXPECT_EQ(1234, z.GetInt()); + + // operator=(int) + z = 5678; + EXPECT_EQ(5678, z.GetInt()); + + // Templated functions + EXPECT_TRUE(z.Is()); + EXPECT_EQ(5678, z.Get()); + EXPECT_EQ(5679, z.Set(5679).Get()); + EXPECT_EQ(5680, z.Set(5680).Get()); + +#ifdef _MSC_VER + // long as int on MSC platforms + RAPIDJSON_STATIC_ASSERT(sizeof(long) == sizeof(int)); + z.SetInt(2222); + EXPECT_TRUE(z.Is()); + EXPECT_EQ(2222l, z.Get()); + EXPECT_EQ(3333l, z.Set(3333l).Get()); + EXPECT_EQ(4444l, z.Set(4444l).Get()); + EXPECT_TRUE(z.IsInt()); +#endif +} + +TEST(Value, Uint) { + // Constructor with int + Value x(1234u); + EXPECT_EQ(kNumberType, x.GetType()); + EXPECT_EQ(1234, x.GetInt()); + EXPECT_EQ(1234u, x.GetUint()); + EXPECT_EQ(1234, x.GetInt64()); + EXPECT_EQ(1234u, x.GetUint64()); + EXPECT_TRUE(x.IsNumber()); + EXPECT_TRUE(x.IsInt()); + EXPECT_TRUE(x.IsUint()); + EXPECT_TRUE(x.IsInt64()); + EXPECT_TRUE(x.IsUint64()); + EXPECT_NEAR(1234.0, x.GetDouble(), 0.0); // Number can always be cast as double but !IsDouble(). + + EXPECT_FALSE(x.IsDouble()); + EXPECT_FALSE(x.IsFloat()); + EXPECT_FALSE(x.IsNull()); + EXPECT_FALSE(x.IsBool()); + EXPECT_FALSE(x.IsFalse()); + EXPECT_FALSE(x.IsTrue()); + EXPECT_FALSE(x.IsString()); + EXPECT_FALSE(x.IsObject()); + EXPECT_FALSE(x.IsArray()); + + // SetUint() + Value z; + z.SetUint(1234); + EXPECT_EQ(1234u, z.GetUint()); + + // operator=(unsigned) + z = 5678u; + EXPECT_EQ(5678u, z.GetUint()); + + z = 2147483648u; // 2^31, cannot cast as int + EXPECT_EQ(2147483648u, z.GetUint()); + EXPECT_FALSE(z.IsInt()); + EXPECT_TRUE(z.IsInt64()); // Issue 41: Incorrect parsing of unsigned int number types + + // Templated functions + EXPECT_TRUE(z.Is()); + EXPECT_EQ(2147483648u, z.Get()); + EXPECT_EQ(2147483649u, z.Set(2147483649u).Get()); + EXPECT_EQ(2147483650u, z.Set(2147483650u).Get()); + +#ifdef _MSC_VER + // unsigned long as unsigned on MSC platforms + RAPIDJSON_STATIC_ASSERT(sizeof(unsigned long) == sizeof(unsigned)); + z.SetUint(2222); + EXPECT_TRUE(z.Is()); + EXPECT_EQ(2222ul, z.Get()); + EXPECT_EQ(3333ul, z.Set(3333ul).Get()); + EXPECT_EQ(4444ul, z.Set(4444ul).Get()); + EXPECT_TRUE(x.IsUint()); +#endif +} + +TEST(Value, Int64) { + // Constructor with int + Value x(int64_t(1234)); + EXPECT_EQ(kNumberType, x.GetType()); + EXPECT_EQ(1234, x.GetInt()); + EXPECT_EQ(1234u, x.GetUint()); + EXPECT_EQ(1234, x.GetInt64()); + EXPECT_EQ(1234u, x.GetUint64()); + EXPECT_TRUE(x.IsNumber()); + EXPECT_TRUE(x.IsInt()); + EXPECT_TRUE(x.IsUint()); + EXPECT_TRUE(x.IsInt64()); + EXPECT_TRUE(x.IsUint64()); + + EXPECT_FALSE(x.IsDouble()); + EXPECT_FALSE(x.IsFloat()); + EXPECT_FALSE(x.IsNull()); + EXPECT_FALSE(x.IsBool()); + EXPECT_FALSE(x.IsFalse()); + EXPECT_FALSE(x.IsTrue()); + EXPECT_FALSE(x.IsString()); + EXPECT_FALSE(x.IsObject()); + EXPECT_FALSE(x.IsArray()); + + Value nx(int64_t(-1234)); + EXPECT_EQ(-1234, nx.GetInt()); + EXPECT_EQ(-1234, nx.GetInt64()); + EXPECT_TRUE(nx.IsInt()); + EXPECT_TRUE(nx.IsInt64()); + EXPECT_FALSE(nx.IsUint()); + EXPECT_FALSE(nx.IsUint64()); + + // SetInt64() + Value z; + z.SetInt64(1234); + EXPECT_EQ(1234, z.GetInt64()); + + z.SetInt64(2147483648u); // 2^31, cannot cast as int + EXPECT_FALSE(z.IsInt()); + EXPECT_TRUE(z.IsUint()); + EXPECT_NEAR(2147483648.0, z.GetDouble(), 0.0); + + z.SetInt64(int64_t(4294967295u) + 1); // 2^32, cannot cast as uint + EXPECT_FALSE(z.IsInt()); + EXPECT_FALSE(z.IsUint()); + EXPECT_NEAR(4294967296.0, z.GetDouble(), 0.0); + + z.SetInt64(-int64_t(2147483648u) - 1); // -2^31-1, cannot cast as int + EXPECT_FALSE(z.IsInt()); + EXPECT_NEAR(-2147483649.0, z.GetDouble(), 0.0); + + int64_t i = static_cast(RAPIDJSON_UINT64_C2(0x80000000, 00000000)); + z.SetInt64(i); + EXPECT_DOUBLE_EQ(-9223372036854775808.0, z.GetDouble()); + + // Templated functions + EXPECT_TRUE(z.Is()); + EXPECT_EQ(i, z.Get()); +#if 0 // signed integer underflow is undefined behaviour + EXPECT_EQ(i - 1, z.Set(i - 1).Get()); + EXPECT_EQ(i - 2, z.Set(i - 2).Get()); +#endif +} + +TEST(Value, Uint64) { + // Constructor with int + Value x(uint64_t(1234)); + EXPECT_EQ(kNumberType, x.GetType()); + EXPECT_EQ(1234, x.GetInt()); + EXPECT_EQ(1234u, x.GetUint()); + EXPECT_EQ(1234, x.GetInt64()); + EXPECT_EQ(1234u, x.GetUint64()); + EXPECT_TRUE(x.IsNumber()); + EXPECT_TRUE(x.IsInt()); + EXPECT_TRUE(x.IsUint()); + EXPECT_TRUE(x.IsInt64()); + EXPECT_TRUE(x.IsUint64()); + + EXPECT_FALSE(x.IsDouble()); + EXPECT_FALSE(x.IsFloat()); + EXPECT_FALSE(x.IsNull()); + EXPECT_FALSE(x.IsBool()); + EXPECT_FALSE(x.IsFalse()); + EXPECT_FALSE(x.IsTrue()); + EXPECT_FALSE(x.IsString()); + EXPECT_FALSE(x.IsObject()); + EXPECT_FALSE(x.IsArray()); + + // SetUint64() + Value z; + z.SetUint64(1234); + EXPECT_EQ(1234u, z.GetUint64()); + + z.SetUint64(uint64_t(2147483648u)); // 2^31, cannot cast as int + EXPECT_FALSE(z.IsInt()); + EXPECT_TRUE(z.IsUint()); + EXPECT_TRUE(z.IsInt64()); + + z.SetUint64(uint64_t(4294967295u) + 1); // 2^32, cannot cast as uint + EXPECT_FALSE(z.IsInt()); + EXPECT_FALSE(z.IsUint()); + EXPECT_TRUE(z.IsInt64()); + + uint64_t u = RAPIDJSON_UINT64_C2(0x80000000, 0x00000000); + z.SetUint64(u); // 2^63 cannot cast as int64 + EXPECT_FALSE(z.IsInt64()); + EXPECT_EQ(u, z.GetUint64()); // Issue 48 + EXPECT_DOUBLE_EQ(9223372036854775808.0, z.GetDouble()); + + // Templated functions + EXPECT_TRUE(z.Is()); + EXPECT_EQ(u, z.Get()); + EXPECT_EQ(u + 1, z.Set(u + 1).Get()); + EXPECT_EQ(u + 2, z.Set(u + 2).Get()); +} + +TEST(Value, Double) { + // Constructor with double + Value x(12.34); + EXPECT_EQ(kNumberType, x.GetType()); + EXPECT_NEAR(12.34, x.GetDouble(), 0.0); + EXPECT_TRUE(x.IsNumber()); + EXPECT_TRUE(x.IsDouble()); + + EXPECT_FALSE(x.IsInt()); + EXPECT_FALSE(x.IsNull()); + EXPECT_FALSE(x.IsBool()); + EXPECT_FALSE(x.IsFalse()); + EXPECT_FALSE(x.IsTrue()); + EXPECT_FALSE(x.IsString()); + EXPECT_FALSE(x.IsObject()); + EXPECT_FALSE(x.IsArray()); + + // SetDouble() + Value z; + z.SetDouble(12.34); + EXPECT_NEAR(12.34, z.GetDouble(), 0.0); + + z = 56.78; + EXPECT_NEAR(56.78, z.GetDouble(), 0.0); + + // Templated functions + EXPECT_TRUE(z.Is()); + EXPECT_EQ(56.78, z.Get()); + EXPECT_EQ(57.78, z.Set(57.78).Get()); + EXPECT_EQ(58.78, z.Set(58.78).Get()); +} + +TEST(Value, Float) { + // Constructor with double + Value x(12.34f); + EXPECT_EQ(kNumberType, x.GetType()); + EXPECT_NEAR(12.34f, x.GetFloat(), 0.0); + EXPECT_TRUE(x.IsNumber()); + EXPECT_TRUE(x.IsDouble()); + EXPECT_TRUE(x.IsFloat()); + + EXPECT_FALSE(x.IsInt()); + EXPECT_FALSE(x.IsNull()); + EXPECT_FALSE(x.IsBool()); + EXPECT_FALSE(x.IsFalse()); + EXPECT_FALSE(x.IsTrue()); + EXPECT_FALSE(x.IsString()); + EXPECT_FALSE(x.IsObject()); + EXPECT_FALSE(x.IsArray()); + + // SetFloat() + Value z; + z.SetFloat(12.34f); + EXPECT_NEAR(12.34f, z.GetFloat(), 0.0f); + + // Issue 573 + z.SetInt(0); + EXPECT_EQ(0.0f, z.GetFloat()); + + z = 56.78f; + EXPECT_NEAR(56.78f, z.GetFloat(), 0.0f); + + // Templated functions + EXPECT_TRUE(z.Is()); + EXPECT_EQ(56.78f, z.Get()); + EXPECT_EQ(57.78f, z.Set(57.78f).Get()); + EXPECT_EQ(58.78f, z.Set(58.78f).Get()); +} + +TEST(Value, IsLosslessDouble) { + EXPECT_TRUE(Value(0.0).IsLosslessDouble()); + EXPECT_TRUE(Value(12.34).IsLosslessDouble()); + EXPECT_TRUE(Value(-123).IsLosslessDouble()); + EXPECT_TRUE(Value(2147483648u).IsLosslessDouble()); + EXPECT_TRUE(Value(-static_cast(RAPIDJSON_UINT64_C2(0x40000000, 0x00000000))).IsLosslessDouble()); +#if !(defined(_MSC_VER) && _MSC_VER < 1800) // VC2010 has problem + EXPECT_TRUE(Value(RAPIDJSON_UINT64_C2(0xA0000000, 0x00000000)).IsLosslessDouble()); +#endif + + EXPECT_FALSE(Value(static_cast(RAPIDJSON_UINT64_C2(0x7FFFFFFF, 0xFFFFFFFF))).IsLosslessDouble()); // INT64_MAX + EXPECT_FALSE(Value(-static_cast(RAPIDJSON_UINT64_C2(0x7FFFFFFF, 0xFFFFFFFF))).IsLosslessDouble()); // -INT64_MAX + EXPECT_TRUE(Value(-static_cast(RAPIDJSON_UINT64_C2(0x7FFFFFFF, 0xFFFFFFFF)) - 1).IsLosslessDouble()); // INT64_MIN + EXPECT_FALSE(Value(RAPIDJSON_UINT64_C2(0xFFFFFFFF, 0xFFFFFFFF)).IsLosslessDouble()); // UINT64_MAX + + EXPECT_TRUE(Value(3.4028234e38f).IsLosslessDouble()); // FLT_MAX + EXPECT_TRUE(Value(-3.4028234e38f).IsLosslessDouble()); // -FLT_MAX + EXPECT_TRUE(Value(1.17549435e-38f).IsLosslessDouble()); // FLT_MIN + EXPECT_TRUE(Value(-1.17549435e-38f).IsLosslessDouble()); // -FLT_MIN + EXPECT_TRUE(Value(1.7976931348623157e+308).IsLosslessDouble()); // DBL_MAX + EXPECT_TRUE(Value(-1.7976931348623157e+308).IsLosslessDouble()); // -DBL_MAX + EXPECT_TRUE(Value(2.2250738585072014e-308).IsLosslessDouble()); // DBL_MIN + EXPECT_TRUE(Value(-2.2250738585072014e-308).IsLosslessDouble()); // -DBL_MIN +} + +TEST(Value, IsLosslessFloat) { + EXPECT_TRUE(Value(12.25).IsLosslessFloat()); + EXPECT_TRUE(Value(-123).IsLosslessFloat()); + EXPECT_TRUE(Value(2147483648u).IsLosslessFloat()); + EXPECT_TRUE(Value(3.4028234e38f).IsLosslessFloat()); + EXPECT_TRUE(Value(-3.4028234e38f).IsLosslessFloat()); + EXPECT_FALSE(Value(3.4028235e38).IsLosslessFloat()); + EXPECT_FALSE(Value(0.3).IsLosslessFloat()); +} + +TEST(Value, String) { + // Construction with const string + Value x("Hello", 5); // literal + EXPECT_EQ(kStringType, x.GetType()); + EXPECT_TRUE(x.IsString()); + EXPECT_STREQ("Hello", x.GetString()); + EXPECT_EQ(5u, x.GetStringLength()); + + EXPECT_FALSE(x.IsNumber()); + EXPECT_FALSE(x.IsNull()); + EXPECT_FALSE(x.IsBool()); + EXPECT_FALSE(x.IsFalse()); + EXPECT_FALSE(x.IsTrue()); + EXPECT_FALSE(x.IsObject()); + EXPECT_FALSE(x.IsArray()); + + static const char cstr[] = "World"; // const array + Value(cstr).Swap(x); + EXPECT_TRUE(x.IsString()); + EXPECT_EQ(x.GetString(), cstr); + EXPECT_EQ(x.GetStringLength(), sizeof(cstr)-1); + + static char mstr[] = "Howdy"; // non-const array + // Value(mstr).Swap(x); // should not compile + Value(StringRef(mstr)).Swap(x); + EXPECT_TRUE(x.IsString()); + EXPECT_EQ(x.GetString(), mstr); + EXPECT_EQ(x.GetStringLength(), sizeof(mstr)-1); + strncpy(mstr,"Hello", sizeof(mstr)); + EXPECT_STREQ(x.GetString(), "Hello"); + + const char* pstr = cstr; + //Value(pstr).Swap(x); // should not compile + Value(StringRef(pstr)).Swap(x); + EXPECT_TRUE(x.IsString()); + EXPECT_EQ(x.GetString(), cstr); + EXPECT_EQ(x.GetStringLength(), sizeof(cstr)-1); + + char* mpstr = mstr; + Value(StringRef(mpstr,sizeof(mstr)-1)).Swap(x); + EXPECT_TRUE(x.IsString()); + EXPECT_EQ(x.GetString(), mstr); + EXPECT_EQ(x.GetStringLength(), 5u); + EXPECT_STREQ(x.GetString(), "Hello"); + + // Constructor with copy string + MemoryPoolAllocator<> allocator; + Value c(x.GetString(), x.GetStringLength(), allocator); + EXPECT_NE(x.GetString(), c.GetString()); + EXPECT_EQ(x.GetStringLength(), c.GetStringLength()); + EXPECT_STREQ(x.GetString(), c.GetString()); + //x.SetString("World"); + x.SetString("World", 5); + EXPECT_STREQ("Hello", c.GetString()); + EXPECT_EQ(5u, c.GetStringLength()); + + // Constructor with type + Value y(kStringType); + EXPECT_TRUE(y.IsString()); + EXPECT_STREQ("", y.GetString()); // Empty string should be "" instead of 0 (issue 226) + EXPECT_EQ(0u, y.GetStringLength()); + + // SetConsttring() + Value z; + z.SetString("Hello"); + EXPECT_TRUE(x.IsString()); + z.SetString("Hello", 5); + EXPECT_STREQ("Hello", z.GetString()); + EXPECT_STREQ("Hello", z.GetString()); + EXPECT_EQ(5u, z.GetStringLength()); + + z.SetString("Hello"); + EXPECT_TRUE(z.IsString()); + EXPECT_STREQ("Hello", z.GetString()); + + //z.SetString(mstr); // should not compile + //z.SetString(pstr); // should not compile + z.SetString(StringRef(mstr)); + EXPECT_TRUE(z.IsString()); + EXPECT_STREQ(z.GetString(), mstr); + + z.SetString(cstr); + EXPECT_TRUE(z.IsString()); + EXPECT_EQ(cstr, z.GetString()); + + z = cstr; + EXPECT_TRUE(z.IsString()); + EXPECT_EQ(cstr, z.GetString()); + + // SetString() + char s[] = "World"; + Value w; + w.SetString(s, static_cast(strlen(s)), allocator); + s[0] = '\0'; + EXPECT_STREQ("World", w.GetString()); + EXPECT_EQ(5u, w.GetStringLength()); + + // templated functions + EXPECT_TRUE(z.Is()); + EXPECT_STREQ(cstr, z.Get()); + EXPECT_STREQ("Apple", z.Set("Apple").Get()); + +#if RAPIDJSON_HAS_STDSTRING + { + std::string str = "Hello World"; + str[5] = '\0'; + EXPECT_STREQ(str.data(),"Hello"); // embedded '\0' + EXPECT_EQ(str.size(), 11u); + + // no copy + Value vs0(StringRef(str)); + EXPECT_TRUE(vs0.IsString()); + EXPECT_EQ(vs0.GetString(), str.data()); + EXPECT_EQ(vs0.GetStringLength(), str.size()); + TestEqual(vs0, str); + + // do copy + Value vs1(str, allocator); + EXPECT_TRUE(vs1.IsString()); + EXPECT_NE(vs1.GetString(), str.data()); + EXPECT_NE(vs1.GetString(), str); // not equal due to embedded '\0' + EXPECT_EQ(vs1.GetStringLength(), str.size()); + TestEqual(vs1, str); + + // SetString + str = "World"; + vs0.SetNull().SetString(str, allocator); + EXPECT_TRUE(vs0.IsString()); + EXPECT_STREQ(vs0.GetString(), str.c_str()); + EXPECT_EQ(vs0.GetStringLength(), str.size()); + TestEqual(str, vs0); + TestUnequal(str, vs1); + + // vs1 = str; // should not compile + vs1 = StringRef(str); + TestEqual(str, vs1); + TestEqual(vs0, vs1); + + // Templated function. + EXPECT_TRUE(vs0.Is()); + EXPECT_EQ(str, vs0.Get()); + vs0.Set(std::string("Apple"), allocator); + EXPECT_EQ(std::string("Apple"), vs0.Get()); + vs0.Set(std::string("Orange"), allocator); + EXPECT_EQ(std::string("Orange"), vs0.Get()); + } +#endif // RAPIDJSON_HAS_STDSTRING +} + +// Issue 226: Value of string type should not point to NULL +TEST(Value, SetStringNull) { + + MemoryPoolAllocator<> allocator; + const char* nullPtr = 0; + { + // Construction with string type creates empty string + Value v(kStringType); + EXPECT_NE(v.GetString(), nullPtr); // non-null string returned + EXPECT_EQ(v.GetStringLength(), 0u); + + // Construction from/setting to null without length not allowed + EXPECT_THROW(Value(StringRef(nullPtr)), AssertException); + EXPECT_THROW(Value(StringRef(nullPtr), allocator), AssertException); + EXPECT_THROW(v.SetString(nullPtr, allocator), AssertException); + + // Non-empty length with null string is not allowed + EXPECT_THROW(v.SetString(nullPtr, 17u), AssertException); + EXPECT_THROW(v.SetString(nullPtr, 42u, allocator), AssertException); + + // Setting to null string with empty length is allowed + v.SetString(nullPtr, 0u); + EXPECT_NE(v.GetString(), nullPtr); // non-null string returned + EXPECT_EQ(v.GetStringLength(), 0u); + + v.SetNull(); + v.SetString(nullPtr, 0u, allocator); + EXPECT_NE(v.GetString(), nullPtr); // non-null string returned + EXPECT_EQ(v.GetStringLength(), 0u); + } + // Construction with null string and empty length is allowed + { + Value v(nullPtr,0u); + EXPECT_NE(v.GetString(), nullPtr); // non-null string returned + EXPECT_EQ(v.GetStringLength(), 0u); + } + { + Value v(nullPtr, 0u, allocator); + EXPECT_NE(v.GetString(), nullPtr); // non-null string returned + EXPECT_EQ(v.GetStringLength(), 0u); + } +} + +template +static void TestArray(T& x, Allocator& allocator) { + const T& y = x; + + // PushBack() + Value v; + x.PushBack(v, allocator); + v.SetBool(true); + x.PushBack(v, allocator); + v.SetBool(false); + x.PushBack(v, allocator); + v.SetInt(123); + x.PushBack(v, allocator); + //x.PushBack((const char*)"foo", allocator); // should not compile + x.PushBack("foo", allocator); + + EXPECT_FALSE(x.Empty()); + EXPECT_EQ(5u, x.Size()); + EXPECT_FALSE(y.Empty()); + EXPECT_EQ(5u, y.Size()); + EXPECT_TRUE(x[SizeType(0)].IsNull()); + EXPECT_TRUE(x[1].IsTrue()); + EXPECT_TRUE(x[2].IsFalse()); + EXPECT_TRUE(x[3].IsInt()); + EXPECT_EQ(123, x[3].GetInt()); + EXPECT_TRUE(y[SizeType(0)].IsNull()); + EXPECT_TRUE(y[1].IsTrue()); + EXPECT_TRUE(y[2].IsFalse()); + EXPECT_TRUE(y[3].IsInt()); + EXPECT_EQ(123, y[3].GetInt()); + EXPECT_TRUE(y[4].IsString()); + EXPECT_STREQ("foo", y[4].GetString()); + +#if RAPIDJSON_HAS_CXX11_RVALUE_REFS + // PushBack(GenericValue&&, Allocator&); + { + Value y2(kArrayType); + y2.PushBack(Value(true), allocator); + y2.PushBack(std::move(Value(kArrayType).PushBack(Value(1), allocator).PushBack("foo", allocator)), allocator); + EXPECT_EQ(2u, y2.Size()); + EXPECT_TRUE(y2[0].IsTrue()); + EXPECT_TRUE(y2[1].IsArray()); + EXPECT_EQ(2u, y2[1].Size()); + EXPECT_TRUE(y2[1][0].IsInt()); + EXPECT_TRUE(y2[1][1].IsString()); + } +#endif + + // iterator + typename T::ValueIterator itr = x.Begin(); + EXPECT_TRUE(itr != x.End()); + EXPECT_TRUE(itr->IsNull()); + ++itr; + EXPECT_TRUE(itr != x.End()); + EXPECT_TRUE(itr->IsTrue()); + ++itr; + EXPECT_TRUE(itr != x.End()); + EXPECT_TRUE(itr->IsFalse()); + ++itr; + EXPECT_TRUE(itr != x.End()); + EXPECT_TRUE(itr->IsInt()); + EXPECT_EQ(123, itr->GetInt()); + ++itr; + EXPECT_TRUE(itr != x.End()); + EXPECT_TRUE(itr->IsString()); + EXPECT_STREQ("foo", itr->GetString()); + + // const iterator + typename T::ConstValueIterator citr = y.Begin(); + EXPECT_TRUE(citr != y.End()); + EXPECT_TRUE(citr->IsNull()); + ++citr; + EXPECT_TRUE(citr != y.End()); + EXPECT_TRUE(citr->IsTrue()); + ++citr; + EXPECT_TRUE(citr != y.End()); + EXPECT_TRUE(citr->IsFalse()); + ++citr; + EXPECT_TRUE(citr != y.End()); + EXPECT_TRUE(citr->IsInt()); + EXPECT_EQ(123, citr->GetInt()); + ++citr; + EXPECT_TRUE(citr != y.End()); + EXPECT_TRUE(citr->IsString()); + EXPECT_STREQ("foo", citr->GetString()); + + // PopBack() + x.PopBack(); + EXPECT_EQ(4u, x.Size()); + EXPECT_TRUE(y[SizeType(0)].IsNull()); + EXPECT_TRUE(y[1].IsTrue()); + EXPECT_TRUE(y[2].IsFalse()); + EXPECT_TRUE(y[3].IsInt()); + + // Clear() + x.Clear(); + EXPECT_TRUE(x.Empty()); + EXPECT_EQ(0u, x.Size()); + EXPECT_TRUE(y.Empty()); + EXPECT_EQ(0u, y.Size()); + + // Erase(ValueIterator) + + // Use array of array to ensure removed elements' destructor is called. + // [[0],[1],[2],...] + for (int i = 0; i < 10; i++) + x.PushBack(Value(kArrayType).PushBack(i, allocator).Move(), allocator); + + // Erase the first + itr = x.Erase(x.Begin()); + EXPECT_EQ(x.Begin(), itr); + EXPECT_EQ(9u, x.Size()); + for (int i = 0; i < 9; i++) + EXPECT_EQ(i + 1, x[static_cast(i)][0].GetInt()); + + // Ease the last + itr = x.Erase(x.End() - 1); + EXPECT_EQ(x.End(), itr); + EXPECT_EQ(8u, x.Size()); + for (int i = 0; i < 8; i++) + EXPECT_EQ(i + 1, x[static_cast(i)][0].GetInt()); + + // Erase the middle + itr = x.Erase(x.Begin() + 4); + EXPECT_EQ(x.Begin() + 4, itr); + EXPECT_EQ(7u, x.Size()); + for (int i = 0; i < 4; i++) + EXPECT_EQ(i + 1, x[static_cast(i)][0].GetInt()); + for (int i = 4; i < 7; i++) + EXPECT_EQ(i + 2, x[static_cast(i)][0].GetInt()); + + // Erase(ValueIterator, ValueIterator) + // Exhaustive test with all 0 <= first < n, first <= last <= n cases + const unsigned n = 10; + for (unsigned first = 0; first < n; first++) { + for (unsigned last = first; last <= n; last++) { + x.Clear(); + for (unsigned i = 0; i < n; i++) + x.PushBack(Value(kArrayType).PushBack(i, allocator).Move(), allocator); + + itr = x.Erase(x.Begin() + first, x.Begin() + last); + if (last == n) + EXPECT_EQ(x.End(), itr); + else + EXPECT_EQ(x.Begin() + first, itr); + + size_t removeCount = last - first; + EXPECT_EQ(n - removeCount, x.Size()); + for (unsigned i = 0; i < first; i++) + EXPECT_EQ(i, x[i][0].GetUint()); + for (unsigned i = first; i < n - removeCount; i++) + EXPECT_EQ(i + removeCount, x[static_cast(i)][0].GetUint()); + } + } +} + +TEST(Value, Array) { + Value::AllocatorType allocator; + Value x(kArrayType); + const Value& y = x; + + EXPECT_EQ(kArrayType, x.GetType()); + EXPECT_TRUE(x.IsArray()); + EXPECT_TRUE(x.Empty()); + EXPECT_EQ(0u, x.Size()); + EXPECT_TRUE(y.IsArray()); + EXPECT_TRUE(y.Empty()); + EXPECT_EQ(0u, y.Size()); + + EXPECT_FALSE(x.IsNull()); + EXPECT_FALSE(x.IsBool()); + EXPECT_FALSE(x.IsFalse()); + EXPECT_FALSE(x.IsTrue()); + EXPECT_FALSE(x.IsString()); + EXPECT_FALSE(x.IsObject()); + + TestArray(x, allocator); + + // Working in gcc without C++11, but VS2013 cannot compile. To be diagnosed. + // http://en.wikipedia.org/wiki/Erase-remove_idiom + x.Clear(); + for (int i = 0; i < 10; i++) + if (i % 2 == 0) + x.PushBack(i, allocator); + else + x.PushBack(Value(kNullType).Move(), allocator); + + const Value null(kNullType); + x.Erase(std::remove(x.Begin(), x.End(), null), x.End()); + EXPECT_EQ(5u, x.Size()); + for (int i = 0; i < 5; i++) + EXPECT_EQ(i * 2, x[static_cast(i)]); + + // SetArray() + Value z; + z.SetArray(); + EXPECT_TRUE(z.IsArray()); + EXPECT_TRUE(z.Empty()); + + // PR #1503: assign from inner Value + { + CrtAllocator a; // Free() is not a noop + GenericValue, CrtAllocator> nullValue; + GenericValue, CrtAllocator> arrayValue(kArrayType); + arrayValue.PushBack(nullValue, a); + arrayValue = arrayValue[0]; // shouldn't crash (use after free) + EXPECT_TRUE(arrayValue.IsNull()); + } +} + +TEST(Value, ArrayHelper) { + Value::AllocatorType allocator; + { + Value x(kArrayType); + Value::Array a = x.GetArray(); + TestArray(a, allocator); + } + + { + Value x(kArrayType); + Value::Array a = x.GetArray(); + a.PushBack(1, allocator); + + Value::Array a2(a); // copy constructor + EXPECT_EQ(1u, a2.Size()); + + Value::Array a3 = a; + EXPECT_EQ(1u, a3.Size()); + + Value::ConstArray y = static_cast(x).GetArray(); + (void)y; + // y.PushBack(1, allocator); // should not compile + + // Templated functions + x.Clear(); + EXPECT_TRUE(x.Is()); + EXPECT_TRUE(x.Is()); + a.PushBack(1, allocator); + EXPECT_EQ(1, x.Get()[0].GetInt()); + EXPECT_EQ(1, x.Get()[0].GetInt()); + + Value x2; + x2.Set(a); + EXPECT_TRUE(x.IsArray()); // IsArray() is invariant after moving. + EXPECT_EQ(1, x2.Get()[0].GetInt()); + } + + { + Value y(kArrayType); + y.PushBack(123, allocator); + + Value x(y.GetArray()); // Construct value form array. + EXPECT_TRUE(x.IsArray()); + EXPECT_EQ(123, x[0].GetInt()); + EXPECT_TRUE(y.IsArray()); // Invariant + EXPECT_TRUE(y.Empty()); + } + + { + Value x(kArrayType); + Value y(kArrayType); + y.PushBack(123, allocator); + x.PushBack(y.GetArray(), allocator); // Implicit constructor to convert Array to GenericValue + + EXPECT_EQ(1u, x.Size()); + EXPECT_EQ(123, x[0][0].GetInt()); + EXPECT_TRUE(y.IsArray()); + EXPECT_TRUE(y.Empty()); + } +} + +#if RAPIDJSON_HAS_CXX11_RANGE_FOR +TEST(Value, ArrayHelperRangeFor) { + Value::AllocatorType allocator; + Value x(kArrayType); + + for (int i = 0; i < 10; i++) + x.PushBack(i, allocator); + + { + int i = 0; + for (auto& v : x.GetArray()) { + EXPECT_EQ(i, v.GetInt()); + i++; + } + EXPECT_EQ(i, 10); + } + { + int i = 0; + for (const auto& v : const_cast(x).GetArray()) { + EXPECT_EQ(i, v.GetInt()); + i++; + } + EXPECT_EQ(i, 10); + } + + // Array a = x.GetArray(); + // Array ca = const_cast(x).GetArray(); +} +#endif + +template +static void TestObject(T& x, Allocator& allocator) { + const T& y = x; // const version + + // AddMember() + x.AddMember("A", "Apple", allocator); + EXPECT_FALSE(x.ObjectEmpty()); + EXPECT_EQ(1u, x.MemberCount()); + + Value value("Banana", 6); + x.AddMember("B", "Banana", allocator); + EXPECT_EQ(2u, x.MemberCount()); + + // AddMember(StringRefType, T, Allocator) + { + Value o(kObjectType); + o.AddMember("true", true, allocator); + o.AddMember("false", false, allocator); + o.AddMember("int", -1, allocator); + o.AddMember("uint", 1u, allocator); + o.AddMember("int64", int64_t(-4294967296), allocator); + o.AddMember("uint64", uint64_t(4294967296), allocator); + o.AddMember("double", 3.14, allocator); + o.AddMember("string", "Jelly", allocator); + + EXPECT_TRUE(o["true"].GetBool()); + EXPECT_FALSE(o["false"].GetBool()); + EXPECT_EQ(-1, o["int"].GetInt()); + EXPECT_EQ(1u, o["uint"].GetUint()); + EXPECT_EQ(int64_t(-4294967296), o["int64"].GetInt64()); + EXPECT_EQ(uint64_t(4294967296), o["uint64"].GetUint64()); + EXPECT_STREQ("Jelly",o["string"].GetString()); + EXPECT_EQ(8u, o.MemberCount()); + } + + // AddMember(Value&, T, Allocator) + { + Value o(kObjectType); + + Value n("s"); + o.AddMember(n, "string", allocator); + EXPECT_EQ(1u, o.MemberCount()); + + Value count("#"); + o.AddMember(count, o.MemberCount(), allocator); + EXPECT_EQ(2u, o.MemberCount()); + } + +#if RAPIDJSON_HAS_STDSTRING + { + // AddMember(StringRefType, const std::string&, Allocator) + Value o(kObjectType); + o.AddMember("b", std::string("Banana"), allocator); + EXPECT_STREQ("Banana", o["b"].GetString()); + + // RemoveMember(const std::string&) + o.RemoveMember(std::string("b")); + EXPECT_TRUE(o.ObjectEmpty()); + } +#endif + +#if RAPIDJSON_HAS_CXX11_RVALUE_REFS + // AddMember(GenericValue&&, ...) variants + { + Value o(kObjectType); + o.AddMember(Value("true"), Value(true), allocator); + o.AddMember(Value("false"), Value(false).Move(), allocator); // value is lvalue ref + o.AddMember(Value("int").Move(), Value(-1), allocator); // name is lvalue ref + o.AddMember("uint", std::move(Value().SetUint(1u)), allocator); // name is literal, value is rvalue + EXPECT_TRUE(o["true"].GetBool()); + EXPECT_FALSE(o["false"].GetBool()); + EXPECT_EQ(-1, o["int"].GetInt()); + EXPECT_EQ(1u, o["uint"].GetUint()); + EXPECT_EQ(4u, o.MemberCount()); + } +#endif + + // Tests a member with null character + Value name; + const Value C0D("C\0D", 3); + name.SetString(C0D.GetString(), 3); + value.SetString("CherryD", 7); + x.AddMember(name, value, allocator); + + // HasMember() + EXPECT_TRUE(x.HasMember("A")); + EXPECT_TRUE(x.HasMember("B")); + EXPECT_TRUE(y.HasMember("A")); + EXPECT_TRUE(y.HasMember("B")); + +#if RAPIDJSON_HAS_STDSTRING + EXPECT_TRUE(x.HasMember(std::string("A"))); +#endif + + name.SetString("C\0D"); + EXPECT_TRUE(x.HasMember(name)); + EXPECT_TRUE(y.HasMember(name)); + + GenericValue, CrtAllocator> othername("A"); + EXPECT_TRUE(x.HasMember(othername)); + EXPECT_TRUE(y.HasMember(othername)); + othername.SetString("C\0D"); + EXPECT_TRUE(x.HasMember(othername)); + EXPECT_TRUE(y.HasMember(othername)); + + // operator[] + EXPECT_STREQ("Apple", x["A"].GetString()); + EXPECT_STREQ("Banana", x["B"].GetString()); + EXPECT_STREQ("CherryD", x[C0D].GetString()); + EXPECT_STREQ("CherryD", x[othername].GetString()); + EXPECT_THROW(x["nonexist"], AssertException); + + // const operator[] + EXPECT_STREQ("Apple", y["A"].GetString()); + EXPECT_STREQ("Banana", y["B"].GetString()); + EXPECT_STREQ("CherryD", y[C0D].GetString()); + +#if RAPIDJSON_HAS_STDSTRING + EXPECT_STREQ("Apple", x["A"].GetString()); + EXPECT_STREQ("Apple", y[std::string("A")].GetString()); +#endif + + // member iterator + Value::MemberIterator itr = x.MemberBegin(); + EXPECT_TRUE(itr != x.MemberEnd()); + EXPECT_STREQ("A", itr->name.GetString()); + EXPECT_STREQ("Apple", itr->value.GetString()); + ++itr; + EXPECT_TRUE(itr != x.MemberEnd()); + EXPECT_STREQ("B", itr->name.GetString()); + EXPECT_STREQ("Banana", itr->value.GetString()); + ++itr; + EXPECT_TRUE(itr != x.MemberEnd()); + EXPECT_TRUE(memcmp(itr->name.GetString(), "C\0D", 4) == 0); + EXPECT_STREQ("CherryD", itr->value.GetString()); + ++itr; + EXPECT_FALSE(itr != x.MemberEnd()); + + // const member iterator + Value::ConstMemberIterator citr = y.MemberBegin(); + EXPECT_TRUE(citr != y.MemberEnd()); + EXPECT_STREQ("A", citr->name.GetString()); + EXPECT_STREQ("Apple", citr->value.GetString()); + ++citr; + EXPECT_TRUE(citr != y.MemberEnd()); + EXPECT_STREQ("B", citr->name.GetString()); + EXPECT_STREQ("Banana", citr->value.GetString()); + ++citr; + EXPECT_TRUE(citr != y.MemberEnd()); + EXPECT_TRUE(memcmp(citr->name.GetString(), "C\0D", 4) == 0); + EXPECT_STREQ("CherryD", citr->value.GetString()); + ++citr; + EXPECT_FALSE(citr != y.MemberEnd()); + + // member iterator conversions/relations + itr = x.MemberBegin(); + citr = x.MemberBegin(); // const conversion + TestEqual(itr, citr); + EXPECT_TRUE(itr < x.MemberEnd()); + EXPECT_FALSE(itr > y.MemberEnd()); + EXPECT_TRUE(citr < x.MemberEnd()); + EXPECT_FALSE(citr > y.MemberEnd()); + ++citr; + TestUnequal(itr, citr); + EXPECT_FALSE(itr < itr); + EXPECT_TRUE(itr < citr); + EXPECT_FALSE(itr > itr); + EXPECT_TRUE(citr > itr); + EXPECT_EQ(1, citr - x.MemberBegin()); + EXPECT_EQ(0, itr - y.MemberBegin()); + itr += citr - x.MemberBegin(); + EXPECT_EQ(1, itr - y.MemberBegin()); + TestEqual(citr, itr); + EXPECT_TRUE(itr <= citr); + EXPECT_TRUE(citr <= itr); + itr++; + EXPECT_TRUE(itr >= citr); + EXPECT_FALSE(citr >= itr); + + // RemoveMember() + EXPECT_TRUE(x.RemoveMember("A")); + EXPECT_FALSE(x.HasMember("A")); + + EXPECT_TRUE(x.RemoveMember("B")); + EXPECT_FALSE(x.HasMember("B")); + + EXPECT_FALSE(x.RemoveMember("nonexist")); + + EXPECT_TRUE(x.RemoveMember(othername)); + EXPECT_FALSE(x.HasMember(name)); + + EXPECT_TRUE(x.MemberBegin() == x.MemberEnd()); + + // EraseMember(ConstMemberIterator) + + // Use array members to ensure removed elements' destructor is called. + // { "a": [0], "b": [1],[2],...] + const char keys[][2] = { "a", "b", "c", "d", "e", "f", "g", "h", "i", "j" }; + for (int i = 0; i < 10; i++) + x.AddMember(keys[i], Value(kArrayType).PushBack(i, allocator), allocator); + + // MemberCount, iterator difference + EXPECT_EQ(x.MemberCount(), SizeType(x.MemberEnd() - x.MemberBegin())); + + // Erase the first + itr = x.EraseMember(x.MemberBegin()); + EXPECT_FALSE(x.HasMember(keys[0])); + EXPECT_EQ(x.MemberBegin(), itr); + EXPECT_EQ(9u, x.MemberCount()); + for (; itr != x.MemberEnd(); ++itr) { + size_t i = static_cast((itr - x.MemberBegin())) + 1; + EXPECT_STREQ(itr->name.GetString(), keys[i]); + EXPECT_EQ(static_cast(i), itr->value[0].GetInt()); + } + + // Erase the last + itr = x.EraseMember(x.MemberEnd() - 1); + EXPECT_FALSE(x.HasMember(keys[9])); + EXPECT_EQ(x.MemberEnd(), itr); + EXPECT_EQ(8u, x.MemberCount()); + for (; itr != x.MemberEnd(); ++itr) { + size_t i = static_cast(itr - x.MemberBegin()) + 1; + EXPECT_STREQ(itr->name.GetString(), keys[i]); + EXPECT_EQ(static_cast(i), itr->value[0].GetInt()); + } + + // Erase the middle + itr = x.EraseMember(x.MemberBegin() + 4); + EXPECT_FALSE(x.HasMember(keys[5])); + EXPECT_EQ(x.MemberBegin() + 4, itr); + EXPECT_EQ(7u, x.MemberCount()); + for (; itr != x.MemberEnd(); ++itr) { + size_t i = static_cast(itr - x.MemberBegin()); + i += (i < 4) ? 1 : 2; + EXPECT_STREQ(itr->name.GetString(), keys[i]); + EXPECT_EQ(static_cast(i), itr->value[0].GetInt()); + } + + // EraseMember(ConstMemberIterator, ConstMemberIterator) + // Exhaustive test with all 0 <= first < n, first <= last <= n cases + const unsigned n = 10; + for (unsigned first = 0; first < n; first++) { + for (unsigned last = first; last <= n; last++) { + x.RemoveAllMembers(); + for (unsigned i = 0; i < n; i++) + x.AddMember(keys[i], Value(kArrayType).PushBack(i, allocator), allocator); + + itr = x.EraseMember(x.MemberBegin() + static_cast(first), x.MemberBegin() + static_cast(last)); + if (last == n) + EXPECT_EQ(x.MemberEnd(), itr); + else + EXPECT_EQ(x.MemberBegin() + static_cast(first), itr); + + size_t removeCount = last - first; + EXPECT_EQ(n - removeCount, x.MemberCount()); + for (unsigned i = 0; i < first; i++) + EXPECT_EQ(i, x[keys[i]][0].GetUint()); + for (unsigned i = first; i < n - removeCount; i++) + EXPECT_EQ(i + removeCount, x[keys[i+removeCount]][0].GetUint()); + } + } + + // RemoveAllMembers() + x.RemoveAllMembers(); + EXPECT_TRUE(x.ObjectEmpty()); + EXPECT_EQ(0u, x.MemberCount()); +} + +TEST(Value, Object) { + Value::AllocatorType allocator; + Value x(kObjectType); + const Value& y = x; // const version + + EXPECT_EQ(kObjectType, x.GetType()); + EXPECT_TRUE(x.IsObject()); + EXPECT_TRUE(x.ObjectEmpty()); + EXPECT_EQ(0u, x.MemberCount()); + EXPECT_EQ(kObjectType, y.GetType()); + EXPECT_TRUE(y.IsObject()); + EXPECT_TRUE(y.ObjectEmpty()); + EXPECT_EQ(0u, y.MemberCount()); + + TestObject(x, allocator); + + // SetObject() + Value z; + z.SetObject(); + EXPECT_TRUE(z.IsObject()); +} + +TEST(Value, ObjectHelper) { + Value::AllocatorType allocator; + { + Value x(kObjectType); + Value::Object o = x.GetObject(); + TestObject(o, allocator); + } + + { + Value x(kObjectType); + Value::Object o = x.GetObject(); + o.AddMember("1", 1, allocator); + + Value::Object o2(o); // copy constructor + EXPECT_EQ(1u, o2.MemberCount()); + + Value::Object o3 = o; + EXPECT_EQ(1u, o3.MemberCount()); + + Value::ConstObject y = static_cast(x).GetObject(); + (void)y; + // y.AddMember("1", 1, allocator); // should not compile + + // Templated functions + x.RemoveAllMembers(); + EXPECT_TRUE(x.Is()); + EXPECT_TRUE(x.Is()); + o.AddMember("1", 1, allocator); + EXPECT_EQ(1, x.Get()["1"].GetInt()); + EXPECT_EQ(1, x.Get()["1"].GetInt()); + + Value x2; + x2.Set(o); + EXPECT_TRUE(x.IsObject()); // IsObject() is invariant after moving + EXPECT_EQ(1, x2.Get()["1"].GetInt()); + } + + { + Value x(kObjectType); + x.AddMember("a", "apple", allocator); + Value y(x.GetObject()); + EXPECT_STREQ("apple", y["a"].GetString()); + EXPECT_TRUE(x.IsObject()); // Invariant + } + + { + Value x(kObjectType); + x.AddMember("a", "apple", allocator); + Value y(kObjectType); + y.AddMember("fruits", x.GetObject(), allocator); + EXPECT_STREQ("apple", y["fruits"]["a"].GetString()); + EXPECT_TRUE(x.IsObject()); // Invariant + } +} + +#if RAPIDJSON_HAS_CXX11_RANGE_FOR +TEST(Value, ObjectHelperRangeFor) { + Value::AllocatorType allocator; + Value x(kObjectType); + + for (int i = 0; i < 10; i++) { + char name[10]; + Value n(name, static_cast(sprintf(name, "%d", i)), allocator); + x.AddMember(n, i, allocator); + } + + { + int i = 0; + for (auto& m : x.GetObject()) { + char name[10]; + sprintf(name, "%d", i); + EXPECT_STREQ(name, m.name.GetString()); + EXPECT_EQ(i, m.value.GetInt()); + i++; + } + EXPECT_EQ(i, 10); + } + { + int i = 0; + for (const auto& m : const_cast(x).GetObject()) { + char name[10]; + sprintf(name, "%d", i); + EXPECT_STREQ(name, m.name.GetString()); + EXPECT_EQ(i, m.value.GetInt()); + i++; + } + EXPECT_EQ(i, 10); + } + + // Object a = x.GetObject(); + // Object ca = const_cast(x).GetObject(); +} +#endif + +TEST(Value, EraseMember_String) { + Value::AllocatorType allocator; + Value x(kObjectType); + x.AddMember("A", "Apple", allocator); + x.AddMember("B", "Banana", allocator); + + EXPECT_TRUE(x.EraseMember("B")); + EXPECT_FALSE(x.HasMember("B")); + + EXPECT_FALSE(x.EraseMember("nonexist")); + + GenericValue, CrtAllocator> othername("A"); + EXPECT_TRUE(x.EraseMember(othername)); + EXPECT_FALSE(x.HasMember("A")); + + EXPECT_TRUE(x.MemberBegin() == x.MemberEnd()); +} + +TEST(Value, BigNestedArray) { + MemoryPoolAllocator<> allocator; + Value x(kArrayType); + static const SizeType n = 200; + + for (SizeType i = 0; i < n; i++) { + Value y(kArrayType); + for (SizeType j = 0; j < n; j++) { + Value number(static_cast(i * n + j)); + y.PushBack(number, allocator); + } + x.PushBack(y, allocator); + } + + for (SizeType i = 0; i < n; i++) + for (SizeType j = 0; j < n; j++) { + EXPECT_TRUE(x[i][j].IsInt()); + EXPECT_EQ(static_cast(i * n + j), x[i][j].GetInt()); + } +} + +TEST(Value, BigNestedObject) { + MemoryPoolAllocator<> allocator; + Value x(kObjectType); + static const SizeType n = 200; + + for (SizeType i = 0; i < n; i++) { + char name1[10]; + sprintf(name1, "%d", i); + + // Value name(name1); // should not compile + Value name(name1, static_cast(strlen(name1)), allocator); + Value object(kObjectType); + + for (SizeType j = 0; j < n; j++) { + char name2[10]; + sprintf(name2, "%d", j); + + Value name3(name2, static_cast(strlen(name2)), allocator); + Value number(static_cast(i * n + j)); + object.AddMember(name3, number, allocator); + } + + // x.AddMember(name1, object, allocator); // should not compile + x.AddMember(name, object, allocator); + } + + for (SizeType i = 0; i < n; i++) { + char name1[10]; + sprintf(name1, "%d", i); + + for (SizeType j = 0; j < n; j++) { + char name2[10]; + sprintf(name2, "%d", j); + x[name1]; + EXPECT_EQ(static_cast(i * n + j), x[name1][name2].GetInt()); + } + } +} + +// Issue 18: Error removing last element of object +// http://code.google.com/p/rapidjson/issues/detail?id=18 +TEST(Value, RemoveLastElement) { + rapidjson::Document doc; + rapidjson::Document::AllocatorType& allocator = doc.GetAllocator(); + rapidjson::Value objVal(rapidjson::kObjectType); + objVal.AddMember("var1", 123, allocator); + objVal.AddMember("var2", "444", allocator); + objVal.AddMember("var3", 555, allocator); + EXPECT_TRUE(objVal.HasMember("var3")); + objVal.RemoveMember("var3"); // Assertion here in r61 + EXPECT_FALSE(objVal.HasMember("var3")); +} + +// Issue 38: Segmentation fault with CrtAllocator +TEST(Document, CrtAllocator) { + typedef GenericValue, CrtAllocator> V; + + V::AllocatorType allocator; + V o(kObjectType); + o.AddMember("x", 1, allocator); // Should not call destructor on uninitialized name/value of newly allocated members. + + V a(kArrayType); + a.PushBack(1, allocator); // Should not call destructor on uninitialized Value of newly allocated elements. +} + +static void TestShortStringOptimization(const char* str) { + const rapidjson::SizeType len = static_cast(strlen(str)); + + rapidjson::Document doc; + rapidjson::Value val; + val.SetString(str, len, doc.GetAllocator()); + + EXPECT_EQ(val.GetStringLength(), len); + EXPECT_STREQ(val.GetString(), str); +} + +TEST(Value, AllocateShortString) { + TestShortStringOptimization(""); // edge case: empty string + TestShortStringOptimization("12345678"); // regular case for short strings: 8 chars + TestShortStringOptimization("12345678901"); // edge case: 11 chars in 32-bit mode (=> short string) + TestShortStringOptimization("123456789012"); // edge case: 12 chars in 32-bit mode (=> regular string) + TestShortStringOptimization("123456789012345"); // edge case: 15 chars in 64-bit mode (=> short string) + TestShortStringOptimization("1234567890123456"); // edge case: 16 chars in 64-bit mode (=> regular string) +} + +template +struct TerminateHandler { + bool Null() { return e != 0; } + bool Bool(bool) { return e != 1; } + bool Int(int) { return e != 2; } + bool Uint(unsigned) { return e != 3; } + bool Int64(int64_t) { return e != 4; } + bool Uint64(uint64_t) { return e != 5; } + bool Double(double) { return e != 6; } + bool RawNumber(const char*, SizeType, bool) { return e != 7; } + bool String(const char*, SizeType, bool) { return e != 8; } + bool StartObject() { return e != 9; } + bool Key(const char*, SizeType, bool) { return e != 10; } + bool EndObject(SizeType) { return e != 11; } + bool StartArray() { return e != 12; } + bool EndArray(SizeType) { return e != 13; } +}; + +#define TEST_TERMINATION(e, json)\ +{\ + Document d; \ + EXPECT_FALSE(d.Parse(json).HasParseError()); \ + Reader reader; \ + TerminateHandler h;\ + EXPECT_FALSE(d.Accept(h));\ +} + +TEST(Value, AcceptTerminationByHandler) { + TEST_TERMINATION(0, "[null]"); + TEST_TERMINATION(1, "[true]"); + TEST_TERMINATION(1, "[false]"); + TEST_TERMINATION(2, "[-1]"); + TEST_TERMINATION(3, "[2147483648]"); + TEST_TERMINATION(4, "[-1234567890123456789]"); + TEST_TERMINATION(5, "[9223372036854775808]"); + TEST_TERMINATION(6, "[0.5]"); + // RawNumber() is never called + TEST_TERMINATION(8, "[\"a\"]"); + TEST_TERMINATION(9, "[{}]"); + TEST_TERMINATION(10, "[{\"a\":1}]"); + TEST_TERMINATION(11, "[{}]"); + TEST_TERMINATION(12, "{\"a\":[]}"); + TEST_TERMINATION(13, "{\"a\":[]}"); +} + +struct ValueIntComparer { + bool operator()(const Value& lhs, const Value& rhs) const { + return lhs.GetInt() < rhs.GetInt(); + } +}; + +#if RAPIDJSON_HAS_CXX11_RVALUE_REFS +TEST(Value, Sorting) { + Value::AllocatorType allocator; + Value a(kArrayType); + a.PushBack(5, allocator); + a.PushBack(1, allocator); + a.PushBack(3, allocator); + std::sort(a.Begin(), a.End(), ValueIntComparer()); + EXPECT_EQ(1, a[0].GetInt()); + EXPECT_EQ(3, a[1].GetInt()); + EXPECT_EQ(5, a[2].GetInt()); +} +#endif + +// http://stackoverflow.com/questions/35222230/ + +static void MergeDuplicateKey(Value& v, Value::AllocatorType& a) { + if (v.IsObject()) { + // Convert all key:value into key:[value] + for (Value::MemberIterator itr = v.MemberBegin(); itr != v.MemberEnd(); ++itr) + itr->value = Value(kArrayType).Move().PushBack(itr->value, a); + + // Merge arrays if key is duplicated + for (Value::MemberIterator itr = v.MemberBegin(); itr != v.MemberEnd();) { + Value::MemberIterator itr2 = v.FindMember(itr->name); + if (itr != itr2) { + itr2->value.PushBack(itr->value[0], a); + itr = v.EraseMember(itr); + } + else + ++itr; + } + + // Convert key:[values] back to key:value if there is only one value + for (Value::MemberIterator itr = v.MemberBegin(); itr != v.MemberEnd(); ++itr) { + if (itr->value.Size() == 1) + itr->value = itr->value[0]; + MergeDuplicateKey(itr->value, a); // Recursion on the value + } + } + else if (v.IsArray()) + for (Value::ValueIterator itr = v.Begin(); itr != v.End(); ++itr) + MergeDuplicateKey(*itr, a); +} + +TEST(Value, MergeDuplicateKey) { + Document d; + d.Parse( + "{" + " \"key1\": {" + " \"a\": \"asdf\"," + " \"b\": \"foo\"," + " \"b\": \"bar\"," + " \"c\": \"fdas\"" + " }" + "}"); + + Document d2; + d2.Parse( + "{" + " \"key1\": {" + " \"a\": \"asdf\"," + " \"b\": [" + " \"foo\"," + " \"bar\"" + " ]," + " \"c\": \"fdas\"" + " }" + "}"); + + EXPECT_NE(d2, d); + MergeDuplicateKey(d, d.GetAllocator()); + EXPECT_EQ(d2, d); +} + +#ifdef __clang__ +RAPIDJSON_DIAG_POP +#endif diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/writertest.cpp b/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/writertest.cpp new file mode 100644 index 0000000000..ac9ad899e1 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/test/unittest/writertest.cpp @@ -0,0 +1,598 @@ +// Tencent is pleased to support the open source community by making RapidJSON available. +// +// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. +// +// Licensed under the MIT License (the "License"); you may not use this file except +// in compliance with the License. You may obtain a copy of the License at +// +// http://opensource.org/licenses/MIT +// +// Unless required by applicable law or agreed to in writing, software distributed +// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +// CONDITIONS OF ANY KIND, either express or implied. See the License for the +// specific language governing permissions and limitations under the License. + +#include "unittest.h" + +#include "rapidjson/document.h" +#include "rapidjson/reader.h" +#include "rapidjson/writer.h" +#include "rapidjson/stringbuffer.h" +#include "rapidjson/memorybuffer.h" + +#ifdef __clang__ +RAPIDJSON_DIAG_PUSH +RAPIDJSON_DIAG_OFF(c++98-compat) +#endif + +using namespace rapidjson; + +TEST(Writer, Compact) { + StringStream s("{ \"hello\" : \"world\", \"t\" : true , \"f\" : false, \"n\": null, \"i\":123, \"pi\": 3.1416, \"a\":[1, 2, 3] } "); + StringBuffer buffer; + Writer writer(buffer); + buffer.ShrinkToFit(); + Reader reader; + reader.Parse<0>(s, writer); + EXPECT_STREQ("{\"hello\":\"world\",\"t\":true,\"f\":false,\"n\":null,\"i\":123,\"pi\":3.1416,\"a\":[1,2,3]}", buffer.GetString()); + EXPECT_EQ(77u, buffer.GetSize()); + EXPECT_TRUE(writer.IsComplete()); +} + +// json -> parse -> writer -> json +#define TEST_ROUNDTRIP(json) \ + { \ + StringStream s(json); \ + StringBuffer buffer; \ + Writer writer(buffer); \ + Reader reader; \ + reader.Parse(s, writer); \ + EXPECT_STREQ(json, buffer.GetString()); \ + EXPECT_TRUE(writer.IsComplete()); \ + } + +TEST(Writer, Root) { + TEST_ROUNDTRIP("null"); + TEST_ROUNDTRIP("true"); + TEST_ROUNDTRIP("false"); + TEST_ROUNDTRIP("0"); + TEST_ROUNDTRIP("\"foo\""); + TEST_ROUNDTRIP("[]"); + TEST_ROUNDTRIP("{}"); +} + +TEST(Writer, Int) { + TEST_ROUNDTRIP("[-1]"); + TEST_ROUNDTRIP("[-123]"); + TEST_ROUNDTRIP("[-2147483648]"); +} + +TEST(Writer, UInt) { + TEST_ROUNDTRIP("[0]"); + TEST_ROUNDTRIP("[1]"); + TEST_ROUNDTRIP("[123]"); + TEST_ROUNDTRIP("[2147483647]"); + TEST_ROUNDTRIP("[4294967295]"); +} + +TEST(Writer, Int64) { + TEST_ROUNDTRIP("[-1234567890123456789]"); + TEST_ROUNDTRIP("[-9223372036854775808]"); +} + +TEST(Writer, Uint64) { + TEST_ROUNDTRIP("[1234567890123456789]"); + TEST_ROUNDTRIP("[9223372036854775807]"); +} + +TEST(Writer, String) { + TEST_ROUNDTRIP("[\"Hello\"]"); + TEST_ROUNDTRIP("[\"Hello\\u0000World\"]"); + TEST_ROUNDTRIP("[\"\\\"\\\\/\\b\\f\\n\\r\\t\"]"); + +#if RAPIDJSON_HAS_STDSTRING + { + StringBuffer buffer; + Writer writer(buffer); + writer.String(std::string("Hello\n")); + EXPECT_STREQ("\"Hello\\n\"", buffer.GetString()); + } +#endif +} + +TEST(Writer, Issue_889) { + char buf[100] = "Hello"; + + StringBuffer buffer; + Writer writer(buffer); + writer.StartArray(); + writer.String(buf); + writer.EndArray(); + + EXPECT_STREQ("[\"Hello\"]", buffer.GetString()); + EXPECT_TRUE(writer.IsComplete()); \ +} + +TEST(Writer, ScanWriteUnescapedString) { + const char json[] = "[\" \\\"0123456789ABCDEF\"]"; + // ^ scanning stops here. + char buffer2[sizeof(json) + 32]; + + // Use different offset to test different alignments + for (int i = 0; i < 32; i++) { + char* p = buffer2 + i; + memcpy(p, json, sizeof(json)); + TEST_ROUNDTRIP(p); + } +} + +TEST(Writer, Double) { + TEST_ROUNDTRIP("[1.2345,1.2345678,0.123456789012,1234567.8]"); + TEST_ROUNDTRIP("0.0"); + TEST_ROUNDTRIP("-0.0"); // Issue #289 + TEST_ROUNDTRIP("1e30"); + TEST_ROUNDTRIP("1.0"); + TEST_ROUNDTRIP("5e-324"); // Min subnormal positive double + TEST_ROUNDTRIP("2.225073858507201e-308"); // Max subnormal positive double + TEST_ROUNDTRIP("2.2250738585072014e-308"); // Min normal positive double + TEST_ROUNDTRIP("1.7976931348623157e308"); // Max double + +} + +// UTF8 -> TargetEncoding -> UTF8 +template +void TestTranscode(const char* json) { + StringStream s(json); + GenericStringBuffer buffer; + Writer, UTF8<>, TargetEncoding> writer(buffer); + Reader reader; + reader.Parse(s, writer); + + StringBuffer buffer2; + Writer writer2(buffer2); + GenericReader > reader2; + GenericStringStream s2(buffer.GetString()); + reader2.Parse(s2, writer2); + + EXPECT_STREQ(json, buffer2.GetString()); +} + +TEST(Writer, Transcode) { + const char json[] = "{\"hello\":\"world\",\"t\":true,\"f\":false,\"n\":null,\"i\":123,\"pi\":3.1416,\"a\":[1,2,3],\"dollar\":\"\x24\",\"cents\":\"\xC2\xA2\",\"euro\":\"\xE2\x82\xAC\",\"gclef\":\"\xF0\x9D\x84\x9E\"}"; + + // UTF8 -> UTF16 -> UTF8 + TestTranscode >(json); + + // UTF8 -> ASCII -> UTF8 + TestTranscode >(json); + + // UTF8 -> UTF16 -> UTF8 + TestTranscode >(json); + + // UTF8 -> UTF32 -> UTF8 + TestTranscode >(json); + + // UTF8 -> AutoUTF -> UTF8 + UTFType types[] = { kUTF8, kUTF16LE , kUTF16BE, kUTF32LE , kUTF32BE }; + for (size_t i = 0; i < 5; i++) { + StringStream s(json); + MemoryBuffer buffer; + AutoUTFOutputStream os(buffer, types[i], true); + Writer, UTF8<>, AutoUTF > writer(os); + Reader reader; + reader.Parse(s, writer); + + StringBuffer buffer2; + Writer writer2(buffer2); + GenericReader, UTF8<> > reader2; + MemoryStream s2(buffer.GetBuffer(), buffer.GetSize()); + AutoUTFInputStream is(s2); + reader2.Parse(is, writer2); + + EXPECT_STREQ(json, buffer2.GetString()); + } + +} + +#include + +class OStreamWrapper { +public: + typedef char Ch; + + OStreamWrapper(std::ostream& os) : os_(os) {} + + Ch Peek() const { assert(false); return '\0'; } + Ch Take() { assert(false); return '\0'; } + size_t Tell() const { return 0; } + + Ch* PutBegin() { assert(false); return 0; } + void Put(Ch c) { os_.put(c); } + void Flush() { os_.flush(); } + size_t PutEnd(Ch*) { assert(false); return 0; } + +private: + OStreamWrapper(const OStreamWrapper&); + OStreamWrapper& operator=(const OStreamWrapper&); + + std::ostream& os_; +}; + +TEST(Writer, OStreamWrapper) { + StringStream s("{ \"hello\" : \"world\", \"t\" : true , \"f\" : false, \"n\": null, \"i\":123, \"pi\": 3.1416, \"a\":[1, 2, 3], \"u64\": 1234567890123456789, \"i64\":-1234567890123456789 } "); + + std::stringstream ss; + OStreamWrapper os(ss); + + Writer writer(os); + + Reader reader; + reader.Parse<0>(s, writer); + + std::string actual = ss.str(); + EXPECT_STREQ("{\"hello\":\"world\",\"t\":true,\"f\":false,\"n\":null,\"i\":123,\"pi\":3.1416,\"a\":[1,2,3],\"u64\":1234567890123456789,\"i64\":-1234567890123456789}", actual.c_str()); +} + +TEST(Writer, AssertRootMayBeAnyValue) { +#define T(x)\ + {\ + StringBuffer buffer;\ + Writer writer(buffer);\ + EXPECT_TRUE(x);\ + } + T(writer.Bool(false)); + T(writer.Bool(true)); + T(writer.Null()); + T(writer.Int(0)); + T(writer.Uint(0)); + T(writer.Int64(0)); + T(writer.Uint64(0)); + T(writer.Double(0)); + T(writer.String("foo")); +#undef T +} + +TEST(Writer, AssertIncorrectObjectLevel) { + StringBuffer buffer; + Writer writer(buffer); + writer.StartObject(); + writer.EndObject(); + ASSERT_THROW(writer.EndObject(), AssertException); +} + +TEST(Writer, AssertIncorrectArrayLevel) { + StringBuffer buffer; + Writer writer(buffer); + writer.StartArray(); + writer.EndArray(); + ASSERT_THROW(writer.EndArray(), AssertException); +} + +TEST(Writer, AssertIncorrectEndObject) { + StringBuffer buffer; + Writer writer(buffer); + writer.StartObject(); + ASSERT_THROW(writer.EndArray(), AssertException); +} + +TEST(Writer, AssertIncorrectEndArray) { + StringBuffer buffer; + Writer writer(buffer); + writer.StartObject(); + ASSERT_THROW(writer.EndArray(), AssertException); +} + +TEST(Writer, AssertObjectKeyNotString) { +#define T(x)\ + {\ + StringBuffer buffer;\ + Writer writer(buffer);\ + writer.StartObject();\ + ASSERT_THROW(x, AssertException); \ + } + T(writer.Bool(false)); + T(writer.Bool(true)); + T(writer.Null()); + T(writer.Int(0)); + T(writer.Uint(0)); + T(writer.Int64(0)); + T(writer.Uint64(0)); + T(writer.Double(0)); + T(writer.StartObject()); + T(writer.StartArray()); +#undef T +} + +TEST(Writer, AssertMultipleRoot) { + StringBuffer buffer; + Writer writer(buffer); + + writer.StartObject(); + writer.EndObject(); + ASSERT_THROW(writer.StartObject(), AssertException); + + writer.Reset(buffer); + writer.Null(); + ASSERT_THROW(writer.Int(0), AssertException); + + writer.Reset(buffer); + writer.String("foo"); + ASSERT_THROW(writer.StartArray(), AssertException); + + writer.Reset(buffer); + writer.StartArray(); + writer.EndArray(); + //ASSERT_THROW(writer.Double(3.14), AssertException); +} + +TEST(Writer, RootObjectIsComplete) { + StringBuffer buffer; + Writer writer(buffer); + EXPECT_FALSE(writer.IsComplete()); + writer.StartObject(); + EXPECT_FALSE(writer.IsComplete()); + writer.String("foo"); + EXPECT_FALSE(writer.IsComplete()); + writer.Int(1); + EXPECT_FALSE(writer.IsComplete()); + writer.EndObject(); + EXPECT_TRUE(writer.IsComplete()); +} + +TEST(Writer, RootArrayIsComplete) { + StringBuffer buffer; + Writer writer(buffer); + EXPECT_FALSE(writer.IsComplete()); + writer.StartArray(); + EXPECT_FALSE(writer.IsComplete()); + writer.String("foo"); + EXPECT_FALSE(writer.IsComplete()); + writer.Int(1); + EXPECT_FALSE(writer.IsComplete()); + writer.EndArray(); + EXPECT_TRUE(writer.IsComplete()); +} + +TEST(Writer, RootValueIsComplete) { +#define T(x)\ + {\ + StringBuffer buffer;\ + Writer writer(buffer);\ + EXPECT_FALSE(writer.IsComplete()); \ + x; \ + EXPECT_TRUE(writer.IsComplete()); \ + } + T(writer.Null()); + T(writer.Bool(true)); + T(writer.Bool(false)); + T(writer.Int(0)); + T(writer.Uint(0)); + T(writer.Int64(0)); + T(writer.Uint64(0)); + T(writer.Double(0)); + T(writer.String("")); +#undef T +} + +TEST(Writer, InvalidEncoding) { + // Fail in decoding invalid UTF-8 sequence http://www.cl.cam.ac.uk/~mgk25/ucs/examples/UTF-8-test.txt + { + GenericStringBuffer > buffer; + Writer >, UTF8<>, UTF16<> > writer(buffer); + writer.StartArray(); + EXPECT_FALSE(writer.String("\xfe")); + EXPECT_FALSE(writer.String("\xff")); + EXPECT_FALSE(writer.String("\xfe\xfe\xff\xff")); + writer.EndArray(); + } + + // Fail in encoding + { + StringBuffer buffer; + Writer > writer(buffer); + static const UTF32<>::Ch s[] = { 0x110000, 0 }; // Out of U+0000 to U+10FFFF + EXPECT_FALSE(writer.String(s)); + } + + // Fail in unicode escaping in ASCII output + { + StringBuffer buffer; + Writer, ASCII<> > writer(buffer); + static const UTF32<>::Ch s[] = { 0x110000, 0 }; // Out of U+0000 to U+10FFFF + EXPECT_FALSE(writer.String(s)); + } +} + +TEST(Writer, ValidateEncoding) { + { + StringBuffer buffer; + Writer, UTF8<>, CrtAllocator, kWriteValidateEncodingFlag> writer(buffer); + writer.StartArray(); + EXPECT_TRUE(writer.String("\x24")); // Dollar sign U+0024 + EXPECT_TRUE(writer.String("\xC2\xA2")); // Cents sign U+00A2 + EXPECT_TRUE(writer.String("\xE2\x82\xAC")); // Euro sign U+20AC + EXPECT_TRUE(writer.String("\xF0\x9D\x84\x9E")); // G clef sign U+1D11E + EXPECT_TRUE(writer.String("\x01")); // SOH control U+0001 + EXPECT_TRUE(writer.String("\x1B")); // Escape control U+001B + writer.EndArray(); + EXPECT_STREQ("[\"\x24\",\"\xC2\xA2\",\"\xE2\x82\xAC\",\"\xF0\x9D\x84\x9E\",\"\\u0001\",\"\\u001B\"]", buffer.GetString()); + } + + // Fail in decoding invalid UTF-8 sequence http://www.cl.cam.ac.uk/~mgk25/ucs/examples/UTF-8-test.txt + { + StringBuffer buffer; + Writer, UTF8<>, CrtAllocator, kWriteValidateEncodingFlag> writer(buffer); + writer.StartArray(); + EXPECT_FALSE(writer.String("\xfe")); + EXPECT_FALSE(writer.String("\xff")); + EXPECT_FALSE(writer.String("\xfe\xfe\xff\xff")); + writer.EndArray(); + } +} + +TEST(Writer, InvalidEventSequence) { + // {] + { + StringBuffer buffer; + Writer writer(buffer); + writer.StartObject(); + EXPECT_THROW(writer.EndArray(), AssertException); + EXPECT_FALSE(writer.IsComplete()); + } + + // [} + { + StringBuffer buffer; + Writer writer(buffer); + writer.StartArray(); + EXPECT_THROW(writer.EndObject(), AssertException); + EXPECT_FALSE(writer.IsComplete()); + } + + // { 1: + { + StringBuffer buffer; + Writer writer(buffer); + writer.StartObject(); + EXPECT_THROW(writer.Int(1), AssertException); + EXPECT_FALSE(writer.IsComplete()); + } + + // { 'a' } + { + StringBuffer buffer; + Writer writer(buffer); + writer.StartObject(); + writer.Key("a"); + EXPECT_THROW(writer.EndObject(), AssertException); + EXPECT_FALSE(writer.IsComplete()); + } + + // { 'a':'b','c' } + { + StringBuffer buffer; + Writer writer(buffer); + writer.StartObject(); + writer.Key("a"); + writer.String("b"); + writer.Key("c"); + EXPECT_THROW(writer.EndObject(), AssertException); + EXPECT_FALSE(writer.IsComplete()); + } +} + +TEST(Writer, NaN) { + double nan = std::numeric_limits::quiet_NaN(); + + EXPECT_TRUE(internal::Double(nan).IsNan()); + StringBuffer buffer; + { + Writer writer(buffer); + EXPECT_FALSE(writer.Double(nan)); + } + { + Writer, UTF8<>, CrtAllocator, kWriteNanAndInfFlag> writer(buffer); + EXPECT_TRUE(writer.Double(nan)); + EXPECT_STREQ("NaN", buffer.GetString()); + } + GenericStringBuffer > buffer2; + Writer > > writer2(buffer2); + EXPECT_FALSE(writer2.Double(nan)); +} + +TEST(Writer, Inf) { + double inf = std::numeric_limits::infinity(); + + EXPECT_TRUE(internal::Double(inf).IsInf()); + StringBuffer buffer; + { + Writer writer(buffer); + EXPECT_FALSE(writer.Double(inf)); + } + { + Writer writer(buffer); + EXPECT_FALSE(writer.Double(-inf)); + } + { + Writer, UTF8<>, CrtAllocator, kWriteNanAndInfFlag> writer(buffer); + EXPECT_TRUE(writer.Double(inf)); + } + { + Writer, UTF8<>, CrtAllocator, kWriteNanAndInfFlag> writer(buffer); + EXPECT_TRUE(writer.Double(-inf)); + } + EXPECT_STREQ("Infinity-Infinity", buffer.GetString()); +} + +TEST(Writer, RawValue) { + StringBuffer buffer; + Writer writer(buffer); + writer.StartObject(); + writer.Key("a"); + writer.Int(1); + writer.Key("raw"); + const char json[] = "[\"Hello\\nWorld\", 123.456]"; + writer.RawValue(json, strlen(json), kArrayType); + writer.EndObject(); + EXPECT_TRUE(writer.IsComplete()); + EXPECT_STREQ("{\"a\":1,\"raw\":[\"Hello\\nWorld\", 123.456]}", buffer.GetString()); +} + +TEST(Write, RawValue_Issue1152) { + { + GenericStringBuffer > sb; + Writer >, UTF8<>, UTF32<> > writer(sb); + writer.RawValue("null", 4, kNullType); + EXPECT_TRUE(writer.IsComplete()); + const unsigned *out = sb.GetString(); + EXPECT_EQ(static_cast('n'), out[0]); + EXPECT_EQ(static_cast('u'), out[1]); + EXPECT_EQ(static_cast('l'), out[2]); + EXPECT_EQ(static_cast('l'), out[3]); + EXPECT_EQ(static_cast(0 ), out[4]); + } + + { + GenericStringBuffer > sb; + Writer >, UTF16<>, UTF8<> > writer(sb); + writer.RawValue(L"null", 4, kNullType); + EXPECT_TRUE(writer.IsComplete()); + EXPECT_STREQ("null", sb.GetString()); + } + + { + // Fail in transcoding + GenericStringBuffer > buffer; + Writer >, UTF8<>, UTF16<> > writer(buffer); + EXPECT_FALSE(writer.RawValue("\"\xfe\"", 3, kStringType)); + } + + { + // Fail in encoding validation + StringBuffer buffer; + Writer, UTF8<>, CrtAllocator, kWriteValidateEncodingFlag> writer(buffer); + EXPECT_FALSE(writer.RawValue("\"\xfe\"", 3, kStringType)); + } +} + +#if RAPIDJSON_HAS_CXX11_RVALUE_REFS +static Writer WriterGen(StringBuffer &target) { + Writer writer(target); + writer.StartObject(); + writer.Key("a"); + writer.Int(1); + return writer; +} + +TEST(Writer, MoveCtor) { + StringBuffer buffer; + Writer writer(WriterGen(buffer)); + writer.EndObject(); + EXPECT_TRUE(writer.IsComplete()); + EXPECT_STREQ("{\"a\":1}", buffer.GetString()); +} +#endif + +#ifdef __clang__ +RAPIDJSON_DIAG_POP +#endif diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/test/valgrind.supp b/graphics/asymptote/LspCpp/third_party/rapidjson/test/valgrind.supp new file mode 100644 index 0000000000..1fed18bea3 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/test/valgrind.supp @@ -0,0 +1,17 @@ +{ + Suppress wcslen valgrind report 1 + Memcheck:Cond + fun:__wcslen_sse2 +} + +{ + Suppress wcslen valgrind report 2 + Memcheck:Addr8 + fun:__wcslen_sse2 +} + +{ + Suppress wcslen valgrind report 3 + Memcheck:Value8 + fun:__wcslen_sse2 +} diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/travis-doxygen.sh b/graphics/asymptote/LspCpp/third_party/rapidjson/travis-doxygen.sh new file mode 100755 index 0000000000..cf18dc3432 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/rapidjson/travis-doxygen.sh @@ -0,0 +1,128 @@ +#!/bin/bash +# Update Doxygen documentation after push to 'master'. +# Author: @pah + +set -e + +DOXYGEN_VER=1_8_16 +DOXYGEN_URL="https://codeload.github.com/doxygen/doxygen/tar.gz/Release_${DOXYGEN_VER}" + +: ${GITHUB_REPO:="Tencent/rapidjson"} +GITHUB_HOST="github.com" +GITHUB_CLONE="git://${GITHUB_HOST}/${GITHUB_REPO}" +GITHUB_URL="https://${GITHUB_HOST}/${GITHUB_PUSH-${GITHUB_REPO}}" + +# if not set, ignore password +#GIT_ASKPASS="${TRAVIS_BUILD_DIR}/gh_ignore_askpass.sh" + +skip() { + echo "$@" 1>&2 + echo "Exiting..." 1>&2 + exit 0 +} + +abort() { + echo "Error: $@" 1>&2 + echo "Exiting..." 1>&2 + exit 1 +} + +# TRAVIS_BUILD_DIR not set, exiting +[ -d "${TRAVIS_BUILD_DIR-/nonexistent}" ] || \ + abort '${TRAVIS_BUILD_DIR} not set or nonexistent.' + +# check for pull-requests +[ "${TRAVIS_PULL_REQUEST}" = "false" ] || \ + skip "Not running Doxygen for pull-requests." + +# check for branch name +[ "${TRAVIS_BRANCH}" = "master" ] || \ + skip "Running Doxygen only for updates on 'master' branch (current: ${TRAVIS_BRANCH})." + +# check for job number +# [ "${TRAVIS_JOB_NUMBER}" = "${TRAVIS_BUILD_NUMBER}.1" ] || \ +# skip "Running Doxygen only on first job of build ${TRAVIS_BUILD_NUMBER} (current: ${TRAVIS_JOB_NUMBER})." + +# install doxygen binary distribution +doxygen_install() +{ + cd ${TMPDIR-/tmp} + curl ${DOXYGEN_URL} -o doxygen.tar.gz + tar zxvf doxygen.tar.gz + mkdir doxygen_build + cd doxygen_build + cmake ../doxygen-Release_${DOXYGEN_VER}/ + make + + export PATH="${TMPDIR-/tmp}/doxygen_build/bin:$PATH" + + cd ../../ +} + +doxygen_run() +{ + cd "${TRAVIS_BUILD_DIR}"; + doxygen ${TRAVIS_BUILD_DIR}/build/doc/Doxyfile; + doxygen ${TRAVIS_BUILD_DIR}/build/doc/Doxyfile.zh-cn; +} + +gh_pages_prepare() +{ + cd "${TRAVIS_BUILD_DIR}/build/doc"; + [ ! -d "html" ] || \ + abort "Doxygen target directory already exists." + git --version + git clone --single-branch -b gh-pages "${GITHUB_CLONE}" html + cd html + # setup git config (with defaults) + git config user.name "${GIT_NAME-travis}" + git config user.email "${GIT_EMAIL-"travis@localhost"}" + # clean working dir + rm -f .git/index + git clean -df +} + +gh_pages_commit() { + cd "${TRAVIS_BUILD_DIR}/build/doc/html"; + echo "rapidjson.org" > CNAME + git add --all; + git diff-index --quiet HEAD || git commit -m "Automatic doxygen build"; +} + +gh_setup_askpass() { + cat > ${GIT_ASKPASS} < ${HOME}/.git-credentials ; \ + chmod go-rw ${HOME}/.git-credentials ) ) + # push to GitHub + git push origin gh-pages +} + +doxygen_install +gh_pages_prepare +doxygen_run +gh_pages_commit +gh_pages_push + diff --git a/graphics/asymptote/LspCpp/third_party/uri/CHANGELOG.md b/graphics/asymptote/LspCpp/third_party/uri/CHANGELOG.md new file mode 100644 index 0000000000..aa399f4527 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/uri/CHANGELOG.md @@ -0,0 +1,42 @@ +# Changelog +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). + +## [1.1.0] - 2018-11-24 +### Fixed +- Query percent encoding + +## [1.0.4] - 2018-10-21 +### Fixed +- Bug in path normalization + +## [1.0.3] - 2018-10-18 +### Added +- AppVeyor for Visual Studio 2015 + +### Fixed +- Bug in percent encoding non-ASCII characters +- Percent encoding query part + +## [1.0.2] - 2018-10-13 +### Fixed +- Bug in `string_view` implementation +- Incorrect port copy constructor implementation + +## [1.0.1] - 2018-08-11 +### Changed +- Build defaults to C++11 + +### Fixed +- Fix to `network::uri_builder` to allow URIs that have a scheme and absolute path +- Other minor bug fixes and optimizations + +## [1.0.0] - 2018-05-27 +### Added +- A class, `network::uri` that models a URI, including URI parsing on construction + according to [RFC 3986](https://tools.ietf.org/html/rfc3986) +- A class, `network::uri_builder` that allows a user to construct valid URIs +- Member functions to allow URI normalization, resolution, and comparison +- Support for URI percent encoding diff --git a/graphics/asymptote/LspCpp/third_party/uri/CMakeFiles/CMakeDirectoryInformation.cmake b/graphics/asymptote/LspCpp/third_party/uri/CMakeFiles/CMakeDirectoryInformation.cmake new file mode 100644 index 0000000000..15412a42ec --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/uri/CMakeFiles/CMakeDirectoryInformation.cmake @@ -0,0 +1,16 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 3.20 + +# Relative path conversion top directories. +set(CMAKE_RELATIVE_PATH_TOP_SOURCE "/usr/local/src/asymptote-2.78/LspCpp") +set(CMAKE_RELATIVE_PATH_TOP_BINARY "/usr/local/src/asymptote-2.78/LspCpp") + +# 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/graphics/asymptote/LspCpp/third_party/uri/CMakeFiles/doc.dir/DependInfo.cmake b/graphics/asymptote/LspCpp/third_party/uri/CMakeFiles/doc.dir/DependInfo.cmake new file mode 100644 index 0000000000..dc55e44b55 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/uri/CMakeFiles/doc.dir/DependInfo.cmake @@ -0,0 +1,18 @@ + +# Consider dependencies only in project. +set(CMAKE_DEPENDS_IN_PROJECT_ONLY OFF) + +# The set of languages for which implicit dependencies are needed: +set(CMAKE_DEPENDS_LANGUAGES + ) + +# The set of dependency files which are needed: +set(CMAKE_DEPENDS_DEPENDENCY_FILES + ) + +# 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/graphics/asymptote/LspCpp/third_party/uri/CMakeFiles/doc.dir/build.make b/graphics/asymptote/LspCpp/third_party/uri/CMakeFiles/doc.dir/build.make new file mode 100644 index 0000000000..7617e03de6 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/uri/CMakeFiles/doc.dir/build.make @@ -0,0 +1,91 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 3.20 + +# Delete rule output on recipe failure. +.DELETE_ON_ERROR: + +#============================================================================= +# Special targets provided by cmake. + +# Disable implicit rules so canonical targets will work. +.SUFFIXES: + +# Disable VCS-based implicit rules. +% : %,v + +# Disable VCS-based implicit rules. +% : RCS/% + +# Disable VCS-based implicit rules. +% : RCS/%,v + +# Disable VCS-based implicit rules. +% : SCCS/s.% + +# Disable VCS-based implicit rules. +% : s.% + +.SUFFIXES: .hpux_make_needs_suffix_list + +# Produce verbose output by default. +VERBOSE = 1 + +# Command-line flag to silence nested $(MAKE). +$(VERBOSE)MAKESILENT = -s + +#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 rm -f + +# Escaping for special characters. +EQUALS = = + +# The top-level source directory on which CMake was run. +CMAKE_SOURCE_DIR = /usr/local/src/asymptote-2.78/LspCpp + +# The top-level build directory on which CMake was run. +CMAKE_BINARY_DIR = /usr/local/src/asymptote-2.78/LspCpp + +# Utility rule file for doc. + +# Include any custom commands dependencies for this target. +include third_party/uri/CMakeFiles/doc.dir/compiler_depend.make + +# Include the progress variables for this target. +include third_party/uri/CMakeFiles/doc.dir/progress.make + +third_party/uri/CMakeFiles/doc: + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --blue --bold --progress-dir=/usr/local/src/asymptote-2.78/LspCpp/CMakeFiles --progress-num=$(CMAKE_PROGRESS_1) "Generating API documentation with Doxygen" + cd /usr/local/src/asymptote-2.78/LspCpp/third_party/uri && /bin/doxygen /usr/local/src/asymptote-2.78/LspCpp/third_party/uri/Doxyfile + +doc: third_party/uri/CMakeFiles/doc +doc: third_party/uri/CMakeFiles/doc.dir/build.make +.PHONY : doc + +# Rule to build all files generated by this target. +third_party/uri/CMakeFiles/doc.dir/build: doc +.PHONY : third_party/uri/CMakeFiles/doc.dir/build + +third_party/uri/CMakeFiles/doc.dir/clean: + cd /usr/local/src/asymptote-2.78/LspCpp/third_party/uri && $(CMAKE_COMMAND) -P CMakeFiles/doc.dir/cmake_clean.cmake +.PHONY : third_party/uri/CMakeFiles/doc.dir/clean + +third_party/uri/CMakeFiles/doc.dir/depend: + cd /usr/local/src/asymptote-2.78/LspCpp && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" /usr/local/src/asymptote-2.78/LspCpp /usr/local/src/asymptote-2.78/LspCpp/third_party/uri /usr/local/src/asymptote-2.78/LspCpp /usr/local/src/asymptote-2.78/LspCpp/third_party/uri /usr/local/src/asymptote-2.78/LspCpp/third_party/uri/CMakeFiles/doc.dir/DependInfo.cmake --color=$(COLOR) +.PHONY : third_party/uri/CMakeFiles/doc.dir/depend + diff --git a/graphics/asymptote/LspCpp/third_party/uri/CMakeFiles/doc.dir/cmake_clean.cmake b/graphics/asymptote/LspCpp/third_party/uri/CMakeFiles/doc.dir/cmake_clean.cmake new file mode 100644 index 0000000000..d009c980e0 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/uri/CMakeFiles/doc.dir/cmake_clean.cmake @@ -0,0 +1,8 @@ +file(REMOVE_RECURSE + "CMakeFiles/doc" +) + +# Per-language clean rules from dependency scanning. +foreach(lang ) + include(CMakeFiles/doc.dir/cmake_clean_${lang}.cmake OPTIONAL) +endforeach() diff --git a/graphics/asymptote/LspCpp/third_party/uri/CMakeFiles/doc.dir/compiler_depend.make b/graphics/asymptote/LspCpp/third_party/uri/CMakeFiles/doc.dir/compiler_depend.make new file mode 100644 index 0000000000..585baf2797 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/uri/CMakeFiles/doc.dir/compiler_depend.make @@ -0,0 +1,2 @@ +# Empty custom commands generated dependencies file for doc. +# This may be replaced when dependencies are built. diff --git a/graphics/asymptote/LspCpp/third_party/uri/CMakeFiles/doc.dir/compiler_depend.ts b/graphics/asymptote/LspCpp/third_party/uri/CMakeFiles/doc.dir/compiler_depend.ts new file mode 100644 index 0000000000..3de913dc49 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/uri/CMakeFiles/doc.dir/compiler_depend.ts @@ -0,0 +1,2 @@ +# CMAKE generated file: DO NOT EDIT! +# Timestamp file for custom commands dependencies management for doc. diff --git a/graphics/asymptote/LspCpp/third_party/uri/CMakeFiles/doc.dir/progress.make b/graphics/asymptote/LspCpp/third_party/uri/CMakeFiles/doc.dir/progress.make new file mode 100644 index 0000000000..781c7de277 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/uri/CMakeFiles/doc.dir/progress.make @@ -0,0 +1,2 @@ +CMAKE_PROGRESS_1 = 1 + diff --git a/graphics/asymptote/LspCpp/third_party/uri/CMakeFiles/progress.marks b/graphics/asymptote/LspCpp/third_party/uri/CMakeFiles/progress.marks new file mode 100644 index 0000000000..ec635144f6 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/uri/CMakeFiles/progress.marks @@ -0,0 +1 @@ +9 diff --git a/graphics/asymptote/LspCpp/third_party/uri/CMakeLists.txt b/graphics/asymptote/LspCpp/third_party/uri/CMakeLists.txt new file mode 100644 index 0000000000..6863668e87 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/uri/CMakeLists.txt @@ -0,0 +1,105 @@ +# Copyright (c) Glyn Matthews 2012-2017. +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + + +cmake_minimum_required(VERSION 3.13) +project(Uri) + +option(Uri_BUILD_TESTS "Build the URI tests." ON) +option(Uri_BUILD_DOCS "Build the URI documentation." ON) +option(Uri_FULL_WARNINGS "Build the library with all warnings turned on." ON) +option(Uri_WARNINGS_AS_ERRORS "Treat warnings as errors." ON) +option(Uri_USE_STATIC_CRT "Use static C Runtime library (/MT or MTd)." ON) +option(Uri_DISABLE_LIBCXX "Disable libc++ (only applies if compiler is clang)" OFF) + +find_package(Threads REQUIRED) + +set(CMAKE_VERBOSE_MAKEFILE true) + +message(STATUS "Configure compiler") +message("Using ${CMAKE_CXX_COMPILER_ID}") +if (${CMAKE_CXX_COMPILER_ID} MATCHES GNU) + INCLUDE(CheckCXXCompilerFlag) + CHECK_CXX_COMPILER_FLAG(-std=c++11 HAVE_STD11) + + if (HAVE_STD11) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") + else() + message(FATAL_ERROR "No C++ 11 support (Compiler does not define -std=c++11).") + endif() + + if (Uri_FULL_WARNINGS) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall") + endif() + + if (Uri_WARNINGS_AS_ERRORS) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror -Wno-parentheses") + endif() + + message("C++ Flags: ${CMAKE_CXX_FLAGS} link flags: ${CMAKE_CXX_LINK_FLAGS}") +elseif(${CMAKE_CXX_COMPILER_ID} MATCHES Clang) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") + + if (NOT Uri_DISABLE_LIBCXX) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++") + endif() + + if (Uri_FULL_WARNINGS) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall") + endif() + + if (Uri_WARNINGS_AS_ERRORS) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror -Wno-parentheses") + endif() + + message("C++ Flags: ${CMAKE_CXX_FLAGS} link flags: ${CMAKE_CXX_LINK_FLAGS}") +endif() + + +if (MSVC) + if(DEFINED MSVC_VERSION AND MSVC_VERSION LESS 1900) + message(FATAL_ERROR "Requires VS 2015 or later") + endif() + + if (Uri_USE_STATIC_CRT) + # Replace dynamic MSVCRT linker flags with static version. + foreach(flag_var + CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_RELEASE + CMAKE_CXX_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_RELWITHDEBINFO) + if(${flag_var} MATCHES "/MD") + string(REGEX REPLACE "/MD" "/MT" ${flag_var} "${${flag_var}}") + endif(${flag_var} MATCHES "/MD") + endforeach(flag_var) + endif(Uri_USE_STATIC_CRT) + + add_definitions(-D_SCL_SECURE_NO_WARNINGS -D_CRT_SECURE_NO_DEPRECATE) +endif(MSVC) + +include_directories(${Uri_SOURCE_DIR}/src ${Uri_SOURCE_DIR}/include) + +add_subdirectory(src) + +# Testing +if (Uri_BUILD_TESTS) + message(STATUS "Configuring tests") + enable_testing() + add_subdirectory(deps/googletest) + add_subdirectory(test) +endif() + +# Documentation +if (Uri_BUILD_DOCS) + message("Configuring documentation") + find_package(Doxygen) + if (DOXYGEN_FOUND) + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile @ONLY) + add_custom_target(doc + ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + COMMENT "Generating API documentation with Doxygen" VERBATIM) + endif() +endif() + +install(DIRECTORY include DESTINATION ".") diff --git a/graphics/asymptote/LspCpp/third_party/uri/Doxyfile b/graphics/asymptote/LspCpp/third_party/uri/Doxyfile new file mode 100644 index 0000000000..f208ba6990 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/uri/Doxyfile @@ -0,0 +1,1742 @@ +# Doxyfile 1.7.6.1 + +# This file describes the settings to be used by the documentation system +# doxygen (www.doxygen.org) for a project. +# +# All text after a hash (#) is considered a comment and will be ignored. +# The format is: +# TAG = value [value, ...] +# For lists items can also be appended using: +# TAG += value [value, ...] +# Values that contain spaces should be placed between quotes (" "). + +#--------------------------------------------------------------------------- +# Project related configuration options +#--------------------------------------------------------------------------- + +# This tag specifies the encoding used for all characters in the config file +# that follow. The default is UTF-8 which is also the encoding used for all +# text before the first occurrence of this tag. Doxygen uses libiconv (or the +# iconv built into libc) for the transcoding. See +# http://www.gnu.org/software/libiconv for the list of possible encodings. + +DOXYFILE_ENCODING = UTF-8 + +# The PROJECT_NAME tag is a single word (or sequence of words) that should +# identify the project. Note that if you do not use Doxywizard you need +# to put quotes around the project name if it contains spaces. + +PROJECT_NAME = "C++ Network Library: URI" + +# The PROJECT_NUMBER tag can be used to enter a project or revision number. +# This could be handy for archiving the generated documentation or +# if some version control system is used. + +PROJECT_NUMBER = 1.0 + +# Using the PROJECT_BRIEF tag one can provide an optional one line description +# for a project that appears at the top of each page and should give viewer +# a quick idea about the purpose of the project. Keep the description short. + +PROJECT_BRIEF = + +# With the PROJECT_LOGO tag one can specify an logo or icon that is +# included in the documentation. The maximum height of the logo should not +# exceed 55 pixels and the maximum width should not exceed 200 pixels. +# Doxygen will copy the logo to the output directory. + +PROJECT_LOGO = + +# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) +# base path where the generated documentation will be put. +# If a relative path is entered, it will be relative to the location +# where doxygen was started. If left blank the current directory will be used. + +OUTPUT_DIRECTORY = + +# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create +# 4096 sub-directories (in 2 levels) under the output directory of each output +# format and will distribute the generated files over these directories. +# Enabling this option can be useful when feeding doxygen a huge amount of +# source files, where putting all generated files in the same directory would +# otherwise cause performance problems for the file system. + +CREATE_SUBDIRS = NO + +# The OUTPUT_LANGUAGE tag is used to specify the language in which all +# documentation generated by doxygen is written. Doxygen will use this +# information to generate all constant output in the proper language. +# The default language is English, other supported languages are: +# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, +# Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German, +# Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English +# messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian, +# Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrillic, Slovak, +# Slovene, Spanish, Swedish, Ukrainian, and Vietnamese. + +OUTPUT_LANGUAGE = English + +# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will +# include brief member descriptions after the members that are listed in +# the file and class documentation (similar to JavaDoc). +# Set to NO to disable this. + +BRIEF_MEMBER_DESC = YES + +# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend +# the brief description of a member or function before the detailed description. +# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the +# brief descriptions will be completely suppressed. + +REPEAT_BRIEF = YES + +# This tag implements a quasi-intelligent brief description abbreviator +# that is used to form the text in various listings. Each string +# in this list, if found as the leading text of the brief description, will be +# stripped from the text and the result after processing the whole list, is +# used as the annotated text. Otherwise, the brief description is used as-is. +# If left blank, the following values are used ("$name" is automatically +# replaced with the name of the entity): "The $name class" "The $name widget" +# "The $name file" "is" "provides" "specifies" "contains" +# "represents" "a" "an" "the" + +ABBREVIATE_BRIEF = + +# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then +# Doxygen will generate a detailed section even if there is only a brief +# description. + +ALWAYS_DETAILED_SEC = NO + +# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all +# inherited members of a class in the documentation of that class as if those +# members were ordinary class members. Constructors, destructors and assignment +# operators of the base classes will not be shown. + +INLINE_INHERITED_MEMB = NO + +# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full +# path before files name in the file list and in the header files. If set +# to NO the shortest path that makes the file name unique will be used. + +FULL_PATH_NAMES = YES + +# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag +# can be used to strip a user-defined part of the path. Stripping is +# only done if one of the specified strings matches the left-hand part of +# the path. The tag can be used to show relative paths in the file list. +# If left blank the directory from which doxygen is run is used as the +# path to strip. + +STRIP_FROM_PATH = /usr/local/src/asymptote-2.78/LspCpp/third_party/uri/include/ + +# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of +# the path mentioned in the documentation of a class, which tells +# the reader which header file to include in order to use a class. +# If left blank only the name of the header file containing the class +# definition is used. Otherwise one should specify the include paths that +# are normally passed to the compiler using the -I flag. + +STRIP_FROM_INC_PATH = + +# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter +# (but less readable) file names. This can be useful if your file system +# doesn't support long names like on DOS, Mac, or CD-ROM. + +SHORT_NAMES = NO + +# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen +# will interpret the first line (until the first dot) of a JavaDoc-style +# comment as the brief description. If set to NO, the JavaDoc +# comments will behave just like regular Qt-style comments +# (thus requiring an explicit @brief command for a brief description.) + +JAVADOC_AUTOBRIEF = NO + +# If the QT_AUTOBRIEF tag is set to YES then Doxygen will +# interpret the first line (until the first dot) of a Qt-style +# comment as the brief description. If set to NO, the comments +# will behave just like regular Qt-style comments (thus requiring +# an explicit \brief command for a brief description.) + +QT_AUTOBRIEF = NO + +# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen +# treat a multi-line C++ special comment block (i.e. a block of //! or /// +# comments) as a brief description. This used to be the default behaviour. +# The new default is to treat a multi-line C++ comment block as a detailed +# description. Set this tag to YES if you prefer the old behaviour instead. + +MULTILINE_CPP_IS_BRIEF = NO + +# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented +# member inherits the documentation from any documented member that it +# re-implements. + +INHERIT_DOCS = YES + +# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce +# a new page for each member. If set to NO, the documentation of a member will +# be part of the file/class/namespace that contains it. + +SEPARATE_MEMBER_PAGES = NO + +# The TAB_SIZE tag can be used to set the number of spaces in a tab. +# Doxygen uses this value to replace tabs by spaces in code fragments. + +TAB_SIZE = 8 + +# This tag can be used to specify a number of aliases that acts +# as commands in the documentation. An alias has the form "name=value". +# For example adding "sideeffect=\par Side Effects:\n" will allow you to +# put the command \sideeffect (or @sideeffect) in the documentation, which +# will result in a user-defined paragraph with heading "Side Effects:". +# You can put \n's in the value part of an alias to insert newlines. + +ALIASES = + +# This tag can be used to specify a number of word-keyword mappings (TCL only). +# A mapping has the form "name=value". For example adding +# "class=itcl::class" will allow you to use the command class in the +# itcl::class meaning. + +TCL_SUBST = + +# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C +# sources only. Doxygen will then generate output that is more tailored for C. +# For instance, some of the names that are used will be different. The list +# of all members will be omitted, etc. + +OPTIMIZE_OUTPUT_FOR_C = NO + +# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java +# sources only. Doxygen will then generate output that is more tailored for +# Java. For instance, namespaces will be presented as packages, qualified +# scopes will look different, etc. + +OPTIMIZE_OUTPUT_JAVA = NO + +# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran +# sources only. Doxygen will then generate output that is more tailored for +# Fortran. + +OPTIMIZE_FOR_FORTRAN = NO + +# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL +# sources. Doxygen will then generate output that is tailored for +# VHDL. + +OPTIMIZE_OUTPUT_VHDL = NO + +# Doxygen selects the parser to use depending on the extension of the files it +# parses. With this tag you can assign which parser to use for a given extension. +# Doxygen has a built-in mapping, but you can override or extend it using this +# tag. The format is ext=language, where ext is a file extension, and language +# is one of the parsers supported by doxygen: IDL, Java, Javascript, CSharp, C, +# C++, D, PHP, Objective-C, Python, Fortran, VHDL, C, C++. For instance to make +# doxygen treat .inc files as Fortran files (default is PHP), and .f files as C +# (default is Fortran), use: inc=Fortran f=C. Note that for custom extensions +# you also need to set FILE_PATTERNS otherwise the files are not read by doxygen. + +EXTENSION_MAPPING = + +# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want +# to include (a tag file for) the STL sources as input, then you should +# set this tag to YES in order to let doxygen match functions declarations and +# definitions whose arguments contain STL classes (e.g. func(std::string); v.s. +# func(std::string) {}). This also makes the inheritance and collaboration +# diagrams that involve STL classes more complete and accurate. + +BUILTIN_STL_SUPPORT = NO + +# If you use Microsoft's C++/CLI language, you should set this option to YES to +# enable parsing support. + +CPP_CLI_SUPPORT = NO + +# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only. +# Doxygen will parse them like normal C++ but will assume all classes use public +# instead of private inheritance when no explicit protection keyword is present. + +SIP_SUPPORT = NO + +# For Microsoft's IDL there are propget and propput attributes to indicate getter +# and setter methods for a property. Setting this option to YES (the default) +# will make doxygen replace the get and set methods by a property in the +# documentation. This will only work if the methods are indeed getting or +# setting a simple type. If this is not the case, or you want to show the +# methods anyway, you should set this option to NO. + +IDL_PROPERTY_SUPPORT = YES + +# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC +# tag is set to YES, then doxygen will reuse the documentation of the first +# member in the group (if any) for the other members of the group. By default +# all members of a group must be documented explicitly. + +DISTRIBUTE_GROUP_DOC = NO + +# Set the SUBGROUPING tag to YES (the default) to allow class member groups of +# the same type (for instance a group of public functions) to be put as a +# subgroup of that type (e.g. under the Public Functions section). Set it to +# NO to prevent subgrouping. Alternatively, this can be done per class using +# the \nosubgrouping command. + +SUBGROUPING = YES + +# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and +# unions are shown inside the group in which they are included (e.g. using +# @ingroup) instead of on a separate page (for HTML and Man pages) or +# section (for LaTeX and RTF). + +INLINE_GROUPED_CLASSES = NO + +# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and +# unions with only public data fields will be shown inline in the documentation +# of the scope in which they are defined (i.e. file, namespace, or group +# documentation), provided this scope is documented. If set to NO (the default), +# structs, classes, and unions are shown on a separate page (for HTML and Man +# pages) or section (for LaTeX and RTF). + +INLINE_SIMPLE_STRUCTS = NO + +# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum +# is documented as struct, union, or enum with the name of the typedef. So +# typedef struct TypeS {} TypeT, will appear in the documentation as a struct +# with name TypeT. When disabled the typedef will appear as a member of a file, +# namespace, or class. And the struct will be named TypeS. This can typically +# be useful for C code in case the coding convention dictates that all compound +# types are typedef'ed and only the typedef is referenced, never the tag name. + +TYPEDEF_HIDES_STRUCT = NO + +# Similar to the SYMBOL_CACHE_SIZE the size of the symbol lookup cache can be +# set using LOOKUP_CACHE_SIZE. This cache is used to resolve symbols given +# their name and scope. Since this can be an expensive process and often the +# same symbol appear multiple times in the code, doxygen keeps a cache of +# pre-resolved symbols. If the cache is too small doxygen will become slower. +# If the cache is too large, memory is wasted. The cache size is given by this +# formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range is 0..9, the default is 0, +# corresponding to a cache size of 2^16 = 65536 symbols. + +LOOKUP_CACHE_SIZE = 0 + +#--------------------------------------------------------------------------- +# Build related configuration options +#--------------------------------------------------------------------------- + +# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in +# documentation are documented, even if no documentation was available. +# Private class members and static file members will be hidden unless +# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES + +EXTRACT_ALL = NO + +# If the EXTRACT_PRIVATE tag is set to YES all private members of a class +# will be included in the documentation. + +EXTRACT_PRIVATE = NO + +# If the EXTRACT_STATIC tag is set to YES all static members of a file +# will be included in the documentation. + +EXTRACT_STATIC = NO + +# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) +# defined locally in source files will be included in the documentation. +# If set to NO only classes defined in header files are included. + +EXTRACT_LOCAL_CLASSES = YES + +# This flag is only useful for Objective-C code. When set to YES local +# methods, which are defined in the implementation section but not in +# the interface are included in the documentation. +# If set to NO (the default) only methods in the interface are included. + +EXTRACT_LOCAL_METHODS = NO + +# If this flag is set to YES, the members of anonymous namespaces will be +# extracted and appear in the documentation as a namespace called +# 'anonymous_namespace{file}', where file will be replaced with the base +# name of the file that contains the anonymous namespace. By default +# anonymous namespaces are hidden. + +EXTRACT_ANON_NSPACES = NO + +# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all +# undocumented members of documented classes, files or namespaces. +# If set to NO (the default) these members will be included in the +# various overviews, but no documentation section is generated. +# This option has no effect if EXTRACT_ALL is enabled. + +HIDE_UNDOC_MEMBERS = NO + +# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all +# undocumented classes that are normally visible in the class hierarchy. +# If set to NO (the default) these classes will be included in the various +# overviews. This option has no effect if EXTRACT_ALL is enabled. + +HIDE_UNDOC_CLASSES = NO + +# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all +# friend (class|struct|union) declarations. +# If set to NO (the default) these declarations will be included in the +# documentation. + +HIDE_FRIEND_COMPOUNDS = NO + +# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any +# documentation blocks found inside the body of a function. +# If set to NO (the default) these blocks will be appended to the +# function's detailed documentation block. + +HIDE_IN_BODY_DOCS = NO + +# The INTERNAL_DOCS tag determines if documentation +# that is typed after a \internal command is included. If the tag is set +# to NO (the default) then the documentation will be excluded. +# Set it to YES to include the internal documentation. + +INTERNAL_DOCS = NO + +# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate +# file names in lower-case letters. If set to YES upper-case letters are also +# allowed. This is useful if you have classes or files whose names only differ +# in case and if your file system supports case sensitive file names. Windows +# and Mac users are advised to set this option to NO. + +CASE_SENSE_NAMES = YES + +# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen +# will show members with their full class and namespace scopes in the +# documentation. If set to YES the scope will be hidden. + +HIDE_SCOPE_NAMES = NO + +# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen +# will put a list of the files that are included by a file in the documentation +# of that file. + +SHOW_INCLUDE_FILES = YES + +# If the FORCE_LOCAL_INCLUDES tag is set to YES then Doxygen +# will list include files with double quotes in the documentation +# rather than with sharp brackets. + +FORCE_LOCAL_INCLUDES = NO + +# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] +# is inserted in the documentation for inline members. + +INLINE_INFO = YES + +# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen +# will sort the (detailed) documentation of file and class members +# alphabetically by member name. If set to NO the members will appear in +# declaration order. + +SORT_MEMBER_DOCS = YES + +# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the +# brief documentation of file, namespace and class members alphabetically +# by member name. If set to NO (the default) the members will appear in +# declaration order. + +SORT_BRIEF_DOCS = NO + +# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen +# will sort the (brief and detailed) documentation of class members so that +# constructors and destructors are listed first. If set to NO (the default) +# the constructors will appear in the respective orders defined by +# SORT_MEMBER_DOCS and SORT_BRIEF_DOCS. +# This tag will be ignored for brief docs if SORT_BRIEF_DOCS is set to NO +# and ignored for detailed docs if SORT_MEMBER_DOCS is set to NO. + +SORT_MEMBERS_CTORS_1ST = NO + +# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the +# hierarchy of group names into alphabetical order. If set to NO (the default) +# the group names will appear in their defined order. + +SORT_GROUP_NAMES = NO + +# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be +# sorted by fully-qualified names, including namespaces. If set to +# NO (the default), the class list will be sorted only by class name, +# not including the namespace part. +# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. +# Note: This option applies only to the class list, not to the +# alphabetical list. + +SORT_BY_SCOPE_NAME = NO + +# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to +# do proper type resolution of all parameters of a function it will reject a +# match between the prototype and the implementation of a member function even +# if there is only one candidate or it is obvious which candidate to choose +# by doing a simple string match. By disabling STRICT_PROTO_MATCHING doxygen +# will still accept a match between prototype and implementation in such cases. + +STRICT_PROTO_MATCHING = NO + +# The GENERATE_TODOLIST tag can be used to enable (YES) or +# disable (NO) the todo list. This list is created by putting \todo +# commands in the documentation. + +GENERATE_TODOLIST = YES + +# The GENERATE_TESTLIST tag can be used to enable (YES) or +# disable (NO) the test list. This list is created by putting \test +# commands in the documentation. + +GENERATE_TESTLIST = YES + +# The GENERATE_BUGLIST tag can be used to enable (YES) or +# disable (NO) the bug list. This list is created by putting \bug +# commands in the documentation. + +GENERATE_BUGLIST = YES + +# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or +# disable (NO) the deprecated list. This list is created by putting +# \deprecated commands in the documentation. + +GENERATE_DEPRECATEDLIST= YES + +# The ENABLED_SECTIONS tag can be used to enable conditional +# documentation sections, marked by \if sectionname ... \endif. + +ENABLED_SECTIONS = + +# The MAX_INITIALIZER_LINES tag determines the maximum number of lines +# the initial value of a variable or macro consists of for it to appear in +# the documentation. If the initializer consists of more lines than specified +# here it will be hidden. Use a value of 0 to hide initializers completely. +# The appearance of the initializer of individual variables and macros in the +# documentation can be controlled using \showinitializer or \hideinitializer +# command in the documentation regardless of this setting. + +MAX_INITIALIZER_LINES = 30 + +# Set the SHOW_USED_FILES tag to NO to disable the list of files generated +# at the bottom of the documentation of classes and structs. If set to YES the +# list will mention the files that were used to generate the documentation. + +SHOW_USED_FILES = YES + +# Set the SHOW_FILES tag to NO to disable the generation of the Files page. +# This will remove the Files entry from the Quick Index and from the +# Folder Tree View (if specified). The default is YES. + +SHOW_FILES = YES + +# Set the SHOW_NAMESPACES tag to NO to disable the generation of the +# Namespaces page. +# This will remove the Namespaces entry from the Quick Index +# and from the Folder Tree View (if specified). The default is YES. + +SHOW_NAMESPACES = YES + +# The FILE_VERSION_FILTER tag can be used to specify a program or script that +# doxygen should invoke to get the current version for each file (typically from +# the version control system). Doxygen will invoke the program by executing (via +# popen()) the command , where is the value of +# the FILE_VERSION_FILTER tag, and is the name of an input file +# provided by doxygen. Whatever the program writes to standard output +# is used as the file version. See the manual for examples. + +FILE_VERSION_FILTER = + +# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed +# by doxygen. The layout file controls the global structure of the generated +# output files in an output format independent way. The create the layout file +# that represents doxygen's defaults, run doxygen with the -l option. +# You can optionally specify a file name after the option, if omitted +# DoxygenLayout.xml will be used as the name of the layout file. + +LAYOUT_FILE = + +# The CITE_BIB_FILES tag can be used to specify one or more bib files +# containing the references data. This must be a list of .bib files. The +# .bib extension is automatically appended if omitted. Using this command +# requires the bibtex tool to be installed. See also +# http://en.wikipedia.org/wiki/BibTeX for more info. For LaTeX the style +# of the bibliography can be controlled using LATEX_BIB_STYLE. To use this +# feature you need bibtex and perl available in the search path. + +CITE_BIB_FILES = + +#--------------------------------------------------------------------------- +# configuration options related to warning and progress messages +#--------------------------------------------------------------------------- + +# The QUIET tag can be used to turn on/off the messages that are generated +# by doxygen. Possible values are YES and NO. If left blank NO is used. + +QUIET = NO + +# The WARNINGS tag can be used to turn on/off the warning messages that are +# generated by doxygen. Possible values are YES and NO. If left blank +# NO is used. + +WARNINGS = YES + +# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings +# for undocumented members. If EXTRACT_ALL is set to YES then this flag will +# automatically be disabled. + +WARN_IF_UNDOCUMENTED = YES + +# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for +# potential errors in the documentation, such as not documenting some +# parameters in a documented function, or documenting parameters that +# don't exist or using markup commands wrongly. + +WARN_IF_DOC_ERROR = YES + +# The WARN_NO_PARAMDOC option can be enabled to get warnings for +# functions that are documented, but have no documentation for their parameters +# or return value. If set to NO (the default) doxygen will only warn about +# wrong or incomplete parameter documentation, but not about the absence of +# documentation. + +WARN_NO_PARAMDOC = NO + +# The WARN_FORMAT tag determines the format of the warning messages that +# doxygen can produce. The string should contain the $file, $line, and $text +# tags, which will be replaced by the file and line number from which the +# warning originated and the warning text. Optionally the format may contain +# $version, which will be replaced by the version of the file (if it could +# be obtained via FILE_VERSION_FILTER) + +WARN_FORMAT = "$file:$line: $text" + +# The WARN_LOGFILE tag can be used to specify a file to which warning +# and error messages should be written. If left blank the output is written +# to stderr. + +WARN_LOGFILE = + +#--------------------------------------------------------------------------- +# configuration options related to the input files +#--------------------------------------------------------------------------- + +# The INPUT tag can be used to specify the files and/or directories that contain +# documented source files. You may enter file names like "myfile.cpp" or +# directories like "/usr/src/myproject". Separate the files or directories +# with spaces. + +INPUT = /usr/local/src/asymptote-2.78/LspCpp/third_party/uri/include + +# This tag can be used to specify the character encoding of the source files +# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is +# also the default input encoding. Doxygen uses libiconv (or the iconv built +# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for +# the list of possible encodings. + +INPUT_ENCODING = UTF-8 + +# If the value of the INPUT tag contains directories, you can use the +# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp +# and *.h) to filter out the source-files in the directories. If left +# blank the following patterns are tested: +# *.c *.cc *.cxx *.cpp *.c++ *.d *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh +# *.hxx *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.dox *.py +# *.f90 *.f *.for *.vhd *.vhdl + +FILE_PATTERNS = *.hpp + +# The RECURSIVE tag can be used to turn specify whether or not subdirectories +# should be searched for input files as well. Possible values are YES and NO. +# If left blank NO is used. + +RECURSIVE = YES + +# The EXCLUDE tag can be used to specify files and/or directories that should be +# excluded from the INPUT source files. This way you can easily exclude a +# subdirectory from a directory tree whose root is specified with the INPUT tag. +# Note that relative paths are relative to the directory from which doxygen is +# run. + +EXCLUDE = /usr/local/src/asymptote-2.78/LspCpp/third_party/uri/include/network/uri/detail + +# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or +# directories that are symbolic links (a Unix file system feature) are excluded +# from the input. + +EXCLUDE_SYMLINKS = NO + +# If the value of the INPUT tag contains directories, you can use the +# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude +# certain files from those directories. Note that the wildcards are matched +# against the file with absolute path, so to exclude all test directories +# for example use the pattern */test/* + +EXCLUDE_PATTERNS = *-inl.hpp + +# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names +# (namespaces, classes, functions, etc.) that should be excluded from the +# output. The symbol name can be a fully qualified name, a word, or if the +# wildcard * is used, a substring. Examples: ANamespace, AClass, +# AClass::ANamespace, ANamespace::*Test + +EXCLUDE_SYMBOLS = + +# The EXAMPLE_PATH tag can be used to specify one or more files or +# directories that contain example code fragments that are included (see +# the \include command). + +EXAMPLE_PATH = + +# If the value of the EXAMPLE_PATH tag contains directories, you can use the +# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp +# and *.h) to filter out the source-files in the directories. If left +# blank all files are included. + +EXAMPLE_PATTERNS = + +# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be +# searched for input files to be used with the \include or \dontinclude +# commands irrespective of the value of the RECURSIVE tag. +# Possible values are YES and NO. If left blank NO is used. + +EXAMPLE_RECURSIVE = NO + +# The IMAGE_PATH tag can be used to specify one or more files or +# directories that contain image that are included in the documentation (see +# the \image command). + +IMAGE_PATH = + +# The INPUT_FILTER tag can be used to specify a program that doxygen should +# invoke to filter for each input file. Doxygen will invoke the filter program +# by executing (via popen()) the command , where +# is the value of the INPUT_FILTER tag, and is the name of an +# input file. Doxygen will then use the output that the filter program writes +# to standard output. +# If FILTER_PATTERNS is specified, this tag will be +# ignored. + +INPUT_FILTER = + +# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern +# basis. +# Doxygen will compare the file name with each pattern and apply the +# filter if there is a match. +# The filters are a list of the form: +# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further +# info on how filters are used. If FILTER_PATTERNS is empty or if +# non of the patterns match the file name, INPUT_FILTER is applied. + +FILTER_PATTERNS = + +# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using +# INPUT_FILTER) will be used to filter the input files when producing source +# files to browse (i.e. when SOURCE_BROWSER is set to YES). + +FILTER_SOURCE_FILES = NO + +# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file +# pattern. A pattern will override the setting for FILTER_PATTERN (if any) +# and it is also possible to disable source filtering for a specific pattern +# using *.ext= (so without naming a filter). This option only has effect when +# FILTER_SOURCE_FILES is enabled. + +FILTER_SOURCE_PATTERNS = + +#--------------------------------------------------------------------------- +# configuration options related to source browsing +#--------------------------------------------------------------------------- + +# If the SOURCE_BROWSER tag is set to YES then a list of source files will +# be generated. Documented entities will be cross-referenced with these sources. +# Note: To get rid of all source code in the generated output, make sure also +# VERBATIM_HEADERS is set to NO. + +SOURCE_BROWSER = NO + +# Setting the INLINE_SOURCES tag to YES will include the body +# of functions and classes directly in the documentation. + +INLINE_SOURCES = NO + +# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct +# doxygen to hide any special comment blocks from generated source code +# fragments. Normal C and C++ comments will always remain visible. + +STRIP_CODE_COMMENTS = YES + +# If the REFERENCED_BY_RELATION tag is set to YES +# then for each documented function all documented +# functions referencing it will be listed. + +REFERENCED_BY_RELATION = NO + +# If the REFERENCES_RELATION tag is set to YES +# then for each documented function all documented entities +# called/used by that function will be listed. + +REFERENCES_RELATION = NO + +# If the REFERENCES_LINK_SOURCE tag is set to YES (the default) +# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from +# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will +# link to the source code. +# Otherwise they will link to the documentation. + +REFERENCES_LINK_SOURCE = YES + +# If the USE_HTAGS tag is set to YES then the references to source code +# will point to the HTML generated by the htags(1) tool instead of doxygen +# built-in source browser. The htags tool is part of GNU's global source +# tagging system (see http://www.gnu.org/software/global/global.html). You +# will need version 4.8.6 or higher. + +USE_HTAGS = NO + +# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen +# will generate a verbatim copy of the header file for each class for +# which an include is specified. Set to NO to disable this. + +VERBATIM_HEADERS = YES + +#--------------------------------------------------------------------------- +# configuration options related to the alphabetical class index +#--------------------------------------------------------------------------- + +# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index +# of all compounds will be generated. Enable this if the project +# contains a lot of classes, structs, unions or interfaces. + +ALPHABETICAL_INDEX = YES + +# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then +# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns +# in which this list will be split (can be a number in the range [1..20]) + +COLS_IN_ALPHA_INDEX = 5 + +# In case all classes in a project start with a common prefix, all +# classes will be put under the same header in the alphabetical index. +# The IGNORE_PREFIX tag can be used to specify one or more prefixes that +# should be ignored while generating the index headers. + +IGNORE_PREFIX = /usr/local/src/asymptote-2.78/LspCpp/third_party/uri/uri/src/ + +#--------------------------------------------------------------------------- +# configuration options related to the HTML output +#--------------------------------------------------------------------------- + +# If the GENERATE_HTML tag is set to YES (the default) Doxygen will +# generate HTML output. + +GENERATE_HTML = YES + +# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `html' will be used as the default path. + +HTML_OUTPUT = html + +# The HTML_FILE_EXTENSION tag can be used to specify the file extension for +# each generated HTML page (for example: .htm,.php,.asp). If it is left blank +# doxygen will generate files with .html extension. + +HTML_FILE_EXTENSION = .html + +# The HTML_HEADER tag can be used to specify a personal HTML header for +# each generated HTML page. If it is left blank doxygen will generate a +# standard header. Note that when using a custom header you are responsible +# for the proper inclusion of any scripts and style sheets that doxygen +# needs, which is dependent on the configuration options used. +# It is advised to generate a default header using "doxygen -w html +# header.html footer.html stylesheet.css YourConfigFile" and then modify +# that header. Note that the header is subject to change so you typically +# have to redo this when upgrading to a newer version of doxygen or when +# changing the value of configuration settings such as GENERATE_TREEVIEW! + +HTML_HEADER = + +# The HTML_FOOTER tag can be used to specify a personal HTML footer for +# each generated HTML page. If it is left blank doxygen will generate a +# standard footer. + +HTML_FOOTER = + +# The HTML_STYLESHEET tag can be used to specify a user-defined cascading +# style sheet that is used by each HTML page. It can be used to +# fine-tune the look of the HTML output. If the tag is left blank doxygen +# will generate a default style sheet. Note that doxygen will try to copy +# the style sheet file to the HTML output directory, so don't put your own +# style sheet in the HTML output directory as well, or it will be erased! + +HTML_STYLESHEET = + +# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or +# other source files which should be copied to the HTML output directory. Note +# that these files will be copied to the base HTML output directory. Use the +# $relpath$ marker in the HTML_HEADER and/or HTML_FOOTER files to load these +# files. In the HTML_STYLESHEET file, use the file name only. Also note that +# the files will be copied as-is; there are no commands or markers available. + +HTML_EXTRA_FILES = + +# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. +# Doxygen will adjust the colors in the style sheet and background images +# according to this color. Hue is specified as an angle on a colorwheel, +# see http://en.wikipedia.org/wiki/Hue for more information. +# For instance the value 0 represents red, 60 is yellow, 120 is green, +# 180 is cyan, 240 is blue, 300 purple, and 360 is red again. +# The allowed range is 0 to 359. + +HTML_COLORSTYLE_HUE = 220 + +# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of +# the colors in the HTML output. For a value of 0 the output will use +# grayscales only. A value of 255 will produce the most vivid colors. + +HTML_COLORSTYLE_SAT = 100 + +# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to +# the luminance component of the colors in the HTML output. Values below +# 100 gradually make the output lighter, whereas values above 100 make +# the output darker. The value divided by 100 is the actual gamma applied, +# so 80 represents a gamma of 0.8, The value 220 represents a gamma of 2.2, +# and 100 does not change the gamma. + +HTML_COLORSTYLE_GAMMA = 80 + +# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML +# page will contain the date and time when the page was generated. Setting +# this to NO can help when comparing the output of multiple runs. + +HTML_TIMESTAMP = YES + +# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML +# documentation will contain sections that can be hidden and shown after the +# page has loaded. For this to work a browser that supports +# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox +# Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari). + +HTML_DYNAMIC_SECTIONS = NO + +# If the GENERATE_DOCSET tag is set to YES, additional index files +# will be generated that can be used as input for Apple's Xcode 3 +# integrated development environment, introduced with OSX 10.5 (Leopard). +# To create a documentation set, doxygen will generate a Makefile in the +# HTML output directory. Running make will produce the docset in that +# directory and running "make install" will install the docset in +# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find +# it at startup. +# See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html +# for more information. + +GENERATE_DOCSET = NO + +# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the +# feed. A documentation feed provides an umbrella under which multiple +# documentation sets from a single provider (such as a company or product suite) +# can be grouped. + +DOCSET_FEEDNAME = "Doxygen generated docs" + +# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that +# should uniquely identify the documentation set bundle. This should be a +# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen +# will append .docset to the name. + +DOCSET_BUNDLE_ID = org.doxygen.Project + +# When GENERATE_PUBLISHER_ID tag specifies a string that should uniquely identify +# the documentation publisher. This should be a reverse domain-name style +# string, e.g. com.mycompany.MyDocSet.documentation. + +DOCSET_PUBLISHER_ID = org.doxygen.Publisher + +# The GENERATE_PUBLISHER_NAME tag identifies the documentation publisher. + +DOCSET_PUBLISHER_NAME = Publisher + +# If the GENERATE_HTMLHELP tag is set to YES, additional index files +# will be generated that can be used as input for tools like the +# Microsoft HTML help workshop to generate a compiled HTML help file (.chm) +# of the generated HTML documentation. + +GENERATE_HTMLHELP = NO + +# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can +# be used to specify the file name of the resulting .chm file. You +# can add a path in front of the file if the result should not be +# written to the html output directory. + +CHM_FILE = + +# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can +# be used to specify the location (absolute path including file name) of +# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run +# the HTML help compiler on the generated index.hhp. + +HHC_LOCATION = + +# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag +# controls if a separate .chi index file is generated (YES) or that +# it should be included in the master .chm file (NO). + +GENERATE_CHI = NO + +# If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING +# is used to encode HtmlHelp index (hhk), content (hhc) and project file +# content. + +CHM_INDEX_ENCODING = + +# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag +# controls whether a binary table of contents is generated (YES) or a +# normal table of contents (NO) in the .chm file. + +BINARY_TOC = NO + +# The TOC_EXPAND flag can be set to YES to add extra items for group members +# to the contents of the HTML help documentation and to the tree view. + +TOC_EXPAND = NO + +# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and +# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated +# that can be used as input for Qt's qhelpgenerator to generate a +# Qt Compressed Help (.qch) of the generated HTML documentation. + +GENERATE_QHP = NO + +# If the QHG_LOCATION tag is specified, the QCH_FILE tag can +# be used to specify the file name of the resulting .qch file. +# The path specified is relative to the HTML output folder. + +QCH_FILE = + +# The QHP_NAMESPACE tag specifies the namespace to use when generating +# Qt Help Project output. For more information please see +# http://doc.trolltech.com/qthelpproject.html#namespace + +QHP_NAMESPACE = org.doxygen.Project + +# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating +# Qt Help Project output. For more information please see +# http://doc.trolltech.com/qthelpproject.html#virtual-folders + +QHP_VIRTUAL_FOLDER = doc + +# If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to +# add. For more information please see +# http://doc.trolltech.com/qthelpproject.html#custom-filters + +QHP_CUST_FILTER_NAME = + +# The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the +# custom filter to add. For more information please see +# +# Qt Help Project / Custom Filters. + +QHP_CUST_FILTER_ATTRS = + +# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this +# project's +# filter section matches. +# +# Qt Help Project / Filter Attributes. + +QHP_SECT_FILTER_ATTRS = + +# If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can +# be used to specify the location of Qt's qhelpgenerator. +# If non-empty doxygen will try to run qhelpgenerator on the generated +# .qhp file. + +QHG_LOCATION = + +# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files +# will be generated, which together with the HTML files, form an Eclipse help +# plugin. To install this plugin and make it available under the help contents +# menu in Eclipse, the contents of the directory containing the HTML and XML +# files needs to be copied into the plugins directory of eclipse. The name of +# the directory within the plugins directory should be the same as +# the ECLIPSE_DOC_ID value. After copying Eclipse needs to be restarted before +# the help appears. + +GENERATE_ECLIPSEHELP = NO + +# A unique identifier for the eclipse help plugin. When installing the plugin +# the directory name containing the HTML and XML files should also have +# this name. + +ECLIPSE_DOC_ID = org.doxygen.Project + +# The DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) +# at top of each HTML page. The value NO (the default) enables the index and +# the value YES disables it. Since the tabs have the same information as the +# navigation tree you can set this option to NO if you already set +# GENERATE_TREEVIEW to YES. + +DISABLE_INDEX = NO + +# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index +# structure should be generated to display hierarchical information. +# If the tag value is set to YES, a side panel will be generated +# containing a tree-like index structure (just like the one that +# is generated for HTML Help). For this to work a browser that supports +# JavaScript, DHTML, CSS and frames is required (i.e. any modern browser). +# Windows users are probably better off using the HTML help feature. +# Since the tree basically has the same information as the tab index you +# could consider to set DISABLE_INDEX to NO when enabling this option. + +GENERATE_TREEVIEW = NO + +# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values +# (range [0,1..20]) that doxygen will group on one line in the generated HTML +# documentation. Note that a value of 0 will completely suppress the enum +# values from appearing in the overview section. + +ENUM_VALUES_PER_LINE = 4 + +# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be +# used to set the initial width (in pixels) of the frame in which the tree +# is shown. + +TREEVIEW_WIDTH = 250 + +# When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open +# links to external symbols imported via tag files in a separate window. + +EXT_LINKS_IN_WINDOW = NO + +# Use this tag to change the font size of Latex formulas included +# as images in the HTML documentation. The default is 10. Note that +# when you change the font size after a successful doxygen run you need +# to manually remove any form_*.png images from the HTML output directory +# to force them to be regenerated. + +FORMULA_FONTSIZE = 10 + +# Use the FORMULA_TRANPARENT tag to determine whether or not the images +# generated for formulas are transparent PNGs. Transparent PNGs are +# not supported properly for IE 6.0, but are supported on all modern browsers. +# Note that when changing this option you need to delete any form_*.png files +# in the HTML output before the changes have effect. + +FORMULA_TRANSPARENT = YES + +# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax +# (see http://www.mathjax.org) which uses client side Javascript for the +# rendering instead of using prerendered bitmaps. Use this if you do not +# have LaTeX installed or if you want to formulas look prettier in the HTML +# output. When enabled you also need to install MathJax separately and +# configure the path to it using the MATHJAX_RELPATH option. + +USE_MATHJAX = NO + +# When MathJax is enabled you need to specify the location relative to the +# HTML output directory using the MATHJAX_RELPATH option. The destination +# directory should contain the MathJax.js script. For instance, if the mathjax +# directory is located at the same level as the HTML output directory, then +# MATHJAX_RELPATH should be ../mathjax. The default value points to the +# mathjax.org site, so you can quickly see the result without installing +# MathJax, but it is strongly recommended to install a local copy of MathJax +# before deployment. + +MATHJAX_RELPATH = http://www.mathjax.org/mathjax + +# The MATHJAX_EXTENSIONS tag can be used to specify one or MathJax extension +# names that should be enabled during MathJax rendering. + +MATHJAX_EXTENSIONS = + +# When the SEARCHENGINE tag is enabled doxygen will generate a search box +# for the HTML output. The underlying search engine uses javascript +# and DHTML and should work on any modern browser. Note that when using +# HTML help (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets +# (GENERATE_DOCSET) there is already a search function so this one should +# typically be disabled. For large projects the javascript based search engine +# can be slow, then enabling SERVER_BASED_SEARCH may provide a better solution. + +SEARCHENGINE = YES + +# When the SERVER_BASED_SEARCH tag is enabled the search engine will be +# implemented using a PHP enabled web server instead of at the web client +# using Javascript. Doxygen will generate the search PHP script and index +# file to put on the web server. The advantage of the server +# based approach is that it scales better to large projects and allows +# full text search. The disadvantages are that it is more difficult to setup +# and does not have live searching capabilities. + +SERVER_BASED_SEARCH = NO + +#--------------------------------------------------------------------------- +# configuration options related to the LaTeX output +#--------------------------------------------------------------------------- + +# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will +# generate Latex output. + +GENERATE_LATEX = NO + +# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `latex' will be used as the default path. + +LATEX_OUTPUT = latex + +# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be +# invoked. If left blank `latex' will be used as the default command name. +# Note that when enabling USE_PDFLATEX this option is only used for +# generating bitmaps for formulas in the HTML output, but not in the +# Makefile that is written to the output directory. + +LATEX_CMD_NAME = latex + +# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to +# generate index for LaTeX. If left blank `makeindex' will be used as the +# default command name. + +MAKEINDEX_CMD_NAME = makeindex + +# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact +# LaTeX documents. This may be useful for small projects and may help to +# save some trees in general. + +COMPACT_LATEX = NO + +# The PAPER_TYPE tag can be used to set the paper type that is used +# by the printer. Possible values are: a4, letter, legal and +# executive. If left blank a4wide will be used. + +PAPER_TYPE = a4 + +# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX +# packages that should be included in the LaTeX output. + +EXTRA_PACKAGES = + +# The LATEX_HEADER tag can be used to specify a personal LaTeX header for +# the generated latex document. The header should contain everything until +# the first chapter. If it is left blank doxygen will generate a +# standard header. Notice: only use this tag if you know what you are doing! + +LATEX_HEADER = + +# The LATEX_FOOTER tag can be used to specify a personal LaTeX footer for +# the generated latex document. The footer should contain everything after +# the last chapter. If it is left blank doxygen will generate a +# standard footer. Notice: only use this tag if you know what you are doing! + +LATEX_FOOTER = + +# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated +# is prepared for conversion to pdf (using ps2pdf). The pdf file will +# contain links (just like the HTML output) instead of page references +# This makes the output suitable for online browsing using a pdf viewer. + +PDF_HYPERLINKS = YES + +# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of +# plain latex in the generated Makefile. Set this option to YES to get a +# higher quality PDF documentation. + +USE_PDFLATEX = YES + +# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. +# command to the generated LaTeX files. This will instruct LaTeX to keep +# running if errors occur, instead of asking the user for help. +# This option is also used when generating formulas in HTML. + +LATEX_BATCHMODE = NO + +# If LATEX_HIDE_INDICES is set to YES then doxygen will not +# include the index chapters (such as File Index, Compound Index, etc.) +# in the output. + +LATEX_HIDE_INDICES = NO + +# If LATEX_SOURCE_CODE is set to YES then doxygen will include +# source code with syntax highlighting in the LaTeX output. +# Note that which sources are shown also depends on other settings +# such as SOURCE_BROWSER. + +LATEX_SOURCE_CODE = NO + +# The LATEX_BIB_STYLE tag can be used to specify the style to use for the +# bibliography, e.g. plainnat, or ieeetr. The default style is "plain". See +# http://en.wikipedia.org/wiki/BibTeX for more info. + +LATEX_BIB_STYLE = plain + +#--------------------------------------------------------------------------- +# configuration options related to the RTF output +#--------------------------------------------------------------------------- + +# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output +# The RTF output is optimized for Word 97 and may not look very pretty with +# other RTF readers or editors. + +GENERATE_RTF = NO + +# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `rtf' will be used as the default path. + +RTF_OUTPUT = rtf + +# If the COMPACT_RTF tag is set to YES Doxygen generates more compact +# RTF documents. This may be useful for small projects and may help to +# save some trees in general. + +COMPACT_RTF = NO + +# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated +# will contain hyperlink fields. The RTF file will +# contain links (just like the HTML output) instead of page references. +# This makes the output suitable for online browsing using WORD or other +# programs which support those fields. +# Note: wordpad (write) and others do not support links. + +RTF_HYPERLINKS = NO + +# Load style sheet definitions from file. Syntax is similar to doxygen's +# config file, i.e. a series of assignments. You only have to provide +# replacements, missing definitions are set to their default value. + +RTF_STYLESHEET_FILE = + +# Set optional variables used in the generation of an rtf document. +# Syntax is similar to doxygen's config file. + +RTF_EXTENSIONS_FILE = + +#--------------------------------------------------------------------------- +# configuration options related to the man page output +#--------------------------------------------------------------------------- + +# If the GENERATE_MAN tag is set to YES (the default) Doxygen will +# generate man pages + +GENERATE_MAN = NO + +# The MAN_OUTPUT tag is used to specify where the man pages will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `man' will be used as the default path. + +MAN_OUTPUT = man + +# The MAN_EXTENSION tag determines the extension that is added to +# the generated man pages (default is the subroutine's section .3) + +MAN_EXTENSION = .3 + +# If the MAN_LINKS tag is set to YES and Doxygen generates man output, +# then it will generate one additional man file for each entity +# documented in the real man page(s). These additional files +# only source the real man page, but without them the man command +# would be unable to find the correct page. The default is NO. + +MAN_LINKS = NO + +#--------------------------------------------------------------------------- +# configuration options related to the XML output +#--------------------------------------------------------------------------- + +# If the GENERATE_XML tag is set to YES Doxygen will +# generate an XML file that captures the structure of +# the code including all documentation. + +GENERATE_XML = NO + +# The XML_OUTPUT tag is used to specify where the XML pages will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `xml' will be used as the default path. + +XML_OUTPUT = xml + +# The XML_SCHEMA tag can be used to specify an XML schema, +# which can be used by a validating XML parser to check the +# syntax of the XML files. + +XML_SCHEMA = + +# If the XML_PROGRAMLISTING tag is set to YES Doxygen will +# dump the program listings (including syntax highlighting +# and cross-referencing information) to the XML output. Note that +# enabling this will significantly increase the size of the XML output. + +XML_PROGRAMLISTING = YES + +#--------------------------------------------------------------------------- +# configuration options for the AutoGen Definitions output +#--------------------------------------------------------------------------- + +# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will +# generate an AutoGen Definitions (see autogen.sf.net) file +# that captures the structure of the code including all +# documentation. Note that this feature is still experimental +# and incomplete at the moment. + +GENERATE_AUTOGEN_DEF = NO + +#--------------------------------------------------------------------------- +# configuration options related to the Perl module output +#--------------------------------------------------------------------------- + +# If the GENERATE_PERLMOD tag is set to YES Doxygen will +# generate a Perl module file that captures the structure of +# the code including all documentation. Note that this +# feature is still experimental and incomplete at the +# moment. + +GENERATE_PERLMOD = NO + +# If the PERLMOD_LATEX tag is set to YES Doxygen will generate +# the necessary Makefile rules, Perl scripts and LaTeX code to be able +# to generate PDF and DVI output from the Perl module output. + +PERLMOD_LATEX = NO + +# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be +# nicely formatted so it can be parsed by a human reader. +# This is useful +# if you want to understand what is going on. +# On the other hand, if this +# tag is set to NO the size of the Perl module output will be much smaller +# and Perl will parse it just the same. + +PERLMOD_PRETTY = YES + +# The names of the make variables in the generated doxyrules.make file +# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. +# This is useful so different doxyrules.make files included by the same +# Makefile don't overwrite each other's variables. + +PERLMOD_MAKEVAR_PREFIX = + +#--------------------------------------------------------------------------- +# Configuration options related to the preprocessor +#--------------------------------------------------------------------------- + +# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will +# evaluate all C-preprocessor directives found in the sources and include +# files. + +ENABLE_PREPROCESSING = YES + +# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro +# names in the source code. If set to NO (the default) only conditional +# compilation will be performed. Macro expansion can be done in a controlled +# way by setting EXPAND_ONLY_PREDEF to YES. + +MACRO_EXPANSION = NO + +# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES +# then the macro expansion is limited to the macros specified with the +# PREDEFINED and EXPAND_AS_DEFINED tags. + +EXPAND_ONLY_PREDEF = NO + +# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files +# pointed to by INCLUDE_PATH will be searched when a #include is found. + +SEARCH_INCLUDES = YES + +# The INCLUDE_PATH tag can be used to specify one or more directories that +# contain include files that are not input files but should be processed by +# the preprocessor. + +INCLUDE_PATH = + +# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard +# patterns (like *.h and *.hpp) to filter out the header-files in the +# directories. If left blank, the patterns specified with FILE_PATTERNS will +# be used. + +INCLUDE_FILE_PATTERNS = + +# The PREDEFINED tag can be used to specify one or more macro names that +# are defined before the preprocessor is started (similar to the -D option of +# gcc). The argument of the tag is a list of macros of the form: name +# or name=definition (no spaces). If the definition and the = are +# omitted =1 is assumed. To prevent a macro definition from being +# undefined via #undef or recursively expanded use the := operator +# instead of the = operator. + +PREDEFINED = DOXYGEN_SHOULD_SKIP_THIS + +# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then +# this tag can be used to specify a list of macro names that should be expanded. +# The macro definition that is found in the sources will be used. +# Use the PREDEFINED tag if you want to use a different macro definition that +# overrules the definition found in the source code. + +EXPAND_AS_DEFINED = + +# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then +# doxygen's preprocessor will remove all references to function-like macros +# that are alone on a line, have an all uppercase name, and do not end with a +# semicolon, because these will confuse the parser if not removed. + +SKIP_FUNCTION_MACROS = YES + +#--------------------------------------------------------------------------- +# Configuration::additions related to external references +#--------------------------------------------------------------------------- + +# The TAGFILES option can be used to specify one or more tagfiles. +# Optionally an initial location of the external documentation +# can be added for each tagfile. The format of a tag file without +# this location is as follows: +# +# TAGFILES = file1 file2 ... +# Adding location for the tag files is done as follows: +# +# TAGFILES = file1=loc1 "file2 = loc2" ... +# where "loc1" and "loc2" can be relative or absolute paths or +# URLs. If a location is present for each tag, the installdox tool +# does not have to be run to correct the links. +# Note that each tag file must have a unique name +# (where the name does NOT include the path) +# If a tag file is not located in the directory in which doxygen +# is run, you must also specify the path to the tagfile here. + +TAGFILES = + +# When a file name is specified after GENERATE_TAGFILE, doxygen will create +# a tag file that is based on the input files it reads. + +GENERATE_TAGFILE = + +# If the ALLEXTERNALS tag is set to YES all external classes will be listed +# in the class index. If set to NO only the inherited external classes +# will be listed. + +ALLEXTERNALS = NO + +# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed +# in the modules index. If set to NO, only the current project's groups will +# be listed. + +EXTERNAL_GROUPS = YES + +# The PERL_PATH should be the absolute path and name of the perl script +# interpreter (i.e. the result of `which perl'). + +PERL_PATH = /usr/bin/perl + +#--------------------------------------------------------------------------- +# Configuration options related to the dot tool +#--------------------------------------------------------------------------- + +# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will +# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base +# or super classes. Setting the tag to NO turns the diagrams off. Note that +# this option also works with HAVE_DOT disabled, but it is recommended to +# install and use dot, since it yields more powerful graphs. + +CLASS_DIAGRAMS = YES + +# You can define message sequence charts within doxygen comments using the \msc +# command. Doxygen will then run the mscgen tool (see +# http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the +# documentation. The MSCGEN_PATH tag allows you to specify the directory where +# the mscgen tool resides. If left empty the tool is assumed to be found in the +# default search path. + +MSCGEN_PATH = + +# If set to YES, the inheritance and collaboration graphs will hide +# inheritance and usage relations if the target is undocumented +# or is not a class. + +HIDE_UNDOC_RELATIONS = YES + +# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is +# available from the path. This tool is part of Graphviz, a graph visualization +# toolkit from AT&T and Lucent Bell Labs. The other options in this section +# have no effect if this option is set to NO (the default) + +HAVE_DOT = NO + +# The DOT_NUM_THREADS specifies the number of dot invocations doxygen is +# allowed to run in parallel. When set to 0 (the default) doxygen will +# base this on the number of processors available in the system. You can set it +# explicitly to a value larger than 0 to get control over the balance +# between CPU load and processing speed. + +DOT_NUM_THREADS = 0 + +# By default doxygen will use the Helvetica font for all dot files that +# doxygen generates. When you want a differently looking font you can specify +# the font name using DOT_FONTNAME. You need to make sure dot is able to find +# the font, which can be done by putting it in a standard location or by setting +# the DOTFONTPATH environment variable or by setting DOT_FONTPATH to the +# directory containing the font. + +DOT_FONTNAME = Helvetica + +# The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs. +# The default size is 10pt. + +DOT_FONTSIZE = 10 + +# By default doxygen will tell dot to use the Helvetica font. +# If you specify a different font using DOT_FONTNAME you can use DOT_FONTPATH to +# set the path where dot can find it. + +DOT_FONTPATH = + +# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for each documented class showing the direct and +# indirect inheritance relations. Setting this tag to YES will force the +# CLASS_DIAGRAMS tag to NO. + +CLASS_GRAPH = YES + +# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for each documented class showing the direct and +# indirect implementation dependencies (inheritance, containment, and +# class references variables) of the class with other documented classes. + +COLLABORATION_GRAPH = YES + +# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for groups, showing the direct groups dependencies + +GROUP_GRAPHS = YES + +# If the UML_LOOK tag is set to YES doxygen will generate inheritance and +# collaboration diagrams in a style similar to the OMG's Unified Modeling +# Language. + +UML_LOOK = NO + +# If set to YES, the inheritance and collaboration graphs will show the +# relations between templates and their instances. + +TEMPLATE_RELATIONS = NO + +# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT +# tags are set to YES then doxygen will generate a graph for each documented +# file showing the direct and indirect include dependencies of the file with +# other documented files. + +INCLUDE_GRAPH = YES + +# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and +# HAVE_DOT tags are set to YES then doxygen will generate a graph for each +# documented header file showing the documented files that directly or +# indirectly include this file. + +INCLUDED_BY_GRAPH = YES + +# If the CALL_GRAPH and HAVE_DOT options are set to YES then +# doxygen will generate a call dependency graph for every global function +# or class method. Note that enabling this option will significantly increase +# the time of a run. So in most cases it will be better to enable call graphs +# for selected functions only using the \callgraph command. + +CALL_GRAPH = NO + +# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then +# doxygen will generate a caller dependency graph for every global function +# or class method. Note that enabling this option will significantly increase +# the time of a run. So in most cases it will be better to enable caller +# graphs for selected functions only using the \callergraph command. + +CALLER_GRAPH = NO + +# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen +# will generate a graphical hierarchy of all classes instead of a textual one. + +GRAPHICAL_HIERARCHY = YES + +# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES +# then doxygen will show the dependencies a directory has on other directories +# in a graphical way. The dependency relations are determined by the #include +# relations between the files in the directories. + +DIRECTORY_GRAPH = YES + +# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images +# generated by dot. Possible values are svg, png, jpg, or gif. +# If left blank png will be used. If you choose svg you need to set +# HTML_FILE_EXTENSION to xhtml in order to make the SVG files +# visible in IE 9+ (other browsers do not have this requirement). + +DOT_IMAGE_FORMAT = png + +# If DOT_IMAGE_FORMAT is set to svg, then this option can be set to YES to +# enable generation of interactive SVG images that allow zooming and panning. +# Note that this requires a modern browser other than Internet Explorer. +# Tested and working are Firefox, Chrome, Safari, and Opera. For IE 9+ you +# need to set HTML_FILE_EXTENSION to xhtml in order to make the SVG files +# visible. Older versions of IE do not have SVG support. + +INTERACTIVE_SVG = NO + +# The tag DOT_PATH can be used to specify the path where the dot tool can be +# found. If left blank, it is assumed the dot tool can be found in the path. + +DOT_PATH = + +# The DOTFILE_DIRS tag can be used to specify one or more directories that +# contain dot files that are included in the documentation (see the +# \dotfile command). + +DOTFILE_DIRS = + +# The MSCFILE_DIRS tag can be used to specify one or more directories that +# contain msc files that are included in the documentation (see the +# \mscfile command). + +MSCFILE_DIRS = + +# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of +# nodes that will be shown in the graph. If the number of nodes in a graph +# becomes larger than this value, doxygen will truncate the graph, which is +# visualized by representing a node as a red box. Note that doxygen if the +# number of direct children of the root node in a graph is already larger than +# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note +# that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH. + +DOT_GRAPH_MAX_NODES = 50 + +# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the +# graphs generated by dot. A depth value of 3 means that only nodes reachable +# from the root by following a path via at most 3 edges will be shown. Nodes +# that lay further from the root node will be omitted. Note that setting this +# option to 1 or 2 may greatly reduce the computation time needed for large +# code bases. Also note that the size of a graph can be further restricted by +# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction. + +MAX_DOT_GRAPH_DEPTH = 0 + +# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent +# background. This is disabled by default, because dot on Windows does not +# seem to support this out of the box. Warning: Depending on the platform used, +# enabling this option may lead to badly anti-aliased labels on the edges of +# a graph (i.e. they become hard to read). + +DOT_TRANSPARENT = NO + +# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output +# files in one run (i.e. multiple -o and -T options on the command line). This +# makes dot run faster, but since only newer versions of dot (>1.8.10) +# support this, this feature is disabled by default. + +DOT_MULTI_TARGETS = YES + +# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will +# generate a legend page explaining the meaning of the various boxes and +# arrows in the dot generated graphs. + +GENERATE_LEGEND = YES + +# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will +# remove the intermediate dot files that are used to generate +# the various graphs. + +DOT_CLEANUP = YES diff --git a/graphics/asymptote/LspCpp/third_party/uri/Doxyfile.in b/graphics/asymptote/LspCpp/third_party/uri/Doxyfile.in new file mode 100644 index 0000000000..b8affcf99a --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/uri/Doxyfile.in @@ -0,0 +1,1742 @@ +# Doxyfile 1.7.6.1 + +# This file describes the settings to be used by the documentation system +# doxygen (www.doxygen.org) for a project. +# +# All text after a hash (#) is considered a comment and will be ignored. +# The format is: +# TAG = value [value, ...] +# For lists items can also be appended using: +# TAG += value [value, ...] +# Values that contain spaces should be placed between quotes (" "). + +#--------------------------------------------------------------------------- +# Project related configuration options +#--------------------------------------------------------------------------- + +# This tag specifies the encoding used for all characters in the config file +# that follow. The default is UTF-8 which is also the encoding used for all +# text before the first occurrence of this tag. Doxygen uses libiconv (or the +# iconv built into libc) for the transcoding. See +# http://www.gnu.org/software/libiconv for the list of possible encodings. + +DOXYFILE_ENCODING = UTF-8 + +# The PROJECT_NAME tag is a single word (or sequence of words) that should +# identify the project. Note that if you do not use Doxywizard you need +# to put quotes around the project name if it contains spaces. + +PROJECT_NAME = "C++ Network Library: URI" + +# The PROJECT_NUMBER tag can be used to enter a project or revision number. +# This could be handy for archiving the generated documentation or +# if some version control system is used. + +PROJECT_NUMBER = 1.0 + +# Using the PROJECT_BRIEF tag one can provide an optional one line description +# for a project that appears at the top of each page and should give viewer +# a quick idea about the purpose of the project. Keep the description short. + +PROJECT_BRIEF = + +# With the PROJECT_LOGO tag one can specify an logo or icon that is +# included in the documentation. The maximum height of the logo should not +# exceed 55 pixels and the maximum width should not exceed 200 pixels. +# Doxygen will copy the logo to the output directory. + +PROJECT_LOGO = + +# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) +# base path where the generated documentation will be put. +# If a relative path is entered, it will be relative to the location +# where doxygen was started. If left blank the current directory will be used. + +OUTPUT_DIRECTORY = + +# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create +# 4096 sub-directories (in 2 levels) under the output directory of each output +# format and will distribute the generated files over these directories. +# Enabling this option can be useful when feeding doxygen a huge amount of +# source files, where putting all generated files in the same directory would +# otherwise cause performance problems for the file system. + +CREATE_SUBDIRS = NO + +# The OUTPUT_LANGUAGE tag is used to specify the language in which all +# documentation generated by doxygen is written. Doxygen will use this +# information to generate all constant output in the proper language. +# The default language is English, other supported languages are: +# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, +# Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German, +# Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English +# messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian, +# Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrillic, Slovak, +# Slovene, Spanish, Swedish, Ukrainian, and Vietnamese. + +OUTPUT_LANGUAGE = English + +# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will +# include brief member descriptions after the members that are listed in +# the file and class documentation (similar to JavaDoc). +# Set to NO to disable this. + +BRIEF_MEMBER_DESC = YES + +# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend +# the brief description of a member or function before the detailed description. +# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the +# brief descriptions will be completely suppressed. + +REPEAT_BRIEF = YES + +# This tag implements a quasi-intelligent brief description abbreviator +# that is used to form the text in various listings. Each string +# in this list, if found as the leading text of the brief description, will be +# stripped from the text and the result after processing the whole list, is +# used as the annotated text. Otherwise, the brief description is used as-is. +# If left blank, the following values are used ("$name" is automatically +# replaced with the name of the entity): "The $name class" "The $name widget" +# "The $name file" "is" "provides" "specifies" "contains" +# "represents" "a" "an" "the" + +ABBREVIATE_BRIEF = + +# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then +# Doxygen will generate a detailed section even if there is only a brief +# description. + +ALWAYS_DETAILED_SEC = NO + +# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all +# inherited members of a class in the documentation of that class as if those +# members were ordinary class members. Constructors, destructors and assignment +# operators of the base classes will not be shown. + +INLINE_INHERITED_MEMB = NO + +# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full +# path before files name in the file list and in the header files. If set +# to NO the shortest path that makes the file name unique will be used. + +FULL_PATH_NAMES = YES + +# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag +# can be used to strip a user-defined part of the path. Stripping is +# only done if one of the specified strings matches the left-hand part of +# the path. The tag can be used to show relative paths in the file list. +# If left blank the directory from which doxygen is run is used as the +# path to strip. + +STRIP_FROM_PATH = @CMAKE_CURRENT_SOURCE_DIR@/include/ + +# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of +# the path mentioned in the documentation of a class, which tells +# the reader which header file to include in order to use a class. +# If left blank only the name of the header file containing the class +# definition is used. Otherwise one should specify the include paths that +# are normally passed to the compiler using the -I flag. + +STRIP_FROM_INC_PATH = + +# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter +# (but less readable) file names. This can be useful if your file system +# doesn't support long names like on DOS, Mac, or CD-ROM. + +SHORT_NAMES = NO + +# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen +# will interpret the first line (until the first dot) of a JavaDoc-style +# comment as the brief description. If set to NO, the JavaDoc +# comments will behave just like regular Qt-style comments +# (thus requiring an explicit @brief command for a brief description.) + +JAVADOC_AUTOBRIEF = NO + +# If the QT_AUTOBRIEF tag is set to YES then Doxygen will +# interpret the first line (until the first dot) of a Qt-style +# comment as the brief description. If set to NO, the comments +# will behave just like regular Qt-style comments (thus requiring +# an explicit \brief command for a brief description.) + +QT_AUTOBRIEF = NO + +# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen +# treat a multi-line C++ special comment block (i.e. a block of //! or /// +# comments) as a brief description. This used to be the default behaviour. +# The new default is to treat a multi-line C++ comment block as a detailed +# description. Set this tag to YES if you prefer the old behaviour instead. + +MULTILINE_CPP_IS_BRIEF = NO + +# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented +# member inherits the documentation from any documented member that it +# re-implements. + +INHERIT_DOCS = YES + +# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce +# a new page for each member. If set to NO, the documentation of a member will +# be part of the file/class/namespace that contains it. + +SEPARATE_MEMBER_PAGES = NO + +# The TAB_SIZE tag can be used to set the number of spaces in a tab. +# Doxygen uses this value to replace tabs by spaces in code fragments. + +TAB_SIZE = 8 + +# This tag can be used to specify a number of aliases that acts +# as commands in the documentation. An alias has the form "name=value". +# For example adding "sideeffect=\par Side Effects:\n" will allow you to +# put the command \sideeffect (or @sideeffect) in the documentation, which +# will result in a user-defined paragraph with heading "Side Effects:". +# You can put \n's in the value part of an alias to insert newlines. + +ALIASES = + +# This tag can be used to specify a number of word-keyword mappings (TCL only). +# A mapping has the form "name=value". For example adding +# "class=itcl::class" will allow you to use the command class in the +# itcl::class meaning. + +TCL_SUBST = + +# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C +# sources only. Doxygen will then generate output that is more tailored for C. +# For instance, some of the names that are used will be different. The list +# of all members will be omitted, etc. + +OPTIMIZE_OUTPUT_FOR_C = NO + +# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java +# sources only. Doxygen will then generate output that is more tailored for +# Java. For instance, namespaces will be presented as packages, qualified +# scopes will look different, etc. + +OPTIMIZE_OUTPUT_JAVA = NO + +# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran +# sources only. Doxygen will then generate output that is more tailored for +# Fortran. + +OPTIMIZE_FOR_FORTRAN = NO + +# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL +# sources. Doxygen will then generate output that is tailored for +# VHDL. + +OPTIMIZE_OUTPUT_VHDL = NO + +# Doxygen selects the parser to use depending on the extension of the files it +# parses. With this tag you can assign which parser to use for a given extension. +# Doxygen has a built-in mapping, but you can override or extend it using this +# tag. The format is ext=language, where ext is a file extension, and language +# is one of the parsers supported by doxygen: IDL, Java, Javascript, CSharp, C, +# C++, D, PHP, Objective-C, Python, Fortran, VHDL, C, C++. For instance to make +# doxygen treat .inc files as Fortran files (default is PHP), and .f files as C +# (default is Fortran), use: inc=Fortran f=C. Note that for custom extensions +# you also need to set FILE_PATTERNS otherwise the files are not read by doxygen. + +EXTENSION_MAPPING = + +# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want +# to include (a tag file for) the STL sources as input, then you should +# set this tag to YES in order to let doxygen match functions declarations and +# definitions whose arguments contain STL classes (e.g. func(std::string); v.s. +# func(std::string) {}). This also makes the inheritance and collaboration +# diagrams that involve STL classes more complete and accurate. + +BUILTIN_STL_SUPPORT = NO + +# If you use Microsoft's C++/CLI language, you should set this option to YES to +# enable parsing support. + +CPP_CLI_SUPPORT = NO + +# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only. +# Doxygen will parse them like normal C++ but will assume all classes use public +# instead of private inheritance when no explicit protection keyword is present. + +SIP_SUPPORT = NO + +# For Microsoft's IDL there are propget and propput attributes to indicate getter +# and setter methods for a property. Setting this option to YES (the default) +# will make doxygen replace the get and set methods by a property in the +# documentation. This will only work if the methods are indeed getting or +# setting a simple type. If this is not the case, or you want to show the +# methods anyway, you should set this option to NO. + +IDL_PROPERTY_SUPPORT = YES + +# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC +# tag is set to YES, then doxygen will reuse the documentation of the first +# member in the group (if any) for the other members of the group. By default +# all members of a group must be documented explicitly. + +DISTRIBUTE_GROUP_DOC = NO + +# Set the SUBGROUPING tag to YES (the default) to allow class member groups of +# the same type (for instance a group of public functions) to be put as a +# subgroup of that type (e.g. under the Public Functions section). Set it to +# NO to prevent subgrouping. Alternatively, this can be done per class using +# the \nosubgrouping command. + +SUBGROUPING = YES + +# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and +# unions are shown inside the group in which they are included (e.g. using +# @ingroup) instead of on a separate page (for HTML and Man pages) or +# section (for LaTeX and RTF). + +INLINE_GROUPED_CLASSES = NO + +# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and +# unions with only public data fields will be shown inline in the documentation +# of the scope in which they are defined (i.e. file, namespace, or group +# documentation), provided this scope is documented. If set to NO (the default), +# structs, classes, and unions are shown on a separate page (for HTML and Man +# pages) or section (for LaTeX and RTF). + +INLINE_SIMPLE_STRUCTS = NO + +# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum +# is documented as struct, union, or enum with the name of the typedef. So +# typedef struct TypeS {} TypeT, will appear in the documentation as a struct +# with name TypeT. When disabled the typedef will appear as a member of a file, +# namespace, or class. And the struct will be named TypeS. This can typically +# be useful for C code in case the coding convention dictates that all compound +# types are typedef'ed and only the typedef is referenced, never the tag name. + +TYPEDEF_HIDES_STRUCT = NO + +# Similar to the SYMBOL_CACHE_SIZE the size of the symbol lookup cache can be +# set using LOOKUP_CACHE_SIZE. This cache is used to resolve symbols given +# their name and scope. Since this can be an expensive process and often the +# same symbol appear multiple times in the code, doxygen keeps a cache of +# pre-resolved symbols. If the cache is too small doxygen will become slower. +# If the cache is too large, memory is wasted. The cache size is given by this +# formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range is 0..9, the default is 0, +# corresponding to a cache size of 2^16 = 65536 symbols. + +LOOKUP_CACHE_SIZE = 0 + +#--------------------------------------------------------------------------- +# Build related configuration options +#--------------------------------------------------------------------------- + +# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in +# documentation are documented, even if no documentation was available. +# Private class members and static file members will be hidden unless +# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES + +EXTRACT_ALL = NO + +# If the EXTRACT_PRIVATE tag is set to YES all private members of a class +# will be included in the documentation. + +EXTRACT_PRIVATE = NO + +# If the EXTRACT_STATIC tag is set to YES all static members of a file +# will be included in the documentation. + +EXTRACT_STATIC = NO + +# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) +# defined locally in source files will be included in the documentation. +# If set to NO only classes defined in header files are included. + +EXTRACT_LOCAL_CLASSES = YES + +# This flag is only useful for Objective-C code. When set to YES local +# methods, which are defined in the implementation section but not in +# the interface are included in the documentation. +# If set to NO (the default) only methods in the interface are included. + +EXTRACT_LOCAL_METHODS = NO + +# If this flag is set to YES, the members of anonymous namespaces will be +# extracted and appear in the documentation as a namespace called +# 'anonymous_namespace{file}', where file will be replaced with the base +# name of the file that contains the anonymous namespace. By default +# anonymous namespaces are hidden. + +EXTRACT_ANON_NSPACES = NO + +# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all +# undocumented members of documented classes, files or namespaces. +# If set to NO (the default) these members will be included in the +# various overviews, but no documentation section is generated. +# This option has no effect if EXTRACT_ALL is enabled. + +HIDE_UNDOC_MEMBERS = NO + +# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all +# undocumented classes that are normally visible in the class hierarchy. +# If set to NO (the default) these classes will be included in the various +# overviews. This option has no effect if EXTRACT_ALL is enabled. + +HIDE_UNDOC_CLASSES = NO + +# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all +# friend (class|struct|union) declarations. +# If set to NO (the default) these declarations will be included in the +# documentation. + +HIDE_FRIEND_COMPOUNDS = NO + +# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any +# documentation blocks found inside the body of a function. +# If set to NO (the default) these blocks will be appended to the +# function's detailed documentation block. + +HIDE_IN_BODY_DOCS = NO + +# The INTERNAL_DOCS tag determines if documentation +# that is typed after a \internal command is included. If the tag is set +# to NO (the default) then the documentation will be excluded. +# Set it to YES to include the internal documentation. + +INTERNAL_DOCS = NO + +# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate +# file names in lower-case letters. If set to YES upper-case letters are also +# allowed. This is useful if you have classes or files whose names only differ +# in case and if your file system supports case sensitive file names. Windows +# and Mac users are advised to set this option to NO. + +CASE_SENSE_NAMES = YES + +# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen +# will show members with their full class and namespace scopes in the +# documentation. If set to YES the scope will be hidden. + +HIDE_SCOPE_NAMES = NO + +# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen +# will put a list of the files that are included by a file in the documentation +# of that file. + +SHOW_INCLUDE_FILES = YES + +# If the FORCE_LOCAL_INCLUDES tag is set to YES then Doxygen +# will list include files with double quotes in the documentation +# rather than with sharp brackets. + +FORCE_LOCAL_INCLUDES = NO + +# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] +# is inserted in the documentation for inline members. + +INLINE_INFO = YES + +# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen +# will sort the (detailed) documentation of file and class members +# alphabetically by member name. If set to NO the members will appear in +# declaration order. + +SORT_MEMBER_DOCS = YES + +# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the +# brief documentation of file, namespace and class members alphabetically +# by member name. If set to NO (the default) the members will appear in +# declaration order. + +SORT_BRIEF_DOCS = NO + +# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen +# will sort the (brief and detailed) documentation of class members so that +# constructors and destructors are listed first. If set to NO (the default) +# the constructors will appear in the respective orders defined by +# SORT_MEMBER_DOCS and SORT_BRIEF_DOCS. +# This tag will be ignored for brief docs if SORT_BRIEF_DOCS is set to NO +# and ignored for detailed docs if SORT_MEMBER_DOCS is set to NO. + +SORT_MEMBERS_CTORS_1ST = NO + +# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the +# hierarchy of group names into alphabetical order. If set to NO (the default) +# the group names will appear in their defined order. + +SORT_GROUP_NAMES = NO + +# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be +# sorted by fully-qualified names, including namespaces. If set to +# NO (the default), the class list will be sorted only by class name, +# not including the namespace part. +# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. +# Note: This option applies only to the class list, not to the +# alphabetical list. + +SORT_BY_SCOPE_NAME = NO + +# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to +# do proper type resolution of all parameters of a function it will reject a +# match between the prototype and the implementation of a member function even +# if there is only one candidate or it is obvious which candidate to choose +# by doing a simple string match. By disabling STRICT_PROTO_MATCHING doxygen +# will still accept a match between prototype and implementation in such cases. + +STRICT_PROTO_MATCHING = NO + +# The GENERATE_TODOLIST tag can be used to enable (YES) or +# disable (NO) the todo list. This list is created by putting \todo +# commands in the documentation. + +GENERATE_TODOLIST = YES + +# The GENERATE_TESTLIST tag can be used to enable (YES) or +# disable (NO) the test list. This list is created by putting \test +# commands in the documentation. + +GENERATE_TESTLIST = YES + +# The GENERATE_BUGLIST tag can be used to enable (YES) or +# disable (NO) the bug list. This list is created by putting \bug +# commands in the documentation. + +GENERATE_BUGLIST = YES + +# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or +# disable (NO) the deprecated list. This list is created by putting +# \deprecated commands in the documentation. + +GENERATE_DEPRECATEDLIST= YES + +# The ENABLED_SECTIONS tag can be used to enable conditional +# documentation sections, marked by \if sectionname ... \endif. + +ENABLED_SECTIONS = + +# The MAX_INITIALIZER_LINES tag determines the maximum number of lines +# the initial value of a variable or macro consists of for it to appear in +# the documentation. If the initializer consists of more lines than specified +# here it will be hidden. Use a value of 0 to hide initializers completely. +# The appearance of the initializer of individual variables and macros in the +# documentation can be controlled using \showinitializer or \hideinitializer +# command in the documentation regardless of this setting. + +MAX_INITIALIZER_LINES = 30 + +# Set the SHOW_USED_FILES tag to NO to disable the list of files generated +# at the bottom of the documentation of classes and structs. If set to YES the +# list will mention the files that were used to generate the documentation. + +SHOW_USED_FILES = YES + +# Set the SHOW_FILES tag to NO to disable the generation of the Files page. +# This will remove the Files entry from the Quick Index and from the +# Folder Tree View (if specified). The default is YES. + +SHOW_FILES = YES + +# Set the SHOW_NAMESPACES tag to NO to disable the generation of the +# Namespaces page. +# This will remove the Namespaces entry from the Quick Index +# and from the Folder Tree View (if specified). The default is YES. + +SHOW_NAMESPACES = YES + +# The FILE_VERSION_FILTER tag can be used to specify a program or script that +# doxygen should invoke to get the current version for each file (typically from +# the version control system). Doxygen will invoke the program by executing (via +# popen()) the command , where is the value of +# the FILE_VERSION_FILTER tag, and is the name of an input file +# provided by doxygen. Whatever the program writes to standard output +# is used as the file version. See the manual for examples. + +FILE_VERSION_FILTER = + +# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed +# by doxygen. The layout file controls the global structure of the generated +# output files in an output format independent way. The create the layout file +# that represents doxygen's defaults, run doxygen with the -l option. +# You can optionally specify a file name after the option, if omitted +# DoxygenLayout.xml will be used as the name of the layout file. + +LAYOUT_FILE = + +# The CITE_BIB_FILES tag can be used to specify one or more bib files +# containing the references data. This must be a list of .bib files. The +# .bib extension is automatically appended if omitted. Using this command +# requires the bibtex tool to be installed. See also +# http://en.wikipedia.org/wiki/BibTeX for more info. For LaTeX the style +# of the bibliography can be controlled using LATEX_BIB_STYLE. To use this +# feature you need bibtex and perl available in the search path. + +CITE_BIB_FILES = + +#--------------------------------------------------------------------------- +# configuration options related to warning and progress messages +#--------------------------------------------------------------------------- + +# The QUIET tag can be used to turn on/off the messages that are generated +# by doxygen. Possible values are YES and NO. If left blank NO is used. + +QUIET = NO + +# The WARNINGS tag can be used to turn on/off the warning messages that are +# generated by doxygen. Possible values are YES and NO. If left blank +# NO is used. + +WARNINGS = YES + +# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings +# for undocumented members. If EXTRACT_ALL is set to YES then this flag will +# automatically be disabled. + +WARN_IF_UNDOCUMENTED = YES + +# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for +# potential errors in the documentation, such as not documenting some +# parameters in a documented function, or documenting parameters that +# don't exist or using markup commands wrongly. + +WARN_IF_DOC_ERROR = YES + +# The WARN_NO_PARAMDOC option can be enabled to get warnings for +# functions that are documented, but have no documentation for their parameters +# or return value. If set to NO (the default) doxygen will only warn about +# wrong or incomplete parameter documentation, but not about the absence of +# documentation. + +WARN_NO_PARAMDOC = NO + +# The WARN_FORMAT tag determines the format of the warning messages that +# doxygen can produce. The string should contain the $file, $line, and $text +# tags, which will be replaced by the file and line number from which the +# warning originated and the warning text. Optionally the format may contain +# $version, which will be replaced by the version of the file (if it could +# be obtained via FILE_VERSION_FILTER) + +WARN_FORMAT = "$file:$line: $text" + +# The WARN_LOGFILE tag can be used to specify a file to which warning +# and error messages should be written. If left blank the output is written +# to stderr. + +WARN_LOGFILE = + +#--------------------------------------------------------------------------- +# configuration options related to the input files +#--------------------------------------------------------------------------- + +# The INPUT tag can be used to specify the files and/or directories that contain +# documented source files. You may enter file names like "myfile.cpp" or +# directories like "/usr/src/myproject". Separate the files or directories +# with spaces. + +INPUT = @CMAKE_CURRENT_SOURCE_DIR@/include + +# This tag can be used to specify the character encoding of the source files +# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is +# also the default input encoding. Doxygen uses libiconv (or the iconv built +# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for +# the list of possible encodings. + +INPUT_ENCODING = UTF-8 + +# If the value of the INPUT tag contains directories, you can use the +# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp +# and *.h) to filter out the source-files in the directories. If left +# blank the following patterns are tested: +# *.c *.cc *.cxx *.cpp *.c++ *.d *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh +# *.hxx *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.dox *.py +# *.f90 *.f *.for *.vhd *.vhdl + +FILE_PATTERNS = *.hpp + +# The RECURSIVE tag can be used to turn specify whether or not subdirectories +# should be searched for input files as well. Possible values are YES and NO. +# If left blank NO is used. + +RECURSIVE = YES + +# The EXCLUDE tag can be used to specify files and/or directories that should be +# excluded from the INPUT source files. This way you can easily exclude a +# subdirectory from a directory tree whose root is specified with the INPUT tag. +# Note that relative paths are relative to the directory from which doxygen is +# run. + +EXCLUDE = @CMAKE_CURRENT_SOURCE_DIR@/include/network/uri/detail + +# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or +# directories that are symbolic links (a Unix file system feature) are excluded +# from the input. + +EXCLUDE_SYMLINKS = NO + +# If the value of the INPUT tag contains directories, you can use the +# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude +# certain files from those directories. Note that the wildcards are matched +# against the file with absolute path, so to exclude all test directories +# for example use the pattern */test/* + +EXCLUDE_PATTERNS = *-inl.hpp + +# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names +# (namespaces, classes, functions, etc.) that should be excluded from the +# output. The symbol name can be a fully qualified name, a word, or if the +# wildcard * is used, a substring. Examples: ANamespace, AClass, +# AClass::ANamespace, ANamespace::*Test + +EXCLUDE_SYMBOLS = + +# The EXAMPLE_PATH tag can be used to specify one or more files or +# directories that contain example code fragments that are included (see +# the \include command). + +EXAMPLE_PATH = + +# If the value of the EXAMPLE_PATH tag contains directories, you can use the +# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp +# and *.h) to filter out the source-files in the directories. If left +# blank all files are included. + +EXAMPLE_PATTERNS = + +# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be +# searched for input files to be used with the \include or \dontinclude +# commands irrespective of the value of the RECURSIVE tag. +# Possible values are YES and NO. If left blank NO is used. + +EXAMPLE_RECURSIVE = NO + +# The IMAGE_PATH tag can be used to specify one or more files or +# directories that contain image that are included in the documentation (see +# the \image command). + +IMAGE_PATH = + +# The INPUT_FILTER tag can be used to specify a program that doxygen should +# invoke to filter for each input file. Doxygen will invoke the filter program +# by executing (via popen()) the command , where +# is the value of the INPUT_FILTER tag, and is the name of an +# input file. Doxygen will then use the output that the filter program writes +# to standard output. +# If FILTER_PATTERNS is specified, this tag will be +# ignored. + +INPUT_FILTER = + +# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern +# basis. +# Doxygen will compare the file name with each pattern and apply the +# filter if there is a match. +# The filters are a list of the form: +# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further +# info on how filters are used. If FILTER_PATTERNS is empty or if +# non of the patterns match the file name, INPUT_FILTER is applied. + +FILTER_PATTERNS = + +# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using +# INPUT_FILTER) will be used to filter the input files when producing source +# files to browse (i.e. when SOURCE_BROWSER is set to YES). + +FILTER_SOURCE_FILES = NO + +# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file +# pattern. A pattern will override the setting for FILTER_PATTERN (if any) +# and it is also possible to disable source filtering for a specific pattern +# using *.ext= (so without naming a filter). This option only has effect when +# FILTER_SOURCE_FILES is enabled. + +FILTER_SOURCE_PATTERNS = + +#--------------------------------------------------------------------------- +# configuration options related to source browsing +#--------------------------------------------------------------------------- + +# If the SOURCE_BROWSER tag is set to YES then a list of source files will +# be generated. Documented entities will be cross-referenced with these sources. +# Note: To get rid of all source code in the generated output, make sure also +# VERBATIM_HEADERS is set to NO. + +SOURCE_BROWSER = NO + +# Setting the INLINE_SOURCES tag to YES will include the body +# of functions and classes directly in the documentation. + +INLINE_SOURCES = NO + +# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct +# doxygen to hide any special comment blocks from generated source code +# fragments. Normal C and C++ comments will always remain visible. + +STRIP_CODE_COMMENTS = YES + +# If the REFERENCED_BY_RELATION tag is set to YES +# then for each documented function all documented +# functions referencing it will be listed. + +REFERENCED_BY_RELATION = NO + +# If the REFERENCES_RELATION tag is set to YES +# then for each documented function all documented entities +# called/used by that function will be listed. + +REFERENCES_RELATION = NO + +# If the REFERENCES_LINK_SOURCE tag is set to YES (the default) +# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from +# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will +# link to the source code. +# Otherwise they will link to the documentation. + +REFERENCES_LINK_SOURCE = YES + +# If the USE_HTAGS tag is set to YES then the references to source code +# will point to the HTML generated by the htags(1) tool instead of doxygen +# built-in source browser. The htags tool is part of GNU's global source +# tagging system (see http://www.gnu.org/software/global/global.html). You +# will need version 4.8.6 or higher. + +USE_HTAGS = NO + +# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen +# will generate a verbatim copy of the header file for each class for +# which an include is specified. Set to NO to disable this. + +VERBATIM_HEADERS = YES + +#--------------------------------------------------------------------------- +# configuration options related to the alphabetical class index +#--------------------------------------------------------------------------- + +# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index +# of all compounds will be generated. Enable this if the project +# contains a lot of classes, structs, unions or interfaces. + +ALPHABETICAL_INDEX = YES + +# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then +# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns +# in which this list will be split (can be a number in the range [1..20]) + +COLS_IN_ALPHA_INDEX = 5 + +# In case all classes in a project start with a common prefix, all +# classes will be put under the same header in the alphabetical index. +# The IGNORE_PREFIX tag can be used to specify one or more prefixes that +# should be ignored while generating the index headers. + +IGNORE_PREFIX = @CMAKE_CURRENT_SOURCE_DIR@/uri/src/ + +#--------------------------------------------------------------------------- +# configuration options related to the HTML output +#--------------------------------------------------------------------------- + +# If the GENERATE_HTML tag is set to YES (the default) Doxygen will +# generate HTML output. + +GENERATE_HTML = YES + +# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `html' will be used as the default path. + +HTML_OUTPUT = html + +# The HTML_FILE_EXTENSION tag can be used to specify the file extension for +# each generated HTML page (for example: .htm,.php,.asp). If it is left blank +# doxygen will generate files with .html extension. + +HTML_FILE_EXTENSION = .html + +# The HTML_HEADER tag can be used to specify a personal HTML header for +# each generated HTML page. If it is left blank doxygen will generate a +# standard header. Note that when using a custom header you are responsible +# for the proper inclusion of any scripts and style sheets that doxygen +# needs, which is dependent on the configuration options used. +# It is advised to generate a default header using "doxygen -w html +# header.html footer.html stylesheet.css YourConfigFile" and then modify +# that header. Note that the header is subject to change so you typically +# have to redo this when upgrading to a newer version of doxygen or when +# changing the value of configuration settings such as GENERATE_TREEVIEW! + +HTML_HEADER = + +# The HTML_FOOTER tag can be used to specify a personal HTML footer for +# each generated HTML page. If it is left blank doxygen will generate a +# standard footer. + +HTML_FOOTER = + +# The HTML_STYLESHEET tag can be used to specify a user-defined cascading +# style sheet that is used by each HTML page. It can be used to +# fine-tune the look of the HTML output. If the tag is left blank doxygen +# will generate a default style sheet. Note that doxygen will try to copy +# the style sheet file to the HTML output directory, so don't put your own +# style sheet in the HTML output directory as well, or it will be erased! + +HTML_STYLESHEET = + +# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or +# other source files which should be copied to the HTML output directory. Note +# that these files will be copied to the base HTML output directory. Use the +# $relpath$ marker in the HTML_HEADER and/or HTML_FOOTER files to load these +# files. In the HTML_STYLESHEET file, use the file name only. Also note that +# the files will be copied as-is; there are no commands or markers available. + +HTML_EXTRA_FILES = + +# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. +# Doxygen will adjust the colors in the style sheet and background images +# according to this color. Hue is specified as an angle on a colorwheel, +# see http://en.wikipedia.org/wiki/Hue for more information. +# For instance the value 0 represents red, 60 is yellow, 120 is green, +# 180 is cyan, 240 is blue, 300 purple, and 360 is red again. +# The allowed range is 0 to 359. + +HTML_COLORSTYLE_HUE = 220 + +# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of +# the colors in the HTML output. For a value of 0 the output will use +# grayscales only. A value of 255 will produce the most vivid colors. + +HTML_COLORSTYLE_SAT = 100 + +# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to +# the luminance component of the colors in the HTML output. Values below +# 100 gradually make the output lighter, whereas values above 100 make +# the output darker. The value divided by 100 is the actual gamma applied, +# so 80 represents a gamma of 0.8, The value 220 represents a gamma of 2.2, +# and 100 does not change the gamma. + +HTML_COLORSTYLE_GAMMA = 80 + +# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML +# page will contain the date and time when the page was generated. Setting +# this to NO can help when comparing the output of multiple runs. + +HTML_TIMESTAMP = YES + +# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML +# documentation will contain sections that can be hidden and shown after the +# page has loaded. For this to work a browser that supports +# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox +# Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari). + +HTML_DYNAMIC_SECTIONS = NO + +# If the GENERATE_DOCSET tag is set to YES, additional index files +# will be generated that can be used as input for Apple's Xcode 3 +# integrated development environment, introduced with OSX 10.5 (Leopard). +# To create a documentation set, doxygen will generate a Makefile in the +# HTML output directory. Running make will produce the docset in that +# directory and running "make install" will install the docset in +# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find +# it at startup. +# See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html +# for more information. + +GENERATE_DOCSET = NO + +# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the +# feed. A documentation feed provides an umbrella under which multiple +# documentation sets from a single provider (such as a company or product suite) +# can be grouped. + +DOCSET_FEEDNAME = "Doxygen generated docs" + +# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that +# should uniquely identify the documentation set bundle. This should be a +# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen +# will append .docset to the name. + +DOCSET_BUNDLE_ID = org.doxygen.Project + +# When GENERATE_PUBLISHER_ID tag specifies a string that should uniquely identify +# the documentation publisher. This should be a reverse domain-name style +# string, e.g. com.mycompany.MyDocSet.documentation. + +DOCSET_PUBLISHER_ID = org.doxygen.Publisher + +# The GENERATE_PUBLISHER_NAME tag identifies the documentation publisher. + +DOCSET_PUBLISHER_NAME = Publisher + +# If the GENERATE_HTMLHELP tag is set to YES, additional index files +# will be generated that can be used as input for tools like the +# Microsoft HTML help workshop to generate a compiled HTML help file (.chm) +# of the generated HTML documentation. + +GENERATE_HTMLHELP = NO + +# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can +# be used to specify the file name of the resulting .chm file. You +# can add a path in front of the file if the result should not be +# written to the html output directory. + +CHM_FILE = + +# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can +# be used to specify the location (absolute path including file name) of +# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run +# the HTML help compiler on the generated index.hhp. + +HHC_LOCATION = + +# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag +# controls if a separate .chi index file is generated (YES) or that +# it should be included in the master .chm file (NO). + +GENERATE_CHI = NO + +# If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING +# is used to encode HtmlHelp index (hhk), content (hhc) and project file +# content. + +CHM_INDEX_ENCODING = + +# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag +# controls whether a binary table of contents is generated (YES) or a +# normal table of contents (NO) in the .chm file. + +BINARY_TOC = NO + +# The TOC_EXPAND flag can be set to YES to add extra items for group members +# to the contents of the HTML help documentation and to the tree view. + +TOC_EXPAND = NO + +# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and +# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated +# that can be used as input for Qt's qhelpgenerator to generate a +# Qt Compressed Help (.qch) of the generated HTML documentation. + +GENERATE_QHP = NO + +# If the QHG_LOCATION tag is specified, the QCH_FILE tag can +# be used to specify the file name of the resulting .qch file. +# The path specified is relative to the HTML output folder. + +QCH_FILE = + +# The QHP_NAMESPACE tag specifies the namespace to use when generating +# Qt Help Project output. For more information please see +# http://doc.trolltech.com/qthelpproject.html#namespace + +QHP_NAMESPACE = org.doxygen.Project + +# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating +# Qt Help Project output. For more information please see +# http://doc.trolltech.com/qthelpproject.html#virtual-folders + +QHP_VIRTUAL_FOLDER = doc + +# If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to +# add. For more information please see +# http://doc.trolltech.com/qthelpproject.html#custom-filters + +QHP_CUST_FILTER_NAME = + +# The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the +# custom filter to add. For more information please see +# +# Qt Help Project / Custom Filters. + +QHP_CUST_FILTER_ATTRS = + +# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this +# project's +# filter section matches. +# +# Qt Help Project / Filter Attributes. + +QHP_SECT_FILTER_ATTRS = + +# If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can +# be used to specify the location of Qt's qhelpgenerator. +# If non-empty doxygen will try to run qhelpgenerator on the generated +# .qhp file. + +QHG_LOCATION = + +# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files +# will be generated, which together with the HTML files, form an Eclipse help +# plugin. To install this plugin and make it available under the help contents +# menu in Eclipse, the contents of the directory containing the HTML and XML +# files needs to be copied into the plugins directory of eclipse. The name of +# the directory within the plugins directory should be the same as +# the ECLIPSE_DOC_ID value. After copying Eclipse needs to be restarted before +# the help appears. + +GENERATE_ECLIPSEHELP = NO + +# A unique identifier for the eclipse help plugin. When installing the plugin +# the directory name containing the HTML and XML files should also have +# this name. + +ECLIPSE_DOC_ID = org.doxygen.Project + +# The DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) +# at top of each HTML page. The value NO (the default) enables the index and +# the value YES disables it. Since the tabs have the same information as the +# navigation tree you can set this option to NO if you already set +# GENERATE_TREEVIEW to YES. + +DISABLE_INDEX = NO + +# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index +# structure should be generated to display hierarchical information. +# If the tag value is set to YES, a side panel will be generated +# containing a tree-like index structure (just like the one that +# is generated for HTML Help). For this to work a browser that supports +# JavaScript, DHTML, CSS and frames is required (i.e. any modern browser). +# Windows users are probably better off using the HTML help feature. +# Since the tree basically has the same information as the tab index you +# could consider to set DISABLE_INDEX to NO when enabling this option. + +GENERATE_TREEVIEW = NO + +# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values +# (range [0,1..20]) that doxygen will group on one line in the generated HTML +# documentation. Note that a value of 0 will completely suppress the enum +# values from appearing in the overview section. + +ENUM_VALUES_PER_LINE = 4 + +# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be +# used to set the initial width (in pixels) of the frame in which the tree +# is shown. + +TREEVIEW_WIDTH = 250 + +# When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open +# links to external symbols imported via tag files in a separate window. + +EXT_LINKS_IN_WINDOW = NO + +# Use this tag to change the font size of Latex formulas included +# as images in the HTML documentation. The default is 10. Note that +# when you change the font size after a successful doxygen run you need +# to manually remove any form_*.png images from the HTML output directory +# to force them to be regenerated. + +FORMULA_FONTSIZE = 10 + +# Use the FORMULA_TRANPARENT tag to determine whether or not the images +# generated for formulas are transparent PNGs. Transparent PNGs are +# not supported properly for IE 6.0, but are supported on all modern browsers. +# Note that when changing this option you need to delete any form_*.png files +# in the HTML output before the changes have effect. + +FORMULA_TRANSPARENT = YES + +# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax +# (see http://www.mathjax.org) which uses client side Javascript for the +# rendering instead of using prerendered bitmaps. Use this if you do not +# have LaTeX installed or if you want to formulas look prettier in the HTML +# output. When enabled you also need to install MathJax separately and +# configure the path to it using the MATHJAX_RELPATH option. + +USE_MATHJAX = NO + +# When MathJax is enabled you need to specify the location relative to the +# HTML output directory using the MATHJAX_RELPATH option. The destination +# directory should contain the MathJax.js script. For instance, if the mathjax +# directory is located at the same level as the HTML output directory, then +# MATHJAX_RELPATH should be ../mathjax. The default value points to the +# mathjax.org site, so you can quickly see the result without installing +# MathJax, but it is strongly recommended to install a local copy of MathJax +# before deployment. + +MATHJAX_RELPATH = http://www.mathjax.org/mathjax + +# The MATHJAX_EXTENSIONS tag can be used to specify one or MathJax extension +# names that should be enabled during MathJax rendering. + +MATHJAX_EXTENSIONS = + +# When the SEARCHENGINE tag is enabled doxygen will generate a search box +# for the HTML output. The underlying search engine uses javascript +# and DHTML and should work on any modern browser. Note that when using +# HTML help (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets +# (GENERATE_DOCSET) there is already a search function so this one should +# typically be disabled. For large projects the javascript based search engine +# can be slow, then enabling SERVER_BASED_SEARCH may provide a better solution. + +SEARCHENGINE = YES + +# When the SERVER_BASED_SEARCH tag is enabled the search engine will be +# implemented using a PHP enabled web server instead of at the web client +# using Javascript. Doxygen will generate the search PHP script and index +# file to put on the web server. The advantage of the server +# based approach is that it scales better to large projects and allows +# full text search. The disadvantages are that it is more difficult to setup +# and does not have live searching capabilities. + +SERVER_BASED_SEARCH = NO + +#--------------------------------------------------------------------------- +# configuration options related to the LaTeX output +#--------------------------------------------------------------------------- + +# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will +# generate Latex output. + +GENERATE_LATEX = NO + +# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `latex' will be used as the default path. + +LATEX_OUTPUT = latex + +# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be +# invoked. If left blank `latex' will be used as the default command name. +# Note that when enabling USE_PDFLATEX this option is only used for +# generating bitmaps for formulas in the HTML output, but not in the +# Makefile that is written to the output directory. + +LATEX_CMD_NAME = latex + +# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to +# generate index for LaTeX. If left blank `makeindex' will be used as the +# default command name. + +MAKEINDEX_CMD_NAME = makeindex + +# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact +# LaTeX documents. This may be useful for small projects and may help to +# save some trees in general. + +COMPACT_LATEX = NO + +# The PAPER_TYPE tag can be used to set the paper type that is used +# by the printer. Possible values are: a4, letter, legal and +# executive. If left blank a4wide will be used. + +PAPER_TYPE = a4 + +# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX +# packages that should be included in the LaTeX output. + +EXTRA_PACKAGES = + +# The LATEX_HEADER tag can be used to specify a personal LaTeX header for +# the generated latex document. The header should contain everything until +# the first chapter. If it is left blank doxygen will generate a +# standard header. Notice: only use this tag if you know what you are doing! + +LATEX_HEADER = + +# The LATEX_FOOTER tag can be used to specify a personal LaTeX footer for +# the generated latex document. The footer should contain everything after +# the last chapter. If it is left blank doxygen will generate a +# standard footer. Notice: only use this tag if you know what you are doing! + +LATEX_FOOTER = + +# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated +# is prepared for conversion to pdf (using ps2pdf). The pdf file will +# contain links (just like the HTML output) instead of page references +# This makes the output suitable for online browsing using a pdf viewer. + +PDF_HYPERLINKS = YES + +# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of +# plain latex in the generated Makefile. Set this option to YES to get a +# higher quality PDF documentation. + +USE_PDFLATEX = YES + +# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. +# command to the generated LaTeX files. This will instruct LaTeX to keep +# running if errors occur, instead of asking the user for help. +# This option is also used when generating formulas in HTML. + +LATEX_BATCHMODE = NO + +# If LATEX_HIDE_INDICES is set to YES then doxygen will not +# include the index chapters (such as File Index, Compound Index, etc.) +# in the output. + +LATEX_HIDE_INDICES = NO + +# If LATEX_SOURCE_CODE is set to YES then doxygen will include +# source code with syntax highlighting in the LaTeX output. +# Note that which sources are shown also depends on other settings +# such as SOURCE_BROWSER. + +LATEX_SOURCE_CODE = NO + +# The LATEX_BIB_STYLE tag can be used to specify the style to use for the +# bibliography, e.g. plainnat, or ieeetr. The default style is "plain". See +# http://en.wikipedia.org/wiki/BibTeX for more info. + +LATEX_BIB_STYLE = plain + +#--------------------------------------------------------------------------- +# configuration options related to the RTF output +#--------------------------------------------------------------------------- + +# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output +# The RTF output is optimized for Word 97 and may not look very pretty with +# other RTF readers or editors. + +GENERATE_RTF = NO + +# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `rtf' will be used as the default path. + +RTF_OUTPUT = rtf + +# If the COMPACT_RTF tag is set to YES Doxygen generates more compact +# RTF documents. This may be useful for small projects and may help to +# save some trees in general. + +COMPACT_RTF = NO + +# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated +# will contain hyperlink fields. The RTF file will +# contain links (just like the HTML output) instead of page references. +# This makes the output suitable for online browsing using WORD or other +# programs which support those fields. +# Note: wordpad (write) and others do not support links. + +RTF_HYPERLINKS = NO + +# Load style sheet definitions from file. Syntax is similar to doxygen's +# config file, i.e. a series of assignments. You only have to provide +# replacements, missing definitions are set to their default value. + +RTF_STYLESHEET_FILE = + +# Set optional variables used in the generation of an rtf document. +# Syntax is similar to doxygen's config file. + +RTF_EXTENSIONS_FILE = + +#--------------------------------------------------------------------------- +# configuration options related to the man page output +#--------------------------------------------------------------------------- + +# If the GENERATE_MAN tag is set to YES (the default) Doxygen will +# generate man pages + +GENERATE_MAN = NO + +# The MAN_OUTPUT tag is used to specify where the man pages will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `man' will be used as the default path. + +MAN_OUTPUT = man + +# The MAN_EXTENSION tag determines the extension that is added to +# the generated man pages (default is the subroutine's section .3) + +MAN_EXTENSION = .3 + +# If the MAN_LINKS tag is set to YES and Doxygen generates man output, +# then it will generate one additional man file for each entity +# documented in the real man page(s). These additional files +# only source the real man page, but without them the man command +# would be unable to find the correct page. The default is NO. + +MAN_LINKS = NO + +#--------------------------------------------------------------------------- +# configuration options related to the XML output +#--------------------------------------------------------------------------- + +# If the GENERATE_XML tag is set to YES Doxygen will +# generate an XML file that captures the structure of +# the code including all documentation. + +GENERATE_XML = NO + +# The XML_OUTPUT tag is used to specify where the XML pages will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `xml' will be used as the default path. + +XML_OUTPUT = xml + +# The XML_SCHEMA tag can be used to specify an XML schema, +# which can be used by a validating XML parser to check the +# syntax of the XML files. + +XML_SCHEMA = + +# If the XML_PROGRAMLISTING tag is set to YES Doxygen will +# dump the program listings (including syntax highlighting +# and cross-referencing information) to the XML output. Note that +# enabling this will significantly increase the size of the XML output. + +XML_PROGRAMLISTING = YES + +#--------------------------------------------------------------------------- +# configuration options for the AutoGen Definitions output +#--------------------------------------------------------------------------- + +# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will +# generate an AutoGen Definitions (see autogen.sf.net) file +# that captures the structure of the code including all +# documentation. Note that this feature is still experimental +# and incomplete at the moment. + +GENERATE_AUTOGEN_DEF = NO + +#--------------------------------------------------------------------------- +# configuration options related to the Perl module output +#--------------------------------------------------------------------------- + +# If the GENERATE_PERLMOD tag is set to YES Doxygen will +# generate a Perl module file that captures the structure of +# the code including all documentation. Note that this +# feature is still experimental and incomplete at the +# moment. + +GENERATE_PERLMOD = NO + +# If the PERLMOD_LATEX tag is set to YES Doxygen will generate +# the necessary Makefile rules, Perl scripts and LaTeX code to be able +# to generate PDF and DVI output from the Perl module output. + +PERLMOD_LATEX = NO + +# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be +# nicely formatted so it can be parsed by a human reader. +# This is useful +# if you want to understand what is going on. +# On the other hand, if this +# tag is set to NO the size of the Perl module output will be much smaller +# and Perl will parse it just the same. + +PERLMOD_PRETTY = YES + +# The names of the make variables in the generated doxyrules.make file +# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. +# This is useful so different doxyrules.make files included by the same +# Makefile don't overwrite each other's variables. + +PERLMOD_MAKEVAR_PREFIX = + +#--------------------------------------------------------------------------- +# Configuration options related to the preprocessor +#--------------------------------------------------------------------------- + +# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will +# evaluate all C-preprocessor directives found in the sources and include +# files. + +ENABLE_PREPROCESSING = YES + +# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro +# names in the source code. If set to NO (the default) only conditional +# compilation will be performed. Macro expansion can be done in a controlled +# way by setting EXPAND_ONLY_PREDEF to YES. + +MACRO_EXPANSION = NO + +# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES +# then the macro expansion is limited to the macros specified with the +# PREDEFINED and EXPAND_AS_DEFINED tags. + +EXPAND_ONLY_PREDEF = NO + +# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files +# pointed to by INCLUDE_PATH will be searched when a #include is found. + +SEARCH_INCLUDES = YES + +# The INCLUDE_PATH tag can be used to specify one or more directories that +# contain include files that are not input files but should be processed by +# the preprocessor. + +INCLUDE_PATH = + +# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard +# patterns (like *.h and *.hpp) to filter out the header-files in the +# directories. If left blank, the patterns specified with FILE_PATTERNS will +# be used. + +INCLUDE_FILE_PATTERNS = + +# The PREDEFINED tag can be used to specify one or more macro names that +# are defined before the preprocessor is started (similar to the -D option of +# gcc). The argument of the tag is a list of macros of the form: name +# or name=definition (no spaces). If the definition and the = are +# omitted =1 is assumed. To prevent a macro definition from being +# undefined via #undef or recursively expanded use the := operator +# instead of the = operator. + +PREDEFINED = DOXYGEN_SHOULD_SKIP_THIS + +# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then +# this tag can be used to specify a list of macro names that should be expanded. +# The macro definition that is found in the sources will be used. +# Use the PREDEFINED tag if you want to use a different macro definition that +# overrules the definition found in the source code. + +EXPAND_AS_DEFINED = + +# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then +# doxygen's preprocessor will remove all references to function-like macros +# that are alone on a line, have an all uppercase name, and do not end with a +# semicolon, because these will confuse the parser if not removed. + +SKIP_FUNCTION_MACROS = YES + +#--------------------------------------------------------------------------- +# Configuration::additions related to external references +#--------------------------------------------------------------------------- + +# The TAGFILES option can be used to specify one or more tagfiles. +# Optionally an initial location of the external documentation +# can be added for each tagfile. The format of a tag file without +# this location is as follows: +# +# TAGFILES = file1 file2 ... +# Adding location for the tag files is done as follows: +# +# TAGFILES = file1=loc1 "file2 = loc2" ... +# where "loc1" and "loc2" can be relative or absolute paths or +# URLs. If a location is present for each tag, the installdox tool +# does not have to be run to correct the links. +# Note that each tag file must have a unique name +# (where the name does NOT include the path) +# If a tag file is not located in the directory in which doxygen +# is run, you must also specify the path to the tagfile here. + +TAGFILES = + +# When a file name is specified after GENERATE_TAGFILE, doxygen will create +# a tag file that is based on the input files it reads. + +GENERATE_TAGFILE = + +# If the ALLEXTERNALS tag is set to YES all external classes will be listed +# in the class index. If set to NO only the inherited external classes +# will be listed. + +ALLEXTERNALS = NO + +# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed +# in the modules index. If set to NO, only the current project's groups will +# be listed. + +EXTERNAL_GROUPS = YES + +# The PERL_PATH should be the absolute path and name of the perl script +# interpreter (i.e. the result of `which perl'). + +PERL_PATH = /usr/bin/perl + +#--------------------------------------------------------------------------- +# Configuration options related to the dot tool +#--------------------------------------------------------------------------- + +# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will +# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base +# or super classes. Setting the tag to NO turns the diagrams off. Note that +# this option also works with HAVE_DOT disabled, but it is recommended to +# install and use dot, since it yields more powerful graphs. + +CLASS_DIAGRAMS = YES + +# You can define message sequence charts within doxygen comments using the \msc +# command. Doxygen will then run the mscgen tool (see +# http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the +# documentation. The MSCGEN_PATH tag allows you to specify the directory where +# the mscgen tool resides. If left empty the tool is assumed to be found in the +# default search path. + +MSCGEN_PATH = + +# If set to YES, the inheritance and collaboration graphs will hide +# inheritance and usage relations if the target is undocumented +# or is not a class. + +HIDE_UNDOC_RELATIONS = YES + +# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is +# available from the path. This tool is part of Graphviz, a graph visualization +# toolkit from AT&T and Lucent Bell Labs. The other options in this section +# have no effect if this option is set to NO (the default) + +HAVE_DOT = NO + +# The DOT_NUM_THREADS specifies the number of dot invocations doxygen is +# allowed to run in parallel. When set to 0 (the default) doxygen will +# base this on the number of processors available in the system. You can set it +# explicitly to a value larger than 0 to get control over the balance +# between CPU load and processing speed. + +DOT_NUM_THREADS = 0 + +# By default doxygen will use the Helvetica font for all dot files that +# doxygen generates. When you want a differently looking font you can specify +# the font name using DOT_FONTNAME. You need to make sure dot is able to find +# the font, which can be done by putting it in a standard location or by setting +# the DOTFONTPATH environment variable or by setting DOT_FONTPATH to the +# directory containing the font. + +DOT_FONTNAME = Helvetica + +# The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs. +# The default size is 10pt. + +DOT_FONTSIZE = 10 + +# By default doxygen will tell dot to use the Helvetica font. +# If you specify a different font using DOT_FONTNAME you can use DOT_FONTPATH to +# set the path where dot can find it. + +DOT_FONTPATH = + +# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for each documented class showing the direct and +# indirect inheritance relations. Setting this tag to YES will force the +# CLASS_DIAGRAMS tag to NO. + +CLASS_GRAPH = YES + +# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for each documented class showing the direct and +# indirect implementation dependencies (inheritance, containment, and +# class references variables) of the class with other documented classes. + +COLLABORATION_GRAPH = YES + +# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for groups, showing the direct groups dependencies + +GROUP_GRAPHS = YES + +# If the UML_LOOK tag is set to YES doxygen will generate inheritance and +# collaboration diagrams in a style similar to the OMG's Unified Modeling +# Language. + +UML_LOOK = NO + +# If set to YES, the inheritance and collaboration graphs will show the +# relations between templates and their instances. + +TEMPLATE_RELATIONS = NO + +# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT +# tags are set to YES then doxygen will generate a graph for each documented +# file showing the direct and indirect include dependencies of the file with +# other documented files. + +INCLUDE_GRAPH = YES + +# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and +# HAVE_DOT tags are set to YES then doxygen will generate a graph for each +# documented header file showing the documented files that directly or +# indirectly include this file. + +INCLUDED_BY_GRAPH = YES + +# If the CALL_GRAPH and HAVE_DOT options are set to YES then +# doxygen will generate a call dependency graph for every global function +# or class method. Note that enabling this option will significantly increase +# the time of a run. So in most cases it will be better to enable call graphs +# for selected functions only using the \callgraph command. + +CALL_GRAPH = NO + +# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then +# doxygen will generate a caller dependency graph for every global function +# or class method. Note that enabling this option will significantly increase +# the time of a run. So in most cases it will be better to enable caller +# graphs for selected functions only using the \callergraph command. + +CALLER_GRAPH = NO + +# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen +# will generate a graphical hierarchy of all classes instead of a textual one. + +GRAPHICAL_HIERARCHY = YES + +# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES +# then doxygen will show the dependencies a directory has on other directories +# in a graphical way. The dependency relations are determined by the #include +# relations between the files in the directories. + +DIRECTORY_GRAPH = YES + +# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images +# generated by dot. Possible values are svg, png, jpg, or gif. +# If left blank png will be used. If you choose svg you need to set +# HTML_FILE_EXTENSION to xhtml in order to make the SVG files +# visible in IE 9+ (other browsers do not have this requirement). + +DOT_IMAGE_FORMAT = png + +# If DOT_IMAGE_FORMAT is set to svg, then this option can be set to YES to +# enable generation of interactive SVG images that allow zooming and panning. +# Note that this requires a modern browser other than Internet Explorer. +# Tested and working are Firefox, Chrome, Safari, and Opera. For IE 9+ you +# need to set HTML_FILE_EXTENSION to xhtml in order to make the SVG files +# visible. Older versions of IE do not have SVG support. + +INTERACTIVE_SVG = NO + +# The tag DOT_PATH can be used to specify the path where the dot tool can be +# found. If left blank, it is assumed the dot tool can be found in the path. + +DOT_PATH = + +# The DOTFILE_DIRS tag can be used to specify one or more directories that +# contain dot files that are included in the documentation (see the +# \dotfile command). + +DOTFILE_DIRS = + +# The MSCFILE_DIRS tag can be used to specify one or more directories that +# contain msc files that are included in the documentation (see the +# \mscfile command). + +MSCFILE_DIRS = + +# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of +# nodes that will be shown in the graph. If the number of nodes in a graph +# becomes larger than this value, doxygen will truncate the graph, which is +# visualized by representing a node as a red box. Note that doxygen if the +# number of direct children of the root node in a graph is already larger than +# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note +# that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH. + +DOT_GRAPH_MAX_NODES = 50 + +# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the +# graphs generated by dot. A depth value of 3 means that only nodes reachable +# from the root by following a path via at most 3 edges will be shown. Nodes +# that lay further from the root node will be omitted. Note that setting this +# option to 1 or 2 may greatly reduce the computation time needed for large +# code bases. Also note that the size of a graph can be further restricted by +# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction. + +MAX_DOT_GRAPH_DEPTH = 0 + +# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent +# background. This is disabled by default, because dot on Windows does not +# seem to support this out of the box. Warning: Depending on the platform used, +# enabling this option may lead to badly anti-aliased labels on the edges of +# a graph (i.e. they become hard to read). + +DOT_TRANSPARENT = NO + +# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output +# files in one run (i.e. multiple -o and -T options on the command line). This +# makes dot run faster, but since only newer versions of dot (>1.8.10) +# support this, this feature is disabled by default. + +DOT_MULTI_TARGETS = YES + +# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will +# generate a legend page explaining the meaning of the various boxes and +# arrows in the dot generated graphs. + +GENERATE_LEGEND = YES + +# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will +# remove the intermediate dot files that are used to generate +# the various graphs. + +DOT_CLEANUP = YES diff --git a/graphics/asymptote/LspCpp/third_party/uri/LICENSE_1_0.txt b/graphics/asymptote/LspCpp/third_party/uri/LICENSE_1_0.txt new file mode 100644 index 0000000000..36b7cd93cd --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/uri/LICENSE_1_0.txt @@ -0,0 +1,23 @@ +Boost Software License - Version 1.0 - August 17th, 2003 + +Permission is hereby granted, free of charge, to any person or organization +obtaining a copy of the software and accompanying documentation covered by +this license (the "Software") to use, reproduce, display, distribute, +execute, and transmit the Software, and to prepare derivative works of the +Software, and to permit third-parties to whom the Software is furnished to +do so, all subject to the following: + +The copyright notices in the Software and this entire statement, including +the above license grant, this restriction and the following disclaimer, +must be included in all copies of the Software, in whole or in part, and +all derivative works of the Software, unless such copies or derivative +works are solely in the form of machine-executable object code generated by +a source language processor. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT +SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE +FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. diff --git a/graphics/asymptote/LspCpp/third_party/uri/Makefile b/graphics/asymptote/LspCpp/third_party/uri/Makefile new file mode 100644 index 0000000000..c06e594c28 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/uri/Makefile @@ -0,0 +1,207 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 3.20 + +# 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: + +# Disable VCS-based implicit rules. +% : %,v + +# Disable VCS-based implicit rules. +% : RCS/% + +# Disable VCS-based implicit rules. +% : RCS/%,v + +# Disable VCS-based implicit rules. +% : SCCS/s.% + +# Disable VCS-based implicit rules. +% : s.% + +.SUFFIXES: .hpux_make_needs_suffix_list + +# Produce verbose output by default. +VERBOSE = 1 + +# Command-line flag to silence nested $(MAKE). +$(VERBOSE)MAKESILENT = -s + +#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 rm -f + +# Escaping for special characters. +EQUALS = = + +# The top-level source directory on which CMake was run. +CMAKE_SOURCE_DIR = /usr/local/src/asymptote-2.78/LspCpp + +# The top-level build directory on which CMake was run. +CMAKE_BINARY_DIR = /usr/local/src/asymptote-2.78/LspCpp + +#============================================================================= +# Targets provided globally by CMake. + +# Special rule for the target install/strip +install/strip: preinstall + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing the project stripped..." + /usr/bin/cmake -DCMAKE_INSTALL_DO_STRIP=1 -P cmake_install.cmake +.PHONY : install/strip + +# Special rule for the target install/strip +install/strip/fast: preinstall/fast + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing the project stripped..." + /usr/bin/cmake -DCMAKE_INSTALL_DO_STRIP=1 -P cmake_install.cmake +.PHONY : install/strip/fast + +# Special rule for the target install/local +install/local: preinstall + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing only the local directory..." + /usr/bin/cmake -DCMAKE_INSTALL_LOCAL_ONLY=1 -P cmake_install.cmake +.PHONY : install/local + +# Special rule for the target install/local +install/local/fast: preinstall/fast + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing only the local directory..." + /usr/bin/cmake -DCMAKE_INSTALL_LOCAL_ONLY=1 -P cmake_install.cmake +.PHONY : install/local/fast + +# Special rule for the target install +install: preinstall + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Install the project..." + /usr/bin/cmake -P cmake_install.cmake +.PHONY : install + +# Special rule for the target install +install/fast: preinstall/fast + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Install the project..." + /usr/bin/cmake -P cmake_install.cmake +.PHONY : install/fast + +# Special rule for the target list_install_components +list_install_components: + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Available install components are: \"Unspecified\"" +.PHONY : list_install_components + +# Special rule for the target list_install_components +list_install_components/fast: list_install_components +.PHONY : list_install_components/fast + +# 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 --regenerate-during-build -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 "Running CMake cache editor..." + /usr/bin/ccmake -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) +.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 /usr/local/src/asymptote-2.78/LspCpp && $(CMAKE_COMMAND) -E cmake_progress_start /usr/local/src/asymptote-2.78/LspCpp/CMakeFiles /usr/local/src/asymptote-2.78/LspCpp/third_party/uri//CMakeFiles/progress.marks + cd /usr/local/src/asymptote-2.78/LspCpp && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 third_party/uri/all + $(CMAKE_COMMAND) -E cmake_progress_start /usr/local/src/asymptote-2.78/LspCpp/CMakeFiles 0 +.PHONY : all + +# The main clean target +clean: + cd /usr/local/src/asymptote-2.78/LspCpp && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 third_party/uri/clean +.PHONY : clean + +# The main clean target +clean/fast: clean +.PHONY : clean/fast + +# Prepare targets for installation. +preinstall: all + cd /usr/local/src/asymptote-2.78/LspCpp && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 third_party/uri/preinstall +.PHONY : preinstall + +# Prepare targets for installation. +preinstall/fast: + cd /usr/local/src/asymptote-2.78/LspCpp && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 third_party/uri/preinstall +.PHONY : preinstall/fast + +# clear depends +depend: + cd /usr/local/src/asymptote-2.78/LspCpp && $(CMAKE_COMMAND) -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1 +.PHONY : depend + +# Convenience name for target. +third_party/uri/CMakeFiles/doc.dir/rule: + cd /usr/local/src/asymptote-2.78/LspCpp && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 third_party/uri/CMakeFiles/doc.dir/rule +.PHONY : third_party/uri/CMakeFiles/doc.dir/rule + +# Convenience name for target. +doc: third_party/uri/CMakeFiles/doc.dir/rule +.PHONY : doc + +# fast build rule for target. +doc/fast: + cd /usr/local/src/asymptote-2.78/LspCpp && $(MAKE) $(MAKESILENT) -f third_party/uri/CMakeFiles/doc.dir/build.make third_party/uri/CMakeFiles/doc.dir/build +.PHONY : doc/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 "... edit_cache" + @echo "... install" + @echo "... install/local" + @echo "... install/strip" + @echo "... list_install_components" + @echo "... rebuild_cache" + @echo "... doc" +.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 /usr/local/src/asymptote-2.78/LspCpp && $(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/graphics/asymptote/LspCpp/third_party/uri/README.rst b/graphics/asymptote/LspCpp/third_party/uri/README.rst new file mode 100644 index 0000000000..4a70f7386a --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/uri/README.rst @@ -0,0 +1,82 @@ +.. :Authors: Glyn Matthews +.. :Date: Jan 01, 2013 +.. :Description: Source code for the cpp-netlib URI class. + +################### +Deprecation warning +################### + +This library is still missing some features (including full Unicode +support), and does not work on some of the newest compiler versions. +Therefore, please prefer to use the +`WhatWG URL implementation`_ that +is intended to supersede this library. + +.. _`WhatWG URL implementation`: https://github.com/cpp-netlib/url + +################ + C++ Network URI +################ + +.. image:: https://travis-ci.org/cpp-netlib/uri.png?branch=master + :target: https://travis-ci.org/cpp-netlib/uri + +.. image:: https://ci.appveyor.com/api/projects/status/rjt0nbbtdhsjdjv4?svg=true + :target: https://ci.appveyor.com/project/glynos/uri-6fkuc + +.. image:: https://img.shields.io/badge/license-boost-blue.svg + :target: https://github.com/cpp-netlib/uri/blob/master/LICENSE_1_0.txt + +This project contains the source code that was originally meant to +track the proposal for a C++ URI at +http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n3975.html + +This package provides: + + * A ``network::uri`` class that implements a generic URI parser, + compatible with `RFC 3986`_ and `RFC 3987`_ + * Accessors to the underlying URI parts + * A range-compatible interface + * Methods to normalize and compare URIs + * Percent encoding and decoding functions + * A URI builder to build consistent URIs from parts, including + case, percent encoding and path normalization + +.. _`RFC 3986`: http://tools.ietf.org/html/rfc3986 +.. _`RFC 3987`: http://tools.ietf.org/html/rfc3987 + +Building the project +==================== + +Building with ``CMake`` +----------------------- + +:: + + $ mkdir _build + $ cd _build + $ cmake .. + $ make -j4 + +Running the tests with ``CTest`` +-------------------------------- + +:: + + $ ctest + +License +======= + +This library is released under the Boost Software License (please see +http://boost.org/LICENSE_1_0.txt or the accompanying LICENSE_1_0.txt +file for the full text. + +Contact +======= + +Any questions about this library can be addressed to the cpp-netlib +`developers mailing list`_. Issues can be filed using Github at +http://github.com/cpp-netlib/uri/issues. + +.. _`developers mailing list`: cpp-netlib@googlegroups.com diff --git a/graphics/asymptote/LspCpp/third_party/uri/cmake_install.cmake b/graphics/asymptote/LspCpp/third_party/uri/cmake_install.cmake new file mode 100644 index 0000000000..1292b920aa --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/uri/cmake_install.cmake @@ -0,0 +1,54 @@ +# Install script for directory: /usr/local/src/asymptote-2.78/LspCpp/third_party/uri + +# 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 "RelWithDebInfo") + 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 "0") +endif() + +# Is this installation the result of a crosscompile? +if(NOT DEFINED CMAKE_CROSSCOMPILING) + set(CMAKE_CROSSCOMPILING "FALSE") +endif() + +# Set default install directory permissions. +if(NOT DEFINED CMAKE_OBJDUMP) + set(CMAKE_OBJDUMP "/bin/objdump") +endif() + +if("x${CMAKE_INSTALL_COMPONENT}x" STREQUAL "xUnspecifiedx" OR NOT CMAKE_INSTALL_COMPONENT) + file(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/." TYPE DIRECTORY FILES "/usr/local/src/asymptote-2.78/LspCpp/third_party/uri/include") +endif() + +if(NOT CMAKE_INSTALL_LOCAL_ONLY) + # Include the install script for each subdirectory. + include("/usr/local/src/asymptote-2.78/LspCpp/third_party/uri/src/cmake_install.cmake") + +endif() + diff --git a/graphics/asymptote/LspCpp/third_party/uri/deps/BUILD.bazel b/graphics/asymptote/LspCpp/third_party/uri/deps/BUILD.bazel new file mode 100644 index 0000000000..1df5ff5f99 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/uri/deps/BUILD.bazel @@ -0,0 +1,207 @@ +# Copyright 2017 Google Inc. +# All Rights Reserved. +# +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# +# Bazel Build for Google C++ Testing Framework(Google Test) + +package(default_visibility = ["//visibility:public"]) + +licenses(["notice"]) + +exports_files(["LICENSE"]) + +config_setting( + name = "qnx", + constraint_values = ["@platforms//os:qnx"], +) + +config_setting( + name = "windows", + constraint_values = ["@platforms//os:windows"], +) + +config_setting( + name = "freebsd", + constraint_values = ["@platforms//os:freebsd"], +) + +config_setting( + name = "openbsd", + constraint_values = ["@platforms//os:openbsd"], +) + +config_setting( + name = "msvc_compiler", + flag_values = { + "@bazel_tools//tools/cpp:compiler": "msvc-cl", + }, + visibility = [":__subpackages__"], +) + +config_setting( + name = "has_absl", + values = {"define": "absl=1"}, +) + +# Library that defines the FRIEND_TEST macro. +cc_library( + name = "gtest_prod", + hdrs = ["googletest/include/gtest/gtest_prod.h"], + includes = ["googletest/include"], +) + +# Google Test including Google Mock +cc_library( + name = "gtest", + srcs = glob( + include = [ + "googletest/src/*.cc", + "googletest/src/*.h", + "googletest/include/gtest/**/*.h", + "googlemock/src/*.cc", + "googlemock/include/gmock/**/*.h", + ], + exclude = [ + "googletest/src/gtest-all.cc", + "googletest/src/gtest_main.cc", + "googlemock/src/gmock-all.cc", + "googlemock/src/gmock_main.cc", + ], + ), + hdrs = glob([ + "googletest/include/gtest/*.h", + "googlemock/include/gmock/*.h", + ]), + copts = select({ + ":qnx": [], + ":windows": [], + "//conditions:default": ["-pthread"], + }), + defines = select({ + ":has_absl": ["GTEST_HAS_ABSL=1"], + "//conditions:default": [], + }), + features = select({ + ":windows": ["windows_export_all_symbols"], + "//conditions:default": [], + }), + includes = [ + "googlemock", + "googlemock/include", + "googletest", + "googletest/include", + ], + linkopts = select({ + ":qnx": ["-lregex"], + ":windows": [], + ":freebsd": ["-lm", "-pthread"], + ":openbsd": ["-lm", "-pthread"], + "//conditions:default": ["-pthread"], + }), + deps = select({ + ":has_absl": [ + "@com_google_absl//absl/debugging:failure_signal_handler", + "@com_google_absl//absl/debugging:stacktrace", + "@com_google_absl//absl/debugging:symbolize", + "@com_google_absl//absl/strings", + "@com_google_absl//absl/types:any", + "@com_google_absl//absl/types:optional", + "@com_google_absl//absl/types:variant", + ], + "//conditions:default": [], + }), +) + +cc_library( + name = "gtest_main", + srcs = ["googlemock/src/gmock_main.cc"], + features = select({ + ":windows": ["windows_export_all_symbols"], + "//conditions:default": [], + }), + deps = [":gtest"], +) + +# The following rules build samples of how to use gTest. +cc_library( + name = "gtest_sample_lib", + srcs = [ + "googletest/samples/sample1.cc", + "googletest/samples/sample2.cc", + "googletest/samples/sample4.cc", + ], + hdrs = [ + "googletest/samples/prime_tables.h", + "googletest/samples/sample1.h", + "googletest/samples/sample2.h", + "googletest/samples/sample3-inl.h", + "googletest/samples/sample4.h", + ], + features = select({ + ":windows": ["windows_export_all_symbols"], + "//conditions:default": [], + }), +) + +cc_test( + name = "gtest_samples", + size = "small", + # All Samples except: + # sample9 (main) + # sample10 (main and takes a command line option and needs to be separate) + srcs = [ + "googletest/samples/sample1_unittest.cc", + "googletest/samples/sample2_unittest.cc", + "googletest/samples/sample3_unittest.cc", + "googletest/samples/sample4_unittest.cc", + "googletest/samples/sample5_unittest.cc", + "googletest/samples/sample6_unittest.cc", + "googletest/samples/sample7_unittest.cc", + "googletest/samples/sample8_unittest.cc", + ], + linkstatic = 0, + deps = [ + "gtest_sample_lib", + ":gtest_main", + ], +) + +cc_test( + name = "sample9_unittest", + size = "small", + srcs = ["googletest/samples/sample9_unittest.cc"], + deps = [":gtest"], +) + +cc_test( + name = "sample10_unittest", + size = "small", + srcs = ["googletest/samples/sample10_unittest.cc"], + deps = [":gtest"], +) diff --git a/graphics/asymptote/LspCpp/third_party/uri/deps/CMakeLists.txt b/graphics/asymptote/LspCpp/third_party/uri/deps/CMakeLists.txt new file mode 100644 index 0000000000..7d2eb81028 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/uri/deps/CMakeLists.txt @@ -0,0 +1,30 @@ +# Note: CMake support is community-based. The maintainers do not use CMake +# internally. + +cmake_minimum_required(VERSION 3.5) + +if (POLICY CMP0048) + cmake_policy(SET CMP0048 NEW) +endif (POLICY CMP0048) + +project(googletest-distribution) +set(GOOGLETEST_VERSION 1.11.0) + +if(NOT CYGWIN AND NOT MSYS AND NOT ${CMAKE_SYSTEM_NAME} STREQUAL QNX) + set(CMAKE_CXX_EXTENSIONS OFF) +endif() + +enable_testing() + +include(CMakeDependentOption) +include(GNUInstallDirs) + +#Note that googlemock target already builds googletest +option(BUILD_GMOCK "Builds the googlemock subproject" ON) +option(INSTALL_GTEST "Enable installation of googletest. (Projects embedding googletest may want to turn this OFF.)" ON) + +if(BUILD_GMOCK) + add_subdirectory( googlemock ) +else() + add_subdirectory( googletest ) +endif() diff --git a/graphics/asymptote/LspCpp/third_party/uri/deps/CONTRIBUTING.md b/graphics/asymptote/LspCpp/third_party/uri/deps/CONTRIBUTING.md new file mode 100644 index 0000000000..5bdead5389 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/uri/deps/CONTRIBUTING.md @@ -0,0 +1,131 @@ +# How to become a contributor and submit your own code + +## Contributor License Agreements + +We'd love to accept your patches! Before we can take them, we have to jump a +couple of legal hurdles. + +Please fill out either the individual or corporate Contributor License Agreement +(CLA). + +* If you are an individual writing original source code and you're sure you + own the intellectual property, then you'll need to sign an + [individual CLA](https://developers.google.com/open-source/cla/individual). +* If you work for a company that wants to allow you to contribute your work, + then you'll need to sign a + [corporate CLA](https://developers.google.com/open-source/cla/corporate). + +Follow either of the two links above to access the appropriate CLA and +instructions for how to sign and return it. Once we receive it, we'll be able to +accept your pull requests. + +## Are you a Googler? + +If you are a Googler, please make an attempt to submit an internal change rather +than a GitHub Pull Request. If you are not able to submit an internal change a +PR is acceptable as an alternative. + +## Contributing A Patch + +1. Submit an issue describing your proposed change to the + [issue tracker](https://github.com/google/googletest/issues). +2. Please don't mix more than one logical change per submittal, because it + makes the history hard to follow. If you want to make a change that doesn't + have a corresponding issue in the issue tracker, please create one. +3. Also, coordinate with team members that are listed on the issue in question. + This ensures that work isn't being duplicated and communicating your plan + early also generally leads to better patches. +4. If your proposed change is accepted, and you haven't already done so, sign a + Contributor License Agreement + ([see details above](#contributor-license-agreements)). +5. Fork the desired repo, develop and test your code changes. +6. Ensure that your code adheres to the existing style in the sample to which + you are contributing. +7. Ensure that your code has an appropriate set of unit tests which all pass. +8. Submit a pull request. + +## The Google Test and Google Mock Communities + +The Google Test community exists primarily through the +[discussion group](http://groups.google.com/group/googletestframework) and the +GitHub repository. Likewise, the Google Mock community exists primarily through +their own [discussion group](http://groups.google.com/group/googlemock). You are +definitely encouraged to contribute to the discussion and you can also help us +to keep the effectiveness of the group high by following and promoting the +guidelines listed here. + +### Please Be Friendly + +Showing courtesy and respect to others is a vital part of the Google culture, +and we strongly encourage everyone participating in Google Test development to +join us in accepting nothing less. Of course, being courteous is not the same as +failing to constructively disagree with each other, but it does mean that we +should be respectful of each other when enumerating the 42 technical reasons +that a particular proposal may not be the best choice. There's never a reason to +be antagonistic or dismissive toward anyone who is sincerely trying to +contribute to a discussion. + +Sure, C++ testing is serious business and all that, but it's also a lot of fun. +Let's keep it that way. Let's strive to be one of the friendliest communities in +all of open source. + +As always, discuss Google Test in the official GoogleTest discussion group. You +don't have to actually submit code in order to sign up. Your participation +itself is a valuable contribution. + +## Style + +To keep the source consistent, readable, diffable and easy to merge, we use a +fairly rigid coding style, as defined by the +[google-styleguide](https://github.com/google/styleguide) project. All patches +will be expected to conform to the style outlined +[here](https://google.github.io/styleguide/cppguide.html). Use +[.clang-format](https://github.com/google/googletest/blob/master/.clang-format) +to check your formatting. + +## Requirements for Contributors + +If you plan to contribute a patch, you need to build Google Test, Google Mock, +and their own tests from a git checkout, which has further requirements: + +* [Python](https://www.python.org/) v2.3 or newer (for running some of the + tests and re-generating certain source files from templates) +* [CMake](https://cmake.org/) v2.8.12 or newer + +## Developing Google Test and Google Mock + +This section discusses how to make your own changes to the Google Test project. + +### Testing Google Test and Google Mock Themselves + +To make sure your changes work as intended and don't break existing +functionality, you'll want to compile and run Google Test and GoogleMock's own +tests. For that you can use CMake: + + mkdir mybuild + cd mybuild + cmake -Dgtest_build_tests=ON -Dgmock_build_tests=ON ${GTEST_REPO_DIR} + +To choose between building only Google Test or Google Mock, you may modify your +cmake command to be one of each + + cmake -Dgtest_build_tests=ON ${GTEST_DIR} # sets up Google Test tests + cmake -Dgmock_build_tests=ON ${GMOCK_DIR} # sets up Google Mock tests + +Make sure you have Python installed, as some of Google Test's tests are written +in Python. If the cmake command complains about not being able to find Python +(`Could NOT find PythonInterp (missing: PYTHON_EXECUTABLE)`), try telling it +explicitly where your Python executable can be found: + + cmake -DPYTHON_EXECUTABLE=path/to/python ... + +Next, you can build Google Test and / or Google Mock and all desired tests. On +\*nix, this is usually done by + + make + +To run the tests, do + + make test + +All tests should pass. diff --git a/graphics/asymptote/LspCpp/third_party/uri/deps/CONTRIBUTORS b/graphics/asymptote/LspCpp/third_party/uri/deps/CONTRIBUTORS new file mode 100644 index 0000000000..d9bc587b1b --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/uri/deps/CONTRIBUTORS @@ -0,0 +1,64 @@ +# This file contains a list of people who've made non-trivial +# contribution to the Google C++ Testing Framework project. People +# who commit code to the project are encouraged to add their names +# here. Please keep the list sorted by first names. + +Ajay Joshi +Balázs Dán +Benoit Sigoure +Bharat Mediratta +Bogdan Piloca +Chandler Carruth +Chris Prince +Chris Taylor +Dan Egnor +Dave MacLachlan +David Anderson +Dean Sturtevant +Eric Roman +Gene Volovich +Hady Zalek +Hal Burch +Jeffrey Yasskin +Jim Keller +Joe Walnes +Jon Wray +Jói Sigurðsson +Keir Mierle +Keith Ray +Kenton Varda +Kostya Serebryany +Krystian Kuzniarek +Lev Makhlis +Manuel Klimek +Mario Tanev +Mark Paskin +Markus Heule +Martijn Vels +Matthew Simmons +Mika Raento +Mike Bland +Miklós Fazekas +Neal Norwitz +Nermin Ozkiranartli +Owen Carlsen +Paneendra Ba +Pasi Valminen +Patrick Hanna +Patrick Riley +Paul Menage +Peter Kaminski +Piotr Kaminski +Preston Jackson +Rainer Klaffenboeck +Russ Cox +Russ Rufer +Sean Mcafee +Sigurður Ásgeirsson +Sverre Sundsdal +Takeshi Yoshino +Tracy Bialik +Vadim Berman +Vlad Losev +Wolfgang Klier +Zhanyong Wan diff --git a/graphics/asymptote/LspCpp/third_party/uri/deps/LICENSE b/graphics/asymptote/LspCpp/third_party/uri/deps/LICENSE new file mode 100644 index 0000000000..1941a11f8c --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/uri/deps/LICENSE @@ -0,0 +1,28 @@ +Copyright 2008, Google Inc. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/graphics/asymptote/LspCpp/third_party/uri/deps/README.md b/graphics/asymptote/LspCpp/third_party/uri/deps/README.md new file mode 100644 index 0000000000..29e5a4ea72 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/uri/deps/README.md @@ -0,0 +1,140 @@ +# GoogleTest + +### Announcements + +#### Live at Head + +GoogleTest now follows the +[Abseil Live at Head philosophy](https://abseil.io/about/philosophy#upgrade-support). +We recommend using the latest commit in the `main` branch in your projects. + +#### Documentation Updates + +Our documentation is now live on GitHub Pages at +https://google.github.io/googletest/. We recommend browsing the documentation on +GitHub Pages rather than directly in the repository. + +#### Release 1.11.0 + +[Release 1.11.0](https://github.com/google/googletest/releases/tag/release-1.11.0) +is now available. + +#### Coming Soon + +* We are planning to take a dependency on + [Abseil](https://github.com/abseil/abseil-cpp). +* More documentation improvements are planned. + +## Welcome to **GoogleTest**, Google's C++ test framework! + +This repository is a merger of the formerly separate GoogleTest and GoogleMock +projects. These were so closely related that it makes sense to maintain and +release them together. + +### Getting Started + +See the [GoogleTest User's Guide](https://google.github.io/googletest/) for +documentation. We recommend starting with the +[GoogleTest Primer](https://google.github.io/googletest/primer.html). + +More information about building GoogleTest can be found at +[googletest/README.md](googletest/README.md). + +## Features + +* An [xUnit](https://en.wikipedia.org/wiki/XUnit) test framework. +* Test discovery. +* A rich set of assertions. +* User-defined assertions. +* Death tests. +* Fatal and non-fatal failures. +* Value-parameterized tests. +* Type-parameterized tests. +* Various options for running the tests. +* XML test report generation. + +## Supported Platforms + +GoogleTest requires a codebase and compiler compliant with the C++11 standard or +newer. + +The GoogleTest code is officially supported on the following platforms. +Operating systems or tools not listed below are community-supported. For +community-supported platforms, patches that do not complicate the code may be +considered. + +If you notice any problems on your platform, please file an issue on the +[GoogleTest GitHub Issue Tracker](https://github.com/google/googletest/issues). +Pull requests containing fixes are welcome! + +### Operating Systems + +* Linux +* macOS +* Windows + +### Compilers + +* gcc 5.0+ +* clang 5.0+ +* MSVC 2015+ + +**macOS users:** Xcode 9.3+ provides clang 5.0+. + +### Build Systems + +* [Bazel](https://bazel.build/) +* [CMake](https://cmake.org/) + +**Note:** Bazel is the build system used by the team internally and in tests. +CMake is supported on a best-effort basis and by the community. + +## Who Is Using GoogleTest? + +In addition to many internal projects at Google, GoogleTest is also used by the +following notable projects: + +* The [Chromium projects](http://www.chromium.org/) (behind the Chrome browser + and Chrome OS). +* The [LLVM](http://llvm.org/) compiler. +* [Protocol Buffers](https://github.com/google/protobuf), Google's data + interchange format. +* The [OpenCV](http://opencv.org/) computer vision library. + +## Related Open Source Projects + +[GTest Runner](https://github.com/nholthaus/gtest-runner) is a Qt5 based +automated test-runner and Graphical User Interface with powerful features for +Windows and Linux platforms. + +[GoogleTest UI](https://github.com/ospector/gtest-gbar) is a test runner that +runs your test binary, allows you to track its progress via a progress bar, and +displays a list of test failures. Clicking on one shows failure text. GoogleTest +UI is written in C#. + +[GTest TAP Listener](https://github.com/kinow/gtest-tap-listener) is an event +listener for GoogleTest that implements the +[TAP protocol](https://en.wikipedia.org/wiki/Test_Anything_Protocol) for test +result output. If your test runner understands TAP, you may find it useful. + +[gtest-parallel](https://github.com/google/gtest-parallel) is a test runner that +runs tests from your binary in parallel to provide significant speed-up. + +[GoogleTest Adapter](https://marketplace.visualstudio.com/items?itemName=DavidSchuldenfrei.gtest-adapter) +is a VS Code extension allowing to view GoogleTest in a tree view, and run/debug +your tests. + +[C++ TestMate](https://github.com/matepek/vscode-catch2-test-adapter) is a VS +Code extension allowing to view GoogleTest in a tree view, and run/debug your +tests. + +[Cornichon](https://pypi.org/project/cornichon/) is a small Gherkin DSL parser +that generates stub code for GoogleTest. + +## Contributing Changes + +Please read +[`CONTRIBUTING.md`](https://github.com/google/googletest/blob/master/CONTRIBUTING.md) +for details on how to contribute to this project. + +Happy testing! diff --git a/graphics/asymptote/LspCpp/third_party/uri/deps/WORKSPACE b/graphics/asymptote/LspCpp/third_party/uri/deps/WORKSPACE new file mode 100644 index 0000000000..7eb18eb984 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/uri/deps/WORKSPACE @@ -0,0 +1,17 @@ +workspace(name = "com_google_googletest") + +load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") + +http_archive( + name = "com_google_absl", + sha256 = "aeba534f7307e36fe084b452299e49b97420667a8d28102cf9a0daeed340b859", + strip_prefix = "abseil-cpp-7971fb358ae376e016d2d4fc9327aad95659b25e", + urls = ["https://github.com/abseil/abseil-cpp/archive/7971fb358ae376e016d2d4fc9327aad95659b25e.zip"], # 2021-05-20T02:59:16Z +) + +http_archive( + name = "rules_python", + sha256 = "98b3c592faea9636ac8444bfd9de7f3fb4c60590932d6e6ac5946e3f8dbd5ff6", + strip_prefix = "rules_python-ed6cc8f2c3692a6a7f013ff8bc185ba77eb9b4d2", + urls = ["https://github.com/bazelbuild/rules_python/archive/ed6cc8f2c3692a6a7f013ff8bc185ba77eb9b4d2.zip"], # 2021-05-17T00:24:16Z +) diff --git a/graphics/asymptote/LspCpp/third_party/uri/deps/ci/linux-presubmit.sh b/graphics/asymptote/LspCpp/third_party/uri/deps/ci/linux-presubmit.sh new file mode 100644 index 0000000000..0818ef0b9c --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/uri/deps/ci/linux-presubmit.sh @@ -0,0 +1,126 @@ +#!/bin/bash +# +# Copyright 2020, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +set -euox pipefail + +readonly LINUX_LATEST_CONTAINER="gcr.io/google.com/absl-177019/linux_hybrid-latest:20220113" +readonly LINUX_GCC_FLOOR_CONTAINER="gcr.io/google.com/absl-177019/linux_gcc-floor:20210617" + +if [[ -z ${GTEST_ROOT:-} ]]; then + GTEST_ROOT="$(realpath $(dirname ${0})/..)" +fi + +if [[ -z ${STD:-} ]]; then + STD="c++11 c++14 c++17 c++20" +fi + +# Test the CMake build +for cc in /usr/local/bin/gcc /opt/llvm/clang/bin/clang; do + for cmake_off_on in OFF ON; do + time docker run \ + --volume="${GTEST_ROOT}:/src:ro" \ + --tmpfs="/build:exec" \ + --workdir="/build" \ + --rm \ + --env="CC=${cc}" \ + --env="CXX_FLAGS=\"-Werror -Wdeprecated\"" \ + ${LINUX_LATEST_CONTAINER} \ + /bin/bash -c " + cmake /src \ + -DCMAKE_CXX_STANDARD=11 \ + -Dgtest_build_samples=ON \ + -Dgtest_build_tests=ON \ + -Dgmock_build_tests=ON \ + -Dcxx_no_exception=${cmake_off_on} \ + -Dcxx_no_rtti=${cmake_off_on} && \ + make -j$(nproc) && \ + ctest -j$(nproc) --output-on-failure" + done +done + +# Do one test with an older version of GCC +time docker run \ + --volume="${GTEST_ROOT}:/src:ro" \ + --workdir="/src" \ + --rm \ + --env="CC=/usr/local/bin/gcc" \ + ${LINUX_GCC_FLOOR_CONTAINER} \ + /usr/local/bin/bazel test ... \ + --copt="-Wall" \ + --copt="-Werror" \ + --copt="-Wno-error=pragmas" \ + --keep_going \ + --show_timestamps \ + --test_output=errors + +# Test GCC +for std in ${STD}; do + for absl in 0 1; do + time docker run \ + --volume="${GTEST_ROOT}:/src:ro" \ + --workdir="/src" \ + --rm \ + --env="CC=/usr/local/bin/gcc" \ + --env="BAZEL_CXXOPTS=-std=${std}" \ + ${LINUX_LATEST_CONTAINER} \ + /usr/local/bin/bazel test ... \ + --copt="-Wall" \ + --copt="-Werror" \ + --define="absl=${absl}" \ + --distdir="/bazel-distdir" \ + --keep_going \ + --show_timestamps \ + --test_output=errors + done +done + +# Test Clang +for std in ${STD}; do + for absl in 0 1; do + time docker run \ + --volume="${GTEST_ROOT}:/src:ro" \ + --workdir="/src" \ + --rm \ + --env="CC=/opt/llvm/clang/bin/clang" \ + --env="BAZEL_CXXOPTS=-std=${std}" \ + ${LINUX_LATEST_CONTAINER} \ + /usr/local/bin/bazel test ... \ + --copt="--gcc-toolchain=/usr/local" \ + --copt="-Wall" \ + --copt="-Werror" \ + --define="absl=${absl}" \ + --distdir="/bazel-distdir" \ + --keep_going \ + --linkopt="--gcc-toolchain=/usr/local" \ + --show_timestamps \ + --test_output=errors + done +done diff --git a/graphics/asymptote/LspCpp/third_party/uri/deps/ci/macos-presubmit.sh b/graphics/asymptote/LspCpp/third_party/uri/deps/ci/macos-presubmit.sh new file mode 100644 index 0000000000..d6423faacc --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/uri/deps/ci/macos-presubmit.sh @@ -0,0 +1,73 @@ +#!/bin/bash +# +# Copyright 2020, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +set -euox pipefail + +if [[ -z ${GTEST_ROOT:-} ]]; then + GTEST_ROOT="$(realpath $(dirname ${0})/..)" +fi + +# Test the CMake build +for cmake_off_on in OFF ON; do + BUILD_DIR=$(mktemp -d build_dir.XXXXXXXX) + cd ${BUILD_DIR} + time cmake ${GTEST_ROOT} \ + -DCMAKE_CXX_STANDARD=11 \ + -Dgtest_build_samples=ON \ + -Dgtest_build_tests=ON \ + -Dgmock_build_tests=ON \ + -Dcxx_no_exception=${cmake_off_on} \ + -Dcxx_no_rtti=${cmake_off_on} + time make + time ctest -j$(nproc) --output-on-failure +done + +# Test the Bazel build + +# If we are running on Kokoro, check for a versioned Bazel binary. +KOKORO_GFILE_BAZEL_BIN="bazel-3.7.0-darwin-x86_64" +if [[ ${KOKORO_GFILE_DIR:-} ]] && [[ -f ${KOKORO_GFILE_DIR}/${KOKORO_GFILE_BAZEL_BIN} ]]; then + BAZEL_BIN="${KOKORO_GFILE_DIR}/${KOKORO_GFILE_BAZEL_BIN}" + chmod +x ${BAZEL_BIN} +else + BAZEL_BIN="bazel" +fi + +cd ${GTEST_ROOT} +for absl in 0 1; do + ${BAZEL_BIN} test ... \ + --copt="-Wall" \ + --copt="-Werror" \ + --define="absl=${absl}" \ + --keep_going \ + --show_timestamps \ + --test_output=errors +done diff --git a/graphics/asymptote/LspCpp/third_party/uri/deps/docs/_config.yml b/graphics/asymptote/LspCpp/third_party/uri/deps/docs/_config.yml new file mode 100644 index 0000000000..d12867eab6 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/uri/deps/docs/_config.yml @@ -0,0 +1 @@ +title: GoogleTest diff --git a/graphics/asymptote/LspCpp/third_party/uri/deps/docs/_data/navigation.yml b/graphics/asymptote/LspCpp/third_party/uri/deps/docs/_data/navigation.yml new file mode 100644 index 0000000000..9f3332708e --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/uri/deps/docs/_data/navigation.yml @@ -0,0 +1,43 @@ +nav: +- section: "Get Started" + items: + - title: "Supported Platforms" + url: "/platforms.html" + - title: "Quickstart: Bazel" + url: "/quickstart-bazel.html" + - title: "Quickstart: CMake" + url: "/quickstart-cmake.html" +- section: "Guides" + items: + - title: "GoogleTest Primer" + url: "/primer.html" + - title: "Advanced Topics" + url: "/advanced.html" + - title: "Mocking for Dummies" + url: "/gmock_for_dummies.html" + - title: "Mocking Cookbook" + url: "/gmock_cook_book.html" + - title: "Mocking Cheat Sheet" + url: "/gmock_cheat_sheet.html" +- section: "References" + items: + - title: "Testing Reference" + url: "/reference/testing.html" + - title: "Mocking Reference" + url: "/reference/mocking.html" + - title: "Assertions" + url: "/reference/assertions.html" + - title: "Matchers" + url: "/reference/matchers.html" + - title: "Actions" + url: "/reference/actions.html" + - title: "Testing FAQ" + url: "/faq.html" + - title: "Mocking FAQ" + url: "/gmock_faq.html" + - title: "Code Samples" + url: "/samples.html" + - title: "Using pkg-config" + url: "/pkgconfig.html" + - title: "Community Documentation" + url: "/community_created_documentation.html" diff --git a/graphics/asymptote/LspCpp/third_party/uri/deps/docs/_layouts/default.html b/graphics/asymptote/LspCpp/third_party/uri/deps/docs/_layouts/default.html new file mode 100644 index 0000000000..dcb42d9191 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/uri/deps/docs/_layouts/default.html @@ -0,0 +1,58 @@ + + + + + + + +{% seo %} + + + + + + +
+
+ {{ content }} +
+ +
+ + + + diff --git a/graphics/asymptote/LspCpp/third_party/uri/deps/docs/_sass/main.scss b/graphics/asymptote/LspCpp/third_party/uri/deps/docs/_sass/main.scss new file mode 100644 index 0000000000..92edc877a5 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/uri/deps/docs/_sass/main.scss @@ -0,0 +1,200 @@ +// Styles for GoogleTest docs website on GitHub Pages. +// Color variables are defined in +// https://github.com/pages-themes/primer/tree/master/_sass/primer-support/lib/variables + +$sidebar-width: 260px; + +body { + display: flex; + margin: 0; +} + +.sidebar { + background: $black; + color: $text-white; + flex-shrink: 0; + height: 100vh; + overflow: auto; + position: sticky; + top: 0; + width: $sidebar-width; +} + +.sidebar h1 { + font-size: 1.5em; +} + +.sidebar h2 { + color: $gray-light; + font-size: 0.8em; + font-weight: normal; + margin-bottom: 0.8em; + padding-left: 2.5em; + text-transform: uppercase; +} + +.sidebar .header { + background: $black; + padding: 2em; + position: sticky; + top: 0; + width: 100%; +} + +.sidebar .header a { + color: $text-white; + text-decoration: none; +} + +.sidebar .nav-toggle { + display: none; +} + +.sidebar .expander { + cursor: pointer; + display: none; + height: 3em; + position: absolute; + right: 1em; + top: 1.5em; + width: 3em; +} + +.sidebar .expander .arrow { + border: solid $white; + border-width: 0 3px 3px 0; + display: block; + height: 0.7em; + margin: 1em auto; + transform: rotate(45deg); + transition: transform 0.5s; + width: 0.7em; +} + +.sidebar nav { + width: 100%; +} + +.sidebar nav ul { + list-style-type: none; + margin-bottom: 1em; + padding: 0; + + &:last-child { + margin-bottom: 2em; + } + + a { + text-decoration: none; + } + + li { + color: $text-white; + padding-left: 2em; + text-decoration: none; + } + + li.active { + background: $border-gray-darker; + font-weight: bold; + } + + li:hover { + background: $border-gray-darker; + } +} + +.main { + background-color: $bg-gray; + width: calc(100% - #{$sidebar-width}); +} + +.main .main-inner { + background-color: $white; + padding: 2em; +} + +.main .footer { + margin: 0; + padding: 2em; +} + +.main table th { + text-align: left; +} + +.main .callout { + border-left: 0.25em solid $white; + padding: 1em; + + a { + text-decoration: underline; + } + + &.important { + background-color: $bg-yellow-light; + border-color: $bg-yellow; + color: $black; + } + + &.note { + background-color: $bg-blue-light; + border-color: $text-blue; + color: $text-blue; + } + + &.tip { + background-color: $green-000; + border-color: $green-700; + color: $green-700; + } + + &.warning { + background-color: $red-000; + border-color: $text-red; + color: $text-red; + } +} + +.main .good pre { + background-color: $bg-green-light; +} + +.main .bad pre { + background-color: $red-000; +} + +@media all and (max-width: 768px) { + body { + flex-direction: column; + } + + .sidebar { + height: auto; + position: relative; + width: 100%; + } + + .sidebar .expander { + display: block; + } + + .sidebar nav { + height: 0; + overflow: hidden; + } + + .sidebar .nav-toggle:checked { + & ~ nav { + height: auto; + } + + & + .expander .arrow { + transform: rotate(-135deg); + } + } + + .main { + width: 100%; + } +} diff --git a/graphics/asymptote/LspCpp/third_party/uri/deps/docs/advanced.md b/graphics/asymptote/LspCpp/third_party/uri/deps/docs/advanced.md new file mode 100644 index 0000000000..f2f8854bf3 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/uri/deps/docs/advanced.md @@ -0,0 +1,2379 @@ +# Advanced googletest Topics + +## Introduction + +Now that you have read the [googletest Primer](primer.md) and learned how to +write tests using googletest, it's time to learn some new tricks. This document +will show you more assertions as well as how to construct complex failure +messages, propagate fatal failures, reuse and speed up your test fixtures, and +use various flags with your tests. + +## More Assertions + +This section covers some less frequently used, but still significant, +assertions. + +### Explicit Success and Failure + +See [Explicit Success and Failure](reference/assertions.md#success-failure) in +the Assertions Reference. + +### Exception Assertions + +See [Exception Assertions](reference/assertions.md#exceptions) in the Assertions +Reference. + +### Predicate Assertions for Better Error Messages + +Even though googletest has a rich set of assertions, they can never be complete, +as it's impossible (nor a good idea) to anticipate all scenarios a user might +run into. Therefore, sometimes a user has to use `EXPECT_TRUE()` to check a +complex expression, for lack of a better macro. This has the problem of not +showing you the values of the parts of the expression, making it hard to +understand what went wrong. As a workaround, some users choose to construct the +failure message by themselves, streaming it into `EXPECT_TRUE()`. However, this +is awkward especially when the expression has side-effects or is expensive to +evaluate. + +googletest gives you three different options to solve this problem: + +#### Using an Existing Boolean Function + +If you already have a function or functor that returns `bool` (or a type that +can be implicitly converted to `bool`), you can use it in a *predicate +assertion* to get the function arguments printed for free. See +[`EXPECT_PRED*`](reference/assertions.md#EXPECT_PRED) in the Assertions +Reference for details. + +#### Using a Function That Returns an AssertionResult + +While `EXPECT_PRED*()` and friends are handy for a quick job, the syntax is not +satisfactory: you have to use different macros for different arities, and it +feels more like Lisp than C++. The `::testing::AssertionResult` class solves +this problem. + +An `AssertionResult` object represents the result of an assertion (whether it's +a success or a failure, and an associated message). You can create an +`AssertionResult` using one of these factory functions: + +```c++ +namespace testing { + +// Returns an AssertionResult object to indicate that an assertion has +// succeeded. +AssertionResult AssertionSuccess(); + +// Returns an AssertionResult object to indicate that an assertion has +// failed. +AssertionResult AssertionFailure(); + +} +``` + +You can then use the `<<` operator to stream messages to the `AssertionResult` +object. + +To provide more readable messages in Boolean assertions (e.g. `EXPECT_TRUE()`), +write a predicate function that returns `AssertionResult` instead of `bool`. For +example, if you define `IsEven()` as: + +```c++ +testing::AssertionResult IsEven(int n) { + if ((n % 2) == 0) + return testing::AssertionSuccess(); + else + return testing::AssertionFailure() << n << " is odd"; +} +``` + +instead of: + +```c++ +bool IsEven(int n) { + return (n % 2) == 0; +} +``` + +the failed assertion `EXPECT_TRUE(IsEven(Fib(4)))` will print: + +```none +Value of: IsEven(Fib(4)) + Actual: false (3 is odd) +Expected: true +``` + +instead of a more opaque + +```none +Value of: IsEven(Fib(4)) + Actual: false +Expected: true +``` + +If you want informative messages in `EXPECT_FALSE` and `ASSERT_FALSE` as well +(one third of Boolean assertions in the Google code base are negative ones), and +are fine with making the predicate slower in the success case, you can supply a +success message: + +```c++ +testing::AssertionResult IsEven(int n) { + if ((n % 2) == 0) + return testing::AssertionSuccess() << n << " is even"; + else + return testing::AssertionFailure() << n << " is odd"; +} +``` + +Then the statement `EXPECT_FALSE(IsEven(Fib(6)))` will print + +```none + Value of: IsEven(Fib(6)) + Actual: true (8 is even) + Expected: false +``` + +#### Using a Predicate-Formatter + +If you find the default message generated by +[`EXPECT_PRED*`](reference/assertions.md#EXPECT_PRED) and +[`EXPECT_TRUE`](reference/assertions.md#EXPECT_TRUE) unsatisfactory, or some +arguments to your predicate do not support streaming to `ostream`, you can +instead use *predicate-formatter assertions* to *fully* customize how the +message is formatted. See +[`EXPECT_PRED_FORMAT*`](reference/assertions.md#EXPECT_PRED_FORMAT) in the +Assertions Reference for details. + +### Floating-Point Comparison + +See [Floating-Point Comparison](reference/assertions.md#floating-point) in the +Assertions Reference. + +#### Floating-Point Predicate-Format Functions + +Some floating-point operations are useful, but not that often used. In order to +avoid an explosion of new macros, we provide them as predicate-format functions +that can be used in the predicate assertion macro +[`EXPECT_PRED_FORMAT2`](reference/assertions.md#EXPECT_PRED_FORMAT), for +example: + +```c++ +using ::testing::FloatLE; +using ::testing::DoubleLE; +... +EXPECT_PRED_FORMAT2(FloatLE, val1, val2); +EXPECT_PRED_FORMAT2(DoubleLE, val1, val2); +``` + +The above code verifies that `val1` is less than, or approximately equal to, +`val2`. + +### Asserting Using gMock Matchers + +See [`EXPECT_THAT`](reference/assertions.md#EXPECT_THAT) in the Assertions +Reference. + +### More String Assertions + +(Please read the [previous](#asserting-using-gmock-matchers) section first if +you haven't.) + +You can use the gMock [string matchers](reference/matchers.md#string-matchers) +with [`EXPECT_THAT`](reference/assertions.md#EXPECT_THAT) to do more string +comparison tricks (sub-string, prefix, suffix, regular expression, and etc). For +example, + +```c++ +using ::testing::HasSubstr; +using ::testing::MatchesRegex; +... + ASSERT_THAT(foo_string, HasSubstr("needle")); + EXPECT_THAT(bar_string, MatchesRegex("\\w*\\d+")); +``` + +### Windows HRESULT assertions + +See [Windows HRESULT Assertions](reference/assertions.md#HRESULT) in the +Assertions Reference. + +### Type Assertions + +You can call the function + +```c++ +::testing::StaticAssertTypeEq(); +``` + +to assert that types `T1` and `T2` are the same. The function does nothing if +the assertion is satisfied. If the types are different, the function call will +fail to compile, the compiler error message will say that `T1 and T2 are not the +same type` and most likely (depending on the compiler) show you the actual +values of `T1` and `T2`. This is mainly useful inside template code. + +**Caveat**: When used inside a member function of a class template or a function +template, `StaticAssertTypeEq()` is effective only if the function is +instantiated. For example, given: + +```c++ +template class Foo { + public: + void Bar() { testing::StaticAssertTypeEq(); } +}; +``` + +the code: + +```c++ +void Test1() { Foo foo; } +``` + +will not generate a compiler error, as `Foo::Bar()` is never actually +instantiated. Instead, you need: + +```c++ +void Test2() { Foo foo; foo.Bar(); } +``` + +to cause a compiler error. + +### Assertion Placement + +You can use assertions in any C++ function. In particular, it doesn't have to be +a method of the test fixture class. The one constraint is that assertions that +generate a fatal failure (`FAIL*` and `ASSERT_*`) can only be used in +void-returning functions. This is a consequence of Google's not using +exceptions. By placing it in a non-void function you'll get a confusing compile +error like `"error: void value not ignored as it ought to be"` or `"cannot +initialize return object of type 'bool' with an rvalue of type 'void'"` or +`"error: no viable conversion from 'void' to 'string'"`. + +If you need to use fatal assertions in a function that returns non-void, one +option is to make the function return the value in an out parameter instead. For +example, you can rewrite `T2 Foo(T1 x)` to `void Foo(T1 x, T2* result)`. You +need to make sure that `*result` contains some sensible value even when the +function returns prematurely. As the function now returns `void`, you can use +any assertion inside of it. + +If changing the function's type is not an option, you should just use assertions +that generate non-fatal failures, such as `ADD_FAILURE*` and `EXPECT_*`. + +{: .callout .note} +NOTE: Constructors and destructors are not considered void-returning functions, +according to the C++ language specification, and so you may not use fatal +assertions in them; you'll get a compilation error if you try. Instead, either +call `abort` and crash the entire test executable, or put the fatal assertion in +a `SetUp`/`TearDown` function; see +[constructor/destructor vs. `SetUp`/`TearDown`](faq.md#CtorVsSetUp) + +{: .callout .warning} +WARNING: A fatal assertion in a helper function (private void-returning method) +called from a constructor or destructor does not terminate the current test, as +your intuition might suggest: it merely returns from the constructor or +destructor early, possibly leaving your object in a partially-constructed or +partially-destructed state! You almost certainly want to `abort` or use +`SetUp`/`TearDown` instead. + +## Skipping test execution + +Related to the assertions `SUCCEED()` and `FAIL()`, you can prevent further test +execution at runtime with the `GTEST_SKIP()` macro. This is useful when you need +to check for preconditions of the system under test during runtime and skip +tests in a meaningful way. + +`GTEST_SKIP()` can be used in individual test cases or in the `SetUp()` methods +of classes derived from either `::testing::Environment` or `::testing::Test`. +For example: + +```c++ +TEST(SkipTest, DoesSkip) { + GTEST_SKIP() << "Skipping single test"; + EXPECT_EQ(0, 1); // Won't fail; it won't be executed +} + +class SkipFixture : public ::testing::Test { + protected: + void SetUp() override { + GTEST_SKIP() << "Skipping all tests for this fixture"; + } +}; + +// Tests for SkipFixture won't be executed. +TEST_F(SkipFixture, SkipsOneTest) { + EXPECT_EQ(5, 7); // Won't fail +} +``` + +As with assertion macros, you can stream a custom message into `GTEST_SKIP()`. + +## Teaching googletest How to Print Your Values + +When a test assertion such as `EXPECT_EQ` fails, googletest prints the argument +values to help you debug. It does this using a user-extensible value printer. + +This printer knows how to print built-in C++ types, native arrays, STL +containers, and any type that supports the `<<` operator. For other types, it +prints the raw bytes in the value and hopes that you the user can figure it out. + +As mentioned earlier, the printer is *extensible*. That means you can teach it +to do a better job at printing your particular type than to dump the bytes. To +do that, define `<<` for your type: + +```c++ +#include + +namespace foo { + +class Bar { // We want googletest to be able to print instances of this. +... + // Create a free inline friend function. + friend std::ostream& operator<<(std::ostream& os, const Bar& bar) { + return os << bar.DebugString(); // whatever needed to print bar to os + } +}; + +// If you can't declare the function in the class it's important that the +// << operator is defined in the SAME namespace that defines Bar. C++'s look-up +// rules rely on that. +std::ostream& operator<<(std::ostream& os, const Bar& bar) { + return os << bar.DebugString(); // whatever needed to print bar to os +} + +} // namespace foo +``` + +Sometimes, this might not be an option: your team may consider it bad style to +have a `<<` operator for `Bar`, or `Bar` may already have a `<<` operator that +doesn't do what you want (and you cannot change it). If so, you can instead +define a `PrintTo()` function like this: + +```c++ +#include + +namespace foo { + +class Bar { + ... + friend void PrintTo(const Bar& bar, std::ostream* os) { + *os << bar.DebugString(); // whatever needed to print bar to os + } +}; + +// If you can't declare the function in the class it's important that PrintTo() +// is defined in the SAME namespace that defines Bar. C++'s look-up rules rely +// on that. +void PrintTo(const Bar& bar, std::ostream* os) { + *os << bar.DebugString(); // whatever needed to print bar to os +} + +} // namespace foo +``` + +If you have defined both `<<` and `PrintTo()`, the latter will be used when +googletest is concerned. This allows you to customize how the value appears in +googletest's output without affecting code that relies on the behavior of its +`<<` operator. + +If you want to print a value `x` using googletest's value printer yourself, just +call `::testing::PrintToString(x)`, which returns an `std::string`: + +```c++ +vector > bar_ints = GetBarIntVector(); + +EXPECT_TRUE(IsCorrectBarIntVector(bar_ints)) + << "bar_ints = " << testing::PrintToString(bar_ints); +``` + +## Death Tests + +In many applications, there are assertions that can cause application failure if +a condition is not met. These consistency checks, which ensure that the program +is in a known good state, are there to fail at the earliest possible time after +some program state is corrupted. If the assertion checks the wrong condition, +then the program may proceed in an erroneous state, which could lead to memory +corruption, security holes, or worse. Hence it is vitally important to test that +such assertion statements work as expected. + +Since these precondition checks cause the processes to die, we call such tests +_death tests_. More generally, any test that checks that a program terminates +(except by throwing an exception) in an expected fashion is also a death test. + +Note that if a piece of code throws an exception, we don't consider it "death" +for the purpose of death tests, as the caller of the code could catch the +exception and avoid the crash. If you want to verify exceptions thrown by your +code, see [Exception Assertions](#ExceptionAssertions). + +If you want to test `EXPECT_*()/ASSERT_*()` failures in your test code, see +["Catching" Failures](#catching-failures). + +### How to Write a Death Test + +GoogleTest provides assertion macros to support death tests. See +[Death Assertions](reference/assertions.md#death) in the Assertions Reference +for details. + +To write a death test, simply use one of the macros inside your test function. +For example, + +```c++ +TEST(MyDeathTest, Foo) { + // This death test uses a compound statement. + ASSERT_DEATH({ + int n = 5; + Foo(&n); + }, "Error on line .* of Foo()"); +} + +TEST(MyDeathTest, NormalExit) { + EXPECT_EXIT(NormalExit(), testing::ExitedWithCode(0), "Success"); +} + +TEST(MyDeathTest, KillProcess) { + EXPECT_EXIT(KillProcess(), testing::KilledBySignal(SIGKILL), + "Sending myself unblockable signal"); +} +``` + +verifies that: + +* calling `Foo(5)` causes the process to die with the given error message, +* calling `NormalExit()` causes the process to print `"Success"` to stderr and + exit with exit code 0, and +* calling `KillProcess()` kills the process with signal `SIGKILL`. + +The test function body may contain other assertions and statements as well, if +necessary. + +Note that a death test only cares about three things: + +1. does `statement` abort or exit the process? +2. (in the case of `ASSERT_EXIT` and `EXPECT_EXIT`) does the exit status + satisfy `predicate`? Or (in the case of `ASSERT_DEATH` and `EXPECT_DEATH`) + is the exit status non-zero? And +3. does the stderr output match `matcher`? + +In particular, if `statement` generates an `ASSERT_*` or `EXPECT_*` failure, it +will **not** cause the death test to fail, as googletest assertions don't abort +the process. + +### Death Test Naming + +{: .callout .important} +IMPORTANT: We strongly recommend you to follow the convention of naming your +**test suite** (not test) `*DeathTest` when it contains a death test, as +demonstrated in the above example. The +[Death Tests And Threads](#death-tests-and-threads) section below explains why. + +If a test fixture class is shared by normal tests and death tests, you can use +`using` or `typedef` to introduce an alias for the fixture class and avoid +duplicating its code: + +```c++ +class FooTest : public testing::Test { ... }; + +using FooDeathTest = FooTest; + +TEST_F(FooTest, DoesThis) { + // normal test +} + +TEST_F(FooDeathTest, DoesThat) { + // death test +} +``` + +### Regular Expression Syntax + +On POSIX systems (e.g. Linux, Cygwin, and Mac), googletest uses the +[POSIX extended regular expression](http://www.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap09.html#tag_09_04) +syntax. To learn about this syntax, you may want to read this +[Wikipedia entry](http://en.wikipedia.org/wiki/Regular_expression#POSIX_Extended_Regular_Expressions). + +On Windows, googletest uses its own simple regular expression implementation. It +lacks many features. For example, we don't support union (`"x|y"`), grouping +(`"(xy)"`), brackets (`"[xy]"`), and repetition count (`"x{5,7}"`), among +others. Below is what we do support (`A` denotes a literal character, period +(`.`), or a single `\\ ` escape sequence; `x` and `y` denote regular +expressions.): + +Expression | Meaning +---------- | -------------------------------------------------------------- +`c` | matches any literal character `c` +`\\d` | matches any decimal digit +`\\D` | matches any character that's not a decimal digit +`\\f` | matches `\f` +`\\n` | matches `\n` +`\\r` | matches `\r` +`\\s` | matches any ASCII whitespace, including `\n` +`\\S` | matches any character that's not a whitespace +`\\t` | matches `\t` +`\\v` | matches `\v` +`\\w` | matches any letter, `_`, or decimal digit +`\\W` | matches any character that `\\w` doesn't match +`\\c` | matches any literal character `c`, which must be a punctuation +`.` | matches any single character except `\n` +`A?` | matches 0 or 1 occurrences of `A` +`A*` | matches 0 or many occurrences of `A` +`A+` | matches 1 or many occurrences of `A` +`^` | matches the beginning of a string (not that of each line) +`$` | matches the end of a string (not that of each line) +`xy` | matches `x` followed by `y` + +To help you determine which capability is available on your system, googletest +defines macros to govern which regular expression it is using. The macros are: +`GTEST_USES_SIMPLE_RE=1` or `GTEST_USES_POSIX_RE=1`. If you want your death +tests to work in all cases, you can either `#if` on these macros or use the more +limited syntax only. + +### How It Works + +See [Death Assertions](reference/assertions.md#death) in the Assertions +Reference. + +### Death Tests And Threads + +The reason for the two death test styles has to do with thread safety. Due to +well-known problems with forking in the presence of threads, death tests should +be run in a single-threaded context. Sometimes, however, it isn't feasible to +arrange that kind of environment. For example, statically-initialized modules +may start threads before main is ever reached. Once threads have been created, +it may be difficult or impossible to clean them up. + +googletest has three features intended to raise awareness of threading issues. + +1. A warning is emitted if multiple threads are running when a death test is + encountered. +2. Test suites with a name ending in "DeathTest" are run before all other + tests. +3. It uses `clone()` instead of `fork()` to spawn the child process on Linux + (`clone()` is not available on Cygwin and Mac), as `fork()` is more likely + to cause the child to hang when the parent process has multiple threads. + +It's perfectly fine to create threads inside a death test statement; they are +executed in a separate process and cannot affect the parent. + +### Death Test Styles + +The "threadsafe" death test style was introduced in order to help mitigate the +risks of testing in a possibly multithreaded environment. It trades increased +test execution time (potentially dramatically so) for improved thread safety. + +The automated testing framework does not set the style flag. You can choose a +particular style of death tests by setting the flag programmatically: + +```c++ +GTEST_FLAG_SET(death_test_style, "threadsafe") +``` + +You can do this in `main()` to set the style for all death tests in the binary, +or in individual tests. Recall that flags are saved before running each test and +restored afterwards, so you need not do that yourself. For example: + +```c++ +int main(int argc, char** argv) { + testing::InitGoogleTest(&argc, argv); + GTEST_FLAG_SET(death_test_style, "fast"); + return RUN_ALL_TESTS(); +} + +TEST(MyDeathTest, TestOne) { + GTEST_FLAG_SET(death_test_style, "threadsafe"); + // This test is run in the "threadsafe" style: + ASSERT_DEATH(ThisShouldDie(), ""); +} + +TEST(MyDeathTest, TestTwo) { + // This test is run in the "fast" style: + ASSERT_DEATH(ThisShouldDie(), ""); +} +``` + +### Caveats + +The `statement` argument of `ASSERT_EXIT()` can be any valid C++ statement. If +it leaves the current function via a `return` statement or by throwing an +exception, the death test is considered to have failed. Some googletest macros +may return from the current function (e.g. `ASSERT_TRUE()`), so be sure to avoid +them in `statement`. + +Since `statement` runs in the child process, any in-memory side effect (e.g. +modifying a variable, releasing memory, etc) it causes will *not* be observable +in the parent process. In particular, if you release memory in a death test, +your program will fail the heap check as the parent process will never see the +memory reclaimed. To solve this problem, you can + +1. try not to free memory in a death test; +2. free the memory again in the parent process; or +3. do not use the heap checker in your program. + +Due to an implementation detail, you cannot place multiple death test assertions +on the same line; otherwise, compilation will fail with an unobvious error +message. + +Despite the improved thread safety afforded by the "threadsafe" style of death +test, thread problems such as deadlock are still possible in the presence of +handlers registered with `pthread_atfork(3)`. + +## Using Assertions in Sub-routines + +{: .callout .note} +Note: If you want to put a series of test assertions in a subroutine to check +for a complex condition, consider using +[a custom GMock matcher](gmock_cook_book.md#NewMatchers) instead. This lets you +provide a more readable error message in case of failure and avoid all of the +issues described below. + +### Adding Traces to Assertions + +If a test sub-routine is called from several places, when an assertion inside it +fails, it can be hard to tell which invocation of the sub-routine the failure is +from. You can alleviate this problem using extra logging or custom failure +messages, but that usually clutters up your tests. A better solution is to use +the `SCOPED_TRACE` macro or the `ScopedTrace` utility: + +```c++ +SCOPED_TRACE(message); +``` + +```c++ +ScopedTrace trace("file_path", line_number, message); +``` + +where `message` can be anything streamable to `std::ostream`. `SCOPED_TRACE` +macro will cause the current file name, line number, and the given message to be +added in every failure message. `ScopedTrace` accepts explicit file name and +line number in arguments, which is useful for writing test helpers. The effect +will be undone when the control leaves the current lexical scope. + +For example, + +```c++ +10: void Sub1(int n) { +11: EXPECT_EQ(Bar(n), 1); +12: EXPECT_EQ(Bar(n + 1), 2); +13: } +14: +15: TEST(FooTest, Bar) { +16: { +17: SCOPED_TRACE("A"); // This trace point will be included in +18: // every failure in this scope. +19: Sub1(1); +20: } +21: // Now it won't. +22: Sub1(9); +23: } +``` + +could result in messages like these: + +```none +path/to/foo_test.cc:11: Failure +Value of: Bar(n) +Expected: 1 + Actual: 2 +Google Test trace: +path/to/foo_test.cc:17: A + +path/to/foo_test.cc:12: Failure +Value of: Bar(n + 1) +Expected: 2 + Actual: 3 +``` + +Without the trace, it would've been difficult to know which invocation of +`Sub1()` the two failures come from respectively. (You could add an extra +message to each assertion in `Sub1()` to indicate the value of `n`, but that's +tedious.) + +Some tips on using `SCOPED_TRACE`: + +1. With a suitable message, it's often enough to use `SCOPED_TRACE` at the + beginning of a sub-routine, instead of at each call site. +2. When calling sub-routines inside a loop, make the loop iterator part of the + message in `SCOPED_TRACE` such that you can know which iteration the failure + is from. +3. Sometimes the line number of the trace point is enough for identifying the + particular invocation of a sub-routine. In this case, you don't have to + choose a unique message for `SCOPED_TRACE`. You can simply use `""`. +4. You can use `SCOPED_TRACE` in an inner scope when there is one in the outer + scope. In this case, all active trace points will be included in the failure + messages, in reverse order they are encountered. +5. The trace dump is clickable in Emacs - hit `return` on a line number and + you'll be taken to that line in the source file! + +### Propagating Fatal Failures + +A common pitfall when using `ASSERT_*` and `FAIL*` is not understanding that +when they fail they only abort the _current function_, not the entire test. For +example, the following test will segfault: + +```c++ +void Subroutine() { + // Generates a fatal failure and aborts the current function. + ASSERT_EQ(1, 2); + + // The following won't be executed. + ... +} + +TEST(FooTest, Bar) { + Subroutine(); // The intended behavior is for the fatal failure + // in Subroutine() to abort the entire test. + + // The actual behavior: the function goes on after Subroutine() returns. + int* p = nullptr; + *p = 3; // Segfault! +} +``` + +To alleviate this, googletest provides three different solutions. You could use +either exceptions, the `(ASSERT|EXPECT)_NO_FATAL_FAILURE` assertions or the +`HasFatalFailure()` function. They are described in the following two +subsections. + +#### Asserting on Subroutines with an exception + +The following code can turn ASSERT-failure into an exception: + +```c++ +class ThrowListener : public testing::EmptyTestEventListener { + void OnTestPartResult(const testing::TestPartResult& result) override { + if (result.type() == testing::TestPartResult::kFatalFailure) { + throw testing::AssertionException(result); + } + } +}; +int main(int argc, char** argv) { + ... + testing::UnitTest::GetInstance()->listeners().Append(new ThrowListener); + return RUN_ALL_TESTS(); +} +``` + +This listener should be added after other listeners if you have any, otherwise +they won't see failed `OnTestPartResult`. + +#### Asserting on Subroutines + +As shown above, if your test calls a subroutine that has an `ASSERT_*` failure +in it, the test will continue after the subroutine returns. This may not be what +you want. + +Often people want fatal failures to propagate like exceptions. For that +googletest offers the following macros: + +Fatal assertion | Nonfatal assertion | Verifies +------------------------------------- | ------------------------------------- | -------- +`ASSERT_NO_FATAL_FAILURE(statement);` | `EXPECT_NO_FATAL_FAILURE(statement);` | `statement` doesn't generate any new fatal failures in the current thread. + +Only failures in the thread that executes the assertion are checked to determine +the result of this type of assertions. If `statement` creates new threads, +failures in these threads are ignored. + +Examples: + +```c++ +ASSERT_NO_FATAL_FAILURE(Foo()); + +int i; +EXPECT_NO_FATAL_FAILURE({ + i = Bar(); +}); +``` + +Assertions from multiple threads are currently not supported on Windows. + +#### Checking for Failures in the Current Test + +`HasFatalFailure()` in the `::testing::Test` class returns `true` if an +assertion in the current test has suffered a fatal failure. This allows +functions to catch fatal failures in a sub-routine and return early. + +```c++ +class Test { + public: + ... + static bool HasFatalFailure(); +}; +``` + +The typical usage, which basically simulates the behavior of a thrown exception, +is: + +```c++ +TEST(FooTest, Bar) { + Subroutine(); + // Aborts if Subroutine() had a fatal failure. + if (HasFatalFailure()) return; + + // The following won't be executed. + ... +} +``` + +If `HasFatalFailure()` is used outside of `TEST()` , `TEST_F()` , or a test +fixture, you must add the `::testing::Test::` prefix, as in: + +```c++ +if (testing::Test::HasFatalFailure()) return; +``` + +Similarly, `HasNonfatalFailure()` returns `true` if the current test has at +least one non-fatal failure, and `HasFailure()` returns `true` if the current +test has at least one failure of either kind. + +## Logging Additional Information + +In your test code, you can call `RecordProperty("key", value)` to log additional +information, where `value` can be either a string or an `int`. The *last* value +recorded for a key will be emitted to the +[XML output](#generating-an-xml-report) if you specify one. For example, the +test + +```c++ +TEST_F(WidgetUsageTest, MinAndMaxWidgets) { + RecordProperty("MaximumWidgets", ComputeMaxUsage()); + RecordProperty("MinimumWidgets", ComputeMinUsage()); +} +``` + +will output XML like this: + +```xml + ... + + ... +``` + +{: .callout .note} +> NOTE: +> +> * `RecordProperty()` is a static member of the `Test` class. Therefore it +> needs to be prefixed with `::testing::Test::` if used outside of the +> `TEST` body and the test fixture class. +> * *`key`* must be a valid XML attribute name, and cannot conflict with the +> ones already used by googletest (`name`, `status`, `time`, `classname`, +> `type_param`, and `value_param`). +> * Calling `RecordProperty()` outside of the lifespan of a test is allowed. +> If it's called outside of a test but between a test suite's +> `SetUpTestSuite()` and `TearDownTestSuite()` methods, it will be +> attributed to the XML element for the test suite. If it's called outside +> of all test suites (e.g. in a test environment), it will be attributed to +> the top-level XML element. + +## Sharing Resources Between Tests in the Same Test Suite + +googletest creates a new test fixture object for each test in order to make +tests independent and easier to debug. However, sometimes tests use resources +that are expensive to set up, making the one-copy-per-test model prohibitively +expensive. + +If the tests don't change the resource, there's no harm in their sharing a +single resource copy. So, in addition to per-test set-up/tear-down, googletest +also supports per-test-suite set-up/tear-down. To use it: + +1. In your test fixture class (say `FooTest` ), declare as `static` some member + variables to hold the shared resources. +2. Outside your test fixture class (typically just below it), define those + member variables, optionally giving them initial values. +3. In the same test fixture class, define a `static void SetUpTestSuite()` + function (remember not to spell it as **`SetupTestSuite`** with a small + `u`!) to set up the shared resources and a `static void TearDownTestSuite()` + function to tear them down. + +That's it! googletest automatically calls `SetUpTestSuite()` before running the +*first test* in the `FooTest` test suite (i.e. before creating the first +`FooTest` object), and calls `TearDownTestSuite()` after running the *last test* +in it (i.e. after deleting the last `FooTest` object). In between, the tests can +use the shared resources. + +Remember that the test order is undefined, so your code can't depend on a test +preceding or following another. Also, the tests must either not modify the state +of any shared resource, or, if they do modify the state, they must restore the +state to its original value before passing control to the next test. + +Note that `SetUpTestSuite()` may be called multiple times for a test fixture +class that has derived classes, so you should not expect code in the function +body to be run only once. Also, derived classes still have access to shared +resources defined as static members, so careful consideration is needed when +managing shared resources to avoid memory leaks. + +Here's an example of per-test-suite set-up and tear-down: + +```c++ +class FooTest : public testing::Test { + protected: + // Per-test-suite set-up. + // Called before the first test in this test suite. + // Can be omitted if not needed. + static void SetUpTestSuite() { + // Avoid reallocating static objects if called in subclasses of FooTest. + if (shared_resource_ == nullptr) { + shared_resource_ = new ...; + } + } + + // Per-test-suite tear-down. + // Called after the last test in this test suite. + // Can be omitted if not needed. + static void TearDownTestSuite() { + delete shared_resource_; + shared_resource_ = nullptr; + } + + // You can define per-test set-up logic as usual. + void SetUp() override { ... } + + // You can define per-test tear-down logic as usual. + void TearDown() override { ... } + + // Some expensive resource shared by all tests. + static T* shared_resource_; +}; + +T* FooTest::shared_resource_ = nullptr; + +TEST_F(FooTest, Test1) { + ... you can refer to shared_resource_ here ... +} + +TEST_F(FooTest, Test2) { + ... you can refer to shared_resource_ here ... +} +``` + +{: .callout .note} +NOTE: Though the above code declares `SetUpTestSuite()` protected, it may +sometimes be necessary to declare it public, such as when using it with +`TEST_P`. + +## Global Set-Up and Tear-Down + +Just as you can do set-up and tear-down at the test level and the test suite +level, you can also do it at the test program level. Here's how. + +First, you subclass the `::testing::Environment` class to define a test +environment, which knows how to set-up and tear-down: + +```c++ +class Environment : public ::testing::Environment { + public: + ~Environment() override {} + + // Override this to define how to set up the environment. + void SetUp() override {} + + // Override this to define how to tear down the environment. + void TearDown() override {} +}; +``` + +Then, you register an instance of your environment class with googletest by +calling the `::testing::AddGlobalTestEnvironment()` function: + +```c++ +Environment* AddGlobalTestEnvironment(Environment* env); +``` + +Now, when `RUN_ALL_TESTS()` is called, it first calls the `SetUp()` method of +each environment object, then runs the tests if none of the environments +reported fatal failures and `GTEST_SKIP()` was not called. `RUN_ALL_TESTS()` +always calls `TearDown()` with each environment object, regardless of whether or +not the tests were run. + +It's OK to register multiple environment objects. In this suite, their `SetUp()` +will be called in the order they are registered, and their `TearDown()` will be +called in the reverse order. + +Note that googletest takes ownership of the registered environment objects. +Therefore **do not delete them** by yourself. + +You should call `AddGlobalTestEnvironment()` before `RUN_ALL_TESTS()` is called, +probably in `main()`. If you use `gtest_main`, you need to call this before +`main()` starts for it to take effect. One way to do this is to define a global +variable like this: + +```c++ +testing::Environment* const foo_env = + testing::AddGlobalTestEnvironment(new FooEnvironment); +``` + +However, we strongly recommend you to write your own `main()` and call +`AddGlobalTestEnvironment()` there, as relying on initialization of global +variables makes the code harder to read and may cause problems when you register +multiple environments from different translation units and the environments have +dependencies among them (remember that the compiler doesn't guarantee the order +in which global variables from different translation units are initialized). + +## Value-Parameterized Tests + +*Value-parameterized tests* allow you to test your code with different +parameters without writing multiple copies of the same test. This is useful in a +number of situations, for example: + +* You have a piece of code whose behavior is affected by one or more + command-line flags. You want to make sure your code performs correctly for + various values of those flags. +* You want to test different implementations of an OO interface. +* You want to test your code over various inputs (a.k.a. data-driven testing). + This feature is easy to abuse, so please exercise your good sense when doing + it! + +### How to Write Value-Parameterized Tests + +To write value-parameterized tests, first you should define a fixture class. It +must be derived from both `testing::Test` and `testing::WithParamInterface` +(the latter is a pure interface), where `T` is the type of your parameter +values. For convenience, you can just derive the fixture class from +`testing::TestWithParam`, which itself is derived from both `testing::Test` +and `testing::WithParamInterface`. `T` can be any copyable type. If it's a +raw pointer, you are responsible for managing the lifespan of the pointed +values. + +{: .callout .note} +NOTE: If your test fixture defines `SetUpTestSuite()` or `TearDownTestSuite()` +they must be declared **public** rather than **protected** in order to use +`TEST_P`. + +```c++ +class FooTest : + public testing::TestWithParam { + // You can implement all the usual fixture class members here. + // To access the test parameter, call GetParam() from class + // TestWithParam. +}; + +// Or, when you want to add parameters to a pre-existing fixture class: +class BaseTest : public testing::Test { + ... +}; +class BarTest : public BaseTest, + public testing::WithParamInterface { + ... +}; +``` + +Then, use the `TEST_P` macro to define as many test patterns using this fixture +as you want. The `_P` suffix is for "parameterized" or "pattern", whichever you +prefer to think. + +```c++ +TEST_P(FooTest, DoesBlah) { + // Inside a test, access the test parameter with the GetParam() method + // of the TestWithParam class: + EXPECT_TRUE(foo.Blah(GetParam())); + ... +} + +TEST_P(FooTest, HasBlahBlah) { + ... +} +``` + +Finally, you can use the `INSTANTIATE_TEST_SUITE_P` macro to instantiate the +test suite with any set of parameters you want. GoogleTest defines a number of +functions for generating test parameters—see details at +[`INSTANTIATE_TEST_SUITE_P`](reference/testing.md#INSTANTIATE_TEST_SUITE_P) in +the Testing Reference. + +For example, the following statement will instantiate tests from the `FooTest` +test suite each with parameter values `"meeny"`, `"miny"`, and `"moe"` using the +[`Values`](reference/testing.md#param-generators) parameter generator: + +```c++ +INSTANTIATE_TEST_SUITE_P(MeenyMinyMoe, + FooTest, + testing::Values("meeny", "miny", "moe")); +``` + +{: .callout .note} +NOTE: The code above must be placed at global or namespace scope, not at +function scope. + +The first argument to `INSTANTIATE_TEST_SUITE_P` is a unique name for the +instantiation of the test suite. The next argument is the name of the test +pattern, and the last is the +[parameter generator](reference/testing.md#param-generators). + +You can instantiate a test pattern more than once, so to distinguish different +instances of the pattern, the instantiation name is added as a prefix to the +actual test suite name. Remember to pick unique prefixes for different +instantiations. The tests from the instantiation above will have these names: + +* `MeenyMinyMoe/FooTest.DoesBlah/0` for `"meeny"` +* `MeenyMinyMoe/FooTest.DoesBlah/1` for `"miny"` +* `MeenyMinyMoe/FooTest.DoesBlah/2` for `"moe"` +* `MeenyMinyMoe/FooTest.HasBlahBlah/0` for `"meeny"` +* `MeenyMinyMoe/FooTest.HasBlahBlah/1` for `"miny"` +* `MeenyMinyMoe/FooTest.HasBlahBlah/2` for `"moe"` + +You can use these names in [`--gtest_filter`](#running-a-subset-of-the-tests). + +The following statement will instantiate all tests from `FooTest` again, each +with parameter values `"cat"` and `"dog"` using the +[`ValuesIn`](reference/testing.md#param-generators) parameter generator: + +```c++ +const char* pets[] = {"cat", "dog"}; +INSTANTIATE_TEST_SUITE_P(Pets, FooTest, testing::ValuesIn(pets)); +``` + +The tests from the instantiation above will have these names: + +* `Pets/FooTest.DoesBlah/0` for `"cat"` +* `Pets/FooTest.DoesBlah/1` for `"dog"` +* `Pets/FooTest.HasBlahBlah/0` for `"cat"` +* `Pets/FooTest.HasBlahBlah/1` for `"dog"` + +Please note that `INSTANTIATE_TEST_SUITE_P` will instantiate *all* tests in the +given test suite, whether their definitions come before or *after* the +`INSTANTIATE_TEST_SUITE_P` statement. + +Additionally, by default, every `TEST_P` without a corresponding +`INSTANTIATE_TEST_SUITE_P` causes a failing test in test suite +`GoogleTestVerification`. If you have a test suite where that omission is not an +error, for example it is in a library that may be linked in for other reasons or +where the list of test cases is dynamic and may be empty, then this check can be +suppressed by tagging the test suite: + +```c++ +GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(FooTest); +``` + +You can see [sample7_unittest.cc] and [sample8_unittest.cc] for more examples. + +[sample7_unittest.cc]: https://github.com/google/googletest/blob/master/googletest/samples/sample7_unittest.cc "Parameterized Test example" +[sample8_unittest.cc]: https://github.com/google/googletest/blob/master/googletest/samples/sample8_unittest.cc "Parameterized Test example with multiple parameters" + +### Creating Value-Parameterized Abstract Tests + +In the above, we define and instantiate `FooTest` in the *same* source file. +Sometimes you may want to define value-parameterized tests in a library and let +other people instantiate them later. This pattern is known as *abstract tests*. +As an example of its application, when you are designing an interface you can +write a standard suite of abstract tests (perhaps using a factory function as +the test parameter) that all implementations of the interface are expected to +pass. When someone implements the interface, they can instantiate your suite to +get all the interface-conformance tests for free. + +To define abstract tests, you should organize your code like this: + +1. Put the definition of the parameterized test fixture class (e.g. `FooTest`) + in a header file, say `foo_param_test.h`. Think of this as *declaring* your + abstract tests. +2. Put the `TEST_P` definitions in `foo_param_test.cc`, which includes + `foo_param_test.h`. Think of this as *implementing* your abstract tests. + +Once they are defined, you can instantiate them by including `foo_param_test.h`, +invoking `INSTANTIATE_TEST_SUITE_P()`, and depending on the library target that +contains `foo_param_test.cc`. You can instantiate the same abstract test suite +multiple times, possibly in different source files. + +### Specifying Names for Value-Parameterized Test Parameters + +The optional last argument to `INSTANTIATE_TEST_SUITE_P()` allows the user to +specify a function or functor that generates custom test name suffixes based on +the test parameters. The function should accept one argument of type +`testing::TestParamInfo`, and return `std::string`. + +`testing::PrintToStringParamName` is a builtin test suffix generator that +returns the value of `testing::PrintToString(GetParam())`. It does not work for +`std::string` or C strings. + +{: .callout .note} +NOTE: test names must be non-empty, unique, and may only contain ASCII +alphanumeric characters. In particular, they +[should not contain underscores](faq.md#why-should-test-suite-names-and-test-names-not-contain-underscore) + +```c++ +class MyTestSuite : public testing::TestWithParam {}; + +TEST_P(MyTestSuite, MyTest) +{ + std::cout << "Example Test Param: " << GetParam() << std::endl; +} + +INSTANTIATE_TEST_SUITE_P(MyGroup, MyTestSuite, testing::Range(0, 10), + testing::PrintToStringParamName()); +``` + +Providing a custom functor allows for more control over test parameter name +generation, especially for types where the automatic conversion does not +generate helpful parameter names (e.g. strings as demonstrated above). The +following example illustrates this for multiple parameters, an enumeration type +and a string, and also demonstrates how to combine generators. It uses a lambda +for conciseness: + +```c++ +enum class MyType { MY_FOO = 0, MY_BAR = 1 }; + +class MyTestSuite : public testing::TestWithParam> { +}; + +INSTANTIATE_TEST_SUITE_P( + MyGroup, MyTestSuite, + testing::Combine( + testing::Values(MyType::MY_FOO, MyType::MY_BAR), + testing::Values("A", "B")), + [](const testing::TestParamInfo& info) { + std::string name = absl::StrCat( + std::get<0>(info.param) == MyType::MY_FOO ? "Foo" : "Bar", + std::get<1>(info.param)); + absl::c_replace_if(name, [](char c) { return !std::isalnum(c); }, '_'); + return name; + }); +``` + +## Typed Tests + +Suppose you have multiple implementations of the same interface and want to make +sure that all of them satisfy some common requirements. Or, you may have defined +several types that are supposed to conform to the same "concept" and you want to +verify it. In both cases, you want the same test logic repeated for different +types. + +While you can write one `TEST` or `TEST_F` for each type you want to test (and +you may even factor the test logic into a function template that you invoke from +the `TEST`), it's tedious and doesn't scale: if you want `m` tests over `n` +types, you'll end up writing `m*n` `TEST`s. + +*Typed tests* allow you to repeat the same test logic over a list of types. You +only need to write the test logic once, although you must know the type list +when writing typed tests. Here's how you do it: + +First, define a fixture class template. It should be parameterized by a type. +Remember to derive it from `::testing::Test`: + +```c++ +template +class FooTest : public testing::Test { + public: + ... + using List = std::list; + static T shared_; + T value_; +}; +``` + +Next, associate a list of types with the test suite, which will be repeated for +each type in the list: + +```c++ +using MyTypes = ::testing::Types; +TYPED_TEST_SUITE(FooTest, MyTypes); +``` + +The type alias (`using` or `typedef`) is necessary for the `TYPED_TEST_SUITE` +macro to parse correctly. Otherwise the compiler will think that each comma in +the type list introduces a new macro argument. + +Then, use `TYPED_TEST()` instead of `TEST_F()` to define a typed test for this +test suite. You can repeat this as many times as you want: + +```c++ +TYPED_TEST(FooTest, DoesBlah) { + // Inside a test, refer to the special name TypeParam to get the type + // parameter. Since we are inside a derived class template, C++ requires + // us to visit the members of FooTest via 'this'. + TypeParam n = this->value_; + + // To visit static members of the fixture, add the 'TestFixture::' + // prefix. + n += TestFixture::shared_; + + // To refer to typedefs in the fixture, add the 'typename TestFixture::' + // prefix. The 'typename' is required to satisfy the compiler. + typename TestFixture::List values; + + values.push_back(n); + ... +} + +TYPED_TEST(FooTest, HasPropertyA) { ... } +``` + +You can see [sample6_unittest.cc] for a complete example. + +[sample6_unittest.cc]: https://github.com/google/googletest/blob/master/googletest/samples/sample6_unittest.cc "Typed Test example" + +## Type-Parameterized Tests + +*Type-parameterized tests* are like typed tests, except that they don't require +you to know the list of types ahead of time. Instead, you can define the test +logic first and instantiate it with different type lists later. You can even +instantiate it more than once in the same program. + +If you are designing an interface or concept, you can define a suite of +type-parameterized tests to verify properties that any valid implementation of +the interface/concept should have. Then, the author of each implementation can +just instantiate the test suite with their type to verify that it conforms to +the requirements, without having to write similar tests repeatedly. Here's an +example: + +First, define a fixture class template, as we did with typed tests: + +```c++ +template +class FooTest : public testing::Test { + ... +}; +``` + +Next, declare that you will define a type-parameterized test suite: + +```c++ +TYPED_TEST_SUITE_P(FooTest); +``` + +Then, use `TYPED_TEST_P()` to define a type-parameterized test. You can repeat +this as many times as you want: + +```c++ +TYPED_TEST_P(FooTest, DoesBlah) { + // Inside a test, refer to TypeParam to get the type parameter. + TypeParam n = 0; + ... +} + +TYPED_TEST_P(FooTest, HasPropertyA) { ... } +``` + +Now the tricky part: you need to register all test patterns using the +`REGISTER_TYPED_TEST_SUITE_P` macro before you can instantiate them. The first +argument of the macro is the test suite name; the rest are the names of the +tests in this test suite: + +```c++ +REGISTER_TYPED_TEST_SUITE_P(FooTest, + DoesBlah, HasPropertyA); +``` + +Finally, you are free to instantiate the pattern with the types you want. If you +put the above code in a header file, you can `#include` it in multiple C++ +source files and instantiate it multiple times. + +```c++ +using MyTypes = ::testing::Types; +INSTANTIATE_TYPED_TEST_SUITE_P(My, FooTest, MyTypes); +``` + +To distinguish different instances of the pattern, the first argument to the +`INSTANTIATE_TYPED_TEST_SUITE_P` macro is a prefix that will be added to the +actual test suite name. Remember to pick unique prefixes for different +instances. + +In the special case where the type list contains only one type, you can write +that type directly without `::testing::Types<...>`, like this: + +```c++ +INSTANTIATE_TYPED_TEST_SUITE_P(My, FooTest, int); +``` + +You can see [sample6_unittest.cc] for a complete example. + +## Testing Private Code + +If you change your software's internal implementation, your tests should not +break as long as the change is not observable by users. Therefore, **per the +black-box testing principle, most of the time you should test your code through +its public interfaces.** + +**If you still find yourself needing to test internal implementation code, +consider if there's a better design.** The desire to test internal +implementation is often a sign that the class is doing too much. Consider +extracting an implementation class, and testing it. Then use that implementation +class in the original class. + +If you absolutely have to test non-public interface code though, you can. There +are two cases to consider: + +* Static functions ( *not* the same as static member functions!) or unnamed + namespaces, and +* Private or protected class members + +To test them, we use the following special techniques: + +* Both static functions and definitions/declarations in an unnamed namespace + are only visible within the same translation unit. To test them, you can + `#include` the entire `.cc` file being tested in your `*_test.cc` file. + (#including `.cc` files is not a good way to reuse code - you should not do + this in production code!) + + However, a better approach is to move the private code into the + `foo::internal` namespace, where `foo` is the namespace your project + normally uses, and put the private declarations in a `*-internal.h` file. + Your production `.cc` files and your tests are allowed to include this + internal header, but your clients are not. This way, you can fully test your + internal implementation without leaking it to your clients. + +* Private class members are only accessible from within the class or by + friends. To access a class' private members, you can declare your test + fixture as a friend to the class and define accessors in your fixture. Tests + using the fixture can then access the private members of your production + class via the accessors in the fixture. Note that even though your fixture + is a friend to your production class, your tests are not automatically + friends to it, as they are technically defined in sub-classes of the + fixture. + + Another way to test private members is to refactor them into an + implementation class, which is then declared in a `*-internal.h` file. Your + clients aren't allowed to include this header but your tests can. Such is + called the + [Pimpl](https://www.gamedev.net/articles/programming/general-and-gameplay-programming/the-c-pimpl-r1794/) + (Private Implementation) idiom. + + Or, you can declare an individual test as a friend of your class by adding + this line in the class body: + + ```c++ + FRIEND_TEST(TestSuiteName, TestName); + ``` + + For example, + + ```c++ + // foo.h + class Foo { + ... + private: + FRIEND_TEST(FooTest, BarReturnsZeroOnNull); + + int Bar(void* x); + }; + + // foo_test.cc + ... + TEST(FooTest, BarReturnsZeroOnNull) { + Foo foo; + EXPECT_EQ(foo.Bar(NULL), 0); // Uses Foo's private member Bar(). + } + ``` + + Pay special attention when your class is defined in a namespace. If you want + your test fixtures and tests to be friends of your class, then they must be + defined in the exact same namespace (no anonymous or inline namespaces). + + For example, if the code to be tested looks like: + + ```c++ + namespace my_namespace { + + class Foo { + friend class FooTest; + FRIEND_TEST(FooTest, Bar); + FRIEND_TEST(FooTest, Baz); + ... definition of the class Foo ... + }; + + } // namespace my_namespace + ``` + + Your test code should be something like: + + ```c++ + namespace my_namespace { + + class FooTest : public testing::Test { + protected: + ... + }; + + TEST_F(FooTest, Bar) { ... } + TEST_F(FooTest, Baz) { ... } + + } // namespace my_namespace + ``` + +## "Catching" Failures + +If you are building a testing utility on top of googletest, you'll want to test +your utility. What framework would you use to test it? googletest, of course. + +The challenge is to verify that your testing utility reports failures correctly. +In frameworks that report a failure by throwing an exception, you could catch +the exception and assert on it. But googletest doesn't use exceptions, so how do +we test that a piece of code generates an expected failure? + +`"gtest/gtest-spi.h"` contains some constructs to do this. +After #including this header, you can use + +```c++ + EXPECT_FATAL_FAILURE(statement, substring); +``` + +to assert that `statement` generates a fatal (e.g. `ASSERT_*`) failure in the +current thread whose message contains the given `substring`, or use + +```c++ + EXPECT_NONFATAL_FAILURE(statement, substring); +``` + +if you are expecting a non-fatal (e.g. `EXPECT_*`) failure. + +Only failures in the current thread are checked to determine the result of this +type of expectations. If `statement` creates new threads, failures in these +threads are also ignored. If you want to catch failures in other threads as +well, use one of the following macros instead: + +```c++ + EXPECT_FATAL_FAILURE_ON_ALL_THREADS(statement, substring); + EXPECT_NONFATAL_FAILURE_ON_ALL_THREADS(statement, substring); +``` + +{: .callout .note} +NOTE: Assertions from multiple threads are currently not supported on Windows. + +For technical reasons, there are some caveats: + +1. You cannot stream a failure message to either macro. + +2. `statement` in `EXPECT_FATAL_FAILURE{_ON_ALL_THREADS}()` cannot reference + local non-static variables or non-static members of `this` object. + +3. `statement` in `EXPECT_FATAL_FAILURE{_ON_ALL_THREADS}()` cannot return a + value. + +## Registering tests programmatically + +The `TEST` macros handle the vast majority of all use cases, but there are few +where runtime registration logic is required. For those cases, the framework +provides the `::testing::RegisterTest` that allows callers to register arbitrary +tests dynamically. + +This is an advanced API only to be used when the `TEST` macros are insufficient. +The macros should be preferred when possible, as they avoid most of the +complexity of calling this function. + +It provides the following signature: + +```c++ +template +TestInfo* RegisterTest(const char* test_suite_name, const char* test_name, + const char* type_param, const char* value_param, + const char* file, int line, Factory factory); +``` + +The `factory` argument is a factory callable (move-constructible) object or +function pointer that creates a new instance of the Test object. It handles +ownership to the caller. The signature of the callable is `Fixture*()`, where +`Fixture` is the test fixture class for the test. All tests registered with the +same `test_suite_name` must return the same fixture type. This is checked at +runtime. + +The framework will infer the fixture class from the factory and will call the +`SetUpTestSuite` and `TearDownTestSuite` for it. + +Must be called before `RUN_ALL_TESTS()` is invoked, otherwise behavior is +undefined. + +Use case example: + +```c++ +class MyFixture : public testing::Test { + public: + // All of these optional, just like in regular macro usage. + static void SetUpTestSuite() { ... } + static void TearDownTestSuite() { ... } + void SetUp() override { ... } + void TearDown() override { ... } +}; + +class MyTest : public MyFixture { + public: + explicit MyTest(int data) : data_(data) {} + void TestBody() override { ... } + + private: + int data_; +}; + +void RegisterMyTests(const std::vector& values) { + for (int v : values) { + testing::RegisterTest( + "MyFixture", ("Test" + std::to_string(v)).c_str(), nullptr, + std::to_string(v).c_str(), + __FILE__, __LINE__, + // Important to use the fixture type as the return type here. + [=]() -> MyFixture* { return new MyTest(v); }); + } +} +... +int main(int argc, char** argv) { + testing::InitGoogleTest(&argc, argv); + std::vector values_to_test = LoadValuesFromConfig(); + RegisterMyTests(values_to_test); + ... + return RUN_ALL_TESTS(); +} +``` + +## Getting the Current Test's Name + +Sometimes a function may need to know the name of the currently running test. +For example, you may be using the `SetUp()` method of your test fixture to set +the golden file name based on which test is running. The +[`TestInfo`](reference/testing.md#TestInfo) class has this information. + +To obtain a `TestInfo` object for the currently running test, call +`current_test_info()` on the [`UnitTest`](reference/testing.md#UnitTest) +singleton object: + +```c++ + // Gets information about the currently running test. + // Do NOT delete the returned object - it's managed by the UnitTest class. + const testing::TestInfo* const test_info = + testing::UnitTest::GetInstance()->current_test_info(); + + printf("We are in test %s of test suite %s.\n", + test_info->name(), + test_info->test_suite_name()); +``` + +`current_test_info()` returns a null pointer if no test is running. In +particular, you cannot find the test suite name in `SetUpTestSuite()`, +`TearDownTestSuite()` (where you know the test suite name implicitly), or +functions called from them. + +## Extending googletest by Handling Test Events + +googletest provides an **event listener API** to let you receive notifications +about the progress of a test program and test failures. The events you can +listen to include the start and end of the test program, a test suite, or a test +method, among others. You may use this API to augment or replace the standard +console output, replace the XML output, or provide a completely different form +of output, such as a GUI or a database. You can also use test events as +checkpoints to implement a resource leak checker, for example. + +### Defining Event Listeners + +To define a event listener, you subclass either +[`testing::TestEventListener`](reference/testing.md#TestEventListener) or +[`testing::EmptyTestEventListener`](reference/testing.md#EmptyTestEventListener) +The former is an (abstract) interface, where *each pure virtual method can be +overridden to handle a test event* (For example, when a test starts, the +`OnTestStart()` method will be called.). The latter provides an empty +implementation of all methods in the interface, such that a subclass only needs +to override the methods it cares about. + +When an event is fired, its context is passed to the handler function as an +argument. The following argument types are used: + +* UnitTest reflects the state of the entire test program, +* TestSuite has information about a test suite, which can contain one or more + tests, +* TestInfo contains the state of a test, and +* TestPartResult represents the result of a test assertion. + +An event handler function can examine the argument it receives to find out +interesting information about the event and the test program's state. + +Here's an example: + +```c++ + class MinimalistPrinter : public testing::EmptyTestEventListener { + // Called before a test starts. + void OnTestStart(const testing::TestInfo& test_info) override { + printf("*** Test %s.%s starting.\n", + test_info.test_suite_name(), test_info.name()); + } + + // Called after a failed assertion or a SUCCESS(). + void OnTestPartResult(const testing::TestPartResult& test_part_result) override { + printf("%s in %s:%d\n%s\n", + test_part_result.failed() ? "*** Failure" : "Success", + test_part_result.file_name(), + test_part_result.line_number(), + test_part_result.summary()); + } + + // Called after a test ends. + void OnTestEnd(const testing::TestInfo& test_info) override { + printf("*** Test %s.%s ending.\n", + test_info.test_suite_name(), test_info.name()); + } + }; +``` + +### Using Event Listeners + +To use the event listener you have defined, add an instance of it to the +googletest event listener list (represented by class +[`TestEventListeners`](reference/testing.md#TestEventListeners) - note the "s" +at the end of the name) in your `main()` function, before calling +`RUN_ALL_TESTS()`: + +```c++ +int main(int argc, char** argv) { + testing::InitGoogleTest(&argc, argv); + // Gets hold of the event listener list. + testing::TestEventListeners& listeners = + testing::UnitTest::GetInstance()->listeners(); + // Adds a listener to the end. googletest takes the ownership. + listeners.Append(new MinimalistPrinter); + return RUN_ALL_TESTS(); +} +``` + +There's only one problem: the default test result printer is still in effect, so +its output will mingle with the output from your minimalist printer. To suppress +the default printer, just release it from the event listener list and delete it. +You can do so by adding one line: + +```c++ + ... + delete listeners.Release(listeners.default_result_printer()); + listeners.Append(new MinimalistPrinter); + return RUN_ALL_TESTS(); +``` + +Now, sit back and enjoy a completely different output from your tests. For more +details, see [sample9_unittest.cc]. + +[sample9_unittest.cc]: https://github.com/google/googletest/blob/master/googletest/samples/sample9_unittest.cc "Event listener example" + +You may append more than one listener to the list. When an `On*Start()` or +`OnTestPartResult()` event is fired, the listeners will receive it in the order +they appear in the list (since new listeners are added to the end of the list, +the default text printer and the default XML generator will receive the event +first). An `On*End()` event will be received by the listeners in the *reverse* +order. This allows output by listeners added later to be framed by output from +listeners added earlier. + +### Generating Failures in Listeners + +You may use failure-raising macros (`EXPECT_*()`, `ASSERT_*()`, `FAIL()`, etc) +when processing an event. There are some restrictions: + +1. You cannot generate any failure in `OnTestPartResult()` (otherwise it will + cause `OnTestPartResult()` to be called recursively). +2. A listener that handles `OnTestPartResult()` is not allowed to generate any + failure. + +When you add listeners to the listener list, you should put listeners that +handle `OnTestPartResult()` *before* listeners that can generate failures. This +ensures that failures generated by the latter are attributed to the right test +by the former. + +See [sample10_unittest.cc] for an example of a failure-raising listener. + +[sample10_unittest.cc]: https://github.com/google/googletest/blob/master/googletest/samples/sample10_unittest.cc "Failure-raising listener example" + +## Running Test Programs: Advanced Options + +googletest test programs are ordinary executables. Once built, you can run them +directly and affect their behavior via the following environment variables +and/or command line flags. For the flags to work, your programs must call +`::testing::InitGoogleTest()` before calling `RUN_ALL_TESTS()`. + +To see a list of supported flags and their usage, please run your test program +with the `--help` flag. You can also use `-h`, `-?`, or `/?` for short. + +If an option is specified both by an environment variable and by a flag, the +latter takes precedence. + +### Selecting Tests + +#### Listing Test Names + +Sometimes it is necessary to list the available tests in a program before +running them so that a filter may be applied if needed. Including the flag +`--gtest_list_tests` overrides all other flags and lists tests in the following +format: + +```none +TestSuite1. + TestName1 + TestName2 +TestSuite2. + TestName +``` + +None of the tests listed are actually run if the flag is provided. There is no +corresponding environment variable for this flag. + +#### Running a Subset of the Tests + +By default, a googletest program runs all tests the user has defined. Sometimes, +you want to run only a subset of the tests (e.g. for debugging or quickly +verifying a change). If you set the `GTEST_FILTER` environment variable or the +`--gtest_filter` flag to a filter string, googletest will only run the tests +whose full names (in the form of `TestSuiteName.TestName`) match the filter. + +The format of a filter is a '`:`'-separated list of wildcard patterns (called +the *positive patterns*) optionally followed by a '`-`' and another +'`:`'-separated pattern list (called the *negative patterns*). A test matches +the filter if and only if it matches any of the positive patterns but does not +match any of the negative patterns. + +A pattern may contain `'*'` (matches any string) or `'?'` (matches any single +character). For convenience, the filter `'*-NegativePatterns'` can be also +written as `'-NegativePatterns'`. + +For example: + +* `./foo_test` Has no flag, and thus runs all its tests. +* `./foo_test --gtest_filter=*` Also runs everything, due to the single + match-everything `*` value. +* `./foo_test --gtest_filter=FooTest.*` Runs everything in test suite + `FooTest` . +* `./foo_test --gtest_filter=*Null*:*Constructor*` Runs any test whose full + name contains either `"Null"` or `"Constructor"` . +* `./foo_test --gtest_filter=-*DeathTest.*` Runs all non-death tests. +* `./foo_test --gtest_filter=FooTest.*-FooTest.Bar` Runs everything in test + suite `FooTest` except `FooTest.Bar`. +* `./foo_test --gtest_filter=FooTest.*:BarTest.*-FooTest.Bar:BarTest.Foo` Runs + everything in test suite `FooTest` except `FooTest.Bar` and everything in + test suite `BarTest` except `BarTest.Foo`. + +#### Stop test execution upon first failure + +By default, a googletest program runs all tests the user has defined. In some +cases (e.g. iterative test development & execution) it may be desirable stop +test execution upon first failure (trading improved latency for completeness). +If `GTEST_FAIL_FAST` environment variable or `--gtest_fail_fast` flag is set, +the test runner will stop execution as soon as the first test failure is found. + +#### Temporarily Disabling Tests + +If you have a broken test that you cannot fix right away, you can add the +`DISABLED_` prefix to its name. This will exclude it from execution. This is +better than commenting out the code or using `#if 0`, as disabled tests are +still compiled (and thus won't rot). + +If you need to disable all tests in a test suite, you can either add `DISABLED_` +to the front of the name of each test, or alternatively add it to the front of +the test suite name. + +For example, the following tests won't be run by googletest, even though they +will still be compiled: + +```c++ +// Tests that Foo does Abc. +TEST(FooTest, DISABLED_DoesAbc) { ... } + +class DISABLED_BarTest : public testing::Test { ... }; + +// Tests that Bar does Xyz. +TEST_F(DISABLED_BarTest, DoesXyz) { ... } +``` + +{: .callout .note} +NOTE: This feature should only be used for temporary pain-relief. You still have +to fix the disabled tests at a later date. As a reminder, googletest will print +a banner warning you if a test program contains any disabled tests. + +{: .callout .tip} +TIP: You can easily count the number of disabled tests you have using +`grep`. This number can be used as a metric for +improving your test quality. + +#### Temporarily Enabling Disabled Tests + +To include disabled tests in test execution, just invoke the test program with +the `--gtest_also_run_disabled_tests` flag or set the +`GTEST_ALSO_RUN_DISABLED_TESTS` environment variable to a value other than `0`. +You can combine this with the `--gtest_filter` flag to further select which +disabled tests to run. + +### Repeating the Tests + +Once in a while you'll run into a test whose result is hit-or-miss. Perhaps it +will fail only 1% of the time, making it rather hard to reproduce the bug under +a debugger. This can be a major source of frustration. + +The `--gtest_repeat` flag allows you to repeat all (or selected) test methods in +a program many times. Hopefully, a flaky test will eventually fail and give you +a chance to debug. Here's how to use it: + +```none +$ foo_test --gtest_repeat=1000 +Repeat foo_test 1000 times and don't stop at failures. + +$ foo_test --gtest_repeat=-1 +A negative count means repeating forever. + +$ foo_test --gtest_repeat=1000 --gtest_break_on_failure +Repeat foo_test 1000 times, stopping at the first failure. This +is especially useful when running under a debugger: when the test +fails, it will drop into the debugger and you can then inspect +variables and stacks. + +$ foo_test --gtest_repeat=1000 --gtest_filter=FooBar.* +Repeat the tests whose name matches the filter 1000 times. +``` + +If your test program contains +[global set-up/tear-down](#global-set-up-and-tear-down) code, it will be +repeated in each iteration as well, as the flakiness may be in it. You can also +specify the repeat count by setting the `GTEST_REPEAT` environment variable. + +### Shuffling the Tests + +You can specify the `--gtest_shuffle` flag (or set the `GTEST_SHUFFLE` +environment variable to `1`) to run the tests in a program in a random order. +This helps to reveal bad dependencies between tests. + +By default, googletest uses a random seed calculated from the current time. +Therefore you'll get a different order every time. The console output includes +the random seed value, such that you can reproduce an order-related test failure +later. To specify the random seed explicitly, use the `--gtest_random_seed=SEED` +flag (or set the `GTEST_RANDOM_SEED` environment variable), where `SEED` is an +integer in the range [0, 99999]. The seed value 0 is special: it tells +googletest to do the default behavior of calculating the seed from the current +time. + +If you combine this with `--gtest_repeat=N`, googletest will pick a different +random seed and re-shuffle the tests in each iteration. + +### Distributing Test Functions to Multiple Machines + +If you have more than one machine you can use to run a test program, you might +want to run the test functions in parallel and get the result faster. We call +this technique *sharding*, where each machine is called a *shard*. + +GoogleTest is compatible with test sharding. To take advantage of this feature, +your test runner (not part of GoogleTest) needs to do the following: + +1. Allocate a number of machines (shards) to run the tests. +1. On each shard, set the `GTEST_TOTAL_SHARDS` environment variable to the total + number of shards. It must be the same for all shards. +1. On each shard, set the `GTEST_SHARD_INDEX` environment variable to the index + of the shard. Different shards must be assigned different indices, which + must be in the range `[0, GTEST_TOTAL_SHARDS - 1]`. +1. Run the same test program on all shards. When GoogleTest sees the above two + environment variables, it will select a subset of the test functions to run. + Across all shards, each test function in the program will be run exactly + once. +1. Wait for all shards to finish, then collect and report the results. + +Your project may have tests that were written without GoogleTest and thus don't +understand this protocol. In order for your test runner to figure out which test +supports sharding, it can set the environment variable `GTEST_SHARD_STATUS_FILE` +to a non-existent file path. If a test program supports sharding, it will create +this file to acknowledge that fact; otherwise it will not create it. The actual +contents of the file are not important at this time, although we may put some +useful information in it in the future. + +Here's an example to make it clear. Suppose you have a test program `foo_test` +that contains the following 5 test functions: + +``` +TEST(A, V) +TEST(A, W) +TEST(B, X) +TEST(B, Y) +TEST(B, Z) +``` + +Suppose you have 3 machines at your disposal. To run the test functions in +parallel, you would set `GTEST_TOTAL_SHARDS` to 3 on all machines, and set +`GTEST_SHARD_INDEX` to 0, 1, and 2 on the machines respectively. Then you would +run the same `foo_test` on each machine. + +GoogleTest reserves the right to change how the work is distributed across the +shards, but here's one possible scenario: + +* Machine #0 runs `A.V` and `B.X`. +* Machine #1 runs `A.W` and `B.Y`. +* Machine #2 runs `B.Z`. + +### Controlling Test Output + +#### Colored Terminal Output + +googletest can use colors in its terminal output to make it easier to spot the +important information: + +
...
+[----------] 1 test from FooTest
+[ RUN      ] FooTest.DoesAbc
+[       OK ] FooTest.DoesAbc
+[----------] 2 tests from BarTest
+[ RUN      ] BarTest.HasXyzProperty
+[       OK ] BarTest.HasXyzProperty
+[ RUN      ] BarTest.ReturnsTrueOnSuccess
+... some error messages ...
+[   FAILED ] BarTest.ReturnsTrueOnSuccess
+...
+[==========] 30 tests from 14 test suites ran.
+[   PASSED ] 28 tests.
+[   FAILED ] 2 tests, listed below:
+[   FAILED ] BarTest.ReturnsTrueOnSuccess
+[   FAILED ] AnotherTest.DoesXyz
+
+ 2 FAILED TESTS
+
+ +You can set the `GTEST_COLOR` environment variable or the `--gtest_color` +command line flag to `yes`, `no`, or `auto` (the default) to enable colors, +disable colors, or let googletest decide. When the value is `auto`, googletest +will use colors if and only if the output goes to a terminal and (on non-Windows +platforms) the `TERM` environment variable is set to `xterm` or `xterm-color`. + +#### Suppressing test passes + +By default, googletest prints 1 line of output for each test, indicating if it +passed or failed. To show only test failures, run the test program with +`--gtest_brief=1`, or set the GTEST_BRIEF environment variable to `1`. + +#### Suppressing the Elapsed Time + +By default, googletest prints the time it takes to run each test. To disable +that, run the test program with the `--gtest_print_time=0` command line flag, or +set the GTEST_PRINT_TIME environment variable to `0`. + +#### Suppressing UTF-8 Text Output + +In case of assertion failures, googletest prints expected and actual values of +type `string` both as hex-encoded strings as well as in readable UTF-8 text if +they contain valid non-ASCII UTF-8 characters. If you want to suppress the UTF-8 +text because, for example, you don't have an UTF-8 compatible output medium, run +the test program with `--gtest_print_utf8=0` or set the `GTEST_PRINT_UTF8` +environment variable to `0`. + +#### Generating an XML Report + +googletest can emit a detailed XML report to a file in addition to its normal +textual output. The report contains the duration of each test, and thus can help +you identify slow tests. + +To generate the XML report, set the `GTEST_OUTPUT` environment variable or the +`--gtest_output` flag to the string `"xml:path_to_output_file"`, which will +create the file at the given location. You can also just use the string `"xml"`, +in which case the output can be found in the `test_detail.xml` file in the +current directory. + +If you specify a directory (for example, `"xml:output/directory/"` on Linux or +`"xml:output\directory\"` on Windows), googletest will create the XML file in +that directory, named after the test executable (e.g. `foo_test.xml` for test +program `foo_test` or `foo_test.exe`). If the file already exists (perhaps left +over from a previous run), googletest will pick a different name (e.g. +`foo_test_1.xml`) to avoid overwriting it. + +The report is based on the `junitreport` Ant task. Since that format was +originally intended for Java, a little interpretation is required to make it +apply to googletest tests, as shown here: + +```xml + + + + + + + + + +``` + +* The root `` element corresponds to the entire test program. +* `` elements correspond to googletest test suites. +* `` elements correspond to googletest test functions. + +For instance, the following program + +```c++ +TEST(MathTest, Addition) { ... } +TEST(MathTest, Subtraction) { ... } +TEST(LogicTest, NonContradiction) { ... } +``` + +could generate this report: + +```xml + + + + + ... + ... + + + + + + + + + +``` + +Things to note: + +* The `tests` attribute of a `` or `` element tells how + many test functions the googletest program or test suite contains, while the + `failures` attribute tells how many of them failed. + +* The `time` attribute expresses the duration of the test, test suite, or + entire test program in seconds. + +* The `timestamp` attribute records the local date and time of the test + execution. + +* Each `` element corresponds to a single failed googletest + assertion. + +#### Generating a JSON Report + +googletest can also emit a JSON report as an alternative format to XML. To +generate the JSON report, set the `GTEST_OUTPUT` environment variable or the +`--gtest_output` flag to the string `"json:path_to_output_file"`, which will +create the file at the given location. You can also just use the string +`"json"`, in which case the output can be found in the `test_detail.json` file +in the current directory. + +The report format conforms to the following JSON Schema: + +```json +{ + "$schema": "http://json-schema.org/schema#", + "type": "object", + "definitions": { + "TestCase": { + "type": "object", + "properties": { + "name": { "type": "string" }, + "tests": { "type": "integer" }, + "failures": { "type": "integer" }, + "disabled": { "type": "integer" }, + "time": { "type": "string" }, + "testsuite": { + "type": "array", + "items": { + "$ref": "#/definitions/TestInfo" + } + } + } + }, + "TestInfo": { + "type": "object", + "properties": { + "name": { "type": "string" }, + "status": { + "type": "string", + "enum": ["RUN", "NOTRUN"] + }, + "time": { "type": "string" }, + "classname": { "type": "string" }, + "failures": { + "type": "array", + "items": { + "$ref": "#/definitions/Failure" + } + } + } + }, + "Failure": { + "type": "object", + "properties": { + "failures": { "type": "string" }, + "type": { "type": "string" } + } + } + }, + "properties": { + "tests": { "type": "integer" }, + "failures": { "type": "integer" }, + "disabled": { "type": "integer" }, + "errors": { "type": "integer" }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "time": { "type": "string" }, + "name": { "type": "string" }, + "testsuites": { + "type": "array", + "items": { + "$ref": "#/definitions/TestCase" + } + } + } +} +``` + +The report uses the format that conforms to the following Proto3 using the +[JSON encoding](https://developers.google.com/protocol-buffers/docs/proto3#json): + +```proto +syntax = "proto3"; + +package googletest; + +import "google/protobuf/timestamp.proto"; +import "google/protobuf/duration.proto"; + +message UnitTest { + int32 tests = 1; + int32 failures = 2; + int32 disabled = 3; + int32 errors = 4; + google.protobuf.Timestamp timestamp = 5; + google.protobuf.Duration time = 6; + string name = 7; + repeated TestCase testsuites = 8; +} + +message TestCase { + string name = 1; + int32 tests = 2; + int32 failures = 3; + int32 disabled = 4; + int32 errors = 5; + google.protobuf.Duration time = 6; + repeated TestInfo testsuite = 7; +} + +message TestInfo { + string name = 1; + enum Status { + RUN = 0; + NOTRUN = 1; + } + Status status = 2; + google.protobuf.Duration time = 3; + string classname = 4; + message Failure { + string failures = 1; + string type = 2; + } + repeated Failure failures = 5; +} +``` + +For instance, the following program + +```c++ +TEST(MathTest, Addition) { ... } +TEST(MathTest, Subtraction) { ... } +TEST(LogicTest, NonContradiction) { ... } +``` + +could generate this report: + +```json +{ + "tests": 3, + "failures": 1, + "errors": 0, + "time": "0.035s", + "timestamp": "2011-10-31T18:52:42Z", + "name": "AllTests", + "testsuites": [ + { + "name": "MathTest", + "tests": 2, + "failures": 1, + "errors": 0, + "time": "0.015s", + "testsuite": [ + { + "name": "Addition", + "status": "RUN", + "time": "0.007s", + "classname": "", + "failures": [ + { + "message": "Value of: add(1, 1)\n Actual: 3\nExpected: 2", + "type": "" + }, + { + "message": "Value of: add(1, -1)\n Actual: 1\nExpected: 0", + "type": "" + } + ] + }, + { + "name": "Subtraction", + "status": "RUN", + "time": "0.005s", + "classname": "" + } + ] + }, + { + "name": "LogicTest", + "tests": 1, + "failures": 0, + "errors": 0, + "time": "0.005s", + "testsuite": [ + { + "name": "NonContradiction", + "status": "RUN", + "time": "0.005s", + "classname": "" + } + ] + } + ] +} +``` + +{: .callout .important} +IMPORTANT: The exact format of the JSON document is subject to change. + +### Controlling How Failures Are Reported + +#### Detecting Test Premature Exit + +Google Test implements the _premature-exit-file_ protocol for test runners to +catch any kind of unexpected exits of test programs. Upon start, Google Test +creates the file which will be automatically deleted after all work has been +finished. Then, the test runner can check if this file exists. In case the file +remains undeleted, the inspected test has exited prematurely. + +This feature is enabled only if the `TEST_PREMATURE_EXIT_FILE` environment +variable has been set. + +#### Turning Assertion Failures into Break-Points + +When running test programs under a debugger, it's very convenient if the +debugger can catch an assertion failure and automatically drop into interactive +mode. googletest's *break-on-failure* mode supports this behavior. + +To enable it, set the `GTEST_BREAK_ON_FAILURE` environment variable to a value +other than `0`. Alternatively, you can use the `--gtest_break_on_failure` +command line flag. + +#### Disabling Catching Test-Thrown Exceptions + +googletest can be used either with or without exceptions enabled. If a test +throws a C++ exception or (on Windows) a structured exception (SEH), by default +googletest catches it, reports it as a test failure, and continues with the next +test method. This maximizes the coverage of a test run. Also, on Windows an +uncaught exception will cause a pop-up window, so catching the exceptions allows +you to run the tests automatically. + +When debugging the test failures, however, you may instead want the exceptions +to be handled by the debugger, such that you can examine the call stack when an +exception is thrown. To achieve that, set the `GTEST_CATCH_EXCEPTIONS` +environment variable to `0`, or use the `--gtest_catch_exceptions=0` flag when +running the tests. + +### Sanitizer Integration + +The +[Undefined Behavior Sanitizer](https://clang.llvm.org/docs/UndefinedBehaviorSanitizer.html), +[Address Sanitizer](https://github.com/google/sanitizers/wiki/AddressSanitizer), +and +[Thread Sanitizer](https://github.com/google/sanitizers/wiki/ThreadSanitizerCppManual) +all provide weak functions that you can override to trigger explicit failures +when they detect sanitizer errors, such as creating a reference from `nullptr`. +To override these functions, place definitions for them in a source file that +you compile as part of your main binary: + +``` +extern "C" { +void __ubsan_on_report() { + FAIL() << "Encountered an undefined behavior sanitizer error"; +} +void __asan_on_error() { + FAIL() << "Encountered an address sanitizer error"; +} +void __tsan_on_report() { + FAIL() << "Encountered a thread sanitizer error"; +} +} // extern "C" +``` + +After compiling your project with one of the sanitizers enabled, if a particular +test triggers a sanitizer error, googletest will report that it failed. diff --git a/graphics/asymptote/LspCpp/third_party/uri/deps/docs/community_created_documentation.md b/graphics/asymptote/LspCpp/third_party/uri/deps/docs/community_created_documentation.md new file mode 100644 index 0000000000..4569075ff2 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/uri/deps/docs/community_created_documentation.md @@ -0,0 +1,7 @@ +# Community-Created Documentation + +The following is a list, in no particular order, of links to documentation +created by the Googletest community. + +* [Googlemock Insights](https://github.com/ElectricRCAircraftGuy/eRCaGuy_dotfiles/blob/master/googletest/insights.md), + by [ElectricRCAircraftGuy](https://github.com/ElectricRCAircraftGuy) diff --git a/graphics/asymptote/LspCpp/third_party/uri/deps/docs/faq.md b/graphics/asymptote/LspCpp/third_party/uri/deps/docs/faq.md new file mode 100644 index 0000000000..b2db186f13 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/uri/deps/docs/faq.md @@ -0,0 +1,692 @@ +# Googletest FAQ + +## Why should test suite names and test names not contain underscore? + +{: .callout .note} +Note: Googletest reserves underscore (`_`) for special purpose keywords, such as +[the `DISABLED_` prefix](advanced.md#temporarily-disabling-tests), in addition +to the following rationale. + +Underscore (`_`) is special, as C++ reserves the following to be used by the +compiler and the standard library: + +1. any identifier that starts with an `_` followed by an upper-case letter, and +2. any identifier that contains two consecutive underscores (i.e. `__`) + *anywhere* in its name. + +User code is *prohibited* from using such identifiers. + +Now let's look at what this means for `TEST` and `TEST_F`. + +Currently `TEST(TestSuiteName, TestName)` generates a class named +`TestSuiteName_TestName_Test`. What happens if `TestSuiteName` or `TestName` +contains `_`? + +1. If `TestSuiteName` starts with an `_` followed by an upper-case letter (say, + `_Foo`), we end up with `_Foo_TestName_Test`, which is reserved and thus + invalid. +2. If `TestSuiteName` ends with an `_` (say, `Foo_`), we get + `Foo__TestName_Test`, which is invalid. +3. If `TestName` starts with an `_` (say, `_Bar`), we get + `TestSuiteName__Bar_Test`, which is invalid. +4. If `TestName` ends with an `_` (say, `Bar_`), we get + `TestSuiteName_Bar__Test`, which is invalid. + +So clearly `TestSuiteName` and `TestName` cannot start or end with `_` +(Actually, `TestSuiteName` can start with `_` -- as long as the `_` isn't +followed by an upper-case letter. But that's getting complicated. So for +simplicity we just say that it cannot start with `_`.). + +It may seem fine for `TestSuiteName` and `TestName` to contain `_` in the +middle. However, consider this: + +```c++ +TEST(Time, Flies_Like_An_Arrow) { ... } +TEST(Time_Flies, Like_An_Arrow) { ... } +``` + +Now, the two `TEST`s will both generate the same class +(`Time_Flies_Like_An_Arrow_Test`). That's not good. + +So for simplicity, we just ask the users to avoid `_` in `TestSuiteName` and +`TestName`. The rule is more constraining than necessary, but it's simple and +easy to remember. It also gives googletest some wiggle room in case its +implementation needs to change in the future. + +If you violate the rule, there may not be immediate consequences, but your test +may (just may) break with a new compiler (or a new version of the compiler you +are using) or with a new version of googletest. Therefore it's best to follow +the rule. + +## Why does googletest support `EXPECT_EQ(NULL, ptr)` and `ASSERT_EQ(NULL, ptr)` but not `EXPECT_NE(NULL, ptr)` and `ASSERT_NE(NULL, ptr)`? + +First of all, you can use `nullptr` with each of these macros, e.g. +`EXPECT_EQ(ptr, nullptr)`, `EXPECT_NE(ptr, nullptr)`, `ASSERT_EQ(ptr, nullptr)`, +`ASSERT_NE(ptr, nullptr)`. This is the preferred syntax in the style guide +because `nullptr` does not have the type problems that `NULL` does. + +Due to some peculiarity of C++, it requires some non-trivial template meta +programming tricks to support using `NULL` as an argument of the `EXPECT_XX()` +and `ASSERT_XX()` macros. Therefore we only do it where it's most needed +(otherwise we make the implementation of googletest harder to maintain and more +error-prone than necessary). + +Historically, the `EXPECT_EQ()` macro took the *expected* value as its first +argument and the *actual* value as the second, though this argument order is now +discouraged. It was reasonable that someone wanted +to write `EXPECT_EQ(NULL, some_expression)`, and this indeed was requested +several times. Therefore we implemented it. + +The need for `EXPECT_NE(NULL, ptr)` wasn't nearly as strong. When the assertion +fails, you already know that `ptr` must be `NULL`, so it doesn't add any +information to print `ptr` in this case. That means `EXPECT_TRUE(ptr != NULL)` +works just as well. + +If we were to support `EXPECT_NE(NULL, ptr)`, for consistency we'd have to +support `EXPECT_NE(ptr, NULL)` as well. This means using the template meta +programming tricks twice in the implementation, making it even harder to +understand and maintain. We believe the benefit doesn't justify the cost. + +Finally, with the growth of the gMock matcher library, we are encouraging people +to use the unified `EXPECT_THAT(value, matcher)` syntax more often in tests. One +significant advantage of the matcher approach is that matchers can be easily +combined to form new matchers, while the `EXPECT_NE`, etc, macros cannot be +easily combined. Therefore we want to invest more in the matchers than in the +`EXPECT_XX()` macros. + +## I need to test that different implementations of an interface satisfy some common requirements. Should I use typed tests or value-parameterized tests? + +For testing various implementations of the same interface, either typed tests or +value-parameterized tests can get it done. It's really up to you the user to +decide which is more convenient for you, depending on your particular case. Some +rough guidelines: + +* Typed tests can be easier to write if instances of the different + implementations can be created the same way, modulo the type. For example, + if all these implementations have a public default constructor (such that + you can write `new TypeParam`), or if their factory functions have the same + form (e.g. `CreateInstance()`). +* Value-parameterized tests can be easier to write if you need different code + patterns to create different implementations' instances, e.g. `new Foo` vs + `new Bar(5)`. To accommodate for the differences, you can write factory + function wrappers and pass these function pointers to the tests as their + parameters. +* When a typed test fails, the default output includes the name of the type, + which can help you quickly identify which implementation is wrong. + Value-parameterized tests only show the number of the failed iteration by + default. You will need to define a function that returns the iteration name + and pass it as the third parameter to INSTANTIATE_TEST_SUITE_P to have more + useful output. +* When using typed tests, you need to make sure you are testing against the + interface type, not the concrete types (in other words, you want to make + sure `implicit_cast(my_concrete_impl)` works, not just that + `my_concrete_impl` works). It's less likely to make mistakes in this area + when using value-parameterized tests. + +I hope I didn't confuse you more. :-) If you don't mind, I'd suggest you to give +both approaches a try. Practice is a much better way to grasp the subtle +differences between the two tools. Once you have some concrete experience, you +can much more easily decide which one to use the next time. + +## I got some run-time errors about invalid proto descriptors when using `ProtocolMessageEquals`. Help! + +{: .callout .note} +**Note:** `ProtocolMessageEquals` and `ProtocolMessageEquiv` are *deprecated* +now. Please use `EqualsProto`, etc instead. + +`ProtocolMessageEquals` and `ProtocolMessageEquiv` were redefined recently and +are now less tolerant of invalid protocol buffer definitions. In particular, if +you have a `foo.proto` that doesn't fully qualify the type of a protocol message +it references (e.g. `message` where it should be `message`), you +will now get run-time errors like: + +``` +... descriptor.cc:...] Invalid proto descriptor for file "path/to/foo.proto": +... descriptor.cc:...] blah.MyMessage.my_field: ".Bar" is not defined. +``` + +If you see this, your `.proto` file is broken and needs to be fixed by making +the types fully qualified. The new definition of `ProtocolMessageEquals` and +`ProtocolMessageEquiv` just happen to reveal your bug. + +## My death test modifies some state, but the change seems lost after the death test finishes. Why? + +Death tests (`EXPECT_DEATH`, etc) are executed in a sub-process s.t. the +expected crash won't kill the test program (i.e. the parent process). As a +result, any in-memory side effects they incur are observable in their respective +sub-processes, but not in the parent process. You can think of them as running +in a parallel universe, more or less. + +In particular, if you use mocking and the death test statement invokes some mock +methods, the parent process will think the calls have never occurred. Therefore, +you may want to move your `EXPECT_CALL` statements inside the `EXPECT_DEATH` +macro. + +## EXPECT_EQ(htonl(blah), blah_blah) generates weird compiler errors in opt mode. Is this a googletest bug? + +Actually, the bug is in `htonl()`. + +According to `'man htonl'`, `htonl()` is a *function*, which means it's valid to +use `htonl` as a function pointer. However, in opt mode `htonl()` is defined as +a *macro*, which breaks this usage. + +Worse, the macro definition of `htonl()` uses a `gcc` extension and is *not* +standard C++. That hacky implementation has some ad hoc limitations. In +particular, it prevents you from writing `Foo()`, where `Foo` +is a template that has an integral argument. + +The implementation of `EXPECT_EQ(a, b)` uses `sizeof(... a ...)` inside a +template argument, and thus doesn't compile in opt mode when `a` contains a call +to `htonl()`. It is difficult to make `EXPECT_EQ` bypass the `htonl()` bug, as +the solution must work with different compilers on various platforms. + +## The compiler complains about "undefined references" to some static const member variables, but I did define them in the class body. What's wrong? + +If your class has a static data member: + +```c++ +// foo.h +class Foo { + ... + static const int kBar = 100; +}; +``` + +You also need to define it *outside* of the class body in `foo.cc`: + +```c++ +const int Foo::kBar; // No initializer here. +``` + +Otherwise your code is **invalid C++**, and may break in unexpected ways. In +particular, using it in googletest comparison assertions (`EXPECT_EQ`, etc) will +generate an "undefined reference" linker error. The fact that "it used to work" +doesn't mean it's valid. It just means that you were lucky. :-) + +If the declaration of the static data member is `constexpr` then it is +implicitly an `inline` definition, and a separate definition in `foo.cc` is not +needed: + +```c++ +// foo.h +class Foo { + ... + static constexpr int kBar = 100; // Defines kBar, no need to do it in foo.cc. +}; +``` + +## Can I derive a test fixture from another? + +Yes. + +Each test fixture has a corresponding and same named test suite. This means only +one test suite can use a particular fixture. Sometimes, however, multiple test +cases may want to use the same or slightly different fixtures. For example, you +may want to make sure that all of a GUI library's test suites don't leak +important system resources like fonts and brushes. + +In googletest, you share a fixture among test suites by putting the shared logic +in a base test fixture, then deriving from that base a separate fixture for each +test suite that wants to use this common logic. You then use `TEST_F()` to write +tests using each derived fixture. + +Typically, your code looks like this: + +```c++ +// Defines a base test fixture. +class BaseTest : public ::testing::Test { + protected: + ... +}; + +// Derives a fixture FooTest from BaseTest. +class FooTest : public BaseTest { + protected: + void SetUp() override { + BaseTest::SetUp(); // Sets up the base fixture first. + ... additional set-up work ... + } + + void TearDown() override { + ... clean-up work for FooTest ... + BaseTest::TearDown(); // Remember to tear down the base fixture + // after cleaning up FooTest! + } + + ... functions and variables for FooTest ... +}; + +// Tests that use the fixture FooTest. +TEST_F(FooTest, Bar) { ... } +TEST_F(FooTest, Baz) { ... } + +... additional fixtures derived from BaseTest ... +``` + +If necessary, you can continue to derive test fixtures from a derived fixture. +googletest has no limit on how deep the hierarchy can be. + +For a complete example using derived test fixtures, see +[sample5_unittest.cc](https://github.com/google/googletest/blob/master/googletest/samples/sample5_unittest.cc). + +## My compiler complains "void value not ignored as it ought to be." What does this mean? + +You're probably using an `ASSERT_*()` in a function that doesn't return `void`. +`ASSERT_*()` can only be used in `void` functions, due to exceptions being +disabled by our build system. Please see more details +[here](advanced.md#assertion-placement). + +## My death test hangs (or seg-faults). How do I fix it? + +In googletest, death tests are run in a child process and the way they work is +delicate. To write death tests you really need to understand how they work—see +the details at [Death Assertions](reference/assertions.md#death) in the +Assertions Reference. + +In particular, death tests don't like having multiple threads in the parent +process. So the first thing you can try is to eliminate creating threads outside +of `EXPECT_DEATH()`. For example, you may want to use mocks or fake objects +instead of real ones in your tests. + +Sometimes this is impossible as some library you must use may be creating +threads before `main()` is even reached. In this case, you can try to minimize +the chance of conflicts by either moving as many activities as possible inside +`EXPECT_DEATH()` (in the extreme case, you want to move everything inside), or +leaving as few things as possible in it. Also, you can try to set the death test +style to `"threadsafe"`, which is safer but slower, and see if it helps. + +If you go with thread-safe death tests, remember that they rerun the test +program from the beginning in the child process. Therefore make sure your +program can run side-by-side with itself and is deterministic. + +In the end, this boils down to good concurrent programming. You have to make +sure that there are no race conditions or deadlocks in your program. No silver +bullet - sorry! + +## Should I use the constructor/destructor of the test fixture or SetUp()/TearDown()? {#CtorVsSetUp} + +The first thing to remember is that googletest does **not** reuse the same test +fixture object across multiple tests. For each `TEST_F`, googletest will create +a **fresh** test fixture object, immediately call `SetUp()`, run the test body, +call `TearDown()`, and then delete the test fixture object. + +When you need to write per-test set-up and tear-down logic, you have the choice +between using the test fixture constructor/destructor or `SetUp()/TearDown()`. +The former is usually preferred, as it has the following benefits: + +* By initializing a member variable in the constructor, we have the option to + make it `const`, which helps prevent accidental changes to its value and + makes the tests more obviously correct. +* In case we need to subclass the test fixture class, the subclass' + constructor is guaranteed to call the base class' constructor *first*, and + the subclass' destructor is guaranteed to call the base class' destructor + *afterward*. With `SetUp()/TearDown()`, a subclass may make the mistake of + forgetting to call the base class' `SetUp()/TearDown()` or call them at the + wrong time. + +You may still want to use `SetUp()/TearDown()` in the following cases: + +* C++ does not allow virtual function calls in constructors and destructors. + You can call a method declared as virtual, but it will not use dynamic + dispatch. It will use the definition from the class the constructor of which + is currently executing. This is because calling a virtual method before the + derived class constructor has a chance to run is very dangerous - the + virtual method might operate on uninitialized data. Therefore, if you need + to call a method that will be overridden in a derived class, you have to use + `SetUp()/TearDown()`. +* In the body of a constructor (or destructor), it's not possible to use the + `ASSERT_xx` macros. Therefore, if the set-up operation could cause a fatal + test failure that should prevent the test from running, it's necessary to + use `abort` and abort the whole test + executable, or to use `SetUp()` instead of a constructor. +* If the tear-down operation could throw an exception, you must use + `TearDown()` as opposed to the destructor, as throwing in a destructor leads + to undefined behavior and usually will kill your program right away. Note + that many standard libraries (like STL) may throw when exceptions are + enabled in the compiler. Therefore you should prefer `TearDown()` if you + want to write portable tests that work with or without exceptions. +* The googletest team is considering making the assertion macros throw on + platforms where exceptions are enabled (e.g. Windows, Mac OS, and Linux + client-side), which will eliminate the need for the user to propagate + failures from a subroutine to its caller. Therefore, you shouldn't use + googletest assertions in a destructor if your code could run on such a + platform. + +## The compiler complains "no matching function to call" when I use ASSERT_PRED*. How do I fix it? + +See details for [`EXPECT_PRED*`](reference/assertions.md#EXPECT_PRED) in the +Assertions Reference. + +## My compiler complains about "ignoring return value" when I call RUN_ALL_TESTS(). Why? + +Some people had been ignoring the return value of `RUN_ALL_TESTS()`. That is, +instead of + +```c++ + return RUN_ALL_TESTS(); +``` + +they write + +```c++ + RUN_ALL_TESTS(); +``` + +This is **wrong and dangerous**. The testing services needs to see the return +value of `RUN_ALL_TESTS()` in order to determine if a test has passed. If your +`main()` function ignores it, your test will be considered successful even if it +has a googletest assertion failure. Very bad. + +We have decided to fix this (thanks to Michael Chastain for the idea). Now, your +code will no longer be able to ignore `RUN_ALL_TESTS()` when compiled with +`gcc`. If you do so, you'll get a compiler error. + +If you see the compiler complaining about you ignoring the return value of +`RUN_ALL_TESTS()`, the fix is simple: just make sure its value is used as the +return value of `main()`. + +But how could we introduce a change that breaks existing tests? Well, in this +case, the code was already broken in the first place, so we didn't break it. :-) + +## My compiler complains that a constructor (or destructor) cannot return a value. What's going on? + +Due to a peculiarity of C++, in order to support the syntax for streaming +messages to an `ASSERT_*`, e.g. + +```c++ + ASSERT_EQ(1, Foo()) << "blah blah" << foo; +``` + +we had to give up using `ASSERT*` and `FAIL*` (but not `EXPECT*` and +`ADD_FAILURE*`) in constructors and destructors. The workaround is to move the +content of your constructor/destructor to a private void member function, or +switch to `EXPECT_*()` if that works. This +[section](advanced.md#assertion-placement) in the user's guide explains it. + +## My SetUp() function is not called. Why? + +C++ is case-sensitive. Did you spell it as `Setup()`? + +Similarly, sometimes people spell `SetUpTestSuite()` as `SetupTestSuite()` and +wonder why it's never called. + +## I have several test suites which share the same test fixture logic, do I have to define a new test fixture class for each of them? This seems pretty tedious. + +You don't have to. Instead of + +```c++ +class FooTest : public BaseTest {}; + +TEST_F(FooTest, Abc) { ... } +TEST_F(FooTest, Def) { ... } + +class BarTest : public BaseTest {}; + +TEST_F(BarTest, Abc) { ... } +TEST_F(BarTest, Def) { ... } +``` + +you can simply `typedef` the test fixtures: + +```c++ +typedef BaseTest FooTest; + +TEST_F(FooTest, Abc) { ... } +TEST_F(FooTest, Def) { ... } + +typedef BaseTest BarTest; + +TEST_F(BarTest, Abc) { ... } +TEST_F(BarTest, Def) { ... } +``` + +## googletest output is buried in a whole bunch of LOG messages. What do I do? + +The googletest output is meant to be a concise and human-friendly report. If +your test generates textual output itself, it will mix with the googletest +output, making it hard to read. However, there is an easy solution to this +problem. + +Since `LOG` messages go to stderr, we decided to let googletest output go to +stdout. This way, you can easily separate the two using redirection. For +example: + +```shell +$ ./my_test > gtest_output.txt +``` + +## Why should I prefer test fixtures over global variables? + +There are several good reasons: + +1. It's likely your test needs to change the states of its global variables. + This makes it difficult to keep side effects from escaping one test and + contaminating others, making debugging difficult. By using fixtures, each + test has a fresh set of variables that's different (but with the same + names). Thus, tests are kept independent of each other. +2. Global variables pollute the global namespace. +3. Test fixtures can be reused via subclassing, which cannot be done easily + with global variables. This is useful if many test suites have something in + common. + +## What can the statement argument in ASSERT_DEATH() be? + +`ASSERT_DEATH(statement, matcher)` (or any death assertion macro) can be used +wherever *`statement`* is valid. So basically *`statement`* can be any C++ +statement that makes sense in the current context. In particular, it can +reference global and/or local variables, and can be: + +* a simple function call (often the case), +* a complex expression, or +* a compound statement. + +Some examples are shown here: + +```c++ +// A death test can be a simple function call. +TEST(MyDeathTest, FunctionCall) { + ASSERT_DEATH(Xyz(5), "Xyz failed"); +} + +// Or a complex expression that references variables and functions. +TEST(MyDeathTest, ComplexExpression) { + const bool c = Condition(); + ASSERT_DEATH((c ? Func1(0) : object2.Method("test")), + "(Func1|Method) failed"); +} + +// Death assertions can be used anywhere in a function. In +// particular, they can be inside a loop. +TEST(MyDeathTest, InsideLoop) { + // Verifies that Foo(0), Foo(1), ..., and Foo(4) all die. + for (int i = 0; i < 5; i++) { + EXPECT_DEATH_M(Foo(i), "Foo has \\d+ errors", + ::testing::Message() << "where i is " << i); + } +} + +// A death assertion can contain a compound statement. +TEST(MyDeathTest, CompoundStatement) { + // Verifies that at lease one of Bar(0), Bar(1), ..., and + // Bar(4) dies. + ASSERT_DEATH({ + for (int i = 0; i < 5; i++) { + Bar(i); + } + }, + "Bar has \\d+ errors"); +} +``` + +## I have a fixture class `FooTest`, but `TEST_F(FooTest, Bar)` gives me error ``"no matching function for call to `FooTest::FooTest()'"``. Why? + +Googletest needs to be able to create objects of your test fixture class, so it +must have a default constructor. Normally the compiler will define one for you. +However, there are cases where you have to define your own: + +* If you explicitly declare a non-default constructor for class `FooTest` + (`DISALLOW_EVIL_CONSTRUCTORS()` does this), then you need to define a + default constructor, even if it would be empty. +* If `FooTest` has a const non-static data member, then you have to define the + default constructor *and* initialize the const member in the initializer + list of the constructor. (Early versions of `gcc` doesn't force you to + initialize the const member. It's a bug that has been fixed in `gcc 4`.) + +## Why does ASSERT_DEATH complain about previous threads that were already joined? + +With the Linux pthread library, there is no turning back once you cross the line +from a single thread to multiple threads. The first time you create a thread, a +manager thread is created in addition, so you get 3, not 2, threads. Later when +the thread you create joins the main thread, the thread count decrements by 1, +but the manager thread will never be killed, so you still have 2 threads, which +means you cannot safely run a death test. + +The new NPTL thread library doesn't suffer from this problem, as it doesn't +create a manager thread. However, if you don't control which machine your test +runs on, you shouldn't depend on this. + +## Why does googletest require the entire test suite, instead of individual tests, to be named *DeathTest when it uses ASSERT_DEATH? + +googletest does not interleave tests from different test suites. That is, it +runs all tests in one test suite first, and then runs all tests in the next test +suite, and so on. googletest does this because it needs to set up a test suite +before the first test in it is run, and tear it down afterwards. Splitting up +the test case would require multiple set-up and tear-down processes, which is +inefficient and makes the semantics unclean. + +If we were to determine the order of tests based on test name instead of test +case name, then we would have a problem with the following situation: + +```c++ +TEST_F(FooTest, AbcDeathTest) { ... } +TEST_F(FooTest, Uvw) { ... } + +TEST_F(BarTest, DefDeathTest) { ... } +TEST_F(BarTest, Xyz) { ... } +``` + +Since `FooTest.AbcDeathTest` needs to run before `BarTest.Xyz`, and we don't +interleave tests from different test suites, we need to run all tests in the +`FooTest` case before running any test in the `BarTest` case. This contradicts +with the requirement to run `BarTest.DefDeathTest` before `FooTest.Uvw`. + +## But I don't like calling my entire test suite \*DeathTest when it contains both death tests and non-death tests. What do I do? + +You don't have to, but if you like, you may split up the test suite into +`FooTest` and `FooDeathTest`, where the names make it clear that they are +related: + +```c++ +class FooTest : public ::testing::Test { ... }; + +TEST_F(FooTest, Abc) { ... } +TEST_F(FooTest, Def) { ... } + +using FooDeathTest = FooTest; + +TEST_F(FooDeathTest, Uvw) { ... EXPECT_DEATH(...) ... } +TEST_F(FooDeathTest, Xyz) { ... ASSERT_DEATH(...) ... } +``` + +## googletest prints the LOG messages in a death test's child process only when the test fails. How can I see the LOG messages when the death test succeeds? + +Printing the LOG messages generated by the statement inside `EXPECT_DEATH()` +makes it harder to search for real problems in the parent's log. Therefore, +googletest only prints them when the death test has failed. + +If you really need to see such LOG messages, a workaround is to temporarily +break the death test (e.g. by changing the regex pattern it is expected to +match). Admittedly, this is a hack. We'll consider a more permanent solution +after the fork-and-exec-style death tests are implemented. + +## The compiler complains about `no match for 'operator<<'` when I use an assertion. What gives? + +If you use a user-defined type `FooType` in an assertion, you must make sure +there is an `std::ostream& operator<<(std::ostream&, const FooType&)` function +defined such that we can print a value of `FooType`. + +In addition, if `FooType` is declared in a name space, the `<<` operator also +needs to be defined in the *same* name space. See +[Tip of the Week #49](http://abseil.io/tips/49) for details. + +## How do I suppress the memory leak messages on Windows? + +Since the statically initialized googletest singleton requires allocations on +the heap, the Visual C++ memory leak detector will report memory leaks at the +end of the program run. The easiest way to avoid this is to use the +`_CrtMemCheckpoint` and `_CrtMemDumpAllObjectsSince` calls to not report any +statically initialized heap objects. See MSDN for more details and additional +heap check/debug routines. + +## How can my code detect if it is running in a test? + +If you write code that sniffs whether it's running in a test and does different +things accordingly, you are leaking test-only logic into production code and +there is no easy way to ensure that the test-only code paths aren't run by +mistake in production. Such cleverness also leads to +[Heisenbugs](https://en.wikipedia.org/wiki/Heisenbug). Therefore we strongly +advise against the practice, and googletest doesn't provide a way to do it. + +In general, the recommended way to cause the code to behave differently under +test is [Dependency Injection](http://en.wikipedia.org/wiki/Dependency_injection). You can inject +different functionality from the test and from the production code. Since your +production code doesn't link in the for-test logic at all (the +[`testonly`](http://docs.bazel.build/versions/master/be/common-definitions.html#common.testonly) attribute for BUILD targets helps to ensure +that), there is no danger in accidentally running it. + +However, if you *really*, *really*, *really* have no choice, and if you follow +the rule of ending your test program names with `_test`, you can use the +*horrible* hack of sniffing your executable name (`argv[0]` in `main()`) to know +whether the code is under test. + +## How do I temporarily disable a test? + +If you have a broken test that you cannot fix right away, you can add the +`DISABLED_` prefix to its name. This will exclude it from execution. This is +better than commenting out the code or using `#if 0`, as disabled tests are +still compiled (and thus won't rot). + +To include disabled tests in test execution, just invoke the test program with +the `--gtest_also_run_disabled_tests` flag. + +## Is it OK if I have two separate `TEST(Foo, Bar)` test methods defined in different namespaces? + +Yes. + +The rule is **all test methods in the same test suite must use the same fixture +class.** This means that the following is **allowed** because both tests use the +same fixture class (`::testing::Test`). + +```c++ +namespace foo { +TEST(CoolTest, DoSomething) { + SUCCEED(); +} +} // namespace foo + +namespace bar { +TEST(CoolTest, DoSomething) { + SUCCEED(); +} +} // namespace bar +``` + +However, the following code is **not allowed** and will produce a runtime error +from googletest because the test methods are using different test fixture +classes with the same test suite name. + +```c++ +namespace foo { +class CoolTest : public ::testing::Test {}; // Fixture foo::CoolTest +TEST_F(CoolTest, DoSomething) { + SUCCEED(); +} +} // namespace foo + +namespace bar { +class CoolTest : public ::testing::Test {}; // Fixture: bar::CoolTest +TEST_F(CoolTest, DoSomething) { + SUCCEED(); +} +} // namespace bar +``` diff --git a/graphics/asymptote/LspCpp/third_party/uri/deps/docs/gmock_cheat_sheet.md b/graphics/asymptote/LspCpp/third_party/uri/deps/docs/gmock_cheat_sheet.md new file mode 100644 index 0000000000..3d164ad629 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/uri/deps/docs/gmock_cheat_sheet.md @@ -0,0 +1,241 @@ +# gMock Cheat Sheet + +## Defining a Mock Class + +### Mocking a Normal Class {#MockClass} + +Given + +```cpp +class Foo { + ... + virtual ~Foo(); + virtual int GetSize() const = 0; + virtual string Describe(const char* name) = 0; + virtual string Describe(int type) = 0; + virtual bool Process(Bar elem, int count) = 0; +}; +``` + +(note that `~Foo()` **must** be virtual) we can define its mock as + +```cpp +#include "gmock/gmock.h" + +class MockFoo : public Foo { + ... + MOCK_METHOD(int, GetSize, (), (const, override)); + MOCK_METHOD(string, Describe, (const char* name), (override)); + MOCK_METHOD(string, Describe, (int type), (override)); + MOCK_METHOD(bool, Process, (Bar elem, int count), (override)); +}; +``` + +To create a "nice" mock, which ignores all uninteresting calls, a "naggy" mock, +which warns on all uninteresting calls, or a "strict" mock, which treats them as +failures: + +```cpp +using ::testing::NiceMock; +using ::testing::NaggyMock; +using ::testing::StrictMock; + +NiceMock nice_foo; // The type is a subclass of MockFoo. +NaggyMock naggy_foo; // The type is a subclass of MockFoo. +StrictMock strict_foo; // The type is a subclass of MockFoo. +``` + +{: .callout .note} +**Note:** A mock object is currently naggy by default. We may make it nice by +default in the future. + +### Mocking a Class Template {#MockTemplate} + +Class templates can be mocked just like any class. + +To mock + +```cpp +template +class StackInterface { + ... + virtual ~StackInterface(); + virtual int GetSize() const = 0; + virtual void Push(const Elem& x) = 0; +}; +``` + +(note that all member functions that are mocked, including `~StackInterface()` +**must** be virtual). + +```cpp +template +class MockStack : public StackInterface { + ... + MOCK_METHOD(int, GetSize, (), (const, override)); + MOCK_METHOD(void, Push, (const Elem& x), (override)); +}; +``` + +### Specifying Calling Conventions for Mock Functions + +If your mock function doesn't use the default calling convention, you can +specify it by adding `Calltype(convention)` to `MOCK_METHOD`'s 4th parameter. +For example, + +```cpp + MOCK_METHOD(bool, Foo, (int n), (Calltype(STDMETHODCALLTYPE))); + MOCK_METHOD(int, Bar, (double x, double y), + (const, Calltype(STDMETHODCALLTYPE))); +``` + +where `STDMETHODCALLTYPE` is defined by `` on Windows. + +## Using Mocks in Tests {#UsingMocks} + +The typical work flow is: + +1. Import the gMock names you need to use. All gMock symbols are in the + `testing` namespace unless they are macros or otherwise noted. +2. Create the mock objects. +3. Optionally, set the default actions of the mock objects. +4. Set your expectations on the mock objects (How will they be called? What + will they do?). +5. Exercise code that uses the mock objects; if necessary, check the result + using googletest assertions. +6. When a mock object is destructed, gMock automatically verifies that all + expectations on it have been satisfied. + +Here's an example: + +```cpp +using ::testing::Return; // #1 + +TEST(BarTest, DoesThis) { + MockFoo foo; // #2 + + ON_CALL(foo, GetSize()) // #3 + .WillByDefault(Return(1)); + // ... other default actions ... + + EXPECT_CALL(foo, Describe(5)) // #4 + .Times(3) + .WillRepeatedly(Return("Category 5")); + // ... other expectations ... + + EXPECT_EQ(MyProductionFunction(&foo), "good"); // #5 +} // #6 +``` + +## Setting Default Actions {#OnCall} + +gMock has a **built-in default action** for any function that returns `void`, +`bool`, a numeric value, or a pointer. In C++11, it will additionally returns +the default-constructed value, if one exists for the given type. + +To customize the default action for functions with return type `T`, use +[`DefaultValue`](reference/mocking.md#DefaultValue). For example: + +```cpp + // Sets the default action for return type std::unique_ptr to + // creating a new Buzz every time. + DefaultValue>::SetFactory( + [] { return MakeUnique(AccessLevel::kInternal); }); + + // When this fires, the default action of MakeBuzz() will run, which + // will return a new Buzz object. + EXPECT_CALL(mock_buzzer_, MakeBuzz("hello")).Times(AnyNumber()); + + auto buzz1 = mock_buzzer_.MakeBuzz("hello"); + auto buzz2 = mock_buzzer_.MakeBuzz("hello"); + EXPECT_NE(buzz1, nullptr); + EXPECT_NE(buzz2, nullptr); + EXPECT_NE(buzz1, buzz2); + + // Resets the default action for return type std::unique_ptr, + // to avoid interfere with other tests. + DefaultValue>::Clear(); +``` + +To customize the default action for a particular method of a specific mock +object, use [`ON_CALL`](reference/mocking.md#ON_CALL). `ON_CALL` has a similar +syntax to `EXPECT_CALL`, but it is used for setting default behaviors when you +do not require that the mock method is called. See +[Knowing When to Expect](gmock_cook_book.md#UseOnCall) for a more detailed +discussion. + +## Setting Expectations {#ExpectCall} + +See [`EXPECT_CALL`](reference/mocking.md#EXPECT_CALL) in the Mocking Reference. + +## Matchers {#MatcherList} + +See the [Matchers Reference](reference/matchers.md). + +## Actions {#ActionList} + +See the [Actions Reference](reference/actions.md). + +## Cardinalities {#CardinalityList} + +See the [`Times` clause](reference/mocking.md#EXPECT_CALL.Times) of +`EXPECT_CALL` in the Mocking Reference. + +## Expectation Order + +By default, expectations can be matched in *any* order. If some or all +expectations must be matched in a given order, you can use the +[`After` clause](reference/mocking.md#EXPECT_CALL.After) or +[`InSequence` clause](reference/mocking.md#EXPECT_CALL.InSequence) of +`EXPECT_CALL`, or use an [`InSequence` object](reference/mocking.md#InSequence). + +## Verifying and Resetting a Mock + +gMock will verify the expectations on a mock object when it is destructed, or +you can do it earlier: + +```cpp +using ::testing::Mock; +... +// Verifies and removes the expectations on mock_obj; +// returns true if and only if successful. +Mock::VerifyAndClearExpectations(&mock_obj); +... +// Verifies and removes the expectations on mock_obj; +// also removes the default actions set by ON_CALL(); +// returns true if and only if successful. +Mock::VerifyAndClear(&mock_obj); +``` + +Do not set new expectations after verifying and clearing a mock after its use. +Setting expectations after code that exercises the mock has undefined behavior. +See [Using Mocks in Tests](gmock_for_dummies.md#using-mocks-in-tests) for more +information. + +You can also tell gMock that a mock object can be leaked and doesn't need to be +verified: + +```cpp +Mock::AllowLeak(&mock_obj); +``` + +## Mock Classes + +gMock defines a convenient mock class template + +```cpp +class MockFunction { + public: + MOCK_METHOD(R, Call, (A1, ..., An)); +}; +``` + +See this [recipe](gmock_cook_book.md#UsingCheckPoints) for one application of +it. + +## Flags + +| Flag | Description | +| :----------------------------- | :---------------------------------------- | +| `--gmock_catch_leaked_mocks=0` | Don't report leaked mock objects as failures. | +| `--gmock_verbose=LEVEL` | Sets the default verbosity level (`info`, `warning`, or `error`) of Google Mock messages. | diff --git a/graphics/asymptote/LspCpp/third_party/uri/deps/docs/gmock_cook_book.md b/graphics/asymptote/LspCpp/third_party/uri/deps/docs/gmock_cook_book.md new file mode 100644 index 0000000000..9494f1222f --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/uri/deps/docs/gmock_cook_book.md @@ -0,0 +1,4299 @@ +# gMock Cookbook + +You can find recipes for using gMock here. If you haven't yet, please read +[the dummy guide](gmock_for_dummies.md) first to make sure you understand the +basics. + +{: .callout .note} +**Note:** gMock lives in the `testing` name space. For readability, it is +recommended to write `using ::testing::Foo;` once in your file before using the +name `Foo` defined by gMock. We omit such `using` statements in this section for +brevity, but you should do it in your own code. + +## Creating Mock Classes + +Mock classes are defined as normal classes, using the `MOCK_METHOD` macro to +generate mocked methods. The macro gets 3 or 4 parameters: + +```cpp +class MyMock { + public: + MOCK_METHOD(ReturnType, MethodName, (Args...)); + MOCK_METHOD(ReturnType, MethodName, (Args...), (Specs...)); +}; +``` + +The first 3 parameters are simply the method declaration, split into 3 parts. +The 4th parameter accepts a closed list of qualifiers, which affect the +generated method: + +* **`const`** - Makes the mocked method a `const` method. Required if + overriding a `const` method. +* **`override`** - Marks the method with `override`. Recommended if overriding + a `virtual` method. +* **`noexcept`** - Marks the method with `noexcept`. Required if overriding a + `noexcept` method. +* **`Calltype(...)`** - Sets the call type for the method (e.g. to + `STDMETHODCALLTYPE`), useful in Windows. +* **`ref(...)`** - Marks the method with the reference qualification + specified. Required if overriding a method that has reference + qualifications. Eg `ref(&)` or `ref(&&)`. + +### Dealing with unprotected commas + +Unprotected commas, i.e. commas which are not surrounded by parentheses, prevent +`MOCK_METHOD` from parsing its arguments correctly: + +{: .bad} +```cpp +class MockFoo { + public: + MOCK_METHOD(std::pair, GetPair, ()); // Won't compile! + MOCK_METHOD(bool, CheckMap, (std::map, bool)); // Won't compile! +}; +``` + +Solution 1 - wrap with parentheses: + +{: .good} +```cpp +class MockFoo { + public: + MOCK_METHOD((std::pair), GetPair, ()); + MOCK_METHOD(bool, CheckMap, ((std::map), bool)); +}; +``` + +Note that wrapping a return or argument type with parentheses is, in general, +invalid C++. `MOCK_METHOD` removes the parentheses. + +Solution 2 - define an alias: + +{: .good} +```cpp +class MockFoo { + public: + using BoolAndInt = std::pair; + MOCK_METHOD(BoolAndInt, GetPair, ()); + using MapIntDouble = std::map; + MOCK_METHOD(bool, CheckMap, (MapIntDouble, bool)); +}; +``` + +### Mocking Private or Protected Methods + +You must always put a mock method definition (`MOCK_METHOD`) in a `public:` +section of the mock class, regardless of the method being mocked being `public`, +`protected`, or `private` in the base class. This allows `ON_CALL` and +`EXPECT_CALL` to reference the mock function from outside of the mock class. +(Yes, C++ allows a subclass to change the access level of a virtual function in +the base class.) Example: + +```cpp +class Foo { + public: + ... + virtual bool Transform(Gadget* g) = 0; + + protected: + virtual void Resume(); + + private: + virtual int GetTimeOut(); +}; + +class MockFoo : public Foo { + public: + ... + MOCK_METHOD(bool, Transform, (Gadget* g), (override)); + + // The following must be in the public section, even though the + // methods are protected or private in the base class. + MOCK_METHOD(void, Resume, (), (override)); + MOCK_METHOD(int, GetTimeOut, (), (override)); +}; +``` + +### Mocking Overloaded Methods + +You can mock overloaded functions as usual. No special attention is required: + +```cpp +class Foo { + ... + + // Must be virtual as we'll inherit from Foo. + virtual ~Foo(); + + // Overloaded on the types and/or numbers of arguments. + virtual int Add(Element x); + virtual int Add(int times, Element x); + + // Overloaded on the const-ness of this object. + virtual Bar& GetBar(); + virtual const Bar& GetBar() const; +}; + +class MockFoo : public Foo { + ... + MOCK_METHOD(int, Add, (Element x), (override)); + MOCK_METHOD(int, Add, (int times, Element x), (override)); + + MOCK_METHOD(Bar&, GetBar, (), (override)); + MOCK_METHOD(const Bar&, GetBar, (), (const, override)); +}; +``` + +{: .callout .note} +**Note:** if you don't mock all versions of the overloaded method, the compiler +will give you a warning about some methods in the base class being hidden. To +fix that, use `using` to bring them in scope: + +```cpp +class MockFoo : public Foo { + ... + using Foo::Add; + MOCK_METHOD(int, Add, (Element x), (override)); + // We don't want to mock int Add(int times, Element x); + ... +}; +``` + +### Mocking Class Templates + +You can mock class templates just like any class. + +```cpp +template +class StackInterface { + ... + // Must be virtual as we'll inherit from StackInterface. + virtual ~StackInterface(); + + virtual int GetSize() const = 0; + virtual void Push(const Elem& x) = 0; +}; + +template +class MockStack : public StackInterface { + ... + MOCK_METHOD(int, GetSize, (), (override)); + MOCK_METHOD(void, Push, (const Elem& x), (override)); +}; +``` + +### Mocking Non-virtual Methods {#MockingNonVirtualMethods} + +gMock can mock non-virtual functions to be used in Hi-perf dependency injection. + +In this case, instead of sharing a common base class with the real class, your +mock class will be *unrelated* to the real class, but contain methods with the +same signatures. The syntax for mocking non-virtual methods is the *same* as +mocking virtual methods (just don't add `override`): + +```cpp +// A simple packet stream class. None of its members is virtual. +class ConcretePacketStream { + public: + void AppendPacket(Packet* new_packet); + const Packet* GetPacket(size_t packet_number) const; + size_t NumberOfPackets() const; + ... +}; + +// A mock packet stream class. It inherits from no other, but defines +// GetPacket() and NumberOfPackets(). +class MockPacketStream { + public: + MOCK_METHOD(const Packet*, GetPacket, (size_t packet_number), (const)); + MOCK_METHOD(size_t, NumberOfPackets, (), (const)); + ... +}; +``` + +Note that the mock class doesn't define `AppendPacket()`, unlike the real class. +That's fine as long as the test doesn't need to call it. + +Next, you need a way to say that you want to use `ConcretePacketStream` in +production code, and use `MockPacketStream` in tests. Since the functions are +not virtual and the two classes are unrelated, you must specify your choice at +*compile time* (as opposed to run time). + +One way to do it is to templatize your code that needs to use a packet stream. +More specifically, you will give your code a template type argument for the type +of the packet stream. In production, you will instantiate your template with +`ConcretePacketStream` as the type argument. In tests, you will instantiate the +same template with `MockPacketStream`. For example, you may write: + +```cpp +template +void CreateConnection(PacketStream* stream) { ... } + +template +class PacketReader { + public: + void ReadPackets(PacketStream* stream, size_t packet_num); +}; +``` + +Then you can use `CreateConnection()` and +`PacketReader` in production code, and use +`CreateConnection()` and `PacketReader` in +tests. + +```cpp + MockPacketStream mock_stream; + EXPECT_CALL(mock_stream, ...)...; + .. set more expectations on mock_stream ... + PacketReader reader(&mock_stream); + ... exercise reader ... +``` + +### Mocking Free Functions + +It is not possible to directly mock a free function (i.e. a C-style function or +a static method). If you need to, you can rewrite your code to use an interface +(abstract class). + +Instead of calling a free function (say, `OpenFile`) directly, introduce an +interface for it and have a concrete subclass that calls the free function: + +```cpp +class FileInterface { + public: + ... + virtual bool Open(const char* path, const char* mode) = 0; +}; + +class File : public FileInterface { + public: + ... + bool Open(const char* path, const char* mode) override { + return OpenFile(path, mode); + } +}; +``` + +Your code should talk to `FileInterface` to open a file. Now it's easy to mock +out the function. + +This may seem like a lot of hassle, but in practice you often have multiple +related functions that you can put in the same interface, so the per-function +syntactic overhead will be much lower. + +If you are concerned about the performance overhead incurred by virtual +functions, and profiling confirms your concern, you can combine this with the +recipe for [mocking non-virtual methods](#MockingNonVirtualMethods). + +### Old-Style `MOCK_METHODn` Macros + +Before the generic `MOCK_METHOD` macro +[was introduced in 2018](https://github.com/google/googletest/commit/c5f08bf91944ce1b19bcf414fa1760e69d20afc2), +mocks where created using a family of macros collectively called `MOCK_METHODn`. +These macros are still supported, though migration to the new `MOCK_METHOD` is +recommended. + +The macros in the `MOCK_METHODn` family differ from `MOCK_METHOD`: + +* The general structure is `MOCK_METHODn(MethodName, ReturnType(Args))`, + instead of `MOCK_METHOD(ReturnType, MethodName, (Args))`. +* The number `n` must equal the number of arguments. +* When mocking a const method, one must use `MOCK_CONST_METHODn`. +* When mocking a class template, the macro name must be suffixed with `_T`. +* In order to specify the call type, the macro name must be suffixed with + `_WITH_CALLTYPE`, and the call type is the first macro argument. + +Old macros and their new equivalents: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Simple
OldMOCK_METHOD1(Foo, bool(int))
NewMOCK_METHOD(bool, Foo, (int))
Const Method
OldMOCK_CONST_METHOD1(Foo, bool(int))
NewMOCK_METHOD(bool, Foo, (int), (const))
Method in a Class Template
OldMOCK_METHOD1_T(Foo, bool(int))
NewMOCK_METHOD(bool, Foo, (int))
Const Method in a Class Template
OldMOCK_CONST_METHOD1_T(Foo, bool(int))
NewMOCK_METHOD(bool, Foo, (int), (const))
Method with Call Type
OldMOCK_METHOD1_WITH_CALLTYPE(STDMETHODCALLTYPE, Foo, bool(int))
NewMOCK_METHOD(bool, Foo, (int), (Calltype(STDMETHODCALLTYPE)))
Const Method with Call Type
OldMOCK_CONST_METHOD1_WITH_CALLTYPE(STDMETHODCALLTYPE, Foo, bool(int))
NewMOCK_METHOD(bool, Foo, (int), (const, Calltype(STDMETHODCALLTYPE)))
Method with Call Type in a Class Template
OldMOCK_METHOD1_T_WITH_CALLTYPE(STDMETHODCALLTYPE, Foo, bool(int))
NewMOCK_METHOD(bool, Foo, (int), (Calltype(STDMETHODCALLTYPE)))
Const Method with Call Type in a Class Template
OldMOCK_CONST_METHOD1_T_WITH_CALLTYPE(STDMETHODCALLTYPE, Foo, bool(int))
NewMOCK_METHOD(bool, Foo, (int), (const, Calltype(STDMETHODCALLTYPE)))
+ +### The Nice, the Strict, and the Naggy {#NiceStrictNaggy} + +If a mock method has no `EXPECT_CALL` spec but is called, we say that it's an +"uninteresting call", and the default action (which can be specified using +`ON_CALL()`) of the method will be taken. Currently, an uninteresting call will +also by default cause gMock to print a warning. (In the future, we might remove +this warning by default.) + +However, sometimes you may want to ignore these uninteresting calls, and +sometimes you may want to treat them as errors. gMock lets you make the decision +on a per-mock-object basis. + +Suppose your test uses a mock class `MockFoo`: + +```cpp +TEST(...) { + MockFoo mock_foo; + EXPECT_CALL(mock_foo, DoThis()); + ... code that uses mock_foo ... +} +``` + +If a method of `mock_foo` other than `DoThis()` is called, you will get a +warning. However, if you rewrite your test to use `NiceMock` instead, +you can suppress the warning: + +```cpp +using ::testing::NiceMock; + +TEST(...) { + NiceMock mock_foo; + EXPECT_CALL(mock_foo, DoThis()); + ... code that uses mock_foo ... +} +``` + +`NiceMock` is a subclass of `MockFoo`, so it can be used wherever +`MockFoo` is accepted. + +It also works if `MockFoo`'s constructor takes some arguments, as +`NiceMock` "inherits" `MockFoo`'s constructors: + +```cpp +using ::testing::NiceMock; + +TEST(...) { + NiceMock mock_foo(5, "hi"); // Calls MockFoo(5, "hi"). + EXPECT_CALL(mock_foo, DoThis()); + ... code that uses mock_foo ... +} +``` + +The usage of `StrictMock` is similar, except that it makes all uninteresting +calls failures: + +```cpp +using ::testing::StrictMock; + +TEST(...) { + StrictMock mock_foo; + EXPECT_CALL(mock_foo, DoThis()); + ... code that uses mock_foo ... + + // The test will fail if a method of mock_foo other than DoThis() + // is called. +} +``` + +{: .callout .note} +NOTE: `NiceMock` and `StrictMock` only affects *uninteresting* calls (calls of +*methods* with no expectations); they do not affect *unexpected* calls (calls of +methods with expectations, but they don't match). See +[Understanding Uninteresting vs Unexpected Calls](#uninteresting-vs-unexpected). + +There are some caveats though (sadly they are side effects of C++'s +limitations): + +1. `NiceMock` and `StrictMock` only work for mock methods + defined using the `MOCK_METHOD` macro **directly** in the `MockFoo` class. + If a mock method is defined in a **base class** of `MockFoo`, the "nice" or + "strict" modifier may not affect it, depending on the compiler. In + particular, nesting `NiceMock` and `StrictMock` (e.g. + `NiceMock >`) is **not** supported. +2. `NiceMock` and `StrictMock` may not work correctly if the + destructor of `MockFoo` is not virtual. We would like to fix this, but it + requires cleaning up existing tests. + +Finally, you should be **very cautious** about when to use naggy or strict +mocks, as they tend to make tests more brittle and harder to maintain. When you +refactor your code without changing its externally visible behavior, ideally you +shouldn't need to update any tests. If your code interacts with a naggy mock, +however, you may start to get spammed with warnings as the result of your +change. Worse, if your code interacts with a strict mock, your tests may start +to fail and you'll be forced to fix them. Our general recommendation is to use +nice mocks (not yet the default) most of the time, use naggy mocks (the current +default) when developing or debugging tests, and use strict mocks only as the +last resort. + +### Simplifying the Interface without Breaking Existing Code {#SimplerInterfaces} + +Sometimes a method has a long list of arguments that is mostly uninteresting. +For example: + +```cpp +class LogSink { + public: + ... + virtual void send(LogSeverity severity, const char* full_filename, + const char* base_filename, int line, + const struct tm* tm_time, + const char* message, size_t message_len) = 0; +}; +``` + +This method's argument list is lengthy and hard to work with (the `message` +argument is not even 0-terminated). If we mock it as is, using the mock will be +awkward. If, however, we try to simplify this interface, we'll need to fix all +clients depending on it, which is often infeasible. + +The trick is to redispatch the method in the mock class: + +```cpp +class ScopedMockLog : public LogSink { + public: + ... + void send(LogSeverity severity, const char* full_filename, + const char* base_filename, int line, const tm* tm_time, + const char* message, size_t message_len) override { + // We are only interested in the log severity, full file name, and + // log message. + Log(severity, full_filename, std::string(message, message_len)); + } + + // Implements the mock method: + // + // void Log(LogSeverity severity, + // const string& file_path, + // const string& message); + MOCK_METHOD(void, Log, + (LogSeverity severity, const string& file_path, + const string& message)); +}; +``` + +By defining a new mock method with a trimmed argument list, we make the mock +class more user-friendly. + +This technique may also be applied to make overloaded methods more amenable to +mocking. For example, when overloads have been used to implement default +arguments: + +```cpp +class MockTurtleFactory : public TurtleFactory { + public: + Turtle* MakeTurtle(int length, int weight) override { ... } + Turtle* MakeTurtle(int length, int weight, int speed) override { ... } + + // the above methods delegate to this one: + MOCK_METHOD(Turtle*, DoMakeTurtle, ()); +}; +``` + +This allows tests that don't care which overload was invoked to avoid specifying +argument matchers: + +```cpp +ON_CALL(factory, DoMakeTurtle) + .WillByDefault(Return(MakeMockTurtle())); +``` + +### Alternative to Mocking Concrete Classes + +Often you may find yourself using classes that don't implement interfaces. In +order to test your code that uses such a class (let's call it `Concrete`), you +may be tempted to make the methods of `Concrete` virtual and then mock it. + +Try not to do that. + +Making a non-virtual function virtual is a big decision. It creates an extension +point where subclasses can tweak your class' behavior. This weakens your control +on the class because now it's harder to maintain the class invariants. You +should make a function virtual only when there is a valid reason for a subclass +to override it. + +Mocking concrete classes directly is problematic as it creates a tight coupling +between the class and the tests - any small change in the class may invalidate +your tests and make test maintenance a pain. + +To avoid such problems, many programmers have been practicing "coding to +interfaces": instead of talking to the `Concrete` class, your code would define +an interface and talk to it. Then you implement that interface as an adaptor on +top of `Concrete`. In tests, you can easily mock that interface to observe how +your code is doing. + +This technique incurs some overhead: + +* You pay the cost of virtual function calls (usually not a problem). +* There is more abstraction for the programmers to learn. + +However, it can also bring significant benefits in addition to better +testability: + +* `Concrete`'s API may not fit your problem domain very well, as you may not + be the only client it tries to serve. By designing your own interface, you + have a chance to tailor it to your need - you may add higher-level + functionalities, rename stuff, etc instead of just trimming the class. This + allows you to write your code (user of the interface) in a more natural way, + which means it will be more readable, more maintainable, and you'll be more + productive. +* If `Concrete`'s implementation ever has to change, you don't have to rewrite + everywhere it is used. Instead, you can absorb the change in your + implementation of the interface, and your other code and tests will be + insulated from this change. + +Some people worry that if everyone is practicing this technique, they will end +up writing lots of redundant code. This concern is totally understandable. +However, there are two reasons why it may not be the case: + +* Different projects may need to use `Concrete` in different ways, so the best + interfaces for them will be different. Therefore, each of them will have its + own domain-specific interface on top of `Concrete`, and they will not be the + same code. +* If enough projects want to use the same interface, they can always share it, + just like they have been sharing `Concrete`. You can check in the interface + and the adaptor somewhere near `Concrete` (perhaps in a `contrib` + sub-directory) and let many projects use it. + +You need to weigh the pros and cons carefully for your particular problem, but +I'd like to assure you that the Java community has been practicing this for a +long time and it's a proven effective technique applicable in a wide variety of +situations. :-) + +### Delegating Calls to a Fake {#DelegatingToFake} + +Some times you have a non-trivial fake implementation of an interface. For +example: + +```cpp +class Foo { + public: + virtual ~Foo() {} + virtual char DoThis(int n) = 0; + virtual void DoThat(const char* s, int* p) = 0; +}; + +class FakeFoo : public Foo { + public: + char DoThis(int n) override { + return (n > 0) ? '+' : + (n < 0) ? '-' : '0'; + } + + void DoThat(const char* s, int* p) override { + *p = strlen(s); + } +}; +``` + +Now you want to mock this interface such that you can set expectations on it. +However, you also want to use `FakeFoo` for the default behavior, as duplicating +it in the mock object is, well, a lot of work. + +When you define the mock class using gMock, you can have it delegate its default +action to a fake class you already have, using this pattern: + +```cpp +class MockFoo : public Foo { + public: + // Normal mock method definitions using gMock. + MOCK_METHOD(char, DoThis, (int n), (override)); + MOCK_METHOD(void, DoThat, (const char* s, int* p), (override)); + + // Delegates the default actions of the methods to a FakeFoo object. + // This must be called *before* the custom ON_CALL() statements. + void DelegateToFake() { + ON_CALL(*this, DoThis).WillByDefault([this](int n) { + return fake_.DoThis(n); + }); + ON_CALL(*this, DoThat).WillByDefault([this](const char* s, int* p) { + fake_.DoThat(s, p); + }); + } + + private: + FakeFoo fake_; // Keeps an instance of the fake in the mock. +}; +``` + +With that, you can use `MockFoo` in your tests as usual. Just remember that if +you don't explicitly set an action in an `ON_CALL()` or `EXPECT_CALL()`, the +fake will be called upon to do it.: + +```cpp +using ::testing::_; + +TEST(AbcTest, Xyz) { + MockFoo foo; + + foo.DelegateToFake(); // Enables the fake for delegation. + + // Put your ON_CALL(foo, ...)s here, if any. + + // No action specified, meaning to use the default action. + EXPECT_CALL(foo, DoThis(5)); + EXPECT_CALL(foo, DoThat(_, _)); + + int n = 0; + EXPECT_EQ('+', foo.DoThis(5)); // FakeFoo::DoThis() is invoked. + foo.DoThat("Hi", &n); // FakeFoo::DoThat() is invoked. + EXPECT_EQ(2, n); +} +``` + +**Some tips:** + +* If you want, you can still override the default action by providing your own + `ON_CALL()` or using `.WillOnce()` / `.WillRepeatedly()` in `EXPECT_CALL()`. +* In `DelegateToFake()`, you only need to delegate the methods whose fake + implementation you intend to use. + +* The general technique discussed here works for overloaded methods, but + you'll need to tell the compiler which version you mean. To disambiguate a + mock function (the one you specify inside the parentheses of `ON_CALL()`), + use [this technique](#SelectOverload); to disambiguate a fake function (the + one you place inside `Invoke()`), use a `static_cast` to specify the + function's type. For instance, if class `Foo` has methods `char DoThis(int + n)` and `bool DoThis(double x) const`, and you want to invoke the latter, + you need to write `Invoke(&fake_, static_cast(&FakeFoo::DoThis))` instead of `Invoke(&fake_, &FakeFoo::DoThis)` + (The strange-looking thing inside the angled brackets of `static_cast` is + the type of a function pointer to the second `DoThis()` method.). + +* Having to mix a mock and a fake is often a sign of something gone wrong. + Perhaps you haven't got used to the interaction-based way of testing yet. Or + perhaps your interface is taking on too many roles and should be split up. + Therefore, **don't abuse this**. We would only recommend to do it as an + intermediate step when you are refactoring your code. + +Regarding the tip on mixing a mock and a fake, here's an example on why it may +be a bad sign: Suppose you have a class `System` for low-level system +operations. In particular, it does file and I/O operations. And suppose you want +to test how your code uses `System` to do I/O, and you just want the file +operations to work normally. If you mock out the entire `System` class, you'll +have to provide a fake implementation for the file operation part, which +suggests that `System` is taking on too many roles. + +Instead, you can define a `FileOps` interface and an `IOOps` interface and split +`System`'s functionalities into the two. Then you can mock `IOOps` without +mocking `FileOps`. + +### Delegating Calls to a Real Object + +When using testing doubles (mocks, fakes, stubs, and etc), sometimes their +behaviors will differ from those of the real objects. This difference could be +either intentional (as in simulating an error such that you can test the error +handling code) or unintentional. If your mocks have different behaviors than the +real objects by mistake, you could end up with code that passes the tests but +fails in production. + +You can use the *delegating-to-real* technique to ensure that your mock has the +same behavior as the real object while retaining the ability to validate calls. +This technique is very similar to the [delegating-to-fake](#DelegatingToFake) +technique, the difference being that we use a real object instead of a fake. +Here's an example: + +```cpp +using ::testing::AtLeast; + +class MockFoo : public Foo { + public: + MockFoo() { + // By default, all calls are delegated to the real object. + ON_CALL(*this, DoThis).WillByDefault([this](int n) { + return real_.DoThis(n); + }); + ON_CALL(*this, DoThat).WillByDefault([this](const char* s, int* p) { + real_.DoThat(s, p); + }); + ... + } + MOCK_METHOD(char, DoThis, ...); + MOCK_METHOD(void, DoThat, ...); + ... + private: + Foo real_; +}; + +... + MockFoo mock; + EXPECT_CALL(mock, DoThis()) + .Times(3); + EXPECT_CALL(mock, DoThat("Hi")) + .Times(AtLeast(1)); + ... use mock in test ... +``` + +With this, gMock will verify that your code made the right calls (with the right +arguments, in the right order, called the right number of times, etc), and a +real object will answer the calls (so the behavior will be the same as in +production). This gives you the best of both worlds. + +### Delegating Calls to a Parent Class + +Ideally, you should code to interfaces, whose methods are all pure virtual. In +reality, sometimes you do need to mock a virtual method that is not pure (i.e, +it already has an implementation). For example: + +```cpp +class Foo { + public: + virtual ~Foo(); + + virtual void Pure(int n) = 0; + virtual int Concrete(const char* str) { ... } +}; + +class MockFoo : public Foo { + public: + // Mocking a pure method. + MOCK_METHOD(void, Pure, (int n), (override)); + // Mocking a concrete method. Foo::Concrete() is shadowed. + MOCK_METHOD(int, Concrete, (const char* str), (override)); +}; +``` + +Sometimes you may want to call `Foo::Concrete()` instead of +`MockFoo::Concrete()`. Perhaps you want to do it as part of a stub action, or +perhaps your test doesn't need to mock `Concrete()` at all (but it would be +oh-so painful to have to define a new mock class whenever you don't need to mock +one of its methods). + +You can call `Foo::Concrete()` inside an action by: + +```cpp +... + EXPECT_CALL(foo, Concrete).WillOnce([&foo](const char* str) { + return foo.Foo::Concrete(str); + }); +``` + +or tell the mock object that you don't want to mock `Concrete()`: + +```cpp +... + ON_CALL(foo, Concrete).WillByDefault([&foo](const char* str) { + return foo.Foo::Concrete(str); + }); +``` + +(Why don't we just write `{ return foo.Concrete(str); }`? If you do that, +`MockFoo::Concrete()` will be called (and cause an infinite recursion) since +`Foo::Concrete()` is virtual. That's just how C++ works.) + +## Using Matchers + +### Matching Argument Values Exactly + +You can specify exactly which arguments a mock method is expecting: + +```cpp +using ::testing::Return; +... + EXPECT_CALL(foo, DoThis(5)) + .WillOnce(Return('a')); + EXPECT_CALL(foo, DoThat("Hello", bar)); +``` + +### Using Simple Matchers + +You can use matchers to match arguments that have a certain property: + +```cpp +using ::testing::NotNull; +using ::testing::Return; +... + EXPECT_CALL(foo, DoThis(Ge(5))) // The argument must be >= 5. + .WillOnce(Return('a')); + EXPECT_CALL(foo, DoThat("Hello", NotNull())); + // The second argument must not be NULL. +``` + +A frequently used matcher is `_`, which matches anything: + +```cpp + EXPECT_CALL(foo, DoThat(_, NotNull())); +``` + +### Combining Matchers {#CombiningMatchers} + +You can build complex matchers from existing ones using `AllOf()`, +`AllOfArray()`, `AnyOf()`, `AnyOfArray()` and `Not()`: + +```cpp +using ::testing::AllOf; +using ::testing::Gt; +using ::testing::HasSubstr; +using ::testing::Ne; +using ::testing::Not; +... + // The argument must be > 5 and != 10. + EXPECT_CALL(foo, DoThis(AllOf(Gt(5), + Ne(10)))); + + // The first argument must not contain sub-string "blah". + EXPECT_CALL(foo, DoThat(Not(HasSubstr("blah")), + NULL)); +``` + +Matchers are function objects, and parametrized matchers can be composed just +like any other function. However because their types can be long and rarely +provide meaningful information, it can be easier to express them with C++14 +generic lambdas to avoid specifying types. For example, + +```cpp +using ::testing::Contains; +using ::testing::Property; + +inline constexpr auto HasFoo = [](const auto& f) { + return Property(&MyClass::foo, Contains(f)); +}; +... + EXPECT_THAT(x, HasFoo("blah")); +``` + +### Casting Matchers {#SafeMatcherCast} + +gMock matchers are statically typed, meaning that the compiler can catch your +mistake if you use a matcher of the wrong type (for example, if you use `Eq(5)` +to match a `string` argument). Good for you! + +Sometimes, however, you know what you're doing and want the compiler to give you +some slack. One example is that you have a matcher for `long` and the argument +you want to match is `int`. While the two types aren't exactly the same, there +is nothing really wrong with using a `Matcher` to match an `int` - after +all, we can first convert the `int` argument to a `long` losslessly before +giving it to the matcher. + +To support this need, gMock gives you the `SafeMatcherCast(m)` function. It +casts a matcher `m` to type `Matcher`. To ensure safety, gMock checks that +(let `U` be the type `m` accepts : + +1. Type `T` can be *implicitly* cast to type `U`; +2. When both `T` and `U` are built-in arithmetic types (`bool`, integers, and + floating-point numbers), the conversion from `T` to `U` is not lossy (in + other words, any value representable by `T` can also be represented by `U`); + and +3. When `U` is a reference, `T` must also be a reference (as the underlying + matcher may be interested in the address of the `U` value). + +The code won't compile if any of these conditions isn't met. + +Here's one example: + +```cpp +using ::testing::SafeMatcherCast; + +// A base class and a child class. +class Base { ... }; +class Derived : public Base { ... }; + +class MockFoo : public Foo { + public: + MOCK_METHOD(void, DoThis, (Derived* derived), (override)); +}; + +... + MockFoo foo; + // m is a Matcher we got from somewhere. + EXPECT_CALL(foo, DoThis(SafeMatcherCast(m))); +``` + +If you find `SafeMatcherCast(m)` too limiting, you can use a similar function +`MatcherCast(m)`. The difference is that `MatcherCast` works as long as you +can `static_cast` type `T` to type `U`. + +`MatcherCast` essentially lets you bypass C++'s type system (`static_cast` isn't +always safe as it could throw away information, for example), so be careful not +to misuse/abuse it. + +### Selecting Between Overloaded Functions {#SelectOverload} + +If you expect an overloaded function to be called, the compiler may need some +help on which overloaded version it is. + +To disambiguate functions overloaded on the const-ness of this object, use the +`Const()` argument wrapper. + +```cpp +using ::testing::ReturnRef; + +class MockFoo : public Foo { + ... + MOCK_METHOD(Bar&, GetBar, (), (override)); + MOCK_METHOD(const Bar&, GetBar, (), (const, override)); +}; + +... + MockFoo foo; + Bar bar1, bar2; + EXPECT_CALL(foo, GetBar()) // The non-const GetBar(). + .WillOnce(ReturnRef(bar1)); + EXPECT_CALL(Const(foo), GetBar()) // The const GetBar(). + .WillOnce(ReturnRef(bar2)); +``` + +(`Const()` is defined by gMock and returns a `const` reference to its argument.) + +To disambiguate overloaded functions with the same number of arguments but +different argument types, you may need to specify the exact type of a matcher, +either by wrapping your matcher in `Matcher()`, or using a matcher whose +type is fixed (`TypedEq`, `An()`, etc): + +```cpp +using ::testing::An; +using ::testing::Matcher; +using ::testing::TypedEq; + +class MockPrinter : public Printer { + public: + MOCK_METHOD(void, Print, (int n), (override)); + MOCK_METHOD(void, Print, (char c), (override)); +}; + +TEST(PrinterTest, Print) { + MockPrinter printer; + + EXPECT_CALL(printer, Print(An())); // void Print(int); + EXPECT_CALL(printer, Print(Matcher(Lt(5)))); // void Print(int); + EXPECT_CALL(printer, Print(TypedEq('a'))); // void Print(char); + + printer.Print(3); + printer.Print(6); + printer.Print('a'); +} +``` + +### Performing Different Actions Based on the Arguments + +When a mock method is called, the *last* matching expectation that's still +active will be selected (think "newer overrides older"). So, you can make a +method do different things depending on its argument values like this: + +```cpp +using ::testing::_; +using ::testing::Lt; +using ::testing::Return; +... + // The default case. + EXPECT_CALL(foo, DoThis(_)) + .WillRepeatedly(Return('b')); + // The more specific case. + EXPECT_CALL(foo, DoThis(Lt(5))) + .WillRepeatedly(Return('a')); +``` + +Now, if `foo.DoThis()` is called with a value less than 5, `'a'` will be +returned; otherwise `'b'` will be returned. + +### Matching Multiple Arguments as a Whole + +Sometimes it's not enough to match the arguments individually. For example, we +may want to say that the first argument must be less than the second argument. +The `With()` clause allows us to match all arguments of a mock function as a +whole. For example, + +```cpp +using ::testing::_; +using ::testing::Ne; +using ::testing::Lt; +... + EXPECT_CALL(foo, InRange(Ne(0), _)) + .With(Lt()); +``` + +says that the first argument of `InRange()` must not be 0, and must be less than +the second argument. + +The expression inside `With()` must be a matcher of type `Matcher>`, where `A1`, ..., `An` are the types of the function arguments. + +You can also write `AllArgs(m)` instead of `m` inside `.With()`. The two forms +are equivalent, but `.With(AllArgs(Lt()))` is more readable than `.With(Lt())`. + +You can use `Args(m)` to match the `n` selected arguments (as a +tuple) against `m`. For example, + +```cpp +using ::testing::_; +using ::testing::AllOf; +using ::testing::Args; +using ::testing::Lt; +... + EXPECT_CALL(foo, Blah) + .With(AllOf(Args<0, 1>(Lt()), Args<1, 2>(Lt()))); +``` + +says that `Blah` will be called with arguments `x`, `y`, and `z` where `x < y < +z`. Note that in this example, it wasn't necessary to specify the positional +matchers. + +As a convenience and example, gMock provides some matchers for 2-tuples, +including the `Lt()` matcher above. See +[Multi-argument Matchers](reference/matchers.md#MultiArgMatchers) for the +complete list. + +Note that if you want to pass the arguments to a predicate of your own (e.g. +`.With(Args<0, 1>(Truly(&MyPredicate)))`), that predicate MUST be written to +take a `std::tuple` as its argument; gMock will pass the `n` selected arguments +as *one* single tuple to the predicate. + +### Using Matchers as Predicates + +Have you noticed that a matcher is just a fancy predicate that also knows how to +describe itself? Many existing algorithms take predicates as arguments (e.g. +those defined in STL's `` header), and it would be a shame if gMock +matchers were not allowed to participate. + +Luckily, you can use a matcher where a unary predicate functor is expected by +wrapping it inside the `Matches()` function. For example, + +```cpp +#include +#include + +using ::testing::Matches; +using ::testing::Ge; + +vector v; +... +// How many elements in v are >= 10? +const int count = count_if(v.begin(), v.end(), Matches(Ge(10))); +``` + +Since you can build complex matchers from simpler ones easily using gMock, this +gives you a way to conveniently construct composite predicates (doing the same +using STL's `` header is just painful). For example, here's a +predicate that's satisfied by any number that is >= 0, <= 100, and != 50: + +```cpp +using testing::AllOf; +using testing::Ge; +using testing::Le; +using testing::Matches; +using testing::Ne; +... +Matches(AllOf(Ge(0), Le(100), Ne(50))) +``` + +### Using Matchers in googletest Assertions + +See [`EXPECT_THAT`](reference/assertions.md#EXPECT_THAT) in the Assertions +Reference. + +### Using Predicates as Matchers + +gMock provides a set of built-in matchers for matching arguments with expected +values—see the [Matchers Reference](reference/matchers.md) for more information. +In case you find the built-in set lacking, you can use an arbitrary unary +predicate function or functor as a matcher - as long as the predicate accepts a +value of the type you want. You do this by wrapping the predicate inside the +`Truly()` function, for example: + +```cpp +using ::testing::Truly; + +int IsEven(int n) { return (n % 2) == 0 ? 1 : 0; } +... + // Bar() must be called with an even number. + EXPECT_CALL(foo, Bar(Truly(IsEven))); +``` + +Note that the predicate function / functor doesn't have to return `bool`. It +works as long as the return value can be used as the condition in in statement +`if (condition) ...`. + +### Matching Arguments that Are Not Copyable + +When you do an `EXPECT_CALL(mock_obj, Foo(bar))`, gMock saves away a copy of +`bar`. When `Foo()` is called later, gMock compares the argument to `Foo()` with +the saved copy of `bar`. This way, you don't need to worry about `bar` being +modified or destroyed after the `EXPECT_CALL()` is executed. The same is true +when you use matchers like `Eq(bar)`, `Le(bar)`, and so on. + +But what if `bar` cannot be copied (i.e. has no copy constructor)? You could +define your own matcher function or callback and use it with `Truly()`, as the +previous couple of recipes have shown. Or, you may be able to get away from it +if you can guarantee that `bar` won't be changed after the `EXPECT_CALL()` is +executed. Just tell gMock that it should save a reference to `bar`, instead of a +copy of it. Here's how: + +```cpp +using ::testing::Eq; +using ::testing::Lt; +... + // Expects that Foo()'s argument == bar. + EXPECT_CALL(mock_obj, Foo(Eq(std::ref(bar)))); + + // Expects that Foo()'s argument < bar. + EXPECT_CALL(mock_obj, Foo(Lt(std::ref(bar)))); +``` + +Remember: if you do this, don't change `bar` after the `EXPECT_CALL()`, or the +result is undefined. + +### Validating a Member of an Object + +Often a mock function takes a reference to object as an argument. When matching +the argument, you may not want to compare the entire object against a fixed +object, as that may be over-specification. Instead, you may need to validate a +certain member variable or the result of a certain getter method of the object. +You can do this with `Field()` and `Property()`. More specifically, + +```cpp +Field(&Foo::bar, m) +``` + +is a matcher that matches a `Foo` object whose `bar` member variable satisfies +matcher `m`. + +```cpp +Property(&Foo::baz, m) +``` + +is a matcher that matches a `Foo` object whose `baz()` method returns a value +that satisfies matcher `m`. + +For example: + +| Expression | Description | +| :--------------------------- | :--------------------------------------- | +| `Field(&Foo::number, Ge(3))` | Matches `x` where `x.number >= 3`. | +| `Property(&Foo::name, StartsWith("John "))` | Matches `x` where `x.name()` starts with `"John "`. | + +Note that in `Property(&Foo::baz, ...)`, method `baz()` must take no argument +and be declared as `const`. Don't use `Property()` against member functions that +you do not own, because taking addresses of functions is fragile and generally +not part of the contract of the function. + +`Field()` and `Property()` can also match plain pointers to objects. For +instance, + +```cpp +using ::testing::Field; +using ::testing::Ge; +... +Field(&Foo::number, Ge(3)) +``` + +matches a plain pointer `p` where `p->number >= 3`. If `p` is `NULL`, the match +will always fail regardless of the inner matcher. + +What if you want to validate more than one members at the same time? Remember +that there are [`AllOf()` and `AllOfArray()`](#CombiningMatchers). + +Finally `Field()` and `Property()` provide overloads that take the field or +property names as the first argument to include it in the error message. This +can be useful when creating combined matchers. + +```cpp +using ::testing::AllOf; +using ::testing::Field; +using ::testing::Matcher; +using ::testing::SafeMatcherCast; + +Matcher IsFoo(const Foo& foo) { + return AllOf(Field("some_field", &Foo::some_field, foo.some_field), + Field("other_field", &Foo::other_field, foo.other_field), + Field("last_field", &Foo::last_field, foo.last_field)); +} +``` + +### Validating the Value Pointed to by a Pointer Argument + +C++ functions often take pointers as arguments. You can use matchers like +`IsNull()`, `NotNull()`, and other comparison matchers to match a pointer, but +what if you want to make sure the value *pointed to* by the pointer, instead of +the pointer itself, has a certain property? Well, you can use the `Pointee(m)` +matcher. + +`Pointee(m)` matches a pointer if and only if `m` matches the value the pointer +points to. For example: + +```cpp +using ::testing::Ge; +using ::testing::Pointee; +... + EXPECT_CALL(foo, Bar(Pointee(Ge(3)))); +``` + +expects `foo.Bar()` to be called with a pointer that points to a value greater +than or equal to 3. + +One nice thing about `Pointee()` is that it treats a `NULL` pointer as a match +failure, so you can write `Pointee(m)` instead of + +```cpp +using ::testing::AllOf; +using ::testing::NotNull; +using ::testing::Pointee; +... + AllOf(NotNull(), Pointee(m)) +``` + +without worrying that a `NULL` pointer will crash your test. + +Also, did we tell you that `Pointee()` works with both raw pointers **and** +smart pointers (`std::unique_ptr`, `std::shared_ptr`, etc)? + +What if you have a pointer to pointer? You guessed it - you can use nested +`Pointee()` to probe deeper inside the value. For example, +`Pointee(Pointee(Lt(3)))` matches a pointer that points to a pointer that points +to a number less than 3 (what a mouthful...). + +### Testing a Certain Property of an Object + +Sometimes you want to specify that an object argument has a certain property, +but there is no existing matcher that does this. If you want good error +messages, you should [define a matcher](#NewMatchers). If you want to do it +quick and dirty, you could get away with writing an ordinary function. + +Let's say you have a mock function that takes an object of type `Foo`, which has +an `int bar()` method and an `int baz()` method, and you want to constrain that +the argument's `bar()` value plus its `baz()` value is a given number. Here's +how you can define a matcher to do it: + +```cpp +using ::testing::Matcher; + +class BarPlusBazEqMatcher { + public: + explicit BarPlusBazEqMatcher(int expected_sum) + : expected_sum_(expected_sum) {} + + bool MatchAndExplain(const Foo& foo, + std::ostream* /* listener */) const { + return (foo.bar() + foo.baz()) == expected_sum_; + } + + void DescribeTo(std::ostream& os) const { + os << "bar() + baz() equals " << expected_sum_; + } + + void DescribeNegationTo(std::ostream& os) const { + os << "bar() + baz() does not equal " << expected_sum_; + } + private: + const int expected_sum_; +}; + +Matcher BarPlusBazEq(int expected_sum) { + return BarPlusBazEqMatcher(expected_sum); +} + +... + EXPECT_CALL(..., DoThis(BarPlusBazEq(5)))...; +``` + +### Matching Containers + +Sometimes an STL container (e.g. list, vector, map, ...) is passed to a mock +function and you may want to validate it. Since most STL containers support the +`==` operator, you can write `Eq(expected_container)` or simply +`expected_container` to match a container exactly. + +Sometimes, though, you may want to be more flexible (for example, the first +element must be an exact match, but the second element can be any positive +number, and so on). Also, containers used in tests often have a small number of +elements, and having to define the expected container out-of-line is a bit of a +hassle. + +You can use the `ElementsAre()` or `UnorderedElementsAre()` matcher in such +cases: + +```cpp +using ::testing::_; +using ::testing::ElementsAre; +using ::testing::Gt; +... + MOCK_METHOD(void, Foo, (const vector& numbers), (override)); +... + EXPECT_CALL(mock, Foo(ElementsAre(1, Gt(0), _, 5))); +``` + +The above matcher says that the container must have 4 elements, which must be 1, +greater than 0, anything, and 5 respectively. + +If you instead write: + +```cpp +using ::testing::_; +using ::testing::Gt; +using ::testing::UnorderedElementsAre; +... + MOCK_METHOD(void, Foo, (const vector& numbers), (override)); +... + EXPECT_CALL(mock, Foo(UnorderedElementsAre(1, Gt(0), _, 5))); +``` + +It means that the container must have 4 elements, which (under some permutation) +must be 1, greater than 0, anything, and 5 respectively. + +As an alternative you can place the arguments in a C-style array and use +`ElementsAreArray()` or `UnorderedElementsAreArray()` instead: + +```cpp +using ::testing::ElementsAreArray; +... + // ElementsAreArray accepts an array of element values. + const int expected_vector1[] = {1, 5, 2, 4, ...}; + EXPECT_CALL(mock, Foo(ElementsAreArray(expected_vector1))); + + // Or, an array of element matchers. + Matcher expected_vector2[] = {1, Gt(2), _, 3, ...}; + EXPECT_CALL(mock, Foo(ElementsAreArray(expected_vector2))); +``` + +In case the array needs to be dynamically created (and therefore the array size +cannot be inferred by the compiler), you can give `ElementsAreArray()` an +additional argument to specify the array size: + +```cpp +using ::testing::ElementsAreArray; +... + int* const expected_vector3 = new int[count]; + ... fill expected_vector3 with values ... + EXPECT_CALL(mock, Foo(ElementsAreArray(expected_vector3, count))); +``` + +Use `Pair` when comparing maps or other associative containers. + +{% raw %} + +```cpp +using testing::ElementsAre; +using testing::Pair; +... + std::map m = {{"a", 1}, {"b", 2}, {"c", 3}}; + EXPECT_THAT(m, ElementsAre(Pair("a", 1), Pair("b", 2), Pair("c", 3))); +``` + +{% endraw %} + +**Tips:** + +* `ElementsAre*()` can be used to match *any* container that implements the + STL iterator pattern (i.e. it has a `const_iterator` type and supports + `begin()/end()`), not just the ones defined in STL. It will even work with + container types yet to be written - as long as they follows the above + pattern. +* You can use nested `ElementsAre*()` to match nested (multi-dimensional) + containers. +* If the container is passed by pointer instead of by reference, just write + `Pointee(ElementsAre*(...))`. +* The order of elements *matters* for `ElementsAre*()`. If you are using it + with containers whose element order are undefined (e.g. `hash_map`) you + should use `WhenSorted` around `ElementsAre`. + +### Sharing Matchers + +Under the hood, a gMock matcher object consists of a pointer to a ref-counted +implementation object. Copying matchers is allowed and very efficient, as only +the pointer is copied. When the last matcher that references the implementation +object dies, the implementation object will be deleted. + +Therefore, if you have some complex matcher that you want to use again and +again, there is no need to build it every time. Just assign it to a matcher +variable and use that variable repeatedly! For example, + +```cpp +using ::testing::AllOf; +using ::testing::Gt; +using ::testing::Le; +using ::testing::Matcher; +... + Matcher in_range = AllOf(Gt(5), Le(10)); + ... use in_range as a matcher in multiple EXPECT_CALLs ... +``` + +### Matchers must have no side-effects {#PureMatchers} + +{: .callout .warning} +WARNING: gMock does not guarantee when or how many times a matcher will be +invoked. Therefore, all matchers must be *purely functional*: they cannot have +any side effects, and the match result must not depend on anything other than +the matcher's parameters and the value being matched. + +This requirement must be satisfied no matter how a matcher is defined (e.g., if +it is one of the standard matchers, or a custom matcher). In particular, a +matcher can never call a mock function, as that will affect the state of the +mock object and gMock. + +## Setting Expectations + +### Knowing When to Expect {#UseOnCall} + +**`ON_CALL`** is likely the *single most under-utilized construct* in gMock. + +There are basically two constructs for defining the behavior of a mock object: +`ON_CALL` and `EXPECT_CALL`. The difference? `ON_CALL` defines what happens when +a mock method is called, but doesn't imply any expectation on the method +being called. `EXPECT_CALL` not only defines the behavior, but also sets an +expectation that the method will be called with the given arguments, for the +given number of times (and *in the given order* when you specify the order +too). + +Since `EXPECT_CALL` does more, isn't it better than `ON_CALL`? Not really. Every +`EXPECT_CALL` adds a constraint on the behavior of the code under test. Having +more constraints than necessary is *baaad* - even worse than not having enough +constraints. + +This may be counter-intuitive. How could tests that verify more be worse than +tests that verify less? Isn't verification the whole point of tests? + +The answer lies in *what* a test should verify. **A good test verifies the +contract of the code.** If a test over-specifies, it doesn't leave enough +freedom to the implementation. As a result, changing the implementation without +breaking the contract (e.g. refactoring and optimization), which should be +perfectly fine to do, can break such tests. Then you have to spend time fixing +them, only to see them broken again the next time the implementation is changed. + +Keep in mind that one doesn't have to verify more than one property in one test. +In fact, **it's a good style to verify only one thing in one test.** If you do +that, a bug will likely break only one or two tests instead of dozens (which +case would you rather debug?). If you are also in the habit of giving tests +descriptive names that tell what they verify, you can often easily guess what's +wrong just from the test log itself. + +So use `ON_CALL` by default, and only use `EXPECT_CALL` when you actually intend +to verify that the call is made. For example, you may have a bunch of `ON_CALL`s +in your test fixture to set the common mock behavior shared by all tests in the +same group, and write (scarcely) different `EXPECT_CALL`s in different `TEST_F`s +to verify different aspects of the code's behavior. Compared with the style +where each `TEST` has many `EXPECT_CALL`s, this leads to tests that are more +resilient to implementational changes (and thus less likely to require +maintenance) and makes the intent of the tests more obvious (so they are easier +to maintain when you do need to maintain them). + +If you are bothered by the "Uninteresting mock function call" message printed +when a mock method without an `EXPECT_CALL` is called, you may use a `NiceMock` +instead to suppress all such messages for the mock object, or suppress the +message for specific methods by adding `EXPECT_CALL(...).Times(AnyNumber())`. DO +NOT suppress it by blindly adding an `EXPECT_CALL(...)`, or you'll have a test +that's a pain to maintain. + +### Ignoring Uninteresting Calls + +If you are not interested in how a mock method is called, just don't say +anything about it. In this case, if the method is ever called, gMock will +perform its default action to allow the test program to continue. If you are not +happy with the default action taken by gMock, you can override it using +`DefaultValue::Set()` (described [here](#DefaultValue)) or `ON_CALL()`. + +Please note that once you expressed interest in a particular mock method (via +`EXPECT_CALL()`), all invocations to it must match some expectation. If this +function is called but the arguments don't match any `EXPECT_CALL()` statement, +it will be an error. + +### Disallowing Unexpected Calls + +If a mock method shouldn't be called at all, explicitly say so: + +```cpp +using ::testing::_; +... + EXPECT_CALL(foo, Bar(_)) + .Times(0); +``` + +If some calls to the method are allowed, but the rest are not, just list all the +expected calls: + +```cpp +using ::testing::AnyNumber; +using ::testing::Gt; +... + EXPECT_CALL(foo, Bar(5)); + EXPECT_CALL(foo, Bar(Gt(10))) + .Times(AnyNumber()); +``` + +A call to `foo.Bar()` that doesn't match any of the `EXPECT_CALL()` statements +will be an error. + +### Understanding Uninteresting vs Unexpected Calls {#uninteresting-vs-unexpected} + +*Uninteresting* calls and *unexpected* calls are different concepts in gMock. +*Very* different. + +A call `x.Y(...)` is **uninteresting** if there's *not even a single* +`EXPECT_CALL(x, Y(...))` set. In other words, the test isn't interested in the +`x.Y()` method at all, as evident in that the test doesn't care to say anything +about it. + +A call `x.Y(...)` is **unexpected** if there are *some* `EXPECT_CALL(x, +Y(...))`s set, but none of them matches the call. Put another way, the test is +interested in the `x.Y()` method (therefore it explicitly sets some +`EXPECT_CALL` to verify how it's called); however, the verification fails as the +test doesn't expect this particular call to happen. + +**An unexpected call is always an error,** as the code under test doesn't behave +the way the test expects it to behave. + +**By default, an uninteresting call is not an error,** as it violates no +constraint specified by the test. (gMock's philosophy is that saying nothing +means there is no constraint.) However, it leads to a warning, as it *might* +indicate a problem (e.g. the test author might have forgotten to specify a +constraint). + +In gMock, `NiceMock` and `StrictMock` can be used to make a mock class "nice" or +"strict". How does this affect uninteresting calls and unexpected calls? + +A **nice mock** suppresses uninteresting call *warnings*. It is less chatty than +the default mock, but otherwise is the same. If a test fails with a default +mock, it will also fail using a nice mock instead. And vice versa. Don't expect +making a mock nice to change the test's result. + +A **strict mock** turns uninteresting call warnings into errors. So making a +mock strict may change the test's result. + +Let's look at an example: + +```cpp +TEST(...) { + NiceMock mock_registry; + EXPECT_CALL(mock_registry, GetDomainOwner("google.com")) + .WillRepeatedly(Return("Larry Page")); + + // Use mock_registry in code under test. + ... &mock_registry ... +} +``` + +The sole `EXPECT_CALL` here says that all calls to `GetDomainOwner()` must have +`"google.com"` as the argument. If `GetDomainOwner("yahoo.com")` is called, it +will be an unexpected call, and thus an error. *Having a nice mock doesn't +change the severity of an unexpected call.* + +So how do we tell gMock that `GetDomainOwner()` can be called with some other +arguments as well? The standard technique is to add a "catch all" `EXPECT_CALL`: + +```cpp + EXPECT_CALL(mock_registry, GetDomainOwner(_)) + .Times(AnyNumber()); // catches all other calls to this method. + EXPECT_CALL(mock_registry, GetDomainOwner("google.com")) + .WillRepeatedly(Return("Larry Page")); +``` + +Remember that `_` is the wildcard matcher that matches anything. With this, if +`GetDomainOwner("google.com")` is called, it will do what the second +`EXPECT_CALL` says; if it is called with a different argument, it will do what +the first `EXPECT_CALL` says. + +Note that the order of the two `EXPECT_CALL`s is important, as a newer +`EXPECT_CALL` takes precedence over an older one. + +For more on uninteresting calls, nice mocks, and strict mocks, read +["The Nice, the Strict, and the Naggy"](#NiceStrictNaggy). + +### Ignoring Uninteresting Arguments {#ParameterlessExpectations} + +If your test doesn't care about the parameters (it only cares about the number +or order of calls), you can often simply omit the parameter list: + +```cpp + // Expect foo.Bar( ... ) twice with any arguments. + EXPECT_CALL(foo, Bar).Times(2); + + // Delegate to the given method whenever the factory is invoked. + ON_CALL(foo_factory, MakeFoo) + .WillByDefault(&BuildFooForTest); +``` + +This functionality is only available when a method is not overloaded; to prevent +unexpected behavior it is a compilation error to try to set an expectation on a +method where the specific overload is ambiguous. You can work around this by +supplying a [simpler mock interface](#SimplerInterfaces) than the mocked class +provides. + +This pattern is also useful when the arguments are interesting, but match logic +is substantially complex. You can leave the argument list unspecified and use +SaveArg actions to [save the values for later verification](#SaveArgVerify). If +you do that, you can easily differentiate calling the method the wrong number of +times from calling it with the wrong arguments. + +### Expecting Ordered Calls {#OrderedCalls} + +Although an `EXPECT_CALL()` statement defined later takes precedence when gMock +tries to match a function call with an expectation, by default calls don't have +to happen in the order `EXPECT_CALL()` statements are written. For example, if +the arguments match the matchers in the second `EXPECT_CALL()`, but not those in +the first and third, then the second expectation will be used. + +If you would rather have all calls occur in the order of the expectations, put +the `EXPECT_CALL()` statements in a block where you define a variable of type +`InSequence`: + +```cpp +using ::testing::_; +using ::testing::InSequence; + + { + InSequence s; + + EXPECT_CALL(foo, DoThis(5)); + EXPECT_CALL(bar, DoThat(_)) + .Times(2); + EXPECT_CALL(foo, DoThis(6)); + } +``` + +In this example, we expect a call to `foo.DoThis(5)`, followed by two calls to +`bar.DoThat()` where the argument can be anything, which are in turn followed by +a call to `foo.DoThis(6)`. If a call occurred out-of-order, gMock will report an +error. + +### Expecting Partially Ordered Calls {#PartialOrder} + +Sometimes requiring everything to occur in a predetermined order can lead to +brittle tests. For example, we may care about `A` occurring before both `B` and +`C`, but aren't interested in the relative order of `B` and `C`. In this case, +the test should reflect our real intent, instead of being overly constraining. + +gMock allows you to impose an arbitrary DAG (directed acyclic graph) on the +calls. One way to express the DAG is to use the +[`After` clause](reference/mocking.md#EXPECT_CALL.After) of `EXPECT_CALL`. + +Another way is via the `InSequence()` clause (not the same as the `InSequence` +class), which we borrowed from jMock 2. It's less flexible than `After()`, but +more convenient when you have long chains of sequential calls, as it doesn't +require you to come up with different names for the expectations in the chains. +Here's how it works: + +If we view `EXPECT_CALL()` statements as nodes in a graph, and add an edge from +node A to node B wherever A must occur before B, we can get a DAG. We use the +term "sequence" to mean a directed path in this DAG. Now, if we decompose the +DAG into sequences, we just need to know which sequences each `EXPECT_CALL()` +belongs to in order to be able to reconstruct the original DAG. + +So, to specify the partial order on the expectations we need to do two things: +first to define some `Sequence` objects, and then for each `EXPECT_CALL()` say +which `Sequence` objects it is part of. + +Expectations in the same sequence must occur in the order they are written. For +example, + +```cpp +using ::testing::Sequence; +... + Sequence s1, s2; + + EXPECT_CALL(foo, A()) + .InSequence(s1, s2); + EXPECT_CALL(bar, B()) + .InSequence(s1); + EXPECT_CALL(bar, C()) + .InSequence(s2); + EXPECT_CALL(foo, D()) + .InSequence(s2); +``` + +specifies the following DAG (where `s1` is `A -> B`, and `s2` is `A -> C -> D`): + +```text + +---> B + | + A ---| + | + +---> C ---> D +``` + +This means that A must occur before B and C, and C must occur before D. There's +no restriction about the order other than these. + +### Controlling When an Expectation Retires + +When a mock method is called, gMock only considers expectations that are still +active. An expectation is active when created, and becomes inactive (aka +*retires*) when a call that has to occur later has occurred. For example, in + +```cpp +using ::testing::_; +using ::testing::Sequence; +... + Sequence s1, s2; + + EXPECT_CALL(log, Log(WARNING, _, "File too large.")) // #1 + .Times(AnyNumber()) + .InSequence(s1, s2); + EXPECT_CALL(log, Log(WARNING, _, "Data set is empty.")) // #2 + .InSequence(s1); + EXPECT_CALL(log, Log(WARNING, _, "User not found.")) // #3 + .InSequence(s2); +``` + +as soon as either #2 or #3 is matched, #1 will retire. If a warning `"File too +large."` is logged after this, it will be an error. + +Note that an expectation doesn't retire automatically when it's saturated. For +example, + +```cpp +using ::testing::_; +... + EXPECT_CALL(log, Log(WARNING, _, _)); // #1 + EXPECT_CALL(log, Log(WARNING, _, "File too large.")); // #2 +``` + +says that there will be exactly one warning with the message `"File too +large."`. If the second warning contains this message too, #2 will match again +and result in an upper-bound-violated error. + +If this is not what you want, you can ask an expectation to retire as soon as it +becomes saturated: + +```cpp +using ::testing::_; +... + EXPECT_CALL(log, Log(WARNING, _, _)); // #1 + EXPECT_CALL(log, Log(WARNING, _, "File too large.")) // #2 + .RetiresOnSaturation(); +``` + +Here #2 can be used only once, so if you have two warnings with the message +`"File too large."`, the first will match #2 and the second will match #1 - +there will be no error. + +## Using Actions + +### Returning References from Mock Methods + +If a mock function's return type is a reference, you need to use `ReturnRef()` +instead of `Return()` to return a result: + +```cpp +using ::testing::ReturnRef; + +class MockFoo : public Foo { + public: + MOCK_METHOD(Bar&, GetBar, (), (override)); +}; +... + MockFoo foo; + Bar bar; + EXPECT_CALL(foo, GetBar()) + .WillOnce(ReturnRef(bar)); +... +``` + +### Returning Live Values from Mock Methods + +The `Return(x)` action saves a copy of `x` when the action is created, and +always returns the same value whenever it's executed. Sometimes you may want to +instead return the *live* value of `x` (i.e. its value at the time when the +action is *executed*.). Use either `ReturnRef()` or `ReturnPointee()` for this +purpose. + +If the mock function's return type is a reference, you can do it using +`ReturnRef(x)`, as shown in the previous recipe ("Returning References from Mock +Methods"). However, gMock doesn't let you use `ReturnRef()` in a mock function +whose return type is not a reference, as doing that usually indicates a user +error. So, what shall you do? + +Though you may be tempted, DO NOT use `std::ref()`: + +```cpp +using testing::Return; + +class MockFoo : public Foo { + public: + MOCK_METHOD(int, GetValue, (), (override)); +}; +... + int x = 0; + MockFoo foo; + EXPECT_CALL(foo, GetValue()) + .WillRepeatedly(Return(std::ref(x))); // Wrong! + x = 42; + EXPECT_EQ(42, foo.GetValue()); +``` + +Unfortunately, it doesn't work here. The above code will fail with error: + +```text +Value of: foo.GetValue() + Actual: 0 +Expected: 42 +``` + +The reason is that `Return(*value*)` converts `value` to the actual return type +of the mock function at the time when the action is *created*, not when it is +*executed*. (This behavior was chosen for the action to be safe when `value` is +a proxy object that references some temporary objects.) As a result, +`std::ref(x)` is converted to an `int` value (instead of a `const int&`) when +the expectation is set, and `Return(std::ref(x))` will always return 0. + +`ReturnPointee(pointer)` was provided to solve this problem specifically. It +returns the value pointed to by `pointer` at the time the action is *executed*: + +```cpp +using testing::ReturnPointee; +... + int x = 0; + MockFoo foo; + EXPECT_CALL(foo, GetValue()) + .WillRepeatedly(ReturnPointee(&x)); // Note the & here. + x = 42; + EXPECT_EQ(42, foo.GetValue()); // This will succeed now. +``` + +### Combining Actions + +Want to do more than one thing when a function is called? That's fine. `DoAll()` +allow you to do sequence of actions every time. Only the return value of the +last action in the sequence will be used. + +```cpp +using ::testing::_; +using ::testing::DoAll; + +class MockFoo : public Foo { + public: + MOCK_METHOD(bool, Bar, (int n), (override)); +}; +... + EXPECT_CALL(foo, Bar(_)) + .WillOnce(DoAll(action_1, + action_2, + ... + action_n)); +``` + +### Verifying Complex Arguments {#SaveArgVerify} + +If you want to verify that a method is called with a particular argument but the +match criteria is complex, it can be difficult to distinguish between +cardinality failures (calling the method the wrong number of times) and argument +match failures. Similarly, if you are matching multiple parameters, it may not +be easy to distinguishing which argument failed to match. For example: + +```cpp + // Not ideal: this could fail because of a problem with arg1 or arg2, or maybe + // just the method wasn't called. + EXPECT_CALL(foo, SendValues(_, ElementsAre(1, 4, 4, 7), EqualsProto( ... ))); +``` + +You can instead save the arguments and test them individually: + +```cpp + EXPECT_CALL(foo, SendValues) + .WillOnce(DoAll(SaveArg<1>(&actual_array), SaveArg<2>(&actual_proto))); + ... run the test + EXPECT_THAT(actual_array, ElementsAre(1, 4, 4, 7)); + EXPECT_THAT(actual_proto, EqualsProto( ... )); +``` + +### Mocking Side Effects {#MockingSideEffects} + +Sometimes a method exhibits its effect not via returning a value but via side +effects. For example, it may change some global state or modify an output +argument. To mock side effects, in general you can define your own action by +implementing `::testing::ActionInterface`. + +If all you need to do is to change an output argument, the built-in +`SetArgPointee()` action is convenient: + +```cpp +using ::testing::_; +using ::testing::SetArgPointee; + +class MockMutator : public Mutator { + public: + MOCK_METHOD(void, Mutate, (bool mutate, int* value), (override)); + ... +} +... + MockMutator mutator; + EXPECT_CALL(mutator, Mutate(true, _)) + .WillOnce(SetArgPointee<1>(5)); +``` + +In this example, when `mutator.Mutate()` is called, we will assign 5 to the +`int` variable pointed to by argument #1 (0-based). + +`SetArgPointee()` conveniently makes an internal copy of the value you pass to +it, removing the need to keep the value in scope and alive. The implication +however is that the value must have a copy constructor and assignment operator. + +If the mock method also needs to return a value as well, you can chain +`SetArgPointee()` with `Return()` using `DoAll()`, remembering to put the +`Return()` statement last: + +```cpp +using ::testing::_; +using ::testing::DoAll; +using ::testing::Return; +using ::testing::SetArgPointee; + +class MockMutator : public Mutator { + public: + ... + MOCK_METHOD(bool, MutateInt, (int* value), (override)); +} +... + MockMutator mutator; + EXPECT_CALL(mutator, MutateInt(_)) + .WillOnce(DoAll(SetArgPointee<0>(5), + Return(true))); +``` + +Note, however, that if you use the `ReturnOKWith()` method, it will override the +values provided by `SetArgPointee()` in the response parameters of your function +call. + +If the output argument is an array, use the `SetArrayArgument(first, last)` +action instead. It copies the elements in source range `[first, last)` to the +array pointed to by the `N`-th (0-based) argument: + +```cpp +using ::testing::NotNull; +using ::testing::SetArrayArgument; + +class MockArrayMutator : public ArrayMutator { + public: + MOCK_METHOD(void, Mutate, (int* values, int num_values), (override)); + ... +} +... + MockArrayMutator mutator; + int values[5] = {1, 2, 3, 4, 5}; + EXPECT_CALL(mutator, Mutate(NotNull(), 5)) + .WillOnce(SetArrayArgument<0>(values, values + 5)); +``` + +This also works when the argument is an output iterator: + +```cpp +using ::testing::_; +using ::testing::SetArrayArgument; + +class MockRolodex : public Rolodex { + public: + MOCK_METHOD(void, GetNames, (std::back_insert_iterator>), + (override)); + ... +} +... + MockRolodex rolodex; + vector names = {"George", "John", "Thomas"}; + EXPECT_CALL(rolodex, GetNames(_)) + .WillOnce(SetArrayArgument<0>(names.begin(), names.end())); +``` + +### Changing a Mock Object's Behavior Based on the State + +If you expect a call to change the behavior of a mock object, you can use +`::testing::InSequence` to specify different behaviors before and after the +call: + +```cpp +using ::testing::InSequence; +using ::testing::Return; + +... + { + InSequence seq; + EXPECT_CALL(my_mock, IsDirty()) + .WillRepeatedly(Return(true)); + EXPECT_CALL(my_mock, Flush()); + EXPECT_CALL(my_mock, IsDirty()) + .WillRepeatedly(Return(false)); + } + my_mock.FlushIfDirty(); +``` + +This makes `my_mock.IsDirty()` return `true` before `my_mock.Flush()` is called +and return `false` afterwards. + +If the behavior change is more complex, you can store the effects in a variable +and make a mock method get its return value from that variable: + +```cpp +using ::testing::_; +using ::testing::SaveArg; +using ::testing::Return; + +ACTION_P(ReturnPointee, p) { return *p; } +... + int previous_value = 0; + EXPECT_CALL(my_mock, GetPrevValue) + .WillRepeatedly(ReturnPointee(&previous_value)); + EXPECT_CALL(my_mock, UpdateValue) + .WillRepeatedly(SaveArg<0>(&previous_value)); + my_mock.DoSomethingToUpdateValue(); +``` + +Here `my_mock.GetPrevValue()` will always return the argument of the last +`UpdateValue()` call. + +### Setting the Default Value for a Return Type {#DefaultValue} + +If a mock method's return type is a built-in C++ type or pointer, by default it +will return 0 when invoked. Also, in C++ 11 and above, a mock method whose +return type has a default constructor will return a default-constructed value by +default. You only need to specify an action if this default value doesn't work +for you. + +Sometimes, you may want to change this default value, or you may want to specify +a default value for types gMock doesn't know about. You can do this using the +`::testing::DefaultValue` class template: + +```cpp +using ::testing::DefaultValue; + +class MockFoo : public Foo { + public: + MOCK_METHOD(Bar, CalculateBar, (), (override)); +}; + + +... + Bar default_bar; + // Sets the default return value for type Bar. + DefaultValue::Set(default_bar); + + MockFoo foo; + + // We don't need to specify an action here, as the default + // return value works for us. + EXPECT_CALL(foo, CalculateBar()); + + foo.CalculateBar(); // This should return default_bar. + + // Unsets the default return value. + DefaultValue::Clear(); +``` + +Please note that changing the default value for a type can make your tests hard +to understand. We recommend you to use this feature judiciously. For example, +you may want to make sure the `Set()` and `Clear()` calls are right next to the +code that uses your mock. + +### Setting the Default Actions for a Mock Method + +You've learned how to change the default value of a given type. However, this +may be too coarse for your purpose: perhaps you have two mock methods with the +same return type and you want them to have different behaviors. The `ON_CALL()` +macro allows you to customize your mock's behavior at the method level: + +```cpp +using ::testing::_; +using ::testing::AnyNumber; +using ::testing::Gt; +using ::testing::Return; +... + ON_CALL(foo, Sign(_)) + .WillByDefault(Return(-1)); + ON_CALL(foo, Sign(0)) + .WillByDefault(Return(0)); + ON_CALL(foo, Sign(Gt(0))) + .WillByDefault(Return(1)); + + EXPECT_CALL(foo, Sign(_)) + .Times(AnyNumber()); + + foo.Sign(5); // This should return 1. + foo.Sign(-9); // This should return -1. + foo.Sign(0); // This should return 0. +``` + +As you may have guessed, when there are more than one `ON_CALL()` statements, +the newer ones in the order take precedence over the older ones. In other words, +the **last** one that matches the function arguments will be used. This matching +order allows you to set up the common behavior in a mock object's constructor or +the test fixture's set-up phase and specialize the mock's behavior later. + +Note that both `ON_CALL` and `EXPECT_CALL` have the same "later statements take +precedence" rule, but they don't interact. That is, `EXPECT_CALL`s have their +own precedence order distinct from the `ON_CALL` precedence order. + +### Using Functions/Methods/Functors/Lambdas as Actions {#FunctionsAsActions} + +If the built-in actions don't suit you, you can use an existing callable +(function, `std::function`, method, functor, lambda) as an action. + +```cpp +using ::testing::_; using ::testing::Invoke; + +class MockFoo : public Foo { + public: + MOCK_METHOD(int, Sum, (int x, int y), (override)); + MOCK_METHOD(bool, ComplexJob, (int x), (override)); +}; + +int CalculateSum(int x, int y) { return x + y; } +int Sum3(int x, int y, int z) { return x + y + z; } + +class Helper { + public: + bool ComplexJob(int x); +}; + +... + MockFoo foo; + Helper helper; + EXPECT_CALL(foo, Sum(_, _)) + .WillOnce(&CalculateSum) + .WillRepeatedly(Invoke(NewPermanentCallback(Sum3, 1))); + EXPECT_CALL(foo, ComplexJob(_)) + .WillOnce(Invoke(&helper, &Helper::ComplexJob)) + .WillOnce([] { return true; }) + .WillRepeatedly([](int x) { return x > 0; }); + + foo.Sum(5, 6); // Invokes CalculateSum(5, 6). + foo.Sum(2, 3); // Invokes Sum3(1, 2, 3). + foo.ComplexJob(10); // Invokes helper.ComplexJob(10). + foo.ComplexJob(-1); // Invokes the inline lambda. +``` + +The only requirement is that the type of the function, etc must be *compatible* +with the signature of the mock function, meaning that the latter's arguments (if +it takes any) can be implicitly converted to the corresponding arguments of the +former, and the former's return type can be implicitly converted to that of the +latter. So, you can invoke something whose type is *not* exactly the same as the +mock function, as long as it's safe to do so - nice, huh? + +Note that: + +* The action takes ownership of the callback and will delete it when the + action itself is destructed. +* If the type of a callback is derived from a base callback type `C`, you need + to implicitly cast it to `C` to resolve the overloading, e.g. + + ```cpp + using ::testing::Invoke; + ... + ResultCallback* is_ok = ...; + ... Invoke(is_ok) ...; // This works. + + BlockingClosure* done = new BlockingClosure; + ... Invoke(implicit_cast(done)) ...; // The cast is necessary. + ``` + +### Using Functions with Extra Info as Actions + +The function or functor you call using `Invoke()` must have the same number of +arguments as the mock function you use it for. Sometimes you may have a function +that takes more arguments, and you are willing to pass in the extra arguments +yourself to fill the gap. You can do this in gMock using callbacks with +pre-bound arguments. Here's an example: + +```cpp +using ::testing::Invoke; + +class MockFoo : public Foo { + public: + MOCK_METHOD(char, DoThis, (int n), (override)); +}; + +char SignOfSum(int x, int y) { + const int sum = x + y; + return (sum > 0) ? '+' : (sum < 0) ? '-' : '0'; +} + +TEST_F(FooTest, Test) { + MockFoo foo; + + EXPECT_CALL(foo, DoThis(2)) + .WillOnce(Invoke(NewPermanentCallback(SignOfSum, 5))); + EXPECT_EQ('+', foo.DoThis(2)); // Invokes SignOfSum(5, 2). +} +``` + +### Invoking a Function/Method/Functor/Lambda/Callback Without Arguments + +`Invoke()` passes the mock function's arguments to the function, etc being +invoked such that the callee has the full context of the call to work with. If +the invoked function is not interested in some or all of the arguments, it can +simply ignore them. + +Yet, a common pattern is that a test author wants to invoke a function without +the arguments of the mock function. She could do that using a wrapper function +that throws away the arguments before invoking an underlining nullary function. +Needless to say, this can be tedious and obscures the intent of the test. + +There are two solutions to this problem. First, you can pass any callable of +zero args as an action. Alternatively, use `InvokeWithoutArgs()`, which is like +`Invoke()` except that it doesn't pass the mock function's arguments to the +callee. Here's an example of each: + +```cpp +using ::testing::_; +using ::testing::InvokeWithoutArgs; + +class MockFoo : public Foo { + public: + MOCK_METHOD(bool, ComplexJob, (int n), (override)); +}; + +bool Job1() { ... } +bool Job2(int n, char c) { ... } + +... + MockFoo foo; + EXPECT_CALL(foo, ComplexJob(_)) + .WillOnce([] { Job1(); }); + .WillOnce(InvokeWithoutArgs(NewPermanentCallback(Job2, 5, 'a'))); + + foo.ComplexJob(10); // Invokes Job1(). + foo.ComplexJob(20); // Invokes Job2(5, 'a'). +``` + +Note that: + +* The action takes ownership of the callback and will delete it when the + action itself is destructed. +* If the type of a callback is derived from a base callback type `C`, you need + to implicitly cast it to `C` to resolve the overloading, e.g. + + ```cpp + using ::testing::InvokeWithoutArgs; + ... + ResultCallback* is_ok = ...; + ... InvokeWithoutArgs(is_ok) ...; // This works. + + BlockingClosure* done = ...; + ... InvokeWithoutArgs(implicit_cast(done)) ...; + // The cast is necessary. + ``` + +### Invoking an Argument of the Mock Function + +Sometimes a mock function will receive a function pointer, a functor (in other +words, a "callable") as an argument, e.g. + +```cpp +class MockFoo : public Foo { + public: + MOCK_METHOD(bool, DoThis, (int n, (ResultCallback1* callback)), + (override)); +}; +``` + +and you may want to invoke this callable argument: + +```cpp +using ::testing::_; +... + MockFoo foo; + EXPECT_CALL(foo, DoThis(_, _)) + .WillOnce(...); + // Will execute callback->Run(5), where callback is the + // second argument DoThis() receives. +``` + +{: .callout .note} +NOTE: The section below is legacy documentation from before C++ had lambdas: + +Arghh, you need to refer to a mock function argument but C++ has no lambda +(yet), so you have to define your own action. :-( Or do you really? + +Well, gMock has an action to solve *exactly* this problem: + +```cpp +InvokeArgument(arg_1, arg_2, ..., arg_m) +``` + +will invoke the `N`-th (0-based) argument the mock function receives, with +`arg_1`, `arg_2`, ..., and `arg_m`. No matter if the argument is a function +pointer, a functor, or a callback. gMock handles them all. + +With that, you could write: + +```cpp +using ::testing::_; +using ::testing::InvokeArgument; +... + EXPECT_CALL(foo, DoThis(_, _)) + .WillOnce(InvokeArgument<1>(5)); + // Will execute callback->Run(5), where callback is the + // second argument DoThis() receives. +``` + +What if the callable takes an argument by reference? No problem - just wrap it +inside `std::ref()`: + +```cpp + ... + MOCK_METHOD(bool, Bar, + ((ResultCallback2* callback)), + (override)); + ... + using ::testing::_; + using ::testing::InvokeArgument; + ... + MockFoo foo; + Helper helper; + ... + EXPECT_CALL(foo, Bar(_)) + .WillOnce(InvokeArgument<0>(5, std::ref(helper))); + // std::ref(helper) guarantees that a reference to helper, not a copy of + // it, will be passed to the callback. +``` + +What if the callable takes an argument by reference and we do **not** wrap the +argument in `std::ref()`? Then `InvokeArgument()` will *make a copy* of the +argument, and pass a *reference to the copy*, instead of a reference to the +original value, to the callable. This is especially handy when the argument is a +temporary value: + +```cpp + ... + MOCK_METHOD(bool, DoThat, (bool (*f)(const double& x, const string& s)), + (override)); + ... + using ::testing::_; + using ::testing::InvokeArgument; + ... + MockFoo foo; + ... + EXPECT_CALL(foo, DoThat(_)) + .WillOnce(InvokeArgument<0>(5.0, string("Hi"))); + // Will execute (*f)(5.0, string("Hi")), where f is the function pointer + // DoThat() receives. Note that the values 5.0 and string("Hi") are + // temporary and dead once the EXPECT_CALL() statement finishes. Yet + // it's fine to perform this action later, since a copy of the values + // are kept inside the InvokeArgument action. +``` + +### Ignoring an Action's Result + +Sometimes you have an action that returns *something*, but you need an action +that returns `void` (perhaps you want to use it in a mock function that returns +`void`, or perhaps it needs to be used in `DoAll()` and it's not the last in the +list). `IgnoreResult()` lets you do that. For example: + +```cpp +using ::testing::_; +using ::testing::DoAll; +using ::testing::IgnoreResult; +using ::testing::Return; + +int Process(const MyData& data); +string DoSomething(); + +class MockFoo : public Foo { + public: + MOCK_METHOD(void, Abc, (const MyData& data), (override)); + MOCK_METHOD(bool, Xyz, (), (override)); +}; + + ... + MockFoo foo; + EXPECT_CALL(foo, Abc(_)) + // .WillOnce(Invoke(Process)); + // The above line won't compile as Process() returns int but Abc() needs + // to return void. + .WillOnce(IgnoreResult(Process)); + EXPECT_CALL(foo, Xyz()) + .WillOnce(DoAll(IgnoreResult(DoSomething), + // Ignores the string DoSomething() returns. + Return(true))); +``` + +Note that you **cannot** use `IgnoreResult()` on an action that already returns +`void`. Doing so will lead to ugly compiler errors. + +### Selecting an Action's Arguments {#SelectingArgs} + +Say you have a mock function `Foo()` that takes seven arguments, and you have a +custom action that you want to invoke when `Foo()` is called. Trouble is, the +custom action only wants three arguments: + +```cpp +using ::testing::_; +using ::testing::Invoke; +... + MOCK_METHOD(bool, Foo, + (bool visible, const string& name, int x, int y, + (const map>), double& weight, double min_weight, + double max_wight)); +... +bool IsVisibleInQuadrant1(bool visible, int x, int y) { + return visible && x >= 0 && y >= 0; +} +... + EXPECT_CALL(mock, Foo) + .WillOnce(Invoke(IsVisibleInQuadrant1)); // Uh, won't compile. :-( +``` + +To please the compiler God, you need to define an "adaptor" that has the same +signature as `Foo()` and calls the custom action with the right arguments: + +```cpp +using ::testing::_; +using ::testing::Invoke; +... +bool MyIsVisibleInQuadrant1(bool visible, const string& name, int x, int y, + const map, double>& weight, + double min_weight, double max_wight) { + return IsVisibleInQuadrant1(visible, x, y); +} +... + EXPECT_CALL(mock, Foo) + .WillOnce(Invoke(MyIsVisibleInQuadrant1)); // Now it works. +``` + +But isn't this awkward? + +gMock provides a generic *action adaptor*, so you can spend your time minding +more important business than writing your own adaptors. Here's the syntax: + +```cpp +WithArgs(action) +``` + +creates an action that passes the arguments of the mock function at the given +indices (0-based) to the inner `action` and performs it. Using `WithArgs`, our +original example can be written as: + +```cpp +using ::testing::_; +using ::testing::Invoke; +using ::testing::WithArgs; +... + EXPECT_CALL(mock, Foo) + .WillOnce(WithArgs<0, 2, 3>(Invoke(IsVisibleInQuadrant1))); // No need to define your own adaptor. +``` + +For better readability, gMock also gives you: + +* `WithoutArgs(action)` when the inner `action` takes *no* argument, and +* `WithArg(action)` (no `s` after `Arg`) when the inner `action` takes + *one* argument. + +As you may have realized, `InvokeWithoutArgs(...)` is just syntactic sugar for +`WithoutArgs(Invoke(...))`. + +Here are more tips: + +* The inner action used in `WithArgs` and friends does not have to be + `Invoke()` -- it can be anything. +* You can repeat an argument in the argument list if necessary, e.g. + `WithArgs<2, 3, 3, 5>(...)`. +* You can change the order of the arguments, e.g. `WithArgs<3, 2, 1>(...)`. +* The types of the selected arguments do *not* have to match the signature of + the inner action exactly. It works as long as they can be implicitly + converted to the corresponding arguments of the inner action. For example, + if the 4-th argument of the mock function is an `int` and `my_action` takes + a `double`, `WithArg<4>(my_action)` will work. + +### Ignoring Arguments in Action Functions + +The [selecting-an-action's-arguments](#SelectingArgs) recipe showed us one way +to make a mock function and an action with incompatible argument lists fit +together. The downside is that wrapping the action in `WithArgs<...>()` can get +tedious for people writing the tests. + +If you are defining a function (or method, functor, lambda, callback) to be used +with `Invoke*()`, and you are not interested in some of its arguments, an +alternative to `WithArgs` is to declare the uninteresting arguments as `Unused`. +This makes the definition less cluttered and less fragile in case the types of +the uninteresting arguments change. It could also increase the chance the action +function can be reused. For example, given + +```cpp + public: + MOCK_METHOD(double, Foo, double(const string& label, double x, double y), + (override)); + MOCK_METHOD(double, Bar, (int index, double x, double y), (override)); +``` + +instead of + +```cpp +using ::testing::_; +using ::testing::Invoke; + +double DistanceToOriginWithLabel(const string& label, double x, double y) { + return sqrt(x*x + y*y); +} +double DistanceToOriginWithIndex(int index, double x, double y) { + return sqrt(x*x + y*y); +} +... + EXPECT_CALL(mock, Foo("abc", _, _)) + .WillOnce(Invoke(DistanceToOriginWithLabel)); + EXPECT_CALL(mock, Bar(5, _, _)) + .WillOnce(Invoke(DistanceToOriginWithIndex)); +``` + +you could write + +```cpp +using ::testing::_; +using ::testing::Invoke; +using ::testing::Unused; + +double DistanceToOrigin(Unused, double x, double y) { + return sqrt(x*x + y*y); +} +... + EXPECT_CALL(mock, Foo("abc", _, _)) + .WillOnce(Invoke(DistanceToOrigin)); + EXPECT_CALL(mock, Bar(5, _, _)) + .WillOnce(Invoke(DistanceToOrigin)); +``` + +### Sharing Actions + +Just like matchers, a gMock action object consists of a pointer to a ref-counted +implementation object. Therefore copying actions is also allowed and very +efficient. When the last action that references the implementation object dies, +the implementation object will be deleted. + +If you have some complex action that you want to use again and again, you may +not have to build it from scratch every time. If the action doesn't have an +internal state (i.e. if it always does the same thing no matter how many times +it has been called), you can assign it to an action variable and use that +variable repeatedly. For example: + +```cpp +using ::testing::Action; +using ::testing::DoAll; +using ::testing::Return; +using ::testing::SetArgPointee; +... + Action set_flag = DoAll(SetArgPointee<0>(5), + Return(true)); + ... use set_flag in .WillOnce() and .WillRepeatedly() ... +``` + +However, if the action has its own state, you may be surprised if you share the +action object. Suppose you have an action factory `IncrementCounter(init)` which +creates an action that increments and returns a counter whose initial value is +`init`, using two actions created from the same expression and using a shared +action will exhibit different behaviors. Example: + +```cpp + EXPECT_CALL(foo, DoThis()) + .WillRepeatedly(IncrementCounter(0)); + EXPECT_CALL(foo, DoThat()) + .WillRepeatedly(IncrementCounter(0)); + foo.DoThis(); // Returns 1. + foo.DoThis(); // Returns 2. + foo.DoThat(); // Returns 1 - Blah() uses a different + // counter than Bar()'s. +``` + +versus + +```cpp +using ::testing::Action; +... + Action increment = IncrementCounter(0); + EXPECT_CALL(foo, DoThis()) + .WillRepeatedly(increment); + EXPECT_CALL(foo, DoThat()) + .WillRepeatedly(increment); + foo.DoThis(); // Returns 1. + foo.DoThis(); // Returns 2. + foo.DoThat(); // Returns 3 - the counter is shared. +``` + +### Testing Asynchronous Behavior + +One oft-encountered problem with gMock is that it can be hard to test +asynchronous behavior. Suppose you had a `EventQueue` class that you wanted to +test, and you created a separate `EventDispatcher` interface so that you could +easily mock it out. However, the implementation of the class fired all the +events on a background thread, which made test timings difficult. You could just +insert `sleep()` statements and hope for the best, but that makes your test +behavior nondeterministic. A better way is to use gMock actions and +`Notification` objects to force your asynchronous test to behave synchronously. + +```cpp +class MockEventDispatcher : public EventDispatcher { + MOCK_METHOD(bool, DispatchEvent, (int32), (override)); +}; + +TEST(EventQueueTest, EnqueueEventTest) { + MockEventDispatcher mock_event_dispatcher; + EventQueue event_queue(&mock_event_dispatcher); + + const int32 kEventId = 321; + absl::Notification done; + EXPECT_CALL(mock_event_dispatcher, DispatchEvent(kEventId)) + .WillOnce([&done] { done.Notify(); }); + + event_queue.EnqueueEvent(kEventId); + done.WaitForNotification(); +} +``` + +In the example above, we set our normal gMock expectations, but then add an +additional action to notify the `Notification` object. Now we can just call +`Notification::WaitForNotification()` in the main thread to wait for the +asynchronous call to finish. After that, our test suite is complete and we can +safely exit. + +{: .callout .note} +Note: this example has a downside: namely, if the expectation is not satisfied, +our test will run forever. It will eventually time-out and fail, but it will +take longer and be slightly harder to debug. To alleviate this problem, you can +use `WaitForNotificationWithTimeout(ms)` instead of `WaitForNotification()`. + +## Misc Recipes on Using gMock + +### Mocking Methods That Use Move-Only Types + +C++11 introduced *move-only types*. A move-only-typed value can be moved from +one object to another, but cannot be copied. `std::unique_ptr` is probably +the most commonly used move-only type. + +Mocking a method that takes and/or returns move-only types presents some +challenges, but nothing insurmountable. This recipe shows you how you can do it. +Note that the support for move-only method arguments was only introduced to +gMock in April 2017; in older code, you may find more complex +[workarounds](#LegacyMoveOnly) for lack of this feature. + +Let’s say we are working on a fictional project that lets one post and share +snippets called “buzzes”. Your code uses these types: + +```cpp +enum class AccessLevel { kInternal, kPublic }; + +class Buzz { + public: + explicit Buzz(AccessLevel access) { ... } + ... +}; + +class Buzzer { + public: + virtual ~Buzzer() {} + virtual std::unique_ptr MakeBuzz(StringPiece text) = 0; + virtual bool ShareBuzz(std::unique_ptr buzz, int64_t timestamp) = 0; + ... +}; +``` + +A `Buzz` object represents a snippet being posted. A class that implements the +`Buzzer` interface is capable of creating and sharing `Buzz`es. Methods in +`Buzzer` may return a `unique_ptr` or take a `unique_ptr`. Now we +need to mock `Buzzer` in our tests. + +To mock a method that accepts or returns move-only types, you just use the +familiar `MOCK_METHOD` syntax as usual: + +```cpp +class MockBuzzer : public Buzzer { + public: + MOCK_METHOD(std::unique_ptr, MakeBuzz, (StringPiece text), (override)); + MOCK_METHOD(bool, ShareBuzz, (std::unique_ptr buzz, int64_t timestamp), + (override)); +}; +``` + +Now that we have the mock class defined, we can use it in tests. In the +following code examples, we assume that we have defined a `MockBuzzer` object +named `mock_buzzer_`: + +```cpp + MockBuzzer mock_buzzer_; +``` + +First let’s see how we can set expectations on the `MakeBuzz()` method, which +returns a `unique_ptr`. + +As usual, if you set an expectation without an action (i.e. the `.WillOnce()` or +`.WillRepeatedly()` clause), when that expectation fires, the default action for +that method will be taken. Since `unique_ptr<>` has a default constructor that +returns a null `unique_ptr`, that’s what you’ll get if you don’t specify an +action: + +```cpp + // Use the default action. + EXPECT_CALL(mock_buzzer_, MakeBuzz("hello")); + + // Triggers the previous EXPECT_CALL. + EXPECT_EQ(nullptr, mock_buzzer_.MakeBuzz("hello")); +``` + +If you are not happy with the default action, you can tweak it as usual; see +[Setting Default Actions](#OnCall). + +If you just need to return a pre-defined move-only value, you can use the +`Return(ByMove(...))` action: + +```cpp + // When this fires, the unique_ptr<> specified by ByMove(...) will + // be returned. + EXPECT_CALL(mock_buzzer_, MakeBuzz("world")) + .WillOnce(Return(ByMove(MakeUnique(AccessLevel::kInternal)))); + + EXPECT_NE(nullptr, mock_buzzer_.MakeBuzz("world")); +``` + +Note that `ByMove()` is essential here - if you drop it, the code won’t compile. + +Quiz time! What do you think will happen if a `Return(ByMove(...))` action is +performed more than once (e.g. you write `... +.WillRepeatedly(Return(ByMove(...)));`)? Come think of it, after the first time +the action runs, the source value will be consumed (since it’s a move-only +value), so the next time around, there’s no value to move from -- you’ll get a +run-time error that `Return(ByMove(...))` can only be run once. + +If you need your mock method to do more than just moving a pre-defined value, +remember that you can always use a lambda or a callable object, which can do +pretty much anything you want: + +```cpp + EXPECT_CALL(mock_buzzer_, MakeBuzz("x")) + .WillRepeatedly([](StringPiece text) { + return MakeUnique(AccessLevel::kInternal); + }); + + EXPECT_NE(nullptr, mock_buzzer_.MakeBuzz("x")); + EXPECT_NE(nullptr, mock_buzzer_.MakeBuzz("x")); +``` + +Every time this `EXPECT_CALL` fires, a new `unique_ptr` will be created +and returned. You cannot do this with `Return(ByMove(...))`. + +That covers returning move-only values; but how do we work with methods +accepting move-only arguments? The answer is that they work normally, although +some actions will not compile when any of method's arguments are move-only. You +can always use `Return`, or a [lambda or functor](#FunctionsAsActions): + +```cpp + using ::testing::Unused; + + EXPECT_CALL(mock_buzzer_, ShareBuzz(NotNull(), _)).WillOnce(Return(true)); + EXPECT_TRUE(mock_buzzer_.ShareBuzz(MakeUnique(AccessLevel::kInternal)), + 0); + + EXPECT_CALL(mock_buzzer_, ShareBuzz(_, _)).WillOnce( + [](std::unique_ptr buzz, Unused) { return buzz != nullptr; }); + EXPECT_FALSE(mock_buzzer_.ShareBuzz(nullptr, 0)); +``` + +Many built-in actions (`WithArgs`, `WithoutArgs`,`DeleteArg`, `SaveArg`, ...) +could in principle support move-only arguments, but the support for this is not +implemented yet. If this is blocking you, please file a bug. + +A few actions (e.g. `DoAll`) copy their arguments internally, so they can never +work with non-copyable objects; you'll have to use functors instead. + +#### Legacy workarounds for move-only types {#LegacyMoveOnly} + +Support for move-only function arguments was only introduced to gMock in April +of 2017. In older code, you may encounter the following workaround for the lack +of this feature (it is no longer necessary - we're including it just for +reference): + +```cpp +class MockBuzzer : public Buzzer { + public: + MOCK_METHOD(bool, DoShareBuzz, (Buzz* buzz, Time timestamp)); + bool ShareBuzz(std::unique_ptr buzz, Time timestamp) override { + return DoShareBuzz(buzz.get(), timestamp); + } +}; +``` + +The trick is to delegate the `ShareBuzz()` method to a mock method (let’s call +it `DoShareBuzz()`) that does not take move-only parameters. Then, instead of +setting expectations on `ShareBuzz()`, you set them on the `DoShareBuzz()` mock +method: + +```cpp + MockBuzzer mock_buzzer_; + EXPECT_CALL(mock_buzzer_, DoShareBuzz(NotNull(), _)); + + // When one calls ShareBuzz() on the MockBuzzer like this, the call is + // forwarded to DoShareBuzz(), which is mocked. Therefore this statement + // will trigger the above EXPECT_CALL. + mock_buzzer_.ShareBuzz(MakeUnique(AccessLevel::kInternal), 0); +``` + +### Making the Compilation Faster + +Believe it or not, the *vast majority* of the time spent on compiling a mock +class is in generating its constructor and destructor, as they perform +non-trivial tasks (e.g. verification of the expectations). What's more, mock +methods with different signatures have different types and thus their +constructors/destructors need to be generated by the compiler separately. As a +result, if you mock many different types of methods, compiling your mock class +can get really slow. + +If you are experiencing slow compilation, you can move the definition of your +mock class' constructor and destructor out of the class body and into a `.cc` +file. This way, even if you `#include` your mock class in N files, the compiler +only needs to generate its constructor and destructor once, resulting in a much +faster compilation. + +Let's illustrate the idea using an example. Here's the definition of a mock +class before applying this recipe: + +```cpp +// File mock_foo.h. +... +class MockFoo : public Foo { + public: + // Since we don't declare the constructor or the destructor, + // the compiler will generate them in every translation unit + // where this mock class is used. + + MOCK_METHOD(int, DoThis, (), (override)); + MOCK_METHOD(bool, DoThat, (const char* str), (override)); + ... more mock methods ... +}; +``` + +After the change, it would look like: + +```cpp +// File mock_foo.h. +... +class MockFoo : public Foo { + public: + // The constructor and destructor are declared, but not defined, here. + MockFoo(); + virtual ~MockFoo(); + + MOCK_METHOD(int, DoThis, (), (override)); + MOCK_METHOD(bool, DoThat, (const char* str), (override)); + ... more mock methods ... +}; +``` + +and + +```cpp +// File mock_foo.cc. +#include "path/to/mock_foo.h" + +// The definitions may appear trivial, but the functions actually do a +// lot of things through the constructors/destructors of the member +// variables used to implement the mock methods. +MockFoo::MockFoo() {} +MockFoo::~MockFoo() {} +``` + +### Forcing a Verification + +When it's being destroyed, your friendly mock object will automatically verify +that all expectations on it have been satisfied, and will generate googletest +failures if not. This is convenient as it leaves you with one less thing to +worry about. That is, unless you are not sure if your mock object will be +destroyed. + +How could it be that your mock object won't eventually be destroyed? Well, it +might be created on the heap and owned by the code you are testing. Suppose +there's a bug in that code and it doesn't delete the mock object properly - you +could end up with a passing test when there's actually a bug. + +Using a heap checker is a good idea and can alleviate the concern, but its +implementation is not 100% reliable. So, sometimes you do want to *force* gMock +to verify a mock object before it is (hopefully) destructed. You can do this +with `Mock::VerifyAndClearExpectations(&mock_object)`: + +```cpp +TEST(MyServerTest, ProcessesRequest) { + using ::testing::Mock; + + MockFoo* const foo = new MockFoo; + EXPECT_CALL(*foo, ...)...; + // ... other expectations ... + + // server now owns foo. + MyServer server(foo); + server.ProcessRequest(...); + + // In case that server's destructor will forget to delete foo, + // this will verify the expectations anyway. + Mock::VerifyAndClearExpectations(foo); +} // server is destroyed when it goes out of scope here. +``` + +{: .callout .tip} +**Tip:** The `Mock::VerifyAndClearExpectations()` function returns a `bool` to +indicate whether the verification was successful (`true` for yes), so you can +wrap that function call inside a `ASSERT_TRUE()` if there is no point going +further when the verification has failed. + +Do not set new expectations after verifying and clearing a mock after its use. +Setting expectations after code that exercises the mock has undefined behavior. +See [Using Mocks in Tests](gmock_for_dummies.md#using-mocks-in-tests) for more +information. + +### Using Checkpoints {#UsingCheckPoints} + +Sometimes you might want to test a mock object's behavior in phases whose sizes +are each manageable, or you might want to set more detailed expectations about +which API calls invoke which mock functions. + +A technique you can use is to put the expectations in a sequence and insert +calls to a dummy "checkpoint" function at specific places. Then you can verify +that the mock function calls do happen at the right time. For example, if you +are exercising the code: + +```cpp + Foo(1); + Foo(2); + Foo(3); +``` + +and want to verify that `Foo(1)` and `Foo(3)` both invoke `mock.Bar("a")`, but +`Foo(2)` doesn't invoke anything, you can write: + +```cpp +using ::testing::MockFunction; + +TEST(FooTest, InvokesBarCorrectly) { + MyMock mock; + // Class MockFunction has exactly one mock method. It is named + // Call() and has type F. + MockFunction check; + { + InSequence s; + + EXPECT_CALL(mock, Bar("a")); + EXPECT_CALL(check, Call("1")); + EXPECT_CALL(check, Call("2")); + EXPECT_CALL(mock, Bar("a")); + } + Foo(1); + check.Call("1"); + Foo(2); + check.Call("2"); + Foo(3); +} +``` + +The expectation spec says that the first `Bar("a")` call must happen before +checkpoint "1", the second `Bar("a")` call must happen after checkpoint "2", and +nothing should happen between the two checkpoints. The explicit checkpoints make +it clear which `Bar("a")` is called by which call to `Foo()`. + +### Mocking Destructors + +Sometimes you want to make sure a mock object is destructed at the right time, +e.g. after `bar->A()` is called but before `bar->B()` is called. We already know +that you can specify constraints on the [order](#OrderedCalls) of mock function +calls, so all we need to do is to mock the destructor of the mock function. + +This sounds simple, except for one problem: a destructor is a special function +with special syntax and special semantics, and the `MOCK_METHOD` macro doesn't +work for it: + +```cpp +MOCK_METHOD(void, ~MockFoo, ()); // Won't compile! +``` + +The good news is that you can use a simple pattern to achieve the same effect. +First, add a mock function `Die()` to your mock class and call it in the +destructor, like this: + +```cpp +class MockFoo : public Foo { + ... + // Add the following two lines to the mock class. + MOCK_METHOD(void, Die, ()); + ~MockFoo() override { Die(); } +}; +``` + +(If the name `Die()` clashes with an existing symbol, choose another name.) Now, +we have translated the problem of testing when a `MockFoo` object dies to +testing when its `Die()` method is called: + +```cpp + MockFoo* foo = new MockFoo; + MockBar* bar = new MockBar; + ... + { + InSequence s; + + // Expects *foo to die after bar->A() and before bar->B(). + EXPECT_CALL(*bar, A()); + EXPECT_CALL(*foo, Die()); + EXPECT_CALL(*bar, B()); + } +``` + +And that's that. + +### Using gMock and Threads {#UsingThreads} + +In a **unit** test, it's best if you could isolate and test a piece of code in a +single-threaded context. That avoids race conditions and dead locks, and makes +debugging your test much easier. + +Yet most programs are multi-threaded, and sometimes to test something we need to +pound on it from more than one thread. gMock works for this purpose too. + +Remember the steps for using a mock: + +1. Create a mock object `foo`. +2. Set its default actions and expectations using `ON_CALL()` and + `EXPECT_CALL()`. +3. The code under test calls methods of `foo`. +4. Optionally, verify and reset the mock. +5. Destroy the mock yourself, or let the code under test destroy it. The + destructor will automatically verify it. + +If you follow the following simple rules, your mocks and threads can live +happily together: + +* Execute your *test code* (as opposed to the code being tested) in *one* + thread. This makes your test easy to follow. +* Obviously, you can do step #1 without locking. +* When doing step #2 and #5, make sure no other thread is accessing `foo`. + Obvious too, huh? +* #3 and #4 can be done either in one thread or in multiple threads - anyway + you want. gMock takes care of the locking, so you don't have to do any - + unless required by your test logic. + +If you violate the rules (for example, if you set expectations on a mock while +another thread is calling its methods), you get undefined behavior. That's not +fun, so don't do it. + +gMock guarantees that the action for a mock function is done in the same thread +that called the mock function. For example, in + +```cpp + EXPECT_CALL(mock, Foo(1)) + .WillOnce(action1); + EXPECT_CALL(mock, Foo(2)) + .WillOnce(action2); +``` + +if `Foo(1)` is called in thread 1 and `Foo(2)` is called in thread 2, gMock will +execute `action1` in thread 1 and `action2` in thread 2. + +gMock does *not* impose a sequence on actions performed in different threads +(doing so may create deadlocks as the actions may need to cooperate). This means +that the execution of `action1` and `action2` in the above example *may* +interleave. If this is a problem, you should add proper synchronization logic to +`action1` and `action2` to make the test thread-safe. + +Also, remember that `DefaultValue` is a global resource that potentially +affects *all* living mock objects in your program. Naturally, you won't want to +mess with it from multiple threads or when there still are mocks in action. + +### Controlling How Much Information gMock Prints + +When gMock sees something that has the potential of being an error (e.g. a mock +function with no expectation is called, a.k.a. an uninteresting call, which is +allowed but perhaps you forgot to explicitly ban the call), it prints some +warning messages, including the arguments of the function, the return value, and +the stack trace. Hopefully this will remind you to take a look and see if there +is indeed a problem. + +Sometimes you are confident that your tests are correct and may not appreciate +such friendly messages. Some other times, you are debugging your tests or +learning about the behavior of the code you are testing, and wish you could +observe every mock call that happens (including argument values, the return +value, and the stack trace). Clearly, one size doesn't fit all. + +You can control how much gMock tells you using the `--gmock_verbose=LEVEL` +command-line flag, where `LEVEL` is a string with three possible values: + +* `info`: gMock will print all informational messages, warnings, and errors + (most verbose). At this setting, gMock will also log any calls to the + `ON_CALL/EXPECT_CALL` macros. It will include a stack trace in + "uninteresting call" warnings. +* `warning`: gMock will print both warnings and errors (less verbose); it will + omit the stack traces in "uninteresting call" warnings. This is the default. +* `error`: gMock will print errors only (least verbose). + +Alternatively, you can adjust the value of that flag from within your tests like +so: + +```cpp + ::testing::FLAGS_gmock_verbose = "error"; +``` + +If you find gMock printing too many stack frames with its informational or +warning messages, remember that you can control their amount with the +`--gtest_stack_trace_depth=max_depth` flag. + +Now, judiciously use the right flag to enable gMock serve you better! + +### Gaining Super Vision into Mock Calls + +You have a test using gMock. It fails: gMock tells you some expectations aren't +satisfied. However, you aren't sure why: Is there a typo somewhere in the +matchers? Did you mess up the order of the `EXPECT_CALL`s? Or is the code under +test doing something wrong? How can you find out the cause? + +Won't it be nice if you have X-ray vision and can actually see the trace of all +`EXPECT_CALL`s and mock method calls as they are made? For each call, would you +like to see its actual argument values and which `EXPECT_CALL` gMock thinks it +matches? If you still need some help to figure out who made these calls, how +about being able to see the complete stack trace at each mock call? + +You can unlock this power by running your test with the `--gmock_verbose=info` +flag. For example, given the test program: + +```cpp +#include "gmock/gmock.h" + +using testing::_; +using testing::HasSubstr; +using testing::Return; + +class MockFoo { + public: + MOCK_METHOD(void, F, (const string& x, const string& y)); +}; + +TEST(Foo, Bar) { + MockFoo mock; + EXPECT_CALL(mock, F(_, _)).WillRepeatedly(Return()); + EXPECT_CALL(mock, F("a", "b")); + EXPECT_CALL(mock, F("c", HasSubstr("d"))); + + mock.F("a", "good"); + mock.F("a", "b"); +} +``` + +if you run it with `--gmock_verbose=info`, you will see this output: + +```shell +[ RUN ] Foo.Bar + +foo_test.cc:14: EXPECT_CALL(mock, F(_, _)) invoked +Stack trace: ... + +foo_test.cc:15: EXPECT_CALL(mock, F("a", "b")) invoked +Stack trace: ... + +foo_test.cc:16: EXPECT_CALL(mock, F("c", HasSubstr("d"))) invoked +Stack trace: ... + +foo_test.cc:14: Mock function call matches EXPECT_CALL(mock, F(_, _))... + Function call: F(@0x7fff7c8dad40"a",@0x7fff7c8dad10"good") +Stack trace: ... + +foo_test.cc:15: Mock function call matches EXPECT_CALL(mock, F("a", "b"))... + Function call: F(@0x7fff7c8dada0"a",@0x7fff7c8dad70"b") +Stack trace: ... + +foo_test.cc:16: Failure +Actual function call count doesn't match EXPECT_CALL(mock, F("c", HasSubstr("d")))... + Expected: to be called once + Actual: never called - unsatisfied and active +[ FAILED ] Foo.Bar +``` + +Suppose the bug is that the `"c"` in the third `EXPECT_CALL` is a typo and +should actually be `"a"`. With the above message, you should see that the actual +`F("a", "good")` call is matched by the first `EXPECT_CALL`, not the third as +you thought. From that it should be obvious that the third `EXPECT_CALL` is +written wrong. Case solved. + +If you are interested in the mock call trace but not the stack traces, you can +combine `--gmock_verbose=info` with `--gtest_stack_trace_depth=0` on the test +command line. + +### Running Tests in Emacs + +If you build and run your tests in Emacs using the `M-x google-compile` command +(as many googletest users do), the source file locations of gMock and googletest +errors will be highlighted. Just press `` on one of them and you'll be +taken to the offending line. Or, you can just type `C-x`` to jump to the next +error. + +To make it even easier, you can add the following lines to your `~/.emacs` file: + +```text +(global-set-key "\M-m" 'google-compile) ; m is for make +(global-set-key [M-down] 'next-error) +(global-set-key [M-up] '(lambda () (interactive) (next-error -1))) +``` + +Then you can type `M-m` to start a build (if you want to run the test as well, +just make sure `foo_test.run` or `runtests` is in the build command you supply +after typing `M-m`), or `M-up`/`M-down` to move back and forth between errors. + +## Extending gMock + +### Writing New Matchers Quickly {#NewMatchers} + +{: .callout .warning} +WARNING: gMock does not guarantee when or how many times a matcher will be +invoked. Therefore, all matchers must be functionally pure. See +[this section](#PureMatchers) for more details. + +The `MATCHER*` family of macros can be used to define custom matchers easily. +The syntax: + +```cpp +MATCHER(name, description_string_expression) { statements; } +``` + +will define a matcher with the given name that executes the statements, which +must return a `bool` to indicate if the match succeeds. Inside the statements, +you can refer to the value being matched by `arg`, and refer to its type by +`arg_type`. + +The *description string* is a `string`-typed expression that documents what the +matcher does, and is used to generate the failure message when the match fails. +It can (and should) reference the special `bool` variable `negation`, and should +evaluate to the description of the matcher when `negation` is `false`, or that +of the matcher's negation when `negation` is `true`. + +For convenience, we allow the description string to be empty (`""`), in which +case gMock will use the sequence of words in the matcher name as the +description. + +For example: + +```cpp +MATCHER(IsDivisibleBy7, "") { return (arg % 7) == 0; } +``` + +allows you to write + +```cpp + // Expects mock_foo.Bar(n) to be called where n is divisible by 7. + EXPECT_CALL(mock_foo, Bar(IsDivisibleBy7())); +``` + +or, + +```cpp + using ::testing::Not; + ... + // Verifies that a value is divisible by 7 and the other is not. + EXPECT_THAT(some_expression, IsDivisibleBy7()); + EXPECT_THAT(some_other_expression, Not(IsDivisibleBy7())); +``` + +If the above assertions fail, they will print something like: + +```shell + Value of: some_expression + Expected: is divisible by 7 + Actual: 27 + ... + Value of: some_other_expression + Expected: not (is divisible by 7) + Actual: 21 +``` + +where the descriptions `"is divisible by 7"` and `"not (is divisible by 7)"` are +automatically calculated from the matcher name `IsDivisibleBy7`. + +As you may have noticed, the auto-generated descriptions (especially those for +the negation) may not be so great. You can always override them with a `string` +expression of your own: + +```cpp +MATCHER(IsDivisibleBy7, + absl::StrCat(negation ? "isn't" : "is", " divisible by 7")) { + return (arg % 7) == 0; +} +``` + +Optionally, you can stream additional information to a hidden argument named +`result_listener` to explain the match result. For example, a better definition +of `IsDivisibleBy7` is: + +```cpp +MATCHER(IsDivisibleBy7, "") { + if ((arg % 7) == 0) + return true; + + *result_listener << "the remainder is " << (arg % 7); + return false; +} +``` + +With this definition, the above assertion will give a better message: + +```shell + Value of: some_expression + Expected: is divisible by 7 + Actual: 27 (the remainder is 6) +``` + +You should let `MatchAndExplain()` print *any additional information* that can +help a user understand the match result. Note that it should explain why the +match succeeds in case of a success (unless it's obvious) - this is useful when +the matcher is used inside `Not()`. There is no need to print the argument value +itself, as gMock already prints it for you. + +{: .callout .note} +NOTE: The type of the value being matched (`arg_type`) is determined by the +context in which you use the matcher and is supplied to you by the compiler, so +you don't need to worry about declaring it (nor can you). This allows the +matcher to be polymorphic. For example, `IsDivisibleBy7()` can be used to match +any type where the value of `(arg % 7) == 0` can be implicitly converted to a +`bool`. In the `Bar(IsDivisibleBy7())` example above, if method `Bar()` takes an +`int`, `arg_type` will be `int`; if it takes an `unsigned long`, `arg_type` will +be `unsigned long`; and so on. + +### Writing New Parameterized Matchers Quickly + +Sometimes you'll want to define a matcher that has parameters. For that you can +use the macro: + +```cpp +MATCHER_P(name, param_name, description_string) { statements; } +``` + +where the description string can be either `""` or a `string` expression that +references `negation` and `param_name`. + +For example: + +```cpp +MATCHER_P(HasAbsoluteValue, value, "") { return abs(arg) == value; } +``` + +will allow you to write: + +```cpp + EXPECT_THAT(Blah("a"), HasAbsoluteValue(n)); +``` + +which may lead to this message (assuming `n` is 10): + +```shell + Value of: Blah("a") + Expected: has absolute value 10 + Actual: -9 +``` + +Note that both the matcher description and its parameter are printed, making the +message human-friendly. + +In the matcher definition body, you can write `foo_type` to reference the type +of a parameter named `foo`. For example, in the body of +`MATCHER_P(HasAbsoluteValue, value)` above, you can write `value_type` to refer +to the type of `value`. + +gMock also provides `MATCHER_P2`, `MATCHER_P3`, ..., up to `MATCHER_P10` to +support multi-parameter matchers: + +```cpp +MATCHER_Pk(name, param_1, ..., param_k, description_string) { statements; } +``` + +Please note that the custom description string is for a particular *instance* of +the matcher, where the parameters have been bound to actual values. Therefore +usually you'll want the parameter values to be part of the description. gMock +lets you do that by referencing the matcher parameters in the description string +expression. + +For example, + +```cpp +using ::testing::PrintToString; +MATCHER_P2(InClosedRange, low, hi, + absl::StrFormat("%s in range [%s, %s]", negation ? "isn't" : "is", + PrintToString(low), PrintToString(hi))) { + return low <= arg && arg <= hi; +} +... +EXPECT_THAT(3, InClosedRange(4, 6)); +``` + +would generate a failure that contains the message: + +```shell + Expected: is in range [4, 6] +``` + +If you specify `""` as the description, the failure message will contain the +sequence of words in the matcher name followed by the parameter values printed +as a tuple. For example, + +```cpp + MATCHER_P2(InClosedRange, low, hi, "") { ... } + ... + EXPECT_THAT(3, InClosedRange(4, 6)); +``` + +would generate a failure that contains the text: + +```shell + Expected: in closed range (4, 6) +``` + +For the purpose of typing, you can view + +```cpp +MATCHER_Pk(Foo, p1, ..., pk, description_string) { ... } +``` + +as shorthand for + +```cpp +template +FooMatcherPk +Foo(p1_type p1, ..., pk_type pk) { ... } +``` + +When you write `Foo(v1, ..., vk)`, the compiler infers the types of the +parameters `v1`, ..., and `vk` for you. If you are not happy with the result of +the type inference, you can specify the types by explicitly instantiating the +template, as in `Foo(5, false)`. As said earlier, you don't get to +(or need to) specify `arg_type` as that's determined by the context in which the +matcher is used. + +You can assign the result of expression `Foo(p1, ..., pk)` to a variable of type +`FooMatcherPk`. This can be useful when composing +matchers. Matchers that don't have a parameter or have only one parameter have +special types: you can assign `Foo()` to a `FooMatcher`-typed variable, and +assign `Foo(p)` to a `FooMatcherP`-typed variable. + +While you can instantiate a matcher template with reference types, passing the +parameters by pointer usually makes your code more readable. If, however, you +still want to pass a parameter by reference, be aware that in the failure +message generated by the matcher you will see the value of the referenced object +but not its address. + +You can overload matchers with different numbers of parameters: + +```cpp +MATCHER_P(Blah, a, description_string_1) { ... } +MATCHER_P2(Blah, a, b, description_string_2) { ... } +``` + +While it's tempting to always use the `MATCHER*` macros when defining a new +matcher, you should also consider implementing the matcher interface directly +instead (see the recipes that follow), especially if you need to use the matcher +a lot. While these approaches require more work, they give you more control on +the types of the value being matched and the matcher parameters, which in +general leads to better compiler error messages that pay off in the long run. +They also allow overloading matchers based on parameter types (as opposed to +just based on the number of parameters). + +### Writing New Monomorphic Matchers + +A matcher of argument type `T` implements the matcher interface for `T` and does +two things: it tests whether a value of type `T` matches the matcher, and can +describe what kind of values it matches. The latter ability is used for +generating readable error messages when expectations are violated. + +A matcher of `T` must declare a typedef like: + +```cpp +using is_gtest_matcher = void; +``` + +and supports the following operations: + +```cpp +// Match a value and optionally explain into an ostream. +bool matched = matcher.MatchAndExplain(value, maybe_os); +// where `value` is of type `T` and +// `maybe_os` is of type `std::ostream*`, where it can be null if the caller +// is not interested in there textual explanation. + +matcher.DescribeTo(os); +matcher.DescribeNegationTo(os); +// where `os` is of type `std::ostream*`. +``` + +If you need a custom matcher but `Truly()` is not a good option (for example, +you may not be happy with the way `Truly(predicate)` describes itself, or you +may want your matcher to be polymorphic as `Eq(value)` is), you can define a +matcher to do whatever you want in two steps: first implement the matcher +interface, and then define a factory function to create a matcher instance. The +second step is not strictly needed but it makes the syntax of using the matcher +nicer. + +For example, you can define a matcher to test whether an `int` is divisible by 7 +and then use it like this: + +```cpp +using ::testing::Matcher; + +class DivisibleBy7Matcher { + public: + using is_gtest_matcher = void; + + bool MatchAndExplain(int n, std::ostream*) const { + return (n % 7) == 0; + } + + void DescribeTo(std::ostream* os) const { + *os << "is divisible by 7"; + } + + void DescribeNegationTo(std::ostream* os) const { + *os << "is not divisible by 7"; + } +}; + +Matcher DivisibleBy7() { + return DivisibleBy7Matcher(); +} + +... + EXPECT_CALL(foo, Bar(DivisibleBy7())); +``` + +You may improve the matcher message by streaming additional information to the +`os` argument in `MatchAndExplain()`: + +```cpp +class DivisibleBy7Matcher { + public: + bool MatchAndExplain(int n, std::ostream* os) const { + const int remainder = n % 7; + if (remainder != 0 && os != nullptr) { + *os << "the remainder is " << remainder; + } + return remainder == 0; + } + ... +}; +``` + +Then, `EXPECT_THAT(x, DivisibleBy7());` may generate a message like this: + +```shell +Value of: x +Expected: is divisible by 7 + Actual: 23 (the remainder is 2) +``` + +{: .callout .tip} +Tip: for convenience, `MatchAndExplain()` can take a `MatchResultListener*` +instead of `std::ostream*`. + +### Writing New Polymorphic Matchers + +Expanding what we learned above to *polymorphic* matchers is now just as simple +as adding templates in the right place. + +```cpp + +class NotNullMatcher { + public: + using is_gtest_matcher = void; + + // To implement a polymorphic matcher, we just need to make MatchAndExplain a + // template on its first argument. + + // In this example, we want to use NotNull() with any pointer, so + // MatchAndExplain() accepts a pointer of any type as its first argument. + // In general, you can define MatchAndExplain() as an ordinary method or + // a method template, or even overload it. + template + bool MatchAndExplain(T* p, std::ostream*) const { + return p != nullptr; + } + + // Describes the property of a value matching this matcher. + void DescribeTo(std::ostream* os) const { *os << "is not NULL"; } + + // Describes the property of a value NOT matching this matcher. + void DescribeNegationTo(std::ostream* os) const { *os << "is NULL"; } +}; + +NotNullMatcher NotNull() { + return NotNullMatcher(); +} + +... + + EXPECT_CALL(foo, Bar(NotNull())); // The argument must be a non-NULL pointer. +``` + +### Legacy Matcher Implementation + +Defining matchers used to be somewhat more complicated, in which it required +several supporting classes and virtual functions. To implement a matcher for +type `T` using the legacy API you have to derive from `MatcherInterface` and +call `MakeMatcher` to construct the object. + +The interface looks like this: + +```cpp +class MatchResultListener { + public: + ... + // Streams x to the underlying ostream; does nothing if the ostream + // is NULL. + template + MatchResultListener& operator<<(const T& x); + + // Returns the underlying ostream. + std::ostream* stream(); +}; + +template +class MatcherInterface { + public: + virtual ~MatcherInterface(); + + // Returns true if and only if the matcher matches x; also explains the match + // result to 'listener'. + virtual bool MatchAndExplain(T x, MatchResultListener* listener) const = 0; + + // Describes this matcher to an ostream. + virtual void DescribeTo(std::ostream* os) const = 0; + + // Describes the negation of this matcher to an ostream. + virtual void DescribeNegationTo(std::ostream* os) const; +}; +``` + +Fortunately, most of the time you can define a polymorphic matcher easily with +the help of `MakePolymorphicMatcher()`. Here's how you can define `NotNull()` as +an example: + +```cpp +using ::testing::MakePolymorphicMatcher; +using ::testing::MatchResultListener; +using ::testing::PolymorphicMatcher; + +class NotNullMatcher { + public: + // To implement a polymorphic matcher, first define a COPYABLE class + // that has three members MatchAndExplain(), DescribeTo(), and + // DescribeNegationTo(), like the following. + + // In this example, we want to use NotNull() with any pointer, so + // MatchAndExplain() accepts a pointer of any type as its first argument. + // In general, you can define MatchAndExplain() as an ordinary method or + // a method template, or even overload it. + template + bool MatchAndExplain(T* p, + MatchResultListener* /* listener */) const { + return p != NULL; + } + + // Describes the property of a value matching this matcher. + void DescribeTo(std::ostream* os) const { *os << "is not NULL"; } + + // Describes the property of a value NOT matching this matcher. + void DescribeNegationTo(std::ostream* os) const { *os << "is NULL"; } +}; + +// To construct a polymorphic matcher, pass an instance of the class +// to MakePolymorphicMatcher(). Note the return type. +PolymorphicMatcher NotNull() { + return MakePolymorphicMatcher(NotNullMatcher()); +} + +... + + EXPECT_CALL(foo, Bar(NotNull())); // The argument must be a non-NULL pointer. +``` + +{: .callout .note} +**Note:** Your polymorphic matcher class does **not** need to inherit from +`MatcherInterface` or any other class, and its methods do **not** need to be +virtual. + +Like in a monomorphic matcher, you may explain the match result by streaming +additional information to the `listener` argument in `MatchAndExplain()`. + +### Writing New Cardinalities + +A cardinality is used in `Times()` to tell gMock how many times you expect a +call to occur. It doesn't have to be exact. For example, you can say +`AtLeast(5)` or `Between(2, 4)`. + +If the [built-in set](gmock_cheat_sheet.md#CardinalityList) of cardinalities +doesn't suit you, you are free to define your own by implementing the following +interface (in namespace `testing`): + +```cpp +class CardinalityInterface { + public: + virtual ~CardinalityInterface(); + + // Returns true if and only if call_count calls will satisfy this cardinality. + virtual bool IsSatisfiedByCallCount(int call_count) const = 0; + + // Returns true if and only if call_count calls will saturate this + // cardinality. + virtual bool IsSaturatedByCallCount(int call_count) const = 0; + + // Describes self to an ostream. + virtual void DescribeTo(std::ostream* os) const = 0; +}; +``` + +For example, to specify that a call must occur even number of times, you can +write + +```cpp +using ::testing::Cardinality; +using ::testing::CardinalityInterface; +using ::testing::MakeCardinality; + +class EvenNumberCardinality : public CardinalityInterface { + public: + bool IsSatisfiedByCallCount(int call_count) const override { + return (call_count % 2) == 0; + } + + bool IsSaturatedByCallCount(int call_count) const override { + return false; + } + + void DescribeTo(std::ostream* os) const { + *os << "called even number of times"; + } +}; + +Cardinality EvenNumber() { + return MakeCardinality(new EvenNumberCardinality); +} + +... + EXPECT_CALL(foo, Bar(3)) + .Times(EvenNumber()); +``` + +### Writing New Actions Quickly {#QuickNewActions} + +If the built-in actions don't work for you, you can easily define your own one. +Just define a functor class with a (possibly templated) call operator, matching +the signature of your action. + +```cpp +struct Increment { + template + T operator()(T* arg) { + return ++(*arg); + } +} +``` + +The same approach works with stateful functors (or any callable, really): + +``` +struct MultiplyBy { + template + T operator()(T arg) { return arg * multiplier; } + + int multiplier; +} + +// Then use: +// EXPECT_CALL(...).WillOnce(MultiplyBy{7}); +``` + +#### Legacy macro-based Actions + +Before C++11, the functor-based actions were not supported; the old way of +writing actions was through a set of `ACTION*` macros. We suggest to avoid them +in new code; they hide a lot of logic behind the macro, potentially leading to +harder-to-understand compiler errors. Nevertheless, we cover them here for +completeness. + +By writing + +```cpp +ACTION(name) { statements; } +``` + +in a namespace scope (i.e. not inside a class or function), you will define an +action with the given name that executes the statements. The value returned by +`statements` will be used as the return value of the action. Inside the +statements, you can refer to the K-th (0-based) argument of the mock function as +`argK`. For example: + +```cpp +ACTION(IncrementArg1) { return ++(*arg1); } +``` + +allows you to write + +```cpp +... WillOnce(IncrementArg1()); +``` + +Note that you don't need to specify the types of the mock function arguments. +Rest assured that your code is type-safe though: you'll get a compiler error if +`*arg1` doesn't support the `++` operator, or if the type of `++(*arg1)` isn't +compatible with the mock function's return type. + +Another example: + +```cpp +ACTION(Foo) { + (*arg2)(5); + Blah(); + *arg1 = 0; + return arg0; +} +``` + +defines an action `Foo()` that invokes argument #2 (a function pointer) with 5, +calls function `Blah()`, sets the value pointed to by argument #1 to 0, and +returns argument #0. + +For more convenience and flexibility, you can also use the following pre-defined +symbols in the body of `ACTION`: + +`argK_type` | The type of the K-th (0-based) argument of the mock function +:-------------- | :----------------------------------------------------------- +`args` | All arguments of the mock function as a tuple +`args_type` | The type of all arguments of the mock function as a tuple +`return_type` | The return type of the mock function +`function_type` | The type of the mock function + +For example, when using an `ACTION` as a stub action for mock function: + +```cpp +int DoSomething(bool flag, int* ptr); +``` + +we have: + +Pre-defined Symbol | Is Bound To +------------------ | --------------------------------- +`arg0` | the value of `flag` +`arg0_type` | the type `bool` +`arg1` | the value of `ptr` +`arg1_type` | the type `int*` +`args` | the tuple `(flag, ptr)` +`args_type` | the type `std::tuple` +`return_type` | the type `int` +`function_type` | the type `int(bool, int*)` + +#### Legacy macro-based parameterized Actions + +Sometimes you'll want to parameterize an action you define. For that we have +another macro + +```cpp +ACTION_P(name, param) { statements; } +``` + +For example, + +```cpp +ACTION_P(Add, n) { return arg0 + n; } +``` + +will allow you to write + +```cpp +// Returns argument #0 + 5. +... WillOnce(Add(5)); +``` + +For convenience, we use the term *arguments* for the values used to invoke the +mock function, and the term *parameters* for the values used to instantiate an +action. + +Note that you don't need to provide the type of the parameter either. Suppose +the parameter is named `param`, you can also use the gMock-defined symbol +`param_type` to refer to the type of the parameter as inferred by the compiler. +For example, in the body of `ACTION_P(Add, n)` above, you can write `n_type` for +the type of `n`. + +gMock also provides `ACTION_P2`, `ACTION_P3`, and etc to support multi-parameter +actions. For example, + +```cpp +ACTION_P2(ReturnDistanceTo, x, y) { + double dx = arg0 - x; + double dy = arg1 - y; + return sqrt(dx*dx + dy*dy); +} +``` + +lets you write + +```cpp +... WillOnce(ReturnDistanceTo(5.0, 26.5)); +``` + +You can view `ACTION` as a degenerated parameterized action where the number of +parameters is 0. + +You can also easily define actions overloaded on the number of parameters: + +```cpp +ACTION_P(Plus, a) { ... } +ACTION_P2(Plus, a, b) { ... } +``` + +### Restricting the Type of an Argument or Parameter in an ACTION + +For maximum brevity and reusability, the `ACTION*` macros don't ask you to +provide the types of the mock function arguments and the action parameters. +Instead, we let the compiler infer the types for us. + +Sometimes, however, we may want to be more explicit about the types. There are +several tricks to do that. For example: + +```cpp +ACTION(Foo) { + // Makes sure arg0 can be converted to int. + int n = arg0; + ... use n instead of arg0 here ... +} + +ACTION_P(Bar, param) { + // Makes sure the type of arg1 is const char*. + ::testing::StaticAssertTypeEq(); + + // Makes sure param can be converted to bool. + bool flag = param; +} +``` + +where `StaticAssertTypeEq` is a compile-time assertion in googletest that +verifies two types are the same. + +### Writing New Action Templates Quickly + +Sometimes you want to give an action explicit template parameters that cannot be +inferred from its value parameters. `ACTION_TEMPLATE()` supports that and can be +viewed as an extension to `ACTION()` and `ACTION_P*()`. + +The syntax: + +```cpp +ACTION_TEMPLATE(ActionName, + HAS_m_TEMPLATE_PARAMS(kind1, name1, ..., kind_m, name_m), + AND_n_VALUE_PARAMS(p1, ..., p_n)) { statements; } +``` + +defines an action template that takes *m* explicit template parameters and *n* +value parameters, where *m* is in [1, 10] and *n* is in [0, 10]. `name_i` is the +name of the *i*-th template parameter, and `kind_i` specifies whether it's a +`typename`, an integral constant, or a template. `p_i` is the name of the *i*-th +value parameter. + +Example: + +```cpp +// DuplicateArg(output) converts the k-th argument of the mock +// function to type T and copies it to *output. +ACTION_TEMPLATE(DuplicateArg, + // Note the comma between int and k: + HAS_2_TEMPLATE_PARAMS(int, k, typename, T), + AND_1_VALUE_PARAMS(output)) { + *output = T(std::get(args)); +} +``` + +To create an instance of an action template, write: + +```cpp +ActionName(v1, ..., v_n) +``` + +where the `t`s are the template arguments and the `v`s are the value arguments. +The value argument types are inferred by the compiler. For example: + +```cpp +using ::testing::_; +... + int n; + EXPECT_CALL(mock, Foo).WillOnce(DuplicateArg<1, unsigned char>(&n)); +``` + +If you want to explicitly specify the value argument types, you can provide +additional template arguments: + +```cpp +ActionName(v1, ..., v_n) +``` + +where `u_i` is the desired type of `v_i`. + +`ACTION_TEMPLATE` and `ACTION`/`ACTION_P*` can be overloaded on the number of +value parameters, but not on the number of template parameters. Without the +restriction, the meaning of the following is unclear: + +```cpp + OverloadedAction(x); +``` + +Are we using a single-template-parameter action where `bool` refers to the type +of `x`, or a two-template-parameter action where the compiler is asked to infer +the type of `x`? + +### Using the ACTION Object's Type + +If you are writing a function that returns an `ACTION` object, you'll need to +know its type. The type depends on the macro used to define the action and the +parameter types. The rule is relatively simple: + + +| Given Definition | Expression | Has Type | +| ----------------------------- | ------------------- | --------------------- | +| `ACTION(Foo)` | `Foo()` | `FooAction` | +| `ACTION_TEMPLATE(Foo, HAS_m_TEMPLATE_PARAMS(...), AND_0_VALUE_PARAMS())` | `Foo()` | `FooAction` | +| `ACTION_P(Bar, param)` | `Bar(int_value)` | `BarActionP` | +| `ACTION_TEMPLATE(Bar, HAS_m_TEMPLATE_PARAMS(...), AND_1_VALUE_PARAMS(p1))` | `Bar(int_value)` | `BarActionP` | +| `ACTION_P2(Baz, p1, p2)` | `Baz(bool_value, int_value)` | `BazActionP2` | +| `ACTION_TEMPLATE(Baz, HAS_m_TEMPLATE_PARAMS(...), AND_2_VALUE_PARAMS(p1, p2))` | `Baz(bool_value, int_value)` | `BazActionP2` | +| ... | ... | ... | + + +Note that we have to pick different suffixes (`Action`, `ActionP`, `ActionP2`, +and etc) for actions with different numbers of value parameters, or the action +definitions cannot be overloaded on the number of them. + +### Writing New Monomorphic Actions {#NewMonoActions} + +While the `ACTION*` macros are very convenient, sometimes they are +inappropriate. For example, despite the tricks shown in the previous recipes, +they don't let you directly specify the types of the mock function arguments and +the action parameters, which in general leads to unoptimized compiler error +messages that can baffle unfamiliar users. They also don't allow overloading +actions based on parameter types without jumping through some hoops. + +An alternative to the `ACTION*` macros is to implement +`::testing::ActionInterface`, where `F` is the type of the mock function in +which the action will be used. For example: + +```cpp +template +class ActionInterface { + public: + virtual ~ActionInterface(); + + // Performs the action. Result is the return type of function type + // F, and ArgumentTuple is the tuple of arguments of F. + // + + // For example, if F is int(bool, const string&), then Result would + // be int, and ArgumentTuple would be std::tuple. + virtual Result Perform(const ArgumentTuple& args) = 0; +}; +``` + +```cpp +using ::testing::_; +using ::testing::Action; +using ::testing::ActionInterface; +using ::testing::MakeAction; + +typedef int IncrementMethod(int*); + +class IncrementArgumentAction : public ActionInterface { + public: + int Perform(const std::tuple& args) override { + int* p = std::get<0>(args); // Grabs the first argument. + return *p++; + } +}; + +Action IncrementArgument() { + return MakeAction(new IncrementArgumentAction); +} + +... + EXPECT_CALL(foo, Baz(_)) + .WillOnce(IncrementArgument()); + + int n = 5; + foo.Baz(&n); // Should return 5 and change n to 6. +``` + +### Writing New Polymorphic Actions {#NewPolyActions} + +The previous recipe showed you how to define your own action. This is all good, +except that you need to know the type of the function in which the action will +be used. Sometimes that can be a problem. For example, if you want to use the +action in functions with *different* types (e.g. like `Return()` and +`SetArgPointee()`). + +If an action can be used in several types of mock functions, we say it's +*polymorphic*. The `MakePolymorphicAction()` function template makes it easy to +define such an action: + +```cpp +namespace testing { +template +PolymorphicAction MakePolymorphicAction(const Impl& impl); +} // namespace testing +``` + +As an example, let's define an action that returns the second argument in the +mock function's argument list. The first step is to define an implementation +class: + +```cpp +class ReturnSecondArgumentAction { + public: + template + Result Perform(const ArgumentTuple& args) const { + // To get the i-th (0-based) argument, use std::get(args). + return std::get<1>(args); + } +}; +``` + +This implementation class does *not* need to inherit from any particular class. +What matters is that it must have a `Perform()` method template. This method +template takes the mock function's arguments as a tuple in a **single** +argument, and returns the result of the action. It can be either `const` or not, +but must be invocable with exactly one template argument, which is the result +type. In other words, you must be able to call `Perform(args)` where `R` is +the mock function's return type and `args` is its arguments in a tuple. + +Next, we use `MakePolymorphicAction()` to turn an instance of the implementation +class into the polymorphic action we need. It will be convenient to have a +wrapper for this: + +```cpp +using ::testing::MakePolymorphicAction; +using ::testing::PolymorphicAction; + +PolymorphicAction ReturnSecondArgument() { + return MakePolymorphicAction(ReturnSecondArgumentAction()); +} +``` + +Now, you can use this polymorphic action the same way you use the built-in ones: + +```cpp +using ::testing::_; + +class MockFoo : public Foo { + public: + MOCK_METHOD(int, DoThis, (bool flag, int n), (override)); + MOCK_METHOD(string, DoThat, (int x, const char* str1, const char* str2), + (override)); +}; + + ... + MockFoo foo; + EXPECT_CALL(foo, DoThis).WillOnce(ReturnSecondArgument()); + EXPECT_CALL(foo, DoThat).WillOnce(ReturnSecondArgument()); + ... + foo.DoThis(true, 5); // Will return 5. + foo.DoThat(1, "Hi", "Bye"); // Will return "Hi". +``` + +### Teaching gMock How to Print Your Values + +When an uninteresting or unexpected call occurs, gMock prints the argument +values and the stack trace to help you debug. Assertion macros like +`EXPECT_THAT` and `EXPECT_EQ` also print the values in question when the +assertion fails. gMock and googletest do this using googletest's user-extensible +value printer. + +This printer knows how to print built-in C++ types, native arrays, STL +containers, and any type that supports the `<<` operator. For other types, it +prints the raw bytes in the value and hopes that you the user can figure it out. +[The GoogleTest advanced guide](advanced.md#teaching-googletest-how-to-print-your-values) +explains how to extend the printer to do a better job at printing your +particular type than to dump the bytes. + +## Useful Mocks Created Using gMock + + + + +### Mock std::function {#MockFunction} + +`std::function` is a general function type introduced in C++11. It is a +preferred way of passing callbacks to new interfaces. Functions are copiable, +and are not usually passed around by pointer, which makes them tricky to mock. +But fear not - `MockFunction` can help you with that. + +`MockFunction` has a mock method `Call()` with the signature: + +```cpp + R Call(T1, ..., Tn); +``` + +It also has a `AsStdFunction()` method, which creates a `std::function` proxy +forwarding to Call: + +```cpp + std::function AsStdFunction(); +``` + +To use `MockFunction`, first create `MockFunction` object and set up +expectations on its `Call` method. Then pass proxy obtained from +`AsStdFunction()` to the code you are testing. For example: + +```cpp +TEST(FooTest, RunsCallbackWithBarArgument) { + // 1. Create a mock object. + MockFunction mock_function; + + // 2. Set expectations on Call() method. + EXPECT_CALL(mock_function, Call("bar")).WillOnce(Return(1)); + + // 3. Exercise code that uses std::function. + Foo(mock_function.AsStdFunction()); + // Foo's signature can be either of: + // void Foo(const std::function& fun); + // void Foo(std::function fun); + + // 4. All expectations will be verified when mock_function + // goes out of scope and is destroyed. +} +``` + +Remember that function objects created with `AsStdFunction()` are just +forwarders. If you create multiple of them, they will share the same set of +expectations. + +Although `std::function` supports unlimited number of arguments, `MockFunction` +implementation is limited to ten. If you ever hit that limit... well, your +callback has bigger problems than being mockable. :-) diff --git a/graphics/asymptote/LspCpp/third_party/uri/deps/docs/gmock_faq.md b/graphics/asymptote/LspCpp/third_party/uri/deps/docs/gmock_faq.md new file mode 100644 index 0000000000..8f220bf7a8 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/uri/deps/docs/gmock_faq.md @@ -0,0 +1,390 @@ +# Legacy gMock FAQ + +### When I call a method on my mock object, the method for the real object is invoked instead. What's the problem? + +In order for a method to be mocked, it must be *virtual*, unless you use the +[high-perf dependency injection technique](gmock_cook_book.md#MockingNonVirtualMethods). + +### Can I mock a variadic function? + +You cannot mock a variadic function (i.e. a function taking ellipsis (`...`) +arguments) directly in gMock. + +The problem is that in general, there is *no way* for a mock object to know how +many arguments are passed to the variadic method, and what the arguments' types +are. Only the *author of the base class* knows the protocol, and we cannot look +into his or her head. + +Therefore, to mock such a function, the *user* must teach the mock object how to +figure out the number of arguments and their types. One way to do it is to +provide overloaded versions of the function. + +Ellipsis arguments are inherited from C and not really a C++ feature. They are +unsafe to use and don't work with arguments that have constructors or +destructors. Therefore we recommend to avoid them in C++ as much as possible. + +### MSVC gives me warning C4301 or C4373 when I define a mock method with a const parameter. Why? + +If you compile this using Microsoft Visual C++ 2005 SP1: + +```cpp +class Foo { + ... + virtual void Bar(const int i) = 0; +}; + +class MockFoo : public Foo { + ... + MOCK_METHOD(void, Bar, (const int i), (override)); +}; +``` + +You may get the following warning: + +```shell +warning C4301: 'MockFoo::Bar': overriding virtual function only differs from 'Foo::Bar' by const/volatile qualifier +``` + +This is a MSVC bug. The same code compiles fine with gcc, for example. If you +use Visual C++ 2008 SP1, you would get the warning: + +```shell +warning C4373: 'MockFoo::Bar': virtual function overrides 'Foo::Bar', previous versions of the compiler did not override when parameters only differed by const/volatile qualifiers +``` + +In C++, if you *declare* a function with a `const` parameter, the `const` +modifier is ignored. Therefore, the `Foo` base class above is equivalent to: + +```cpp +class Foo { + ... + virtual void Bar(int i) = 0; // int or const int? Makes no difference. +}; +``` + +In fact, you can *declare* `Bar()` with an `int` parameter, and define it with a +`const int` parameter. The compiler will still match them up. + +Since making a parameter `const` is meaningless in the method declaration, we +recommend to remove it in both `Foo` and `MockFoo`. That should workaround the +VC bug. + +Note that we are talking about the *top-level* `const` modifier here. If the +function parameter is passed by pointer or reference, declaring the pointee or +referee as `const` is still meaningful. For example, the following two +declarations are *not* equivalent: + +```cpp +void Bar(int* p); // Neither p nor *p is const. +void Bar(const int* p); // p is not const, but *p is. +``` + +### I can't figure out why gMock thinks my expectations are not satisfied. What should I do? + +You might want to run your test with `--gmock_verbose=info`. This flag lets +gMock print a trace of every mock function call it receives. By studying the +trace, you'll gain insights on why the expectations you set are not met. + +If you see the message "The mock function has no default action set, and its +return type has no default value set.", then try +[adding a default action](gmock_cheat_sheet.md#OnCall). Due to a known issue, +unexpected calls on mocks without default actions don't print out a detailed +comparison between the actual arguments and the expected arguments. + +### My program crashed and `ScopedMockLog` spit out tons of messages. Is it a gMock bug? + +gMock and `ScopedMockLog` are likely doing the right thing here. + +When a test crashes, the failure signal handler will try to log a lot of +information (the stack trace, and the address map, for example). The messages +are compounded if you have many threads with depth stacks. When `ScopedMockLog` +intercepts these messages and finds that they don't match any expectations, it +prints an error for each of them. + +You can learn to ignore the errors, or you can rewrite your expectations to make +your test more robust, for example, by adding something like: + +```cpp +using ::testing::AnyNumber; +using ::testing::Not; +... + // Ignores any log not done by us. + EXPECT_CALL(log, Log(_, Not(EndsWith("/my_file.cc")), _)) + .Times(AnyNumber()); +``` + +### How can I assert that a function is NEVER called? + +```cpp +using ::testing::_; +... + EXPECT_CALL(foo, Bar(_)) + .Times(0); +``` + +### I have a failed test where gMock tells me TWICE that a particular expectation is not satisfied. Isn't this redundant? + +When gMock detects a failure, it prints relevant information (the mock function +arguments, the state of relevant expectations, and etc) to help the user debug. +If another failure is detected, gMock will do the same, including printing the +state of relevant expectations. + +Sometimes an expectation's state didn't change between two failures, and you'll +see the same description of the state twice. They are however *not* redundant, +as they refer to *different points in time*. The fact they are the same *is* +interesting information. + +### I get a heapcheck failure when using a mock object, but using a real object is fine. What can be wrong? + +Does the class (hopefully a pure interface) you are mocking have a virtual +destructor? + +Whenever you derive from a base class, make sure its destructor is virtual. +Otherwise Bad Things will happen. Consider the following code: + +```cpp +class Base { + public: + // Not virtual, but should be. + ~Base() { ... } + ... +}; + +class Derived : public Base { + public: + ... + private: + std::string value_; +}; + +... + Base* p = new Derived; + ... + delete p; // Surprise! ~Base() will be called, but ~Derived() will not + // - value_ is leaked. +``` + +By changing `~Base()` to virtual, `~Derived()` will be correctly called when +`delete p` is executed, and the heap checker will be happy. + +### The "newer expectations override older ones" rule makes writing expectations awkward. Why does gMock do that? + +When people complain about this, often they are referring to code like: + +```cpp +using ::testing::Return; +... + // foo.Bar() should be called twice, return 1 the first time, and return + // 2 the second time. However, I have to write the expectations in the + // reverse order. This sucks big time!!! + EXPECT_CALL(foo, Bar()) + .WillOnce(Return(2)) + .RetiresOnSaturation(); + EXPECT_CALL(foo, Bar()) + .WillOnce(Return(1)) + .RetiresOnSaturation(); +``` + +The problem, is that they didn't pick the **best** way to express the test's +intent. + +By default, expectations don't have to be matched in *any* particular order. If +you want them to match in a certain order, you need to be explicit. This is +gMock's (and jMock's) fundamental philosophy: it's easy to accidentally +over-specify your tests, and we want to make it harder to do so. + +There are two better ways to write the test spec. You could either put the +expectations in sequence: + +```cpp +using ::testing::Return; +... + // foo.Bar() should be called twice, return 1 the first time, and return + // 2 the second time. Using a sequence, we can write the expectations + // in their natural order. + { + InSequence s; + EXPECT_CALL(foo, Bar()) + .WillOnce(Return(1)) + .RetiresOnSaturation(); + EXPECT_CALL(foo, Bar()) + .WillOnce(Return(2)) + .RetiresOnSaturation(); + } +``` + +or you can put the sequence of actions in the same expectation: + +```cpp +using ::testing::Return; +... + // foo.Bar() should be called twice, return 1 the first time, and return + // 2 the second time. + EXPECT_CALL(foo, Bar()) + .WillOnce(Return(1)) + .WillOnce(Return(2)) + .RetiresOnSaturation(); +``` + +Back to the original questions: why does gMock search the expectations (and +`ON_CALL`s) from back to front? Because this allows a user to set up a mock's +behavior for the common case early (e.g. in the mock's constructor or the test +fixture's set-up phase) and customize it with more specific rules later. If +gMock searches from front to back, this very useful pattern won't be possible. + +### gMock prints a warning when a function without EXPECT_CALL is called, even if I have set its behavior using ON_CALL. Would it be reasonable not to show the warning in this case? + +When choosing between being neat and being safe, we lean toward the latter. So +the answer is that we think it's better to show the warning. + +Often people write `ON_CALL`s in the mock object's constructor or `SetUp()`, as +the default behavior rarely changes from test to test. Then in the test body +they set the expectations, which are often different for each test. Having an +`ON_CALL` in the set-up part of a test doesn't mean that the calls are expected. +If there's no `EXPECT_CALL` and the method is called, it's possibly an error. If +we quietly let the call go through without notifying the user, bugs may creep in +unnoticed. + +If, however, you are sure that the calls are OK, you can write + +```cpp +using ::testing::_; +... + EXPECT_CALL(foo, Bar(_)) + .WillRepeatedly(...); +``` + +instead of + +```cpp +using ::testing::_; +... + ON_CALL(foo, Bar(_)) + .WillByDefault(...); +``` + +This tells gMock that you do expect the calls and no warning should be printed. + +Also, you can control the verbosity by specifying `--gmock_verbose=error`. Other +values are `info` and `warning`. If you find the output too noisy when +debugging, just choose a less verbose level. + +### How can I delete the mock function's argument in an action? + +If your mock function takes a pointer argument and you want to delete that +argument, you can use testing::DeleteArg() to delete the N'th (zero-indexed) +argument: + +```cpp +using ::testing::_; + ... + MOCK_METHOD(void, Bar, (X* x, const Y& y)); + ... + EXPECT_CALL(mock_foo_, Bar(_, _)) + .WillOnce(testing::DeleteArg<0>())); +``` + +### How can I perform an arbitrary action on a mock function's argument? + +If you find yourself needing to perform some action that's not supported by +gMock directly, remember that you can define your own actions using +[`MakeAction()`](#NewMonoActions) or +[`MakePolymorphicAction()`](#NewPolyActions), or you can write a stub function +and invoke it using [`Invoke()`](#FunctionsAsActions). + +```cpp +using ::testing::_; +using ::testing::Invoke; + ... + MOCK_METHOD(void, Bar, (X* p)); + ... + EXPECT_CALL(mock_foo_, Bar(_)) + .WillOnce(Invoke(MyAction(...))); +``` + +### My code calls a static/global function. Can I mock it? + +You can, but you need to make some changes. + +In general, if you find yourself needing to mock a static function, it's a sign +that your modules are too tightly coupled (and less flexible, less reusable, +less testable, etc). You are probably better off defining a small interface and +call the function through that interface, which then can be easily mocked. It's +a bit of work initially, but usually pays for itself quickly. + +This Google Testing Blog +[post](https://testing.googleblog.com/2008/06/defeat-static-cling.html) says it +excellently. Check it out. + +### My mock object needs to do complex stuff. It's a lot of pain to specify the actions. gMock sucks! + +I know it's not a question, but you get an answer for free any way. :-) + +With gMock, you can create mocks in C++ easily. And people might be tempted to +use them everywhere. Sometimes they work great, and sometimes you may find them, +well, a pain to use. So, what's wrong in the latter case? + +When you write a test without using mocks, you exercise the code and assert that +it returns the correct value or that the system is in an expected state. This is +sometimes called "state-based testing". + +Mocks are great for what some call "interaction-based" testing: instead of +checking the system state at the very end, mock objects verify that they are +invoked the right way and report an error as soon as it arises, giving you a +handle on the precise context in which the error was triggered. This is often +more effective and economical to do than state-based testing. + +If you are doing state-based testing and using a test double just to simulate +the real object, you are probably better off using a fake. Using a mock in this +case causes pain, as it's not a strong point for mocks to perform complex +actions. If you experience this and think that mocks suck, you are just not +using the right tool for your problem. Or, you might be trying to solve the +wrong problem. :-) + +### I got a warning "Uninteresting function call encountered - default action taken.." Should I panic? + +By all means, NO! It's just an FYI. :-) + +What it means is that you have a mock function, you haven't set any expectations +on it (by gMock's rule this means that you are not interested in calls to this +function and therefore it can be called any number of times), and it is called. +That's OK - you didn't say it's not OK to call the function! + +What if you actually meant to disallow this function to be called, but forgot to +write `EXPECT_CALL(foo, Bar()).Times(0)`? While one can argue that it's the +user's fault, gMock tries to be nice and prints you a note. + +So, when you see the message and believe that there shouldn't be any +uninteresting calls, you should investigate what's going on. To make your life +easier, gMock dumps the stack trace when an uninteresting call is encountered. +From that you can figure out which mock function it is, and how it is called. + +### I want to define a custom action. Should I use Invoke() or implement the ActionInterface interface? + +Either way is fine - you want to choose the one that's more convenient for your +circumstance. + +Usually, if your action is for a particular function type, defining it using +`Invoke()` should be easier; if your action can be used in functions of +different types (e.g. if you are defining `Return(*value*)`), +`MakePolymorphicAction()` is easiest. Sometimes you want precise control on what +types of functions the action can be used in, and implementing `ActionInterface` +is the way to go here. See the implementation of `Return()` in `gmock-actions.h` +for an example. + +### I use SetArgPointee() in WillOnce(), but gcc complains about "conflicting return type specified". What does it mean? + +You got this error as gMock has no idea what value it should return when the +mock method is called. `SetArgPointee()` says what the side effect is, but +doesn't say what the return value should be. You need `DoAll()` to chain a +`SetArgPointee()` with a `Return()` that provides a value appropriate to the API +being mocked. + +See this [recipe](gmock_cook_book.md#mocking-side-effects) for more details and +an example. + +### I have a huge mock class, and Microsoft Visual C++ runs out of memory when compiling it. What can I do? + +We've noticed that when the `/clr` compiler flag is used, Visual C++ uses 5~6 +times as much memory when compiling a mock class. We suggest to avoid `/clr` +when compiling native C++ mocks. diff --git a/graphics/asymptote/LspCpp/third_party/uri/deps/docs/gmock_for_dummies.md b/graphics/asymptote/LspCpp/third_party/uri/deps/docs/gmock_for_dummies.md new file mode 100644 index 0000000000..fa1296eebe --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/uri/deps/docs/gmock_for_dummies.md @@ -0,0 +1,700 @@ +# gMock for Dummies + +## What Is gMock? + +When you write a prototype or test, often it's not feasible or wise to rely on +real objects entirely. A **mock object** implements the same interface as a real +object (so it can be used as one), but lets you specify at run time how it will +be used and what it should do (which methods will be called? in which order? how +many times? with what arguments? what will they return? etc). + +It is easy to confuse the term *fake objects* with mock objects. Fakes and mocks +actually mean very different things in the Test-Driven Development (TDD) +community: + +* **Fake** objects have working implementations, but usually take some + shortcut (perhaps to make the operations less expensive), which makes them + not suitable for production. An in-memory file system would be an example of + a fake. +* **Mocks** are objects pre-programmed with *expectations*, which form a + specification of the calls they are expected to receive. + +If all this seems too abstract for you, don't worry - the most important thing +to remember is that a mock allows you to check the *interaction* between itself +and code that uses it. The difference between fakes and mocks shall become much +clearer once you start to use mocks. + +**gMock** is a library (sometimes we also call it a "framework" to make it sound +cool) for creating mock classes and using them. It does to C++ what +jMock/EasyMock does to Java (well, more or less). + +When using gMock, + +1. first, you use some simple macros to describe the interface you want to + mock, and they will expand to the implementation of your mock class; +2. next, you create some mock objects and specify its expectations and behavior + using an intuitive syntax; +3. then you exercise code that uses the mock objects. gMock will catch any + violation to the expectations as soon as it arises. + +## Why gMock? + +While mock objects help you remove unnecessary dependencies in tests and make +them fast and reliable, using mocks manually in C++ is *hard*: + +* Someone has to implement the mocks. The job is usually tedious and + error-prone. No wonder people go great distance to avoid it. +* The quality of those manually written mocks is a bit, uh, unpredictable. You + may see some really polished ones, but you may also see some that were + hacked up in a hurry and have all sorts of ad hoc restrictions. +* The knowledge you gained from using one mock doesn't transfer to the next + one. + +In contrast, Java and Python programmers have some fine mock frameworks (jMock, +EasyMock, etc), which automate the creation of mocks. As a result, mocking is a +proven effective technique and widely adopted practice in those communities. +Having the right tool absolutely makes the difference. + +gMock was built to help C++ programmers. It was inspired by jMock and EasyMock, +but designed with C++'s specifics in mind. It is your friend if any of the +following problems is bothering you: + +* You are stuck with a sub-optimal design and wish you had done more + prototyping before it was too late, but prototyping in C++ is by no means + "rapid". +* Your tests are slow as they depend on too many libraries or use expensive + resources (e.g. a database). +* Your tests are brittle as some resources they use are unreliable (e.g. the + network). +* You want to test how your code handles a failure (e.g. a file checksum + error), but it's not easy to cause one. +* You need to make sure that your module interacts with other modules in the + right way, but it's hard to observe the interaction; therefore you resort to + observing the side effects at the end of the action, but it's awkward at + best. +* You want to "mock out" your dependencies, except that they don't have mock + implementations yet; and, frankly, you aren't thrilled by some of those + hand-written mocks. + +We encourage you to use gMock as + +* a *design* tool, for it lets you experiment with your interface design early + and often. More iterations lead to better designs! +* a *testing* tool to cut your tests' outbound dependencies and probe the + interaction between your module and its collaborators. + +## Getting Started + +gMock is bundled with googletest. + +## A Case for Mock Turtles + +Let's look at an example. Suppose you are developing a graphics program that +relies on a [LOGO](http://en.wikipedia.org/wiki/Logo_programming_language)-like +API for drawing. How would you test that it does the right thing? Well, you can +run it and compare the screen with a golden screen snapshot, but let's admit it: +tests like this are expensive to run and fragile (What if you just upgraded to a +shiny new graphics card that has better anti-aliasing? Suddenly you have to +update all your golden images.). It would be too painful if all your tests are +like this. Fortunately, you learned about +[Dependency Injection](http://en.wikipedia.org/wiki/Dependency_injection) and know the right thing +to do: instead of having your application talk to the system API directly, wrap +the API in an interface (say, `Turtle`) and code to that interface: + +```cpp +class Turtle { + ... + virtual ~Turtle() {} + virtual void PenUp() = 0; + virtual void PenDown() = 0; + virtual void Forward(int distance) = 0; + virtual void Turn(int degrees) = 0; + virtual void GoTo(int x, int y) = 0; + virtual int GetX() const = 0; + virtual int GetY() const = 0; +}; +``` + +(Note that the destructor of `Turtle` **must** be virtual, as is the case for +**all** classes you intend to inherit from - otherwise the destructor of the +derived class will not be called when you delete an object through a base +pointer, and you'll get corrupted program states like memory leaks.) + +You can control whether the turtle's movement will leave a trace using `PenUp()` +and `PenDown()`, and control its movement using `Forward()`, `Turn()`, and +`GoTo()`. Finally, `GetX()` and `GetY()` tell you the current position of the +turtle. + +Your program will normally use a real implementation of this interface. In +tests, you can use a mock implementation instead. This allows you to easily +check what drawing primitives your program is calling, with what arguments, and +in which order. Tests written this way are much more robust (they won't break +because your new machine does anti-aliasing differently), easier to read and +maintain (the intent of a test is expressed in the code, not in some binary +images), and run *much, much faster*. + +## Writing the Mock Class + +If you are lucky, the mocks you need to use have already been implemented by +some nice people. If, however, you find yourself in the position to write a mock +class, relax - gMock turns this task into a fun game! (Well, almost.) + +### How to Define It + +Using the `Turtle` interface as example, here are the simple steps you need to +follow: + +* Derive a class `MockTurtle` from `Turtle`. +* Take a *virtual* function of `Turtle` (while it's possible to + [mock non-virtual methods using templates](gmock_cook_book.md#MockingNonVirtualMethods), + it's much more involved). +* In the `public:` section of the child class, write `MOCK_METHOD();` +* Now comes the fun part: you take the function signature, cut-and-paste it + into the macro, and add two commas - one between the return type and the + name, another between the name and the argument list. +* If you're mocking a const method, add a 4th parameter containing `(const)` + (the parentheses are required). +* Since you're overriding a virtual method, we suggest adding the `override` + keyword. For const methods the 4th parameter becomes `(const, override)`, + for non-const methods just `(override)`. This isn't mandatory. +* Repeat until all virtual functions you want to mock are done. (It goes + without saying that *all* pure virtual methods in your abstract class must + be either mocked or overridden.) + +After the process, you should have something like: + +```cpp +#include "gmock/gmock.h" // Brings in gMock. + +class MockTurtle : public Turtle { + public: + ... + MOCK_METHOD(void, PenUp, (), (override)); + MOCK_METHOD(void, PenDown, (), (override)); + MOCK_METHOD(void, Forward, (int distance), (override)); + MOCK_METHOD(void, Turn, (int degrees), (override)); + MOCK_METHOD(void, GoTo, (int x, int y), (override)); + MOCK_METHOD(int, GetX, (), (const, override)); + MOCK_METHOD(int, GetY, (), (const, override)); +}; +``` + +You don't need to define these mock methods somewhere else - the `MOCK_METHOD` +macro will generate the definitions for you. It's that simple! + +### Where to Put It + +When you define a mock class, you need to decide where to put its definition. +Some people put it in a `_test.cc`. This is fine when the interface being mocked +(say, `Foo`) is owned by the same person or team. Otherwise, when the owner of +`Foo` changes it, your test could break. (You can't really expect `Foo`'s +maintainer to fix every test that uses `Foo`, can you?) + +Generally, you should not define mock classes you don't own. If you must mock +such a class owned by others, define the mock class in `Foo`'s Bazel package +(usually the same directory or a `testing` sub-directory), and put it in a `.h` +and a `cc_library` with `testonly=True`. Then everyone can reference them from +their tests. If `Foo` ever changes, there is only one copy of `MockFoo` to +change, and only tests that depend on the changed methods need to be fixed. + +Another way to do it: you can introduce a thin layer `FooAdaptor` on top of +`Foo` and code to this new interface. Since you own `FooAdaptor`, you can absorb +changes in `Foo` much more easily. While this is more work initially, carefully +choosing the adaptor interface can make your code easier to write and more +readable (a net win in the long run), as you can choose `FooAdaptor` to fit your +specific domain much better than `Foo` does. + +## Using Mocks in Tests + +Once you have a mock class, using it is easy. The typical work flow is: + +1. Import the gMock names from the `testing` namespace such that you can use + them unqualified (You only have to do it once per file). Remember that + namespaces are a good idea. +2. Create some mock objects. +3. Specify your expectations on them (How many times will a method be called? + With what arguments? What should it do? etc.). +4. Exercise some code that uses the mocks; optionally, check the result using + googletest assertions. If a mock method is called more than expected or with + wrong arguments, you'll get an error immediately. +5. When a mock is destructed, gMock will automatically check whether all + expectations on it have been satisfied. + +Here's an example: + +```cpp +#include "path/to/mock-turtle.h" +#include "gmock/gmock.h" +#include "gtest/gtest.h" + +using ::testing::AtLeast; // #1 + +TEST(PainterTest, CanDrawSomething) { + MockTurtle turtle; // #2 + EXPECT_CALL(turtle, PenDown()) // #3 + .Times(AtLeast(1)); + + Painter painter(&turtle); // #4 + + EXPECT_TRUE(painter.DrawCircle(0, 0, 10)); // #5 +} +``` + +As you might have guessed, this test checks that `PenDown()` is called at least +once. If the `painter` object didn't call this method, your test will fail with +a message like this: + +```text +path/to/my_test.cc:119: Failure +Actual function call count doesn't match this expectation: +Actually: never called; +Expected: called at least once. +Stack trace: +... +``` + +**Tip 1:** If you run the test from an Emacs buffer, you can hit `` on +the line number to jump right to the failed expectation. + +**Tip 2:** If your mock objects are never deleted, the final verification won't +happen. Therefore it's a good idea to turn on the heap checker in your tests +when you allocate mocks on the heap. You get that automatically if you use the +`gtest_main` library already. + +**Important note:** gMock requires expectations to be set **before** the mock +functions are called, otherwise the behavior is **undefined**. Do not alternate +between calls to `EXPECT_CALL()` and calls to the mock functions, and do not set +any expectations on a mock after passing the mock to an API. + +This means `EXPECT_CALL()` should be read as expecting that a call will occur +*in the future*, not that a call has occurred. Why does gMock work like that? +Well, specifying the expectation beforehand allows gMock to report a violation +as soon as it rises, when the context (stack trace, etc) is still available. +This makes debugging much easier. + +Admittedly, this test is contrived and doesn't do much. You can easily achieve +the same effect without using gMock. However, as we shall reveal soon, gMock +allows you to do *so much more* with the mocks. + +## Setting Expectations + +The key to using a mock object successfully is to set the *right expectations* +on it. If you set the expectations too strict, your test will fail as the result +of unrelated changes. If you set them too loose, bugs can slip through. You want +to do it just right such that your test can catch exactly the kind of bugs you +intend it to catch. gMock provides the necessary means for you to do it "just +right." + +### General Syntax + +In gMock we use the `EXPECT_CALL()` macro to set an expectation on a mock +method. The general syntax is: + +```cpp +EXPECT_CALL(mock_object, method(matchers)) + .Times(cardinality) + .WillOnce(action) + .WillRepeatedly(action); +``` + +The macro has two arguments: first the mock object, and then the method and its +arguments. Note that the two are separated by a comma (`,`), not a period (`.`). +(Why using a comma? The answer is that it was necessary for technical reasons.) +If the method is not overloaded, the macro can also be called without matchers: + +```cpp +EXPECT_CALL(mock_object, non-overloaded-method) + .Times(cardinality) + .WillOnce(action) + .WillRepeatedly(action); +``` + +This syntax allows the test writer to specify "called with any arguments" +without explicitly specifying the number or types of arguments. To avoid +unintended ambiguity, this syntax may only be used for methods that are not +overloaded. + +Either form of the macro can be followed by some optional *clauses* that provide +more information about the expectation. We'll discuss how each clause works in +the coming sections. + +This syntax is designed to make an expectation read like English. For example, +you can probably guess that + +```cpp +using ::testing::Return; +... +EXPECT_CALL(turtle, GetX()) + .Times(5) + .WillOnce(Return(100)) + .WillOnce(Return(150)) + .WillRepeatedly(Return(200)); +``` + +says that the `turtle` object's `GetX()` method will be called five times, it +will return 100 the first time, 150 the second time, and then 200 every time. +Some people like to call this style of syntax a Domain-Specific Language (DSL). + +{: .callout .note} +**Note:** Why do we use a macro to do this? Well it serves two purposes: first +it makes expectations easily identifiable (either by `grep` or by a human +reader), and second it allows gMock to include the source file location of a +failed expectation in messages, making debugging easier. + +### Matchers: What Arguments Do We Expect? + +When a mock function takes arguments, we may specify what arguments we are +expecting, for example: + +```cpp +// Expects the turtle to move forward by 100 units. +EXPECT_CALL(turtle, Forward(100)); +``` + +Oftentimes you do not want to be too specific. Remember that talk about tests +being too rigid? Over specification leads to brittle tests and obscures the +intent of tests. Therefore we encourage you to specify only what's necessary—no +more, no less. If you aren't interested in the value of an argument, write `_` +as the argument, which means "anything goes": + +```cpp +using ::testing::_; +... +// Expects that the turtle jumps to somewhere on the x=50 line. +EXPECT_CALL(turtle, GoTo(50, _)); +``` + +`_` is an instance of what we call **matchers**. A matcher is like a predicate +and can test whether an argument is what we'd expect. You can use a matcher +inside `EXPECT_CALL()` wherever a function argument is expected. `_` is a +convenient way of saying "any value". + +In the above examples, `100` and `50` are also matchers; implicitly, they are +the same as `Eq(100)` and `Eq(50)`, which specify that the argument must be +equal (using `operator==`) to the matcher argument. There are many +[built-in matchers](reference/matchers.md) for common types (as well as +[custom matchers](gmock_cook_book.md#NewMatchers)); for example: + +```cpp +using ::testing::Ge; +... +// Expects the turtle moves forward by at least 100. +EXPECT_CALL(turtle, Forward(Ge(100))); +``` + +If you don't care about *any* arguments, rather than specify `_` for each of +them you may instead omit the parameter list: + +```cpp +// Expects the turtle to move forward. +EXPECT_CALL(turtle, Forward); +// Expects the turtle to jump somewhere. +EXPECT_CALL(turtle, GoTo); +``` + +This works for all non-overloaded methods; if a method is overloaded, you need +to help gMock resolve which overload is expected by specifying the number of +arguments and possibly also the +[types of the arguments](gmock_cook_book.md#SelectOverload). + +### Cardinalities: How Many Times Will It Be Called? + +The first clause we can specify following an `EXPECT_CALL()` is `Times()`. We +call its argument a **cardinality** as it tells *how many times* the call should +occur. It allows us to repeat an expectation many times without actually writing +it as many times. More importantly, a cardinality can be "fuzzy", just like a +matcher can be. This allows a user to express the intent of a test exactly. + +An interesting special case is when we say `Times(0)`. You may have guessed - it +means that the function shouldn't be called with the given arguments at all, and +gMock will report a googletest failure whenever the function is (wrongfully) +called. + +We've seen `AtLeast(n)` as an example of fuzzy cardinalities earlier. For the +list of built-in cardinalities you can use, see +[here](gmock_cheat_sheet.md#CardinalityList). + +The `Times()` clause can be omitted. **If you omit `Times()`, gMock will infer +the cardinality for you.** The rules are easy to remember: + +* If **neither** `WillOnce()` **nor** `WillRepeatedly()` is in the + `EXPECT_CALL()`, the inferred cardinality is `Times(1)`. +* If there are *n* `WillOnce()`'s but **no** `WillRepeatedly()`, where *n* >= + 1, the cardinality is `Times(n)`. +* If there are *n* `WillOnce()`'s and **one** `WillRepeatedly()`, where *n* >= + 0, the cardinality is `Times(AtLeast(n))`. + +**Quick quiz:** what do you think will happen if a function is expected to be +called twice but actually called four times? + +### Actions: What Should It Do? + +Remember that a mock object doesn't really have a working implementation? We as +users have to tell it what to do when a method is invoked. This is easy in +gMock. + +First, if the return type of a mock function is a built-in type or a pointer, +the function has a **default action** (a `void` function will just return, a +`bool` function will return `false`, and other functions will return 0). In +addition, in C++ 11 and above, a mock function whose return type is +default-constructible (i.e. has a default constructor) has a default action of +returning a default-constructed value. If you don't say anything, this behavior +will be used. + +Second, if a mock function doesn't have a default action, or the default action +doesn't suit you, you can specify the action to be taken each time the +expectation matches using a series of `WillOnce()` clauses followed by an +optional `WillRepeatedly()`. For example, + +```cpp +using ::testing::Return; +... +EXPECT_CALL(turtle, GetX()) + .WillOnce(Return(100)) + .WillOnce(Return(200)) + .WillOnce(Return(300)); +``` + +says that `turtle.GetX()` will be called *exactly three times* (gMock inferred +this from how many `WillOnce()` clauses we've written, since we didn't +explicitly write `Times()`), and will return 100, 200, and 300 respectively. + +```cpp +using ::testing::Return; +... +EXPECT_CALL(turtle, GetY()) + .WillOnce(Return(100)) + .WillOnce(Return(200)) + .WillRepeatedly(Return(300)); +``` + +says that `turtle.GetY()` will be called *at least twice* (gMock knows this as +we've written two `WillOnce()` clauses and a `WillRepeatedly()` while having no +explicit `Times()`), will return 100 and 200 respectively the first two times, +and 300 from the third time on. + +Of course, if you explicitly write a `Times()`, gMock will not try to infer the +cardinality itself. What if the number you specified is larger than there are +`WillOnce()` clauses? Well, after all `WillOnce()`s are used up, gMock will do +the *default* action for the function every time (unless, of course, you have a +`WillRepeatedly()`.). + +What can we do inside `WillOnce()` besides `Return()`? You can return a +reference using `ReturnRef(`*`variable`*`)`, or invoke a pre-defined function, +among [others](gmock_cook_book.md#using-actions). + +**Important note:** The `EXPECT_CALL()` statement evaluates the action clause +only once, even though the action may be performed many times. Therefore you +must be careful about side effects. The following may not do what you want: + +```cpp +using ::testing::Return; +... +int n = 100; +EXPECT_CALL(turtle, GetX()) + .Times(4) + .WillRepeatedly(Return(n++)); +``` + +Instead of returning 100, 101, 102, ..., consecutively, this mock function will +always return 100 as `n++` is only evaluated once. Similarly, `Return(new Foo)` +will create a new `Foo` object when the `EXPECT_CALL()` is executed, and will +return the same pointer every time. If you want the side effect to happen every +time, you need to define a custom action, which we'll teach in the +[cook book](gmock_cook_book.md). + +Time for another quiz! What do you think the following means? + +```cpp +using ::testing::Return; +... +EXPECT_CALL(turtle, GetY()) + .Times(4) + .WillOnce(Return(100)); +``` + +Obviously `turtle.GetY()` is expected to be called four times. But if you think +it will return 100 every time, think twice! Remember that one `WillOnce()` +clause will be consumed each time the function is invoked and the default action +will be taken afterwards. So the right answer is that `turtle.GetY()` will +return 100 the first time, but **return 0 from the second time on**, as +returning 0 is the default action for `int` functions. + +### Using Multiple Expectations {#MultiExpectations} + +So far we've only shown examples where you have a single expectation. More +realistically, you'll specify expectations on multiple mock methods which may be +from multiple mock objects. + +By default, when a mock method is invoked, gMock will search the expectations in +the **reverse order** they are defined, and stop when an active expectation that +matches the arguments is found (you can think of it as "newer rules override +older ones."). If the matching expectation cannot take any more calls, you will +get an upper-bound-violated failure. Here's an example: + +```cpp +using ::testing::_; +... +EXPECT_CALL(turtle, Forward(_)); // #1 +EXPECT_CALL(turtle, Forward(10)) // #2 + .Times(2); +``` + +If `Forward(10)` is called three times in a row, the third time it will be an +error, as the last matching expectation (#2) has been saturated. If, however, +the third `Forward(10)` call is replaced by `Forward(20)`, then it would be OK, +as now #1 will be the matching expectation. + +{: .callout .note} +**Note:** Why does gMock search for a match in the *reverse* order of the +expectations? The reason is that this allows a user to set up the default +expectations in a mock object's constructor or the test fixture's set-up phase +and then customize the mock by writing more specific expectations in the test +body. So, if you have two expectations on the same method, you want to put the +one with more specific matchers **after** the other, or the more specific rule +would be shadowed by the more general one that comes after it. + +{: .callout .tip} +**Tip:** It is very common to start with a catch-all expectation for a method +and `Times(AnyNumber())` (omitting arguments, or with `_` for all arguments, if +overloaded). This makes any calls to the method expected. This is not necessary +for methods that are not mentioned at all (these are "uninteresting"), but is +useful for methods that have some expectations, but for which other calls are +ok. See +[Understanding Uninteresting vs Unexpected Calls](gmock_cook_book.md#uninteresting-vs-unexpected). + +### Ordered vs Unordered Calls {#OrderedCalls} + +By default, an expectation can match a call even though an earlier expectation +hasn't been satisfied. In other words, the calls don't have to occur in the +order the expectations are specified. + +Sometimes, you may want all the expected calls to occur in a strict order. To +say this in gMock is easy: + +```cpp +using ::testing::InSequence; +... +TEST(FooTest, DrawsLineSegment) { + ... + { + InSequence seq; + + EXPECT_CALL(turtle, PenDown()); + EXPECT_CALL(turtle, Forward(100)); + EXPECT_CALL(turtle, PenUp()); + } + Foo(); +} +``` + +By creating an object of type `InSequence`, all expectations in its scope are +put into a *sequence* and have to occur *sequentially*. Since we are just +relying on the constructor and destructor of this object to do the actual work, +its name is really irrelevant. + +In this example, we test that `Foo()` calls the three expected functions in the +order as written. If a call is made out-of-order, it will be an error. + +(What if you care about the relative order of some of the calls, but not all of +them? Can you specify an arbitrary partial order? The answer is ... yes! The +details can be found [here](gmock_cook_book.md#OrderedCalls).) + +### All Expectations Are Sticky (Unless Said Otherwise) {#StickyExpectations} + +Now let's do a quick quiz to see how well you can use this mock stuff already. +How would you test that the turtle is asked to go to the origin *exactly twice* +(you want to ignore any other instructions it receives)? + +After you've come up with your answer, take a look at ours and compare notes +(solve it yourself first - don't cheat!): + +```cpp +using ::testing::_; +using ::testing::AnyNumber; +... +EXPECT_CALL(turtle, GoTo(_, _)) // #1 + .Times(AnyNumber()); +EXPECT_CALL(turtle, GoTo(0, 0)) // #2 + .Times(2); +``` + +Suppose `turtle.GoTo(0, 0)` is called three times. In the third time, gMock will +see that the arguments match expectation #2 (remember that we always pick the +last matching expectation). Now, since we said that there should be only two +such calls, gMock will report an error immediately. This is basically what we've +told you in the [Using Multiple Expectations](#MultiExpectations) section above. + +This example shows that **expectations in gMock are "sticky" by default**, in +the sense that they remain active even after we have reached their invocation +upper bounds. This is an important rule to remember, as it affects the meaning +of the spec, and is **different** to how it's done in many other mocking +frameworks (Why'd we do that? Because we think our rule makes the common cases +easier to express and understand.). + +Simple? Let's see if you've really understood it: what does the following code +say? + +```cpp +using ::testing::Return; +... +for (int i = n; i > 0; i--) { + EXPECT_CALL(turtle, GetX()) + .WillOnce(Return(10*i)); +} +``` + +If you think it says that `turtle.GetX()` will be called `n` times and will +return 10, 20, 30, ..., consecutively, think twice! The problem is that, as we +said, expectations are sticky. So, the second time `turtle.GetX()` is called, +the last (latest) `EXPECT_CALL()` statement will match, and will immediately +lead to an "upper bound violated" error - this piece of code is not very useful! + +One correct way of saying that `turtle.GetX()` will return 10, 20, 30, ..., is +to explicitly say that the expectations are *not* sticky. In other words, they +should *retire* as soon as they are saturated: + +```cpp +using ::testing::Return; +... +for (int i = n; i > 0; i--) { + EXPECT_CALL(turtle, GetX()) + .WillOnce(Return(10*i)) + .RetiresOnSaturation(); +} +``` + +And, there's a better way to do it: in this case, we expect the calls to occur +in a specific order, and we line up the actions to match the order. Since the +order is important here, we should make it explicit using a sequence: + +```cpp +using ::testing::InSequence; +using ::testing::Return; +... +{ + InSequence s; + + for (int i = 1; i <= n; i++) { + EXPECT_CALL(turtle, GetX()) + .WillOnce(Return(10*i)) + .RetiresOnSaturation(); + } +} +``` + +By the way, the other situation where an expectation may *not* be sticky is when +it's in a sequence - as soon as another expectation that comes after it in the +sequence has been used, it automatically retires (and will never be used to +match any call). + +### Uninteresting Calls + +A mock object may have many methods, and not all of them are that interesting. +For example, in some tests we may not care about how many times `GetX()` and +`GetY()` get called. + +In gMock, if you are not interested in a method, just don't say anything about +it. If a call to this method occurs, you'll see a warning in the test output, +but it won't be a failure. This is called "naggy" behavior; to change, see +[The Nice, the Strict, and the Naggy](gmock_cook_book.md#NiceStrictNaggy). diff --git a/graphics/asymptote/LspCpp/third_party/uri/deps/docs/index.md b/graphics/asymptote/LspCpp/third_party/uri/deps/docs/index.md new file mode 100644 index 0000000000..b162c74011 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/uri/deps/docs/index.md @@ -0,0 +1,22 @@ +# GoogleTest User's Guide + +## Welcome to GoogleTest! + +GoogleTest is Google's C++ testing and mocking framework. This user's guide has +the following contents: + +* [GoogleTest Primer](primer.md) - Teaches you how to write simple tests using + GoogleTest. Read this first if you are new to GoogleTest. +* [GoogleTest Advanced](advanced.md) - Read this when you've finished the + Primer and want to utilize GoogleTest to its full potential. +* [GoogleTest Samples](samples.md) - Describes some GoogleTest samples. +* [GoogleTest FAQ](faq.md) - Have a question? Want some tips? Check here + first. +* [Mocking for Dummies](gmock_for_dummies.md) - Teaches you how to create mock + objects and use them in tests. +* [Mocking Cookbook](gmock_cook_book.md) - Includes tips and approaches to + common mocking use cases. +* [Mocking Cheat Sheet](gmock_cheat_sheet.md) - A handy reference for + matchers, actions, invariants, and more. +* [Mocking FAQ](gmock_faq.md) - Contains answers to some mocking-specific + questions. diff --git a/graphics/asymptote/LspCpp/third_party/uri/deps/docs/pkgconfig.md b/graphics/asymptote/LspCpp/third_party/uri/deps/docs/pkgconfig.md new file mode 100644 index 0000000000..18a2546a38 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/uri/deps/docs/pkgconfig.md @@ -0,0 +1,148 @@ +## Using GoogleTest from various build systems + +GoogleTest comes with pkg-config files that can be used to determine all +necessary flags for compiling and linking to GoogleTest (and GoogleMock). +Pkg-config is a standardised plain-text format containing + +* the includedir (-I) path +* necessary macro (-D) definitions +* further required flags (-pthread) +* the library (-L) path +* the library (-l) to link to + +All current build systems support pkg-config in one way or another. For all +examples here we assume you want to compile the sample +`samples/sample3_unittest.cc`. + +### CMake + +Using `pkg-config` in CMake is fairly easy: + +```cmake +cmake_minimum_required(VERSION 3.0) + +cmake_policy(SET CMP0048 NEW) +project(my_gtest_pkgconfig VERSION 0.0.1 LANGUAGES CXX) + +find_package(PkgConfig) +pkg_search_module(GTEST REQUIRED gtest_main) + +add_executable(testapp samples/sample3_unittest.cc) +target_link_libraries(testapp ${GTEST_LDFLAGS}) +target_compile_options(testapp PUBLIC ${GTEST_CFLAGS}) + +include(CTest) +add_test(first_and_only_test testapp) +``` + +It is generally recommended that you use `target_compile_options` + `_CFLAGS` +over `target_include_directories` + `_INCLUDE_DIRS` as the former includes not +just -I flags (GoogleTest might require a macro indicating to internal headers +that all libraries have been compiled with threading enabled. In addition, +GoogleTest might also require `-pthread` in the compiling step, and as such +splitting the pkg-config `Cflags` variable into include dirs and macros for +`target_compile_definitions()` might still miss this). The same recommendation +goes for using `_LDFLAGS` over the more commonplace `_LIBRARIES`, which happens +to discard `-L` flags and `-pthread`. + +### Help! pkg-config can't find GoogleTest! + +Let's say you have a `CMakeLists.txt` along the lines of the one in this +tutorial and you try to run `cmake`. It is very possible that you get a failure +along the lines of: + +``` +-- Checking for one of the modules 'gtest_main' +CMake Error at /usr/share/cmake/Modules/FindPkgConfig.cmake:640 (message): + None of the required 'gtest_main' found +``` + +These failures are common if you installed GoogleTest yourself and have not +sourced it from a distro or other package manager. If so, you need to tell +pkg-config where it can find the `.pc` files containing the information. Say you +installed GoogleTest to `/usr/local`, then it might be that the `.pc` files are +installed under `/usr/local/lib64/pkgconfig`. If you set + +``` +export PKG_CONFIG_PATH=/usr/local/lib64/pkgconfig +``` + +pkg-config will also try to look in `PKG_CONFIG_PATH` to find `gtest_main.pc`. + +### Using pkg-config in a cross-compilation setting + +Pkg-config can be used in a cross-compilation setting too. To do this, let's +assume the final prefix of the cross-compiled installation will be `/usr`, and +your sysroot is `/home/MYUSER/sysroot`. Configure and install GTest using + +``` +mkdir build && cmake -DCMAKE_INSTALL_PREFIX=/usr .. +``` + +Install into the sysroot using `DESTDIR`: + +``` +make -j install DESTDIR=/home/MYUSER/sysroot +``` + +Before we continue, it is recommended to **always** define the following two +variables for pkg-config in a cross-compilation setting: + +``` +export PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=yes +export PKG_CONFIG_ALLOW_SYSTEM_LIBS=yes +``` + +otherwise `pkg-config` will filter `-I` and `-L` flags against standard prefixes +such as `/usr` (see https://bugs.freedesktop.org/show_bug.cgi?id=28264#c3 for +reasons why this stripping needs to occur usually). + +If you look at the generated pkg-config file, it will look something like + +``` +libdir=/usr/lib64 +includedir=/usr/include + +Name: gtest +Description: GoogleTest (without main() function) +Version: 1.11.0 +URL: https://github.com/google/googletest +Libs: -L${libdir} -lgtest -lpthread +Cflags: -I${includedir} -DGTEST_HAS_PTHREAD=1 -lpthread +``` + +Notice that the sysroot is not included in `libdir` and `includedir`! If you try +to run `pkg-config` with the correct +`PKG_CONFIG_LIBDIR=/home/MYUSER/sysroot/usr/lib64/pkgconfig` against this `.pc` +file, you will get + +``` +$ pkg-config --cflags gtest +-DGTEST_HAS_PTHREAD=1 -lpthread -I/usr/include +$ pkg-config --libs gtest +-L/usr/lib64 -lgtest -lpthread +``` + +which is obviously wrong and points to the `CBUILD` and not `CHOST` root. In +order to use this in a cross-compilation setting, we need to tell pkg-config to +inject the actual sysroot into `-I` and `-L` variables. Let us now tell +pkg-config about the actual sysroot + +``` +export PKG_CONFIG_DIR= +export PKG_CONFIG_SYSROOT_DIR=/home/MYUSER/sysroot +export PKG_CONFIG_LIBDIR=${PKG_CONFIG_SYSROOT_DIR}/usr/lib64/pkgconfig +``` + +and running `pkg-config` again we get + +``` +$ pkg-config --cflags gtest +-DGTEST_HAS_PTHREAD=1 -lpthread -I/home/MYUSER/sysroot/usr/include +$ pkg-config --libs gtest +-L/home/MYUSER/sysroot/usr/lib64 -lgtest -lpthread +``` + +which contains the correct sysroot now. For a more comprehensive guide to also +including `${CHOST}` in build system calls, see the excellent tutorial by Diego +Elio Pettenò: diff --git a/graphics/asymptote/LspCpp/third_party/uri/deps/docs/platforms.md b/graphics/asymptote/LspCpp/third_party/uri/deps/docs/platforms.md new file mode 100644 index 0000000000..eba6ef8056 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/uri/deps/docs/platforms.md @@ -0,0 +1,35 @@ +# Supported Platforms + +GoogleTest requires a codebase and compiler compliant with the C++11 standard or +newer. + +The GoogleTest code is officially supported on the following platforms. +Operating systems or tools not listed below are community-supported. For +community-supported platforms, patches that do not complicate the code may be +considered. + +If you notice any problems on your platform, please file an issue on the +[GoogleTest GitHub Issue Tracker](https://github.com/google/googletest/issues). +Pull requests containing fixes are welcome! + +### Operating systems + +* Linux +* macOS +* Windows + +### Compilers + +* gcc 5.0+ +* clang 5.0+ +* MSVC 2015+ + +**macOS users:** Xcode 9.3+ provides clang 5.0+. + +### Build systems + +* [Bazel](https://bazel.build/) +* [CMake](https://cmake.org/) + +Bazel is the build system used by the team internally and in tests. CMake is +supported on a best-effort basis and by the community. diff --git a/graphics/asymptote/LspCpp/third_party/uri/deps/docs/primer.md b/graphics/asymptote/LspCpp/third_party/uri/deps/docs/primer.md new file mode 100644 index 0000000000..f6318a5dbe --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/uri/deps/docs/primer.md @@ -0,0 +1,482 @@ +# Googletest Primer + +## Introduction: Why googletest? + +*googletest* helps you write better C++ tests. + +googletest is a testing framework developed by the Testing Technology team with +Google's specific requirements and constraints in mind. Whether you work on +Linux, Windows, or a Mac, if you write C++ code, googletest can help you. And it +supports *any* kind of tests, not just unit tests. + +So what makes a good test, and how does googletest fit in? We believe: + +1. Tests should be *independent* and *repeatable*. It's a pain to debug a test + that succeeds or fails as a result of other tests. googletest isolates the + tests by running each of them on a different object. When a test fails, + googletest allows you to run it in isolation for quick debugging. +2. Tests should be well *organized* and reflect the structure of the tested + code. googletest groups related tests into test suites that can share data + and subroutines. This common pattern is easy to recognize and makes tests + easy to maintain. Such consistency is especially helpful when people switch + projects and start to work on a new code base. +3. Tests should be *portable* and *reusable*. Google has a lot of code that is + platform-neutral; its tests should also be platform-neutral. googletest + works on different OSes, with different compilers, with or without + exceptions, so googletest tests can work with a variety of configurations. +4. When tests fail, they should provide as much *information* about the problem + as possible. googletest doesn't stop at the first test failure. Instead, it + only stops the current test and continues with the next. You can also set up + tests that report non-fatal failures after which the current test continues. + Thus, you can detect and fix multiple bugs in a single run-edit-compile + cycle. +5. The testing framework should liberate test writers from housekeeping chores + and let them focus on the test *content*. googletest automatically keeps + track of all tests defined, and doesn't require the user to enumerate them + in order to run them. +6. Tests should be *fast*. With googletest, you can reuse shared resources + across tests and pay for the set-up/tear-down only once, without making + tests depend on each other. + +Since googletest is based on the popular xUnit architecture, you'll feel right +at home if you've used JUnit or PyUnit before. If not, it will take you about 10 +minutes to learn the basics and get started. So let's go! + +## Beware of the nomenclature + +{: .callout .note} +_Note:_ There might be some confusion arising from different definitions of the +terms _Test_, _Test Case_ and _Test Suite_, so beware of misunderstanding these. + +Historically, googletest started to use the term _Test Case_ for grouping +related tests, whereas current publications, including International Software +Testing Qualifications Board ([ISTQB](http://www.istqb.org/)) materials and +various textbooks on software quality, use the term +_[Test Suite][istqb test suite]_ for this. + +The related term _Test_, as it is used in googletest, corresponds to the term +_[Test Case][istqb test case]_ of ISTQB and others. + +The term _Test_ is commonly of broad enough sense, including ISTQB's definition +of _Test Case_, so it's not much of a problem here. But the term _Test Case_ as +was used in Google Test is of contradictory sense and thus confusing. + +googletest recently started replacing the term _Test Case_ with _Test Suite_. +The preferred API is *TestSuite*. The older TestCase API is being slowly +deprecated and refactored away. + +So please be aware of the different definitions of the terms: + + +Meaning | googletest Term | [ISTQB](http://www.istqb.org/) Term +:----------------------------------------------------------------------------------- | :---------------------- | :---------------------------------- +Exercise a particular program path with specific input values and verify the results | [TEST()](#simple-tests) | [Test Case][istqb test case] + + +[istqb test case]: http://glossary.istqb.org/en/search/test%20case +[istqb test suite]: http://glossary.istqb.org/en/search/test%20suite + +## Basic Concepts + +When using googletest, you start by writing *assertions*, which are statements +that check whether a condition is true. An assertion's result can be *success*, +*nonfatal failure*, or *fatal failure*. If a fatal failure occurs, it aborts the +current function; otherwise the program continues normally. + +*Tests* use assertions to verify the tested code's behavior. If a test crashes +or has a failed assertion, then it *fails*; otherwise it *succeeds*. + +A *test suite* contains one or many tests. You should group your tests into test +suites that reflect the structure of the tested code. When multiple tests in a +test suite need to share common objects and subroutines, you can put them into a +*test fixture* class. + +A *test program* can contain multiple test suites. + +We'll now explain how to write a test program, starting at the individual +assertion level and building up to tests and test suites. + +## Assertions + +googletest assertions are macros that resemble function calls. You test a class +or function by making assertions about its behavior. When an assertion fails, +googletest prints the assertion's source file and line number location, along +with a failure message. You may also supply a custom failure message which will +be appended to googletest's message. + +The assertions come in pairs that test the same thing but have different effects +on the current function. `ASSERT_*` versions generate fatal failures when they +fail, and **abort the current function**. `EXPECT_*` versions generate nonfatal +failures, which don't abort the current function. Usually `EXPECT_*` are +preferred, as they allow more than one failure to be reported in a test. +However, you should use `ASSERT_*` if it doesn't make sense to continue when the +assertion in question fails. + +Since a failed `ASSERT_*` returns from the current function immediately, +possibly skipping clean-up code that comes after it, it may cause a space leak. +Depending on the nature of the leak, it may or may not be worth fixing - so keep +this in mind if you get a heap checker error in addition to assertion errors. + +To provide a custom failure message, simply stream it into the macro using the +`<<` operator or a sequence of such operators. See the following example, using +the [`ASSERT_EQ` and `EXPECT_EQ`](reference/assertions.md#EXPECT_EQ) macros to +verify value equality: + +```c++ +ASSERT_EQ(x.size(), y.size()) << "Vectors x and y are of unequal length"; + +for (int i = 0; i < x.size(); ++i) { + EXPECT_EQ(x[i], y[i]) << "Vectors x and y differ at index " << i; +} +``` + +Anything that can be streamed to an `ostream` can be streamed to an assertion +macro--in particular, C strings and `string` objects. If a wide string +(`wchar_t*`, `TCHAR*` in `UNICODE` mode on Windows, or `std::wstring`) is +streamed to an assertion, it will be translated to UTF-8 when printed. + +GoogleTest provides a collection of assertions for verifying the behavior of +your code in various ways. You can check Boolean conditions, compare values +based on relational operators, verify string values, floating-point values, and +much more. There are even assertions that enable you to verify more complex +states by providing custom predicates. For the complete list of assertions +provided by GoogleTest, see the [Assertions Reference](reference/assertions.md). + +## Simple Tests + +To create a test: + +1. Use the `TEST()` macro to define and name a test function. These are + ordinary C++ functions that don't return a value. +2. In this function, along with any valid C++ statements you want to include, + use the various googletest assertions to check values. +3. The test's result is determined by the assertions; if any assertion in the + test fails (either fatally or non-fatally), or if the test crashes, the + entire test fails. Otherwise, it succeeds. + +```c++ +TEST(TestSuiteName, TestName) { + ... test body ... +} +``` + +`TEST()` arguments go from general to specific. The *first* argument is the name +of the test suite, and the *second* argument is the test's name within the test +suite. Both names must be valid C++ identifiers, and they should not contain any +underscores (`_`). A test's *full name* consists of its containing test suite +and its individual name. Tests from different test suites can have the same +individual name. + +For example, let's take a simple integer function: + +```c++ +int Factorial(int n); // Returns the factorial of n +``` + +A test suite for this function might look like: + +```c++ +// Tests factorial of 0. +TEST(FactorialTest, HandlesZeroInput) { + EXPECT_EQ(Factorial(0), 1); +} + +// Tests factorial of positive numbers. +TEST(FactorialTest, HandlesPositiveInput) { + EXPECT_EQ(Factorial(1), 1); + EXPECT_EQ(Factorial(2), 2); + EXPECT_EQ(Factorial(3), 6); + EXPECT_EQ(Factorial(8), 40320); +} +``` + +googletest groups the test results by test suites, so logically related tests +should be in the same test suite; in other words, the first argument to their +`TEST()` should be the same. In the above example, we have two tests, +`HandlesZeroInput` and `HandlesPositiveInput`, that belong to the same test +suite `FactorialTest`. + +When naming your test suites and tests, you should follow the same convention as +for +[naming functions and classes](https://google.github.io/styleguide/cppguide.html#Function_Names). + +**Availability**: Linux, Windows, Mac. + +## Test Fixtures: Using the Same Data Configuration for Multiple Tests {#same-data-multiple-tests} + +If you find yourself writing two or more tests that operate on similar data, you +can use a *test fixture*. This allows you to reuse the same configuration of +objects for several different tests. + +To create a fixture: + +1. Derive a class from `::testing::Test` . Start its body with `protected:`, as + we'll want to access fixture members from sub-classes. +2. Inside the class, declare any objects you plan to use. +3. If necessary, write a default constructor or `SetUp()` function to prepare + the objects for each test. A common mistake is to spell `SetUp()` as + **`Setup()`** with a small `u` - Use `override` in C++11 to make sure you + spelled it correctly. +4. If necessary, write a destructor or `TearDown()` function to release any + resources you allocated in `SetUp()` . To learn when you should use the + constructor/destructor and when you should use `SetUp()/TearDown()`, read + the [FAQ](faq.md#CtorVsSetUp). +5. If needed, define subroutines for your tests to share. + +When using a fixture, use `TEST_F()` instead of `TEST()` as it allows you to +access objects and subroutines in the test fixture: + +```c++ +TEST_F(TestFixtureName, TestName) { + ... test body ... +} +``` + +Like `TEST()`, the first argument is the test suite name, but for `TEST_F()` +this must be the name of the test fixture class. You've probably guessed: `_F` +is for fixture. + +Unfortunately, the C++ macro system does not allow us to create a single macro +that can handle both types of tests. Using the wrong macro causes a compiler +error. + +Also, you must first define a test fixture class before using it in a +`TEST_F()`, or you'll get the compiler error "`virtual outside class +declaration`". + +For each test defined with `TEST_F()`, googletest will create a *fresh* test +fixture at runtime, immediately initialize it via `SetUp()`, run the test, clean +up by calling `TearDown()`, and then delete the test fixture. Note that +different tests in the same test suite have different test fixture objects, and +googletest always deletes a test fixture before it creates the next one. +googletest does **not** reuse the same test fixture for multiple tests. Any +changes one test makes to the fixture do not affect other tests. + +As an example, let's write tests for a FIFO queue class named `Queue`, which has +the following interface: + +```c++ +template // E is the element type. +class Queue { + public: + Queue(); + void Enqueue(const E& element); + E* Dequeue(); // Returns NULL if the queue is empty. + size_t size() const; + ... +}; +``` + +First, define a fixture class. By convention, you should give it the name +`FooTest` where `Foo` is the class being tested. + +```c++ +class QueueTest : public ::testing::Test { + protected: + void SetUp() override { + q0_.Enqueue(1); + q1_.Enqueue(2); + q2_.Enqueue(3); + } + + // void TearDown() override {} + + Queue q0_; + Queue q1_; + Queue q2_; +}; +``` + +In this case, `TearDown()` is not needed since we don't have to clean up after +each test, other than what's already done by the destructor. + +Now we'll write tests using `TEST_F()` and this fixture. + +```c++ +TEST_F(QueueTest, IsEmptyInitially) { + EXPECT_EQ(q0_.size(), 0); +} + +TEST_F(QueueTest, DequeueWorks) { + int* n = q0_.Dequeue(); + EXPECT_EQ(n, nullptr); + + n = q1_.Dequeue(); + ASSERT_NE(n, nullptr); + EXPECT_EQ(*n, 1); + EXPECT_EQ(q1_.size(), 0); + delete n; + + n = q2_.Dequeue(); + ASSERT_NE(n, nullptr); + EXPECT_EQ(*n, 2); + EXPECT_EQ(q2_.size(), 1); + delete n; +} +``` + +The above uses both `ASSERT_*` and `EXPECT_*` assertions. The rule of thumb is +to use `EXPECT_*` when you want the test to continue to reveal more errors after +the assertion failure, and use `ASSERT_*` when continuing after failure doesn't +make sense. For example, the second assertion in the `Dequeue` test is +`ASSERT_NE(n, nullptr)`, as we need to dereference the pointer `n` later, which +would lead to a segfault when `n` is `NULL`. + +When these tests run, the following happens: + +1. googletest constructs a `QueueTest` object (let's call it `t1`). +2. `t1.SetUp()` initializes `t1`. +3. The first test (`IsEmptyInitially`) runs on `t1`. +4. `t1.TearDown()` cleans up after the test finishes. +5. `t1` is destructed. +6. The above steps are repeated on another `QueueTest` object, this time + running the `DequeueWorks` test. + +**Availability**: Linux, Windows, Mac. + +## Invoking the Tests + +`TEST()` and `TEST_F()` implicitly register their tests with googletest. So, +unlike with many other C++ testing frameworks, you don't have to re-list all +your defined tests in order to run them. + +After defining your tests, you can run them with `RUN_ALL_TESTS()`, which +returns `0` if all the tests are successful, or `1` otherwise. Note that +`RUN_ALL_TESTS()` runs *all tests* in your link unit--they can be from different +test suites, or even different source files. + +When invoked, the `RUN_ALL_TESTS()` macro: + +* Saves the state of all googletest flags. + +* Creates a test fixture object for the first test. + +* Initializes it via `SetUp()`. + +* Runs the test on the fixture object. + +* Cleans up the fixture via `TearDown()`. + +* Deletes the fixture. + +* Restores the state of all googletest flags. + +* Repeats the above steps for the next test, until all tests have run. + +If a fatal failure happens the subsequent steps will be skipped. + +{: .callout .important} +> IMPORTANT: You must **not** ignore the return value of `RUN_ALL_TESTS()`, or +> you will get a compiler error. The rationale for this design is that the +> automated testing service determines whether a test has passed based on its +> exit code, not on its stdout/stderr output; thus your `main()` function must +> return the value of `RUN_ALL_TESTS()`. +> +> Also, you should call `RUN_ALL_TESTS()` only **once**. Calling it more than +> once conflicts with some advanced googletest features (e.g., thread-safe +> [death tests](advanced.md#death-tests)) and thus is not supported. + +**Availability**: Linux, Windows, Mac. + +## Writing the main() Function + +Most users should _not_ need to write their own `main` function and instead link +with `gtest_main` (as opposed to with `gtest`), which defines a suitable entry +point. See the end of this section for details. The remainder of this section +should only apply when you need to do something custom before the tests run that +cannot be expressed within the framework of fixtures and test suites. + +If you write your own `main` function, it should return the value of +`RUN_ALL_TESTS()`. + +You can start from this boilerplate: + +```c++ +#include "this/package/foo.h" + +#include "gtest/gtest.h" + +namespace my { +namespace project { +namespace { + +// The fixture for testing class Foo. +class FooTest : public ::testing::Test { + protected: + // You can remove any or all of the following functions if their bodies would + // be empty. + + FooTest() { + // You can do set-up work for each test here. + } + + ~FooTest() override { + // You can do clean-up work that doesn't throw exceptions here. + } + + // If the constructor and destructor are not enough for setting up + // and cleaning up each test, you can define the following methods: + + void SetUp() override { + // Code here will be called immediately after the constructor (right + // before each test). + } + + void TearDown() override { + // Code here will be called immediately after each test (right + // before the destructor). + } + + // Class members declared here can be used by all tests in the test suite + // for Foo. +}; + +// Tests that the Foo::Bar() method does Abc. +TEST_F(FooTest, MethodBarDoesAbc) { + const std::string input_filepath = "this/package/testdata/myinputfile.dat"; + const std::string output_filepath = "this/package/testdata/myoutputfile.dat"; + Foo f; + EXPECT_EQ(f.Bar(input_filepath, output_filepath), 0); +} + +// Tests that Foo does Xyz. +TEST_F(FooTest, DoesXyz) { + // Exercises the Xyz feature of Foo. +} + +} // namespace +} // namespace project +} // namespace my + +int main(int argc, char **argv) { + ::testing::InitGoogleTest(&argc, argv); + return RUN_ALL_TESTS(); +} +``` + +The `::testing::InitGoogleTest()` function parses the command line for +googletest flags, and removes all recognized flags. This allows the user to +control a test program's behavior via various flags, which we'll cover in the +[AdvancedGuide](advanced.md). You **must** call this function before calling +`RUN_ALL_TESTS()`, or the flags won't be properly initialized. + +On Windows, `InitGoogleTest()` also works with wide strings, so it can be used +in programs compiled in `UNICODE` mode as well. + +But maybe you think that writing all those `main` functions is too much work? We +agree with you completely, and that's why Google Test provides a basic +implementation of main(). If it fits your needs, then just link your test with +the `gtest_main` library and you are good to go. + +{: .callout .note} +NOTE: `ParseGUnitFlags()` is deprecated in favor of `InitGoogleTest()`. + +## Known Limitations + +* Google Test is designed to be thread-safe. The implementation is thread-safe + on systems where the `pthreads` library is available. It is currently + _unsafe_ to use Google Test assertions from two threads concurrently on + other systems (e.g. Windows). In most tests this is not an issue as usually + the assertions are done in the main thread. If you want to help, you can + volunteer to implement the necessary synchronization primitives in + `gtest-port.h` for your platform. diff --git a/graphics/asymptote/LspCpp/third_party/uri/deps/docs/quickstart-bazel.md b/graphics/asymptote/LspCpp/third_party/uri/deps/docs/quickstart-bazel.md new file mode 100644 index 0000000000..5d6e9c68ad --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/uri/deps/docs/quickstart-bazel.md @@ -0,0 +1,147 @@ +# Quickstart: Building with Bazel + +This tutorial aims to get you up and running with GoogleTest using the Bazel +build system. If you're using GoogleTest for the first time or need a refresher, +we recommend this tutorial as a starting point. + +## Prerequisites + +To complete this tutorial, you'll need: + +* A compatible operating system (e.g. Linux, macOS, Windows). +* A compatible C++ compiler that supports at least C++11. +* [Bazel](https://bazel.build/), the preferred build system used by the + GoogleTest team. + +See [Supported Platforms](platforms.md) for more information about platforms +compatible with GoogleTest. + +If you don't already have Bazel installed, see the +[Bazel installation guide](https://docs.bazel.build/versions/main/install.html). + +{: .callout .note} +Note: The terminal commands in this tutorial show a Unix shell prompt, but the +commands work on the Windows command line as well. + +## Set up a Bazel workspace + +A +[Bazel workspace](https://docs.bazel.build/versions/main/build-ref.html#workspace) +is a directory on your filesystem that you use to manage source files for the +software you want to build. Each workspace directory has a text file named +`WORKSPACE` which may be empty, or may contain references to external +dependencies required to build the outputs. + +First, create a directory for your workspace: + +``` +$ mkdir my_workspace && cd my_workspace +``` + +Next, you’ll create the `WORKSPACE` file to specify dependencies. A common and +recommended way to depend on GoogleTest is to use a +[Bazel external dependency](https://docs.bazel.build/versions/main/external.html) +via the +[`http_archive` rule](https://docs.bazel.build/versions/main/repo/http.html#http_archive). +To do this, in the root directory of your workspace (`my_workspace/`), create a +file named `WORKSPACE` with the following contents: + +``` +load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") + +http_archive( + name = "com_google_googletest", + urls = ["https://github.com/google/googletest/archive/609281088cfefc76f9d0ce82e1ff6c30cc3591e5.zip"], + strip_prefix = "googletest-609281088cfefc76f9d0ce82e1ff6c30cc3591e5", +) +``` + +The above configuration declares a dependency on GoogleTest which is downloaded +as a ZIP archive from GitHub. In the above example, +`609281088cfefc76f9d0ce82e1ff6c30cc3591e5` is the Git commit hash of the +GoogleTest version to use; we recommend updating the hash often to point to the +latest version. + +Now you're ready to build C++ code that uses GoogleTest. + +## Create and run a binary + +With your Bazel workspace set up, you can now use GoogleTest code within your +own project. + +As an example, create a file named `hello_test.cc` in your `my_workspace` +directory with the following contents: + +```cpp +#include + +// Demonstrate some basic assertions. +TEST(HelloTest, BasicAssertions) { + // Expect two strings not to be equal. + EXPECT_STRNE("hello", "world"); + // Expect equality. + EXPECT_EQ(7 * 6, 42); +} +``` + +GoogleTest provides [assertions](primer.md#assertions) that you use to test the +behavior of your code. The above sample includes the main GoogleTest header file +and demonstrates some basic assertions. + +To build the code, create a file named `BUILD` in the same directory with the +following contents: + +``` +cc_test( + name = "hello_test", + size = "small", + srcs = ["hello_test.cc"], + deps = ["@com_google_googletest//:gtest_main"], +) +``` + +This `cc_test` rule declares the C++ test binary you want to build, and links to +GoogleTest (`//:gtest_main`) using the prefix you specified in the `WORKSPACE` +file (`@com_google_googletest`). For more information about Bazel `BUILD` files, +see the +[Bazel C++ Tutorial](https://docs.bazel.build/versions/main/tutorial/cpp.html). + +Now you can build and run your test: + +
+my_workspace$ bazel test --test_output=all //:hello_test
+INFO: Analyzed target //:hello_test (26 packages loaded, 362 targets configured).
+INFO: Found 1 test target...
+INFO: From Testing //:hello_test:
+==================== Test output for //:hello_test:
+Running main() from gmock_main.cc
+[==========] Running 1 test from 1 test suite.
+[----------] Global test environment set-up.
+[----------] 1 test from HelloTest
+[ RUN      ] HelloTest.BasicAssertions
+[       OK ] HelloTest.BasicAssertions (0 ms)
+[----------] 1 test from HelloTest (0 ms total)
+
+[----------] Global test environment tear-down
+[==========] 1 test from 1 test suite ran. (0 ms total)
+[  PASSED  ] 1 test.
+================================================================================
+Target //:hello_test up-to-date:
+  bazel-bin/hello_test
+INFO: Elapsed time: 4.190s, Critical Path: 3.05s
+INFO: 27 processes: 8 internal, 19 linux-sandbox.
+INFO: Build completed successfully, 27 total actions
+//:hello_test                                                     PASSED in 0.1s
+
+INFO: Build completed successfully, 27 total actions
+
+ +Congratulations! You've successfully built and run a test binary using +GoogleTest. + +## Next steps + +* [Check out the Primer](primer.md) to start learning how to write simple + tests. +* [See the code samples](samples.md) for more examples showing how to use a + variety of GoogleTest features. diff --git a/graphics/asymptote/LspCpp/third_party/uri/deps/docs/quickstart-cmake.md b/graphics/asymptote/LspCpp/third_party/uri/deps/docs/quickstart-cmake.md new file mode 100644 index 0000000000..420f1d3a3c --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/uri/deps/docs/quickstart-cmake.md @@ -0,0 +1,156 @@ +# Quickstart: Building with CMake + +This tutorial aims to get you up and running with GoogleTest using CMake. If +you're using GoogleTest for the first time or need a refresher, we recommend +this tutorial as a starting point. If your project uses Bazel, see the +[Quickstart for Bazel](quickstart-bazel.md) instead. + +## Prerequisites + +To complete this tutorial, you'll need: + +* A compatible operating system (e.g. Linux, macOS, Windows). +* A compatible C++ compiler that supports at least C++11. +* [CMake](https://cmake.org/) and a compatible build tool for building the + project. + * Compatible build tools include + [Make](https://www.gnu.org/software/make/), + [Ninja](https://ninja-build.org/), and others - see + [CMake Generators](https://cmake.org/cmake/help/latest/manual/cmake-generators.7.html) + for more information. + +See [Supported Platforms](platforms.md) for more information about platforms +compatible with GoogleTest. + +If you don't already have CMake installed, see the +[CMake installation guide](https://cmake.org/install). + +{: .callout .note} +Note: The terminal commands in this tutorial show a Unix shell prompt, but the +commands work on the Windows command line as well. + +## Set up a project + +CMake uses a file named `CMakeLists.txt` to configure the build system for a +project. You'll use this file to set up your project and declare a dependency on +GoogleTest. + +First, create a directory for your project: + +``` +$ mkdir my_project && cd my_project +``` + +Next, you'll create the `CMakeLists.txt` file and declare a dependency on +GoogleTest. There are many ways to express dependencies in the CMake ecosystem; +in this quickstart, you'll use the +[`FetchContent` CMake module](https://cmake.org/cmake/help/latest/module/FetchContent.html). +To do this, in your project directory (`my_project`), create a file named +`CMakeLists.txt` with the following contents: + +```cmake +cmake_minimum_required(VERSION 3.14) +project(my_project) + +# GoogleTest requires at least C++11 +set(CMAKE_CXX_STANDARD 11) + +include(FetchContent) +FetchContent_Declare( + googletest + URL https://github.com/google/googletest/archive/609281088cfefc76f9d0ce82e1ff6c30cc3591e5.zip +) +# For Windows: Prevent overriding the parent project's compiler/linker settings +set(gtest_force_shared_crt ON CACHE BOOL "" FORCE) +FetchContent_MakeAvailable(googletest) +``` + +The above configuration declares a dependency on GoogleTest which is downloaded +from GitHub. In the above example, `609281088cfefc76f9d0ce82e1ff6c30cc3591e5` is +the Git commit hash of the GoogleTest version to use; we recommend updating the +hash often to point to the latest version. + +For more information about how to create `CMakeLists.txt` files, see the +[CMake Tutorial](https://cmake.org/cmake/help/latest/guide/tutorial/index.html). + +## Create and run a binary + +With GoogleTest declared as a dependency, you can use GoogleTest code within +your own project. + +As an example, create a file named `hello_test.cc` in your `my_project` +directory with the following contents: + +```cpp +#include + +// Demonstrate some basic assertions. +TEST(HelloTest, BasicAssertions) { + // Expect two strings not to be equal. + EXPECT_STRNE("hello", "world"); + // Expect equality. + EXPECT_EQ(7 * 6, 42); +} +``` + +GoogleTest provides [assertions](primer.md#assertions) that you use to test the +behavior of your code. The above sample includes the main GoogleTest header file +and demonstrates some basic assertions. + +To build the code, add the following to the end of your `CMakeLists.txt` file: + +```cmake +enable_testing() + +add_executable( + hello_test + hello_test.cc +) +target_link_libraries( + hello_test + gtest_main +) + +include(GoogleTest) +gtest_discover_tests(hello_test) +``` + +The above configuration enables testing in CMake, declares the C++ test binary +you want to build (`hello_test`), and links it to GoogleTest (`gtest_main`). The +last two lines enable CMake's test runner to discover the tests included in the +binary, using the +[`GoogleTest` CMake module](https://cmake.org/cmake/help/git-stage/module/GoogleTest.html). + +Now you can build and run your test: + +
+my_project$ cmake -S . -B build
+-- The C compiler identification is GNU 10.2.1
+-- The CXX compiler identification is GNU 10.2.1
+...
+-- Build files have been written to: .../my_project/build
+
+my_project$ cmake --build build
+Scanning dependencies of target gtest
+...
+[100%] Built target gmock_main
+
+my_project$ cd build && ctest
+Test project .../my_project/build
+    Start 1: HelloTest.BasicAssertions
+1/1 Test #1: HelloTest.BasicAssertions ........   Passed    0.00 sec
+
+100% tests passed, 0 tests failed out of 1
+
+Total Test time (real) =   0.01 sec
+
+ +Congratulations! You've successfully built and run a test binary using +GoogleTest. + +## Next steps + +* [Check out the Primer](primer.md) to start learning how to write simple + tests. +* [See the code samples](samples.md) for more examples showing how to use a + variety of GoogleTest features. diff --git a/graphics/asymptote/LspCpp/third_party/uri/deps/docs/reference/actions.md b/graphics/asymptote/LspCpp/third_party/uri/deps/docs/reference/actions.md new file mode 100644 index 0000000000..ab81a129ef --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/uri/deps/docs/reference/actions.md @@ -0,0 +1,115 @@ +# Actions Reference + +[**Actions**](../gmock_for_dummies.md#actions-what-should-it-do) specify what a +mock function should do when invoked. This page lists the built-in actions +provided by GoogleTest. All actions are defined in the `::testing` namespace. + +## Returning a Value + +| Action | Description | +| :-------------------------------- | :-------------------------------------------- | +| `Return()` | Return from a `void` mock function. | +| `Return(value)` | Return `value`. If the type of `value` is different to the mock function's return type, `value` is converted to the latter type at the time the expectation is set, not when the action is executed. | +| `ReturnArg()` | Return the `N`-th (0-based) argument. | +| `ReturnNew(a1, ..., ak)` | Return `new T(a1, ..., ak)`; a different object is created each time. | +| `ReturnNull()` | Return a null pointer. | +| `ReturnPointee(ptr)` | Return the value pointed to by `ptr`. | +| `ReturnRef(variable)` | Return a reference to `variable`. | +| `ReturnRefOfCopy(value)` | Return a reference to a copy of `value`; the copy lives as long as the action. | +| `ReturnRoundRobin({a1, ..., ak})` | Each call will return the next `ai` in the list, starting at the beginning when the end of the list is reached. | + +## Side Effects + +| Action | Description | +| :--------------------------------- | :-------------------------------------- | +| `Assign(&variable, value)` | Assign `value` to variable. | +| `DeleteArg()` | Delete the `N`-th (0-based) argument, which must be a pointer. | +| `SaveArg(pointer)` | Save the `N`-th (0-based) argument to `*pointer`. | +| `SaveArgPointee(pointer)` | Save the value pointed to by the `N`-th (0-based) argument to `*pointer`. | +| `SetArgReferee(value)` | Assign `value` to the variable referenced by the `N`-th (0-based) argument. | +| `SetArgPointee(value)` | Assign `value` to the variable pointed by the `N`-th (0-based) argument. | +| `SetArgumentPointee(value)` | Same as `SetArgPointee(value)`. Deprecated. Will be removed in v1.7.0. | +| `SetArrayArgument(first, last)` | Copies the elements in source range [`first`, `last`) to the array pointed to by the `N`-th (0-based) argument, which can be either a pointer or an iterator. The action does not take ownership of the elements in the source range. | +| `SetErrnoAndReturn(error, value)` | Set `errno` to `error` and return `value`. | +| `Throw(exception)` | Throws the given exception, which can be any copyable value. Available since v1.1.0. | + +## Using a Function, Functor, or Lambda as an Action + +In the following, by "callable" we mean a free function, `std::function`, +functor, or lambda. + +| Action | Description | +| :---------------------------------- | :------------------------------------- | +| `f` | Invoke `f` with the arguments passed to the mock function, where `f` is a callable. | +| `Invoke(f)` | Invoke `f` with the arguments passed to the mock function, where `f` can be a global/static function or a functor. | +| `Invoke(object_pointer, &class::method)` | Invoke the method on the object with the arguments passed to the mock function. | +| `InvokeWithoutArgs(f)` | Invoke `f`, which can be a global/static function or a functor. `f` must take no arguments. | +| `InvokeWithoutArgs(object_pointer, &class::method)` | Invoke the method on the object, which takes no arguments. | +| `InvokeArgument(arg1, arg2, ..., argk)` | Invoke the mock function's `N`-th (0-based) argument, which must be a function or a functor, with the `k` arguments. | + +The return value of the invoked function is used as the return value of the +action. + +When defining a callable to be used with `Invoke*()`, you can declare any unused +parameters as `Unused`: + +```cpp +using ::testing::Invoke; +double Distance(Unused, double x, double y) { return sqrt(x*x + y*y); } +... +EXPECT_CALL(mock, Foo("Hi", _, _)).WillOnce(Invoke(Distance)); +``` + +`Invoke(callback)` and `InvokeWithoutArgs(callback)` take ownership of +`callback`, which must be permanent. The type of `callback` must be a base +callback type instead of a derived one, e.g. + +```cpp + BlockingClosure* done = new BlockingClosure; + ... Invoke(done) ...; // This won't compile! + + Closure* done2 = new BlockingClosure; + ... Invoke(done2) ...; // This works. +``` + +In `InvokeArgument(...)`, if an argument needs to be passed by reference, +wrap it inside `std::ref()`. For example, + +```cpp +using ::testing::InvokeArgument; +... +InvokeArgument<2>(5, string("Hi"), std::ref(foo)) +``` + +calls the mock function's #2 argument, passing to it `5` and `string("Hi")` by +value, and `foo` by reference. + +## Default Action + +| Action | Description | +| :------------ | :----------------------------------------------------- | +| `DoDefault()` | Do the default action (specified by `ON_CALL()` or the built-in one). | + +{: .callout .note} +**Note:** due to technical reasons, `DoDefault()` cannot be used inside a +composite action - trying to do so will result in a run-time error. + +## Composite Actions + +| Action | Description | +| :----------------------------- | :------------------------------------------ | +| `DoAll(a1, a2, ..., an)` | Do all actions `a1` to `an` and return the result of `an` in each invocation. The first `n - 1` sub-actions must return void and will receive a readonly view of the arguments. | +| `IgnoreResult(a)` | Perform action `a` and ignore its result. `a` must not return void. | +| `WithArg(a)` | Pass the `N`-th (0-based) argument of the mock function to action `a` and perform it. | +| `WithArgs(a)` | Pass the selected (0-based) arguments of the mock function to action `a` and perform it. | +| `WithoutArgs(a)` | Perform action `a` without any arguments. | + +## Defining Actions + +| Macro | Description | +| :--------------------------------- | :-------------------------------------- | +| `ACTION(Sum) { return arg0 + arg1; }` | Defines an action `Sum()` to return the sum of the mock function's argument #0 and #1. | +| `ACTION_P(Plus, n) { return arg0 + n; }` | Defines an action `Plus(n)` to return the sum of the mock function's argument #0 and `n`. | +| `ACTION_Pk(Foo, p1, ..., pk) { statements; }` | Defines a parameterized action `Foo(p1, ..., pk)` to execute the given `statements`. | + +The `ACTION*` macros cannot be used inside a function or class. diff --git a/graphics/asymptote/LspCpp/third_party/uri/deps/docs/reference/assertions.md b/graphics/asymptote/LspCpp/third_party/uri/deps/docs/reference/assertions.md new file mode 100644 index 0000000000..7bf03a3dde --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/uri/deps/docs/reference/assertions.md @@ -0,0 +1,633 @@ +# Assertions Reference + +This page lists the assertion macros provided by GoogleTest for verifying code +behavior. To use them, include the header `gtest/gtest.h`. + +The majority of the macros listed below come as a pair with an `EXPECT_` variant +and an `ASSERT_` variant. Upon failure, `EXPECT_` macros generate nonfatal +failures and allow the current function to continue running, while `ASSERT_` +macros generate fatal failures and abort the current function. + +All assertion macros support streaming a custom failure message into them with +the `<<` operator, for example: + +```cpp +EXPECT_TRUE(my_condition) << "My condition is not true"; +``` + +Anything that can be streamed to an `ostream` can be streamed to an assertion +macro—in particular, C strings and string objects. If a wide string (`wchar_t*`, +`TCHAR*` in `UNICODE` mode on Windows, or `std::wstring`) is streamed to an +assertion, it will be translated to UTF-8 when printed. + +## Explicit Success and Failure {#success-failure} + +The assertions in this section generate a success or failure directly instead of +testing a value or expression. These are useful when control flow, rather than a +Boolean expression, determines the test's success or failure, as shown by the +following example: + +```c++ +switch(expression) { + case 1: + ... some checks ... + case 2: + ... some other checks ... + default: + FAIL() << "We shouldn't get here."; +} +``` + +### SUCCEED {#SUCCEED} + +`SUCCEED()` + +Generates a success. This *does not* make the overall test succeed. A test is +considered successful only if none of its assertions fail during its execution. + +The `SUCCEED` assertion is purely documentary and currently doesn't generate any +user-visible output. However, we may add `SUCCEED` messages to GoogleTest output +in the future. + +### FAIL {#FAIL} + +`FAIL()` + +Generates a fatal failure, which returns from the current function. + +Can only be used in functions that return `void`. See +[Assertion Placement](../advanced.md#assertion-placement) for more information. + +### ADD_FAILURE {#ADD_FAILURE} + +`ADD_FAILURE()` + +Generates a nonfatal failure, which allows the current function to continue +running. + +### ADD_FAILURE_AT {#ADD_FAILURE_AT} + +`ADD_FAILURE_AT(`*`file_path`*`,`*`line_number`*`)` + +Generates a nonfatal failure at the file and line number specified. + +## Generalized Assertion {#generalized} + +The following assertion allows [matchers](matchers.md) to be used to verify +values. + +### EXPECT_THAT {#EXPECT_THAT} + +`EXPECT_THAT(`*`value`*`,`*`matcher`*`)` \ +`ASSERT_THAT(`*`value`*`,`*`matcher`*`)` + +Verifies that *`value`* matches the [matcher](matchers.md) *`matcher`*. + +For example, the following code verifies that the string `value1` starts with +`"Hello"`, `value2` matches a regular expression, and `value3` is between 5 and +10: + +```cpp +#include "gmock/gmock.h" + +using ::testing::AllOf; +using ::testing::Gt; +using ::testing::Lt; +using ::testing::MatchesRegex; +using ::testing::StartsWith; + +... +EXPECT_THAT(value1, StartsWith("Hello")); +EXPECT_THAT(value2, MatchesRegex("Line \\d+")); +ASSERT_THAT(value3, AllOf(Gt(5), Lt(10))); +``` + +Matchers enable assertions of this form to read like English and generate +informative failure messages. For example, if the above assertion on `value1` +fails, the resulting message will be similar to the following: + +``` +Value of: value1 + Actual: "Hi, world!" +Expected: starts with "Hello" +``` + +GoogleTest provides a built-in library of matchers—see the +[Matchers Reference](matchers.md). It is also possible to write your own +matchers—see [Writing New Matchers Quickly](../gmock_cook_book.md#NewMatchers). +The use of matchers makes `EXPECT_THAT` a powerful, extensible assertion. + +*The idea for this assertion was borrowed from Joe Walnes' Hamcrest project, +which adds `assertThat()` to JUnit.* + +## Boolean Conditions {#boolean} + +The following assertions test Boolean conditions. + +### EXPECT_TRUE {#EXPECT_TRUE} + +`EXPECT_TRUE(`*`condition`*`)` \ +`ASSERT_TRUE(`*`condition`*`)` + +Verifies that *`condition`* is true. + +### EXPECT_FALSE {#EXPECT_FALSE} + +`EXPECT_FALSE(`*`condition`*`)` \ +`ASSERT_FALSE(`*`condition`*`)` + +Verifies that *`condition`* is false. + +## Binary Comparison {#binary-comparison} + +The following assertions compare two values. The value arguments must be +comparable by the assertion's comparison operator, otherwise a compiler error +will result. + +If an argument supports the `<<` operator, it will be called to print the +argument when the assertion fails. Otherwise, GoogleTest will attempt to print +them in the best way it can—see +[Teaching GoogleTest How to Print Your Values](../advanced.md#teaching-googletest-how-to-print-your-values). + +Arguments are always evaluated exactly once, so it's OK for the arguments to +have side effects. However, the argument evaluation order is undefined and +programs should not depend on any particular argument evaluation order. + +These assertions work with both narrow and wide string objects (`string` and +`wstring`). + +See also the [Floating-Point Comparison](#floating-point) assertions to compare +floating-point numbers and avoid problems caused by rounding. + +### EXPECT_EQ {#EXPECT_EQ} + +`EXPECT_EQ(`*`val1`*`,`*`val2`*`)` \ +`ASSERT_EQ(`*`val1`*`,`*`val2`*`)` + +Verifies that *`val1`*`==`*`val2`*. + +Does pointer equality on pointers. If used on two C strings, it tests if they +are in the same memory location, not if they have the same value. Use +[`EXPECT_STREQ`](#EXPECT_STREQ) to compare C strings (e.g. `const char*`) by +value. + +When comparing a pointer to `NULL`, use `EXPECT_EQ(`*`ptr`*`, nullptr)` instead +of `EXPECT_EQ(`*`ptr`*`, NULL)`. + +### EXPECT_NE {#EXPECT_NE} + +`EXPECT_NE(`*`val1`*`,`*`val2`*`)` \ +`ASSERT_NE(`*`val1`*`,`*`val2`*`)` + +Verifies that *`val1`*`!=`*`val2`*. + +Does pointer equality on pointers. If used on two C strings, it tests if they +are in different memory locations, not if they have different values. Use +[`EXPECT_STRNE`](#EXPECT_STRNE) to compare C strings (e.g. `const char*`) by +value. + +When comparing a pointer to `NULL`, use `EXPECT_NE(`*`ptr`*`, nullptr)` instead +of `EXPECT_NE(`*`ptr`*`, NULL)`. + +### EXPECT_LT {#EXPECT_LT} + +`EXPECT_LT(`*`val1`*`,`*`val2`*`)` \ +`ASSERT_LT(`*`val1`*`,`*`val2`*`)` + +Verifies that *`val1`*`<`*`val2`*. + +### EXPECT_LE {#EXPECT_LE} + +`EXPECT_LE(`*`val1`*`,`*`val2`*`)` \ +`ASSERT_LE(`*`val1`*`,`*`val2`*`)` + +Verifies that *`val1`*`<=`*`val2`*. + +### EXPECT_GT {#EXPECT_GT} + +`EXPECT_GT(`*`val1`*`,`*`val2`*`)` \ +`ASSERT_GT(`*`val1`*`,`*`val2`*`)` + +Verifies that *`val1`*`>`*`val2`*. + +### EXPECT_GE {#EXPECT_GE} + +`EXPECT_GE(`*`val1`*`,`*`val2`*`)` \ +`ASSERT_GE(`*`val1`*`,`*`val2`*`)` + +Verifies that *`val1`*`>=`*`val2`*. + +## String Comparison {#c-strings} + +The following assertions compare two **C strings**. To compare two `string` +objects, use [`EXPECT_EQ`](#EXPECT_EQ) or [`EXPECT_NE`](#EXPECT_NE) instead. + +These assertions also accept wide C strings (`wchar_t*`). If a comparison of two +wide strings fails, their values will be printed as UTF-8 narrow strings. + +To compare a C string with `NULL`, use `EXPECT_EQ(`*`c_string`*`, nullptr)` or +`EXPECT_NE(`*`c_string`*`, nullptr)`. + +### EXPECT_STREQ {#EXPECT_STREQ} + +`EXPECT_STREQ(`*`str1`*`,`*`str2`*`)` \ +`ASSERT_STREQ(`*`str1`*`,`*`str2`*`)` + +Verifies that the two C strings *`str1`* and *`str2`* have the same contents. + +### EXPECT_STRNE {#EXPECT_STRNE} + +`EXPECT_STRNE(`*`str1`*`,`*`str2`*`)` \ +`ASSERT_STRNE(`*`str1`*`,`*`str2`*`)` + +Verifies that the two C strings *`str1`* and *`str2`* have different contents. + +### EXPECT_STRCASEEQ {#EXPECT_STRCASEEQ} + +`EXPECT_STRCASEEQ(`*`str1`*`,`*`str2`*`)` \ +`ASSERT_STRCASEEQ(`*`str1`*`,`*`str2`*`)` + +Verifies that the two C strings *`str1`* and *`str2`* have the same contents, +ignoring case. + +### EXPECT_STRCASENE {#EXPECT_STRCASENE} + +`EXPECT_STRCASENE(`*`str1`*`,`*`str2`*`)` \ +`ASSERT_STRCASENE(`*`str1`*`,`*`str2`*`)` + +Verifies that the two C strings *`str1`* and *`str2`* have different contents, +ignoring case. + +## Floating-Point Comparison {#floating-point} + +The following assertions compare two floating-point values. + +Due to rounding errors, it is very unlikely that two floating-point values will +match exactly, so `EXPECT_EQ` is not suitable. In general, for floating-point +comparison to make sense, the user needs to carefully choose the error bound. + +GoogleTest also provides assertions that use a default error bound based on +Units in the Last Place (ULPs). To learn more about ULPs, see the article +[Comparing Floating Point Numbers](https://randomascii.wordpress.com/2012/02/25/comparing-floating-point-numbers-2012-edition/). + +### EXPECT_FLOAT_EQ {#EXPECT_FLOAT_EQ} + +`EXPECT_FLOAT_EQ(`*`val1`*`,`*`val2`*`)` \ +`ASSERT_FLOAT_EQ(`*`val1`*`,`*`val2`*`)` + +Verifies that the two `float` values *`val1`* and *`val2`* are approximately +equal, to within 4 ULPs from each other. + +### EXPECT_DOUBLE_EQ {#EXPECT_DOUBLE_EQ} + +`EXPECT_DOUBLE_EQ(`*`val1`*`,`*`val2`*`)` \ +`ASSERT_DOUBLE_EQ(`*`val1`*`,`*`val2`*`)` + +Verifies that the two `double` values *`val1`* and *`val2`* are approximately +equal, to within 4 ULPs from each other. + +### EXPECT_NEAR {#EXPECT_NEAR} + +`EXPECT_NEAR(`*`val1`*`,`*`val2`*`,`*`abs_error`*`)` \ +`ASSERT_NEAR(`*`val1`*`,`*`val2`*`,`*`abs_error`*`)` + +Verifies that the difference between *`val1`* and *`val2`* does not exceed the +absolute error bound *`abs_error`*. + +## Exception Assertions {#exceptions} + +The following assertions verify that a piece of code throws, or does not throw, +an exception. Usage requires exceptions to be enabled in the build environment. + +Note that the piece of code under test can be a compound statement, for example: + +```cpp +EXPECT_NO_THROW({ + int n = 5; + DoSomething(&n); +}); +``` + +### EXPECT_THROW {#EXPECT_THROW} + +`EXPECT_THROW(`*`statement`*`,`*`exception_type`*`)` \ +`ASSERT_THROW(`*`statement`*`,`*`exception_type`*`)` + +Verifies that *`statement`* throws an exception of type *`exception_type`*. + +### EXPECT_ANY_THROW {#EXPECT_ANY_THROW} + +`EXPECT_ANY_THROW(`*`statement`*`)` \ +`ASSERT_ANY_THROW(`*`statement`*`)` + +Verifies that *`statement`* throws an exception of any type. + +### EXPECT_NO_THROW {#EXPECT_NO_THROW} + +`EXPECT_NO_THROW(`*`statement`*`)` \ +`ASSERT_NO_THROW(`*`statement`*`)` + +Verifies that *`statement`* does not throw any exception. + +## Predicate Assertions {#predicates} + +The following assertions enable more complex predicates to be verified while +printing a more clear failure message than if `EXPECT_TRUE` were used alone. + +### EXPECT_PRED* {#EXPECT_PRED} + +`EXPECT_PRED1(`*`pred`*`,`*`val1`*`)` \ +`EXPECT_PRED2(`*`pred`*`,`*`val1`*`,`*`val2`*`)` \ +`EXPECT_PRED3(`*`pred`*`,`*`val1`*`,`*`val2`*`,`*`val3`*`)` \ +`EXPECT_PRED4(`*`pred`*`,`*`val1`*`,`*`val2`*`,`*`val3`*`,`*`val4`*`)` \ +`EXPECT_PRED5(`*`pred`*`,`*`val1`*`,`*`val2`*`,`*`val3`*`,`*`val4`*`,`*`val5`*`)` + +`ASSERT_PRED1(`*`pred`*`,`*`val1`*`)` \ +`ASSERT_PRED2(`*`pred`*`,`*`val1`*`,`*`val2`*`)` \ +`ASSERT_PRED3(`*`pred`*`,`*`val1`*`,`*`val2`*`,`*`val3`*`)` \ +`ASSERT_PRED4(`*`pred`*`,`*`val1`*`,`*`val2`*`,`*`val3`*`,`*`val4`*`)` \ +`ASSERT_PRED5(`*`pred`*`,`*`val1`*`,`*`val2`*`,`*`val3`*`,`*`val4`*`,`*`val5`*`)` + +Verifies that the predicate *`pred`* returns `true` when passed the given values +as arguments. + +The parameter *`pred`* is a function or functor that accepts as many arguments +as the corresponding macro accepts values. If *`pred`* returns `true` for the +given arguments, the assertion succeeds, otherwise the assertion fails. + +When the assertion fails, it prints the value of each argument. Arguments are +always evaluated exactly once. + +As an example, see the following code: + +```cpp +// Returns true if m and n have no common divisors except 1. +bool MutuallyPrime(int m, int n) { ... } +... +const int a = 3; +const int b = 4; +const int c = 10; +... +EXPECT_PRED2(MutuallyPrime, a, b); // Succeeds +EXPECT_PRED2(MutuallyPrime, b, c); // Fails +``` + +In the above example, the first assertion succeeds, and the second fails with +the following message: + +``` +MutuallyPrime(b, c) is false, where +b is 4 +c is 10 +``` + +Note that if the given predicate is an overloaded function or a function +template, the assertion macro might not be able to determine which version to +use, and it might be necessary to explicitly specify the type of the function. +For example, for a Boolean function `IsPositive()` overloaded to take either a +single `int` or `double` argument, it would be necessary to write one of the +following: + +```cpp +EXPECT_PRED1(static_cast(IsPositive), 5); +EXPECT_PRED1(static_cast(IsPositive), 3.14); +``` + +Writing simply `EXPECT_PRED1(IsPositive, 5);` would result in a compiler error. +Similarly, to use a template function, specify the template arguments: + +```cpp +template +bool IsNegative(T x) { + return x < 0; +} +... +EXPECT_PRED1(IsNegative, -5); // Must specify type for IsNegative +``` + +If a template has multiple parameters, wrap the predicate in parentheses so the +macro arguments are parsed correctly: + +```cpp +ASSERT_PRED2((MyPredicate), 5, 0); +``` + +### EXPECT_PRED_FORMAT* {#EXPECT_PRED_FORMAT} + +`EXPECT_PRED_FORMAT1(`*`pred_formatter`*`,`*`val1`*`)` \ +`EXPECT_PRED_FORMAT2(`*`pred_formatter`*`,`*`val1`*`,`*`val2`*`)` \ +`EXPECT_PRED_FORMAT3(`*`pred_formatter`*`,`*`val1`*`,`*`val2`*`,`*`val3`*`)` \ +`EXPECT_PRED_FORMAT4(`*`pred_formatter`*`,`*`val1`*`,`*`val2`*`,`*`val3`*`,`*`val4`*`)` +\ +`EXPECT_PRED_FORMAT5(`*`pred_formatter`*`,`*`val1`*`,`*`val2`*`,`*`val3`*`,`*`val4`*`,`*`val5`*`)` + +`ASSERT_PRED_FORMAT1(`*`pred_formatter`*`,`*`val1`*`)` \ +`ASSERT_PRED_FORMAT2(`*`pred_formatter`*`,`*`val1`*`,`*`val2`*`)` \ +`ASSERT_PRED_FORMAT3(`*`pred_formatter`*`,`*`val1`*`,`*`val2`*`,`*`val3`*`)` \ +`ASSERT_PRED_FORMAT4(`*`pred_formatter`*`,`*`val1`*`,`*`val2`*`,`*`val3`*`,`*`val4`*`)` +\ +`ASSERT_PRED_FORMAT5(`*`pred_formatter`*`,`*`val1`*`,`*`val2`*`,`*`val3`*`,`*`val4`*`,`*`val5`*`)` + +Verifies that the predicate *`pred_formatter`* succeeds when passed the given +values as arguments. + +The parameter *`pred_formatter`* is a *predicate-formatter*, which is a function +or functor with the signature: + +```cpp +testing::AssertionResult PredicateFormatter(const char* expr1, + const char* expr2, + ... + const char* exprn, + T1 val1, + T2 val2, + ... + Tn valn); +``` + +where *`val1`*, *`val2`*, ..., *`valn`* are the values of the predicate +arguments, and *`expr1`*, *`expr2`*, ..., *`exprn`* are the corresponding +expressions as they appear in the source code. The types `T1`, `T2`, ..., `Tn` +can be either value types or reference types; if an argument has type `T`, it +can be declared as either `T` or `const T&`, whichever is appropriate. For more +about the return type `testing::AssertionResult`, see +[Using a Function That Returns an AssertionResult](../advanced.md#using-a-function-that-returns-an-assertionresult). + +As an example, see the following code: + +```cpp +// Returns the smallest prime common divisor of m and n, +// or 1 when m and n are mutually prime. +int SmallestPrimeCommonDivisor(int m, int n) { ... } + +// Returns true if m and n have no common divisors except 1. +bool MutuallyPrime(int m, int n) { ... } + +// A predicate-formatter for asserting that two integers are mutually prime. +testing::AssertionResult AssertMutuallyPrime(const char* m_expr, + const char* n_expr, + int m, + int n) { + if (MutuallyPrime(m, n)) return testing::AssertionSuccess(); + + return testing::AssertionFailure() << m_expr << " and " << n_expr + << " (" << m << " and " << n << ") are not mutually prime, " + << "as they have a common divisor " << SmallestPrimeCommonDivisor(m, n); +} + +... +const int a = 3; +const int b = 4; +const int c = 10; +... +EXPECT_PRED_FORMAT2(AssertMutuallyPrime, a, b); // Succeeds +EXPECT_PRED_FORMAT2(AssertMutuallyPrime, b, c); // Fails +``` + +In the above example, the final assertion fails and the predicate-formatter +produces the following failure message: + +``` +b and c (4 and 10) are not mutually prime, as they have a common divisor 2 +``` + +## Windows HRESULT Assertions {#HRESULT} + +The following assertions test for `HRESULT` success or failure. For example: + +```cpp +CComPtr shell; +ASSERT_HRESULT_SUCCEEDED(shell.CoCreateInstance(L"Shell.Application")); +CComVariant empty; +ASSERT_HRESULT_SUCCEEDED(shell->ShellExecute(CComBSTR(url), empty, empty, empty, empty)); +``` + +The generated output contains the human-readable error message associated with +the returned `HRESULT` code. + +### EXPECT_HRESULT_SUCCEEDED {#EXPECT_HRESULT_SUCCEEDED} + +`EXPECT_HRESULT_SUCCEEDED(`*`expression`*`)` \ +`ASSERT_HRESULT_SUCCEEDED(`*`expression`*`)` + +Verifies that *`expression`* is a success `HRESULT`. + +### EXPECT_HRESULT_FAILED {#EXPECT_HRESULT_FAILED} + +`EXPECT_HRESULT_FAILED(`*`expression`*`)` \ +`EXPECT_HRESULT_FAILED(`*`expression`*`)` + +Verifies that *`expression`* is a failure `HRESULT`. + +## Death Assertions {#death} + +The following assertions verify that a piece of code causes the process to +terminate. For context, see [Death Tests](../advanced.md#death-tests). + +These assertions spawn a new process and execute the code under test in that +process. How that happens depends on the platform and the variable +`::testing::GTEST_FLAG(death_test_style)`, which is initialized from the +command-line flag `--gtest_death_test_style`. + +* On POSIX systems, `fork()` (or `clone()` on Linux) is used to spawn the + child, after which: + * If the variable's value is `"fast"`, the death test statement is + immediately executed. + * If the variable's value is `"threadsafe"`, the child process re-executes + the unit test binary just as it was originally invoked, but with some + extra flags to cause just the single death test under consideration to + be run. +* On Windows, the child is spawned using the `CreateProcess()` API, and + re-executes the binary to cause just the single death test under + consideration to be run - much like the `"threadsafe"` mode on POSIX. + +Other values for the variable are illegal and will cause the death test to fail. +Currently, the flag's default value is +**`"fast"`**. + +If the death test statement runs to completion without dying, the child process +will nonetheless terminate, and the assertion fails. + +Note that the piece of code under test can be a compound statement, for example: + +```cpp +EXPECT_DEATH({ + int n = 5; + DoSomething(&n); +}, "Error on line .* of DoSomething()"); +``` + +### EXPECT_DEATH {#EXPECT_DEATH} + +`EXPECT_DEATH(`*`statement`*`,`*`matcher`*`)` \ +`ASSERT_DEATH(`*`statement`*`,`*`matcher`*`)` + +Verifies that *`statement`* causes the process to terminate with a nonzero exit +status and produces `stderr` output that matches *`matcher`*. + +The parameter *`matcher`* is either a [matcher](matchers.md) for a `const +std::string&`, or a regular expression (see +[Regular Expression Syntax](../advanced.md#regular-expression-syntax))—a bare +string *`s`* (with no matcher) is treated as +[`ContainsRegex(s)`](matchers.md#string-matchers), **not** +[`Eq(s)`](matchers.md#generic-comparison). + +For example, the following code verifies that calling `DoSomething(42)` causes +the process to die with an error message that contains the text `My error`: + +```cpp +EXPECT_DEATH(DoSomething(42), "My error"); +``` + +### EXPECT_DEATH_IF_SUPPORTED {#EXPECT_DEATH_IF_SUPPORTED} + +`EXPECT_DEATH_IF_SUPPORTED(`*`statement`*`,`*`matcher`*`)` \ +`ASSERT_DEATH_IF_SUPPORTED(`*`statement`*`,`*`matcher`*`)` + +If death tests are supported, behaves the same as +[`EXPECT_DEATH`](#EXPECT_DEATH). Otherwise, verifies nothing. + +### EXPECT_DEBUG_DEATH {#EXPECT_DEBUG_DEATH} + +`EXPECT_DEBUG_DEATH(`*`statement`*`,`*`matcher`*`)` \ +`ASSERT_DEBUG_DEATH(`*`statement`*`,`*`matcher`*`)` + +In debug mode, behaves the same as [`EXPECT_DEATH`](#EXPECT_DEATH). When not in +debug mode (i.e. `NDEBUG` is defined), just executes *`statement`*. + +### EXPECT_EXIT {#EXPECT_EXIT} + +`EXPECT_EXIT(`*`statement`*`,`*`predicate`*`,`*`matcher`*`)` \ +`ASSERT_EXIT(`*`statement`*`,`*`predicate`*`,`*`matcher`*`)` + +Verifies that *`statement`* causes the process to terminate with an exit status +that satisfies *`predicate`*, and produces `stderr` output that matches +*`matcher`*. + +The parameter *`predicate`* is a function or functor that accepts an `int` exit +status and returns a `bool`. GoogleTest provides two predicates to handle common +cases: + +```cpp +// Returns true if the program exited normally with the given exit status code. +::testing::ExitedWithCode(exit_code); + +// Returns true if the program was killed by the given signal. +// Not available on Windows. +::testing::KilledBySignal(signal_number); +``` + +The parameter *`matcher`* is either a [matcher](matchers.md) for a `const +std::string&`, or a regular expression (see +[Regular Expression Syntax](../advanced.md#regular-expression-syntax))—a bare +string *`s`* (with no matcher) is treated as +[`ContainsRegex(s)`](matchers.md#string-matchers), **not** +[`Eq(s)`](matchers.md#generic-comparison). + +For example, the following code verifies that calling `NormalExit()` causes the +process to print a message containing the text `Success` to `stderr` and exit +with exit status code 0: + +```cpp +EXPECT_EXIT(NormalExit(), testing::ExitedWithCode(0), "Success"); +``` diff --git a/graphics/asymptote/LspCpp/third_party/uri/deps/docs/reference/matchers.md b/graphics/asymptote/LspCpp/third_party/uri/deps/docs/reference/matchers.md new file mode 100644 index 0000000000..47d2808c3b --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/uri/deps/docs/reference/matchers.md @@ -0,0 +1,285 @@ +# Matchers Reference + +A **matcher** matches a *single* argument. You can use it inside `ON_CALL()` or +`EXPECT_CALL()`, or use it to validate a value directly using two macros: + +| Macro | Description | +| :----------------------------------- | :------------------------------------ | +| `EXPECT_THAT(actual_value, matcher)` | Asserts that `actual_value` matches `matcher`. | +| `ASSERT_THAT(actual_value, matcher)` | The same as `EXPECT_THAT(actual_value, matcher)`, except that it generates a **fatal** failure. | + +{: .callout .note} +**Note:** Although equality matching via `EXPECT_THAT(actual_value, +expected_value)` is supported, prefer to make the comparison explicit via +`EXPECT_THAT(actual_value, Eq(expected_value))` or `EXPECT_EQ(actual_value, +expected_value)`. + +Built-in matchers (where `argument` is the function argument, e.g. +`actual_value` in the example above, or when used in the context of +`EXPECT_CALL(mock_object, method(matchers))`, the arguments of `method`) are +divided into several categories. All matchers are defined in the `::testing` +namespace unless otherwise noted. + +## Wildcard + +Matcher | Description +:-------------------------- | :----------------------------------------------- +`_` | `argument` can be any value of the correct type. +`A()` or `An()` | `argument` can be any value of type `type`. + +## Generic Comparison + +| Matcher | Description | +| :--------------------- | :-------------------------------------------------- | +| `Eq(value)` or `value` | `argument == value` | +| `Ge(value)` | `argument >= value` | +| `Gt(value)` | `argument > value` | +| `Le(value)` | `argument <= value` | +| `Lt(value)` | `argument < value` | +| `Ne(value)` | `argument != value` | +| `IsFalse()` | `argument` evaluates to `false` in a Boolean context. | +| `IsTrue()` | `argument` evaluates to `true` in a Boolean context. | +| `IsNull()` | `argument` is a `NULL` pointer (raw or smart). | +| `NotNull()` | `argument` is a non-null pointer (raw or smart). | +| `Optional(m)` | `argument` is `optional<>` that contains a value matching `m`. (For testing whether an `optional<>` is set, check for equality with `nullopt`. You may need to use `Eq(nullopt)` if the inner type doesn't have `==`.)| +| `VariantWith(m)` | `argument` is `variant<>` that holds the alternative of type T with a value matching `m`. | +| `Ref(variable)` | `argument` is a reference to `variable`. | +| `TypedEq(value)` | `argument` has type `type` and is equal to `value`. You may need to use this instead of `Eq(value)` when the mock function is overloaded. | + +Except `Ref()`, these matchers make a *copy* of `value` in case it's modified or +destructed later. If the compiler complains that `value` doesn't have a public +copy constructor, try wrap it in `std::ref()`, e.g. +`Eq(std::ref(non_copyable_value))`. If you do that, make sure +`non_copyable_value` is not changed afterwards, or the meaning of your matcher +will be changed. + +`IsTrue` and `IsFalse` are useful when you need to use a matcher, or for types +that can be explicitly converted to Boolean, but are not implicitly converted to +Boolean. In other cases, you can use the basic +[`EXPECT_TRUE` and `EXPECT_FALSE`](assertions.md#boolean) assertions. + +## Floating-Point Matchers {#FpMatchers} + +| Matcher | Description | +| :------------------------------- | :--------------------------------- | +| `DoubleEq(a_double)` | `argument` is a `double` value approximately equal to `a_double`, treating two NaNs as unequal. | +| `FloatEq(a_float)` | `argument` is a `float` value approximately equal to `a_float`, treating two NaNs as unequal. | +| `NanSensitiveDoubleEq(a_double)` | `argument` is a `double` value approximately equal to `a_double`, treating two NaNs as equal. | +| `NanSensitiveFloatEq(a_float)` | `argument` is a `float` value approximately equal to `a_float`, treating two NaNs as equal. | +| `IsNan()` | `argument` is any floating-point type with a NaN value. | + +The above matchers use ULP-based comparison (the same as used in googletest). +They automatically pick a reasonable error bound based on the absolute value of +the expected value. `DoubleEq()` and `FloatEq()` conform to the IEEE standard, +which requires comparing two NaNs for equality to return false. The +`NanSensitive*` version instead treats two NaNs as equal, which is often what a +user wants. + +| Matcher | Description | +| :------------------------------------------------ | :----------------------- | +| `DoubleNear(a_double, max_abs_error)` | `argument` is a `double` value close to `a_double` (absolute error <= `max_abs_error`), treating two NaNs as unequal. | +| `FloatNear(a_float, max_abs_error)` | `argument` is a `float` value close to `a_float` (absolute error <= `max_abs_error`), treating two NaNs as unequal. | +| `NanSensitiveDoubleNear(a_double, max_abs_error)` | `argument` is a `double` value close to `a_double` (absolute error <= `max_abs_error`), treating two NaNs as equal. | +| `NanSensitiveFloatNear(a_float, max_abs_error)` | `argument` is a `float` value close to `a_float` (absolute error <= `max_abs_error`), treating two NaNs as equal. | + +## String Matchers + +The `argument` can be either a C string or a C++ string object: + +| Matcher | Description | +| :---------------------- | :------------------------------------------------- | +| `ContainsRegex(string)` | `argument` matches the given regular expression. | +| `EndsWith(suffix)` | `argument` ends with string `suffix`. | +| `HasSubstr(string)` | `argument` contains `string` as a sub-string. | +| `IsEmpty()` | `argument` is an empty string. | +| `MatchesRegex(string)` | `argument` matches the given regular expression with the match starting at the first character and ending at the last character. | +| `StartsWith(prefix)` | `argument` starts with string `prefix`. | +| `StrCaseEq(string)` | `argument` is equal to `string`, ignoring case. | +| `StrCaseNe(string)` | `argument` is not equal to `string`, ignoring case. | +| `StrEq(string)` | `argument` is equal to `string`. | +| `StrNe(string)` | `argument` is not equal to `string`. | +| `WhenBase64Unescaped(m)` | `argument` is a base-64 escaped string whose unescaped string matches `m`. | + +`ContainsRegex()` and `MatchesRegex()` take ownership of the `RE` object. They +use the regular expression syntax defined +[here](../advanced.md#regular-expression-syntax). All of these matchers, except +`ContainsRegex()` and `MatchesRegex()` work for wide strings as well. + +## Container Matchers + +Most STL-style containers support `==`, so you can use `Eq(expected_container)` +or simply `expected_container` to match a container exactly. If you want to +write the elements in-line, match them more flexibly, or get more informative +messages, you can use: + +| Matcher | Description | +| :---------------------------------------- | :------------------------------- | +| `BeginEndDistanceIs(m)` | `argument` is a container whose `begin()` and `end()` iterators are separated by a number of increments matching `m`. E.g. `BeginEndDistanceIs(2)` or `BeginEndDistanceIs(Lt(2))`. For containers that define a `size()` method, `SizeIs(m)` may be more efficient. | +| `ContainerEq(container)` | The same as `Eq(container)` except that the failure message also includes which elements are in one container but not the other. | +| `Contains(e)` | `argument` contains an element that matches `e`, which can be either a value or a matcher. | +| `Contains(e).Times(n)` | `argument` contains elements that match `e`, which can be either a value or a matcher, and the number of matches is `n`, which can be either a value or a matcher. Unlike the plain `Contains` and `Each` this allows to check for arbitrary occurrences including testing for absence with `Contains(e).Times(0)`. | +| `Each(e)` | `argument` is a container where *every* element matches `e`, which can be either a value or a matcher. | +| `ElementsAre(e0, e1, ..., en)` | `argument` has `n + 1` elements, where the *i*-th element matches `ei`, which can be a value or a matcher. | +| `ElementsAreArray({e0, e1, ..., en})`, `ElementsAreArray(a_container)`, `ElementsAreArray(begin, end)`, `ElementsAreArray(array)`, or `ElementsAreArray(array, count)` | The same as `ElementsAre()` except that the expected element values/matchers come from an initializer list, STL-style container, iterator range, or C-style array. | +| `IsEmpty()` | `argument` is an empty container (`container.empty()`). | +| `IsSubsetOf({e0, e1, ..., en})`, `IsSubsetOf(a_container)`, `IsSubsetOf(begin, end)`, `IsSubsetOf(array)`, or `IsSubsetOf(array, count)` | `argument` matches `UnorderedElementsAre(x0, x1, ..., xk)` for some subset `{x0, x1, ..., xk}` of the expected matchers. | +| `IsSupersetOf({e0, e1, ..., en})`, `IsSupersetOf(a_container)`, `IsSupersetOf(begin, end)`, `IsSupersetOf(array)`, or `IsSupersetOf(array, count)` | Some subset of `argument` matches `UnorderedElementsAre(`expected matchers`)`. | +| `Pointwise(m, container)`, `Pointwise(m, {e0, e1, ..., en})` | `argument` contains the same number of elements as in `container`, and for all i, (the i-th element in `argument`, the i-th element in `container`) match `m`, which is a matcher on 2-tuples. E.g. `Pointwise(Le(), upper_bounds)` verifies that each element in `argument` doesn't exceed the corresponding element in `upper_bounds`. See more detail below. | +| `SizeIs(m)` | `argument` is a container whose size matches `m`. E.g. `SizeIs(2)` or `SizeIs(Lt(2))`. | +| `UnorderedElementsAre(e0, e1, ..., en)` | `argument` has `n + 1` elements, and under *some* permutation of the elements, each element matches an `ei` (for a different `i`), which can be a value or a matcher. | +| `UnorderedElementsAreArray({e0, e1, ..., en})`, `UnorderedElementsAreArray(a_container)`, `UnorderedElementsAreArray(begin, end)`, `UnorderedElementsAreArray(array)`, or `UnorderedElementsAreArray(array, count)` | The same as `UnorderedElementsAre()` except that the expected element values/matchers come from an initializer list, STL-style container, iterator range, or C-style array. | +| `UnorderedPointwise(m, container)`, `UnorderedPointwise(m, {e0, e1, ..., en})` | Like `Pointwise(m, container)`, but ignores the order of elements. | +| `WhenSorted(m)` | When `argument` is sorted using the `<` operator, it matches container matcher `m`. E.g. `WhenSorted(ElementsAre(1, 2, 3))` verifies that `argument` contains elements 1, 2, and 3, ignoring order. | +| `WhenSortedBy(comparator, m)` | The same as `WhenSorted(m)`, except that the given comparator instead of `<` is used to sort `argument`. E.g. `WhenSortedBy(std::greater(), ElementsAre(3, 2, 1))`. | + +**Notes:** + +* These matchers can also match: + 1. a native array passed by reference (e.g. in `Foo(const int (&a)[5])`), + and + 2. an array passed as a pointer and a count (e.g. in `Bar(const T* buffer, + int len)` -- see [Multi-argument Matchers](#MultiArgMatchers)). +* The array being matched may be multi-dimensional (i.e. its elements can be + arrays). +* `m` in `Pointwise(m, ...)` and `UnorderedPointwise(m, ...)` should be a + matcher for `::std::tuple` where `T` and `U` are the element type of + the actual container and the expected container, respectively. For example, + to compare two `Foo` containers where `Foo` doesn't support `operator==`, + one might write: + + ```cpp + MATCHER(FooEq, "") { + return std::get<0>(arg).Equals(std::get<1>(arg)); + } + ... + EXPECT_THAT(actual_foos, Pointwise(FooEq(), expected_foos)); + ``` + +## Member Matchers + +| Matcher | Description | +| :------------------------------ | :----------------------------------------- | +| `Field(&class::field, m)` | `argument.field` (or `argument->field` when `argument` is a plain pointer) matches matcher `m`, where `argument` is an object of type _class_. | +| `Field(field_name, &class::field, m)` | The same as the two-parameter version, but provides a better error message. | +| `Key(e)` | `argument.first` matches `e`, which can be either a value or a matcher. E.g. `Contains(Key(Le(5)))` can verify that a `map` contains a key `<= 5`. | +| `Pair(m1, m2)` | `argument` is an `std::pair` whose `first` field matches `m1` and `second` field matches `m2`. | +| `FieldsAre(m...)` | `argument` is a compatible object where each field matches piecewise with the matchers `m...`. A compatible object is any that supports the `std::tuple_size`+`get(obj)` protocol. In C++17 and up this also supports types compatible with structured bindings, like aggregates. | +| `Property(&class::property, m)` | `argument.property()` (or `argument->property()` when `argument` is a plain pointer) matches matcher `m`, where `argument` is an object of type _class_. The method `property()` must take no argument and be declared as `const`. | +| `Property(property_name, &class::property, m)` | The same as the two-parameter version, but provides a better error message. + +**Notes:** + +* You can use `FieldsAre()` to match any type that supports structured + bindings, such as `std::tuple`, `std::pair`, `std::array`, and aggregate + types. For example: + + ```cpp + std::tuple my_tuple{7, "hello world"}; + EXPECT_THAT(my_tuple, FieldsAre(Ge(0), HasSubstr("hello"))); + + struct MyStruct { + int value = 42; + std::string greeting = "aloha"; + }; + MyStruct s; + EXPECT_THAT(s, FieldsAre(42, "aloha")); + ``` + +* Don't use `Property()` against member functions that you do not own, because + taking addresses of functions is fragile and generally not part of the + contract of the function. + +## Matching the Result of a Function, Functor, or Callback + +| Matcher | Description | +| :--------------- | :------------------------------------------------ | +| `ResultOf(f, m)` | `f(argument)` matches matcher `m`, where `f` is a function or functor. | + +## Pointer Matchers + +| Matcher | Description | +| :------------------------ | :---------------------------------------------- | +| `Address(m)` | the result of `std::addressof(argument)` matches `m`. | +| `Pointee(m)` | `argument` (either a smart pointer or a raw pointer) points to a value that matches matcher `m`. | +| `Pointer(m)` | `argument` (either a smart pointer or a raw pointer) contains a pointer that matches `m`. `m` will match against the raw pointer regardless of the type of `argument`. | +| `WhenDynamicCastTo(m)` | when `argument` is passed through `dynamic_cast()`, it matches matcher `m`. | + +## Multi-argument Matchers {#MultiArgMatchers} + +Technically, all matchers match a *single* value. A "multi-argument" matcher is +just one that matches a *tuple*. The following matchers can be used to match a +tuple `(x, y)`: + +Matcher | Description +:------ | :---------- +`Eq()` | `x == y` +`Ge()` | `x >= y` +`Gt()` | `x > y` +`Le()` | `x <= y` +`Lt()` | `x < y` +`Ne()` | `x != y` + +You can use the following selectors to pick a subset of the arguments (or +reorder them) to participate in the matching: + +| Matcher | Description | +| :------------------------- | :---------------------------------------------- | +| `AllArgs(m)` | Equivalent to `m`. Useful as syntactic sugar in `.With(AllArgs(m))`. | +| `Args(m)` | The tuple of the `k` selected (using 0-based indices) arguments matches `m`, e.g. `Args<1, 2>(Eq())`. | + +## Composite Matchers + +You can make a matcher from one or more other matchers: + +| Matcher | Description | +| :------------------------------- | :-------------------------------------- | +| `AllOf(m1, m2, ..., mn)` | `argument` matches all of the matchers `m1` to `mn`. | +| `AllOfArray({m0, m1, ..., mn})`, `AllOfArray(a_container)`, `AllOfArray(begin, end)`, `AllOfArray(array)`, or `AllOfArray(array, count)` | The same as `AllOf()` except that the matchers come from an initializer list, STL-style container, iterator range, or C-style array. | +| `AnyOf(m1, m2, ..., mn)` | `argument` matches at least one of the matchers `m1` to `mn`. | +| `AnyOfArray({m0, m1, ..., mn})`, `AnyOfArray(a_container)`, `AnyOfArray(begin, end)`, `AnyOfArray(array)`, or `AnyOfArray(array, count)` | The same as `AnyOf()` except that the matchers come from an initializer list, STL-style container, iterator range, or C-style array. | +| `Not(m)` | `argument` doesn't match matcher `m`. | +| `Conditional(cond, m1, m2)` | Matches matcher `m1` if `cond` evaluates to true, else matches `m2`.| + +## Adapters for Matchers + +| Matcher | Description | +| :---------------------- | :------------------------------------ | +| `MatcherCast(m)` | casts matcher `m` to type `Matcher`. | +| `SafeMatcherCast(m)` | [safely casts](../gmock_cook_book.md#SafeMatcherCast) matcher `m` to type `Matcher`. | +| `Truly(predicate)` | `predicate(argument)` returns something considered by C++ to be true, where `predicate` is a function or functor. | + +`AddressSatisfies(callback)` and `Truly(callback)` take ownership of `callback`, +which must be a permanent callback. + +## Using Matchers as Predicates {#MatchersAsPredicatesCheat} + +| Matcher | Description | +| :---------------------------- | :------------------------------------------ | +| `Matches(m)(value)` | evaluates to `true` if `value` matches `m`. You can use `Matches(m)` alone as a unary functor. | +| `ExplainMatchResult(m, value, result_listener)` | evaluates to `true` if `value` matches `m`, explaining the result to `result_listener`. | +| `Value(value, m)` | evaluates to `true` if `value` matches `m`. | + +## Defining Matchers + +| Macro | Description | +| :----------------------------------- | :------------------------------------ | +| `MATCHER(IsEven, "") { return (arg % 2) == 0; }` | Defines a matcher `IsEven()` to match an even number. | +| `MATCHER_P(IsDivisibleBy, n, "") { *result_listener << "where the remainder is " << (arg % n); return (arg % n) == 0; }` | Defines a matcher `IsDivisibleBy(n)` to match a number divisible by `n`. | +| `MATCHER_P2(IsBetween, a, b, absl::StrCat(negation ? "isn't" : "is", " between ", PrintToString(a), " and ", PrintToString(b))) { return a <= arg && arg <= b; }` | Defines a matcher `IsBetween(a, b)` to match a value in the range [`a`, `b`]. | + +**Notes:** + +1. The `MATCHER*` macros cannot be used inside a function or class. +2. The matcher body must be *purely functional* (i.e. it cannot have any side + effect, and the result must not depend on anything other than the value + being matched and the matcher parameters). +3. You can use `PrintToString(x)` to convert a value `x` of any type to a + string. +4. You can use `ExplainMatchResult()` in a custom matcher to wrap another + matcher, for example: + + ```cpp + MATCHER_P(NestedPropertyMatches, matcher, "") { + return ExplainMatchResult(matcher, arg.nested().property(), result_listener); + } + ``` diff --git a/graphics/asymptote/LspCpp/third_party/uri/deps/docs/reference/mocking.md b/graphics/asymptote/LspCpp/third_party/uri/deps/docs/reference/mocking.md new file mode 100644 index 0000000000..c29f71603f --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/uri/deps/docs/reference/mocking.md @@ -0,0 +1,587 @@ +# Mocking Reference + +This page lists the facilities provided by GoogleTest for creating and working +with mock objects. To use them, include the header +`gmock/gmock.h`. + +## Macros {#macros} + +GoogleTest defines the following macros for working with mocks. + +### MOCK_METHOD {#MOCK_METHOD} + +`MOCK_METHOD(`*`return_type`*`,`*`method_name`*`, (`*`args...`*`));` \ +`MOCK_METHOD(`*`return_type`*`,`*`method_name`*`, (`*`args...`*`), +(`*`specs...`*`));` + +Defines a mock method *`method_name`* with arguments `(`*`args...`*`)` and +return type *`return_type`* within a mock class. + +The parameters of `MOCK_METHOD` mirror the method declaration. The optional +fourth parameter *`specs...`* is a comma-separated list of qualifiers. The +following qualifiers are accepted: + +| Qualifier | Meaning | +| -------------------------- | -------------------------------------------- | +| `const` | Makes the mocked method a `const` method. Required if overriding a `const` method. | +| `override` | Marks the method with `override`. Recommended if overriding a `virtual` method. | +| `noexcept` | Marks the method with `noexcept`. Required if overriding a `noexcept` method. | +| `Calltype(`*`calltype`*`)` | Sets the call type for the method, for example `Calltype(STDMETHODCALLTYPE)`. Useful on Windows. | +| `ref(`*`qualifier`*`)` | Marks the method with the given reference qualifier, for example `ref(&)` or `ref(&&)`. Required if overriding a method that has a reference qualifier. | + +Note that commas in arguments prevent `MOCK_METHOD` from parsing the arguments +correctly if they are not appropriately surrounded by parentheses. See the +following example: + +```cpp +class MyMock { + public: + // The following 2 lines will not compile due to commas in the arguments: + MOCK_METHOD(std::pair, GetPair, ()); // Error! + MOCK_METHOD(bool, CheckMap, (std::map, bool)); // Error! + + // One solution - wrap arguments that contain commas in parentheses: + MOCK_METHOD((std::pair), GetPair, ()); + MOCK_METHOD(bool, CheckMap, ((std::map), bool)); + + // Another solution - use type aliases: + using BoolAndInt = std::pair; + MOCK_METHOD(BoolAndInt, GetPair, ()); + using MapIntDouble = std::map; + MOCK_METHOD(bool, CheckMap, (MapIntDouble, bool)); +}; +``` + +`MOCK_METHOD` must be used in the `public:` section of a mock class definition, +regardless of whether the method being mocked is `public`, `protected`, or +`private` in the base class. + +### EXPECT_CALL {#EXPECT_CALL} + +`EXPECT_CALL(`*`mock_object`*`,`*`method_name`*`(`*`matchers...`*`))` + +Creates an [expectation](../gmock_for_dummies.md#setting-expectations) that the +method *`method_name`* of the object *`mock_object`* is called with arguments +that match the given matchers *`matchers...`*. `EXPECT_CALL` must precede any +code that exercises the mock object. + +The parameter *`matchers...`* is a comma-separated list of +[matchers](../gmock_for_dummies.md#matchers-what-arguments-do-we-expect) that +correspond to each argument of the method *`method_name`*. The expectation will +apply only to calls of *`method_name`* whose arguments match all of the +matchers. If `(`*`matchers...`*`)` is omitted, the expectation behaves as if +each argument's matcher were a [wildcard matcher (`_`)](matchers.md#wildcard). +See the [Matchers Reference](matchers.md) for a list of all built-in matchers. + +The following chainable clauses can be used to modify the expectation, and they +must be used in the following order: + +```cpp +EXPECT_CALL(mock_object, method_name(matchers...)) + .With(multi_argument_matcher) // Can be used at most once + .Times(cardinality) // Can be used at most once + .InSequence(sequences...) // Can be used any number of times + .After(expectations...) // Can be used any number of times + .WillOnce(action) // Can be used any number of times + .WillRepeatedly(action) // Can be used at most once + .RetiresOnSaturation(); // Can be used at most once +``` + +See details for each modifier clause below. + +#### With {#EXPECT_CALL.With} + +`.With(`*`multi_argument_matcher`*`)` + +Restricts the expectation to apply only to mock function calls whose arguments +as a whole match the multi-argument matcher *`multi_argument_matcher`*. + +GoogleTest passes all of the arguments as one tuple into the matcher. The +parameter *`multi_argument_matcher`* must thus be a matcher of type +`Matcher>`, where `A1, ..., An` are the types of the +function arguments. + +For example, the following code sets the expectation that +`my_mock.SetPosition()` is called with any two arguments, the first argument +being less than the second: + +```cpp +using ::testing::_; +using ::testing::Lt; +... +EXPECT_CALL(my_mock, SetPosition(_, _)) + .With(Lt()); +``` + +GoogleTest provides some built-in matchers for 2-tuples, including the `Lt()` +matcher above. See [Multi-argument Matchers](matchers.md#MultiArgMatchers). + +The `With` clause can be used at most once on an expectation and must be the +first clause. + +#### Times {#EXPECT_CALL.Times} + +`.Times(`*`cardinality`*`)` + +Specifies how many times the mock function call is expected. + +The parameter *`cardinality`* represents the number of expected calls and can be +one of the following, all defined in the `::testing` namespace: + +| Cardinality | Meaning | +| ------------------- | --------------------------------------------------- | +| `AnyNumber()` | The function can be called any number of times. | +| `AtLeast(n)` | The function call is expected at least *n* times. | +| `AtMost(n)` | The function call is expected at most *n* times. | +| `Between(m, n)` | The function call is expected between *m* and *n* times, inclusive. | +| `Exactly(n)` or `n` | The function call is expected exactly *n* times. If *n* is 0, the call should never happen. | + +If the `Times` clause is omitted, GoogleTest infers the cardinality as follows: + +* If neither [`WillOnce`](#EXPECT_CALL.WillOnce) nor + [`WillRepeatedly`](#EXPECT_CALL.WillRepeatedly) are specified, the inferred + cardinality is `Times(1)`. +* If there are *n* `WillOnce` clauses and no `WillRepeatedly` clause, where + *n* >= 1, the inferred cardinality is `Times(n)`. +* If there are *n* `WillOnce` clauses and one `WillRepeatedly` clause, where + *n* >= 0, the inferred cardinality is `Times(AtLeast(n))`. + +The `Times` clause can be used at most once on an expectation. + +#### InSequence {#EXPECT_CALL.InSequence} + +`.InSequence(`*`sequences...`*`)` + +Specifies that the mock function call is expected in a certain sequence. + +The parameter *`sequences...`* is any number of [`Sequence`](#Sequence) objects. +Expected calls assigned to the same sequence are expected to occur in the order +the expectations are declared. + +For example, the following code sets the expectation that the `Reset()` method +of `my_mock` is called before both `GetSize()` and `Describe()`, and `GetSize()` +and `Describe()` can occur in any order relative to each other: + +```cpp +using ::testing::Sequence; +Sequence s1, s2; +... +EXPECT_CALL(my_mock, Reset()) + .InSequence(s1, s2); +EXPECT_CALL(my_mock, GetSize()) + .InSequence(s1); +EXPECT_CALL(my_mock, Describe()) + .InSequence(s2); +``` + +The `InSequence` clause can be used any number of times on an expectation. + +See also the [`InSequence` class](#InSequence). + +#### After {#EXPECT_CALL.After} + +`.After(`*`expectations...`*`)` + +Specifies that the mock function call is expected to occur after one or more +other calls. + +The parameter *`expectations...`* can be up to five +[`Expectation`](#Expectation) or [`ExpectationSet`](#ExpectationSet) objects. +The mock function call is expected to occur after all of the given expectations. + +For example, the following code sets the expectation that the `Describe()` +method of `my_mock` is called only after both `InitX()` and `InitY()` have been +called. + +```cpp +using ::testing::Expectation; +... +Expectation init_x = EXPECT_CALL(my_mock, InitX()); +Expectation init_y = EXPECT_CALL(my_mock, InitY()); +EXPECT_CALL(my_mock, Describe()) + .After(init_x, init_y); +``` + +The `ExpectationSet` object is helpful when the number of prerequisites for an +expectation is large or variable, for example: + +```cpp +using ::testing::ExpectationSet; +... +ExpectationSet all_inits; +// Collect all expectations of InitElement() calls +for (int i = 0; i < element_count; i++) { + all_inits += EXPECT_CALL(my_mock, InitElement(i)); +} +EXPECT_CALL(my_mock, Describe()) + .After(all_inits); // Expect Describe() call after all InitElement() calls +``` + +The `After` clause can be used any number of times on an expectation. + +#### WillOnce {#EXPECT_CALL.WillOnce} + +`.WillOnce(`*`action`*`)` + +Specifies the mock function's actual behavior when invoked, for a single +matching function call. + +The parameter *`action`* represents the +[action](../gmock_for_dummies.md#actions-what-should-it-do) that the function +call will perform. See the [Actions Reference](actions.md) for a list of +built-in actions. + +The use of `WillOnce` implicitly sets a cardinality on the expectation when +`Times` is not specified. See [`Times`](#EXPECT_CALL.Times). + +Each matching function call will perform the next action in the order declared. +For example, the following code specifies that `my_mock.GetNumber()` is expected +to be called exactly 3 times and will return `1`, `2`, and `3` respectively on +the first, second, and third calls: + +```cpp +using ::testing::Return; +... +EXPECT_CALL(my_mock, GetNumber()) + .WillOnce(Return(1)) + .WillOnce(Return(2)) + .WillOnce(Return(3)); +``` + +The `WillOnce` clause can be used any number of times on an expectation. + +#### WillRepeatedly {#EXPECT_CALL.WillRepeatedly} + +`.WillRepeatedly(`*`action`*`)` + +Specifies the mock function's actual behavior when invoked, for all subsequent +matching function calls. Takes effect after the actions specified in the +[`WillOnce`](#EXPECT_CALL.WillOnce) clauses, if any, have been performed. + +The parameter *`action`* represents the +[action](../gmock_for_dummies.md#actions-what-should-it-do) that the function +call will perform. See the [Actions Reference](actions.md) for a list of +built-in actions. + +The use of `WillRepeatedly` implicitly sets a cardinality on the expectation +when `Times` is not specified. See [`Times`](#EXPECT_CALL.Times). + +If any `WillOnce` clauses have been specified, matching function calls will +perform those actions before the action specified by `WillRepeatedly`. See the +following example: + +```cpp +using ::testing::Return; +... +EXPECT_CALL(my_mock, GetName()) + .WillRepeatedly(Return("John Doe")); // Return "John Doe" on all calls + +EXPECT_CALL(my_mock, GetNumber()) + .WillOnce(Return(42)) // Return 42 on the first call + .WillRepeatedly(Return(7)); // Return 7 on all subsequent calls +``` + +The `WillRepeatedly` clause can be used at most once on an expectation. + +#### RetiresOnSaturation {#EXPECT_CALL.RetiresOnSaturation} + +`.RetiresOnSaturation()` + +Indicates that the expectation will no longer be active after the expected +number of matching function calls has been reached. + +The `RetiresOnSaturation` clause is only meaningful for expectations with an +upper-bounded cardinality. The expectation will *retire* (no longer match any +function calls) after it has been *saturated* (the upper bound has been +reached). See the following example: + +```cpp +using ::testing::_; +using ::testing::AnyNumber; +... +EXPECT_CALL(my_mock, SetNumber(_)) // Expectation 1 + .Times(AnyNumber()); +EXPECT_CALL(my_mock, SetNumber(7)) // Expectation 2 + .Times(2) + .RetiresOnSaturation(); +``` + +In the above example, the first two calls to `my_mock.SetNumber(7)` match +expectation 2, which then becomes inactive and no longer matches any calls. A +third call to `my_mock.SetNumber(7)` would then match expectation 1. Without +`RetiresOnSaturation()` on expectation 2, a third call to `my_mock.SetNumber(7)` +would match expectation 2 again, producing a failure since the limit of 2 calls +was exceeded. + +The `RetiresOnSaturation` clause can be used at most once on an expectation and +must be the last clause. + +### ON_CALL {#ON_CALL} + +`ON_CALL(`*`mock_object`*`,`*`method_name`*`(`*`matchers...`*`))` + +Defines what happens when the method *`method_name`* of the object +*`mock_object`* is called with arguments that match the given matchers +*`matchers...`*. Requires a modifier clause to specify the method's behavior. +*Does not* set any expectations that the method will be called. + +The parameter *`matchers...`* is a comma-separated list of +[matchers](../gmock_for_dummies.md#matchers-what-arguments-do-we-expect) that +correspond to each argument of the method *`method_name`*. The `ON_CALL` +specification will apply only to calls of *`method_name`* whose arguments match +all of the matchers. If `(`*`matchers...`*`)` is omitted, the behavior is as if +each argument's matcher were a [wildcard matcher (`_`)](matchers.md#wildcard). +See the [Matchers Reference](matchers.md) for a list of all built-in matchers. + +The following chainable clauses can be used to set the method's behavior, and +they must be used in the following order: + +```cpp +ON_CALL(mock_object, method_name(matchers...)) + .With(multi_argument_matcher) // Can be used at most once + .WillByDefault(action); // Required +``` + +See details for each modifier clause below. + +#### With {#ON_CALL.With} + +`.With(`*`multi_argument_matcher`*`)` + +Restricts the specification to only mock function calls whose arguments as a +whole match the multi-argument matcher *`multi_argument_matcher`*. + +GoogleTest passes all of the arguments as one tuple into the matcher. The +parameter *`multi_argument_matcher`* must thus be a matcher of type +`Matcher>`, where `A1, ..., An` are the types of the +function arguments. + +For example, the following code sets the default behavior when +`my_mock.SetPosition()` is called with any two arguments, the first argument +being less than the second: + +```cpp +using ::testing::_; +using ::testing::Lt; +using ::testing::Return; +... +ON_CALL(my_mock, SetPosition(_, _)) + .With(Lt()) + .WillByDefault(Return(true)); +``` + +GoogleTest provides some built-in matchers for 2-tuples, including the `Lt()` +matcher above. See [Multi-argument Matchers](matchers.md#MultiArgMatchers). + +The `With` clause can be used at most once with each `ON_CALL` statement. + +#### WillByDefault {#ON_CALL.WillByDefault} + +`.WillByDefault(`*`action`*`)` + +Specifies the default behavior of a matching mock function call. + +The parameter *`action`* represents the +[action](../gmock_for_dummies.md#actions-what-should-it-do) that the function +call will perform. See the [Actions Reference](actions.md) for a list of +built-in actions. + +For example, the following code specifies that by default, a call to +`my_mock.Greet()` will return `"hello"`: + +```cpp +using ::testing::Return; +... +ON_CALL(my_mock, Greet()) + .WillByDefault(Return("hello")); +``` + +The action specified by `WillByDefault` is superseded by the actions specified +on a matching `EXPECT_CALL` statement, if any. See the +[`WillOnce`](#EXPECT_CALL.WillOnce) and +[`WillRepeatedly`](#EXPECT_CALL.WillRepeatedly) clauses of `EXPECT_CALL`. + +The `WillByDefault` clause must be used exactly once with each `ON_CALL` +statement. + +## Classes {#classes} + +GoogleTest defines the following classes for working with mocks. + +### DefaultValue {#DefaultValue} + +`::testing::DefaultValue` + +Allows a user to specify the default value for a type `T` that is both copyable +and publicly destructible (i.e. anything that can be used as a function return +type). For mock functions with a return type of `T`, this default value is +returned from function calls that do not specify an action. + +Provides the static methods `Set()`, `SetFactory()`, and `Clear()` to manage the +default value: + +```cpp +// Sets the default value to be returned. T must be copy constructible. +DefaultValue::Set(value); + +// Sets a factory. Will be invoked on demand. T must be move constructible. +T MakeT(); +DefaultValue::SetFactory(&MakeT); + +// Unsets the default value. +DefaultValue::Clear(); +``` + +### NiceMock {#NiceMock} + +`::testing::NiceMock` + +Represents a mock object that suppresses warnings on +[uninteresting calls](../gmock_cook_book.md#uninteresting-vs-unexpected). The +template parameter `T` is any mock class, except for another `NiceMock`, +`NaggyMock`, or `StrictMock`. + +Usage of `NiceMock` is analogous to usage of `T`. `NiceMock` is a subclass +of `T`, so it can be used wherever an object of type `T` is accepted. In +addition, `NiceMock` can be constructed with any arguments that a constructor +of `T` accepts. + +For example, the following code suppresses warnings on the mock `my_mock` of +type `MockClass` if a method other than `DoSomething()` is called: + +```cpp +using ::testing::NiceMock; +... +NiceMock my_mock("some", "args"); +EXPECT_CALL(my_mock, DoSomething()); +... code that uses my_mock ... +``` + +`NiceMock` only works for mock methods defined using the `MOCK_METHOD` macro +directly in the definition of class `T`. If a mock method is defined in a base +class of `T`, a warning might still be generated. + +`NiceMock` might not work correctly if the destructor of `T` is not virtual. + +### NaggyMock {#NaggyMock} + +`::testing::NaggyMock` + +Represents a mock object that generates warnings on +[uninteresting calls](../gmock_cook_book.md#uninteresting-vs-unexpected). The +template parameter `T` is any mock class, except for another `NiceMock`, +`NaggyMock`, or `StrictMock`. + +Usage of `NaggyMock` is analogous to usage of `T`. `NaggyMock` is a +subclass of `T`, so it can be used wherever an object of type `T` is accepted. +In addition, `NaggyMock` can be constructed with any arguments that a +constructor of `T` accepts. + +For example, the following code generates warnings on the mock `my_mock` of type +`MockClass` if a method other than `DoSomething()` is called: + +```cpp +using ::testing::NaggyMock; +... +NaggyMock my_mock("some", "args"); +EXPECT_CALL(my_mock, DoSomething()); +... code that uses my_mock ... +``` + +Mock objects of type `T` by default behave the same way as `NaggyMock`. + +### StrictMock {#StrictMock} + +`::testing::StrictMock` + +Represents a mock object that generates test failures on +[uninteresting calls](../gmock_cook_book.md#uninteresting-vs-unexpected). The +template parameter `T` is any mock class, except for another `NiceMock`, +`NaggyMock`, or `StrictMock`. + +Usage of `StrictMock` is analogous to usage of `T`. `StrictMock` is a +subclass of `T`, so it can be used wherever an object of type `T` is accepted. +In addition, `StrictMock` can be constructed with any arguments that a +constructor of `T` accepts. + +For example, the following code generates a test failure on the mock `my_mock` +of type `MockClass` if a method other than `DoSomething()` is called: + +```cpp +using ::testing::StrictMock; +... +StrictMock my_mock("some", "args"); +EXPECT_CALL(my_mock, DoSomething()); +... code that uses my_mock ... +``` + +`StrictMock` only works for mock methods defined using the `MOCK_METHOD` +macro directly in the definition of class `T`. If a mock method is defined in a +base class of `T`, a failure might not be generated. + +`StrictMock` might not work correctly if the destructor of `T` is not +virtual. + +### Sequence {#Sequence} + +`::testing::Sequence` + +Represents a chronological sequence of expectations. See the +[`InSequence`](#EXPECT_CALL.InSequence) clause of `EXPECT_CALL` for usage. + +### InSequence {#InSequence} + +`::testing::InSequence` + +An object of this type causes all expectations encountered in its scope to be +put in an anonymous sequence. + +This allows more convenient expression of multiple expectations in a single +sequence: + +```cpp +using ::testing::InSequence; +{ + InSequence seq; + + // The following are expected to occur in the order declared. + EXPECT_CALL(...); + EXPECT_CALL(...); + ... + EXPECT_CALL(...); +} +``` + +The name of the `InSequence` object does not matter. + +### Expectation {#Expectation} + +`::testing::Expectation` + +Represents a mock function call expectation as created by +[`EXPECT_CALL`](#EXPECT_CALL): + +```cpp +using ::testing::Expectation; +Expectation my_expectation = EXPECT_CALL(...); +``` + +Useful for specifying sequences of expectations; see the +[`After`](#EXPECT_CALL.After) clause of `EXPECT_CALL`. + +### ExpectationSet {#ExpectationSet} + +`::testing::ExpectationSet` + +Represents a set of mock function call expectations. + +Use the `+=` operator to add [`Expectation`](#Expectation) objects to the set: + +```cpp +using ::testing::ExpectationSet; +ExpectationSet my_expectations; +my_expectations += EXPECT_CALL(...); +``` + +Useful for specifying sequences of expectations; see the +[`After`](#EXPECT_CALL.After) clause of `EXPECT_CALL`. diff --git a/graphics/asymptote/LspCpp/third_party/uri/deps/docs/reference/testing.md b/graphics/asymptote/LspCpp/third_party/uri/deps/docs/reference/testing.md new file mode 100644 index 0000000000..554d6c9584 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/uri/deps/docs/reference/testing.md @@ -0,0 +1,1431 @@ +# Testing Reference + + + +This page lists the facilities provided by GoogleTest for writing test programs. +To use them, include the header `gtest/gtest.h`. + +## Macros + +GoogleTest defines the following macros for writing tests. + +### TEST {#TEST} + +
+TEST(TestSuiteName, TestName) {
+  ... statements ...
+}
+
+ +Defines an individual test named *`TestName`* in the test suite +*`TestSuiteName`*, consisting of the given statements. + +Both arguments *`TestSuiteName`* and *`TestName`* must be valid C++ identifiers +and must not contain underscores (`_`). Tests in different test suites can have +the same individual name. + +The statements within the test body can be any code under test. +[Assertions](assertions.md) used within the test body determine the outcome of +the test. + +### TEST_F {#TEST_F} + +
+TEST_F(TestFixtureName, TestName) {
+  ... statements ...
+}
+
+ +Defines an individual test named *`TestName`* that uses the test fixture class +*`TestFixtureName`*. The test suite name is *`TestFixtureName`*. + +Both arguments *`TestFixtureName`* and *`TestName`* must be valid C++ +identifiers and must not contain underscores (`_`). *`TestFixtureName`* must be +the name of a test fixture class—see +[Test Fixtures](../primer.md#same-data-multiple-tests). + +The statements within the test body can be any code under test. +[Assertions](assertions.md) used within the test body determine the outcome of +the test. + +### TEST_P {#TEST_P} + +
+TEST_P(TestFixtureName, TestName) {
+  ... statements ...
+}
+
+ +Defines an individual value-parameterized test named *`TestName`* that uses the +test fixture class *`TestFixtureName`*. The test suite name is +*`TestFixtureName`*. + +Both arguments *`TestFixtureName`* and *`TestName`* must be valid C++ +identifiers and must not contain underscores (`_`). *`TestFixtureName`* must be +the name of a value-parameterized test fixture class—see +[Value-Parameterized Tests](../advanced.md#value-parameterized-tests). + +The statements within the test body can be any code under test. Within the test +body, the test parameter can be accessed with the `GetParam()` function (see +[`WithParamInterface`](#WithParamInterface)). For example: + +```cpp +TEST_P(MyTestSuite, DoesSomething) { + ... + EXPECT_TRUE(DoSomething(GetParam())); + ... +} +``` + +[Assertions](assertions.md) used within the test body determine the outcome of +the test. + +See also [`INSTANTIATE_TEST_SUITE_P`](#INSTANTIATE_TEST_SUITE_P). + +### INSTANTIATE_TEST_SUITE_P {#INSTANTIATE_TEST_SUITE_P} + +`INSTANTIATE_TEST_SUITE_P(`*`InstantiationName`*`,`*`TestSuiteName`*`,`*`param_generator`*`)` +\ +`INSTANTIATE_TEST_SUITE_P(`*`InstantiationName`*`,`*`TestSuiteName`*`,`*`param_generator`*`,`*`name_generator`*`)` + +Instantiates the value-parameterized test suite *`TestSuiteName`* (defined with +[`TEST_P`](#TEST_P)). + +The argument *`InstantiationName`* is a unique name for the instantiation of the +test suite, to distinguish between multiple instantiations. In test output, the +instantiation name is added as a prefix to the test suite name +*`TestSuiteName`*. + +The argument *`param_generator`* is one of the following GoogleTest-provided +functions that generate the test parameters, all defined in the `::testing` +namespace: + + + +| Parameter Generator | Behavior | +| ------------------- | ---------------------------------------------------- | +| `Range(begin, end [, step])` | Yields values `{begin, begin+step, begin+step+step, ...}`. The values do not include `end`. `step` defaults to 1. | +| `Values(v1, v2, ..., vN)` | Yields values `{v1, v2, ..., vN}`. | +| `ValuesIn(container)` or `ValuesIn(begin,end)` | Yields values from a C-style array, an STL-style container, or an iterator range `[begin, end)`. | +| `Bool()` | Yields sequence `{false, true}`. | +| `Combine(g1, g2, ..., gN)` | Yields as `std::tuple` *n*-tuples all combinations (Cartesian product) of the values generated by the given *n* generators `g1`, `g2`, ..., `gN`. | + +The optional last argument *`name_generator`* is a function or functor that +generates custom test name suffixes based on the test parameters. The function +must accept an argument of type +[`TestParamInfo`](#TestParamInfo) and return a `std::string`. +The test name suffix can only contain alphanumeric characters and underscores. +GoogleTest provides [`PrintToStringParamName`](#PrintToStringParamName), or a +custom function can be used for more control: + +```cpp +INSTANTIATE_TEST_SUITE_P( + MyInstantiation, MyTestSuite, + ::testing::Values(...), + [](const ::testing::TestParamInfo& info) { + // Can use info.param here to generate the test suffix + std::string name = ... + return name; + }); +``` + +For more information, see +[Value-Parameterized Tests](../advanced.md#value-parameterized-tests). + +See also +[`GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST`](#GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST). + +### TYPED_TEST_SUITE {#TYPED_TEST_SUITE} + +`TYPED_TEST_SUITE(`*`TestFixtureName`*`,`*`Types`*`)` + +Defines a typed test suite based on the test fixture *`TestFixtureName`*. The +test suite name is *`TestFixtureName`*. + +The argument *`TestFixtureName`* is a fixture class template, parameterized by a +type, for example: + +```cpp +template +class MyFixture : public ::testing::Test { + public: + ... + using List = std::list; + static T shared_; + T value_; +}; +``` + +The argument *`Types`* is a [`Types`](#Types) object representing the list of +types to run the tests on, for example: + +```cpp +using MyTypes = ::testing::Types; +TYPED_TEST_SUITE(MyFixture, MyTypes); +``` + +The type alias (`using` or `typedef`) is necessary for the `TYPED_TEST_SUITE` +macro to parse correctly. + +See also [`TYPED_TEST`](#TYPED_TEST) and +[Typed Tests](../advanced.md#typed-tests) for more information. + +### TYPED_TEST {#TYPED_TEST} + +
+TYPED_TEST(TestSuiteName, TestName) {
+  ... statements ...
+}
+
+ +Defines an individual typed test named *`TestName`* in the typed test suite +*`TestSuiteName`*. The test suite must be defined with +[`TYPED_TEST_SUITE`](#TYPED_TEST_SUITE). + +Within the test body, the special name `TypeParam` refers to the type parameter, +and `TestFixture` refers to the fixture class. See the following example: + +```cpp +TYPED_TEST(MyFixture, Example) { + // Inside a test, refer to the special name TypeParam to get the type + // parameter. Since we are inside a derived class template, C++ requires + // us to visit the members of MyFixture via 'this'. + TypeParam n = this->value_; + + // To visit static members of the fixture, add the 'TestFixture::' + // prefix. + n += TestFixture::shared_; + + // To refer to typedefs in the fixture, add the 'typename TestFixture::' + // prefix. The 'typename' is required to satisfy the compiler. + typename TestFixture::List values; + + values.push_back(n); + ... +} +``` + +For more information, see [Typed Tests](../advanced.md#typed-tests). + +### TYPED_TEST_SUITE_P {#TYPED_TEST_SUITE_P} + +`TYPED_TEST_SUITE_P(`*`TestFixtureName`*`)` + +Defines a type-parameterized test suite based on the test fixture +*`TestFixtureName`*. The test suite name is *`TestFixtureName`*. + +The argument *`TestFixtureName`* is a fixture class template, parameterized by a +type. See [`TYPED_TEST_SUITE`](#TYPED_TEST_SUITE) for an example. + +See also [`TYPED_TEST_P`](#TYPED_TEST_P) and +[Type-Parameterized Tests](../advanced.md#type-parameterized-tests) for more +information. + +### TYPED_TEST_P {#TYPED_TEST_P} + +
+TYPED_TEST_P(TestSuiteName, TestName) {
+  ... statements ...
+}
+
+ +Defines an individual type-parameterized test named *`TestName`* in the +type-parameterized test suite *`TestSuiteName`*. The test suite must be defined +with [`TYPED_TEST_SUITE_P`](#TYPED_TEST_SUITE_P). + +Within the test body, the special name `TypeParam` refers to the type parameter, +and `TestFixture` refers to the fixture class. See [`TYPED_TEST`](#TYPED_TEST) +for an example. + +See also [`REGISTER_TYPED_TEST_SUITE_P`](#REGISTER_TYPED_TEST_SUITE_P) and +[Type-Parameterized Tests](../advanced.md#type-parameterized-tests) for more +information. + +### REGISTER_TYPED_TEST_SUITE_P {#REGISTER_TYPED_TEST_SUITE_P} + +`REGISTER_TYPED_TEST_SUITE_P(`*`TestSuiteName`*`,`*`TestNames...`*`)` + +Registers the type-parameterized tests *`TestNames...`* of the test suite +*`TestSuiteName`*. The test suite and tests must be defined with +[`TYPED_TEST_SUITE_P`](#TYPED_TEST_SUITE_P) and [`TYPED_TEST_P`](#TYPED_TEST_P). + +For example: + +```cpp +// Define the test suite and tests. +TYPED_TEST_SUITE_P(MyFixture); +TYPED_TEST_P(MyFixture, HasPropertyA) { ... } +TYPED_TEST_P(MyFixture, HasPropertyB) { ... } + +// Register the tests in the test suite. +REGISTER_TYPED_TEST_SUITE_P(MyFixture, HasPropertyA, HasPropertyB); +``` + +See also [`INSTANTIATE_TYPED_TEST_SUITE_P`](#INSTANTIATE_TYPED_TEST_SUITE_P) and +[Type-Parameterized Tests](../advanced.md#type-parameterized-tests) for more +information. + +### INSTANTIATE_TYPED_TEST_SUITE_P {#INSTANTIATE_TYPED_TEST_SUITE_P} + +`INSTANTIATE_TYPED_TEST_SUITE_P(`*`InstantiationName`*`,`*`TestSuiteName`*`,`*`Types`*`)` + +Instantiates the type-parameterized test suite *`TestSuiteName`*. The test suite +must be registered with +[`REGISTER_TYPED_TEST_SUITE_P`](#REGISTER_TYPED_TEST_SUITE_P). + +The argument *`InstantiationName`* is a unique name for the instantiation of the +test suite, to distinguish between multiple instantiations. In test output, the +instantiation name is added as a prefix to the test suite name +*`TestSuiteName`*. + +The argument *`Types`* is a [`Types`](#Types) object representing the list of +types to run the tests on, for example: + +```cpp +using MyTypes = ::testing::Types; +INSTANTIATE_TYPED_TEST_SUITE_P(MyInstantiation, MyFixture, MyTypes); +``` + +The type alias (`using` or `typedef`) is necessary for the +`INSTANTIATE_TYPED_TEST_SUITE_P` macro to parse correctly. + +For more information, see +[Type-Parameterized Tests](../advanced.md#type-parameterized-tests). + +### FRIEND_TEST {#FRIEND_TEST} + +`FRIEND_TEST(`*`TestSuiteName`*`,`*`TestName`*`)` + +Within a class body, declares an individual test as a friend of the class, +enabling the test to access private class members. + +If the class is defined in a namespace, then in order to be friends of the +class, test fixtures and tests must be defined in the exact same namespace, +without inline or anonymous namespaces. + +For example, if the class definition looks like the following: + +```cpp +namespace my_namespace { + +class MyClass { + friend class MyClassTest; + FRIEND_TEST(MyClassTest, HasPropertyA); + FRIEND_TEST(MyClassTest, HasPropertyB); + ... definition of class MyClass ... +}; + +} // namespace my_namespace +``` + +Then the test code should look like: + +```cpp +namespace my_namespace { + +class MyClassTest : public ::testing::Test { + ... +}; + +TEST_F(MyClassTest, HasPropertyA) { ... } +TEST_F(MyClassTest, HasPropertyB) { ... } + +} // namespace my_namespace +``` + +See [Testing Private Code](../advanced.md#testing-private-code) for more +information. + +### SCOPED_TRACE {#SCOPED_TRACE} + +`SCOPED_TRACE(`*`message`*`)` + +Causes the current file name, line number, and the given message *`message`* to +be added to the failure message for each assertion failure that occurs in the +scope. + +For more information, see +[Adding Traces to Assertions](../advanced.md#adding-traces-to-assertions). + +See also the [`ScopedTrace` class](#ScopedTrace). + +### GTEST_SKIP {#GTEST_SKIP} + +`GTEST_SKIP()` + +Prevents further test execution at runtime. + +Can be used in individual test cases or in the `SetUp()` methods of test +environments or test fixtures (classes derived from the +[`Environment`](#Environment) or [`Test`](#Test) classes). If used in a global +test environment `SetUp()` method, it skips all tests in the test program. If +used in a test fixture `SetUp()` method, it skips all tests in the corresponding +test suite. + +Similar to assertions, `GTEST_SKIP` allows streaming a custom message into it. + +See [Skipping Test Execution](../advanced.md#skipping-test-execution) for more +information. + +### GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST {#GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST} + +`GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(`*`TestSuiteName`*`)` + +Allows the value-parameterized test suite *`TestSuiteName`* to be +uninstantiated. + +By default, every [`TEST_P`](#TEST_P) call without a corresponding +[`INSTANTIATE_TEST_SUITE_P`](#INSTANTIATE_TEST_SUITE_P) call causes a failing +test in the test suite `GoogleTestVerification`. +`GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST` suppresses this failure for the +given test suite. + +## Classes and types + +GoogleTest defines the following classes and types to help with writing tests. + +### AssertionResult {#AssertionResult} + +`::testing::AssertionResult` + +A class for indicating whether an assertion was successful. + +When the assertion wasn't successful, the `AssertionResult` object stores a +non-empty failure message that can be retrieved with the object's `message()` +method. + +To create an instance of this class, use one of the factory functions +[`AssertionSuccess()`](#AssertionSuccess) or +[`AssertionFailure()`](#AssertionFailure). + +### AssertionException {#AssertionException} + +`::testing::AssertionException` + +Exception which can be thrown from +[`TestEventListener::OnTestPartResult`](#TestEventListener::OnTestPartResult). + +### EmptyTestEventListener {#EmptyTestEventListener} + +`::testing::EmptyTestEventListener` + +Provides an empty implementation of all methods in the +[`TestEventListener`](#TestEventListener) interface, such that a subclass only +needs to override the methods it cares about. + +### Environment {#Environment} + +`::testing::Environment` + +Represents a global test environment. See +[Global Set-Up and Tear-Down](../advanced.md#global-set-up-and-tear-down). + +#### Protected Methods {#Environment-protected} + +##### SetUp {#Environment::SetUp} + +`virtual void Environment::SetUp()` + +Override this to define how to set up the environment. + +##### TearDown {#Environment::TearDown} + +`virtual void Environment::TearDown()` + +Override this to define how to tear down the environment. + +### ScopedTrace {#ScopedTrace} + +`::testing::ScopedTrace` + +An instance of this class causes a trace to be included in every test failure +message generated by code in the scope of the lifetime of the `ScopedTrace` +instance. The effect is undone with the destruction of the instance. + +The `ScopedTrace` constructor has the following form: + +```cpp +template +ScopedTrace(const char* file, int line, const T& message) +``` + +Example usage: + +```cpp +::testing::ScopedTrace trace("file.cc", 123, "message"); +``` + +The resulting trace includes the given source file path and line number, and the +given message. The `message` argument can be anything streamable to +`std::ostream`. + +See also [`SCOPED_TRACE`](#SCOPED_TRACE). + +### Test {#Test} + +`::testing::Test` + +The abstract class that all tests inherit from. `Test` is not copyable. + +#### Public Methods {#Test-public} + +##### SetUpTestSuite {#Test::SetUpTestSuite} + +`static void Test::SetUpTestSuite()` + +Performs shared setup for all tests in the test suite. GoogleTest calls +`SetUpTestSuite()` before running the first test in the test suite. + +##### TearDownTestSuite {#Test::TearDownTestSuite} + +`static void Test::TearDownTestSuite()` + +Performs shared teardown for all tests in the test suite. GoogleTest calls +`TearDownTestSuite()` after running the last test in the test suite. + +##### HasFatalFailure {#Test::HasFatalFailure} + +`static bool Test::HasFatalFailure()` + +Returns true if and only if the current test has a fatal failure. + +##### HasNonfatalFailure {#Test::HasNonfatalFailure} + +`static bool Test::HasNonfatalFailure()` + +Returns true if and only if the current test has a nonfatal failure. + +##### HasFailure {#Test::HasFailure} + +`static bool Test::HasFailure()` + +Returns true if and only if the current test has any failure, either fatal or +nonfatal. + +##### IsSkipped {#Test::IsSkipped} + +`static bool Test::IsSkipped()` + +Returns true if and only if the current test was skipped. + +##### RecordProperty {#Test::RecordProperty} + +`static void Test::RecordProperty(const std::string& key, const std::string& +value)` \ +`static void Test::RecordProperty(const std::string& key, int value)` + +Logs a property for the current test, test suite, or entire invocation of the +test program. Only the last value for a given key is logged. + +The key must be a valid XML attribute name, and cannot conflict with the ones +already used by GoogleTest (`name`, `status`, `time`, `classname`, `type_param`, +and `value_param`). + +`RecordProperty` is `public static` so it can be called from utility functions +that are not members of the test fixture. + +Calls to `RecordProperty` made during the lifespan of the test (from the moment +its constructor starts to the moment its destructor finishes) are output in XML +as attributes of the `` element. Properties recorded from a fixture's +`SetUpTestSuite` or `TearDownTestSuite` methods are logged as attributes of the +corresponding `` element. Calls to `RecordProperty` made in the +global context (before or after invocation of `RUN_ALL_TESTS` or from the +`SetUp`/`TearDown` methods of registered `Environment` objects) are output as +attributes of the `` element. + +#### Protected Methods {#Test-protected} + +##### SetUp {#Test::SetUp} + +`virtual void Test::SetUp()` + +Override this to perform test fixture setup. GoogleTest calls `SetUp()` before +running each individual test. + +##### TearDown {#Test::TearDown} + +`virtual void Test::TearDown()` + +Override this to perform test fixture teardown. GoogleTest calls `TearDown()` +after running each individual test. + +### TestWithParam {#TestWithParam} + +`::testing::TestWithParam` + +A convenience class which inherits from both [`Test`](#Test) and +[`WithParamInterface`](#WithParamInterface). + +### TestSuite {#TestSuite} + +Represents a test suite. `TestSuite` is not copyable. + +#### Public Methods {#TestSuite-public} + +##### name {#TestSuite::name} + +`const char* TestSuite::name() const` + +Gets the name of the test suite. + +##### type_param {#TestSuite::type_param} + +`const char* TestSuite::type_param() const` + +Returns the name of the parameter type, or `NULL` if this is not a typed or +type-parameterized test suite. See [Typed Tests](../advanced.md#typed-tests) and +[Type-Parameterized Tests](../advanced.md#type-parameterized-tests). + +##### should_run {#TestSuite::should_run} + +`bool TestSuite::should_run() const` + +Returns true if any test in this test suite should run. + +##### successful_test_count {#TestSuite::successful_test_count} + +`int TestSuite::successful_test_count() const` + +Gets the number of successful tests in this test suite. + +##### skipped_test_count {#TestSuite::skipped_test_count} + +`int TestSuite::skipped_test_count() const` + +Gets the number of skipped tests in this test suite. + +##### failed_test_count {#TestSuite::failed_test_count} + +`int TestSuite::failed_test_count() const` + +Gets the number of failed tests in this test suite. + +##### reportable_disabled_test_count {#TestSuite::reportable_disabled_test_count} + +`int TestSuite::reportable_disabled_test_count() const` + +Gets the number of disabled tests that will be reported in the XML report. + +##### disabled_test_count {#TestSuite::disabled_test_count} + +`int TestSuite::disabled_test_count() const` + +Gets the number of disabled tests in this test suite. + +##### reportable_test_count {#TestSuite::reportable_test_count} + +`int TestSuite::reportable_test_count() const` + +Gets the number of tests to be printed in the XML report. + +##### test_to_run_count {#TestSuite::test_to_run_count} + +`int TestSuite::test_to_run_count() const` + +Get the number of tests in this test suite that should run. + +##### total_test_count {#TestSuite::total_test_count} + +`int TestSuite::total_test_count() const` + +Gets the number of all tests in this test suite. + +##### Passed {#TestSuite::Passed} + +`bool TestSuite::Passed() const` + +Returns true if and only if the test suite passed. + +##### Failed {#TestSuite::Failed} + +`bool TestSuite::Failed() const` + +Returns true if and only if the test suite failed. + +##### elapsed_time {#TestSuite::elapsed_time} + +`TimeInMillis TestSuite::elapsed_time() const` + +Returns the elapsed time, in milliseconds. + +##### start_timestamp {#TestSuite::start_timestamp} + +`TimeInMillis TestSuite::start_timestamp() const` + +Gets the time of the test suite start, in ms from the start of the UNIX epoch. + +##### GetTestInfo {#TestSuite::GetTestInfo} + +`const TestInfo* TestSuite::GetTestInfo(int i) const` + +Returns the [`TestInfo`](#TestInfo) for the `i`-th test among all the tests. `i` +can range from 0 to `total_test_count() - 1`. If `i` is not in that range, +returns `NULL`. + +##### ad_hoc_test_result {#TestSuite::ad_hoc_test_result} + +`const TestResult& TestSuite::ad_hoc_test_result() const` + +Returns the [`TestResult`](#TestResult) that holds test properties recorded +during execution of `SetUpTestSuite` and `TearDownTestSuite`. + +### TestInfo {#TestInfo} + +`::testing::TestInfo` + +Stores information about a test. + +#### Public Methods {#TestInfo-public} + +##### test_suite_name {#TestInfo::test_suite_name} + +`const char* TestInfo::test_suite_name() const` + +Returns the test suite name. + +##### name {#TestInfo::name} + +`const char* TestInfo::name() const` + +Returns the test name. + +##### type_param {#TestInfo::type_param} + +`const char* TestInfo::type_param() const` + +Returns the name of the parameter type, or `NULL` if this is not a typed or +type-parameterized test. See [Typed Tests](../advanced.md#typed-tests) and +[Type-Parameterized Tests](../advanced.md#type-parameterized-tests). + +##### value_param {#TestInfo::value_param} + +`const char* TestInfo::value_param() const` + +Returns the text representation of the value parameter, or `NULL` if this is not +a value-parameterized test. See +[Value-Parameterized Tests](../advanced.md#value-parameterized-tests). + +##### file {#TestInfo::file} + +`const char* TestInfo::file() const` + +Returns the file name where this test is defined. + +##### line {#TestInfo::line} + +`int TestInfo::line() const` + +Returns the line where this test is defined. + +##### is_in_another_shard {#TestInfo::is_in_another_shard} + +`bool TestInfo::is_in_another_shard() const` + +Returns true if this test should not be run because it's in another shard. + +##### should_run {#TestInfo::should_run} + +`bool TestInfo::should_run() const` + +Returns true if this test should run, that is if the test is not disabled (or it +is disabled but the `also_run_disabled_tests` flag has been specified) and its +full name matches the user-specified filter. + +GoogleTest allows the user to filter the tests by their full names. Only the +tests that match the filter will run. See +[Running a Subset of the Tests](../advanced.md#running-a-subset-of-the-tests) +for more information. + +##### is_reportable {#TestInfo::is_reportable} + +`bool TestInfo::is_reportable() const` + +Returns true if and only if this test will appear in the XML report. + +##### result {#TestInfo::result} + +`const TestResult* TestInfo::result() const` + +Returns the result of the test. See [`TestResult`](#TestResult). + +### TestParamInfo {#TestParamInfo} + +`::testing::TestParamInfo` + +Describes a parameter to a value-parameterized test. The type `T` is the type of +the parameter. + +Contains the fields `param` and `index` which hold the value of the parameter +and its integer index respectively. + +### UnitTest {#UnitTest} + +`::testing::UnitTest` + +This class contains information about the test program. + +`UnitTest` is a singleton class. The only instance is created when +`UnitTest::GetInstance()` is first called. This instance is never deleted. + +`UnitTest` is not copyable. + +#### Public Methods {#UnitTest-public} + +##### GetInstance {#UnitTest::GetInstance} + +`static UnitTest* UnitTest::GetInstance()` + +Gets the singleton `UnitTest` object. The first time this method is called, a +`UnitTest` object is constructed and returned. Consecutive calls will return the +same object. + +##### original_working_dir {#UnitTest::original_working_dir} + +`const char* UnitTest::original_working_dir() const` + +Returns the working directory when the first [`TEST()`](#TEST) or +[`TEST_F()`](#TEST_F) was executed. The `UnitTest` object owns the string. + +##### current_test_suite {#UnitTest::current_test_suite} + +`const TestSuite* UnitTest::current_test_suite() const` + +Returns the [`TestSuite`](#TestSuite) object for the test that's currently +running, or `NULL` if no test is running. + +##### current_test_info {#UnitTest::current_test_info} + +`const TestInfo* UnitTest::current_test_info() const` + +Returns the [`TestInfo`](#TestInfo) object for the test that's currently +running, or `NULL` if no test is running. + +##### random_seed {#UnitTest::random_seed} + +`int UnitTest::random_seed() const` + +Returns the random seed used at the start of the current test run. + +##### successful_test_suite_count {#UnitTest::successful_test_suite_count} + +`int UnitTest::successful_test_suite_count() const` + +Gets the number of successful test suites. + +##### failed_test_suite_count {#UnitTest::failed_test_suite_count} + +`int UnitTest::failed_test_suite_count() const` + +Gets the number of failed test suites. + +##### total_test_suite_count {#UnitTest::total_test_suite_count} + +`int UnitTest::total_test_suite_count() const` + +Gets the number of all test suites. + +##### test_suite_to_run_count {#UnitTest::test_suite_to_run_count} + +`int UnitTest::test_suite_to_run_count() const` + +Gets the number of all test suites that contain at least one test that should +run. + +##### successful_test_count {#UnitTest::successful_test_count} + +`int UnitTest::successful_test_count() const` + +Gets the number of successful tests. + +##### skipped_test_count {#UnitTest::skipped_test_count} + +`int UnitTest::skipped_test_count() const` + +Gets the number of skipped tests. + +##### failed_test_count {#UnitTest::failed_test_count} + +`int UnitTest::failed_test_count() const` + +Gets the number of failed tests. + +##### reportable_disabled_test_count {#UnitTest::reportable_disabled_test_count} + +`int UnitTest::reportable_disabled_test_count() const` + +Gets the number of disabled tests that will be reported in the XML report. + +##### disabled_test_count {#UnitTest::disabled_test_count} + +`int UnitTest::disabled_test_count() const` + +Gets the number of disabled tests. + +##### reportable_test_count {#UnitTest::reportable_test_count} + +`int UnitTest::reportable_test_count() const` + +Gets the number of tests to be printed in the XML report. + +##### total_test_count {#UnitTest::total_test_count} + +`int UnitTest::total_test_count() const` + +Gets the number of all tests. + +##### test_to_run_count {#UnitTest::test_to_run_count} + +`int UnitTest::test_to_run_count() const` + +Gets the number of tests that should run. + +##### start_timestamp {#UnitTest::start_timestamp} + +`TimeInMillis UnitTest::start_timestamp() const` + +Gets the time of the test program start, in ms from the start of the UNIX epoch. + +##### elapsed_time {#UnitTest::elapsed_time} + +`TimeInMillis UnitTest::elapsed_time() const` + +Gets the elapsed time, in milliseconds. + +##### Passed {#UnitTest::Passed} + +`bool UnitTest::Passed() const` + +Returns true if and only if the unit test passed (i.e. all test suites passed). + +##### Failed {#UnitTest::Failed} + +`bool UnitTest::Failed() const` + +Returns true if and only if the unit test failed (i.e. some test suite failed or +something outside of all tests failed). + +##### GetTestSuite {#UnitTest::GetTestSuite} + +`const TestSuite* UnitTest::GetTestSuite(int i) const` + +Gets the [`TestSuite`](#TestSuite) object for the `i`-th test suite among all +the test suites. `i` can range from 0 to `total_test_suite_count() - 1`. If `i` +is not in that range, returns `NULL`. + +##### ad_hoc_test_result {#UnitTest::ad_hoc_test_result} + +`const TestResult& UnitTest::ad_hoc_test_result() const` + +Returns the [`TestResult`](#TestResult) containing information on test failures +and properties logged outside of individual test suites. + +##### listeners {#UnitTest::listeners} + +`TestEventListeners& UnitTest::listeners()` + +Returns the list of event listeners that can be used to track events inside +GoogleTest. See [`TestEventListeners`](#TestEventListeners). + +### TestEventListener {#TestEventListener} + +`::testing::TestEventListener` + +The interface for tracing execution of tests. The methods below are listed in +the order the corresponding events are fired. + +#### Public Methods {#TestEventListener-public} + +##### OnTestProgramStart {#TestEventListener::OnTestProgramStart} + +`virtual void TestEventListener::OnTestProgramStart(const UnitTest& unit_test)` + +Fired before any test activity starts. + +##### OnTestIterationStart {#TestEventListener::OnTestIterationStart} + +`virtual void TestEventListener::OnTestIterationStart(const UnitTest& unit_test, +int iteration)` + +Fired before each iteration of tests starts. There may be more than one +iteration if `GTEST_FLAG(repeat)` is set. `iteration` is the iteration index, +starting from 0. + +##### OnEnvironmentsSetUpStart {#TestEventListener::OnEnvironmentsSetUpStart} + +`virtual void TestEventListener::OnEnvironmentsSetUpStart(const UnitTest& +unit_test)` + +Fired before environment set-up for each iteration of tests starts. + +##### OnEnvironmentsSetUpEnd {#TestEventListener::OnEnvironmentsSetUpEnd} + +`virtual void TestEventListener::OnEnvironmentsSetUpEnd(const UnitTest& +unit_test)` + +Fired after environment set-up for each iteration of tests ends. + +##### OnTestSuiteStart {#TestEventListener::OnTestSuiteStart} + +`virtual void TestEventListener::OnTestSuiteStart(const TestSuite& test_suite)` + +Fired before the test suite starts. + +##### OnTestStart {#TestEventListener::OnTestStart} + +`virtual void TestEventListener::OnTestStart(const TestInfo& test_info)` + +Fired before the test starts. + +##### OnTestPartResult {#TestEventListener::OnTestPartResult} + +`virtual void TestEventListener::OnTestPartResult(const TestPartResult& +test_part_result)` + +Fired after a failed assertion or a `SUCCEED()` invocation. If you want to throw +an exception from this function to skip to the next test, it must be an +[`AssertionException`](#AssertionException) or inherited from it. + +##### OnTestEnd {#TestEventListener::OnTestEnd} + +`virtual void TestEventListener::OnTestEnd(const TestInfo& test_info)` + +Fired after the test ends. + +##### OnTestSuiteEnd {#TestEventListener::OnTestSuiteEnd} + +`virtual void TestEventListener::OnTestSuiteEnd(const TestSuite& test_suite)` + +Fired after the test suite ends. + +##### OnEnvironmentsTearDownStart {#TestEventListener::OnEnvironmentsTearDownStart} + +`virtual void TestEventListener::OnEnvironmentsTearDownStart(const UnitTest& +unit_test)` + +Fired before environment tear-down for each iteration of tests starts. + +##### OnEnvironmentsTearDownEnd {#TestEventListener::OnEnvironmentsTearDownEnd} + +`virtual void TestEventListener::OnEnvironmentsTearDownEnd(const UnitTest& +unit_test)` + +Fired after environment tear-down for each iteration of tests ends. + +##### OnTestIterationEnd {#TestEventListener::OnTestIterationEnd} + +`virtual void TestEventListener::OnTestIterationEnd(const UnitTest& unit_test, +int iteration)` + +Fired after each iteration of tests finishes. + +##### OnTestProgramEnd {#TestEventListener::OnTestProgramEnd} + +`virtual void TestEventListener::OnTestProgramEnd(const UnitTest& unit_test)` + +Fired after all test activities have ended. + +### TestEventListeners {#TestEventListeners} + +`::testing::TestEventListeners` + +Lets users add listeners to track events in GoogleTest. + +#### Public Methods {#TestEventListeners-public} + +##### Append {#TestEventListeners::Append} + +`void TestEventListeners::Append(TestEventListener* listener)` + +Appends an event listener to the end of the list. GoogleTest assumes ownership +of the listener (i.e. it will delete the listener when the test program +finishes). + +##### Release {#TestEventListeners::Release} + +`TestEventListener* TestEventListeners::Release(TestEventListener* listener)` + +Removes the given event listener from the list and returns it. It then becomes +the caller's responsibility to delete the listener. Returns `NULL` if the +listener is not found in the list. + +##### default_result_printer {#TestEventListeners::default_result_printer} + +`TestEventListener* TestEventListeners::default_result_printer() const` + +Returns the standard listener responsible for the default console output. Can be +removed from the listeners list to shut down default console output. Note that +removing this object from the listener list with +[`Release()`](#TestEventListeners::Release) transfers its ownership to the +caller and makes this function return `NULL` the next time. + +##### default_xml_generator {#TestEventListeners::default_xml_generator} + +`TestEventListener* TestEventListeners::default_xml_generator() const` + +Returns the standard listener responsible for the default XML output controlled +by the `--gtest_output=xml` flag. Can be removed from the listeners list by +users who want to shut down the default XML output controlled by this flag and +substitute it with custom one. Note that removing this object from the listener +list with [`Release()`](#TestEventListeners::Release) transfers its ownership to +the caller and makes this function return `NULL` the next time. + +### TestPartResult {#TestPartResult} + +`::testing::TestPartResult` + +A copyable object representing the result of a test part (i.e. an assertion or +an explicit `FAIL()`, `ADD_FAILURE()`, or `SUCCESS()`). + +#### Public Methods {#TestPartResult-public} + +##### type {#TestPartResult::type} + +`Type TestPartResult::type() const` + +Gets the outcome of the test part. + +The return type `Type` is an enum defined as follows: + +```cpp +enum Type { + kSuccess, // Succeeded. + kNonFatalFailure, // Failed but the test can continue. + kFatalFailure, // Failed and the test should be terminated. + kSkip // Skipped. +}; +``` + +##### file_name {#TestPartResult::file_name} + +`const char* TestPartResult::file_name() const` + +Gets the name of the source file where the test part took place, or `NULL` if +it's unknown. + +##### line_number {#TestPartResult::line_number} + +`int TestPartResult::line_number() const` + +Gets the line in the source file where the test part took place, or `-1` if it's +unknown. + +##### summary {#TestPartResult::summary} + +`const char* TestPartResult::summary() const` + +Gets the summary of the failure message. + +##### message {#TestPartResult::message} + +`const char* TestPartResult::message() const` + +Gets the message associated with the test part. + +##### skipped {#TestPartResult::skipped} + +`bool TestPartResult::skipped() const` + +Returns true if and only if the test part was skipped. + +##### passed {#TestPartResult::passed} + +`bool TestPartResult::passed() const` + +Returns true if and only if the test part passed. + +##### nonfatally_failed {#TestPartResult::nonfatally_failed} + +`bool TestPartResult::nonfatally_failed() const` + +Returns true if and only if the test part non-fatally failed. + +##### fatally_failed {#TestPartResult::fatally_failed} + +`bool TestPartResult::fatally_failed() const` + +Returns true if and only if the test part fatally failed. + +##### failed {#TestPartResult::failed} + +`bool TestPartResult::failed() const` + +Returns true if and only if the test part failed. + +### TestProperty {#TestProperty} + +`::testing::TestProperty` + +A copyable object representing a user-specified test property which can be +output as a key/value string pair. + +#### Public Methods {#TestProperty-public} + +##### key {#key} + +`const char* key() const` + +Gets the user-supplied key. + +##### value {#value} + +`const char* value() const` + +Gets the user-supplied value. + +##### SetValue {#SetValue} + +`void SetValue(const std::string& new_value)` + +Sets a new value, overriding the previous one. + +### TestResult {#TestResult} + +`::testing::TestResult` + +Contains information about the result of a single test. + +`TestResult` is not copyable. + +#### Public Methods {#TestResult-public} + +##### total_part_count {#TestResult::total_part_count} + +`int TestResult::total_part_count() const` + +Gets the number of all test parts. This is the sum of the number of successful +test parts and the number of failed test parts. + +##### test_property_count {#TestResult::test_property_count} + +`int TestResult::test_property_count() const` + +Returns the number of test properties. + +##### Passed {#TestResult::Passed} + +`bool TestResult::Passed() const` + +Returns true if and only if the test passed (i.e. no test part failed). + +##### Skipped {#TestResult::Skipped} + +`bool TestResult::Skipped() const` + +Returns true if and only if the test was skipped. + +##### Failed {#TestResult::Failed} + +`bool TestResult::Failed() const` + +Returns true if and only if the test failed. + +##### HasFatalFailure {#TestResult::HasFatalFailure} + +`bool TestResult::HasFatalFailure() const` + +Returns true if and only if the test fatally failed. + +##### HasNonfatalFailure {#TestResult::HasNonfatalFailure} + +`bool TestResult::HasNonfatalFailure() const` + +Returns true if and only if the test has a non-fatal failure. + +##### elapsed_time {#TestResult::elapsed_time} + +`TimeInMillis TestResult::elapsed_time() const` + +Returns the elapsed time, in milliseconds. + +##### start_timestamp {#TestResult::start_timestamp} + +`TimeInMillis TestResult::start_timestamp() const` + +Gets the time of the test case start, in ms from the start of the UNIX epoch. + +##### GetTestPartResult {#TestResult::GetTestPartResult} + +`const TestPartResult& TestResult::GetTestPartResult(int i) const` + +Returns the [`TestPartResult`](#TestPartResult) for the `i`-th test part result +among all the results. `i` can range from 0 to `total_part_count() - 1`. If `i` +is not in that range, aborts the program. + +##### GetTestProperty {#TestResult::GetTestProperty} + +`const TestProperty& TestResult::GetTestProperty(int i) const` + +Returns the [`TestProperty`](#TestProperty) object for the `i`-th test property. +`i` can range from 0 to `test_property_count() - 1`. If `i` is not in that +range, aborts the program. + +### TimeInMillis {#TimeInMillis} + +`::testing::TimeInMillis` + +An integer type representing time in milliseconds. + +### Types {#Types} + +`::testing::Types` + +Represents a list of types for use in typed tests and type-parameterized tests. + +The template argument `T...` can be any number of types, for example: + +``` +::testing::Types +``` + +See [Typed Tests](../advanced.md#typed-tests) and +[Type-Parameterized Tests](../advanced.md#type-parameterized-tests) for more +information. + +### WithParamInterface {#WithParamInterface} + +`::testing::WithParamInterface` + +The pure interface class that all value-parameterized tests inherit from. + +A value-parameterized test fixture class must inherit from both [`Test`](#Test) +and `WithParamInterface`. In most cases that just means inheriting from +[`TestWithParam`](#TestWithParam), but more complicated test hierarchies may +need to inherit from `Test` and `WithParamInterface` at different levels. + +This interface defines the type alias `ParamType` for the parameter type `T` and +has support for accessing the test parameter value via the `GetParam()` method: + +``` +static const ParamType& GetParam() +``` + +For more information, see +[Value-Parameterized Tests](../advanced.md#value-parameterized-tests). + +## Functions + +GoogleTest defines the following functions to help with writing and running +tests. + +### InitGoogleTest {#InitGoogleTest} + +`void ::testing::InitGoogleTest(int* argc, char** argv)` \ +`void ::testing::InitGoogleTest(int* argc, wchar_t** argv)` \ +`void ::testing::InitGoogleTest()` + +Initializes GoogleTest. This must be called before calling +[`RUN_ALL_TESTS()`](#RUN_ALL_TESTS). In particular, it parses the command line +for the flags that GoogleTest recognizes. Whenever a GoogleTest flag is seen, it +is removed from `argv`, and `*argc` is decremented. + +No value is returned. Instead, the GoogleTest flag variables are updated. + +The `InitGoogleTest(int* argc, wchar_t** argv)` overload can be used in Windows +programs compiled in `UNICODE` mode. + +The argument-less `InitGoogleTest()` overload can be used on Arduino/embedded +platforms where there is no `argc`/`argv`. + +### AddGlobalTestEnvironment {#AddGlobalTestEnvironment} + +`Environment* ::testing::AddGlobalTestEnvironment(Environment* env)` + +Adds a test environment to the test program. Must be called before +[`RUN_ALL_TESTS()`](#RUN_ALL_TESTS) is called. See +[Global Set-Up and Tear-Down](../advanced.md#global-set-up-and-tear-down) for +more information. + +See also [`Environment`](#Environment). + +### RegisterTest {#RegisterTest} + +```cpp +template +TestInfo* ::testing::RegisterTest(const char* test_suite_name, const char* test_name, + const char* type_param, const char* value_param, + const char* file, int line, Factory factory) +``` + +Dynamically registers a test with the framework. + +The `factory` argument is a factory callable (move-constructible) object or +function pointer that creates a new instance of the `Test` object. It handles +ownership to the caller. The signature of the callable is `Fixture*()`, where +`Fixture` is the test fixture class for the test. All tests registered with the +same `test_suite_name` must return the same fixture type. This is checked at +runtime. + +The framework will infer the fixture class from the factory and will call the +`SetUpTestSuite` and `TearDownTestSuite` methods for it. + +Must be called before [`RUN_ALL_TESTS()`](#RUN_ALL_TESTS) is invoked, otherwise +behavior is undefined. + +See +[Registering tests programmatically](../advanced.md#registering-tests-programmatically) +for more information. + +### RUN_ALL_TESTS {#RUN_ALL_TESTS} + +`int RUN_ALL_TESTS()` + +Use this function in `main()` to run all tests. It returns `0` if all tests are +successful, or `1` otherwise. + +`RUN_ALL_TESTS()` should be invoked after the command line has been parsed by +[`InitGoogleTest()`](#InitGoogleTest). + +This function was formerly a macro; thus, it is in the global namespace and has +an all-caps name. + +### AssertionSuccess {#AssertionSuccess} + +`AssertionResult ::testing::AssertionSuccess()` + +Creates a successful assertion result. See +[`AssertionResult`](#AssertionResult). + +### AssertionFailure {#AssertionFailure} + +`AssertionResult ::testing::AssertionFailure()` + +Creates a failed assertion result. Use the `<<` operator to store a failure +message: + +```cpp +::testing::AssertionFailure() << "My failure message"; +``` + +See [`AssertionResult`](#AssertionResult). + +### StaticAssertTypeEq {#StaticAssertTypeEq} + +`::testing::StaticAssertTypeEq()` + +Compile-time assertion for type equality. Compiles if and only if `T1` and `T2` +are the same type. The value it returns is irrelevant. + +See [Type Assertions](../advanced.md#type-assertions) for more information. + +### PrintToString {#PrintToString} + +`std::string ::testing::PrintToString(x)` + +Prints any value `x` using GoogleTest's value printer. + +See +[Teaching GoogleTest How to Print Your Values](../advanced.md#teaching-googletest-how-to-print-your-values) +for more information. + +### PrintToStringParamName {#PrintToStringParamName} + +`std::string ::testing::PrintToStringParamName(TestParamInfo& info)` + +A built-in parameterized test name generator which returns the result of +[`PrintToString`](#PrintToString) called on `info.param`. Does not work when the +test parameter is a `std::string` or C string. See +[Specifying Names for Value-Parameterized Test Parameters](../advanced.md#specifying-names-for-value-parameterized-test-parameters) +for more information. + +See also [`TestParamInfo`](#TestParamInfo) and +[`INSTANTIATE_TEST_SUITE_P`](#INSTANTIATE_TEST_SUITE_P). diff --git a/graphics/asymptote/LspCpp/third_party/uri/deps/docs/samples.md b/graphics/asymptote/LspCpp/third_party/uri/deps/docs/samples.md new file mode 100644 index 0000000000..2d97ca55b2 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/uri/deps/docs/samples.md @@ -0,0 +1,22 @@ +# Googletest Samples + +If you're like us, you'd like to look at +[googletest samples.](https://github.com/google/googletest/tree/master/googletest/samples) +The sample directory has a number of well-commented samples showing how to use a +variety of googletest features. + +* Sample #1 shows the basic steps of using googletest to test C++ functions. +* Sample #2 shows a more complex unit test for a class with multiple member + functions. +* Sample #3 uses a test fixture. +* Sample #4 teaches you how to use googletest and `googletest.h` together to + get the best of both libraries. +* Sample #5 puts shared testing logic in a base test fixture, and reuses it in + derived fixtures. +* Sample #6 demonstrates type-parameterized tests. +* Sample #7 teaches the basics of value-parameterized tests. +* Sample #8 shows using `Combine()` in value-parameterized tests. +* Sample #9 shows use of the listener API to modify Google Test's console + output and the use of its reflection API to inspect test results. +* Sample #10 shows use of the listener API to implement a primitive memory + leak checker. diff --git a/graphics/asymptote/LspCpp/third_party/uri/deps/googlemock/CMakeLists.txt b/graphics/asymptote/LspCpp/third_party/uri/deps/googlemock/CMakeLists.txt new file mode 100644 index 0000000000..2b55ba1583 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/uri/deps/googlemock/CMakeLists.txt @@ -0,0 +1,214 @@ +######################################################################## +# Note: CMake support is community-based. The maintainers do not use CMake +# internally. +# +# CMake build script for Google Mock. +# +# To run the tests for Google Mock itself on Linux, use 'make test' or +# ctest. You can select which tests to run using 'ctest -R regex'. +# For more options, run 'ctest --help'. + +option(gmock_build_tests "Build all of Google Mock's own tests." OFF) + +# A directory to find Google Test sources. +if (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/gtest/CMakeLists.txt") + set(gtest_dir gtest) +else() + set(gtest_dir ../googletest) +endif() + +# Defines pre_project_set_up_hermetic_build() and set_up_hermetic_build(). +include("${gtest_dir}/cmake/hermetic_build.cmake" OPTIONAL) + +if (COMMAND pre_project_set_up_hermetic_build) + # Google Test also calls hermetic setup functions from add_subdirectory, + # although its changes will not affect things at the current scope. + pre_project_set_up_hermetic_build() +endif() + +######################################################################## +# +# Project-wide settings + +# Name of the project. +# +# CMake files in this project can refer to the root source directory +# as ${gmock_SOURCE_DIR} and to the root binary directory as +# ${gmock_BINARY_DIR}. +# Language "C" is required for find_package(Threads). +cmake_minimum_required(VERSION 3.5) +cmake_policy(SET CMP0048 NEW) +project(gmock VERSION ${GOOGLETEST_VERSION} LANGUAGES CXX C) + +if (COMMAND set_up_hermetic_build) + set_up_hermetic_build() +endif() + +# Instructs CMake to process Google Test's CMakeLists.txt and add its +# targets to the current scope. We are placing Google Test's binary +# directory in a subdirectory of our own as VC compilation may break +# if they are the same (the default). +add_subdirectory("${gtest_dir}" "${gmock_BINARY_DIR}/${gtest_dir}") + + +# These commands only run if this is the main project +if(CMAKE_PROJECT_NAME STREQUAL "gmock" OR CMAKE_PROJECT_NAME STREQUAL "googletest-distribution") + # BUILD_SHARED_LIBS is a standard CMake variable, but we declare it here to + # make it prominent in the GUI. + option(BUILD_SHARED_LIBS "Build shared libraries (DLLs)." OFF) +else() + mark_as_advanced(gmock_build_tests) +endif() + +# Although Google Test's CMakeLists.txt calls this function, the +# changes there don't affect the current scope. Therefore we have to +# call it again here. +config_compiler_and_linker() # from ${gtest_dir}/cmake/internal_utils.cmake + +# Adds Google Mock's and Google Test's header directories to the search path. +set(gmock_build_include_dirs + "${gmock_SOURCE_DIR}/include" + "${gmock_SOURCE_DIR}" + "${gtest_SOURCE_DIR}/include" + # This directory is needed to build directly from Google Test sources. + "${gtest_SOURCE_DIR}") +include_directories(${gmock_build_include_dirs}) + +######################################################################## +# +# Defines the gmock & gmock_main libraries. User tests should link +# with one of them. + +# Google Mock libraries. We build them using more strict warnings than what +# are used for other targets, to ensure that Google Mock can be compiled by +# a user aggressive about warnings. +if (MSVC) + cxx_library(gmock + "${cxx_strict}" + "${gtest_dir}/src/gtest-all.cc" + src/gmock-all.cc) + + cxx_library(gmock_main + "${cxx_strict}" + "${gtest_dir}/src/gtest-all.cc" + src/gmock-all.cc + src/gmock_main.cc) +else() + cxx_library(gmock "${cxx_strict}" src/gmock-all.cc) + target_link_libraries(gmock PUBLIC gtest) + set_target_properties(gmock PROPERTIES VERSION ${GOOGLETEST_VERSION}) + cxx_library(gmock_main "${cxx_strict}" src/gmock_main.cc) + target_link_libraries(gmock_main PUBLIC gmock) + set_target_properties(gmock_main PROPERTIES VERSION ${GOOGLETEST_VERSION}) +endif() +# If the CMake version supports it, attach header directory information +# to the targets for when we are part of a parent build (ie being pulled +# in via add_subdirectory() rather than being a standalone build). +if (DEFINED CMAKE_VERSION AND NOT "${CMAKE_VERSION}" VERSION_LESS "2.8.11") + target_include_directories(gmock SYSTEM INTERFACE + "$" + "$/${CMAKE_INSTALL_INCLUDEDIR}>") + target_include_directories(gmock_main SYSTEM INTERFACE + "$" + "$/${CMAKE_INSTALL_INCLUDEDIR}>") +endif() + +######################################################################## +# +# Install rules +install_project(gmock gmock_main) + +######################################################################## +# +# Google Mock's own tests. +# +# You can skip this section if you aren't interested in testing +# Google Mock itself. +# +# The tests are not built by default. To build them, set the +# gmock_build_tests option to ON. You can do it by running ccmake +# or specifying the -Dgmock_build_tests=ON flag when running cmake. + +if (gmock_build_tests) + # This must be set in the root directory for the tests to be run by + # 'make test' or ctest. + enable_testing() + + if (MINGW OR CYGWIN) + if (CMAKE_VERSION VERSION_LESS "2.8.12") + add_compile_options("-Wa,-mbig-obj") + else() + add_definitions("-Wa,-mbig-obj") + endif() + endif() + + ############################################################ + # C++ tests built with standard compiler flags. + + cxx_test(gmock-actions_test gmock_main) + cxx_test(gmock-cardinalities_test gmock_main) + cxx_test(gmock_ex_test gmock_main) + cxx_test(gmock-function-mocker_test gmock_main) + cxx_test(gmock-internal-utils_test gmock_main) + cxx_test(gmock-matchers_test gmock_main) + cxx_test(gmock-more-actions_test gmock_main) + cxx_test(gmock-nice-strict_test gmock_main) + cxx_test(gmock-port_test gmock_main) + cxx_test(gmock-spec-builders_test gmock_main) + cxx_test(gmock_link_test gmock_main test/gmock_link2_test.cc) + cxx_test(gmock_test gmock_main) + + if (DEFINED GTEST_HAS_PTHREAD) + cxx_test(gmock_stress_test gmock) + endif() + + # gmock_all_test is commented to save time building and running tests. + # Uncomment if necessary. + # cxx_test(gmock_all_test gmock_main) + + ############################################################ + # C++ tests built with non-standard compiler flags. + + if (MSVC) + cxx_library(gmock_main_no_exception "${cxx_no_exception}" + "${gtest_dir}/src/gtest-all.cc" src/gmock-all.cc src/gmock_main.cc) + + cxx_library(gmock_main_no_rtti "${cxx_no_rtti}" + "${gtest_dir}/src/gtest-all.cc" src/gmock-all.cc src/gmock_main.cc) + + else() + cxx_library(gmock_main_no_exception "${cxx_no_exception}" src/gmock_main.cc) + target_link_libraries(gmock_main_no_exception PUBLIC gmock) + + cxx_library(gmock_main_no_rtti "${cxx_no_rtti}" src/gmock_main.cc) + target_link_libraries(gmock_main_no_rtti PUBLIC gmock) + endif() + cxx_test_with_flags(gmock-more-actions_no_exception_test "${cxx_no_exception}" + gmock_main_no_exception test/gmock-more-actions_test.cc) + + cxx_test_with_flags(gmock_no_rtti_test "${cxx_no_rtti}" + gmock_main_no_rtti test/gmock-spec-builders_test.cc) + + cxx_shared_library(shared_gmock_main "${cxx_default}" + "${gtest_dir}/src/gtest-all.cc" src/gmock-all.cc src/gmock_main.cc) + + # Tests that a binary can be built with Google Mock as a shared library. On + # some system configurations, it may not possible to run the binary without + # knowing more details about the system configurations. We do not try to run + # this binary. To get a more robust shared library coverage, configure with + # -DBUILD_SHARED_LIBS=ON. + cxx_executable_with_flags(shared_gmock_test_ "${cxx_default}" + shared_gmock_main test/gmock-spec-builders_test.cc) + set_target_properties(shared_gmock_test_ + PROPERTIES + COMPILE_DEFINITIONS "GTEST_LINKED_AS_SHARED_LIBRARY=1") + + ############################################################ + # Python tests. + + cxx_executable(gmock_leak_test_ test gmock_main) + py_test(gmock_leak_test) + + cxx_executable(gmock_output_test_ test gmock) + py_test(gmock_output_test) +endif() diff --git a/graphics/asymptote/LspCpp/third_party/uri/deps/googlemock/README.md b/graphics/asymptote/LspCpp/third_party/uri/deps/googlemock/README.md new file mode 100644 index 0000000000..7da60655db --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/uri/deps/googlemock/README.md @@ -0,0 +1,40 @@ +# Googletest Mocking (gMock) Framework + +### Overview + +Google's framework for writing and using C++ mock classes. It can help you +derive better designs of your system and write better tests. + +It is inspired by: + +* [jMock](http://www.jmock.org/) +* [EasyMock](http://www.easymock.org/) +* [Hamcrest](http://code.google.com/p/hamcrest/) + +It is designed with C++'s specifics in mind. + +gMock: + +- Provides a declarative syntax for defining mocks. +- Can define partial (hybrid) mocks, which are a cross of real and mock + objects. +- Handles functions of arbitrary types and overloaded functions. +- Comes with a rich set of matchers for validating function arguments. +- Uses an intuitive syntax for controlling the behavior of a mock. +- Does automatic verification of expectations (no record-and-replay needed). +- Allows arbitrary (partial) ordering constraints on function calls to be + expressed. +- Lets a user extend it by defining new matchers and actions. +- Does not use exceptions. +- Is easy to learn and use. + +Details and examples can be found here: + +* [gMock for Dummies](https://google.github.io/googletest/gmock_for_dummies.html) +* [Legacy gMock FAQ](https://google.github.io/googletest/gmock_faq.html) +* [gMock Cookbook](https://google.github.io/googletest/gmock_cook_book.html) +* [gMock Cheat Sheet](https://google.github.io/googletest/gmock_cheat_sheet.html) + +GoogleMock is a part of +[GoogleTest C++ testing framework](http://github.com/google/googletest/) and a +subject to the same requirements. diff --git a/graphics/asymptote/LspCpp/third_party/uri/deps/googlemock/cmake/gmock.pc.in b/graphics/asymptote/LspCpp/third_party/uri/deps/googlemock/cmake/gmock.pc.in new file mode 100644 index 0000000000..23c67b5c88 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/uri/deps/googlemock/cmake/gmock.pc.in @@ -0,0 +1,10 @@ +libdir=@CMAKE_INSTALL_FULL_LIBDIR@ +includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@ + +Name: gmock +Description: GoogleMock (without main() function) +Version: @PROJECT_VERSION@ +URL: https://github.com/google/googletest +Requires: gtest = @PROJECT_VERSION@ +Libs: -L${libdir} -lgmock @CMAKE_THREAD_LIBS_INIT@ +Cflags: -I${includedir} @GTEST_HAS_PTHREAD_MACRO@ diff --git a/graphics/asymptote/LspCpp/third_party/uri/deps/googlemock/cmake/gmock_main.pc.in b/graphics/asymptote/LspCpp/third_party/uri/deps/googlemock/cmake/gmock_main.pc.in new file mode 100644 index 0000000000..66ffea7f44 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/uri/deps/googlemock/cmake/gmock_main.pc.in @@ -0,0 +1,10 @@ +libdir=@CMAKE_INSTALL_FULL_LIBDIR@ +includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@ + +Name: gmock_main +Description: GoogleMock (with main() function) +Version: @PROJECT_VERSION@ +URL: https://github.com/google/googletest +Requires: gmock = @PROJECT_VERSION@ +Libs: -L${libdir} -lgmock_main @CMAKE_THREAD_LIBS_INIT@ +Cflags: -I${includedir} @GTEST_HAS_PTHREAD_MACRO@ diff --git a/graphics/asymptote/LspCpp/third_party/uri/deps/googlemock/docs/README.md b/graphics/asymptote/LspCpp/third_party/uri/deps/googlemock/docs/README.md new file mode 100644 index 0000000000..1bc57b799c --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/uri/deps/googlemock/docs/README.md @@ -0,0 +1,4 @@ +# Content Moved + +We are working on updates to the GoogleTest documentation, which has moved to +the top-level [docs](../../docs) directory. diff --git a/graphics/asymptote/LspCpp/third_party/uri/deps/googlemock/include/gmock/gmock-actions.h b/graphics/asymptote/LspCpp/third_party/uri/deps/googlemock/include/gmock/gmock-actions.h new file mode 100644 index 0000000000..72663c8583 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/uri/deps/googlemock/include/gmock/gmock-actions.h @@ -0,0 +1,1687 @@ +// Copyright 2007, Google Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// Google Mock - a framework for writing C++ mock classes. +// +// The ACTION* family of macros can be used in a namespace scope to +// define custom actions easily. The syntax: +// +// ACTION(name) { statements; } +// +// will define an action with the given name that executes the +// statements. The value returned by the statements will be used as +// the return value of the action. Inside the statements, you can +// refer to the K-th (0-based) argument of the mock function by +// 'argK', and refer to its type by 'argK_type'. For example: +// +// ACTION(IncrementArg1) { +// arg1_type temp = arg1; +// return ++(*temp); +// } +// +// allows you to write +// +// ...WillOnce(IncrementArg1()); +// +// You can also refer to the entire argument tuple and its type by +// 'args' and 'args_type', and refer to the mock function type and its +// return type by 'function_type' and 'return_type'. +// +// Note that you don't need to specify the types of the mock function +// arguments. However rest assured that your code is still type-safe: +// you'll get a compiler error if *arg1 doesn't support the ++ +// operator, or if the type of ++(*arg1) isn't compatible with the +// mock function's return type, for example. +// +// Sometimes you'll want to parameterize the action. For that you can use +// another macro: +// +// ACTION_P(name, param_name) { statements; } +// +// For example: +// +// ACTION_P(Add, n) { return arg0 + n; } +// +// will allow you to write: +// +// ...WillOnce(Add(5)); +// +// Note that you don't need to provide the type of the parameter +// either. If you need to reference the type of a parameter named +// 'foo', you can write 'foo_type'. For example, in the body of +// ACTION_P(Add, n) above, you can write 'n_type' to refer to the type +// of 'n'. +// +// We also provide ACTION_P2, ACTION_P3, ..., up to ACTION_P10 to support +// multi-parameter actions. +// +// For the purpose of typing, you can view +// +// ACTION_Pk(Foo, p1, ..., pk) { ... } +// +// as shorthand for +// +// template +// FooActionPk Foo(p1_type p1, ..., pk_type pk) { ... } +// +// In particular, you can provide the template type arguments +// explicitly when invoking Foo(), as in Foo(5, false); +// although usually you can rely on the compiler to infer the types +// for you automatically. You can assign the result of expression +// Foo(p1, ..., pk) to a variable of type FooActionPk. This can be useful when composing actions. +// +// You can also overload actions with different numbers of parameters: +// +// ACTION_P(Plus, a) { ... } +// ACTION_P2(Plus, a, b) { ... } +// +// While it's tempting to always use the ACTION* macros when defining +// a new action, you should also consider implementing ActionInterface +// or using MakePolymorphicAction() instead, especially if you need to +// use the action a lot. While these approaches require more work, +// they give you more control on the types of the mock function +// arguments and the action parameters, which in general leads to +// better compiler error messages that pay off in the long run. They +// also allow overloading actions based on parameter types (as opposed +// to just based on the number of parameters). +// +// CAVEAT: +// +// ACTION*() can only be used in a namespace scope as templates cannot be +// declared inside of a local class. +// Users can, however, define any local functors (e.g. a lambda) that +// can be used as actions. +// +// MORE INFORMATION: +// +// To learn more about using these macros, please search for 'ACTION' on +// https://github.com/google/googletest/blob/master/docs/gmock_cook_book.md + +// IWYU pragma: private, include "gmock/gmock.h" +// IWYU pragma: friend gmock/.* + +#ifndef GOOGLEMOCK_INCLUDE_GMOCK_GMOCK_ACTIONS_H_ +#define GOOGLEMOCK_INCLUDE_GMOCK_GMOCK_ACTIONS_H_ + +#ifndef _WIN32_WCE +# include +#endif + +#include +#include +#include +#include +#include +#include +#include + +#include "gmock/internal/gmock-internal-utils.h" +#include "gmock/internal/gmock-port.h" +#include "gmock/internal/gmock-pp.h" + +#ifdef _MSC_VER +# pragma warning(push) +# pragma warning(disable:4100) +#endif + +namespace testing { + +// To implement an action Foo, define: +// 1. a class FooAction that implements the ActionInterface interface, and +// 2. a factory function that creates an Action object from a +// const FooAction*. +// +// The two-level delegation design follows that of Matcher, providing +// consistency for extension developers. It also eases ownership +// management as Action objects can now be copied like plain values. + +namespace internal { + +// BuiltInDefaultValueGetter::Get() returns a +// default-constructed T value. BuiltInDefaultValueGetter::Get() crashes with an error. +// +// This primary template is used when kDefaultConstructible is true. +template +struct BuiltInDefaultValueGetter { + static T Get() { return T(); } +}; +template +struct BuiltInDefaultValueGetter { + static T Get() { + Assert(false, __FILE__, __LINE__, + "Default action undefined for the function return type."); + return internal::Invalid(); + // The above statement will never be reached, but is required in + // order for this function to compile. + } +}; + +// BuiltInDefaultValue::Get() returns the "built-in" default value +// for type T, which is NULL when T is a raw pointer type, 0 when T is +// a numeric type, false when T is bool, or "" when T is string or +// std::string. In addition, in C++11 and above, it turns a +// default-constructed T value if T is default constructible. For any +// other type T, the built-in default T value is undefined, and the +// function will abort the process. +template +class BuiltInDefaultValue { + public: + // This function returns true if and only if type T has a built-in default + // value. + static bool Exists() { + return ::std::is_default_constructible::value; + } + + static T Get() { + return BuiltInDefaultValueGetter< + T, ::std::is_default_constructible::value>::Get(); + } +}; + +// This partial specialization says that we use the same built-in +// default value for T and const T. +template +class BuiltInDefaultValue { + public: + static bool Exists() { return BuiltInDefaultValue::Exists(); } + static T Get() { return BuiltInDefaultValue::Get(); } +}; + +// This partial specialization defines the default values for pointer +// types. +template +class BuiltInDefaultValue { + public: + static bool Exists() { return true; } + static T* Get() { return nullptr; } +}; + +// The following specializations define the default values for +// specific types we care about. +#define GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(type, value) \ + template <> \ + class BuiltInDefaultValue { \ + public: \ + static bool Exists() { return true; } \ + static type Get() { return value; } \ + } + +GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(void, ); // NOLINT +GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(::std::string, ""); +GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(bool, false); +GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(unsigned char, '\0'); +GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(signed char, '\0'); +GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(char, '\0'); + +// There's no need for a default action for signed wchar_t, as that +// type is the same as wchar_t for gcc, and invalid for MSVC. +// +// There's also no need for a default action for unsigned wchar_t, as +// that type is the same as unsigned int for gcc, and invalid for +// MSVC. +#if GMOCK_WCHAR_T_IS_NATIVE_ +GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(wchar_t, 0U); // NOLINT +#endif + +GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(unsigned short, 0U); // NOLINT +GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(signed short, 0); // NOLINT +GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(unsigned int, 0U); +GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(signed int, 0); +GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(unsigned long, 0UL); // NOLINT +GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(signed long, 0L); // NOLINT +GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(unsigned long long, 0); // NOLINT +GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(signed long long, 0); // NOLINT +GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(float, 0); +GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(double, 0); + +#undef GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_ + +// Simple two-arg form of std::disjunction. +template +using disjunction = typename ::std::conditional::type; + +} // namespace internal + +// When an unexpected function call is encountered, Google Mock will +// let it return a default value if the user has specified one for its +// return type, or if the return type has a built-in default value; +// otherwise Google Mock won't know what value to return and will have +// to abort the process. +// +// The DefaultValue class allows a user to specify the +// default value for a type T that is both copyable and publicly +// destructible (i.e. anything that can be used as a function return +// type). The usage is: +// +// // Sets the default value for type T to be foo. +// DefaultValue::Set(foo); +template +class DefaultValue { + public: + // Sets the default value for type T; requires T to be + // copy-constructable and have a public destructor. + static void Set(T x) { + delete producer_; + producer_ = new FixedValueProducer(x); + } + + // Provides a factory function to be called to generate the default value. + // This method can be used even if T is only move-constructible, but it is not + // limited to that case. + typedef T (*FactoryFunction)(); + static void SetFactory(FactoryFunction factory) { + delete producer_; + producer_ = new FactoryValueProducer(factory); + } + + // Unsets the default value for type T. + static void Clear() { + delete producer_; + producer_ = nullptr; + } + + // Returns true if and only if the user has set the default value for type T. + static bool IsSet() { return producer_ != nullptr; } + + // Returns true if T has a default return value set by the user or there + // exists a built-in default value. + static bool Exists() { + return IsSet() || internal::BuiltInDefaultValue::Exists(); + } + + // Returns the default value for type T if the user has set one; + // otherwise returns the built-in default value. Requires that Exists() + // is true, which ensures that the return value is well-defined. + static T Get() { + return producer_ == nullptr ? internal::BuiltInDefaultValue::Get() + : producer_->Produce(); + } + + private: + class ValueProducer { + public: + virtual ~ValueProducer() {} + virtual T Produce() = 0; + }; + + class FixedValueProducer : public ValueProducer { + public: + explicit FixedValueProducer(T value) : value_(value) {} + T Produce() override { return value_; } + + private: + const T value_; + GTEST_DISALLOW_COPY_AND_ASSIGN_(FixedValueProducer); + }; + + class FactoryValueProducer : public ValueProducer { + public: + explicit FactoryValueProducer(FactoryFunction factory) + : factory_(factory) {} + T Produce() override { return factory_(); } + + private: + const FactoryFunction factory_; + GTEST_DISALLOW_COPY_AND_ASSIGN_(FactoryValueProducer); + }; + + static ValueProducer* producer_; +}; + +// This partial specialization allows a user to set default values for +// reference types. +template +class DefaultValue { + public: + // Sets the default value for type T&. + static void Set(T& x) { // NOLINT + address_ = &x; + } + + // Unsets the default value for type T&. + static void Clear() { address_ = nullptr; } + + // Returns true if and only if the user has set the default value for type T&. + static bool IsSet() { return address_ != nullptr; } + + // Returns true if T has a default return value set by the user or there + // exists a built-in default value. + static bool Exists() { + return IsSet() || internal::BuiltInDefaultValue::Exists(); + } + + // Returns the default value for type T& if the user has set one; + // otherwise returns the built-in default value if there is one; + // otherwise aborts the process. + static T& Get() { + return address_ == nullptr ? internal::BuiltInDefaultValue::Get() + : *address_; + } + + private: + static T* address_; +}; + +// This specialization allows DefaultValue::Get() to +// compile. +template <> +class DefaultValue { + public: + static bool Exists() { return true; } + static void Get() {} +}; + +// Points to the user-set default value for type T. +template +typename DefaultValue::ValueProducer* DefaultValue::producer_ = nullptr; + +// Points to the user-set default value for type T&. +template +T* DefaultValue::address_ = nullptr; + +// Implement this interface to define an action for function type F. +template +class ActionInterface { + public: + typedef typename internal::Function::Result Result; + typedef typename internal::Function::ArgumentTuple ArgumentTuple; + + ActionInterface() {} + virtual ~ActionInterface() {} + + // Performs the action. This method is not const, as in general an + // action can have side effects and be stateful. For example, a + // get-the-next-element-from-the-collection action will need to + // remember the current element. + virtual Result Perform(const ArgumentTuple& args) = 0; + + private: + GTEST_DISALLOW_COPY_AND_ASSIGN_(ActionInterface); +}; + +// An Action is a copyable and IMMUTABLE (except by assignment) +// object that represents an action to be taken when a mock function +// of type F is called. The implementation of Action is just a +// std::shared_ptr to const ActionInterface. Don't inherit from Action! +// You can view an object implementing ActionInterface as a +// concrete action (including its current state), and an Action +// object as a handle to it. +template +class Action { + // Adapter class to allow constructing Action from a legacy ActionInterface. + // New code should create Actions from functors instead. + struct ActionAdapter { + // Adapter must be copyable to satisfy std::function requirements. + ::std::shared_ptr> impl_; + + template + typename internal::Function::Result operator()(Args&&... args) { + return impl_->Perform( + ::std::forward_as_tuple(::std::forward(args)...)); + } + }; + + template + using IsCompatibleFunctor = std::is_constructible, G>; + + public: + typedef typename internal::Function::Result Result; + typedef typename internal::Function::ArgumentTuple ArgumentTuple; + + // Constructs a null Action. Needed for storing Action objects in + // STL containers. + Action() {} + + // Construct an Action from a specified callable. + // This cannot take std::function directly, because then Action would not be + // directly constructible from lambda (it would require two conversions). + template < + typename G, + typename = typename std::enable_if, std::is_constructible, + G>>::value>::type> + Action(G&& fun) { // NOLINT + Init(::std::forward(fun), IsCompatibleFunctor()); + } + + // Constructs an Action from its implementation. + explicit Action(ActionInterface* impl) + : fun_(ActionAdapter{::std::shared_ptr>(impl)}) {} + + // This constructor allows us to turn an Action object into an + // Action, as long as F's arguments can be implicitly converted + // to Func's and Func's return type can be implicitly converted to F's. + template + explicit Action(const Action& action) : fun_(action.fun_) {} + + // Returns true if and only if this is the DoDefault() action. + bool IsDoDefault() const { return fun_ == nullptr; } + + // Performs the action. Note that this method is const even though + // the corresponding method in ActionInterface is not. The reason + // is that a const Action means that it cannot be re-bound to + // another concrete action, not that the concrete action it binds to + // cannot change state. (Think of the difference between a const + // pointer and a pointer to const.) + Result Perform(ArgumentTuple args) const { + if (IsDoDefault()) { + internal::IllegalDoDefault(__FILE__, __LINE__); + } + return internal::Apply(fun_, ::std::move(args)); + } + + private: + template + friend class Action; + + template + void Init(G&& g, ::std::true_type) { + fun_ = ::std::forward(g); + } + + template + void Init(G&& g, ::std::false_type) { + fun_ = IgnoreArgs::type>{::std::forward(g)}; + } + + template + struct IgnoreArgs { + template + Result operator()(const Args&...) const { + return function_impl(); + } + + FunctionImpl function_impl; + }; + + // fun_ is an empty function if and only if this is the DoDefault() action. + ::std::function fun_; +}; + +// The PolymorphicAction class template makes it easy to implement a +// polymorphic action (i.e. an action that can be used in mock +// functions of than one type, e.g. Return()). +// +// To define a polymorphic action, a user first provides a COPYABLE +// implementation class that has a Perform() method template: +// +// class FooAction { +// public: +// template +// Result Perform(const ArgumentTuple& args) const { +// // Processes the arguments and returns a result, using +// // std::get(args) to get the N-th (0-based) argument in the tuple. +// } +// ... +// }; +// +// Then the user creates the polymorphic action using +// MakePolymorphicAction(object) where object has type FooAction. See +// the definition of Return(void) and SetArgumentPointee(value) for +// complete examples. +template +class PolymorphicAction { + public: + explicit PolymorphicAction(const Impl& impl) : impl_(impl) {} + + template + operator Action() const { + return Action(new MonomorphicImpl(impl_)); + } + + private: + template + class MonomorphicImpl : public ActionInterface { + public: + typedef typename internal::Function::Result Result; + typedef typename internal::Function::ArgumentTuple ArgumentTuple; + + explicit MonomorphicImpl(const Impl& impl) : impl_(impl) {} + + Result Perform(const ArgumentTuple& args) override { + return impl_.template Perform(args); + } + + private: + Impl impl_; + }; + + Impl impl_; +}; + +// Creates an Action from its implementation and returns it. The +// created Action object owns the implementation. +template +Action MakeAction(ActionInterface* impl) { + return Action(impl); +} + +// Creates a polymorphic action from its implementation. This is +// easier to use than the PolymorphicAction constructor as it +// doesn't require you to explicitly write the template argument, e.g. +// +// MakePolymorphicAction(foo); +// vs +// PolymorphicAction(foo); +template +inline PolymorphicAction MakePolymorphicAction(const Impl& impl) { + return PolymorphicAction(impl); +} + +namespace internal { + +// Helper struct to specialize ReturnAction to execute a move instead of a copy +// on return. Useful for move-only types, but could be used on any type. +template +struct ByMoveWrapper { + explicit ByMoveWrapper(T value) : payload(std::move(value)) {} + T payload; +}; + +// Implements the polymorphic Return(x) action, which can be used in +// any function that returns the type of x, regardless of the argument +// types. +// +// Note: The value passed into Return must be converted into +// Function::Result when this action is cast to Action rather than +// when that action is performed. This is important in scenarios like +// +// MOCK_METHOD1(Method, T(U)); +// ... +// { +// Foo foo; +// X x(&foo); +// EXPECT_CALL(mock, Method(_)).WillOnce(Return(x)); +// } +// +// In the example above the variable x holds reference to foo which leaves +// scope and gets destroyed. If copying X just copies a reference to foo, +// that copy will be left with a hanging reference. If conversion to T +// makes a copy of foo, the above code is safe. To support that scenario, we +// need to make sure that the type conversion happens inside the EXPECT_CALL +// statement, and conversion of the result of Return to Action is a +// good place for that. +// +// The real life example of the above scenario happens when an invocation +// of gtl::Container() is passed into Return. +// +template +class ReturnAction { + public: + // Constructs a ReturnAction object from the value to be returned. + // 'value' is passed by value instead of by const reference in order + // to allow Return("string literal") to compile. + explicit ReturnAction(R value) : value_(new R(std::move(value))) {} + + // This template type conversion operator allows Return(x) to be + // used in ANY function that returns x's type. + template + operator Action() const { // NOLINT + // Assert statement belongs here because this is the best place to verify + // conditions on F. It produces the clearest error messages + // in most compilers. + // Impl really belongs in this scope as a local class but can't + // because MSVC produces duplicate symbols in different translation units + // in this case. Until MS fixes that bug we put Impl into the class scope + // and put the typedef both here (for use in assert statement) and + // in the Impl class. But both definitions must be the same. + typedef typename Function::Result Result; + GTEST_COMPILE_ASSERT_( + !std::is_reference::value, + use_ReturnRef_instead_of_Return_to_return_a_reference); + static_assert(!std::is_void::value, + "Can't use Return() on an action expected to return `void`."); + return Action(new Impl(value_)); + } + + private: + // Implements the Return(x) action for a particular function type F. + template + class Impl : public ActionInterface { + public: + typedef typename Function::Result Result; + typedef typename Function::ArgumentTuple ArgumentTuple; + + // The implicit cast is necessary when Result has more than one + // single-argument constructor (e.g. Result is std::vector) and R + // has a type conversion operator template. In that case, value_(value) + // won't compile as the compiler doesn't known which constructor of + // Result to call. ImplicitCast_ forces the compiler to convert R to + // Result without considering explicit constructors, thus resolving the + // ambiguity. value_ is then initialized using its copy constructor. + explicit Impl(const std::shared_ptr& value) + : value_before_cast_(*value), + value_(ImplicitCast_(value_before_cast_)) {} + + Result Perform(const ArgumentTuple&) override { return value_; } + + private: + GTEST_COMPILE_ASSERT_(!std::is_reference::value, + Result_cannot_be_a_reference_type); + // We save the value before casting just in case it is being cast to a + // wrapper type. + R value_before_cast_; + Result value_; + + GTEST_DISALLOW_COPY_AND_ASSIGN_(Impl); + }; + + // Partially specialize for ByMoveWrapper. This version of ReturnAction will + // move its contents instead. + template + class Impl, F> : public ActionInterface { + public: + typedef typename Function::Result Result; + typedef typename Function::ArgumentTuple ArgumentTuple; + + explicit Impl(const std::shared_ptr& wrapper) + : performed_(false), wrapper_(wrapper) {} + + Result Perform(const ArgumentTuple&) override { + GTEST_CHECK_(!performed_) + << "A ByMove() action should only be performed once."; + performed_ = true; + return std::move(wrapper_->payload); + } + + private: + bool performed_; + const std::shared_ptr wrapper_; + }; + + const std::shared_ptr value_; +}; + +// Implements the ReturnNull() action. +class ReturnNullAction { + public: + // Allows ReturnNull() to be used in any pointer-returning function. In C++11 + // this is enforced by returning nullptr, and in non-C++11 by asserting a + // pointer type on compile time. + template + static Result Perform(const ArgumentTuple&) { + return nullptr; + } +}; + +// Implements the Return() action. +class ReturnVoidAction { + public: + // Allows Return() to be used in any void-returning function. + template + static void Perform(const ArgumentTuple&) { + static_assert(std::is_void::value, "Result should be void."); + } +}; + +// Implements the polymorphic ReturnRef(x) action, which can be used +// in any function that returns a reference to the type of x, +// regardless of the argument types. +template +class ReturnRefAction { + public: + // Constructs a ReturnRefAction object from the reference to be returned. + explicit ReturnRefAction(T& ref) : ref_(ref) {} // NOLINT + + // This template type conversion operator allows ReturnRef(x) to be + // used in ANY function that returns a reference to x's type. + template + operator Action() const { + typedef typename Function::Result Result; + // Asserts that the function return type is a reference. This + // catches the user error of using ReturnRef(x) when Return(x) + // should be used, and generates some helpful error message. + GTEST_COMPILE_ASSERT_(std::is_reference::value, + use_Return_instead_of_ReturnRef_to_return_a_value); + return Action(new Impl(ref_)); + } + + private: + // Implements the ReturnRef(x) action for a particular function type F. + template + class Impl : public ActionInterface { + public: + typedef typename Function::Result Result; + typedef typename Function::ArgumentTuple ArgumentTuple; + + explicit Impl(T& ref) : ref_(ref) {} // NOLINT + + Result Perform(const ArgumentTuple&) override { return ref_; } + + private: + T& ref_; + }; + + T& ref_; +}; + +// Implements the polymorphic ReturnRefOfCopy(x) action, which can be +// used in any function that returns a reference to the type of x, +// regardless of the argument types. +template +class ReturnRefOfCopyAction { + public: + // Constructs a ReturnRefOfCopyAction object from the reference to + // be returned. + explicit ReturnRefOfCopyAction(const T& value) : value_(value) {} // NOLINT + + // This template type conversion operator allows ReturnRefOfCopy(x) to be + // used in ANY function that returns a reference to x's type. + template + operator Action() const { + typedef typename Function::Result Result; + // Asserts that the function return type is a reference. This + // catches the user error of using ReturnRefOfCopy(x) when Return(x) + // should be used, and generates some helpful error message. + GTEST_COMPILE_ASSERT_( + std::is_reference::value, + use_Return_instead_of_ReturnRefOfCopy_to_return_a_value); + return Action(new Impl(value_)); + } + + private: + // Implements the ReturnRefOfCopy(x) action for a particular function type F. + template + class Impl : public ActionInterface { + public: + typedef typename Function::Result Result; + typedef typename Function::ArgumentTuple ArgumentTuple; + + explicit Impl(const T& value) : value_(value) {} // NOLINT + + Result Perform(const ArgumentTuple&) override { return value_; } + + private: + T value_; + }; + + const T value_; +}; + +// Implements the polymorphic ReturnRoundRobin(v) action, which can be +// used in any function that returns the element_type of v. +template +class ReturnRoundRobinAction { + public: + explicit ReturnRoundRobinAction(std::vector values) { + GTEST_CHECK_(!values.empty()) + << "ReturnRoundRobin requires at least one element."; + state_->values = std::move(values); + } + + template + T operator()(Args&&...) const { + return state_->Next(); + } + + private: + struct State { + T Next() { + T ret_val = values[i++]; + if (i == values.size()) i = 0; + return ret_val; + } + + std::vector values; + size_t i = 0; + }; + std::shared_ptr state_ = std::make_shared(); +}; + +// Implements the polymorphic DoDefault() action. +class DoDefaultAction { + public: + // This template type conversion operator allows DoDefault() to be + // used in any function. + template + operator Action() const { return Action(); } // NOLINT +}; + +// Implements the Assign action to set a given pointer referent to a +// particular value. +template +class AssignAction { + public: + AssignAction(T1* ptr, T2 value) : ptr_(ptr), value_(value) {} + + template + void Perform(const ArgumentTuple& /* args */) const { + *ptr_ = value_; + } + + private: + T1* const ptr_; + const T2 value_; +}; + +#if !GTEST_OS_WINDOWS_MOBILE + +// Implements the SetErrnoAndReturn action to simulate return from +// various system calls and libc functions. +template +class SetErrnoAndReturnAction { + public: + SetErrnoAndReturnAction(int errno_value, T result) + : errno_(errno_value), + result_(result) {} + template + Result Perform(const ArgumentTuple& /* args */) const { + errno = errno_; + return result_; + } + + private: + const int errno_; + const T result_; +}; + +#endif // !GTEST_OS_WINDOWS_MOBILE + +// Implements the SetArgumentPointee(x) action for any function +// whose N-th argument (0-based) is a pointer to x's type. +template +struct SetArgumentPointeeAction { + A value; + + template + void operator()(const Args&... args) const { + *::std::get(std::tie(args...)) = value; + } +}; + +// Implements the Invoke(object_ptr, &Class::Method) action. +template +struct InvokeMethodAction { + Class* const obj_ptr; + const MethodPtr method_ptr; + + template + auto operator()(Args&&... args) const + -> decltype((obj_ptr->*method_ptr)(std::forward(args)...)) { + return (obj_ptr->*method_ptr)(std::forward(args)...); + } +}; + +// Implements the InvokeWithoutArgs(f) action. The template argument +// FunctionImpl is the implementation type of f, which can be either a +// function pointer or a functor. InvokeWithoutArgs(f) can be used as an +// Action as long as f's type is compatible with F. +template +struct InvokeWithoutArgsAction { + FunctionImpl function_impl; + + // Allows InvokeWithoutArgs(f) to be used as any action whose type is + // compatible with f. + template + auto operator()(const Args&...) -> decltype(function_impl()) { + return function_impl(); + } +}; + +// Implements the InvokeWithoutArgs(object_ptr, &Class::Method) action. +template +struct InvokeMethodWithoutArgsAction { + Class* const obj_ptr; + const MethodPtr method_ptr; + + using ReturnType = + decltype((std::declval()->*std::declval())()); + + template + ReturnType operator()(const Args&...) const { + return (obj_ptr->*method_ptr)(); + } +}; + +// Implements the IgnoreResult(action) action. +template +class IgnoreResultAction { + public: + explicit IgnoreResultAction(const A& action) : action_(action) {} + + template + operator Action() const { + // Assert statement belongs here because this is the best place to verify + // conditions on F. It produces the clearest error messages + // in most compilers. + // Impl really belongs in this scope as a local class but can't + // because MSVC produces duplicate symbols in different translation units + // in this case. Until MS fixes that bug we put Impl into the class scope + // and put the typedef both here (for use in assert statement) and + // in the Impl class. But both definitions must be the same. + typedef typename internal::Function::Result Result; + + // Asserts at compile time that F returns void. + static_assert(std::is_void::value, "Result type should be void."); + + return Action(new Impl(action_)); + } + + private: + template + class Impl : public ActionInterface { + public: + typedef typename internal::Function::Result Result; + typedef typename internal::Function::ArgumentTuple ArgumentTuple; + + explicit Impl(const A& action) : action_(action) {} + + void Perform(const ArgumentTuple& args) override { + // Performs the action and ignores its result. + action_.Perform(args); + } + + private: + // Type OriginalFunction is the same as F except that its return + // type is IgnoredValue. + typedef typename internal::Function::MakeResultIgnoredValue + OriginalFunction; + + const Action action_; + }; + + const A action_; +}; + +template +struct WithArgsAction { + InnerAction action; + + // The inner action could be anything convertible to Action. + // We use the conversion operator to detect the signature of the inner Action. + template + operator Action() const { // NOLINT + using TupleType = std::tuple; + Action::type...)> + converted(action); + + return [converted](Args... args) -> R { + return converted.Perform(std::forward_as_tuple( + std::get(std::forward_as_tuple(std::forward(args)...))...)); + }; + } +}; + +template +struct DoAllAction { + private: + template + using NonFinalType = + typename std::conditional::value, T, const T&>::type; + + template + std::vector Convert(IndexSequence) const { + return {ActionT(std::get(actions))...}; + } + + public: + std::tuple actions; + + template + operator Action() const { // NOLINT + struct Op { + std::vector...)>> converted; + Action last; + R operator()(Args... args) const { + auto tuple_args = std::forward_as_tuple(std::forward(args)...); + for (auto& a : converted) { + a.Perform(tuple_args); + } + return last.Perform(std::move(tuple_args)); + } + }; + return Op{Convert...)>>( + MakeIndexSequence()), + std::get(actions)}; + } +}; + +template +struct ReturnNewAction { + T* operator()() const { + return internal::Apply( + [](const Params&... unpacked_params) { + return new T(unpacked_params...); + }, + params); + } + std::tuple params; +}; + +template +struct ReturnArgAction { + template + auto operator()(const Args&... args) const -> + typename std::tuple_element>::type { + return std::get(std::tie(args...)); + } +}; + +template +struct SaveArgAction { + Ptr pointer; + + template + void operator()(const Args&... args) const { + *pointer = std::get(std::tie(args...)); + } +}; + +template +struct SaveArgPointeeAction { + Ptr pointer; + + template + void operator()(const Args&... args) const { + *pointer = *std::get(std::tie(args...)); + } +}; + +template +struct SetArgRefereeAction { + T value; + + template + void operator()(Args&&... args) const { + using argk_type = + typename ::std::tuple_element>::type; + static_assert(std::is_lvalue_reference::value, + "Argument must be a reference type."); + std::get(std::tie(args...)) = value; + } +}; + +template +struct SetArrayArgumentAction { + I1 first; + I2 last; + + template + void operator()(const Args&... args) const { + auto value = std::get(std::tie(args...)); + for (auto it = first; it != last; ++it, (void)++value) { + *value = *it; + } + } +}; + +template +struct DeleteArgAction { + template + void operator()(const Args&... args) const { + delete std::get(std::tie(args...)); + } +}; + +template +struct ReturnPointeeAction { + Ptr pointer; + template + auto operator()(const Args&...) const -> decltype(*pointer) { + return *pointer; + } +}; + +#if GTEST_HAS_EXCEPTIONS +template +struct ThrowAction { + T exception; + // We use a conversion operator to adapt to any return type. + template + operator Action() const { // NOLINT + T copy = exception; + return [copy](Args...) -> R { throw copy; }; + } +}; +#endif // GTEST_HAS_EXCEPTIONS + +} // namespace internal + +// An Unused object can be implicitly constructed from ANY value. +// This is handy when defining actions that ignore some or all of the +// mock function arguments. For example, given +// +// MOCK_METHOD3(Foo, double(const string& label, double x, double y)); +// MOCK_METHOD3(Bar, double(int index, double x, double y)); +// +// instead of +// +// double DistanceToOriginWithLabel(const string& label, double x, double y) { +// return sqrt(x*x + y*y); +// } +// double DistanceToOriginWithIndex(int index, double x, double y) { +// return sqrt(x*x + y*y); +// } +// ... +// EXPECT_CALL(mock, Foo("abc", _, _)) +// .WillOnce(Invoke(DistanceToOriginWithLabel)); +// EXPECT_CALL(mock, Bar(5, _, _)) +// .WillOnce(Invoke(DistanceToOriginWithIndex)); +// +// you could write +// +// // We can declare any uninteresting argument as Unused. +// double DistanceToOrigin(Unused, double x, double y) { +// return sqrt(x*x + y*y); +// } +// ... +// EXPECT_CALL(mock, Foo("abc", _, _)).WillOnce(Invoke(DistanceToOrigin)); +// EXPECT_CALL(mock, Bar(5, _, _)).WillOnce(Invoke(DistanceToOrigin)); +typedef internal::IgnoredValue Unused; + +// Creates an action that does actions a1, a2, ..., sequentially in +// each invocation. All but the last action will have a readonly view of the +// arguments. +template +internal::DoAllAction::type...> DoAll( + Action&&... action) { + return {std::forward_as_tuple(std::forward(action)...)}; +} + +// WithArg(an_action) creates an action that passes the k-th +// (0-based) argument of the mock function to an_action and performs +// it. It adapts an action accepting one argument to one that accepts +// multiple arguments. For convenience, we also provide +// WithArgs(an_action) (defined below) as a synonym. +template +internal::WithArgsAction::type, k> +WithArg(InnerAction&& action) { + return {std::forward(action)}; +} + +// WithArgs(an_action) creates an action that passes +// the selected arguments of the mock function to an_action and +// performs it. It serves as an adaptor between actions with +// different argument lists. +template +internal::WithArgsAction::type, k, ks...> +WithArgs(InnerAction&& action) { + return {std::forward(action)}; +} + +// WithoutArgs(inner_action) can be used in a mock function with a +// non-empty argument list to perform inner_action, which takes no +// argument. In other words, it adapts an action accepting no +// argument to one that accepts (and ignores) arguments. +template +internal::WithArgsAction::type> +WithoutArgs(InnerAction&& action) { + return {std::forward(action)}; +} + +// Creates an action that returns 'value'. 'value' is passed by value +// instead of const reference - otherwise Return("string literal") +// will trigger a compiler error about using array as initializer. +template +internal::ReturnAction Return(R value) { + return internal::ReturnAction(std::move(value)); +} + +// Creates an action that returns NULL. +inline PolymorphicAction ReturnNull() { + return MakePolymorphicAction(internal::ReturnNullAction()); +} + +// Creates an action that returns from a void function. +inline PolymorphicAction Return() { + return MakePolymorphicAction(internal::ReturnVoidAction()); +} + +// Creates an action that returns the reference to a variable. +template +inline internal::ReturnRefAction ReturnRef(R& x) { // NOLINT + return internal::ReturnRefAction(x); +} + +// Prevent using ReturnRef on reference to temporary. +template +internal::ReturnRefAction ReturnRef(R&&) = delete; + +// Creates an action that returns the reference to a copy of the +// argument. The copy is created when the action is constructed and +// lives as long as the action. +template +inline internal::ReturnRefOfCopyAction ReturnRefOfCopy(const R& x) { + return internal::ReturnRefOfCopyAction(x); +} + +// Modifies the parent action (a Return() action) to perform a move of the +// argument instead of a copy. +// Return(ByMove()) actions can only be executed once and will assert this +// invariant. +template +internal::ByMoveWrapper ByMove(R x) { + return internal::ByMoveWrapper(std::move(x)); +} + +// Creates an action that returns an element of `vals`. Calling this action will +// repeatedly return the next value from `vals` until it reaches the end and +// will restart from the beginning. +template +internal::ReturnRoundRobinAction ReturnRoundRobin(std::vector vals) { + return internal::ReturnRoundRobinAction(std::move(vals)); +} + +// Creates an action that returns an element of `vals`. Calling this action will +// repeatedly return the next value from `vals` until it reaches the end and +// will restart from the beginning. +template +internal::ReturnRoundRobinAction ReturnRoundRobin( + std::initializer_list vals) { + return internal::ReturnRoundRobinAction(std::vector(vals)); +} + +// Creates an action that does the default action for the give mock function. +inline internal::DoDefaultAction DoDefault() { + return internal::DoDefaultAction(); +} + +// Creates an action that sets the variable pointed by the N-th +// (0-based) function argument to 'value'. +template +internal::SetArgumentPointeeAction SetArgPointee(T value) { + return {std::move(value)}; +} + +// The following version is DEPRECATED. +template +internal::SetArgumentPointeeAction SetArgumentPointee(T value) { + return {std::move(value)}; +} + +// Creates an action that sets a pointer referent to a given value. +template +PolymorphicAction > Assign(T1* ptr, T2 val) { + return MakePolymorphicAction(internal::AssignAction(ptr, val)); +} + +#if !GTEST_OS_WINDOWS_MOBILE + +// Creates an action that sets errno and returns the appropriate error. +template +PolymorphicAction > +SetErrnoAndReturn(int errval, T result) { + return MakePolymorphicAction( + internal::SetErrnoAndReturnAction(errval, result)); +} + +#endif // !GTEST_OS_WINDOWS_MOBILE + +// Various overloads for Invoke(). + +// Legacy function. +// Actions can now be implicitly constructed from callables. No need to create +// wrapper objects. +// This function exists for backwards compatibility. +template +typename std::decay::type Invoke(FunctionImpl&& function_impl) { + return std::forward(function_impl); +} + +// Creates an action that invokes the given method on the given object +// with the mock function's arguments. +template +internal::InvokeMethodAction Invoke(Class* obj_ptr, + MethodPtr method_ptr) { + return {obj_ptr, method_ptr}; +} + +// Creates an action that invokes 'function_impl' with no argument. +template +internal::InvokeWithoutArgsAction::type> +InvokeWithoutArgs(FunctionImpl function_impl) { + return {std::move(function_impl)}; +} + +// Creates an action that invokes the given method on the given object +// with no argument. +template +internal::InvokeMethodWithoutArgsAction InvokeWithoutArgs( + Class* obj_ptr, MethodPtr method_ptr) { + return {obj_ptr, method_ptr}; +} + +// Creates an action that performs an_action and throws away its +// result. In other words, it changes the return type of an_action to +// void. an_action MUST NOT return void, or the code won't compile. +template +inline internal::IgnoreResultAction IgnoreResult(const A& an_action) { + return internal::IgnoreResultAction(an_action); +} + +// Creates a reference wrapper for the given L-value. If necessary, +// you can explicitly specify the type of the reference. For example, +// suppose 'derived' is an object of type Derived, ByRef(derived) +// would wrap a Derived&. If you want to wrap a const Base& instead, +// where Base is a base class of Derived, just write: +// +// ByRef(derived) +// +// N.B. ByRef is redundant with std::ref, std::cref and std::reference_wrapper. +// However, it may still be used for consistency with ByMove(). +template +inline ::std::reference_wrapper ByRef(T& l_value) { // NOLINT + return ::std::reference_wrapper(l_value); +} + +// The ReturnNew(a1, a2, ..., a_k) action returns a pointer to a new +// instance of type T, constructed on the heap with constructor arguments +// a1, a2, ..., and a_k. The caller assumes ownership of the returned value. +template +internal::ReturnNewAction::type...> ReturnNew( + Params&&... params) { + return {std::forward_as_tuple(std::forward(params)...)}; +} + +// Action ReturnArg() returns the k-th argument of the mock function. +template +internal::ReturnArgAction ReturnArg() { + return {}; +} + +// Action SaveArg(pointer) saves the k-th (0-based) argument of the +// mock function to *pointer. +template +internal::SaveArgAction SaveArg(Ptr pointer) { + return {pointer}; +} + +// Action SaveArgPointee(pointer) saves the value pointed to +// by the k-th (0-based) argument of the mock function to *pointer. +template +internal::SaveArgPointeeAction SaveArgPointee(Ptr pointer) { + return {pointer}; +} + +// Action SetArgReferee(value) assigns 'value' to the variable +// referenced by the k-th (0-based) argument of the mock function. +template +internal::SetArgRefereeAction::type> SetArgReferee( + T&& value) { + return {std::forward(value)}; +} + +// Action SetArrayArgument(first, last) copies the elements in +// source range [first, last) to the array pointed to by the k-th +// (0-based) argument, which can be either a pointer or an +// iterator. The action does not take ownership of the elements in the +// source range. +template +internal::SetArrayArgumentAction SetArrayArgument(I1 first, + I2 last) { + return {first, last}; +} + +// Action DeleteArg() deletes the k-th (0-based) argument of the mock +// function. +template +internal::DeleteArgAction DeleteArg() { + return {}; +} + +// This action returns the value pointed to by 'pointer'. +template +internal::ReturnPointeeAction ReturnPointee(Ptr pointer) { + return {pointer}; +} + +// Action Throw(exception) can be used in a mock function of any type +// to throw the given exception. Any copyable value can be thrown. +#if GTEST_HAS_EXCEPTIONS +template +internal::ThrowAction::type> Throw(T&& exception) { + return {std::forward(exception)}; +} +#endif // GTEST_HAS_EXCEPTIONS + +namespace internal { + +// A macro from the ACTION* family (defined later in gmock-generated-actions.h) +// defines an action that can be used in a mock function. Typically, +// these actions only care about a subset of the arguments of the mock +// function. For example, if such an action only uses the second +// argument, it can be used in any mock function that takes >= 2 +// arguments where the type of the second argument is compatible. +// +// Therefore, the action implementation must be prepared to take more +// arguments than it needs. The ExcessiveArg type is used to +// represent those excessive arguments. In order to keep the compiler +// error messages tractable, we define it in the testing namespace +// instead of testing::internal. However, this is an INTERNAL TYPE +// and subject to change without notice, so a user MUST NOT USE THIS +// TYPE DIRECTLY. +struct ExcessiveArg {}; + +// Builds an implementation of an Action<> for some particular signature, using +// a class defined by an ACTION* macro. +template struct ActionImpl; + +template +struct ImplBase { + struct Holder { + // Allows each copy of the Action<> to get to the Impl. + explicit operator const Impl&() const { return *ptr; } + std::shared_ptr ptr; + }; + using type = typename std::conditional::value, + Impl, Holder>::type; +}; + +template +struct ActionImpl : ImplBase::type { + using Base = typename ImplBase::type; + using function_type = R(Args...); + using args_type = std::tuple; + + ActionImpl() = default; // Only defined if appropriate for Base. + explicit ActionImpl(std::shared_ptr impl) : Base{std::move(impl)} { } + + R operator()(Args&&... arg) const { + static constexpr size_t kMaxArgs = + sizeof...(Args) <= 10 ? sizeof...(Args) : 10; + return Apply(MakeIndexSequence{}, + MakeIndexSequence<10 - kMaxArgs>{}, + args_type{std::forward(arg)...}); + } + + template + R Apply(IndexSequence, IndexSequence, + const args_type& args) const { + // Impl need not be specific to the signature of action being implemented; + // only the implementing function body needs to have all of the specific + // types instantiated. Up to 10 of the args that are provided by the + // args_type get passed, followed by a dummy of unspecified type for the + // remainder up to 10 explicit args. + static constexpr ExcessiveArg kExcessArg{}; + return static_cast(*this).template gmock_PerformImpl< + /*function_type=*/function_type, /*return_type=*/R, + /*args_type=*/args_type, + /*argN_type=*/typename std::tuple_element::type...>( + /*args=*/args, std::get(args)..., + ((void)excess_id, kExcessArg)...); + } +}; + +// Stores a default-constructed Impl as part of the Action<>'s +// std::function<>. The Impl should be trivial to copy. +template +::testing::Action MakeAction() { + return ::testing::Action(ActionImpl()); +} + +// Stores just the one given instance of Impl. +template +::testing::Action MakeAction(std::shared_ptr impl) { + return ::testing::Action(ActionImpl(std::move(impl))); +} + +#define GMOCK_INTERNAL_ARG_UNUSED(i, data, el) \ + , const arg##i##_type& arg##i GTEST_ATTRIBUTE_UNUSED_ +#define GMOCK_ACTION_ARG_TYPES_AND_NAMES_UNUSED_ \ + const args_type& args GTEST_ATTRIBUTE_UNUSED_ GMOCK_PP_REPEAT( \ + GMOCK_INTERNAL_ARG_UNUSED, , 10) + +#define GMOCK_INTERNAL_ARG(i, data, el) , const arg##i##_type& arg##i +#define GMOCK_ACTION_ARG_TYPES_AND_NAMES_ \ + const args_type& args GMOCK_PP_REPEAT(GMOCK_INTERNAL_ARG, , 10) + +#define GMOCK_INTERNAL_TEMPLATE_ARG(i, data, el) , typename arg##i##_type +#define GMOCK_ACTION_TEMPLATE_ARGS_NAMES_ \ + GMOCK_PP_TAIL(GMOCK_PP_REPEAT(GMOCK_INTERNAL_TEMPLATE_ARG, , 10)) + +#define GMOCK_INTERNAL_TYPENAME_PARAM(i, data, param) , typename param##_type +#define GMOCK_ACTION_TYPENAME_PARAMS_(params) \ + GMOCK_PP_TAIL(GMOCK_PP_FOR_EACH(GMOCK_INTERNAL_TYPENAME_PARAM, , params)) + +#define GMOCK_INTERNAL_TYPE_PARAM(i, data, param) , param##_type +#define GMOCK_ACTION_TYPE_PARAMS_(params) \ + GMOCK_PP_TAIL(GMOCK_PP_FOR_EACH(GMOCK_INTERNAL_TYPE_PARAM, , params)) + +#define GMOCK_INTERNAL_TYPE_GVALUE_PARAM(i, data, param) \ + , param##_type gmock_p##i +#define GMOCK_ACTION_TYPE_GVALUE_PARAMS_(params) \ + GMOCK_PP_TAIL(GMOCK_PP_FOR_EACH(GMOCK_INTERNAL_TYPE_GVALUE_PARAM, , params)) + +#define GMOCK_INTERNAL_GVALUE_PARAM(i, data, param) \ + , std::forward(gmock_p##i) +#define GMOCK_ACTION_GVALUE_PARAMS_(params) \ + GMOCK_PP_TAIL(GMOCK_PP_FOR_EACH(GMOCK_INTERNAL_GVALUE_PARAM, , params)) + +#define GMOCK_INTERNAL_INIT_PARAM(i, data, param) \ + , param(::std::forward(gmock_p##i)) +#define GMOCK_ACTION_INIT_PARAMS_(params) \ + GMOCK_PP_TAIL(GMOCK_PP_FOR_EACH(GMOCK_INTERNAL_INIT_PARAM, , params)) + +#define GMOCK_INTERNAL_FIELD_PARAM(i, data, param) param##_type param; +#define GMOCK_ACTION_FIELD_PARAMS_(params) \ + GMOCK_PP_FOR_EACH(GMOCK_INTERNAL_FIELD_PARAM, , params) + +#define GMOCK_INTERNAL_ACTION(name, full_name, params) \ + template \ + class full_name { \ + public: \ + explicit full_name(GMOCK_ACTION_TYPE_GVALUE_PARAMS_(params)) \ + : impl_(std::make_shared( \ + GMOCK_ACTION_GVALUE_PARAMS_(params))) { } \ + full_name(const full_name&) = default; \ + full_name(full_name&&) noexcept = default; \ + template \ + operator ::testing::Action() const { \ + return ::testing::internal::MakeAction(impl_); \ + } \ + private: \ + class gmock_Impl { \ + public: \ + explicit gmock_Impl(GMOCK_ACTION_TYPE_GVALUE_PARAMS_(params)) \ + : GMOCK_ACTION_INIT_PARAMS_(params) {} \ + template \ + return_type gmock_PerformImpl(GMOCK_ACTION_ARG_TYPES_AND_NAMES_) const; \ + GMOCK_ACTION_FIELD_PARAMS_(params) \ + }; \ + std::shared_ptr impl_; \ + }; \ + template \ + inline full_name name( \ + GMOCK_ACTION_TYPE_GVALUE_PARAMS_(params)) { \ + return full_name( \ + GMOCK_ACTION_GVALUE_PARAMS_(params)); \ + } \ + template \ + template \ + return_type full_name::gmock_Impl:: \ + gmock_PerformImpl(GMOCK_ACTION_ARG_TYPES_AND_NAMES_UNUSED_) const + +} // namespace internal + +// Similar to GMOCK_INTERNAL_ACTION, but no bound parameters are stored. +#define ACTION(name) \ + class name##Action { \ + public: \ + explicit name##Action() noexcept {} \ + name##Action(const name##Action&) noexcept {} \ + template \ + operator ::testing::Action() const { \ + return ::testing::internal::MakeAction(); \ + } \ + private: \ + class gmock_Impl { \ + public: \ + template \ + return_type gmock_PerformImpl(GMOCK_ACTION_ARG_TYPES_AND_NAMES_) const; \ + }; \ + }; \ + inline name##Action name() GTEST_MUST_USE_RESULT_; \ + inline name##Action name() { return name##Action(); } \ + template \ + return_type name##Action::gmock_Impl::gmock_PerformImpl( \ + GMOCK_ACTION_ARG_TYPES_AND_NAMES_UNUSED_) const + +#define ACTION_P(name, ...) \ + GMOCK_INTERNAL_ACTION(name, name##ActionP, (__VA_ARGS__)) + +#define ACTION_P2(name, ...) \ + GMOCK_INTERNAL_ACTION(name, name##ActionP2, (__VA_ARGS__)) + +#define ACTION_P3(name, ...) \ + GMOCK_INTERNAL_ACTION(name, name##ActionP3, (__VA_ARGS__)) + +#define ACTION_P4(name, ...) \ + GMOCK_INTERNAL_ACTION(name, name##ActionP4, (__VA_ARGS__)) + +#define ACTION_P5(name, ...) \ + GMOCK_INTERNAL_ACTION(name, name##ActionP5, (__VA_ARGS__)) + +#define ACTION_P6(name, ...) \ + GMOCK_INTERNAL_ACTION(name, name##ActionP6, (__VA_ARGS__)) + +#define ACTION_P7(name, ...) \ + GMOCK_INTERNAL_ACTION(name, name##ActionP7, (__VA_ARGS__)) + +#define ACTION_P8(name, ...) \ + GMOCK_INTERNAL_ACTION(name, name##ActionP8, (__VA_ARGS__)) + +#define ACTION_P9(name, ...) \ + GMOCK_INTERNAL_ACTION(name, name##ActionP9, (__VA_ARGS__)) + +#define ACTION_P10(name, ...) \ + GMOCK_INTERNAL_ACTION(name, name##ActionP10, (__VA_ARGS__)) + +} // namespace testing + +#ifdef _MSC_VER +# pragma warning(pop) +#endif + +#endif // GOOGLEMOCK_INCLUDE_GMOCK_GMOCK_ACTIONS_H_ diff --git a/graphics/asymptote/LspCpp/third_party/uri/deps/googlemock/include/gmock/gmock-cardinalities.h b/graphics/asymptote/LspCpp/third_party/uri/deps/googlemock/include/gmock/gmock-cardinalities.h new file mode 100644 index 0000000000..48196dd2f4 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/uri/deps/googlemock/include/gmock/gmock-cardinalities.h @@ -0,0 +1,157 @@ +// Copyright 2007, Google Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// Google Mock - a framework for writing C++ mock classes. +// +// This file implements some commonly used cardinalities. More +// cardinalities can be defined by the user implementing the +// CardinalityInterface interface if necessary. + +// IWYU pragma: private, include "gmock/gmock.h" +// IWYU pragma: friend gmock/.* + +#ifndef GOOGLEMOCK_INCLUDE_GMOCK_GMOCK_CARDINALITIES_H_ +#define GOOGLEMOCK_INCLUDE_GMOCK_GMOCK_CARDINALITIES_H_ + +#include +#include +#include // NOLINT +#include "gmock/internal/gmock-port.h" +#include "gtest/gtest.h" + +GTEST_DISABLE_MSC_WARNINGS_PUSH_(4251 \ +/* class A needs to have dll-interface to be used by clients of class B */) + +namespace testing { + +// To implement a cardinality Foo, define: +// 1. a class FooCardinality that implements the +// CardinalityInterface interface, and +// 2. a factory function that creates a Cardinality object from a +// const FooCardinality*. +// +// The two-level delegation design follows that of Matcher, providing +// consistency for extension developers. It also eases ownership +// management as Cardinality objects can now be copied like plain values. + +// The implementation of a cardinality. +class CardinalityInterface { + public: + virtual ~CardinalityInterface() {} + + // Conservative estimate on the lower/upper bound of the number of + // calls allowed. + virtual int ConservativeLowerBound() const { return 0; } + virtual int ConservativeUpperBound() const { return INT_MAX; } + + // Returns true if and only if call_count calls will satisfy this + // cardinality. + virtual bool IsSatisfiedByCallCount(int call_count) const = 0; + + // Returns true if and only if call_count calls will saturate this + // cardinality. + virtual bool IsSaturatedByCallCount(int call_count) const = 0; + + // Describes self to an ostream. + virtual void DescribeTo(::std::ostream* os) const = 0; +}; + +// A Cardinality is a copyable and IMMUTABLE (except by assignment) +// object that specifies how many times a mock function is expected to +// be called. The implementation of Cardinality is just a std::shared_ptr +// to const CardinalityInterface. Don't inherit from Cardinality! +class GTEST_API_ Cardinality { + public: + // Constructs a null cardinality. Needed for storing Cardinality + // objects in STL containers. + Cardinality() {} + + // Constructs a Cardinality from its implementation. + explicit Cardinality(const CardinalityInterface* impl) : impl_(impl) {} + + // Conservative estimate on the lower/upper bound of the number of + // calls allowed. + int ConservativeLowerBound() const { return impl_->ConservativeLowerBound(); } + int ConservativeUpperBound() const { return impl_->ConservativeUpperBound(); } + + // Returns true if and only if call_count calls will satisfy this + // cardinality. + bool IsSatisfiedByCallCount(int call_count) const { + return impl_->IsSatisfiedByCallCount(call_count); + } + + // Returns true if and only if call_count calls will saturate this + // cardinality. + bool IsSaturatedByCallCount(int call_count) const { + return impl_->IsSaturatedByCallCount(call_count); + } + + // Returns true if and only if call_count calls will over-saturate this + // cardinality, i.e. exceed the maximum number of allowed calls. + bool IsOverSaturatedByCallCount(int call_count) const { + return impl_->IsSaturatedByCallCount(call_count) && + !impl_->IsSatisfiedByCallCount(call_count); + } + + // Describes self to an ostream + void DescribeTo(::std::ostream* os) const { impl_->DescribeTo(os); } + + // Describes the given actual call count to an ostream. + static void DescribeActualCallCountTo(int actual_call_count, + ::std::ostream* os); + + private: + std::shared_ptr impl_; +}; + +// Creates a cardinality that allows at least n calls. +GTEST_API_ Cardinality AtLeast(int n); + +// Creates a cardinality that allows at most n calls. +GTEST_API_ Cardinality AtMost(int n); + +// Creates a cardinality that allows any number of calls. +GTEST_API_ Cardinality AnyNumber(); + +// Creates a cardinality that allows between min and max calls. +GTEST_API_ Cardinality Between(int min, int max); + +// Creates a cardinality that allows exactly n calls. +GTEST_API_ Cardinality Exactly(int n); + +// Creates a cardinality from its implementation. +inline Cardinality MakeCardinality(const CardinalityInterface* c) { + return Cardinality(c); +} + +} // namespace testing + +GTEST_DISABLE_MSC_WARNINGS_POP_() // 4251 + +#endif // GOOGLEMOCK_INCLUDE_GMOCK_GMOCK_CARDINALITIES_H_ diff --git a/graphics/asymptote/LspCpp/third_party/uri/deps/googlemock/include/gmock/gmock-function-mocker.h b/graphics/asymptote/LspCpp/third_party/uri/deps/googlemock/include/gmock/gmock-function-mocker.h new file mode 100644 index 0000000000..2de1d41b1a --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/uri/deps/googlemock/include/gmock/gmock-function-mocker.h @@ -0,0 +1,514 @@ +// Copyright 2007, Google Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// Google Mock - a framework for writing C++ mock classes. +// +// This file implements MOCK_METHOD. + +// IWYU pragma: private, include "gmock/gmock.h" +// IWYU pragma: friend gmock/.* + +#ifndef GOOGLEMOCK_INCLUDE_GMOCK_INTERNAL_GMOCK_FUNCTION_MOCKER_H_ // NOLINT +#define GOOGLEMOCK_INCLUDE_GMOCK_INTERNAL_GMOCK_FUNCTION_MOCKER_H_ // NOLINT + +#include // IWYU pragma: keep +#include // IWYU pragma: keep + +#include "gmock/gmock-spec-builders.h" +#include "gmock/internal/gmock-internal-utils.h" +#include "gmock/internal/gmock-pp.h" + +namespace testing { +namespace internal { +template +using identity_t = T; + +template +struct ThisRefAdjuster { + template + using AdjustT = typename std::conditional< + std::is_const::type>::value, + typename std::conditional::value, + const T&, const T&&>::type, + typename std::conditional::value, T&, + T&&>::type>::type; + + template + static AdjustT Adjust(const MockType& mock) { + return static_cast>(const_cast(mock)); + } +}; + +constexpr bool PrefixOf(const char* a, const char* b) { + return *a == 0 || (*a == *b && internal::PrefixOf(a + 1, b + 1)); +} + +template +constexpr bool StartsWith(const char (&prefix)[N], const char (&str)[M]) { + return N <= M && internal::PrefixOf(prefix, str); +} + +template +constexpr bool EndsWith(const char (&suffix)[N], const char (&str)[M]) { + return N <= M && internal::PrefixOf(suffix, str + M - N); +} + +template +constexpr bool Equals(const char (&a)[N], const char (&b)[M]) { + return N == M && internal::PrefixOf(a, b); +} + +template +constexpr bool ValidateSpec(const char (&spec)[N]) { + return internal::Equals("const", spec) || + internal::Equals("override", spec) || + internal::Equals("final", spec) || + internal::Equals("noexcept", spec) || + (internal::StartsWith("noexcept(", spec) && + internal::EndsWith(")", spec)) || + internal::Equals("ref(&)", spec) || + internal::Equals("ref(&&)", spec) || + (internal::StartsWith("Calltype(", spec) && + internal::EndsWith(")", spec)); +} + +} // namespace internal + +// The style guide prohibits "using" statements in a namespace scope +// inside a header file. However, the FunctionMocker class template +// is meant to be defined in the ::testing namespace. The following +// line is just a trick for working around a bug in MSVC 8.0, which +// cannot handle it if we define FunctionMocker in ::testing. +using internal::FunctionMocker; +} // namespace testing + +#define MOCK_METHOD(...) \ + GMOCK_PP_VARIADIC_CALL(GMOCK_INTERNAL_MOCK_METHOD_ARG_, __VA_ARGS__) + +#define GMOCK_INTERNAL_MOCK_METHOD_ARG_1(...) \ + GMOCK_INTERNAL_WRONG_ARITY(__VA_ARGS__) + +#define GMOCK_INTERNAL_MOCK_METHOD_ARG_2(...) \ + GMOCK_INTERNAL_WRONG_ARITY(__VA_ARGS__) + +#define GMOCK_INTERNAL_MOCK_METHOD_ARG_3(_Ret, _MethodName, _Args) \ + GMOCK_INTERNAL_MOCK_METHOD_ARG_4(_Ret, _MethodName, _Args, ()) + +#define GMOCK_INTERNAL_MOCK_METHOD_ARG_4(_Ret, _MethodName, _Args, _Spec) \ + GMOCK_INTERNAL_ASSERT_PARENTHESIS(_Args); \ + GMOCK_INTERNAL_ASSERT_PARENTHESIS(_Spec); \ + GMOCK_INTERNAL_ASSERT_VALID_SIGNATURE( \ + GMOCK_PP_NARG0 _Args, GMOCK_INTERNAL_SIGNATURE(_Ret, _Args)); \ + GMOCK_INTERNAL_ASSERT_VALID_SPEC(_Spec) \ + GMOCK_INTERNAL_MOCK_METHOD_IMPL( \ + GMOCK_PP_NARG0 _Args, _MethodName, GMOCK_INTERNAL_HAS_CONST(_Spec), \ + GMOCK_INTERNAL_HAS_OVERRIDE(_Spec), GMOCK_INTERNAL_HAS_FINAL(_Spec), \ + GMOCK_INTERNAL_GET_NOEXCEPT_SPEC(_Spec), \ + GMOCK_INTERNAL_GET_CALLTYPE_SPEC(_Spec), \ + GMOCK_INTERNAL_GET_REF_SPEC(_Spec), \ + (GMOCK_INTERNAL_SIGNATURE(_Ret, _Args))) + +#define GMOCK_INTERNAL_MOCK_METHOD_ARG_5(...) \ + GMOCK_INTERNAL_WRONG_ARITY(__VA_ARGS__) + +#define GMOCK_INTERNAL_MOCK_METHOD_ARG_6(...) \ + GMOCK_INTERNAL_WRONG_ARITY(__VA_ARGS__) + +#define GMOCK_INTERNAL_MOCK_METHOD_ARG_7(...) \ + GMOCK_INTERNAL_WRONG_ARITY(__VA_ARGS__) + +#define GMOCK_INTERNAL_WRONG_ARITY(...) \ + static_assert( \ + false, \ + "MOCK_METHOD must be called with 3 or 4 arguments. _Ret, " \ + "_MethodName, _Args and optionally _Spec. _Args and _Spec must be " \ + "enclosed in parentheses. If _Ret is a type with unprotected commas, " \ + "it must also be enclosed in parentheses.") + +#define GMOCK_INTERNAL_ASSERT_PARENTHESIS(_Tuple) \ + static_assert( \ + GMOCK_PP_IS_ENCLOSED_PARENS(_Tuple), \ + GMOCK_PP_STRINGIZE(_Tuple) " should be enclosed in parentheses.") + +#define GMOCK_INTERNAL_ASSERT_VALID_SIGNATURE(_N, ...) \ + static_assert( \ + std::is_function<__VA_ARGS__>::value, \ + "Signature must be a function type, maybe return type contains " \ + "unprotected comma."); \ + static_assert( \ + ::testing::tuple_size::ArgumentTuple>::value == _N, \ + "This method does not take " GMOCK_PP_STRINGIZE( \ + _N) " arguments. Parenthesize all types with unprotected commas.") + +#define GMOCK_INTERNAL_ASSERT_VALID_SPEC(_Spec) \ + GMOCK_PP_FOR_EACH(GMOCK_INTERNAL_ASSERT_VALID_SPEC_ELEMENT, ~, _Spec) + +#define GMOCK_INTERNAL_MOCK_METHOD_IMPL(_N, _MethodName, _Constness, \ + _Override, _Final, _NoexceptSpec, \ + _CallType, _RefSpec, _Signature) \ + typename ::testing::internal::Function::Result \ + GMOCK_INTERNAL_EXPAND(_CallType) \ + _MethodName(GMOCK_PP_REPEAT(GMOCK_INTERNAL_PARAMETER, _Signature, _N)) \ + GMOCK_PP_IF(_Constness, const, ) _RefSpec _NoexceptSpec \ + GMOCK_PP_IF(_Override, override, ) GMOCK_PP_IF(_Final, final, ) { \ + GMOCK_MOCKER_(_N, _Constness, _MethodName) \ + .SetOwnerAndName(this, #_MethodName); \ + return GMOCK_MOCKER_(_N, _Constness, _MethodName) \ + .Invoke(GMOCK_PP_REPEAT(GMOCK_INTERNAL_FORWARD_ARG, _Signature, _N)); \ + } \ + ::testing::MockSpec gmock_##_MethodName( \ + GMOCK_PP_REPEAT(GMOCK_INTERNAL_MATCHER_PARAMETER, _Signature, _N)) \ + GMOCK_PP_IF(_Constness, const, ) _RefSpec { \ + GMOCK_MOCKER_(_N, _Constness, _MethodName).RegisterOwner(this); \ + return GMOCK_MOCKER_(_N, _Constness, _MethodName) \ + .With(GMOCK_PP_REPEAT(GMOCK_INTERNAL_MATCHER_ARGUMENT, , _N)); \ + } \ + ::testing::MockSpec gmock_##_MethodName( \ + const ::testing::internal::WithoutMatchers&, \ + GMOCK_PP_IF(_Constness, const, )::testing::internal::Function< \ + GMOCK_PP_REMOVE_PARENS(_Signature)>*) const _RefSpec _NoexceptSpec { \ + return ::testing::internal::ThisRefAdjuster::Adjust(*this) \ + .gmock_##_MethodName(GMOCK_PP_REPEAT( \ + GMOCK_INTERNAL_A_MATCHER_ARGUMENT, _Signature, _N)); \ + } \ + mutable ::testing::FunctionMocker \ + GMOCK_MOCKER_(_N, _Constness, _MethodName) + +#define GMOCK_INTERNAL_EXPAND(...) __VA_ARGS__ + +// Valid modifiers. +#define GMOCK_INTERNAL_HAS_CONST(_Tuple) \ + GMOCK_PP_HAS_COMMA(GMOCK_PP_FOR_EACH(GMOCK_INTERNAL_DETECT_CONST, ~, _Tuple)) + +#define GMOCK_INTERNAL_HAS_OVERRIDE(_Tuple) \ + GMOCK_PP_HAS_COMMA( \ + GMOCK_PP_FOR_EACH(GMOCK_INTERNAL_DETECT_OVERRIDE, ~, _Tuple)) + +#define GMOCK_INTERNAL_HAS_FINAL(_Tuple) \ + GMOCK_PP_HAS_COMMA(GMOCK_PP_FOR_EACH(GMOCK_INTERNAL_DETECT_FINAL, ~, _Tuple)) + +#define GMOCK_INTERNAL_GET_NOEXCEPT_SPEC(_Tuple) \ + GMOCK_PP_FOR_EACH(GMOCK_INTERNAL_NOEXCEPT_SPEC_IF_NOEXCEPT, ~, _Tuple) + +#define GMOCK_INTERNAL_NOEXCEPT_SPEC_IF_NOEXCEPT(_i, _, _elem) \ + GMOCK_PP_IF( \ + GMOCK_PP_HAS_COMMA(GMOCK_INTERNAL_DETECT_NOEXCEPT(_i, _, _elem)), \ + _elem, ) + +#define GMOCK_INTERNAL_GET_CALLTYPE_SPEC(_Tuple) \ + GMOCK_PP_FOR_EACH(GMOCK_INTERNAL_CALLTYPE_SPEC_IF_CALLTYPE, ~, _Tuple) + +#define GMOCK_INTERNAL_CALLTYPE_SPEC_IF_CALLTYPE(_i, _, _elem) \ + GMOCK_PP_IF( \ + GMOCK_PP_HAS_COMMA(GMOCK_INTERNAL_DETECT_CALLTYPE(_i, _, _elem)), \ + GMOCK_PP_CAT(GMOCK_INTERNAL_UNPACK_, _elem), ) + +#define GMOCK_INTERNAL_GET_REF_SPEC(_Tuple) \ + GMOCK_PP_FOR_EACH(GMOCK_INTERNAL_REF_SPEC_IF_REF, ~, _Tuple) + +#define GMOCK_INTERNAL_REF_SPEC_IF_REF(_i, _, _elem) \ + GMOCK_PP_IF(GMOCK_PP_HAS_COMMA(GMOCK_INTERNAL_DETECT_REF(_i, _, _elem)), \ + GMOCK_PP_CAT(GMOCK_INTERNAL_UNPACK_, _elem), ) + +#ifdef GMOCK_INTERNAL_STRICT_SPEC_ASSERT +#define GMOCK_INTERNAL_ASSERT_VALID_SPEC_ELEMENT(_i, _, _elem) \ + static_assert( \ + ::testing::internal::ValidateSpec(GMOCK_PP_STRINGIZE(_elem)), \ + "Token \'" GMOCK_PP_STRINGIZE( \ + _elem) "\' cannot be recognized as a valid specification " \ + "modifier. Is a ',' missing?"); +#else +#define GMOCK_INTERNAL_ASSERT_VALID_SPEC_ELEMENT(_i, _, _elem) \ + static_assert( \ + (GMOCK_PP_HAS_COMMA(GMOCK_INTERNAL_DETECT_CONST(_i, _, _elem)) + \ + GMOCK_PP_HAS_COMMA(GMOCK_INTERNAL_DETECT_OVERRIDE(_i, _, _elem)) + \ + GMOCK_PP_HAS_COMMA(GMOCK_INTERNAL_DETECT_FINAL(_i, _, _elem)) + \ + GMOCK_PP_HAS_COMMA(GMOCK_INTERNAL_DETECT_NOEXCEPT(_i, _, _elem)) + \ + GMOCK_PP_HAS_COMMA(GMOCK_INTERNAL_DETECT_REF(_i, _, _elem)) + \ + GMOCK_PP_HAS_COMMA(GMOCK_INTERNAL_DETECT_CALLTYPE(_i, _, _elem))) == 1, \ + GMOCK_PP_STRINGIZE( \ + _elem) " cannot be recognized as a valid specification modifier."); +#endif // GMOCK_INTERNAL_STRICT_SPEC_ASSERT + +// Modifiers implementation. +#define GMOCK_INTERNAL_DETECT_CONST(_i, _, _elem) \ + GMOCK_PP_CAT(GMOCK_INTERNAL_DETECT_CONST_I_, _elem) + +#define GMOCK_INTERNAL_DETECT_CONST_I_const , + +#define GMOCK_INTERNAL_DETECT_OVERRIDE(_i, _, _elem) \ + GMOCK_PP_CAT(GMOCK_INTERNAL_DETECT_OVERRIDE_I_, _elem) + +#define GMOCK_INTERNAL_DETECT_OVERRIDE_I_override , + +#define GMOCK_INTERNAL_DETECT_FINAL(_i, _, _elem) \ + GMOCK_PP_CAT(GMOCK_INTERNAL_DETECT_FINAL_I_, _elem) + +#define GMOCK_INTERNAL_DETECT_FINAL_I_final , + +#define GMOCK_INTERNAL_DETECT_NOEXCEPT(_i, _, _elem) \ + GMOCK_PP_CAT(GMOCK_INTERNAL_DETECT_NOEXCEPT_I_, _elem) + +#define GMOCK_INTERNAL_DETECT_NOEXCEPT_I_noexcept , + +#define GMOCK_INTERNAL_DETECT_REF(_i, _, _elem) \ + GMOCK_PP_CAT(GMOCK_INTERNAL_DETECT_REF_I_, _elem) + +#define GMOCK_INTERNAL_DETECT_REF_I_ref , + +#define GMOCK_INTERNAL_UNPACK_ref(x) x + +#define GMOCK_INTERNAL_DETECT_CALLTYPE(_i, _, _elem) \ + GMOCK_PP_CAT(GMOCK_INTERNAL_DETECT_CALLTYPE_I_, _elem) + +#define GMOCK_INTERNAL_DETECT_CALLTYPE_I_Calltype , + +#define GMOCK_INTERNAL_UNPACK_Calltype(...) __VA_ARGS__ + +// Note: The use of `identity_t` here allows _Ret to represent return types that +// would normally need to be specified in a different way. For example, a method +// returning a function pointer must be written as +// +// fn_ptr_return_t (*method(method_args_t...))(fn_ptr_args_t...) +// +// But we only support placing the return type at the beginning. To handle this, +// we wrap all calls in identity_t, so that a declaration will be expanded to +// +// identity_t method(method_args_t...) +// +// This allows us to work around the syntactic oddities of function/method +// types. +#define GMOCK_INTERNAL_SIGNATURE(_Ret, _Args) \ + ::testing::internal::identity_t( \ + GMOCK_PP_FOR_EACH(GMOCK_INTERNAL_GET_TYPE, _, _Args)) + +#define GMOCK_INTERNAL_GET_TYPE(_i, _, _elem) \ + GMOCK_PP_COMMA_IF(_i) \ + GMOCK_PP_IF(GMOCK_PP_IS_BEGIN_PARENS(_elem), GMOCK_PP_REMOVE_PARENS, \ + GMOCK_PP_IDENTITY) \ + (_elem) + +#define GMOCK_INTERNAL_PARAMETER(_i, _Signature, _) \ + GMOCK_PP_COMMA_IF(_i) \ + GMOCK_INTERNAL_ARG_O(_i, GMOCK_PP_REMOVE_PARENS(_Signature)) \ + gmock_a##_i + +#define GMOCK_INTERNAL_FORWARD_ARG(_i, _Signature, _) \ + GMOCK_PP_COMMA_IF(_i) \ + ::std::forward(gmock_a##_i) + +#define GMOCK_INTERNAL_MATCHER_PARAMETER(_i, _Signature, _) \ + GMOCK_PP_COMMA_IF(_i) \ + GMOCK_INTERNAL_MATCHER_O(_i, GMOCK_PP_REMOVE_PARENS(_Signature)) \ + gmock_a##_i + +#define GMOCK_INTERNAL_MATCHER_ARGUMENT(_i, _1, _2) \ + GMOCK_PP_COMMA_IF(_i) \ + gmock_a##_i + +#define GMOCK_INTERNAL_A_MATCHER_ARGUMENT(_i, _Signature, _) \ + GMOCK_PP_COMMA_IF(_i) \ + ::testing::A() + +#define GMOCK_INTERNAL_ARG_O(_i, ...) \ + typename ::testing::internal::Function<__VA_ARGS__>::template Arg<_i>::type + +#define GMOCK_INTERNAL_MATCHER_O(_i, ...) \ + const ::testing::Matcher::template Arg<_i>::type>& + +#define MOCK_METHOD0(m, ...) GMOCK_INTERNAL_MOCK_METHODN(, , m, 0, __VA_ARGS__) +#define MOCK_METHOD1(m, ...) GMOCK_INTERNAL_MOCK_METHODN(, , m, 1, __VA_ARGS__) +#define MOCK_METHOD2(m, ...) GMOCK_INTERNAL_MOCK_METHODN(, , m, 2, __VA_ARGS__) +#define MOCK_METHOD3(m, ...) GMOCK_INTERNAL_MOCK_METHODN(, , m, 3, __VA_ARGS__) +#define MOCK_METHOD4(m, ...) GMOCK_INTERNAL_MOCK_METHODN(, , m, 4, __VA_ARGS__) +#define MOCK_METHOD5(m, ...) GMOCK_INTERNAL_MOCK_METHODN(, , m, 5, __VA_ARGS__) +#define MOCK_METHOD6(m, ...) GMOCK_INTERNAL_MOCK_METHODN(, , m, 6, __VA_ARGS__) +#define MOCK_METHOD7(m, ...) GMOCK_INTERNAL_MOCK_METHODN(, , m, 7, __VA_ARGS__) +#define MOCK_METHOD8(m, ...) GMOCK_INTERNAL_MOCK_METHODN(, , m, 8, __VA_ARGS__) +#define MOCK_METHOD9(m, ...) GMOCK_INTERNAL_MOCK_METHODN(, , m, 9, __VA_ARGS__) +#define MOCK_METHOD10(m, ...) \ + GMOCK_INTERNAL_MOCK_METHODN(, , m, 10, __VA_ARGS__) + +#define MOCK_CONST_METHOD0(m, ...) \ + GMOCK_INTERNAL_MOCK_METHODN(const, , m, 0, __VA_ARGS__) +#define MOCK_CONST_METHOD1(m, ...) \ + GMOCK_INTERNAL_MOCK_METHODN(const, , m, 1, __VA_ARGS__) +#define MOCK_CONST_METHOD2(m, ...) \ + GMOCK_INTERNAL_MOCK_METHODN(const, , m, 2, __VA_ARGS__) +#define MOCK_CONST_METHOD3(m, ...) \ + GMOCK_INTERNAL_MOCK_METHODN(const, , m, 3, __VA_ARGS__) +#define MOCK_CONST_METHOD4(m, ...) \ + GMOCK_INTERNAL_MOCK_METHODN(const, , m, 4, __VA_ARGS__) +#define MOCK_CONST_METHOD5(m, ...) \ + GMOCK_INTERNAL_MOCK_METHODN(const, , m, 5, __VA_ARGS__) +#define MOCK_CONST_METHOD6(m, ...) \ + GMOCK_INTERNAL_MOCK_METHODN(const, , m, 6, __VA_ARGS__) +#define MOCK_CONST_METHOD7(m, ...) \ + GMOCK_INTERNAL_MOCK_METHODN(const, , m, 7, __VA_ARGS__) +#define MOCK_CONST_METHOD8(m, ...) \ + GMOCK_INTERNAL_MOCK_METHODN(const, , m, 8, __VA_ARGS__) +#define MOCK_CONST_METHOD9(m, ...) \ + GMOCK_INTERNAL_MOCK_METHODN(const, , m, 9, __VA_ARGS__) +#define MOCK_CONST_METHOD10(m, ...) \ + GMOCK_INTERNAL_MOCK_METHODN(const, , m, 10, __VA_ARGS__) + +#define MOCK_METHOD0_T(m, ...) MOCK_METHOD0(m, __VA_ARGS__) +#define MOCK_METHOD1_T(m, ...) MOCK_METHOD1(m, __VA_ARGS__) +#define MOCK_METHOD2_T(m, ...) MOCK_METHOD2(m, __VA_ARGS__) +#define MOCK_METHOD3_T(m, ...) MOCK_METHOD3(m, __VA_ARGS__) +#define MOCK_METHOD4_T(m, ...) MOCK_METHOD4(m, __VA_ARGS__) +#define MOCK_METHOD5_T(m, ...) MOCK_METHOD5(m, __VA_ARGS__) +#define MOCK_METHOD6_T(m, ...) MOCK_METHOD6(m, __VA_ARGS__) +#define MOCK_METHOD7_T(m, ...) MOCK_METHOD7(m, __VA_ARGS__) +#define MOCK_METHOD8_T(m, ...) MOCK_METHOD8(m, __VA_ARGS__) +#define MOCK_METHOD9_T(m, ...) MOCK_METHOD9(m, __VA_ARGS__) +#define MOCK_METHOD10_T(m, ...) MOCK_METHOD10(m, __VA_ARGS__) + +#define MOCK_CONST_METHOD0_T(m, ...) MOCK_CONST_METHOD0(m, __VA_ARGS__) +#define MOCK_CONST_METHOD1_T(m, ...) MOCK_CONST_METHOD1(m, __VA_ARGS__) +#define MOCK_CONST_METHOD2_T(m, ...) MOCK_CONST_METHOD2(m, __VA_ARGS__) +#define MOCK_CONST_METHOD3_T(m, ...) MOCK_CONST_METHOD3(m, __VA_ARGS__) +#define MOCK_CONST_METHOD4_T(m, ...) MOCK_CONST_METHOD4(m, __VA_ARGS__) +#define MOCK_CONST_METHOD5_T(m, ...) MOCK_CONST_METHOD5(m, __VA_ARGS__) +#define MOCK_CONST_METHOD6_T(m, ...) MOCK_CONST_METHOD6(m, __VA_ARGS__) +#define MOCK_CONST_METHOD7_T(m, ...) MOCK_CONST_METHOD7(m, __VA_ARGS__) +#define MOCK_CONST_METHOD8_T(m, ...) MOCK_CONST_METHOD8(m, __VA_ARGS__) +#define MOCK_CONST_METHOD9_T(m, ...) MOCK_CONST_METHOD9(m, __VA_ARGS__) +#define MOCK_CONST_METHOD10_T(m, ...) MOCK_CONST_METHOD10(m, __VA_ARGS__) + +#define MOCK_METHOD0_WITH_CALLTYPE(ct, m, ...) \ + GMOCK_INTERNAL_MOCK_METHODN(, ct, m, 0, __VA_ARGS__) +#define MOCK_METHOD1_WITH_CALLTYPE(ct, m, ...) \ + GMOCK_INTERNAL_MOCK_METHODN(, ct, m, 1, __VA_ARGS__) +#define MOCK_METHOD2_WITH_CALLTYPE(ct, m, ...) \ + GMOCK_INTERNAL_MOCK_METHODN(, ct, m, 2, __VA_ARGS__) +#define MOCK_METHOD3_WITH_CALLTYPE(ct, m, ...) \ + GMOCK_INTERNAL_MOCK_METHODN(, ct, m, 3, __VA_ARGS__) +#define MOCK_METHOD4_WITH_CALLTYPE(ct, m, ...) \ + GMOCK_INTERNAL_MOCK_METHODN(, ct, m, 4, __VA_ARGS__) +#define MOCK_METHOD5_WITH_CALLTYPE(ct, m, ...) \ + GMOCK_INTERNAL_MOCK_METHODN(, ct, m, 5, __VA_ARGS__) +#define MOCK_METHOD6_WITH_CALLTYPE(ct, m, ...) \ + GMOCK_INTERNAL_MOCK_METHODN(, ct, m, 6, __VA_ARGS__) +#define MOCK_METHOD7_WITH_CALLTYPE(ct, m, ...) \ + GMOCK_INTERNAL_MOCK_METHODN(, ct, m, 7, __VA_ARGS__) +#define MOCK_METHOD8_WITH_CALLTYPE(ct, m, ...) \ + GMOCK_INTERNAL_MOCK_METHODN(, ct, m, 8, __VA_ARGS__) +#define MOCK_METHOD9_WITH_CALLTYPE(ct, m, ...) \ + GMOCK_INTERNAL_MOCK_METHODN(, ct, m, 9, __VA_ARGS__) +#define MOCK_METHOD10_WITH_CALLTYPE(ct, m, ...) \ + GMOCK_INTERNAL_MOCK_METHODN(, ct, m, 10, __VA_ARGS__) + +#define MOCK_CONST_METHOD0_WITH_CALLTYPE(ct, m, ...) \ + GMOCK_INTERNAL_MOCK_METHODN(const, ct, m, 0, __VA_ARGS__) +#define MOCK_CONST_METHOD1_WITH_CALLTYPE(ct, m, ...) \ + GMOCK_INTERNAL_MOCK_METHODN(const, ct, m, 1, __VA_ARGS__) +#define MOCK_CONST_METHOD2_WITH_CALLTYPE(ct, m, ...) \ + GMOCK_INTERNAL_MOCK_METHODN(const, ct, m, 2, __VA_ARGS__) +#define MOCK_CONST_METHOD3_WITH_CALLTYPE(ct, m, ...) \ + GMOCK_INTERNAL_MOCK_METHODN(const, ct, m, 3, __VA_ARGS__) +#define MOCK_CONST_METHOD4_WITH_CALLTYPE(ct, m, ...) \ + GMOCK_INTERNAL_MOCK_METHODN(const, ct, m, 4, __VA_ARGS__) +#define MOCK_CONST_METHOD5_WITH_CALLTYPE(ct, m, ...) \ + GMOCK_INTERNAL_MOCK_METHODN(const, ct, m, 5, __VA_ARGS__) +#define MOCK_CONST_METHOD6_WITH_CALLTYPE(ct, m, ...) \ + GMOCK_INTERNAL_MOCK_METHODN(const, ct, m, 6, __VA_ARGS__) +#define MOCK_CONST_METHOD7_WITH_CALLTYPE(ct, m, ...) \ + GMOCK_INTERNAL_MOCK_METHODN(const, ct, m, 7, __VA_ARGS__) +#define MOCK_CONST_METHOD8_WITH_CALLTYPE(ct, m, ...) \ + GMOCK_INTERNAL_MOCK_METHODN(const, ct, m, 8, __VA_ARGS__) +#define MOCK_CONST_METHOD9_WITH_CALLTYPE(ct, m, ...) \ + GMOCK_INTERNAL_MOCK_METHODN(const, ct, m, 9, __VA_ARGS__) +#define MOCK_CONST_METHOD10_WITH_CALLTYPE(ct, m, ...) \ + GMOCK_INTERNAL_MOCK_METHODN(const, ct, m, 10, __VA_ARGS__) + +#define MOCK_METHOD0_T_WITH_CALLTYPE(ct, m, ...) \ + MOCK_METHOD0_WITH_CALLTYPE(ct, m, __VA_ARGS__) +#define MOCK_METHOD1_T_WITH_CALLTYPE(ct, m, ...) \ + MOCK_METHOD1_WITH_CALLTYPE(ct, m, __VA_ARGS__) +#define MOCK_METHOD2_T_WITH_CALLTYPE(ct, m, ...) \ + MOCK_METHOD2_WITH_CALLTYPE(ct, m, __VA_ARGS__) +#define MOCK_METHOD3_T_WITH_CALLTYPE(ct, m, ...) \ + MOCK_METHOD3_WITH_CALLTYPE(ct, m, __VA_ARGS__) +#define MOCK_METHOD4_T_WITH_CALLTYPE(ct, m, ...) \ + MOCK_METHOD4_WITH_CALLTYPE(ct, m, __VA_ARGS__) +#define MOCK_METHOD5_T_WITH_CALLTYPE(ct, m, ...) \ + MOCK_METHOD5_WITH_CALLTYPE(ct, m, __VA_ARGS__) +#define MOCK_METHOD6_T_WITH_CALLTYPE(ct, m, ...) \ + MOCK_METHOD6_WITH_CALLTYPE(ct, m, __VA_ARGS__) +#define MOCK_METHOD7_T_WITH_CALLTYPE(ct, m, ...) \ + MOCK_METHOD7_WITH_CALLTYPE(ct, m, __VA_ARGS__) +#define MOCK_METHOD8_T_WITH_CALLTYPE(ct, m, ...) \ + MOCK_METHOD8_WITH_CALLTYPE(ct, m, __VA_ARGS__) +#define MOCK_METHOD9_T_WITH_CALLTYPE(ct, m, ...) \ + MOCK_METHOD9_WITH_CALLTYPE(ct, m, __VA_ARGS__) +#define MOCK_METHOD10_T_WITH_CALLTYPE(ct, m, ...) \ + MOCK_METHOD10_WITH_CALLTYPE(ct, m, __VA_ARGS__) + +#define MOCK_CONST_METHOD0_T_WITH_CALLTYPE(ct, m, ...) \ + MOCK_CONST_METHOD0_WITH_CALLTYPE(ct, m, __VA_ARGS__) +#define MOCK_CONST_METHOD1_T_WITH_CALLTYPE(ct, m, ...) \ + MOCK_CONST_METHOD1_WITH_CALLTYPE(ct, m, __VA_ARGS__) +#define MOCK_CONST_METHOD2_T_WITH_CALLTYPE(ct, m, ...) \ + MOCK_CONST_METHOD2_WITH_CALLTYPE(ct, m, __VA_ARGS__) +#define MOCK_CONST_METHOD3_T_WITH_CALLTYPE(ct, m, ...) \ + MOCK_CONST_METHOD3_WITH_CALLTYPE(ct, m, __VA_ARGS__) +#define MOCK_CONST_METHOD4_T_WITH_CALLTYPE(ct, m, ...) \ + MOCK_CONST_METHOD4_WITH_CALLTYPE(ct, m, __VA_ARGS__) +#define MOCK_CONST_METHOD5_T_WITH_CALLTYPE(ct, m, ...) \ + MOCK_CONST_METHOD5_WITH_CALLTYPE(ct, m, __VA_ARGS__) +#define MOCK_CONST_METHOD6_T_WITH_CALLTYPE(ct, m, ...) \ + MOCK_CONST_METHOD6_WITH_CALLTYPE(ct, m, __VA_ARGS__) +#define MOCK_CONST_METHOD7_T_WITH_CALLTYPE(ct, m, ...) \ + MOCK_CONST_METHOD7_WITH_CALLTYPE(ct, m, __VA_ARGS__) +#define MOCK_CONST_METHOD8_T_WITH_CALLTYPE(ct, m, ...) \ + MOCK_CONST_METHOD8_WITH_CALLTYPE(ct, m, __VA_ARGS__) +#define MOCK_CONST_METHOD9_T_WITH_CALLTYPE(ct, m, ...) \ + MOCK_CONST_METHOD9_WITH_CALLTYPE(ct, m, __VA_ARGS__) +#define MOCK_CONST_METHOD10_T_WITH_CALLTYPE(ct, m, ...) \ + MOCK_CONST_METHOD10_WITH_CALLTYPE(ct, m, __VA_ARGS__) + +#define GMOCK_INTERNAL_MOCK_METHODN(constness, ct, Method, args_num, ...) \ + GMOCK_INTERNAL_ASSERT_VALID_SIGNATURE( \ + args_num, ::testing::internal::identity_t<__VA_ARGS__>); \ + GMOCK_INTERNAL_MOCK_METHOD_IMPL( \ + args_num, Method, GMOCK_PP_NARG0(constness), 0, 0, , ct, , \ + (::testing::internal::identity_t<__VA_ARGS__>)) + +#define GMOCK_MOCKER_(arity, constness, Method) \ + GTEST_CONCAT_TOKEN_(gmock##constness##arity##_##Method##_, __LINE__) + +#endif // GOOGLEMOCK_INCLUDE_GMOCK_INTERNAL_GMOCK_FUNCTION_MOCKER_H_ diff --git a/graphics/asymptote/LspCpp/third_party/uri/deps/googlemock/include/gmock/gmock-matchers.h b/graphics/asymptote/LspCpp/third_party/uri/deps/googlemock/include/gmock/gmock-matchers.h new file mode 100644 index 0000000000..5cf5019d52 --- /dev/null +++ b/graphics/asymptote/LspCpp/third_party/uri/deps/googlemock/include/gmock/gmock-matchers.h @@ -0,0 +1,5572 @@ +// Copyright 2007, Google Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// Google Mock - a framework for writing C++ mock classes. +// +// The MATCHER* family of macros can be used in a namespace scope to +// define custom matchers easily. +// +// Basic Usage +// =========== +// +// The syntax +// +// MATCHER(name, description_string) { statements; } +// +// defines a matcher with the given name that executes the statements, +// which must return a bool to indicate if the match succeeds. Inside +// the statements, you can refer to the value being matched by 'arg', +// and refer to its type by 'arg_type'. +// +// The description string documents what the matcher does, and is used +// to generate the failure message when the match fails. Since a +// MATCHER() is usually defined in a header file shared by multiple +// C++ source files, we require the description to be a C-string +// literal to avoid possible side effects. It can be empty, in which +// case we'll use the sequence of words in the matcher name as the +// description. +// +// For example: +// +// MATCHER(IsEven, "") { return (arg % 2) == 0; } +// +// allows you to write +// +// // Expects mock_foo.Bar(n) to be called where n is even. +// EXPECT_CALL(mock_foo, Bar(IsEven())); +// +// or, +// +// // Verifies that the value of some_expression is even. +// EXPECT_THAT(some_expression, IsEven()); +// +// If the above assertion fails, it will print something like: +// +// Value of: some_expression +// Expected: is even +// Actual: 7 +// +// where the description "is even" is automatically calculated from the +// matcher name IsEven. +// +// Argument Type +// ============= +// +// Note that the type of the value being matched (arg_type) is +// determined by the context in which you use the matcher and is +// supplied to you by the compiler, so you don't need to worry about +// declaring it (nor can you). This allows the matcher to be +// polymorphic. For example, IsEven() can be used to match any type +// where the value of "(arg % 2) == 0" can be implicitly converted to +// a bool. In the "Bar(IsEven())" example above, if method Bar() +// takes an int, 'arg_type' will be int; if it takes an unsigned long, +// 'arg_type' will be unsigned long; and so on. +// +// Parameterizing Matchers +// ======================= +// +// Sometimes you'll want to parameterize the matcher. For that you +// can use another macro: +// +// MATCHER_P(name, param_name, description_string) { statements; } +// +// For example: +// +// MATCHER_P(HasAbsoluteValue, value, "") { return abs(arg) == value; } +// +// will allow you to write: +// +// EXPECT_THAT(Blah("a"), HasAbsoluteValue(n)); +// +// which may lead to this message (assuming n is 10): +// +// Value of: Blah("a") +// Expected: has absolute value 10 +// Actual: -9 +// +// Note that both the matcher description and its parameter are +// printed, making the message human-friendly. +// +// In the matcher definition body, you can write 'foo_type' to +// reference the type of a parameter named 'foo'. For example, in the +// body of MATCHER_P(HasAbsoluteValue, value) above, you can write +// 'value_type' to refer to the type of 'value'. +// +// We also provide MATCHER_P2, MATCHER_P3, ..., up to MATCHER_P$n to +// support multi-parameter matchers. +// +// Describing Parameterized Matchers +// ================================= +// +// The last argument to MATCHER*() is a string-typed expression. The +// expression can reference all of the matcher's parameters and a +// special bool-typed variable named 'negation'. When 'negation' is +// false, the expression should evaluate to the matcher's description; +// otherwise it should evaluate to the description of the negation of +// the matcher. For example, +// +// using testing::PrintToString; +// +// MATCHER_P2(InClosedRange, low, hi, +// std::string(negation ? "is not" : "is") + " in range [" + +// PrintToString(low) + ", " + PrintToString(hi) + "]") { +// return low <= arg && arg <= hi; +// } +// ... +// EXPECT_THAT(3, InClosedRange(4, 6)); +// EXPECT_THAT(3, Not(InClosedRange(2, 4))); +// +// would generate two failures that contain the text: +// +// Expected: is in range [4, 6] +// ... +// Expected: is not in range [2, 4] +// +// If you specify "" as the description, the failure message will +// contain the sequence of words in the matcher name followed by the +// parameter values printed as a tuple. For example, +// +// MATCHER_P2(InClosedRange, low, hi, "") { ... } +// ... +// EXPECT_THAT(3, InClosedRange(4, 6)); +// EXPECT_THAT(3, Not(InClosedRange(2, 4))); +// +// would generate two failures that contain the text: +// +// Expected: in closed range (4, 6) +// ... +// Expected: not (in closed range (2, 4)) +// +// Types of Matcher Parameters +// =========================== +// +// For the purpose of typing, you can view +// +// MATCHER_Pk(Foo, p1, ..., pk, description_string) { ... } +// +// as shorthand for +// +// template +// FooMatcherPk +// Foo(p1_type p1, ..., pk_type pk) { ... } +// +// When you write Foo(v1, ..., vk), the compiler infers the types of +// the parameters v1, ..., and vk for you. If you are not happy with +// the result of the type inference, you can specify the types by +// explicitly instantiating the template, as in Foo(5, +// false). As said earlier, you don't get to (or need to) specify +// 'arg_type' as that's determined by the context in which the matcher +// is used. You can assign the result of expression Foo(p1, ..., pk) +// to a variable of type FooMatcherPk. This +// can be useful when composing matchers. +// +// While you can instantiate a matcher template with reference types, +// passing the parameters by pointer usually makes your code more +// readable. If, however, you still want to pass a parameter by +// reference, be aware that in the failure message generated by the +// matcher you will see the value of the referenced object but not its +// address. +// +// Explaining Match Results +// ======================== +// +// Sometimes the matcher description alone isn't enough to explain why +// the match has failed or succeeded. For example, when expecting a +// long string, it can be very helpful to also print the diff between +// the expected string and the actual one. To achieve that, you can +// optionally stream additional information to a special variable +// named result_listener, whose type is a pointer to class +// MatchResultListener: +// +// MATCHER_P(EqualsLongString, str, "") { +// if (arg == str) return true; +// +// *result_listener << "the difference: " +/// << DiffStrings(str, arg); +// return false; +// } +// +// Overloading Matchers +// ==================== +// +// You can overload matchers with different numbers of parameters: +// +// MATCHER_P(Blah, a, description_string1) { ... } +// MATCHER_P2(Blah, a, b, description_string2) { ... } +// +// Caveats +// ======= +// +// When defining a new matcher, you should also consider implementing +// MatcherInterface or using MakePolymorphicMatcher(). These +// approaches require more work than the MATCHER* macros, but also +// give you more control on the types of the value being matched and +// the matcher parameters, which may leads to better compiler error +// messages when the matcher is used wrong. They also allow +// overloading matchers based on parameter types (as opposed to just +// based on the number of parameters). +// +// MATCHER*() can only be used in a namespace scope as templates cannot be +// declared inside of a local class. +// +// More Information +// ================ +// +// To learn more about using these macros, please search for 'MATCHER' +// on +// https://github.com/google/googletest/blob/master/docs/gmock_cook_book.md +// +// This file also implements some commonly used argument matchers. More +// matchers can be defined by the user implementing the +// MatcherInterface interface if necessary. +// +// See googletest/include/gtest/gtest-matchers.h for the definition of class +// Matcher, class MatcherInterface, and others. + +// IWYU pragma: private, include "gmock/gmock.h" +// IWYU pragma: friend gmock/.* + +#ifndef GOOGLEMOCK_INCLUDE_GMOCK_GMOCK_MATCHERS_H_ +#define GOOGLEMOCK_INCLUDE_GMOCK_GMOCK_MATCHERS_H_ + +#include +#include +#include +#include +#include +#include +#include // NOLINT +#include +#include +#include +#include +#include + +#include "gmock/internal/gmock-internal-utils.h" +#include "gmock/internal/gmock-port.h" +#include "gmock/internal/gmock-pp.h" +#include "gtest/gtest.h" + +// MSVC warning C5046 is new as of VS2017 version 15.8. +#if defined(_MSC_VER) && _MSC_VER >= 1915 +#define GMOCK_MAYBE_5046_ 5046 +#else +#define GMOCK_MAYBE_5046_ +#endif + +GTEST_DISABLE_MSC_WARNINGS_PUSH_( + 4251 GMOCK_MAYBE_5046_ /* class A needs to have dll-interface to be used by + clients of class B */ + /* Symbol involving type with internal linkage not defined */) + +namespace testing { + +// To implement a matcher Foo for type T, define: +// 1. a class FooMatcherImpl that implements the +// MatcherInterface interface, and +// 2. a factory function that creates a Matcher object from a +// FooMatcherImpl*. +// +// The two-level delegation design makes it possible to allow a user +// to write "v" instead of "Eq(v)" where a Matcher is expected, which +// is impossible if we pass matchers by pointers. It also eases +// ownership management as Matcher objects can now be copied like +// plain values. + +// A match result listener that stores the explanation in a string. +class StringMatchResultListener : public MatchResultListener { + public: + StringMatchResultListener() : MatchResultListener(&ss_) {} + + // Returns the explanation accumulated so far. + std::string str() const { return ss_.str(); } + + // Clears the explanation accumulated so far. + void Clear() { ss_.str(""); } + + private: + ::std::stringstream ss_; + + GTEST_DISALLOW_COPY_AND_ASSIGN_(StringMatchResultListener); +}; + +// Anything inside the 'internal' namespace IS INTERNAL IMPLEMENTATION +// and MUST NOT BE USED IN USER CODE!!! +namespace internal { + +// The MatcherCastImpl class template is a helper for implementing +// MatcherCast(). We need this helper in order to partially +// specialize the implementation of MatcherCast() (C++ allows +// class/struct templates to be partially specialized, but not +// function templates.). + +// This general version is used when MatcherCast()'s argument is a +// polymorphic matcher (i.e. something that can be converted to a +// Matcher but is not one yet; for example, Eq(value)) or a value (for +// example, "hello"). +template +class MatcherCastImpl { + public: + static Matcher Cast(const M& polymorphic_matcher_or_value) { + // M can be a polymorphic matcher, in which case we want to use + // its conversion operator to create Matcher. Or it can be a value + // that should be passed to the Matcher's constructor. + // + // We can't call Matcher(polymorphic_matcher_or_value) when M is a + // polymorphic matcher because it'll be ambiguous if T has an implicit + // constructor from M (this usually happens when T has an implicit + // constructor from any type). + // + // It won't work to unconditionally implicit_cast + // polymorphic_matcher_or_value to Matcher because it won't trigger + // a user-defined conversion from M to T if one exists (assuming M is + // a value). + return CastImpl(polymorphic_matcher_or_value, + std::is_convertible>{}, + std::is_convertible{}); + } + + private: + template + static Matcher CastImpl(const M& polymorphic_matcher_or_value, + std::true_type /* convertible_to_matcher */, + std::integral_constant) { + // M is implicitly convertible to Matcher, which means that either + // M is a polymorphic matcher or Matcher has an implicit constructor + // from M. In both cases using the implicit conversion will produce a + // matcher. + // + // Even if T has an implicit constructor from M, it won't be called because + // creating Matcher would require a chain of two user-defined conversions + // (first to create T from M and then to create Matcher from T). + return polymorphic_matcher_or_value; + } + + // M can't be implicitly converted to Matcher, so M isn't a polymorphic + // matcher. It's a value of a type implicitly convertible to T. Use direct + // initialization to create a matcher. + static Matcher CastImpl(const M& value, + std::false_type /* convertible_to_matcher */, + std::true_type /* convertible_to_T */) { + return Matcher(ImplicitCast_(value)); + } + + // M can't be implicitly converted to either Matcher or T. Attempt to use + // polymorphic matcher Eq(value) in this case. + // + // Note that we first attempt to perform an implicit cast on the value and + // only fall back to the polymorphic Eq() matcher afterwards because the + // latter calls bool operator==(const Lhs& lhs, const Rhs& rhs) in the end + // which might be undefined even when Rhs is implicitly convertible to Lhs + // (e.g. std::pair vs. std::pair). + // + // We don't define this method inline as we need the declaration of Eq(). + static Matcher CastImpl(const M& value, + std::false_type /* convertible_to_matcher */, + std::false_type /* convertible_to_T */); +}; + +// This more specialized version is used when MatcherCast()'s argument +// is already a Matcher. This only compiles when type T can be +// statically converted to type U. +template +class MatcherCastImpl> { + public: + static Matcher Cast(const Matcher& source_matcher) { + return Matcher(new Impl(source_matcher)); + } + + private: + class Impl : public MatcherInterface { + public: + explicit Impl(const Matcher& source_matcher) + : source_matcher_(source_matcher) {} + + // We delegate the matching logic to the source matcher. + bool MatchAndExplain(T x, MatchResultListener* listener) const override { + using FromType = typename std::remove_cv::type>::type>::type; + using ToType = typename std::remove_cv::type>::type>::type; + // Do not allow implicitly converting base*/& to derived*/&. + static_assert( + // Do not trigger if only one of them is a pointer. That implies a + // regular conversion and not a down_cast. + (std::is_pointer::type>::value != + std::is_pointer::type>::value) || + std::is_same::value || + !std::is_base_of::value, + "Can't implicitly convert from to "); + + // Do the cast to `U` explicitly if necessary. + // Otherwise, let implicit conversions do the trick. + using CastType = + typename std::conditional::value, + T&, U>::type; + + return source_matcher_.MatchAndExplain(static_cast(x), + listener); + } + + void DescribeTo(::std::ostream* os) const override { + source_matcher_.DescribeTo(os); + } + + void DescribeNegationTo(::std::ostream* os) const override { + source_matcher_.DescribeNegationTo(os); + } + + private: + const Matcher source_matcher_; + }; +}; + +// This even more specialized version is used for efficiently casting +// a matcher to its own type. +template +class MatcherCastImpl> { + public: + static Matcher Cast(const Matcher& matcher) { return matcher; } +}; + +// Template specialization for parameterless Matcher. +template +class MatcherBaseImpl { + public: + MatcherBaseImpl() = default; + + template + operator ::testing::Matcher() const { // NOLINT(runtime/explicit) + return ::testing::Matcher(new + typename Derived::template gmock_Impl()); + } +}; + +// Template specialization for Matcher with parameters. +template